Raster Images

Frank Warmerdam warmerdam at POBOX.COM
Mon Jan 30 22:15:26 EST 2006


On 1/30/06, Bryce Bangerter <bryceb at tulgagames.com> wrote:
>   LAYER
>     NAME "Terrain"
>     TYPE RASTER
>     STATUS ON
>     DATA "../graphics/testing_29_28.png"
>     DEBUG ON
>   END
>
> END # MAPFILE
>
> Debug doesn't output any errors.
> testing_29_28.png is a 24 bit image that is 125x125 pixels.
>
> All I get back though is a black image (e.g my background image color).

Bryce,

Some things to check:
 o Try an absolute path to the png file.  Sometimes the
     relative paths work in surprising ways.
 o Verify the extents of your raster overlap your map.
 o Try with LAYER status set to DEFAULT.

But in your case, I think the problem is that you have no world
file for you png file.  While the default coordinates will be in the
range 0-125 and 0-125, it will be considered "upside down" by
GDAL and for that reason mapserver might not plot it.  Try creating
a world file called testing_29_28.wld that contains six lines:

1
0
0
-1
0.5
124.5

Good luck,
--
---------------------------------------+--------------------------------------
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