[Mapserver-users] Geo TIFFs

Jason M. Nielsen jnielsen at aero-graphics.com
Tue Jan 20 13:54:17 EST 2004


Quoting Frank Warmerdam <warmerdam at pobox.com>:

> 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,

Looks like I had a permission issue. Strange that it did not error out and tell
me it could not access the file. Seems to have always done that before. The file
was 440 and owned by root and group root. Anyhow I just changed its owner/group
and presto.  I could have sworn I looked at the permissions a dozen times.
Perhaps I mistakenly changed them when I was duplicating the directory so I
could always resort back to pervious versions of changes I had made. In either
case it was a PEBCAK.  Appreciate the help.

Thanks, Jason. 




-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/



More information about the mapserver-users mailing list