Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jts-dev] split a polygon or line at the antimeridian

Constant nightmare. Made worse by having to do it in _javascript_ not java. Clipping to polygon seem like overkill. Fortunately, I can usually get away with the assumption of convexity and that speeds it up no end. Shame the antemeridian doesn’t go through silicon valley – I bet that would have saved us decades of pain from flat-earth mapping providers.

 

From: jts-dev-bounces@xxxxxxxxxxxxxxxx [mailto:jts-dev-bounces@xxxxxxxxxxxxxxxx] On Behalf Of John Cartwright - NOAA Federal
Sent: Tuesday, 26 September 2017 12:20 p.m.
To: jts-dev@xxxxxxxxxxxxxxxx
Subject: [jts-dev] split a polygon or line at the antimeridian

 

Hello All,

 

I feel like this is a common question but don't seem to find a good answer.  

 

I'm trying to split a simple shape at the antimeridian to form a multipart geometry.  My general approach was to construct two clipping polygons for the eastern and western hemispheres and intersect them with the target geometry.

 

Can someone suggest a better approach to doing this with JTS or GeoTools?

 

Related question - it seems that I need to shift the geometries from a -180 to 180 coordinate space to a 0 to 360 coordinate space in order to perform some of the calculations.  Is AffineTransformation the best way to approach this?  Any examples of using it for this purpose?

 

Thanks for any help you can provide!

 

--john

 

Notice: This email and any attachments are confidential and may not be used, published or redistributed without the prior written consent of the Institute of Geological and Nuclear Sciences Limited (GNS Science). If received in error please destroy and immediately notify GNS Science. Do not copy or disclose the contents.

Back to the top