ObjectVision / GeoDMS

Source code for the GeoDMS software
https://www.geodms.nl/
Other
7 stars 1 forks source link

3D Geometry types are always interpreted as String by GeoDMS #656

Open eoudejans opened 7 months ago

eoudejans commented 7 months ago

A GeoPackage with geometry of type PointZ, wkbPointZM, is encountered.

image

Under the current mapping from gdal geometry type to geodms geometry type we include:

switch (geoType) {
case wkbPoint:           return ValueComposition::Single;
case wkbMultiPoint:      return ValueComposition::Sequence;
case wkbCircularString:  return ValueComposition::Sequence;
case wkbCompoundCurve:   return ValueComposition::Sequence;
case wkbLineString:      return ValueComposition::Sequence;
case wkbMultiLineString: return ValueComposition::Sequence;
case wkbPolygon:         return ValueComposition::Polygon;
case wkbMultiPolygon:    return ValueComposition::Polygon;
case wkbCurvePolygon:    return ValueComposition::Polygon;
}

All other types will be read as string using their string representation.

This means that 3D geometry types ie. wkbPointZM, wkbPolygonZM and wkbMultiLineStringZM are returned as string.

Suggested improvement would be to always interpret geometries as 2D and add a Z parameter as attribute.

eoudejans commented 7 months ago

Note that squashing 3D polygons to 2D polygons may lead to significant topolygical changes.