Including Interpolated Z and M Values in JSTS Intersection from WKB

80 views
Skip to first unread message

Danielle Alexander

unread,
May 31, 2018, 11:12:49 AM5/31/18
to JSTS devs
We are investigating the possibility of converting to JSTS from WKB for spatial manipulation and have a few questions regarding the spatial capabilities.

  1. It seems out of the box, the intersection method does not interpolate z-values, although they are included in geometries. Has anyone already added this sort of modification, or are there suggestions for the best way to go about this? 
    • We are also looking to add m-values to geometries, which we will also want interpolated during intersection.
  2. There is no WKB parser, has anyone worked on this, or would there be positive feedback to merging it in if it was written?
  3. It looks like the WKT parser doesn't include z values, either. Is this intentional?

Interested in hearing any suggestions or feedback regarding these matters!

Björn

unread,
Jun 7, 2018, 5:22:06 AM6/7/18
to JSTS devs
Hi Danielle,

1. Many of the modifying operations in JSTS does not support Z which is limitation of scope from upstream - see https://locationtech.github.io/jts/jts-faq.html#B4. There is no plans to extend the scope in upstream AFAIK and this means full Z support also out of scope for JSTS.

2. A WKB parser/encoder would be a welcome addition. It (and other I/O related classes) could not be translated from the upstream Java source.

3. I don't think it's intentional and could probably be considered a bug.

Regards,

Björn

Björn

unread,
Jun 7, 2018, 5:30:52 AM6/7/18
to JSTS devs
Just remembered I made an experimental WKB parser some time ago at https://github.com/bjornharrtell/wkb-parser.

You might also want to consider the alternative format TWKB (1) which is more space efficient than WKB.


Regards,

Björn
Message has been deleted

Danielle Alexander

unread,
Jun 7, 2018, 10:30:03 AM6/7/18
to JSTS devs
Hmmm I see, this is disappointing, since both Z and M values are part of the standard for WKT and WKB now, from what I can see on OGC

A WKB parser could probably be extrapolated from cschwarz/wkx , if the need arises.

Björn

unread,
Jun 7, 2018, 11:06:40 AM6/7/18
to JSTS devs
Try not to be too disappointed. JTS/JSTS is a free software which dates back to 2002 as a library for planar geometry and is pretty clearly advertised as such in my opinion and it still shines in that department. To handle additional dimensions for operations that processes geometry, for example the overlay operations, I believe a full rewrite with new algorithms would be needed (as far as I know) and they might not be a good fit for the planar case.
Reply all
Reply to author
Forward
0 new messages