本文整理汇总了C++中GMLFeature::GetOBProperties方法的典型用法代码示例。如果您正苦于以下问题:C++ GMLFeature::GetOBProperties方法的具体用法?C++ GMLFeature::GetOBProperties怎么用?C++ GMLFeature::GetOBProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GMLFeature
的用法示例。
在下文中一共展示了GMLFeature::GetOBProperties方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PopulateRelations
void OGRNASDataSource::PopulateRelations()
{
GMLFeature *poFeature;
poReader->ResetReading();
while( (poFeature = poReader->NextFeature()) != NULL )
{
char **papszOBProperties = poFeature->GetOBProperties();
int i;
for( i = 0; papszOBProperties != NULL && papszOBProperties[i] != NULL;
i++ )
{
const GMLProperty *psGMLId = poFeature->GetProperty( "gml_id" );
char *pszName = NULL;
const char *pszValue = CPLParseNameValue( papszOBProperties[i],
&pszName );
if( EQUALN(pszValue,"urn:adv:oid:",12)
&& psGMLId != NULL && psGMLId->nSubProperties == 1 )
{
poRelationLayer->AddRelation( psGMLId->papszSubProperties[0],
pszName,
pszValue + 12 );
}
CPLFree( pszName );
}
delete poFeature;
}
poRelationLayer->MarkRelationsPopulated();
}
示例2: PopulateRelations
void OGRNASDataSource::PopulateRelations()
{
poReader->ResetReading();
GMLFeature *poFeature = NULL;
while( (poFeature = poReader->NextFeature()) != NULL )
{
char **papszOBProperties = poFeature->GetOBProperties();
for( int i = 0;
papszOBProperties != NULL && papszOBProperties[i] != NULL;
i++ )
{
const int nGMLIdIndex =
poFeature->GetClass()->GetPropertyIndex( "gml_id" );
const GMLProperty *psGMLId =
(nGMLIdIndex >= 0) ? poFeature->GetProperty(nGMLIdIndex ) : NULL;
char *l_pszName = NULL;
const char *pszValue = CPLParseNameValue( papszOBProperties[i],
&l_pszName );
if( STARTS_WITH_CI(pszValue, "urn:adv:oid:")
&& psGMLId != NULL && psGMLId->nSubProperties == 1 )
{
poRelationLayer->AddRelation( psGMLId->papszSubProperties[0],
l_pszName,
pszValue + 12 );
}
CPLFree( l_pszName );
}
delete poFeature;
}
poRelationLayer->MarkRelationsPopulated();
}