Help with TIFFTAGs resolutions

Gambin Dejan Dejan.Gambin at PULA.HR
Thu Jul 12 23:39:31 PDT 2007


Frank,

I have tried changing tfws from 0.5 to 0.8 and the things are displayed
correctly. So it is obvious the world files are not correct. I am little
surprised because the data is provided by National State Geodetic
Administration. I have this data for my town that is correct, tfw files
have the same resolution (0.5) but the size of the images is 4500x6000,
while here the size is 2812x3750 and the TIFFTAG resolution is 72 while
here is 45. That is exactly the same proportion so I am really
interested in what could happen :-))

thanks very much

regards, dejan
 

> -----Original Message-----
> From: UMN MapServer Users List 
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Frank Warmerdam
> Sent: Thursday, July 12, 2007 8:58 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] Help with TIFFTAGs resolutions
> 
> Gambin Dejan wrote:
> > Hi,
> > 
> > I have a situation that I need to understand, I hope 
> someone can help:
> > 
> > I have a number of ortophoto images in tif format (with .tfw files).
> > When I show them on my map they should be spatialy 
> "connected" but the 
> > "empty" space shows between them. Here is the example 
> gdalinfo result 
> > of the two horizontally adjacent images that should be "connected":
> ...
> > Now, I have the similar set of ortophoto images that show correctly 
> > and they come from the same source (the National State Geodetic 
> > Administration). I have compared them and the difference is 
> that this 
> > "correct" images have the size of 4500x6000 (exactly 1.6 
> bigger than 
> > the first one) and their TIFFTAG_XRESOLUTION and 
> TIFFTAG_YRESOLUTION 
> > are 72 (that is 45x1.6).
> > 
> > My question is: who "made the mistake" and what do I have to do to 
> > show them correctly (they are shown correctly from a dwg 
> file that is 
> > referencing them all)? Are the TFW files wrong for this 
> resolution? Do 
> > I have to change the resolution, image size, or what?
> 
> Dejan,
> 
> It is unlikely that the DWG is utilizing the world files 
> (.tfw) at all.
> So if the DWG view is correct it is likely that the world 
> files are wrong.  If you think the origin's in the world 
> files are correct you could try changing the resolution in 
> the world files to 0.8 from 0.5 and see if things are properly placed.
> 
> The TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION are not used 
> for georeferenced placement or scaling by MapServer or other 
> applications.
> 
> BTW, GDAL and MapServer will utilize internal GeoTIFF tags in 
> preference to the world files.  So if there is wrong internal 
> geotiff info it will get used instead of potentially correct 
> worldfiles.  Keep this in mind if the world files don't seem 
> to agree with what gdalinfo is reporting.
> 
> Best regards,
> -- 
> ---------------------------------------+----------------------
> ----------
> ---------------------------------------+------
> I set the clouds in motion - turn up   | Frank Warmerdam, 
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | President OSGeo, 
> http://osgeo.org
> 



More information about the MapServer-users mailing list