Pages

Thursday, 2 August 2018

JTS 1.15.1 and XYZM development

One of the things I have been working on with the LocationTech crew is the JTS Topology Suite project with a recent release of JTS 1.15.1 and looking into XYZM coordinate support.

JTS logo


JTS 1.15.1 upgrades for everyone

We have had an exciting couple of months with Jim Hughes and myself taking a code-sprint to:

JTS XYZM coordinates

The other bit of RnD I have been working has been Explicit support for XYZM coordinates. Previously this has been left as an exercise for the reader, designed for in the API but something for downstream applications to figure out. The motivation to address this in JTS is to support a WKTReader / WKT Writer enhancements Felix Obermaier has been working on, but now that it has started a wide range of projects have expressed interest.

Coordinate

The design trade off is between treating JTS Coordinate as a data object, managed in arrays and created and deleted as required. JTS itself only makes use of coordinate.x and coordinate.y fields (which are public as befitting a data structure).

Here is what adding XYZM support looks like for Coordinate:




Methods have beed added for getX(), getY(), getZ() and getM() - and the methods return NaN for anything they do not support.

CoordinateSequence

The cloud projects at LocationTech, such as GeoMesa, run into a bit of trouble with this approach as creating and deleting Coordinate constantly during processing causes a lot of memory pressure.

The alternative provided by JTS is to manage information as a CoordinateSequence, such as Packed CoordinateSequence which is backed by an array of doubles. There is lots of room for JTS to improve in this area and we have watched downstream projects come up with all kinds of fascinating CoordinateSequence implementations we can learn from.

Here is what adding XYZM support looks like for CoordinateSequence:




The key addition here is clarifying the definition of dimension (the number of ordinates in each coordinate) and adding measures (the number of measures included in dimension for each coordinate). For for XY data dimension is 2 and measures is 0. For XYZM data dimension is 4 and measures is 1.

JTS Topology Suite at FOSS4G 2018

If you are interested in hearing more about JTS Topology Suite join Rob Emanuele and myself at FOSS4G 2018 later this month for State of JTS 2018

5 comments:

Aruna Ram said...

Wonderful ideas! You are providing the different kinds of content is very useful for me and I gain more details from your article. I am always following your blog and keep posting...
Spark Training in Chennai
Spark Training
Embedded System Course Chennai
Linux Training in Chennai
Social Media Marketing Courses in Chennai
Power BI Training in Chennai
Tableau Training in Chennai
Oracle DBA Training in Chennai

yuva rani said...

Great info. The content you wrote is very interesting to read. This will loved by all age groups.
ReactJS Training in Chennai
ReactJS Training
ReactJS course
ccna Training in Chennai
Salesforce Training in Chennai
Angularjs Training in Chennai

ProPlus Logics said...

Hey Nice Blog!! Thanks For Sharing!!!Wonderful blog & good post.Its really helpful for me, waiting for a more new post. Keep Blogging!
SEO company in coimbatore
Digital Marketing Company in Coimbatore
SEO Services in coimbatore

Vicky Ram said...

Great articles, first of all Thanks for writing such lovely Post!

Guest posting sites
Technology

jenifer irene said...

This is really a valuable post... The info shared is helpful and valuable. Thank you for sharing.
Aviation Academy in Chennai
Air hostess training in Chennai
Airport management courses in Chennai
Ground staff training in Chennai
aviation training in Chennai
air hostess academy in Chennai
Airline Courses in Chennai
Ground staff training in Chennai