[postgis-devel] [PostGIS] #1586: [raster] st_dumpaspolygons makes not valid polygons
PostGIS
trac at osgeo.org
Mon Feb 20 11:37:01 PST 2012
#1586: [raster] st_dumpaspolygons makes not valid polygons
----------------------+-----------------------------------------------------
Reporter: jomarlla | Owner: pracine
Type: defect | Status: new
Priority: high | Milestone: PostGIS 2.0.0
Component: raster | Version: trunk
Keywords: |
----------------------+-----------------------------------------------------
Comment(by dustymugs):
After doing some thinking about GDALPolygonize() and GDALFPolygonize()
(both used by ST_DumpAsPolygons), it is possible/probably for invalid
polygons to be generated. From the GDAL API docs for GDALPolygonize:
{{{
This function creates vector polygons for all connected regions of pixels
in the raster sharing a common pixel value
}}}
Two pixels with the same value with one common corner may cause a bow-
tie...
{{{
+--+
| |
| |
+--+--+
| |
| |
+--+
}}}
I don't see any way to make GDAL generate valid polygons but we could add
a validation routine to the appropriate C code in rt_api.c.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1586#comment:6>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list