[mapserver-users] can't display TIFFs
Dylan Keon
keon at nacse.org
Fri Apr 26 16:33:59 PDT 2002
I fixed the problem. Thanks to Frank, Pushkar, and Tyler for their help.
gdalinfo and my server log both indicated a segmentation fault when I tried
to display tiffs in my application. The problem was that gdal was not
functioning correctly...either libtiff or libgeotiff was not behaving within
gdal.
When I first implemented gdal I tried compiling with the latest versions of
libtiff and libgeotiff (not using gdal's internal support). I couldn't get
it to accept that version of libtiff when compiling, so I configured gdal
with:
--with-libtiff=internal
--with-libgeotiff=/usr/local/src/libgeotiff-1.1.4
This gave no errors during compilation, but did not allow gdal to function
correctly (resulting in the segmentation errors I've been getting). Frank
recommended compiling gdal with internal libtiff AND internal libgeotiff
support, which is the safest approach. However, by that time I had already
tried once again to compile with both newer versions...
--with-libtiff=/usr/local/src/tiff-v3.5.7
--with-libgeotiff=/usr/local/src/libgeotiff-1.1.4
...and this is now working fine! I can display rasters to my heart's
content :-) I don't know why gdal accepted these configure parameters this
particular time, after I had tried seemingly hundreds of other times (ok,
maybe 10 times :-) The only thing I did differently was change the order of
options in my ./configure statement, but I don't know why that would make
any difference.
Anyway, thanks to all for the help. I've been having a lot of fun
experimenting with OFFSITE.
--Dylan
-------------------------------------------------
Original message:
> > I can't seem to get TIFFs to display using MapServer...I get either a
blank
> > page or a "server not found" error. I'm using a modified version of the
> > Europe PHP example (nothing fancy), and I can display shapfiles just
fine,
> > unless the raster layer is included in the mapfile. If I comment out
that
> > raster layer, everything displays fine once again.
> >
> > I've tried three different TIFFs, with no luck. All TIFFs are in the
> > correct projection & datum, are 8 bit images, and display fine with the
> > associated shapefiles in other applications. The TIFFs were created
using
> > the GRIDIMAGE command in ArcInfo, and I renamed the .tfw extension to
.wld
> > (tried it both ways, actually). And it's not a permissions problem.
I've
> > tried both colormap and grayscale images, with no difference. I
followed
> > the "Raster HOWTO" instructions, and the "Converting ArcINFO Grids to
> > Mapserver TIFFs" instructions in the Wiki, but neither helped. Am I
missing
> > a format from GDAL or something? (see below). I compiled
> > Mapserver --without-tiff.
> >
> > Thanks for any help, not sure what to try next.
> >
> > --Dylan
> >
> >
> > =============
> > machine stats
> > =============
> > SuSE 7.3 Linux (on 550MHz PIII box)
> > mapserver 3.5 apache 1.3.22
> > php 4.0.6 gdal 1.1.7
> > gd 1.8.4 libtiff 3.5.7
> > libgeotiff 1.1.4
> >
> > ======================
> > output from mapserv -v
> > ======================
> > > ./mapserv -v
> > MapServer version 3.5 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ
> > SUPPORTS=TTF SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=JPEG INPUT=POSTGIS
> > INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
> >
> > =================================
> > output from gdal-config --formats
> > =================================
> > > ./gdal-config --formats
> > gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 bsb xpm sdts raw dted
mem
> > jdem envisat elas fit vrt usgsdem gif jpeg png grass
> >
> > ==============
> > mapfile sample
> > ==============
> > LAYER
> > NAME testdrg
> > TYPE raster
> > DATA testdrg.tif
> > STATUS on
> > END
> >
> > =========================
> > ArcInfo GRIDIMAGE command
> > =========================
> > Grid: GRIDIMAGE DRG1232 drg1232.clr testdrg TIFF NONE
> > (I've also used the COMPRESSION option, no effect on the problem)
> >
> > ====================
> > output from tiffinfo
> > ====================
> > > tiffinfo testdrg.tif
> > testdrg.tif: Warning, unknown field with tag 33550 (0x830e) ignored.
> > testdrg.tif: Warning, unknown field with tag 33922 (0x8482) ignored.
> > TIFF Directory at offset 0x8
> > Subfile Type: (0 = 0x0)
> > Image Width: 4433 Image Length: 5863
> > Resolution: 0.124, 0.124 (unitless)
> > Bits/Sample: 8
> > Compression Scheme: None
> > Photometric Interpretation: palette color (RGB from colormap)
> > Software: "Arc/Info"
> > Samples/Pixel: 1
> > Rows/Strip: 2
> > Planar Configuration: single image plane
> > Color Map: (present)
More information about the MapServer-users
mailing list