NODATA values and TRANSPARENCY Question
Stephen Woodbridge
woodbri at SWOODBRIDGE.COM
Sat Dec 30 17:25:21 PST 2006
Hi and Season Greetings to all,
I'm playing around with GDAL and raster images for the first time in
about 4 years and I have some questions about how NODATA values are handled.
I generated some hillshade GeoTiff images and added overviews to them
ans generated a tile-index and the mapfile is basically working, EXCEPT
the NODATA areas don't make any sense to me. They seem to be generating
some type of image where I would expect them to be totally transparent
BECAUSE they is NODATA.
Also any ideas what the large lakes, the Great Lakes and the Oceans are
handled differently? The hillshade was create from srtm dems.
-Steve
The mapserver image:
http://imaptools.com/cgi-bin/mapserv-4.10?mode=map&layers=all&scale=39000001&map=/u/data/dem/hillshade.map&mapxy=-122+42
notice the dark blue areas in the Oceans adjacent to the land masses.
The mapfile:
MAP
NAME "Hillshade"
EXTENT -180 -90 180 90
SIZE 600 300
IMAGETYPE png
# TRANSPARENT on
IMAGECOLOR 0 0 255
SHAPEPATH "/u/data/dem/"
UNITS DD
LAYER
NAME "Countries"
TYPE POLYGON
DATA "/u/data/data/mdata/world/world_countries_shp"
STATUS DEFAULT
CLASS
COLOR 255 255 255
OUTLINECOLOR 255 255 0
END
END
LAYER
NAME "Hillshade"
TYPE RASTER
TILEINDEX "/u/data/dem/hillshade-index"
TRANSPARENCY 35
STATUS DEFAULT
CLASS
COLOR 0 0 0
MAXSCALE 40000000
MINSCALE 80000
END
END
LAYER
NAME "Hillshade"
TYPE RASTER
TILEINDEX "/u/data/dem/hillshade-index"
TRANSPARENCY 10
STATUS DEFAULT
CLASS
COLOR 0 0 0
MAXSCALE 80000
MINSCALE 40000
END
END
END
The gdalinfo:
woodbri at carto:/u/data/dem$ gdalinfo z_10_1t.tif
Driver: GTiff/GeoTIFF
Size is 6000, 6000
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.2572235630016,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (-135.000000,60.000000)
Pixel Size = (0.00083333,-0.00083333)
Corner Coordinates:
Upper Left (-135.0000000, 60.0000000) (135d 0'0.00"W, 60d 0'0.00"N)
Lower Left (-135.0000000, 55.0000000) (135d 0'0.00"W, 55d 0'0.00"N)
Upper Right (-130.0000000, 60.0000000) (130d 0'0.00"W, 60d 0'0.00"N)
Lower Right (-130.0000000, 55.0000000) (130d 0'0.00"W, 55d 0'0.00"N)
Center (-132.5000000, 57.5000000) (132d30'0.00"W, 57d30'0.00"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Gray
NoData Value=-32768
Overviews: 3000x3000, 1500x1500, 750x750, 375x375, 188x188, 94x94, 47x47
More information about the MapServer-users
mailing list