h2gis icon indicating copy to clipboard operation
h2gis copied to clipboard

Add function to export and import geometry in TWKB encoding

Open ebocher opened this issue 7 years ago • 5 comments

Check the Tiny Well-known Binary specification

https://github.com/TWKB/Specification/blob/master/twkb.md

ebocher avatar Mar 25 '17 09:03 ebocher

https://github.com/locationtech/jts/issues/246

ebocher avatar Jan 28 '18 12:01 ebocher

Seems under the pipe https://github.com/locationtech/jts/pull/452

ebocher avatar Nov 02 '20 08:11 ebocher

H2 does not use JTS for the GEOMETRY data type, so it doesn't matter what is supported by JTS and what is not.

I thought about TWKB too, but it doesn't support SRID, it is designed to store decimal numbers (WKB uses IEEE 754 binary double precision values, just like double in Java), so encoding of double values with fractional part may be too long, and encoding and decoding of TWKB is quite expensive, it may actually reduce overall performance.

On the other hand, H2GIS can provide functions to export and import geometries in that format.

katzyn avatar Nov 03 '20 12:11 katzyn

You are right. I have updated the title of the issue.

ebocher avatar Nov 03 '20 12:11 ebocher

Available with JTS 1.19.0

ebocher avatar Jun 28 '22 05:06 ebocher