-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some geometries are not read from BGT .gml, resulting in NULL geometries. #703
Comments
Curved geometries are translated to linear geometries using the function geo->getLinearGeometry() see in gdal_vect.cpp line 534: gdalVectImpl::FeaturePtr feat = m_hDS->TestCapability(ODsCRandomLayerRead) ? GetNextFeatureInterleaved(layer, m_hDS) : layer->GetNextFeature();
OGRGeometry* geo = feat ? feat ->GetGeometryRef() : 0;
if (geo) {
if (dynamic_cast<OGRLineString*>(geo))
AddLineString<PolygonType>(dataElemRef, static_cast<OGRLineString*>(geo));
else if (dynamic_cast<OGRCircularString*>(geo))
AddLineString<PolygonType>(dataElemRef, static_cast<OGRLineString*>(geo->getLinearGeometry()));
else if (dynamic_cast<OGRCompoundCurve*>(geo))
AddLineString<PolygonType>(dataElemRef, static_cast<OGRLineString*>(geo->getLinearGeometry()));
else if (dynamic_cast<OGRPolygon*>(geo))
AddPolygon<PolygonType>(dataElemRef, static_cast<OGRPolygon*>(geo));
else if (dynamic_cast<OGRMultiPolygon*>(geo))
AddMultiPolygon<PolygonType>(dataElemRef, static_cast<OGRMultiPolygon*>(geo));
else if (dynamic_cast<OGRCurvePolygon*>(geo))
AddPolygon<PolygonType>(dataElemRef, static_cast<OGRPolygon*>(geo->getLinearGeometry()));
else if (dynamic_cast<OGRMultiPoint*>(geo))
AddMultiPoint<PolygonType>(dataElemRef, static_cast<OGRMultiPoint*>(geo));
else if (dynamic_cast<OGRMultiLineString*>(geo))
AddMultiLineString<PolygonType>(dataElemRef, static_cast<OGRMultiLineString*>(geo));
} |
Is this evidence that curve polygons are not the issue, or is this indeed a path to solution? |
…s type conversion is not available.
Related geoforum issue: |
OGRCurvePolygon is a subtype of Surface: |
OGRMultiPolygon is a subtype of MultiSurface: |
4750000300000000d7a3703dc403fd40 |
No description provided.
The text was updated successfully, but these errors were encountered: