Help with TIFFTAGs resolutions

Gambin Dejan Dejan.Gambin at PULA.HR
Thu Jul 12 08:33:00 EDT 2007


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":

gdalinfo first.tif->

Driver: GTiff/GeoTIFF
Size is 2812, 3750
Coordinate System is `'
Origin = (5405500.000000000000000,4980000.000000000000000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Metadata:
  TIFFTAG_XRESOLUTION=45
  TIFFTAG_YRESOLUTION=45
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Corner Coordinates:
Upper Left  ( 5405500.000, 4980000.000)
Lower Left  ( 5405500.000, 4978125.000)
Upper Right ( 5406906.000, 4980000.000)
Lower Right ( 5406906.000, 4978125.000)
Center      ( 5406203.000, 4979062.500)
Band 1 Block=2812x1 Type=Byte, ColorInterp=Red
Band 2 Block=2812x1 Type=Byte, ColorInterp=Green
Band 3 Block=2812x1 Type=Byte, ColorInterp=Blue

gdalinfo second.tif:

Driver: GTiff/GeoTIFF
Size is 2812, 3750
Coordinate System is `'
Origin = (5407750.000000000000000,4980000.000000000000000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Metadata:
  TIFFTAG_XRESOLUTION=45
  TIFFTAG_YRESOLUTION=45
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Corner Coordinates:
Upper Left  ( 5407750.000, 4980000.000)
Lower Left  ( 5407750.000, 4978125.000)
Upper Right ( 5409156.000, 4980000.000)
Lower Right ( 5409156.000, 4978125.000)
Center      ( 5408453.000, 4979062.500)
Band 1 Block=2812x1 Type=Byte, ColorInterp=Red
Band 2 Block=2812x1 Type=Byte, ColorInterp=Green
Band 3 Block=2812x1 Type=Byte, ColorInterp=Blue

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?

I would appreciate any information,

Thanks very much

regards, dejan



More information about the mapserver-users mailing list