本文整理汇总了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;
}
示例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;
}
示例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;
}