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

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

?? ogrfeature.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
/******************************************************************************
 * $Id: ogrfeature.cpp 11087 2007-03-27 03:55:12Z warmerdam $
 * 
 * Project:  OpenGIS Simple Features Reference Implementation
 * Purpose:  The OGRFeature class implementation. 
 * Author:   Frank Warmerdam, warmerda@home.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_feature.h"
#include "ogr_api.h"
#include "ogr_p.h"

CPL_CVSID("$Id: ogrfeature.cpp 11087 2007-03-27 03:55:12Z warmerdam $");

/************************************************************************/
/*                             OGRFeature()                             */
/************************************************************************/

/**
 * Constructor
 *
 * Note that the OGRFeature will increment the reference count of it's
 * defining OGRFeatureDefn.  Destruction of the OGRFeatureDefn before
 * destruction of all OGRFeatures that depend on it is likely to result in
 * a crash. 
 *
 * This method is the same as the C function OGR_F_Create().
 *
 * @param poDefnIn feature class (layer) definition to which the feature will
 * adhere.
 */

OGRFeature::OGRFeature( OGRFeatureDefn * poDefnIn )

{
    m_pszStyleString = NULL;
    m_poStyleTable = NULL;
    m_pszTmpFieldValue = NULL;
    poDefnIn->Reference();
    poDefn = poDefnIn;

    nFID = OGRNullFID;
    
    poGeometry = NULL;

    // we should likely be initializing from the defaults, but this will
    // usually be a waste. 
    pauFields = (OGRField *) CPLCalloc( poDefn->GetFieldCount(),
                                        sizeof(OGRField) );

    for( int i = 0; i < poDefn->GetFieldCount(); i++ )
    {
        pauFields[i].Set.nMarker1 = OGRUnsetMarker;
        pauFields[i].Set.nMarker2 = OGRUnsetMarker;
    }
}

/************************************************************************/
/*                            OGR_F_Create()                            */
/************************************************************************/
/**
 * Feature factory.
 *
 * Note that the OGRFeature will increment the reference count of it's
 * defining OGRFeatureDefn.  Destruction of the OGRFeatureDefn before
 * destruction of all OGRFeatures that depend on it is likely to result in
 * a crash. 
 *
 * This function is the same as the C++ method OGRFeature::OGRFeature().
 * 
 * @param hDefn handle to the feature class (layer) definition to 
 * which the feature will adhere.
 * 
 * @return an handle to the new feature object with null fields and 
 * no geometry.
 */

OGRFeatureH OGR_F_Create( OGRFeatureDefnH hDefn )

{
    return (OGRFeatureH) new OGRFeature( (OGRFeatureDefn *) hDefn );
}

/************************************************************************/
/*                            ~OGRFeature()                             */
/************************************************************************/

OGRFeature::~OGRFeature()

{
    if( poGeometry != NULL )
        delete poGeometry;

    for( int i = 0; i < poDefn->GetFieldCount(); i++ )
    {
        OGRFieldDefn    *poFDefn = poDefn->GetFieldDefn(i);
        
        if( !IsFieldSet(i) )
            continue;
    
        switch( poFDefn->GetType() )
        {
          case OFTString:
            if( pauFields[i].String != NULL )
                VSIFree( pauFields[i].String );
            break;

          case OFTBinary:
            if( pauFields[i].Binary.paData != NULL )
                VSIFree( pauFields[i].Binary.paData );
            break;

          case OFTStringList:
            CSLDestroy( pauFields[i].StringList.paList );
            break;

          case OFTIntegerList:
          case OFTRealList:
            CPLFree( pauFields[i].IntegerList.paList );
            break;

          default:
            // should add support for wide strings.
            break;
        }
    }
    
    poDefn->Release();

    CPLFree( pauFields );
    CPLFree(m_pszStyleString);
    CPLFree(m_pszTmpFieldValue);
}

/************************************************************************/
/*                           OGR_F_Destroy()                            */
/************************************************************************/
/**
 * Destroy feature
 *
 * The feature is deleted, but within the context of the GDAL/OGR heap.
 * This is necessary when higher level applications use GDAL/OGR from a 
 * DLL and they want to delete a feature created within the DLL.  If the
 * delete is done in the calling application the memory will be freed onto
 * the application heap which is inappropriate. 
 *
 * This function is the same as the C++ method OGRFeature::DestroyFeature().
 * 
 * @param hFeat handle to the feature to destroy.
 */

void OGR_F_Destroy( OGRFeatureH hFeat )

{
    delete (OGRFeature *) hFeat;
}

/************************************************************************/
/*                           CreateFeature()                            */
/************************************************************************/

/**
 * Feature factory.
 *
 * This is essentially a feature factory, useful for               
 * applications creating features but wanting to ensure they       
 * are created out of the OGR/GDAL heap.                           
 * 
 * @param poDefn Feature definition defining schema.
 * 
 * @return new feature object with null fields and no geometry.  May be
 * deleted with delete. 
 */

OGRFeature *OGRFeature::CreateFeature( OGRFeatureDefn *poDefn )

{
    return new OGRFeature( poDefn );
}

/************************************************************************/
/*                           DestroyFeature()                           */
/************************************************************************/

/**
 * Destroy feature
 *
 * The feature is deleted, but within the context of the GDAL/OGR heap.
 * This is necessary when higher level applications use GDAL/OGR from a 
 * DLL and they want to delete a feature created within the DLL.  If the
 * delete is done in the calling application the memory will be freed onto
 * the application heap which is inappropriate. 
 *
 * This method is the same as the C function OGR_F_Destroy().
 * 
 * @param poFeature the feature to delete.
 */

void OGRFeature::DestroyFeature( OGRFeature *poFeature )

{
    delete poFeature;
}

/************************************************************************/
/*                             GetDefnRef()                             */
/************************************************************************/

/**
 * \fn OGRFeatureDefn *OGRFeature::GetDefnRef();
 *
 * Fetch feature definition.
 *
 * This method is the same as the C function OGR_F_GetDefnRef().
 *
 * @return a reference to the feature definition object.
 */

/************************************************************************/
/*                          OGR_F_GetDefnRef()                          */
/************************************************************************/

/**
 * Fetch feature definition.
 *
 * This function is the same as the C++ method OGRFeature::GetDefnRef().
 *
 * @param hFeat handle to the feature to get the feature definition from.
 *
 * @return an handle to the feature definition object on which feature
 * depends.
 */

OGRFeatureDefnH OGR_F_GetDefnRef( OGRFeatureH hFeat )

{
    return ((OGRFeature *) hFeat)->GetDefnRef();
}

/************************************************************************/
/*                        SetGeometryDirectly()                         */
/************************************************************************/

/**
 * Set feature geometry.
 *
 * This method updates the features geometry, and operate exactly as
 * SetGeometry(), except that this method assumes ownership of the
 * passed geometry.
 *
 * This method is the same as the C function OGR_F_SetGeometryDirectly().
 *
 * @param poGeomIn new geometry to apply to feature. Passing NULL value here
 * is correct and it will result in deallocation of currently assigned geometry
 * without assigning new one.
 *
 * @return OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if
 * the geometry type is illegal for the OGRFeatureDefn (checking not yet
 * implemented). 
 */ 

OGRErr OGRFeature::SetGeometryDirectly( OGRGeometry * poGeomIn )

{
    delete poGeometry;
    poGeometry = poGeomIn;

    // I should be verifying that the geometry matches the defn's type.
    
    return OGRERR_NONE;
}

/************************************************************************/
/*                     OGR_F_SetGeometryDirectly()                      */
/************************************************************************/

/**
 * Set feature geometry.
 *
 * This function updates the features geometry, and operate exactly as
 * SetGeometry(), except that this function assumes ownership of the
 * passed geometry.
 *
 * This function is the same as the C++ method 
 * OGRFeature::SetGeometryDirectly.
 *
 * @param hFeat handle to the feature on which to apply the geometry.
 * @param hGeom handle to the new geometry to apply to feature.
 *
 * @return OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if
 * the geometry type is illegal for the OGRFeatureDefn (checking not yet
 * implemented). 
 */ 

OGRErr OGR_F_SetGeometryDirectly( OGRFeatureH hFeat, OGRGeometryH hGeom )

{
    return ((OGRFeature *) hFeat)->SetGeometryDirectly((OGRGeometry *) hGeom);
}

/************************************************************************/
/*                            SetGeometry()                             */
/************************************************************************/

/**
 * Set feature geometry.
 *
 * This method updates the features geometry, and operate exactly as
 * SetGeometryDirectly(), except that this method does not assume ownership
 * of the passed geometry, but instead makes a copy of it. 
 *
 * This method is the same as the C function OGR_F_SetGeometry().
 *
 * @param poGeomIn new geometry to apply to feature. Passing NULL value here
 * is correct and it will result in deallocation of currently assigned geometry
 * without assigning new one.
 *
 * @return OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if
 * the geometry type is illegal for the OGRFeatureDefn (checking not yet
 * implemented). 
 */ 

OGRErr OGRFeature::SetGeometry( OGRGeometry * poGeomIn )

{
    delete poGeometry;

    if( poGeomIn != NULL )
        poGeometry = poGeomIn->clone();
    else
        poGeometry = NULL;

    // I should be verifying that the geometry matches the defn's type.
    
    return OGRERR_NONE;
}

/************************************************************************/
/*                         OGR_F_SetGeometry()                          */
/************************************************************************/

/**
 * Set feature geometry.
 *
 * This function updates the features geometry, and operate exactly as
 * SetGeometryDirectly(), except that this function does not assume ownership
 * of the passed geometry, but instead makes a copy of it. 
 *
 * This function is the same as the C++ OGRFeature::SetGeometry().
 *
 * @param hFeat handle to the feature on which new geometry is applied to.
 * @param hGeom handle to the new geometry to apply to feature.
 *
 * @return OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if
 * the geometry type is illegal for the OGRFeatureDefn (checking not yet
 * implemented). 
 */ 

OGRErr OGR_F_SetGeometry( OGRFeatureH hFeat, OGRGeometryH hGeom )

{
    return ((OGRFeature *) hFeat)->SetGeometry((OGRGeometry *) hGeom);
}

/************************************************************************/
/*                           StealGeometry()                            */
/************************************************************************/

/**
 * Take away ownership of geometry.
 *
 * Fetch the geometry from this feature, and clear the reference to the
 * geometry on the feature.  This is a mechanism for the application to
 * take over ownship of the geometry from the feature without copying. 
 * Sort of an inverse to SetGeometryDirectly().
 *
 * After this call the OGRFeature will have a NULL geometry.
 *
 * @return the pointer to the geometry.
 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人av电影在线观看| 中文字幕亚洲综合久久菠萝蜜| 中文字幕一区二区三区在线不卡| 国产精品系列在线观看| 国产蜜臀av在线一区二区三区| 国产91在线看| 国产精品不卡视频| 在线观看日韩毛片| 青娱乐精品在线视频| 亚洲精品在线观看视频| 成人av资源在线| 亚洲激情自拍偷拍| 欧美精品xxxxbbbb| 韩国精品在线观看| 欧美国产日韩精品免费观看| 色综合天天做天天爱| 天天色综合天天| 久久久亚洲午夜电影| 色综合天天综合色综合av| 亚洲高清免费视频| 久久久久久久久久电影| 91丨九色丨蝌蚪丨老版| 美女脱光内衣内裤视频久久网站| 久久精品一区蜜桃臀影院| 91在线你懂得| 九一久久久久久| 亚洲色图制服诱惑| 欧美一级精品大片| 99久久99久久久精品齐齐| 全国精品久久少妇| 亚洲欧洲成人av每日更新| 91精品视频网| 91在线免费播放| 国精产品一区一区三区mba视频| 国产精品久久久久久久久晋中 | 国产在线观看一区二区| 亚洲手机成人高清视频| 精品国产乱码久久久久久闺蜜| av一区二区久久| 久久国产夜色精品鲁鲁99| 一区二区理论电影在线观看| 国产亚洲欧美日韩在线一区| 在线播放中文一区| 91麻豆福利精品推荐| 国产一区二区三区观看| 五月婷婷激情综合| 亚洲免费资源在线播放| 国产欧美一区在线| 精品三级av在线| 欧美影视一区在线| 99久久99久久精品免费观看| 激情欧美一区二区| 日本不卡一区二区三区 | 欧美日高清视频| bt欧美亚洲午夜电影天堂| 国产综合色在线| 天天影视网天天综合色在线播放| 亚洲色图在线播放| 国产精品成人免费在线| 久久久久久久电影| 337p粉嫩大胆噜噜噜噜噜91av| 欧美色国产精品| 色天使色偷偷av一区二区| 懂色av一区二区三区免费观看 | 在线亚洲一区观看| 99久久精品情趣| 丁香啪啪综合成人亚洲小说| 国产一区二区三区免费| 久久激情综合网| 久久精品国产**网站演员| 青青草国产成人av片免费| 亚洲自拍偷拍av| 一区二区三区不卡视频| 亚洲免费在线看| 亚洲精品老司机| 一区二区三区精品久久久| 亚洲色图一区二区| 一区二区三区不卡视频在线观看| 亚洲激情校园春色| 亚洲一级二级三级| 午夜视频在线观看一区二区| 亚洲成人你懂的| 午夜欧美电影在线观看| 亚洲第一电影网| 日本中文一区二区三区| 日本91福利区| 国内精品自线一区二区三区视频| 国产麻豆欧美日韩一区| 成人午夜激情影院| 色香色香欲天天天影视综合网| 91福利在线看| 7777精品伊人久久久大香线蕉完整版 | 亚洲美女视频一区| 亚洲综合视频在线| 日韩 欧美一区二区三区| 久久激情五月婷婷| av亚洲精华国产精华精| 91福利区一区二区三区| 在线综合+亚洲+欧美中文字幕| 欧美哺乳videos| 久久久精品综合| 有坂深雪av一区二区精品| 日韩在线观看一区二区| 国产乱国产乱300精品| 91视视频在线观看入口直接观看www| 一本色道**综合亚洲精品蜜桃冫| 欧美日韩视频在线一区二区| 日韩一区二区视频在线观看| 久久精品一区二区三区不卡牛牛| 亚洲欧洲日韩在线| 亚洲高清视频中文字幕| 精彩视频一区二区三区| 99麻豆久久久国产精品免费| 欧美日韩久久一区二区| 精品国产麻豆免费人成网站| 综合久久久久久| 美国欧美日韩国产在线播放 | 91麻豆产精品久久久久久| 69成人精品免费视频| 日本一区免费视频| 午夜一区二区三区在线观看| 国产精品一区免费视频| 色成人在线视频| 欧美xxx久久| 一区二区久久久久久| 国产一区二区影院| 欧洲精品在线观看| 国产欧美日韩三级| 日本三级亚洲精品| 色综合久久天天综合网| 久久蜜臀中文字幕| 亚洲成人第一页| 91在线国产观看| 日韩美一区二区三区| 亚洲综合视频网| zzijzzij亚洲日本少妇熟睡| 日韩精品一区二区三区视频| 亚洲一本大道在线| 99精品视频一区| 国产亚洲欧美日韩俺去了| 婷婷亚洲久悠悠色悠在线播放| 成人亚洲一区二区一| 日韩写真欧美这视频| 亚洲国产日日夜夜| 91污在线观看| 国产网红主播福利一区二区| 另类综合日韩欧美亚洲| 欧美日韩精品一区二区三区| 亚洲精品国产一区二区精华液| 国产成人精品免费在线| 精品国产一区二区三区四区四 | 日韩精品一区二区三区四区 | 韩国精品在线观看| 欧美一级视频精品观看| 亚洲成av人片在线| 91国偷自产一区二区开放时间 | 大胆欧美人体老妇| 精品88久久久久88久久久| 日韩在线一二三区| 337p亚洲精品色噜噜狠狠| 亚洲伊人色欲综合网| 一本一道久久a久久精品| 国产精品高清亚洲| 99久久er热在这里只有精品15| 欧美极品少妇xxxxⅹ高跟鞋| 国产精品白丝av| 日本一区二区成人在线| 丁香激情综合国产| 亚洲欧洲av一区二区三区久久| av成人动漫在线观看| 亚洲天堂免费看| 色婷婷av一区二区三区大白胸 | 老司机精品视频线观看86| 日韩欧美国产电影| 免费成人在线影院| 日韩美女在线视频| 国产成人亚洲综合a∨婷婷| 国产精品色婷婷| jizzjizzjizz欧美| 尤物在线观看一区| 在线成人高清不卡| 久久成人综合网| 欧美国产欧美综合| 色婷婷香蕉在线一区二区| 亚洲国产成人精品视频| 日韩欧美中文字幕公布| 国产一区二区三区免费观看| 国产精品久久久久7777按摩| 色老汉av一区二区三区| 日韩制服丝袜先锋影音| 久久精品视频一区二区三区| 国产91丝袜在线播放九色| 综合中文字幕亚洲| 91精品欧美综合在线观看最新| 久久激情综合网| 日韩美女视频一区二区| 日韩一区二区三区免费看| 国产精品乡下勾搭老头1| 一区二区三区精品视频在线| 日韩欧美的一区|