after an image has been georeferenced the transformation creates black edges. How could I set these to white instead of black using gdal?
would I have to somehow create a colour table and set nodata to white?
yours,
Rob
|
after an image has been georeferenced the transformation creates black edges. How could I set these to white instead of black using gdal? would I have to somehow create a colour table and set nodata to white? yours, Rob |
|||
|
|
|
A nodata value is just that, no data. So the idea of having it white, black, or any other colour within the dataset doesn't make sense. Now, obviously when you load an image into a GIS, you have to represent nodata as something, and this is, in Quantum GIS at least, either whatever is underneath, or if there is nothing then the project's background colour. So there is a decoupling of what nodata means, how it is stored, and how it is represented. If you're getting black regardless of the background colour of the GIS you're using, then the chances are GDAL hasn't set a nodata value at all, and it just defaults to black pixels. So you need to explicitly tell GDAL how you want nodata to be stored. With |
|||
|
|
|
Use GDAL's nearblack utility. It converts black, white or any specified color to black/white. |
|||
|
|