Raster Layer Doubt

Frank Warmerdam warmerdam at POBOX.COM
Sun Feb 19 12:54:29 EST 2006


Apeksha Bhambhani wrote:
> Hi all ,
> We have developed a web-mapping application . Our mapping application 
> uses Mapserver , Php/Mapscript as the scripitng language and MySql as 
> the database.And this application accepts user clicks and allows the 
> user to edit the map : adding points, etc.
> Now for this map , we require a base map - which is a raster layer .
> We have tried editing the mapfile as follows:
> 
> LAYER
> NAME "base"
> TYPE raster
> DATA "india.tif"
> END
> 
> But this is of no help. The tiff file resides in the shapefiles directory .
> We want to include this raster image as our base map. Is this the right 
> way or is there any other way?

Apeksha,

First, you might want to experiment with a full absolute path to the
raster file, to see if file paths are the issue.

Second, the most common problem in such situations is that the extents
of the file are not overlapping the extents of the map.  You might want
to check the file with "gdalinfo" to see what extents gdalinfo is
getting.

Keep in mind that without a PROJECTION block the raster is assumed to be
in the same coordinate system as the map, so don't assume reprojection will
be happening.

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