Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Is there a GDAL command which can combine multiple rasters so that a unique output value is assigned to each unique combination of input values, like the combine command in ArcGIS?

gdal_merge seems to mosaic rasters so it is not exactly what I need.

share|improve this question
add comment

1 Answer

You mean something like Grass' r.cross?

share|improve this answer
    
Exactly! Can I do this through GDAL? –  user1186 Apr 29 '13 at 0:18
3  
You can do it with some python code. You can use itertools.product to create a list for all possible combinations, and then use the index of that list for a unique value to use in the raster. –  nickves Apr 29 '13 at 1:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.