[GRASS-user] Colour problems using r.patch (with OS OpenData)

Joshua Arnott josh at snorfalorpagus.net
Tue Jan 25 09:32:27 EST 2011


Hi grass-users,

I'm having some difficultly patching together some raster layers (OS 
OpenData District Raster - TIFF). Individually, the tiles display 
correctly using d.rast. However, if I patch them into a single tile 
using r.patch, the colour for all but the first becomes mangled. Example 
patching two layers (left and right):

The only reference on the UG I've found is thread:
http://lists.osgeo.org/pipermail/grass-user/1998-January/001017.html

The issue seems to be something to do with colour tables in the TIFFs 
being different. I've not tried the solution provided, as it appears 
clunky and I was hoping some progress had been made since '98!

r.in.wms seems to do something like this, patching together tiles 
downloaded from a WMS server. I've taken a look at the code for this, 
but found it difficult to pick out what is relevant. There is some 
mention to using r.mapcalc in a similar way, and also to the GDAL script 
gdal_merge.py, which I've not managed to get anything sensible from.

Ideally I'd like to be able to handle these layers from within GRASS 
(using pre-existing commands, or a python script) rather than externally 
(like gdal_merge.py seems to do), although at this point I'll take 
whatever I can get. Can anyone suggest a way forward in this?

Also, as a more general question, does anyone have experience using the 
OS OpenData dataset? I'm curious to see what people have done with it 
since its release.

Thanks in advance,
Josh.


More information about the grass-user mailing list