[FWTools] Converting raster dataset to vector.

Sebastian Good sebastian at palladiumconsulting.com
Thu Mar 19 12:12:06 EST 2009


Frank, this is lovely. Does the GDALPolygonize function handle interior
rings in polygons, i.e. creating a donut polygon for an area of pixels with
common values which has a hole in it? We would like to use it for
classification work, but often end up creating quite complex geometries in
the raster.

On Sun, Mar 15, 2009 at 10:50 PM, Frank Warmerdam <warmerdam at pobox.com>wrote:

> Michał Krzywda wrote:
> > Hi all,
> >
> > I would like to convert raster file to vector format for instance PNG to
> GML.
> > I know it's hard to do it, and result might not be brilliant, but I would
> like to try.
> >
> > Among all articles and FAQ's I have found:
> >
> http://trac.osgeo.org/gdal/wiki/FAQRaster#Howtoconvertarastertoalayerofpolygons
> >
> > Is there any resource how to perform such conversion?
> > Which tools I need use to perform transformation, assuming that I'm
> starting with ordinary PNG file.
>
> Michał,
>
> I have updated the FAQ to reference the new (in 1.6) gdal_polygonize.py
> python script.  Unfortunately, it depends on the "next generation" bindings
> which are not available in FWTools.  You can either build GDAL 1.6 or
> trunk from source, or use an existing binary build that does include
> the (default) next generation bindings such as OSGeo4W
> (http://osgeo4w.osgeo.org).
>
> If you were to use OSGeo4W you would need to install the "gdal16"
> package as well as "gdal16-python".  Then in the OSGeo4W Command Shell
> you would do something like:
>
>   gdal16
>   gdal_polygonize src.png -f GML out.gml
>
> Best regards,
> --
>
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam<http://pobox.com/%7Ewarmerdam>
> and watch the world go round - Rush    | Geospatial Programmer for Rent
>
> _______________________________________________
> FWTools mailing list
> FWTools at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/fwtools
> http://fwtools.maptools.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20090319/c8982400/attachment.htm 


More information about the FWTools mailing list