[gdal-dev] Open source API to convert raster to polygons?

Ricardo Scachetti Pereira ricardo at tdwg.org
Wed Jan 9 10:15:04 EST 2008


    Hi all,
   
    Does anyone know of any open source geoprocessing APIs that I can 
use to convert raster maps into polygons (as a shapefile or SQL for 
PostGIS)? Does QGIS do that?

    I know that GDAL (via gdal_contour utility) can turn a raster into 
lines, but that's not good enough for me. I need closed polygons that I 
later intend to import into PostGIS. Gdal_contour would give usable 
intermediate results (i.e, it produces lines that I think can be turned 
into closed polygons), if it wasn't for the open polygons that are 
created where the grid values touch NODATA values.

    I have considered using GRASS (r.poly) but I need to embed the 
geoprocessing library on an research application that I will deploy to 
Windows desktop computers. To be completely honest, I can't even 
install  GRASS on my Windows workstation, so I have no hopes of 
deploying it via a neat installer :(( . That's probably due to the lack 
of intelligence and patience, and is another story.

    Any help with this would be greatly appreciated.

    Cheers,

Ricardo Pereira
Software Engineer and GIS Application Developer

   

   


More information about the gdal-dev mailing list