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

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

?? ogr_srsnode.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
    {
        do
        {
            OGR_SRSNode *poNewChild;
            OGRErr      eErr;

            pszInput++; // Skip bracket or comma.

            poNewChild = new OGR_SRSNode();

            eErr = poNewChild->importFromWkt( (char **) &pszInput );
            if( eErr != OGRERR_NONE )
            {
                delete poNewChild;
                return eErr;
            }

            AddChild( poNewChild );
            
        } while( *pszInput == ',' );

        if( *pszInput != ')' && *pszInput != ']' )
            return OGRERR_CORRUPT_DATA;

        pszInput++;
    }

    *ppszInput = (char *) pszInput;

    return OGRERR_NONE;
}

/************************************************************************/
/*                           MakeValueSafe()                            */
/************************************************************************/

/**
 * Massage value string, stripping special characters so it will be a
 * database safe string.
 *
 * The operation is also applies to all subnodes of the current node.
 */


void OGR_SRSNode::MakeValueSafe()

{
    int         i, j;

/* -------------------------------------------------------------------- */
/*      First process subnodes.                                         */
/* -------------------------------------------------------------------- */
    for( int iChild = 0; iChild < GetChildCount(); iChild++ )
    {
        GetChild(iChild)->MakeValueSafe();
    }

/* -------------------------------------------------------------------- */
/*      Skip numeric nodes.                                             */
/* -------------------------------------------------------------------- */
    if( (pszValue[0] >= '0' && pszValue[0] <= '9') || pszValue[0] != '.' )
        return;
    
/* -------------------------------------------------------------------- */
/*      Translate non-alphanumeric values to underscores.               */
/* -------------------------------------------------------------------- */
    for( i = 0; pszValue[i] != '\0'; i++ )
    {
        if( !(pszValue[i] >= 'A' && pszValue[i] <= 'Z')
            && !(pszValue[i] >= 'a' && pszValue[i] <= 'z')
            && !(pszValue[i] >= '0' && pszValue[i] <= '9') )
        {
            pszValue[i] = '_';
        }
    }

/* -------------------------------------------------------------------- */
/*      Remove repeated and trailing underscores.                       */
/* -------------------------------------------------------------------- */
    for( i = 1, j = 0; pszValue[i] != '\0'; i++ )
    {
        if( pszValue[j] == '_' && pszValue[i] == '_' )
            continue;

        pszValue[++j] = pszValue[i];
    }
    
    if( pszValue[j] == '_' )
        pszValue[j] = '\0';
    else
        pszValue[j+1] = '\0';
}

/************************************************************************/
/*                           applyRemapper()                            */
/************************************************************************/

/**
 * Remap node values matching list.
 *
 * Remap the value of this node or any of it's children if it matches
 * one of the values in the source list to the corresponding value from
 * the destination list.  If the pszNode value is set, only do so if the
 * parent node matches that value.  Even if a replacement occurs, searching
 * continues.
 *
 * @param pszNode Restrict remapping to children of this type of node 
 *                (eg. "PROJECTION")
 * @param papszSrcValues a NULL terminated array of source string.  If the
 * node value matches one of these (case insensitive) then replacement occurs.
 * @param papszDstValues an array of destination strings.  On a match, the
 * one corresponding to a source value will be used to replace a node.
 * @param nStepSize increment when stepping through source and destination
 * arrays, allowing source and destination arrays to be one interleaved array
 * for instances.  Defaults to 1.
 * @param bChildOfHit Only TRUE if we the current node is the child of a match,
 * and so needs to be set.  Application code would normally pass FALSE for this
 * argument.
 * 
 * @return returns OGRERR_NONE unless something bad happens.  There is no
 * indication returned about whether any replacement occured.  
 */

OGRErr OGR_SRSNode::applyRemapper( const char *pszNode, 
                                   char **papszSrcValues, 
                                   char **papszDstValues, 
                                   int nStepSize, int bChildOfHit )

{
    int i;

/* -------------------------------------------------------------------- */
/*      Scan for value, and replace if our parent was a "hit".          */
/* -------------------------------------------------------------------- */
    if( bChildOfHit || pszNode == NULL )
    {
        for( i = 0; papszSrcValues[i] != NULL; i += nStepSize )
        {
            if( EQUAL(papszSrcValues[i],pszValue) )
            {
                SetValue( papszDstValues[i] );
                break;
            }
        }
    }

/* -------------------------------------------------------------------- */
/*      Are the the target node?                                        */
/* -------------------------------------------------------------------- */
    if( pszNode != NULL )
        bChildOfHit = EQUAL(pszValue,pszNode);

/* -------------------------------------------------------------------- */
/*      Recurse                                                         */
/* -------------------------------------------------------------------- */
    for( i = 0; i < GetChildCount(); i++ )
    {
        GetChild(i)->applyRemapper( pszNode, papszSrcValues, 
                                    papszDstValues, nStepSize, bChildOfHit );
    }

    return OGRERR_NONE;
}
                                   
/************************************************************************/
/*                             StripNodes()                             */
/************************************************************************/

/**
 * Strip child nodes matching name.
 *
 * Removes any decendent nodes of this node that match the given name. 
 * Of course children of removed nodes are also discarded.
 *
 * @param pszName the name for nodes that should be removed.
 */

void OGR_SRSNode::StripNodes( const char * pszName )

{
/* -------------------------------------------------------------------- */
/*      Strip any children matching this name.                          */
/* -------------------------------------------------------------------- */
    while( FindChild( pszName ) >= 0 )
        DestroyChild( FindChild( pszName ) );

/* -------------------------------------------------------------------- */
/*      Recurse                                                         */
/* -------------------------------------------------------------------- */
    for( int i = 0; i < GetChildCount(); i++ )
        GetChild(i)->StripNodes( pszName );
}

/************************************************************************/
/*                           FixupOrdering()                            */
/************************************************************************/

/**
 * Correct parameter ordering to match CT Specification.
 *
 * Some mechanisms to create WKT using OGRSpatialReference, and some
 * imported WKT fail to maintain the order of parameters required according
 * to the BNF definitions in the OpenGIS SF-SQL and CT Specifications.  This
 * method attempts to massage things back into the required order.
 *
 * This method will reorder the children of the node it is invoked on and
 * then recurse to all children to fix up their children.
 *
 * @return OGRERR_NONE on success or an error code if something goes 
 * wrong.  
 */

static char *apszPROJCSRule[] = 
{ "PROJCS", "GEOGCS", "PROJECTION", "PARAMETER", "UNIT", "AXIS", "AUTHORITY", 
  NULL };

static char *apszDATUMRule[] = 
{ "DATUM", "SPHEROID", "TOWGS84", "AUTHORITY", NULL };

static char *apszGEOGCSRule[] = 
{ "GEOGCS", "DATUM", "PRIMEM", "UNIT", "AXIS", "AUTHORITY", NULL };

static char **apszOrderingRules[] = {
    apszPROJCSRule, apszGEOGCSRule, apszDATUMRule, NULL };

OGRErr OGR_SRSNode::FixupOrdering()

{
    int    i;

/* -------------------------------------------------------------------- */
/*      Recurse ordering children.                                      */
/* -------------------------------------------------------------------- */
    for( i = 0; i < GetChildCount(); i++ )
        GetChild(i)->FixupOrdering();

    if( GetChildCount() < 3 )
        return OGRERR_NONE;

/* -------------------------------------------------------------------- */
/*      Is this a node for which an ordering rule exists?               */
/* -------------------------------------------------------------------- */
    char **papszRule = NULL;

    for( i = 0; apszOrderingRules[i] != NULL; i++ )
    {
        if( EQUAL(apszOrderingRules[i][0],pszValue) )
        {
            papszRule = apszOrderingRules[i] + 1;
            break;
        }
    }

    if( papszRule == NULL )
        return OGRERR_NONE;

/* -------------------------------------------------------------------- */
/*      If we have a rule, apply it.  We create an array                */
/*      (panChildPr) with the priority code for each child (derived     */
/*      from the rule) and we then bubble sort based on this.           */
/* -------------------------------------------------------------------- */
    int  *panChildKey = (int *) CPLCalloc(sizeof(int),GetChildCount());

    for( i = 1; i < GetChildCount(); i++ )
    {
        panChildKey[i] = CSLFindString( papszRule, GetChild(i)->GetValue() );
        if( panChildKey[i] == -1 )
        {
            CPLDebug( "OGRSpatialReference", 
                      "Found unexpected key %s when trying to order SRS nodes.",
                      GetChild(i)->GetValue() );
        }
    }

/* -------------------------------------------------------------------- */
/*      Sort - Note we don't try to do anything with the first child    */
/*      which we assume is a name string.                               */
/* -------------------------------------------------------------------- */
    int j, bChange = TRUE;

    for( i = 1; bChange && i < GetChildCount()-1; i++ )
    {
        bChange = FALSE;
        for( j = 1; j < GetChildCount()-i; j++ )
        {
            if( panChildKey[j] == -1 || panChildKey[j+1] == -1 )
                continue;

            if( panChildKey[j] > panChildKey[j+1] )
            {
                OGR_SRSNode *poTemp = papoChildNodes[j];
                int          nKeyTemp = panChildKey[j];

                papoChildNodes[j] = papoChildNodes[j+1];
                papoChildNodes[j+1] = poTemp;

                nKeyTemp = panChildKey[j];
                panChildKey[j] = panChildKey[j+1];
                panChildKey[j+1] = nKeyTemp;

                bChange = TRUE;
            }
        }
    }

    CPLFree( panChildKey );

    return OGRERR_NONE;
}


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产综合久久久久| 国产欧美精品在线观看| 国产精品一区二区男女羞羞无遮挡 | 丝袜诱惑制服诱惑色一区在线观看| 欧美大胆一级视频| 欧美日韩一区视频| 成人免费看的视频| 精品综合久久久久久8888| 亚洲少妇中出一区| 久久九九国产精品| 精品国产乱码久久久久久久 | 中文一区一区三区高中清不卡| 5858s免费视频成人| 欧美三区在线视频| 欧洲精品中文字幕| 色偷偷一区二区三区| 色综合久久天天综合网| 91网站视频在线观看| 91蝌蚪porny| 欧美日韩国产bt| 91精品中文字幕一区二区三区| 欧美日韩大陆在线| 91精品国产乱码| 欧美一区二区免费观在线| 337p亚洲精品色噜噜噜| 精品欧美一区二区久久| 久久亚洲二区三区| 中文字幕在线观看不卡| 亚洲精品第1页| 美国毛片一区二区| 成人一道本在线| 欧美午夜精品久久久久久孕妇| 日韩欧美中文字幕公布| 欧美极品美女视频| 亚洲国产一二三| 美脚の诱脚舐め脚责91| 99国产精品视频免费观看| 欧美中文字幕一区| 久久久九九九九| 亚洲免费观看高清完整版在线观看 | 丝袜诱惑亚洲看片| 国产一区二区三区综合| 91福利精品第一导航| 精品国产乱码久久久久久图片| 国产亚洲福利社区一区| 首页综合国产亚洲丝袜| 成人免费高清在线| 欧美电视剧免费观看| 欧洲在线/亚洲| 91蝌蚪porny| 亚洲精品一区二区三区蜜桃下载 | 一区二区三区四区不卡视频| 国产在线一区观看| 91麻豆精品国产| 亚洲一区免费观看| 99re在线精品| 国产精品每日更新在线播放网址| 久久99热这里只有精品| 日韩欧美国产综合在线一区二区三区| 国产欧美一区二区三区沐欲| 久久99精品网久久| 日韩天堂在线观看| 日本v片在线高清不卡在线观看| 色综合久久久久综合体| 中文字幕中文字幕一区| 韩国成人在线视频| 精品不卡在线视频| 国产精品系列在线播放| 精品区一区二区| 国产一区二区三区免费| xfplay精品久久| 国产福利精品导航| 日韩一区二区三区精品视频| 午夜av一区二区| 26uuu欧美| av毛片久久久久**hd| 亚洲精品国产第一综合99久久| 亚洲一区二区三区激情| 天天色图综合网| 欧美亚洲图片小说| 欧美国产成人精品| 91美女视频网站| 亚洲欧美偷拍卡通变态| 欧美日韩在线亚洲一区蜜芽| 日韩精品亚洲一区| 久久一日本道色综合| 99综合影院在线| 天堂久久一区二区三区| 久久蜜桃av一区二区天堂| 91视频www| 美女脱光内衣内裤视频久久网站 | 美女一区二区三区在线观看| 精品国精品自拍自在线| 一本大道综合伊人精品热热| 视频一区二区国产| 国产精品美女久久久久久 | 国产精品美女久久久久aⅴ| 在线观看日韩一区| 国产酒店精品激情| 亚洲欧美激情小说另类| 久久人人97超碰com| 欧美日韩一区二区三区视频| 成人三级在线视频| 久久99热狠狠色一区二区| 亚洲午夜精品在线| 国产精品久久久久久久蜜臀| 精品国产一区二区三区久久久蜜月 | 91最新地址在线播放| 国产一区二区毛片| 日韩成人午夜精品| 夜夜操天天操亚洲| 亚洲欧美日韩综合aⅴ视频| 2014亚洲片线观看视频免费| 在线精品国精品国产尤物884a| av动漫一区二区| 成人性生交大片免费| 国产高清在线观看免费不卡| 久久成人免费电影| 激情av综合网| 韩国成人福利片在线播放| 久久精品999| 国内精品伊人久久久久av一坑 | 91麻豆免费视频| 青青草原综合久久大伊人精品 | 一二三四社区欧美黄| 欧美极品另类videosde| 中文字幕中文字幕在线一区 | 久久66热偷产精品| 国产资源在线一区| 成人av中文字幕| 91麻豆国产在线观看| 欧美日韩精品福利| 精品久久一二三区| 中文字幕欧美日本乱码一线二线| 中文字幕久久午夜不卡| 亚洲欧洲精品一区二区三区不卡| 亚洲另类春色国产| 午夜av区久久| 成人高清视频免费观看| 欧美三级电影网| 久久一留热品黄| 亚洲午夜在线视频| 黄色资源网久久资源365| av电影在线观看一区| 日韩三级.com| 亚洲一区二区偷拍精品| 久久97超碰色| 色噜噜狠狠色综合欧洲selulu| 91精品国产综合久久久久久久 | 欧美日产在线观看| 日韩免费视频线观看| 中文字幕一区在线| 久久丁香综合五月国产三级网站 | 一区二区三区不卡在线观看| 久久激五月天综合精品| 91黄色免费版| 国产精品国产三级国产普通话蜜臀 | 亚洲精品成人a在线观看| 国产一区美女在线| 欧美电影一区二区| 91麻豆国产在线观看| 99久久精品国产导航| 日韩精品一区国产麻豆| 亚洲精品久久7777| 成人毛片老司机大片| 欧美tickle裸体挠脚心vk| 亚洲第一成年网| 91麻豆精品秘密| 亚洲视频电影在线| 成人av一区二区三区| 亚洲丝袜精品丝袜在线| 成人深夜在线观看| 国产亚洲精品bt天堂精选| 国产高清不卡二三区| 国产女人aaa级久久久级| 国产乱码精品一区二区三区忘忧草| 欧美日韩高清在线| 男人的天堂亚洲一区| 91精品国产色综合久久| 麻豆精品久久精品色综合| 67194成人在线观看| 另类中文字幕网| 国产精品免费av| 99久久久国产精品| 午夜影院在线观看欧美| 欧美日韩国产成人在线91| 免费成人av在线| 国产精品久线在线观看| 99精品热视频| 99视频一区二区三区| 亚洲美女偷拍久久| 欧美日韩1234| 91婷婷韩国欧美一区二区| 五月婷婷欧美视频| 久久久久久久久免费| 99久久婷婷国产综合精品 | 91蜜桃传媒精品久久久一区二区| 亚洲国产欧美在线| 日韩一级免费一区| 不卡的av网站|