亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? ogrspatialreference.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
/******************************************************************************
 * $Id: ogrspatialreference.cpp 11724 2007-07-05 15:53:06Z dron $
 *
 * Project:  OpenGIS Simple Features Reference Implementation
 * Purpose:  The OGRSpatialReference class.
 * Author:   Frank Warmerdam, warmerdam@pobox.com
 *
 ******************************************************************************
 * Copyright (c) 1999,  Les Technologies SoftMap Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 ****************************************************************************/

#include "ogr_spatialref.h"
#include "ogr_p.h"
#include "cpl_csv.h"

CPL_CVSID("$Id: ogrspatialreference.cpp 11724 2007-07-05 15:53:06Z dron $");

// The current opinion is that WKT longitudes like central meridian
// should be relative to greenwich, not the prime meridian in use. 
// Define the following if they should be relative to the prime meridian
// of then geogcs.
#undef WKT_LONGITUDE_RELATIVE_TO_PM

/************************************************************************/
/*                           OGRPrintDouble()                           */
/************************************************************************/

static void OGRPrintDouble( char * pszStrBuf, double dfValue )

{
    sprintf( pszStrBuf, "%.16g", dfValue );

    int nLen = strlen(pszStrBuf);

    // The following hack is intended to truncate some "precision" in cases
    // that appear to be roundoff error. 
    if( nLen > 15 
        && (strcmp(pszStrBuf+nLen-6,"999999") == 0
            || strcmp(pszStrBuf+nLen-6,"000001") == 0) )
    {
        sprintf( pszStrBuf, "%.15g", dfValue );
    }
}

/************************************************************************/
/*                        OGRSpatialReference()                         */
/************************************************************************/

/**
 * Constructor.
 *
 * This constructor takes an optional string argument which if passed
 * should be a WKT representation of an SRS.  Passing this is equivelent
 * to not passing it, and then calling importFromWkt() with the WKT string.
 *
 * Note that newly created objects are given a reference count of one. 
 *
 * The C function OSRNewSpatialReference() does the same thing as this
 * constructor. 
 *
 * @param pszWKT well known text definition to which the object should
 * be initialized, or NULL (the default). 
 */

OGRSpatialReference::OGRSpatialReference( const char * pszWKT )

{
    bNormInfoSet = FALSE;
    nRefCount = 1;
    poRoot = NULL;

    if( pszWKT != NULL )
        importFromWkt( (char **) &pszWKT );
}

/************************************************************************/
/*                       OSRNewSpatialReference()                       */
/************************************************************************/

OGRSpatialReferenceH CPL_STDCALL OSRNewSpatialReference( const char *pszWKT )

{
    OGRSpatialReference * poSRS;

    poSRS = new OGRSpatialReference();

    if( pszWKT != NULL && strlen(pszWKT) > 0 )
    {
        if( poSRS->importFromWkt( (char **) (&pszWKT) ) != OGRERR_NONE )
        {
            delete poSRS;
            poSRS = NULL;
        }
    }

    return poSRS;
}

/************************************************************************/
/*                        OGRSpatialReference()                         */
/*                                                                      */
/*      Simple copy constructor.  See also Clone().                     */
/************************************************************************/

OGRSpatialReference::OGRSpatialReference(const OGRSpatialReference &oOther)

{
    bNormInfoSet = FALSE;
    nRefCount = 1;
    poRoot = NULL;

    if( oOther.poRoot != NULL )
        poRoot = oOther.poRoot->Clone();
}

/************************************************************************/
/*                        ~OGRSpatialReference()                        */
/************************************************************************/

/**
 * OGRSpatialReference destructor. 
 *
 * The C function OSRDestroySpatialReference() does the same thing as this
 * method. 
 */

OGRSpatialReference::~OGRSpatialReference()

{
    if( poRoot != NULL )
        delete poRoot;
}

/************************************************************************/
/*                     OSRDestroySpatialReference()                     */
/************************************************************************/

void CPL_STDCALL OSRDestroySpatialReference( OGRSpatialReferenceH hSRS )

{
    delete ((OGRSpatialReference *) hSRS);
}

/************************************************************************/
/*                               Clear()                                */
/************************************************************************/

/**
 * Wipe current definition.
 *
 * Returns OGRSpatialReference to a state with no definition, as it 
 * exists when first created.  It does not affect reference counts.
 */

void OGRSpatialReference::Clear()

{
    if( poRoot )
        delete poRoot;

    poRoot = NULL;
}

/************************************************************************/
/*                             operator=()                              */
/************************************************************************/

OGRSpatialReference &
OGRSpatialReference::operator=(const OGRSpatialReference &oSource)

{
    if( poRoot != NULL )
    {
        delete poRoot;
        poRoot = NULL;
    }
    
    if( oSource.poRoot != NULL )
        poRoot = oSource.poRoot->Clone();

    return *this;
}

/************************************************************************/
/*                             Reference()                              */
/************************************************************************/

/**
 * Increments the reference count by one.
 *
 * The reference count is used keep track of the number of OGRGeometry objects
 * referencing this SRS.
 *
 * The method does the same thing as the C function OSRReference(). 
 *
 * @return the updated reference count.
 */

int OGRSpatialReference::Reference()

{
    return ++nRefCount;
}

/************************************************************************/
/*                            OSRReference()                            */
/************************************************************************/

int OSRReference( OGRSpatialReferenceH hSRS )

{
    return ((OGRSpatialReference *) hSRS)->Reference();
}

/************************************************************************/
/*                            Dereference()                             */
/************************************************************************/

/**
 * Decrements the reference count by one.
 *
 * The method does the same thing as the C function OSRDereference(). 
 *
 * @return the updated reference count.
 */

int OGRSpatialReference::Dereference()

{
    return --nRefCount;
}

/************************************************************************/
/*                           OSRDereference()                           */
/************************************************************************/

int OSRDereference( OGRSpatialReferenceH hSRS )

{
    return ((OGRSpatialReference *) hSRS)->Dereference();
}

/************************************************************************/
/*                         GetReferenceCount()                          */
/************************************************************************/

/**
 * \fn int OGRSpatialReference::GetReferenceCount() const;
 *
 * Fetch current reference count.
 *
 * @return the current reference count.
 */

/************************************************************************/
/*                              Release()                               */
/************************************************************************/

/**
 * Decrements the reference count by one, and destroy if zero.
 *
 * The method does the same thing as the C function OSRRelease(). 
 */

void OGRSpatialReference::Release()

{
    if( this && Dereference() <= 0 ) 
        delete this;
}

/************************************************************************/
/*                             OSRRelease()                             */
/************************************************************************/

void OSRRelease( OGRSpatialReferenceH hSRS )

{
    ((OGRSpatialReference *) hSRS)->Release();
}

/************************************************************************/
/*                              SetRoot()                               */
/************************************************************************/

/**
 * Set the root SRS node.
 *
 * If the object has an existing tree of OGR_SRSNodes, they are destroyed
 * as part of assigning the new root.  Ownership of the passed OGR_SRSNode is
 * is assumed by the OGRSpatialReference.
 *
 * @param poNewRoot object to assign as root.
 */

void OGRSpatialReference::SetRoot( OGR_SRSNode * poNewRoot )

{
    if( poRoot != NULL )
        delete poRoot;

    poRoot = poNewRoot;
}

/************************************************************************/
/*                            GetAttrNode()                             */
/************************************************************************/

/**
 * Find named node in tree.
 *
 * This method does a pre-order traversal of the node tree searching for
 * a node with this exact value (case insensitive), and returns it.  Leaf
 * nodes are not considered, under the assumption that they are just
 * attribute value nodes.
 *
 * If a node appears more than once in the tree (such as UNIT for instance),
 * the first encountered will be returned.  Use GetNode() on a subtree to be
 * more specific. 
 *
 * @param pszNodePath the name of the node to search for.  May contain multiple
 * components such as "GEOGCS|UNITS".
 *
 * @return a pointer to the node found, or NULL if none.
 */

OGR_SRSNode *OGRSpatialReference::GetAttrNode( const char * pszNodePath )

{
    char        **papszPathTokens;
    OGR_SRSNode *poNode;

    papszPathTokens = CSLTokenizeStringComplex(pszNodePath, "|", TRUE, FALSE);

    if( CSLCount( papszPathTokens ) < 1 )
        return NULL;

    poNode = GetRoot();
    for( int i = 0; poNode != NULL && papszPathTokens[i] != NULL; i++ )
    {
        poNode = poNode->GetNode( papszPathTokens[i] );
    }

    CSLDestroy( papszPathTokens );

    return poNode;
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲婷婷在线视频| k8久久久一区二区三区| 风间由美一区二区av101| 日本韩国精品在线| 国产欧美一区二区三区在线老狼 | 色屁屁一区二区| 精品国产电影一区二区| 亚洲午夜久久久久久久久久久| 国产精品夜夜嗨| 91精品国产综合久久香蕉麻豆| 国产欧美一区二区精品忘忧草 | www.在线成人| ww亚洲ww在线观看国产| 婷婷中文字幕一区三区| 色婷婷av一区二区三区大白胸| 国产精品美女久久久久高潮| 韩国精品在线观看| 91精品国产一区二区三区香蕉| 亚洲最快最全在线视频| 91在线码无精品| 国产精品成人在线观看| 国产91精品免费| 国产日韩欧美不卡| 国产精品一区二区三区网站| 精品日韩99亚洲| 精品一区二区在线免费观看| 91精品免费在线| 日韩高清一级片| 欧美一区二区在线不卡| 丝袜亚洲精品中文字幕一区| 欧美人狂配大交3d怪物一区| 亚洲chinese男男1069| 欧美视频一区二| 亚洲午夜精品网| 欧美日韩国产一区| 日本视频一区二区三区| 日韩一区二区在线看片| 国产一区亚洲一区| 国产丝袜欧美中文另类| av毛片久久久久**hd| 日韩美女精品在线| 91九色02白丝porn| 亚洲高清不卡在线| 欧美电影免费观看高清完整版 | 日本麻豆一区二区三区视频| 91麻豆精品国产91久久久久| 国内精品写真在线观看| 国产欧美一区二区精品婷婷| 97久久久精品综合88久久| 一区二区成人在线视频| 欧美精品xxxxbbbb| 极品少妇xxxx精品少妇| 国产精品毛片高清在线完整版| 91亚洲国产成人精品一区二三| 亚洲精品国产a久久久久久| 欧美日韩国产成人在线免费| 久久99精品久久久久久动态图| 国产午夜久久久久| 欧美性受极品xxxx喷水| 久久精品久久精品| 成人免费一区二区三区视频| 欧美日韩国产片| 国产成人免费高清| 一区视频在线播放| 欧美一区二区三区免费| 丁香六月久久综合狠狠色| 亚洲一区二区在线观看视频| 久久亚洲精品国产精品紫薇| 91在线云播放| 毛片不卡一区二区| 亚洲欧美激情在线| 精品捆绑美女sm三区| 色综合久久久久综合体桃花网| 免费观看一级特黄欧美大片| 自拍偷自拍亚洲精品播放| 欧美一区二区三区人| 97久久超碰国产精品| 91网站最新网址| 亚洲欧洲国产日韩| 欧美精品一区二区在线播放| 亚洲福利一区二区三区| 国产亚洲精久久久久久| 欧美疯狂性受xxxxx喷水图片| 欧美亚洲综合在线| 国产精品99久久不卡二区| 亚洲bt欧美bt精品| 亚洲男人天堂av网| 国产亚洲美州欧州综合国| 91精品久久久久久蜜臀| 92精品国产成人观看免费| 国产伦精品一区二区三区在线观看 | 亚洲18影院在线观看| 中文字幕一区在线观看| 欧美精品一区二区久久婷婷| 欧美狂野另类xxxxoooo| 在线免费精品视频| 99热这里都是精品| 国产xxx精品视频大全| 美国十次综合导航| 奇米一区二区三区| 日韩黄色免费电影| 亚洲h动漫在线| 午夜欧美电影在线观看| 亚洲国产欧美一区二区三区丁香婷| 国产精品久久一卡二卡| 中文字幕电影一区| 日本一区二区动态图| 久久精品在线免费观看| 26uuuu精品一区二区| 久久久综合网站| 久久九九久精品国产免费直播| 精品国产免费人成在线观看| 欧美tickling网站挠脚心| 欧美一区二区久久| 日韩欧美精品在线| 精品国产成人在线影院| 久久久久久久久一| 国产欧美中文在线| 亚洲欧洲成人av每日更新| √…a在线天堂一区| 国产毛片精品视频| 国产一区二区调教| 国产精品影视网| 国产91富婆露脸刺激对白| 成人综合日日夜夜| 色婷婷亚洲婷婷| 欧美三级日韩三级国产三级| 欧美人妇做爰xxxⅹ性高电影| 日韩欧美在线不卡| 久久久国产午夜精品| 国产精品久久久久久久岛一牛影视 | 国产精品国产精品国产专区不蜜 | 国产精品久久久久桃色tv| 日韩一区在线看| 亚洲一区二区美女| 美国十次综合导航| heyzo一本久久综合| 在线亚洲+欧美+日本专区| 欧美制服丝袜第一页| 91精品国产综合久久小美女| 久久影院视频免费| ...av二区三区久久精品| 亚洲成av人片一区二区三区| 婷婷国产在线综合| 美女视频免费一区| 97久久超碰国产精品| 日韩一级二级三级| 国产精品网曝门| 偷拍一区二区三区四区| 国产高清亚洲一区| 精品婷婷伊人一区三区三| 精品国产成人系列| 亚洲一区二区三区视频在线 | 国产三级精品在线| 亚洲一区二区综合| 国产成人午夜精品5599| 欧美少妇性性性| 日本一区二区三区久久久久久久久不| 亚洲美女免费视频| 国产高清久久久久| 在线综合亚洲欧美在线视频| 中文字幕一区二区三区四区不卡 | 国产精品久久免费看| 丝袜国产日韩另类美女| 99re热这里只有精品视频| 精品欧美乱码久久久久久1区2区| 亚洲乱码中文字幕综合| 国产精品自在欧美一区| 欧美久久一二区| 国产精品传媒在线| 国产毛片一区二区| 日韩一区二区三区高清免费看看| 狠狠色综合日日| 欧美精品视频www在线观看 | 欧美亚洲国产一卡| 一色屋精品亚洲香蕉网站| 狠狠色综合色综合网络| 91精品国产欧美一区二区18| 亚洲综合另类小说| 91麻豆蜜桃一区二区三区| 久久久久国产免费免费| 奇米四色…亚洲| 日韩一区二区在线观看视频| 亚欧色一区w666天堂| 色成人在线视频| 1区2区3区精品视频| 国产成人激情av| 久久男人中文字幕资源站| 日本 国产 欧美色综合| 正在播放亚洲一区| 天涯成人国产亚洲精品一区av| 色婷婷综合久久| 亚洲综合色婷婷| 欧美日韩亚洲另类| 一级女性全黄久久生活片免费| 97se亚洲国产综合自在线| 亚洲欧美影音先锋| 色偷偷久久人人79超碰人人澡| 综合电影一区二区三区| 在线精品视频一区二区三四|