[gdal-dev] Telling lies with geotiif metadata

Wendell Turner wendell at enflight.com
Tue Aug 26 09:41:04 EDT 2008


Hello!

I am trying to do something I probably shouldn't ...

I have about 30 geotiffs that tile the continental US (aviation sectional 
charts).  Each of them uses a slightly different projection -- LCC with 
different standard parallels and origins for each chart.

Using gdalwarp, I converted everything to a single projection -- epsg 3395 
-- but the quality suffered (I was never able to get any resampling method 
other than "near" to work properly; the colormaps kept getting screwed up.  
There doesn't seem to be any way to tell gdalwarp "stop trying to make a 
new colormap, just use the old one!")

The result is OK for display on a screen (I have a nifty OpenLayers 
interface to it), but I also need to print good-quality versions. Sometimes 
the prints will need to cross the boundaries between the geotiffs.  These 
prints also need to be at a (nearly) constant scale, which is inconsistent 
with using 3395 anyway, since it is a Mercator projection.

I could warp everything to some other projection (LCC with a single set of 
standard parallels, say) but I am willing to accept a small amount of 
mis-registration at the boundaries between charts if it would save me the 
loss of quality in the warp.  (In fact, people do this with the paper 
charts all the time -- at many airports you'll see multiple charts glued to 
the wall, abutting.  The misregistration is typically less than a few 
millimeters across a four-foot chart.)

[Of course, the misregistration is probably cumulative in some sense; with 
the paper charts one can simply "eyeball" the error and slide the chart so 
as to minimize it.  I'm not sure how to express this mathematically ... ]

So, what I am thinking of doing is to rewrite the geotiff metadata so as to 
simply lie about the projection.  gdal_translate has options called -a_srs 
and -a_ullr that appear to do at least part of what I want.

Is there a "null projection" that I could give to gdal_translate so as to 
not to munge any of the actual pixels?

Is there some better way of re-writing the geotiff metadata than by passing 
it through gdal_translate?

Is this a silly idea that I should receive the cartographic equivalent of 
being disbarred for even suggesting?
-- 

	   Many, many thanks for any insight that you can provide!

		- nick

[ I'm sending this to the list since Nick's email is inop a
the moment.  Wendell ]



More information about the gdal-dev mailing list