PostGIS – Validity of MULTICURVE Geometry in WKT According to Standards

postgisstandardswell-known-binarywell-known-text

We are using Oracle function (SDO_UTIL.TO_WKTGEOMETRY) for exporting geometry to WKT. Some geometries have MULTICURVE in WKT, like this one:

MULTICURVE (COMPOUNDCURVE (LINESTRING (3451418.006 5481808.951, 3451417.787 5481809.927, 3451409.995 5481806.744), LINESTRING (3451409.995 5481806.744, 3451418.006 5481808.951)), LINESTRING (3451418.006 5481808.951, 3451417.787 5481809.927, 3451409.995 5481806.744), LINESTRING (3451409.995 5481806.744, 3451418.006 5481808.951))

Then we store the geometries in PostgeSQL with PostGIS extension and geometry is valid from PostGIS point of view. But then we are using WKB parser in our app which does not support parsing for geometries with MULTICURVE instance. In the implementation of simple features we found on the page 24 that MULTICURVE is only abstract class and instances shouldn't be created.

But Oracle export geometry with MULTICURVE. PostGIS reads the MULTICURVE and QGIS also. We found some examples on the internet in the opensource libraries which are able to parse MULTICURVE geometries and are inluded in the examples of WKT.

Now we don't know if we have a bad standard or open source community use MULTICURVE despite of standard or if there is something else which we don't know.

Best Answer

(MULTI)CURVES are not part of the OGC Simple Feature Specification for WKT/WKB representations (read the same document, chapters 7 & 8; p. 51 ff).
If I'm not mistaken, Oracle's spatial datatype references and representations follow the ISO/IEC 13249-3 specification, which does define a multitude of complex geometry types (it's proprietary, so I can't give further details).

PostGIS has introduced many non-OGC standard geometry types and e.g. supports MULTICURVES.

Related Question