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


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

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


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

示例1: AddGeomField

 void AddGeomField(const char* psName, OGRwkbGeometryType geomType)
 {
     OGRGeomFieldDefn fieldDef(psName, geomType);
     //oGFld.SetSpatialRef(geomlayer->GetSpatialRef());
     poTableDefn->AddGeomFieldDefn(&fieldDef);
     CPLDebug( "OGR_ILI", "Adding geometry field '%s' to Class %s", psName, GetName());
 }
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:7,代码来源:imdreader.cpp

示例2:

OGRErr      OGRLayerWithTransaction::CreateGeomField( OGRGeomFieldDefn *poField,
        int bApproxOK )
{
    if( !m_poDecoratedLayer ) return OGRERR_FAILURE;
    int nFields = m_poDecoratedLayer->GetLayerDefn()->GetGeomFieldCount();
    OGRErr eErr = m_poDecoratedLayer->CreateGeomField(poField, bApproxOK);
    if( m_poFeatureDefn && eErr == OGRERR_NONE && m_poDecoratedLayer->GetLayerDefn()->GetGeomFieldCount() == nFields + 1 )
    {
        m_poFeatureDefn->AddGeomFieldDefn( m_poDecoratedLayer->GetLayerDefn()->GetGeomFieldDefn(nFields) );
    }
    return eErr;
}
开发者ID:miccferr,项目名称:wmshp-electron,代码行数:12,代码来源:ogremulatedtransaction.cpp

示例3: 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

示例4: 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


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