[OSM-dev] coastline self-intersections - added to the error checker

Ben Supnik bsupnik at xsquawkbox.net
Mon Sep 7 19:17:18 BST 2009

Hi Y'all,

Martjin has added self-intersection checks to the coastline error 
checker. :-)  That's what those purple dots are.  Of course since we've 
never looked for them before there are now about 6000 new errors.

If anyone ever finds a false positive self-intersection, please email 
me, I will investigate.  The intersection math is floating point so it 
could fail for very near "grazings" but given the size of the earth and 
the limits of double-precision floating point, a near-miss that triggers 
the coastline is probably creating an insanely small "pinch" of water, 
smaller than would be useful.

(The coastline generation process also reduces data density, which has 
the potential to collapse such a small pinch.)

Currently self intersections do not create total map rendering failures. 
  The major map renderers appear to use a "toggle" policy toward 
polygons, thus a figure 8 closed polygon is filled in its two enclosed 
areas.  Self-intersections render the notion of "one side is wet, the 
other is dry" impossible of course.

There are self-intersection tests in some of the other quality-assurance 
tools, but I think a lot of them are available only in Europe.  (Perhaps 
that is why the US coast has so much more purple than Europe?)


Scenery Home Page: http://scenery.x-plane.com/
Scenery blog: http://xplanescenery.blogspot.com/
Plugin SDK: http://www.xsquawkbox.net/xpsdk/
X-Plane Wiki: http://wiki.x-plane.com/
Scenery mailing list: x-plane-scenery at yahoogroups.com
Developer mailing list: x-plane-dev at yahoogroups.com

More information about the dev mailing list