OGRFeature *OGRS57Layer::GetFeature( long nFeatureId ) { S57Reader *poReader = poDS->GetModule(0); // not multi-reader aware if( poReader != NULL ) { OGRFeature *poFeature; poFeature = poReader->ReadFeature( nFeatureId, poFeatureDefn ); if( poFeature != NULL && poFeature->GetGeometryRef() != NULL ) poFeature->GetGeometryRef()->assignSpatialReference( GetSpatialRef() ); return poFeature; } else return NULL; }
OGRFeature *OGRS57Layer::GetFeature( GIntBig nFeatureId ) { S57Reader *poReader = poDS->GetModule(0); // not multi-reader aware if( poReader != NULL && nFeatureId <= INT_MAX ) { OGRFeature *poFeature = poReader->ReadFeature( static_cast<int>(nFeatureId), poFeatureDefn ); if( poFeature != NULL && poFeature->GetGeometryRef() != NULL ) poFeature->GetGeometryRef()->assignSpatialReference( GetSpatialRef() ); return poFeature; } return NULL; }