[gdal-dev] Classification and combination with GDAL?

Chris Toney jctoney at yahoo.com
Sat Dec 10 13:46:53 EST 2011



Carlos,
I have a "gdal_combine" utility written in C++ that finds the unique combinations, assigns a combination ID that can be written into the cells of an output raster, and also writes a csv table with the IDs, values of original variables they represent, and their pixel counts. The input rasters must all have the same extent and cell size. I'll be happy to send the source or post it somewhere if it might be helpful.

Chris

>------------------------------
>
>Date: Sat, 10 Dec 2011 02:45:41 +0300
>From: SupportLists <supportlists at qlands.com>
>Subject: [gdal-dev] Classification and combination with GDAL?
>To: gdal-dev <gdal-dev at lists.osgeo.org>
>Message-ID: <4EE29DA5.9090505 at qlands.com>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>Hi,
>
>I need to perform classification and combination of three ascii grids. 
>This means for example:
>
>1. Separate the data of each cell in the grid among three classes
>     Layer1 Classes: A1,B1,C1
>     Layer2 Classes: A2,B2,C2
>     Layer3 Classes: A3,B3,C3
>
>2. Then Combine the three classified grids into one so each cell has a 
>combination of the 27 possible.
>     Cell 1: A1A2A3
>     Cell 2: A1B2A3
>     ....
>     Cell max: C3C2C1.
>
>3. Assign a color to each combination and generate a final GeoTIFF.
>
>How if possible can I do this with GDAL?
>
>Many thanks,
>Carlos.
>
>
>


More information about the gdal-dev mailing list