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

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

?? ogrspatialreference.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
    bNormInfoSet = FALSE;

    poCS = GetAttrNode( "GEOGCS" );

    if( poCS == NULL )
        return OGRERR_FAILURE;

    OGRPrintDouble( szValue, dfInRadians );

    if( poCS->FindChild( "UNIT" ) >= 0 )
    {
        poUnits = poCS->GetChild( poCS->FindChild( "UNIT" ) );
        poUnits->GetChild(0)->SetValue( pszUnitsName );
        poUnits->GetChild(1)->SetValue( szValue );
    }
    else
    {
        poUnits = new OGR_SRSNode( "UNIT" );
        poUnits->AddChild( new OGR_SRSNode( pszUnitsName ) );
        poUnits->AddChild( new OGR_SRSNode( szValue ) );
        
        poCS->AddChild( poUnits );
    }

    return OGRERR_NONE;
}

/************************************************************************/
/*                         OSRSetAngularUnits()                         */
/************************************************************************/

OGRErr OSRSetAngularUnits( OGRSpatialReferenceH hSRS, 
                           const char * pszUnits, double dfInRadians )

{
    return ((OGRSpatialReference *) hSRS)->SetAngularUnits( pszUnits, 
                                                            dfInRadians );
}

/************************************************************************/
/*                          GetAngularUnits()                           */
/************************************************************************/

/**
 * Fetch angular geographic coordinate system units.
 *
 * If no units are available, a value of "degree" and SRS_UA_DEGREE_CONV 
 * will be assumed.  This method only checks directly under the GEOGCS node
 * for units.
 *
 * This method does the same thing as the C function OSRGetAngularUnits().
 *
 * @param ppszName a pointer to be updated with the pointer to the 
 * units name.  The returned value remains internal to the OGRSpatialReference
 * and shouldn't be freed, or modified.  It may be invalidated on the next
 * OGRSpatialReference call. 
 *
 * @return the value to multiply by angular distances to transform them to 
 * radians.
 */

double OGRSpatialReference::GetAngularUnits( char ** ppszName ) const

{
    const OGR_SRSNode *poCS = GetAttrNode( "GEOGCS" );

    if( ppszName != NULL )
        *ppszName = "degree";
        
    if( poCS == NULL )
        return atof(SRS_UA_DEGREE_CONV);

    for( int iChild = 0; iChild < poCS->GetChildCount(); iChild++ )
    {
        const OGR_SRSNode     *poChild = poCS->GetChild(iChild);
        
        if( EQUAL(poChild->GetValue(),"UNIT")
            && poChild->GetChildCount() >= 2 )
        {
            if( ppszName != NULL )
                *ppszName = (char *) poChild->GetChild(0)->GetValue();
            
            return atof( poChild->GetChild(1)->GetValue() );
        }
    }

    return 1.0;
}

/************************************************************************/
/*                         OSRGetAngularUnits()                         */
/************************************************************************/

double OSRGetAngularUnits( OGRSpatialReferenceH hSRS, char ** ppszName )
    
{
    return ((OGRSpatialReference *) hSRS)->GetAngularUnits( ppszName );
}

/************************************************************************/
/*                 SetLinearUnitsAndUpdateParameters()                  */
/************************************************************************/

/**
 * Set the linear units for the projection.
 *
 * This method creates a UNITS subnode with the specified values as a
 * child of the PROJCS or LOCAL_CS node.   It works the same as the
 * SetLinearUnits() method, but it also updates all existing linear
 * projection parameter values from the old units to the new units. 
 *
 * @param pszUnitsName the units name to be used.  Some preferred units
 * names can be found in ogr_srs_api.h such as SRS_UL_METER, SRS_UL_FOOT 
 * and SRS_UL_US_FOOT. 
 *
 * @param dfInMeters the value to multiple by a length in the indicated
 * units to transform to meters.  Some standard conversion factors can
 * be found in ogr_srs_api.h. 
 *
 * @return OGRERR_NONE on success.
 */

OGRErr OGRSpatialReference::SetLinearUnitsAndUpdateParameters(
    const char *pszName, double dfInMeters )

{
    double dfOldInMeters = GetLinearUnits();
    OGR_SRSNode *poPROJCS = GetAttrNode( "PROJCS" );

    if( dfInMeters == 0.0 )
        return OGRERR_FAILURE;

    if( dfInMeters == dfOldInMeters || poPROJCS == NULL )
        return SetLinearUnits( pszName, dfInMeters );

    for( int iChild = 0; iChild < poPROJCS->GetChildCount(); iChild++ )
    {
        const OGR_SRSNode     *poChild = poPROJCS->GetChild(iChild);
        
        if( EQUAL(poChild->GetValue(),"PARAMETER")
            && poChild->GetChildCount() > 1 )
        {
            char *pszParmName = CPLStrdup(poChild->GetChild(0)->GetValue());
            
            if( IsLinearParameter( pszParmName ) )
            {
                double dfOldValue = GetProjParm( pszParmName );

                SetProjParm( pszParmName, 
                             dfOldValue * dfOldInMeters / dfInMeters );
            }

            CPLFree( pszParmName );
        }
    }

    return SetLinearUnits( pszName, dfInMeters );
}

/************************************************************************/
/*                           SetLinearUnits()                           */
/************************************************************************/

/**
 * Set the linear units for the projection.
 *
 * This method creates a UNITS subnode with the specified values as a
 * child of the PROJCS or LOCAL_CS node. 
 *
 * This method does the same as the C function OSRSetLinearUnits(). 
 *
 * @param pszUnitsName the units name to be used.  Some preferred units
 * names can be found in ogr_srs_api.h such as SRS_UL_METER, SRS_UL_FOOT 
 * and SRS_UL_US_FOOT. 
 *
 * @param dfInMeters the value to multiple by a length in the indicated
 * units to transform to meters.  Some standard conversion factors can
 * be found in ogr_srs_api.h. 
 *
 * @return OGRERR_NONE on success.
 */

OGRErr OGRSpatialReference::SetLinearUnits( const char * pszUnitsName,
                                            double dfInMeters )

{
    OGR_SRSNode *poCS;
    OGR_SRSNode *poUnits;
    char        szValue[128];

    bNormInfoSet = FALSE;

    poCS = GetAttrNode( "PROJCS" );
    if( poCS == NULL )
        poCS = GetAttrNode( "LOCAL_CS" );

    if( poCS == NULL )
        return OGRERR_FAILURE;

    if( dfInMeters == (int) dfInMeters )
        sprintf( szValue, "%d", (int) dfInMeters );
    else
        //notdef: sprintf( szValue, "%.16g", dfInMeters );
        OGRPrintDouble( szValue, dfInMeters );

    if( poCS->FindChild( "UNIT" ) >= 0 )
    {
        poUnits = poCS->GetChild( poCS->FindChild( "UNIT" ) );
        poUnits->GetChild(0)->SetValue( pszUnitsName );
        poUnits->GetChild(1)->SetValue( szValue );
        if( poUnits->FindChild( "AUTHORITY" ) != -1 )
            poUnits->DestroyChild( poUnits->FindChild( "AUTHORITY" ) );
    }
    else
    {
        poUnits = new OGR_SRSNode( "UNIT" );
        poUnits->AddChild( new OGR_SRSNode( pszUnitsName ) );
        poUnits->AddChild( new OGR_SRSNode( szValue ) );
        
        poCS->AddChild( poUnits );
    }

    return OGRERR_NONE;
}

/************************************************************************/
/*                         OSRSetLinearUnits()                          */
/************************************************************************/

OGRErr OSRSetLinearUnits( OGRSpatialReferenceH hSRS, 
                          const char * pszUnits, double dfInMeters )

{
    return ((OGRSpatialReference *) hSRS)->SetLinearUnits( pszUnits, 
                                                           dfInMeters );
}

/************************************************************************/
/*                           GetLinearUnits()                           */
/************************************************************************/

/**
 * Fetch linear projection units. 
 *
 * If no units are available, a value of "Meters" and 1.0 will be assumed.
 * This method only checks directly under the PROJCS or LOCAL_CS node for 
 * units.
 *
 * This method does the same thing as the C function OSRGetLinearUnits()/
 *
 * @param ppszName a pointer to be updated with the pointer to the 
 * units name.  The returned value remains internal to the OGRSpatialReference
 * and shouldn't be freed, or modified.  It may be invalidated on the next
 * OGRSpatialReference call. 
 *
 * @return the value to multiply by linear distances to transform them to 
 * meters.
 */

double OGRSpatialReference::GetLinearUnits( char ** ppszName ) const

{
    const OGR_SRSNode *poCS = GetAttrNode( "PROJCS" );

    if( poCS == NULL )
        poCS = GetAttrNode( "LOCAL_CS" );

    if( ppszName != NULL )
        *ppszName = "unknown";
        
    if( poCS == NULL )
        return 1.0;

    for( int iChild = 0; iChild < poCS->GetChildCount(); iChild++ )
    {
        const OGR_SRSNode     *poChild = poCS->GetChild(iChild);
        
        if( EQUAL(poChild->GetValue(),"UNIT")
            && poChild->GetChildCount() >= 2 )
        {
            if( ppszName != NULL )
                *ppszName = (char *) poChild->GetChild(0)->GetValue();
            
            return atof( poChild->GetChild(1)->GetValue() );
        }
    }

    return 1.0;
}

/************************************************************************/
/*                         OSRGetLinearUnits()                          */
/************************************************************************/

double OSRGetLinearUnits( OGRSpatialReferenceH hSRS, char ** ppszName )
    
{
    return ((OGRSpatialReference *) hSRS)->GetLinearUnits( ppszName );
}

/************************************************************************/
/*                          GetPrimeMeridian()                          */
/************************************************************************/

/**
 * Fetch prime meridian info.
 *
 * Returns the offset of the prime meridian from greenwich in degrees,
 * and the prime meridian name (if requested).   If no PRIMEM value exists
 * in the coordinate system definition a value of "Greenwich" and an
 * offset of 0.0 is assumed.
 *
 * If the prime meridian name is returned, the pointer is to an internal
 * copy of the name. It should not be freed, altered or depended on after
 * the next OGR call.
 *
 * This method is the same as the C function OSRGetPrimeMeridian().
 *
 * @param ppszName return location for prime meridian name.  If NULL, name
 * is not returned.
 *
 * @return the offset to the GEOGCS prime meridian from greenwich in decimal
 * degrees.
 */

double OGRSpatialReference::GetPrimeMeridian( char **ppszName ) const 

{
    const OGR_SRSNode *poPRIMEM = GetAttrNode( "PRIMEM" );

    if( poPRIMEM != NULL && poPRIMEM->GetChildCount() >= 2 
        && atof(poPRIMEM->GetChild(1)->GetValue()) != 0.0 )
    {
        if( ppszName != NULL )
            *ppszName = (char *) poPRIMEM->GetChild(0)->GetValue();
        return atof(poPRIMEM->GetChild(1)->GetValue());
    }
    
    if( ppszName != NULL )
        *ppszName = SRS_PM_GREENWICH;

    return 0.0;
}

/************************************************************************/
/*                        OSRGetPrimeMeridian()                         */
/************************************************************************/

double OSRGetPrimeMeridian( OGRSpatialReferenceH hSRS, char **ppszName )

{
    return ((OGRSpatialReference *) hSRS)->GetPrimeMeridian( ppszName );
}

/************************************************************************/
/*                             SetGeogCS()                              */
/************************************************************************/

/**
 * Set geographic coordinate system. 
 *
 * This method is used to set the datum, ellipsoid, prime meridian and
 * angular units for a geographic coordinate system.  It can be used on it's
 * own to establish a geographic spatial reference, or applied to a 
 * projected coordinate system to establish the underlying geographic 
 * coordinate system. 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品日韩综合在线| 久久综合国产精品| 国产欧美日韩在线观看| 五月综合激情网| 成人一区二区视频| 精品入口麻豆88视频| 亚洲第一成人在线| 99re在线精品| 国产亚洲短视频| 免费观看在线综合色| 欧美性猛片xxxx免费看久爱| 国产精品欧美久久久久无广告 | 国产精品福利一区二区| 日韩制服丝袜先锋影音| 欧美亚一区二区| 国产精品二三区| 成人三级伦理片| 欧美激情中文字幕一区二区| 精品一区二区三区免费| 日韩午夜小视频| 婷婷丁香久久五月婷婷| 欧美亚洲综合网| 一级中文字幕一区二区| 91网址在线看| 亚洲色图视频网| 99re热视频精品| 自拍偷拍亚洲综合| 国产成人啪午夜精品网站男同| 欧美一区二区三区在线电影| 午夜激情一区二区| 欧美日韩国产在线观看| 亚洲超碰97人人做人人爱| 欧美亚洲国产怡红院影院| 亚洲最色的网站| 欧美日韩视频在线第一区| 一区二区三区免费网站| 欧美日韩国产精品成人| 日韩精品一级二级 | 亚洲精品国产a| 在线一区二区视频| 亚洲一区二区三区四区中文字幕| 色综合中文字幕国产| 亚洲一区在线观看免费观看电影高清| 色综合久久88色综合天天免费| 亚洲三级在线观看| 欧美日韩国产免费一区二区| 日本欧美在线观看| 精品美女被调教视频大全网站| 韩国女主播成人在线| 久久九九全国免费| 色综合网色综合| 偷拍日韩校园综合在线| 日韩欧美中文字幕一区| 成人中文字幕在线| 亚洲一区视频在线观看视频| 日韩免费看网站| 国产剧情av麻豆香蕉精品| 日韩一级欧美一级| 麻豆国产欧美一区二区三区| 久久久三级国产网站| 成人不卡免费av| 图片区小说区区亚洲影院| 久久精品夜夜夜夜久久| 色欧美片视频在线观看| 蜜臀av一区二区在线观看| 国产精品水嫩水嫩| 欧美一区二区三区四区久久| 成人性生交大片免费看视频在线| 亚洲综合一区二区精品导航| 久久综合色婷婷| 在线视频综合导航| 国产一区二区三区四区在线观看| 亚洲人成7777| 亚洲精品一区在线观看| 91久久人澡人人添人人爽欧美| 日本va欧美va欧美va精品| 国产视频不卡一区| 91精品国产色综合久久ai换脸| 成人免费毛片app| 久久精品免费观看| 一区二区三区波多野结衣在线观看 | 欧美午夜不卡视频| 国产乱淫av一区二区三区| 午夜精品在线看| 亚洲精品写真福利| 91精品国产黑色紧身裤美女| 91久久精品一区二区| 精品国产伦一区二区三区观看体验| 中文字幕精品在线不卡| 亚洲国产一二三| 欧美一区二区久久| 石原莉奈在线亚洲二区| 欧美一区二区三区免费在线看 | 中文字幕亚洲成人| 成人黄色免费短视频| 国产日韩影视精品| 成人黄色小视频| 国产很黄免费观看久久| 看国产成人h片视频| 亚洲不卡在线观看| 亚洲综合成人网| 国产精品卡一卡二| 国产欧美日韩不卡免费| 久久蜜桃av一区二区天堂| 精品免费国产一区二区三区四区| 777色狠狠一区二区三区| 欧美老女人在线| 欧美在线色视频| 欧美色视频在线观看| 在线一区二区三区四区五区| 99re热这里只有精品视频| av亚洲精华国产精华精华| av欧美精品.com| 91在线国内视频| 91捆绑美女网站| 在线视频中文字幕一区二区| 欧美最猛黑人xxxxx猛交| 色成人在线视频| 在线观看视频一区二区| 欧美三级三级三级| 欧美久久久久久久久久 | 国产成人精品免费在线| 国产综合久久久久影院| 国产一区二区三区不卡在线观看 | 色狠狠桃花综合| 欧美日韩一级片在线观看| 在线观看国产精品网站| 欧美妇女性影城| 日韩欧美aaaaaa| 欧美激情在线观看视频免费| 中文字幕一区二区三区精华液 | 久久九九久精品国产免费直播| 精品久久久久av影院| 国产日韩欧美不卡| 亚洲精品一二三区| 麻豆精品视频在线| 成人久久视频在线观看| 在线视频欧美精品| 欧美一卡二卡在线观看| 国产视频亚洲色图| 亚洲一区二区三区美女| 精品在线播放免费| 91丨国产丨九色丨pron| 91精品国产色综合久久不卡蜜臀 | 一区二区三区在线播| 亚洲精品在线网站| 久久精工是国产品牌吗| 日韩福利视频导航| 欧美高清精品3d| 777xxx欧美| 国产精品午夜电影| 日韩电影网1区2区| 国产一区二区h| 99视频精品全部免费在线| 国产91精品一区二区| 成人深夜福利app| 337p粉嫩大胆噜噜噜噜噜91av| 91麻豆精东视频| 日韩欧美在线综合网| 亚洲天堂福利av| 九九久久精品视频| 欧美午夜精品电影| 久久久亚洲欧洲日产国码αv| 亚洲成人免费在线| 成人av动漫在线| 精品动漫一区二区三区在线观看| 亚洲另类色综合网站| 开心九九激情九九欧美日韩精美视频电影 | 在线观看免费视频综合| 国产日韩在线不卡| 韩国一区二区在线观看| 欧美精品一区二区三区蜜臀| 加勒比av一区二区| 精品国产亚洲在线| 亚洲成人在线免费| 色猫猫国产区一区二在线视频| 欧美大片一区二区| 亚洲第一福利一区| 久久综合久久综合久久| 一区二区三区在线观看视频| 男人的天堂久久精品| 日本久久电影网| 国产精品免费看片| 国产精品1024| 日韩免费观看2025年上映的电影| 亚洲伊人伊色伊影伊综合网| 99精品欧美一区二区蜜桃免费| 久久久久9999亚洲精品| 日本不卡一二三| 欧美一区二区视频在线观看 | 粉嫩久久99精品久久久久久夜| 日韩欧美专区在线| 日本韩国一区二区三区| 中文字幕在线观看不卡视频| 日韩欧美一区二区在线视频| 亚洲.国产.中文慕字在线| av一区二区三区四区| 中文字幕国产一区二区| 一区二区在线观看视频在线观看| 国产精品高潮呻吟久久|