[postgis-devel] #1586: st_dumpaspolygons makes not valid polygons

Sandro Santilli strk at keybit.net
Mon Feb 20 12:46:01 PST 2012


[out of trac talk]

On Mon, Feb 20, 2012 at 07:37:01PM -0000, PostGIS wrote:
> #1586: [raster] st_dumpaspolygons makes not valid polygons

>  {{{
>  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.

Does GDAL return a _single_ polygon always ? Because from the
description it seems it returns polygons (plural) and the above
would be a valid multipolygon...

--strk; 



More information about the postgis-devel mailing list