[OpenLayers-Users] Request? - non-self-intersecting polygons
Tim Schaub
noreply at geocartic.com
Mon Mar 26 20:02:41 EDT 2007
Hey-
Jeff Dege wrote:
> 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 think the "correct" result of digitizing a pentagram is five polygons.
The result would look much like what you get now, but it would be five
features instead of one. At this point, OpenLayers allows
self-intersecting features mainly because it doesn't have any methods to
identify intersecting segments. I imagine it will stay this way for
a while. The algorithms are not too complex, there is just too much
other work to get done.
If you're looking for a place to change this behavior, it shouldn't be
done during digitizing - the geometry should be cleaned after the sketch
is complete.
Tim
More information about the Users
mailing list