当前位置: 首页>>代码示例>>C++>>正文


C++ OGRFeatureDefn::DeleteGeomFieldDefn方法代码示例

本文整理汇总了C++中OGRFeatureDefn::DeleteGeomFieldDefn方法的典型用法代码示例。如果您正苦于以下问题:C++ OGRFeatureDefn::DeleteGeomFieldDefn方法的具体用法?C++ OGRFeatureDefn::DeleteGeomFieldDefn怎么用?C++ OGRFeatureDefn::DeleteGeomFieldDefn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OGRFeatureDefn的用法示例。


在下文中一共展示了OGRFeatureDefn::DeleteGeomFieldDefn方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AddGeomTable

 // Add additional Geometry table for Interlis 1
 void AddGeomTable(CPLString layerName, const char* psFieldName, OGRwkbGeometryType eType, bool bRefTIDField = false)
 {
     OGRFeatureDefn* poGeomTableDefn = new OGRFeatureDefn(layerName);
     OGRFieldDefn fieldDef("_TID", OFTString);
     poGeomTableDefn->AddFieldDefn(&fieldDef);
     if (bRefTIDField)
     {
         OGRFieldDefn fieldDefRef("_RefTID", OFTString);
         poGeomTableDefn->AddFieldDefn(&fieldDefRef);
     }
     poGeomTableDefn->DeleteGeomFieldDefn(0);
     OGRGeomFieldDefn fieldDefGeom(psFieldName, eType);
     poGeomTableDefn->AddGeomFieldDefn(&fieldDefGeom);
     CPLDebug( "OGR_ILI", "Adding geometry table %s for field %s", poGeomTableDefn->GetName(), psFieldName);
     poGeomFieldInfos[psFieldName].geomTable = poGeomTableDefn;
 }
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:17,代码来源:imdreader.cpp

示例2: OGRFeatureDefn

OGRFeatureDefn *OGRFeatureDefn::Clone()

{
    int i;
    OGRFeatureDefn *poCopy;

    poCopy = new OGRFeatureDefn( GetName() );

    GetFieldCount();
    for( i = 0; i < nFieldCount; i++ )
        poCopy->AddFieldDefn( GetFieldDefn( i ) );

    /* There is a default geometry field created at OGRFeatureDefn instanciation */
    poCopy->DeleteGeomFieldDefn(0);
    GetGeomFieldCount();
    for( i = 0; i < nGeomFieldCount; i++ )
        poCopy->AddGeomFieldDefn( GetGeomFieldDefn( i ) );

    return poCopy;
}
开发者ID:garnertb,项目名称:gdal,代码行数:20,代码来源:ogrfeaturedefn.cpp

示例3: InitFieldDefinitions

    void InitFieldDefinitions()
    {
        // Delete default geometry field
        poTableDefn->DeleteGeomFieldDefn(0);

        const char* psKind = CPLGetXMLValue( node, "Kind", NULL );
        //CPLDebug( "OGR_ILI", "InitFieldDefinitions of '%s' kind: %s", GetName(), psKind);
        if (EQUAL(psKind, "Structure"))
        {
            // add foreign_key field
            OGRFieldDefn ofieldDefn1("REF_NAME", OFTString);
            poTableDefn->AddFieldDefn(&ofieldDefn1);
            OGRFieldDefn ofieldDefn2("REF_ID", OFTString);
            poTableDefn->AddFieldDefn(&ofieldDefn2);
        } else { // Class
            // add TID field
            const char* psTidColName = (iliVersion == 1) ? "_TID" : "TID";
            OGRFieldDefn ofieldDefn(psTidColName, OFTString);
            poTableDefn->AddFieldDefn(&ofieldDefn);
        }
        if (CSLTestBoolean(CPLGetXMLValue( node, "Abstract", "FALSE" )))
            hasDerivedClasses = true;
    }
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:23,代码来源:imdreader.cpp


注:本文中的OGRFeatureDefn::DeleteGeomFieldDefn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。