Geography Reference
In-Depth Information
Figure 11.6: Alaska mosaic warped to Alaska Albers projection
trial and error that the oceans were transparent. When warped, they
turned black. To get around this problem, we used gdal_translate with
a series of -b switches to specify which bands in the image should be
used in the output image. This effectively strips the alpha band. If you
look back at the gdalinfo output for alaska_mosaic.tif , you'll see that it
reported Bands 1 through 3 as red, green, and blue, respectively, as
well as Band 4 as alpha. Once we removed the alpha band, the warp
gives us the expected result.
Warping an image with gdalwarp is a quick and efficient way to change
the coordinate system as opposed to other methods one might use. As
you can see, you have to know a little bit about the data you are working
with in order to be successful in getting the results you want. If you
have more than one image to process and want to combine them, you
can use wildcards with gdalwarp to mosaick them on the fly, creating a
single image in the process.
 
 
 
Search WWH ::




Custom Search