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

Jeff Dege jdege at korterra.com
Tue Mar 27 10:51:55 EDT 2007


Tim Schaub wrote:
> 
> 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.

Seems to me that "digitizing" a pentagram and drawing a pentagram
interactively, with the tool, are different things.  The result of
importing five points in a polygon shape gives us a polygon with a hole
in the middle, and to convert that to five triangles would more closely
represent the nature of what we're importing.

But drawing a pentagram, interactively, isn't quite the same problem.
If we disallow self-intersecting features, then to draw a pentagram, the
user would have to draw the five triangles individually.  Which seems
more in line with the end users intuition.  This idea that if you draw a
line from a point to infinity, and cross an odd number of polygon
borders, the point is inside the polygon, and if you cross an even
number of borders, the point is outside the polygon, is simply not the
way my end users think about geometry.




More information about the Users mailing list