[Mapserver-users] Geotiff and Extent confusion

Michael Hughes mike at probass.com
Wed Dec 24 14:56:37 EST 2003


I hate posting this because I see the same question posted again and 
again in the list.  Unfortunately there are no real answers on the list 
or the wiki, so here it goes again.

I have installed mapserver 4.01 and verified that it works via the 
demo.  I have downloaded a USGS GeoTiff file from topozone and the 
associated tfw file.  I adjusted my map file to attempt to load the tif 
file instead of the pngs created for the demo.  Of course I cannot get 
the darned thing to display.  I am sure that the problem lies in the 
extent settings.  I am just not smart enought to fix it yet.  The values 
provided by gdalinfo do not match the values provided in the tfw file 
just to add to my confusion.  I am trying to simply display the image 
with the mapping server, without adding overlays or anything else at 
this point.  I am sure that it is simply a newbie mistake that is 
keeping me from displaying the image successfully, hopefully someone can 
help me out.  I have provided all of the information that I think is 
applicable below.

Michael Hughes


./mapserv -v
MapServer version 4.0.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ 
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT INPUT=TIFF 
INPUT=EPPL7 INPUT=JPEG INPUT=GDAL INPUT=SHAPEFILE

cat  o34084b1.wld
2.438400000000
0.000000000000
0.000000000000
-2.438400000000
763785.222415230000
3794653.234146172600

/usr/local/bin/gdalinfo o34084b1.tif
Driver: GTiff/GeoTIFF
Size is 5717, 6933
Coordinate System is `'
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 6933.0)
Upper Right ( 5717.0,    0.0)
Lower Right ( 5717.0, 6933.0)
Center      ( 2858.5, 3466.5)
Band 1 Block=5717x6933 Type=Byte, ColorInterp=Palette
 Color Table (RGB with 256 entries)
   0: 0,0,0,255
   1: 255,255,255,255
   2: 0,151,164,255
<...snip...>

cat o34084b1.map
NAME  BufordDam
SIZE 600 600
EXTENT 763785.22241523 3794653.23414617 777725.55521523 3777747.80694617
SHAPEPATH "/var/www/html/maps/"
DEBUG on

WEB
 LOG "/tmp/buforddam.log"
 HEADER BufordDam_header.html
 TEMPLATE BufordDam.html
 FOOTER BufordDam_footer.html
 MINSCALE 1000
 MAXSCALE 1550000
 IMAGEPATH "/var/www/html/maps/images/"
 IMAGEURL "/maps/images/"
END

LAYER
 NAME "BufordDam"
 DATA o34084b1.tif
 TYPE raster
 STATUS DEFAULT
END #END OF LAYER
END # Map File




More information about the mapserver-users mailing list