[postgis-devel] Polygon ctors again

strk at refractions.net strk at refractions.net
Sat Dec 10 09:07:38 PST 2005


Carl, I've been crawling my archive for this mail.
This is where we decided to have polygonize return a COLLECTION
rather then a MULTIPOLYGON due to possibly invalid returns.

I wanted to take a closer look at this but your testcase
is not more online and I can't find a local copy. Do you by
any event have a testcase for invalid returns from polygonize ?

We'll add a BuildPolygon(any_geometry) returning either
Polygon, EMPTY or MultiPolygon, but I wanted to check the
invalidity issue to eventually warn about this in the manual.
( you suggested a similar thing back in January, btw )

TIA

--strk;

On Mon, Jan 03, 2005 at 04:57:25PM +0100, strk at refractions.net wrote:
> The problem here is in the implementation of the postgis polygonize
> interface. GEOS polygonize returns a list of polygons, not a
> multipolygon. Postgis is *forcing* single-geometry output, creating
> a multipolygon, which probably often results in an invalid geometry.
> 
> I think the fix here is creating a collection, instead of a MultiPolygon.
> Note that in this case postgis lacks a polygon construction mean.
> 
> I suggest make_polygon(geometry, geometry[]), having shell as first
> argument and a list of holes as second (optional) argument.
> 
> --strk;
> 
> On Sun, Jan 02, 2005 at 12:01:35PM -0500, Carl Anderson wrote:
> > against CVS Postigs and CVS GEOS
> > 
> > polygonize_garray in instances returns invalid geometries
> > 
> > test cases avail at 
> > http://wms.co.fulton.ga.us/data/postgis/polygonize_error.sql.gz
> > (sorry, it was too big for the list)
> > 
> > run the script to build object  then
> > 
> > select isvalid(the_geom) from polygonize_error;
> > 
> > select
> >   isvalid(polygonize_garray(array_append('{}',
> >           intersection(boundary(the_geom),boundary(the_geom))
> >        )))
> >   from polygonize_error;
> > 
> > intersection(boundary(),boundary())  -- converts all rings into simple 
> > linestrings (actually OGC line geometries  SFSSQL 2.1.6)
> > _______________________________________________
> > postgis-devel mailing list
> > postgis-devel at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-devel
> 
> -- 
> 
> For standing up against patentability of software,
> 
>   Thank You, Poland!
> 
> Read the intervention:    http://kwiki.ffii.org/ConsPolon041221En
> Send your thanks:         thankyoupoland.info
> Read/do more:		  http://www.noepatents.org/
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel

-- 

 /"\    ASCII Ribbon Campaign
 \ /    Respect for low technology.
  X     Keep e-mail messages readable by any computer system.
 / \    Keep it ASCII. 




More information about the postgis-devel mailing list