[OpenLayers-Users] Request? - non-self-intersecting polygons

Jeff Dege jdege at korterra.com
Mon Mar 26 18:57:43 EDT 2007


To your typical computer-science geek, polygons that have lines that
intersect themselves is a neat idea.  If you draw a pentagram, the
center pentagon is "outside" the polygon, while the five points are
"inside" the polygon.

The polygon drawing tool in OpenLayers works this way.

It shouldn't.  Not for this user domain.

Map people aren't drawing geometric shapes, they're drawing features on
the map.  Overlapping borders don't happen.  And shouldn't happen, with
the tool.

I haven't dug into the code, and I have no idea how difficult it would
be, but I think a reasonable case could be made that it not allow
polygon borders to be drawn that overlap with already existing borders.
If a point is moved to a place where the not-yet-drawn border would
intersect with an existing border, the not-yet-drawn border truncates at
the existing border, and when the point is saved, it's saved at the
place where the new border was truncated.

Thoughts?





More information about the Users mailing list