[gdal-dev] export to WKT oddity

Even Rouault even.rouault at spatialys.com
Tue Feb 2 02:23:11 PST 2016


Le mardi 02 février 2016 10:42:07, Ari Jolma a écrit :
> Even
> 
> Why the forcing to ISO variant in MultiCurve etc. exportToWkt method?

To avoid continuing generating legacy WKT with new geometry types.

 * For backward compatibility purposes, it exports the Old-style 99-402
 * extended dimension (Z) WKB types for types Point, LineString, Polygon,
 * MultiPoint, MultiLineString, MultiPolygon and GeometryCollection.
 * For other geometry types, it is equivalent to OGR_G_ExportToIsoWkt().

> 
> That leads currently to outputs like
> 
> GEOMETRYCOLLECTION (POINT EMPTY,MULTISURFACE Z EMPTY,POINT EMPTY)

Ah indeed, there might be some corner cases like the above one where this does 
not work very well. 
In the above, OGR_G_ExportToIsoWkt() should be rather used.
We could perhaps fix exportToWkt() in that situation to switch completely to 
IsoWkt() as soon as there's a non-legacy geometry type in the collection ?

> 
> which seems illogical to me.
> 
> Ari
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list