[Mapserver-users] Geo TIFFs

Frank Warmerdam warmerdam at pobox.com
Mon Jan 19 10:44:18 EST 2004


Jason M. Nielsen wrote:
> Now INPUT=TIFF is gone as I presume it should be since GDAL will be being used?

Sounds good.

> Samething still occures. No errors. Image just simply does not display.
> 
> [root at vad3rZIM data]# gdalinfo top10c0.tif
> Driver: GTiff/GeoTIFF
> Size is 3854, 3773
> Coordinate System is `'
> Origin = (1512385.000000,7356162.500000)
> Pixel Size = (10.000000,-10.000000)
> Metadata:
>   TIFFTAG_SOFTWARE=Adobe Photoshop 7.0
>   TIFFTAG_DATETIME=2004:01:14 09:03:52
> Corner Coordinates:
> Upper Left  ( 1512385.000, 7356162.500) 
> Lower Left  ( 1512385.000, 7318432.500) 
> Upper Right ( 1550925.000, 7356162.500) 
> Lower Right ( 1550925.000, 7318432.500) 
> Center      ( 1531655.000, 7337297.500) 
> Band 1 Block=3854x2 Type=Byte, ColorInterp=Red
> Band 2 Block=3854x2 Type=Byte, ColorInterp=Green
> Band 3 Block=3854x2 Type=Byte, ColorInterp=Blue

The first conclusion I leap to is that your map extents are wrong with regard
to the raster file.  If you want further help it would be best to supply your
complete mapfile, or a minimal complete mapfile that demonstrates your problem.
I would also encourage you to run the mapfile through "shp2img" with as much
debugging turned on as possible.

eg.
$ export CPL_DEBUG=ON
$ shp2img -all_debug 1 -m input.map -o output.png

> BTW, while Im on the subject and have the gdal info up here. I do not recall
> seeing anyplace where I can directly reference this "Metadata:" section in the
> TIFF. Is this possible through mapserv directly or would a script of the like
> need to be written (ie: perl, php, python etc) that made use of the likes of
> gdal_info to extract said information?

The metadata provided by GDAL is not trivially usable within MapServer.  However,
it is accessable via the C/C++ and Python APIs for GDAL (perhaps the PHP bindings
too? Though I think they may only exist for OGR, not GDAL).  You could also
run gdalinfo externally and parse the output but thats kind of a clumsy solution.

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    | Geospatial Programmer for Rent





More information about the mapserver-users mailing list