AW: [Mapserver-users] Adding an 8-bit raster layer.
Christina Biakowski CCGIS
christina.biakowski at ccgis.de
Tue Jul 22 02:14:59 PDT 2003
Hi Akash,
Mapserver renders images with georeferenced data. In the EXTENT section you
specify the spatial extent of the map in world coordinates.
As gdalinfo shows, your raster image is not georeferenced (have a look at
http://mapserver.gis.umn.edu/doc36/raster-howto.html -georeference with
world files): as Left/right coordinates just the pixel-values are listed and
no world coordinates.
Have at the spatial reference system/coordinates of your shape cntry02 and
create a worldfile for your raster image.
I hope this helps,
Christina
-----Ursprüngliche Nachricht-----
Von: mapserver-users-admin at lists.gis.umn.edu
[mailto:mapserver-users-admin at lists.gis.umn.edu]Im Auftrag von Sharma,
Akash
Gesendet: Dienstag, 21. Januar 2003 04:23
An: mapserver-users at lists.gis.umn.edu
Betreff: [Mapserver-users] Adding an 8-bit raster layer.
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 at 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 at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list