locationtech / jts

The JTS Topology Suite is a Java library for creating and manipulating vector geometry.
Other
1.99k stars 442 forks source link

WKBWriter 3-dimensional output does not work with SpatiaLite #710

Open hrstka opened 3 years ago

hrstka commented 3 years ago

Setting the high bit of the wkbType word in case of 3D geometry does not work with SpatiaLite. According to wikipedia the presence of 3D coordinates should be indicated by different geometry type code (e.g. 2D point is 1 and 3D point is 1001).

dr-jts commented 3 years ago

Yes, the WKBWriter is still outputting the old PostGIS EWKB format, rather than the current ISO/OGC standard WKB format. (Note that the WKBReader supports both formats).

It seems like the way forward is to enhance the WKBWriter to output ISO/OGC standard, with the old format left as an option.