Problem displaying tif (works with FWTools)

Frank Warmerdam fwarmerdam at GMAIL.COM
Thu May 19 12:42:29 PDT 2005


On 5/19/05, Travis Kirstine GIS Tech <tkirstine at jdbarnes.com> wrote:
> Hi,
> I'm trying to display a tif image in mapserver but am encountering a
> problem, the tif is visable but is blank (white square).  I created the
> images in ArcGis 9.0 as ESRI grids and exported them as tif's.  When I
> export the grid and a RGB tif it works fine in mapserver however, if I
> export the image just as a tif the image is blank but it works fine if I
> load the image in FWTools.  The reason I a basic tif and not a RGB image is
> that I'm trying to preserve the elevation data in the raster image
> 
> Here is a sample of my mapfile and the tiffs are already georeferanced.  I'm
> running mapserver 4.X and have GDAL
> 
> 
> This image displays fine
> #<<<<<<<<<<<<<<<<<<<---RGB raster----->>>>>>>>>>>>>>>
>         LAYER
>                 NAME tif_rgb
>                 STATUS ON
>                 DATA map_app_data/dem_tiffs/test_rgb.tif
>                 TYPE RASTER
>                         METADATA
>                                 DESCRIPTION "DEM tiff RGB"
>                         END
>                         MINSCALE 500
>                 MAXSCALE 100000
>                 TRANSPARENCY 50
>         END
> 
> This image displays blank
> #<<<<<<<<<<<<<<<<<<<---elevation raster----->>>>>>>>>>>>>>>
>         LAYER
>                 NAME tif_dem
>                 STATUS ON
>                 DATA map_app_data/dem_tiffs/test_dem.tif
>                 TYPE RASTER
>                         METADATA
>                                 DESCRIPTION "DEM tiff"
>                         END
>                         MINSCALE 500
>                 MAXSCALE 100000
> 
>         END

Travis, 

For 16bit DEMs you will likely need to do some sort of scaling.
By default all elevations of 255 or above will be drawn as white.

Try adding the following line to your LAYER definition.  If that helps,
you might want to read up on scaling.  I think it is covered in the
raster howto.

  PROCESSING "SCALE=AUTO"

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