[Mapserver-users] Adding an 8-bit raster layer.
Sharma, Akash
sharmaak@cs.orst.edu
Mon, 20 Jan 2003 19:22:41 -0800
Hi everyone,
I recently started using Mapserver and am new to the list so please forgive
me if I miss out on some technical details.
I have been trying to add a separate raster layer by using a 8-bit .raw
file. For this I first convert this raw file to 8-bit TIFF file using
raw2tiff program available with the libtiff library. Then I use
gdal_translate to convert it to GTiff. The information that I get using
gdalinfo is as shown below:
[root@Yachats a05]# gdalinfo rlayer.tif
Driver: GTiff/GeoTIFF
Size is 2160, 1080
Coordinate System is `'
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 1080.0)
Upper Right ( 2160.0, 0.0)
Lower Right ( 2160.0, 1080.0)
Center ( 1080.0, 540.0)
Band 1 Block=2160x3 Type=Byte, ColorInterp=Gray
Pleaes note that the .raw file is 2160 x 1080 pixels (Bytes).
Then I use the following mapfile to add a layer. Although it shows the
extent of the image in the browser but the layer is not displayed. I would
like to add here that I have been able to open the Tiff file on Irfanview
and MS Photoeditor and it shows up fine like the way I wanted it to be.
The mapfile listing is as below:
NAME FIRSTMAP
SIZE 600 300
STATUS ON
SYMBOLSET "/apps/web/ms_apps/symbols/symbols35.sym"
EXTENT 0.0 0.0 2160.0 1080.0
UNITS METERS
SHAPEPATH "/home/cs540S03/
WEB
IMAGEPATH "/apps/web/ms_output/"
IMAGEURL "/ms_output/"
END
LAYER
NAME "ecoregion"
DATA "/gisdata/GED_datasets/a05/rlayer.tif"
STATUS DEFAULT
TYPE RASTER
OFFSITE 0
END
LAYER
NAME world
TYPE POLYGON
STATUS ON
DATA cntry02
CLASS
COLOR 255 255 255
OUTLINECOLOR 200 200 200
END
END
END
Am I doing anything wrong here?? I would be grateful if someone could let me
know what needs to be done.
Also I tried changing the Upper Left and Lower right coordinates of the tiff
file using "gdalwarp" but it gave me some error. It would be great if
someone could give a specific example on how to use gdalwarp.
Thanks
Akash Sharma
M.S. (CS &IME)
Oregon State University
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users