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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ogr_srsnode.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
 * Fetch value string for this node.
 *
 * @return A non-NULL string is always returned.  The returned pointer is to
 * the internal value of this node, and should not be modified, or freed.
 */

/************************************************************************/
/*                              SetValue()                              */
/************************************************************************/

/**
 * Set the node value.
 *
 * @param pszNewValue the new value to assign to this node.  The passed
 * string is duplicated and remains the responsibility of the caller.
 */

void OGR_SRSNode::SetValue( const char * pszNewValue )

{
    CPLFree( pszValue );
    pszValue = CPLStrdup( pszNewValue );
}

/************************************************************************/
/*                               Clone()                                */
/************************************************************************/

/**
 * Make a duplicate of this node, and it's children.
 *
 * @return a new node tree, which becomes the responsiblity of the caller.
 */

OGR_SRSNode *OGR_SRSNode::Clone() const

{
    OGR_SRSNode *poNew;

    poNew = new OGR_SRSNode( pszValue );

    for( int i = 0; i < nChildren; i++ )
    {
        poNew->AddChild( papoChildNodes[i]->Clone() );
    }

    return poNew;
}

/************************************************************************/
/*                            NeedsQuoting()                            */
/*                                                                      */
/*      Does this node need to be quoted when it is exported to Wkt?    */
/************************************************************************/

int OGR_SRSNode::NeedsQuoting() const

{
    // non-terminals are never quoted.
    if( GetChildCount() != 0 )
        return FALSE;

    // As per bugzilla bug 201, the OGC spec says the authority code
    // needs to be quoted even though it appears well behaved.
    if( poParent != NULL && EQUAL(poParent->GetValue(),"AUTHORITY") )
        return TRUE;
    
    // As per bugzilla bug 294, the OGC spec says the direction
    // values for the AXIS keywords should *not* be quoted.
    if( poParent != NULL && EQUAL(poParent->GetValue(),"AXIS") 
        && this != poParent->GetChild(0) )
        return FALSE;

    // Non-numeric tokens are generally quoted while clean numeric values
    // are generally not. 
    for( int i = 0; pszValue[i] != '\0'; i++ )
    {
        if( (pszValue[i] < '0' || pszValue[i] > '9')
            && pszValue[i] != '.'
            && pszValue[i] != '-' && pszValue[i] != '+'
            && pszValue[i] != 'e' && pszValue[i] != 'E' )
            return TRUE;
    }

    return FALSE;
}

/************************************************************************/
/*                            exportToWkt()                             */
/************************************************************************/

/**
 * Convert this tree of nodes into WKT format.
 *
 * Note that the returned WKT string should be freed with OGRFree() or
 * CPLFree() when no longer needed.  It is the responsibility of the caller.
 *
 * @param ppszResult the resulting string is returned in this pointer.
 *
 * @return currently OGRERR_NONE is always returned, but the future it
 * is possible error conditions will develop. 
 */
 

OGRErr OGR_SRSNode::exportToWkt( char ** ppszResult ) const

{
    char        **papszChildrenWkt = NULL;
    int         nLength = strlen(pszValue)+4;
    int         i;

/* -------------------------------------------------------------------- */
/*      Build a list of the WKT format for the children.                */
/* -------------------------------------------------------------------- */
    papszChildrenWkt = (char **) CPLCalloc(sizeof(char*),(nChildren+1));
    
    for( i = 0; i < nChildren; i++ )
    {
        papoChildNodes[i]->exportToWkt( papszChildrenWkt + i );
        nLength += strlen(papszChildrenWkt[i]) + 1;
    }

/* -------------------------------------------------------------------- */
/*      Allocate the result string.                                     */
/* -------------------------------------------------------------------- */
    *ppszResult = (char *) CPLMalloc(nLength);
    *ppszResult[0] = '\0';
    
/* -------------------------------------------------------------------- */
/*      Capture this nodes value.  We put it in double quotes if        */
/*      this is a leaf node, otherwise we assume it is a well formed    */
/*      node name.                                                      */
/* -------------------------------------------------------------------- */
    if( NeedsQuoting() )
    {
        strcat( *ppszResult, "\"" );
        strcat( *ppszResult, pszValue ); /* should we do quoting? */
        strcat( *ppszResult, "\"" );
    }
    else
        strcat( *ppszResult, pszValue );

/* -------------------------------------------------------------------- */
/*      Add the children strings with appropriate brackets and commas.  */
/* -------------------------------------------------------------------- */
    if( nChildren > 0 )
        strcat( *ppszResult, "[" );
    
    for( i = 0; i < nChildren; i++ )
    {
        strcat( *ppszResult, papszChildrenWkt[i] );
        if( i == nChildren-1 )
            strcat( *ppszResult, "]" );
        else
            strcat( *ppszResult, "," );
    }

    CSLDestroy( papszChildrenWkt );

    return OGRERR_NONE;
}

/************************************************************************/
/*                         exportToPrettyWkt()                          */
/************************************************************************/

OGRErr OGR_SRSNode::exportToPrettyWkt( char ** ppszResult, int nDepth ) const

{
    char        **papszChildrenWkt = NULL;
    int         nLength = strlen(pszValue)+4;
    int         i;

/* -------------------------------------------------------------------- */
/*      Build a list of the WKT format for the children.                */
/* -------------------------------------------------------------------- */
    papszChildrenWkt = (char **) CPLCalloc(sizeof(char*),(nChildren+1));
    
    for( i = 0; i < nChildren; i++ )
    {
        papoChildNodes[i]->exportToPrettyWkt( papszChildrenWkt + i,
                                              nDepth + 1);
        nLength += strlen(papszChildrenWkt[i]) + 2 + nDepth*4;
    }

/* -------------------------------------------------------------------- */
/*      Allocate the result string.                                     */
/* -------------------------------------------------------------------- */
    *ppszResult = (char *) CPLMalloc(nLength);
    *ppszResult[0] = '\0';
    
/* -------------------------------------------------------------------- */
/*      Capture this nodes value.  We put it in double quotes if        */
/*      this is a leaf node, otherwise we assume it is a well formed    */
/*      node name.                                                      */
/* -------------------------------------------------------------------- */
    if( NeedsQuoting() )
    {
        strcat( *ppszResult, "\"" );
        strcat( *ppszResult, pszValue ); /* should we do quoting? */
        strcat( *ppszResult, "\"" );
    }
    else
        strcat( *ppszResult, pszValue );

/* -------------------------------------------------------------------- */
/*      Add the children strings with appropriate brackets and commas.  */
/* -------------------------------------------------------------------- */
    if( nChildren > 0 )
        strcat( *ppszResult, "[" );
    
    for( i = 0; i < nChildren; i++ )
    {
        if( papoChildNodes[i]->GetChildCount() > 0 )
        {
            int  j;

            strcat( *ppszResult, "\n" );
            for( j = 0; j < 4*nDepth; j++ )
                strcat( *ppszResult, " " );
        }
        strcat( *ppszResult, papszChildrenWkt[i] );
        if( i < nChildren-1 )
            strcat( *ppszResult, "," );
    }

    if( nChildren > 0 )
    {
        if( (*ppszResult)[strlen(*ppszResult)-1] == ',' )
            (*ppszResult)[strlen(*ppszResult)-1] = '\0';
        
        strcat( *ppszResult, "]" );
    }

    CSLDestroy( papszChildrenWkt );

    return OGRERR_NONE;
}

/************************************************************************/
/*                           importFromWkt()                            */
/************************************************************************/

/**
 * Import from WKT string.
 *
 * This method will wipe the existing children and value of this node, and
 * reassign them based on the contents of the passed WKT string.  Only as
 * much of the input string as needed to construct this node, and it's
 * children is consumed from the input string, and the input string pointer
 * is then updated to point to the remaining (unused) input.
 *
 * @param ppszInput Pointer to pointer to input.  The pointer is updated to
 * point to remaining unused input text.
 *
 * @return OGRERR_NONE if import succeeds, or OGRERR_CORRUPT_DATA if it
 * fails for any reason.
 */

OGRErr OGR_SRSNode::importFromWkt( char ** ppszInput )

{
    const char  *pszInput = *ppszInput;
    int         bInQuotedString = FALSE;
    
/* -------------------------------------------------------------------- */
/*      Clear any existing children of this node.                       */
/* -------------------------------------------------------------------- */
    ClearChildren();
    
/* -------------------------------------------------------------------- */
/*      Read the ``value'' for this node.                               */
/* -------------------------------------------------------------------- */
    char        szToken[512];
    int         nTokenLen = 0;
    
    while( *pszInput != '\0' && nTokenLen < (int) sizeof(szToken)-1 )
    {
        if( *pszInput == '"' )
        {
            bInQuotedString = !bInQuotedString;
        }
        else if( !bInQuotedString
              && (*pszInput == '[' || *pszInput == ']' || *pszInput == ','
                  || *pszInput == '(' || *pszInput == ')' ) )
        {
            break;
        }
        else if( !bInQuotedString 
                 && (*pszInput == ' ' || *pszInput == '\t' 
                     || *pszInput == 10 || *pszInput == 13) )
        {
            /* just skip over whitespace */
        } 
        else
        {
            szToken[nTokenLen++] = *pszInput;
        }

        pszInput++;
    }

    if( *pszInput == '\0' || nTokenLen == sizeof(szToken) - 1 )
        return OGRERR_CORRUPT_DATA;

    szToken[nTokenLen++] = '\0';
    SetValue( szToken );

/* -------------------------------------------------------------------- */
/*      Read children, if we have a sublist.                            */
/* -------------------------------------------------------------------- */
    if( *pszInput == '[' || *pszInput == '(' )

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91国偷自产一区二区开放时间 | 国产盗摄视频一区二区三区| 欧美亚洲高清一区| 伊人一区二区三区| 欧美又粗又大又爽| 日本一不卡视频| 欧美岛国在线观看| 国产精品99久久久久久有的能看 | 成人av在线影院| 综合色天天鬼久久鬼色| 欧美亚洲高清一区| 美女一区二区久久| 中文字幕va一区二区三区| 91色综合久久久久婷婷| 亚洲国产精品一区二区www| 欧美一区二区三区四区在线观看 | 国产精品天美传媒沈樵| 成人污污视频在线观看| 国产精品国产a级| 欧美亚洲禁片免费| 麻豆国产精品一区二区三区| 久久久国产综合精品女国产盗摄| 成人少妇影院yyyy| 亚洲地区一二三色| 久久久久亚洲蜜桃| 91九色最新地址| 久久99这里只有精品| 中文字幕在线一区| 精品视频在线免费观看| 激情六月婷婷久久| 亚洲猫色日本管| 欧美成人三级在线| 色噜噜狠狠成人中文综合| 麻豆精品国产传媒mv男同 | 日韩视频免费直播| av动漫一区二区| 青青草国产成人99久久| 欧美国产禁国产网站cc| 欧美剧在线免费观看网站 | 国产在线乱码一区二区三区| 亚洲女厕所小便bbb| 日韩欧美色综合网站| 成人黄页毛片网站| 伦理电影国产精品| 一区二区视频在线| 久久精品欧美一区二区三区不卡| 欧美色综合天天久久综合精品| 国产一区美女在线| 午夜精品久久久久久久99樱桃| 国产亚洲精品超碰| 日韩一区二区三区av| 欧美做爰猛烈大尺度电影无法无天| 捆绑调教一区二区三区| 一区二区不卡在线播放| 国产精品人妖ts系列视频| 91精品国产综合久久久久| 99久久伊人精品| 国产成人精品午夜视频免费| 蜜桃精品视频在线| 爽爽淫人综合网网站| 亚洲嫩草精品久久| 亚洲欧美视频一区| 国产欧美一区二区精品忘忧草| 欧美va日韩va| 日韩午夜中文字幕| 欧美日韩大陆在线| 欧美日韩中字一区| 91福利资源站| 日本韩国一区二区三区视频| 粉嫩在线一区二区三区视频| 国产精品一线二线三线| 蜜桃一区二区三区在线观看| 天堂一区二区在线免费观看| 亚洲综合区在线| 亚洲综合免费观看高清完整版| 中文字幕一区二区5566日韩| 亚洲国产高清在线观看视频| 日本一区二区在线不卡| 久久新电视剧免费观看| www国产精品av| 国产亚洲欧美色| 日本一区二区三区电影| 国产欧美综合色| 国产精品理论片在线观看| 国产精品你懂的在线欣赏| 国产精品伦理在线| 亚洲欧美自拍偷拍| 亚洲欧美国产三级| 亚洲一区二区三区四区不卡| 亚洲成年人网站在线观看| 亚洲gay无套男同| 美女www一区二区| 精品在线免费视频| 懂色av中文一区二区三区 | 在线观看精品一区| 欧美精选一区二区| 精品欧美一区二区久久| 久久精品一区八戒影视| 国产精品毛片无遮挡高清| 亚洲人成人一区二区在线观看| 一区二区三国产精华液| 肉色丝袜一区二区| 国产在线麻豆精品观看| 成人黄色一级视频| 欧美日韩免费观看一区二区三区 | 久久精品国产精品青草| 国产成人免费视频网站高清观看视频 | zzijzzij亚洲日本少妇熟睡| 91在线无精精品入口| 欧美丝袜丝nylons| 精品国产乱子伦一区| 国产精品毛片高清在线完整版 | 欧美亚日韩国产aⅴ精品中极品| 欧美日韩国产综合草草| 久久久国产一区二区三区四区小说| 亚洲天堂2016| 理论电影国产精品| 99精品视频在线播放观看| 91精品国产综合久久久久久漫画| 国产欧美日本一区视频| 一区二区日韩av| 国产精品一品视频| 精品1区2区3区| 久久久国产精品不卡| 一区二区三区在线观看国产| 免费看精品久久片| 91色九色蝌蚪| 久久久久久久久久久久久久久99 | 欧美精品一卡两卡| 欧美激情在线一区二区| 亚洲国产精品麻豆| 国产精品123| 欧美日韩国产在线观看| 亚洲国产成人一区二区三区| 日韩精品欧美成人高清一区二区| 高清在线观看日韩| 欧美一区二区日韩| 亚洲精品国产品国语在线app| 国内外成人在线| 欧美另类z0zxhd电影| 亚洲视频在线观看三级| 国产福利一区二区三区视频在线| 在线91免费看| 樱花草国产18久久久久| 成人手机在线视频| 久久综合国产精品| 天堂成人国产精品一区| 91热门视频在线观看| 国产清纯美女被跳蛋高潮一区二区久久w| 欧美一区二区三区性视频| 亚洲综合色自拍一区| 99国产精品99久久久久久| 久久综合色婷婷| 日本成人在线不卡视频| 在线欧美一区二区| 中文字幕亚洲区| 99免费精品视频| 国产精品乱码人人做人人爱| 狂野欧美性猛交blacked| 欧美精三区欧美精三区| 亚洲午夜电影网| 日本精品视频一区二区三区| 亚洲图片另类小说| 一本高清dvd不卡在线观看| 国产精品区一区二区三| 成人免费的视频| 日韩毛片在线免费观看| 91免费视频观看| 亚洲欧美日韩系列| 色一区在线观看| 亚洲大片精品永久免费| 欧美亚洲国产一卡| 午夜欧美在线一二页| 欧美日韩一区二区电影| 午夜视频在线观看一区二区| 欧美日韩精品一区二区在线播放| 亚洲已满18点击进入久久| 在线观看免费视频综合| 日韩中文字幕一区二区三区| 欧美一级免费观看| 日产精品久久久久久久性色| 日韩一区二区在线免费观看| 久久不见久久见免费视频7| 久久综合九色综合欧美亚洲| 国产一区二区不卡老阿姨| 中文一区在线播放| 91亚洲大成网污www| 亚洲国产精品久久人人爱| 3atv在线一区二区三区| 裸体一区二区三区| 亚洲国产精品v| 欧美性欧美巨大黑白大战| 日韩不卡免费视频| 精品电影一区二区| 成人高清av在线| 亚洲综合视频网| 精品国产99国产精品| k8久久久一区二区三区| 亚洲一区二区三区四区在线免费观看 | 另类小说图片综合网|