[postgis-devel] polygonize_garray build invalid geometries
strk at refractions.net
strk at refractions.net
Mon Jan 3 07:57:25 PST 2005
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/
More information about the postgis-devel
mailing list