void OGRILI1Layer::JoinGeomLayers() { bGeomsJoined = TRUE; int bResetConfigOption = FALSE; if (EQUAL(CPLGetConfigOption("OGR_ARC_STEPSIZE", ""), "")) { bResetConfigOption = TRUE; CPLSetThreadLocalConfigOption("OGR_ARC_STEPSIZE", "0.96"); } for (GeomFieldInfos::const_iterator it = oGeomFieldInfos.begin(); it != oGeomFieldInfos.end(); ++it) { OGRFeatureDefn* geomFeatureDefn = it->second.geomTable; if (geomFeatureDefn) { CPLDebug( "OGR_ILI", "Join geometry table %s of field '%s'", geomFeatureDefn->GetName(), it->first.c_str() ); OGRILI1Layer* poGeomLayer = poDS->GetLayerByName(geomFeatureDefn->GetName()); int nGeomFieldIndex = GetLayerDefn()->GetGeomFieldIndex(it->first.c_str()); if (it->second.iliGeomType == "Surface") { JoinSurfaceLayer(poGeomLayer, nGeomFieldIndex); } else if (it->second.iliGeomType == "Area") { CPLString pointField = it->first + "__Point"; int nPointFieldIndex = GetLayerDefn()->GetGeomFieldIndex(pointField.c_str()); PolygonizeAreaLayer(poGeomLayer, nGeomFieldIndex, nPointFieldIndex); } } } if( bResetConfigOption ) CPLSetThreadLocalConfigOption("OGR_ARC_STEPSIZE", NULL); }
OGRFeature *OGRILI1Layer::GetNextFeature() { OGRFeature *poFeature; if (poSurfacePolyLayer != 0) JoinSurfaceLayer(); if (poAreaLineLayer != 0) PolygonizeAreaLayer(); while(nFeatureIdx < nFeatures) { poFeature = GetNextFeatureRef(); if (poFeature) return poFeature->Clone(); } return NULL; }
void OGRILI1Layer::JoinGeomLayers() { for (GeomFieldInfos::const_iterator it = oGeomFieldInfos.begin(); it != oGeomFieldInfos.end(); ++it) { OGRFeatureDefn* geomFeatureDefn = it->second.geomTable; if (geomFeatureDefn) { CPLDebug( "OGR_ILI", "Join geometry table %s of field '%s'", geomFeatureDefn->GetName(), it->first.c_str() ); OGRILI1Layer* poGeomLayer = poDS->GetLayerByName(geomFeatureDefn->GetName()); int nGeomFieldIndex = GetLayerDefn()->GetGeomFieldIndex(it->first.c_str()); if (it->second.iliGeomType == "Surface") { JoinSurfaceLayer(poGeomLayer, nGeomFieldIndex); } else if (it->second.iliGeomType == "Area") { CPLString pointField = it->first + "__Point"; int nPointFieldIndex = GetLayerDefn()->GetGeomFieldIndex(pointField.c_str()); PolygonizeAreaLayer(poGeomLayer, nGeomFieldIndex, nPointFieldIndex); } } } bGeomsJoined = TRUE; }