Overriding GeoTIFF projection with world file

Rahkonen Jukka Jukka.Rahkonen at MMMTIKE.FI
Thu Feb 7 10:25:35 EST 2008


Frank Warmerdam wrote

> Rahkonen Jukka wrote:
> > Frank,
> > 
> > I have been considerering the situation and yes, I think I would 
> > *really* like to use this trick if it exists.  In general, 
> wouldn't it 
> > make at least some sense to first check something that is fast and 
> > simple to edit or rename or delete if needed (world file in this 
> > case), and not something like GeoTIFF tags which are much 
> more hard and expensive to handle?
> 
> Jukka,
> 
> No, I don't agree.  The GeoTIFF tags are already being read 
> as the TIFF directory is read, and so access to them is 
> essentially free.  Looking for the world files requires an 
> extra operating system open attempt (or several for the 
> various possible extensions) which are at least moderately 
> expensive.  And world files can occasionally end up being 
> applied to the wrong file.  For instance a directory with 
> abc.png, abc.tif and abc.wld - it is hard to know which image 
> file the .wld was intended to apply to.

> However, I'm willing to add a mechanism to override the 
> default behavior.
> There are a couple approaches.  One is to handle this in 
> MapServer in the msGetGDALGeoTransform() function and it 
> would likely be based on a layer level PROCESSING option. The 
> other approach is to do it in GDAL's GeoTIFF driver and based 
> on a configuration option (normally an environment variable 
> though these can also be set in .map files with a CONFIG line).
> 
> The benefit of doing it in GDAL is that it applies to all 
> GDAL apps.  The downside is that it only applies to GeoTIFF files.
> 
> Note, in any event, I expect this change will only go into 
> the development version (trunk) of either GDAL or MapServer.  
> I trust you are ok with building from source or something like that?

Hi Frank,

Sorry, I did not mean heavy from the computitional point of view.
I meant that if there is something wrong with the geoinfo then 
it is easier for the user to edit worldfiles. Or perhaps there
are more user friendly tools for playing  with GeoTIFF tags 
than the 'write out with listgeo - edit - make copy with geotifcp'
way?

For me the Mapserver PROCESSING option might be better, but the 
other one is OK as well. And if this feature won't find it's way 
even to FWTools package then I will find somebody to build it for
me.

I have to say that I did not get 100 percent support from my
boss for the process that envolves employing some woodoo man to 
take source from the place called trunk and build something
special from that, in order to get a secret, undocumented 
processing option as a result. However I still think it will 
be useful for us.

-Jukka-



More information about the mapserver-users mailing list