Then maybe I am explaining this problem wrong. If a polygon contains points 
that are close to -180 and 180 then things like MapKit
on IOS don't paint it correctly, instead taking the portion that crosses the 
line and stretching it around the world. In other
words, the shortest distance between something like -178 and 178 is not of 
length 4 but greater than 300 as it wraps around.

Is there a different solution that I can try to fix this problem?

Thank you for letting me know about GEOS possibly being out of date. I suppose 
I'll need to build that from source to get any newer,
as that's the latest in Ubuntu 12.04s repository.

Also, thank you for taking the time to download that dataset and try it out.

I've updated the StackExchange question with your findings:
http://gis.stackexchange.com/questions/30922/how-do-i-split-polygons-that-cross-the-dateline

any thoughts on how to fix this problem?

Take care,
Sina

Website: www.SinaBahram.com
Twitter: @SinaBahram

-----Original Message-----
From: Even Rouault [mailto:[email protected]] 
Sent: Saturday, August 11, 2012 2:06 PM
To: [email protected]
Cc: Sina Bahram
Subject: Re: [gdal-dev] Topology Exceptions on Non-Noded Intersections

Le mardi 07 août 2012 03:49:41, Sina Bahram a écrit :
> Eli,
> 
> Sounds like the same problem to me, yes. thank you for finding that.
> 
> However, now I'm still left wondering about implementing the fix.
> 
> As I said in the StackExchange question, I think wrapdateline should fix
> this, but if not is there an easy way to split polygons along the
> dateline?
> 
> Thanks for the response to this.

The TopologyException error comes from the GEOS library. You might need to 
upgrade your GEOS to a newer version and see if it helps.

I've downloaded the 
http://thematicmapping.org/downloads/TM_WORLD_BORDERS-0.3.zip dataset and 
tried -wrapdateline on it. It works great. Except that it is not needed at all 
since the longitudes of the dataset are between -180 and 180, so there's 
nothing to wrap at all...

> 
> Take care,
> Sina
> 
> 
> Website: www.SinaBahram.com
> Twitter: @SinaBahram
> 
> 
> -----Original Message-----
> From: Eli Adam [mailto:[email protected]]
> Sent: Monday, August 06, 2012 9:19 PM
> To: Sina Bahram
> Subject: Re: [gdal-dev] Topology Exceptions on Non-Noded Intersections
> 
> This is about Google Earth not Google Maps, but there may be something
> relevant here, http://blog.opengeo.org/2010/08/10/shape-of-a-polygon/
> 
> Eli
> 
> On Mon, Aug 6, 2012 at 5:50 PM, Sina Bahram <[email protected]> wrote:
> > Hello,
> > 
> > I receive the following errors with the -wrapdateline argument.
> > 
> > ERROR 1: TopologyException: found non-noded intersection between
> > LINESTRING (-59.7742 -72.9003, -59.8494 -73.2331) and LINESTRING
> 
> (0
> 
> > -73.1221, -89.3211 -73.0542) at -59.8141 -73.0766
> > ERROR 1: TopologyException: found non-noded intersection between
> > LINESTRING (-59.7742 -72.9003, -59.8494 -73.2331) and LINESTRING (180
> > -73.2589, -89.3211 -73.0542) at -59.8141 -73.0766
> > 
> > More details can be found on this question I asked:
> > http://gis.stackexchange.com/questions/30922/how-do-i-split-polygons-that
> > -cross-the-dateline
> > 
> > any advice?
> > 
> > Thanks
> > 
> > Take care,
> > Sina
> > 
> > Website: www.SinaBahram.com
> > Twitter: @SinaBahram
> > 
> > 
> > _______________________________________________
> > gdal-dev mailing list
> > [email protected]
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
> 
> _______________________________________________
> gdal-dev mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to