[geos-devel] Perhaps a stupid question about polygons...

Martin Davis mbdavis at VividSolutions.com
Mon Jun 28 19:23:33 EDT 2004


That would complicate things, alright.  

I used the vertex-checking approach in JTS as well, in the validation
routines.  The tricky part there is that in the OGC model vertices of
holes can lie on the shell, or on other holes...

Martin Davis, Senior Technical Architect
Vivid Solutions Inc.      www.vividsolutions.com
Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
Phone: (250) 385 6040 - Local 308 Fax: (250) 385 6046


> -----Original Message-----
> From: Stephen Lime [mailto:sdlime at comcast.net] 
> Sent: June 28, 2004 3:53 PM
> To: GEOS Development List
> Subject: Re: [geos-devel] Perhaps a stupid question about polygons...
> 
> 
> I've already done it to export as GML 2.0. Your idea would 
> work except 
> MapServer polygons can have multiple outer rings too in the case of a 
> lake with multiple basins and islands in each basin (which could also 
> contain holes). If I recall I ended up looking at a single vertex in 
> each part and counting the number of other parts it falls into.
> 
> Steve
> 
> On Jun 28, 2004, at 5:26 PM, Martin Davis wrote:
> 
> > Yup, absolutely.
> >
> > This shouldn't be too much of a showstopper tho.  It's easy 
> to write 
> > code to detect which is the outer shell.  I think the easiest 
> > algorithm would just be to take the ring with the largest x or y 
> > extent.
> >
> > Martin Davis, Senior Technical Architect
> > Vivid Solutions Inc.      www.vividsolutions.com
> > Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
> > Phone: (250) 385 6040 - Local 308 Fax: (250) 385 6046
> >
> >
> >> -----Original Message-----
> >> From: Stephen Lime [mailto:sdlime at comcast.net]
> >> Sent: June 28, 2004 3:20 PM
> >> To: geos-devel at geos.refractions.net
> >> Subject: [geos-devel] Perhaps a stupid question about polygons...
> >>
> >>
> >> Hi all: The recent thread about polygons and holes got me 
> thinking. 
> >> Does building polygons in geos require the client to know 
> if a ring 
> >> in a particular polygon is inner vs. outer? MapServer makes no 
> >> provision for this since it's not necessary for rendering features 
> >> nor simple intersection tests.
> >>
> >> Steve
> >>
> >> _______________________________________________
> >> geos-devel mailing list
> >> geos-devel at geos.refractions.net 
> >> http://geos.refractions.net/mailman/listinfo/geos-devel
> >>
> > _______________________________________________
> > geos-devel mailing list
> > geos-devel at geos.refractions.net 
> > http://geos.refractions.net/mailman/listinfo/geos-devel
> >
> 
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net 
> http://geos.refractions.net/mailman/listinfo/geos-devel
> 



More information about the geos-devel mailing list