[gdal-dev] dissolve shapefiles
Chaitanya kumar CH
chaitanya.ch at gmail.com
Tue May 4 08:38:39 EDT 2010
I would start by creating a colour table with each group containing the same
shade of grey. This will ease the polygonization by avoiding duplicates.
There will be three or four (RGB/RGBA) bands from the colour table but you
can just consider one band during polygonization.
On Tue, May 4, 2010 at 4:52 PM, Thomas Unternaehrer <
thomas.unternaehrer at gmail.com> wrote:
> I try to get a dissolved shapefile out of a large raster file (Erdas
> img) using Python. The raster file contains values from lets say 1 to
> 100. What I need is a shapefile that contains just five groups where
> 1-20 get the value 1, 21-40 the value 2 and so on.
> What I've done so far are the following steps:
> - split the raster file into several pieces using gdal_translate
> - run gdal.Polygonize on each part to get shapefiles (dissolved based
> on the raster values)
> - manipulate the resulting dbf-files to get my described groups (gives
> me a new field: fieldGrouped)
> Now I need to dissolve the resulting shapefiles based on the new field
> fieldGrouped to get smaller shapefiles.
> How can I do this using gdal/ogr or any other library? Can I
> manipulate the original values in my raster file? GRASS has this
> functionality but if I'm right, I need to start GRASS and import the
> shapefiles to it (it should be easy to run it on a different machine).
> Nice would be a function like gdal.Polygonize. I'm more or less
> completely new to GIS at all.
> My main goal is to produce tiles for Google Maps.
> Any hint or help would be appreciated
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
Chaitanya kumar CH.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev