bfraser at GEOANALYTIC.COM
Mon Jan 30 22:35:55 EST 2006
> I'm new to mapsever, but have been able to get the demo code to run and
> have further been able to read data from a PostgreSQL database to
> display shapes, lines, etc.
> I want to be able to add a raster layer as the first layer to my map.
> I'm stuck though.
> My map file is as follows:
> # Start of map file
> NAME TESTMAP
> STATUS ON
> SIZE 600 600
> EXTENT 0 0 125 125
> UNITS METERS
> SHAPEPATH "data"
> IMAGECOLOR 0 0 0
> TEMPLATEPATTERN "test"
> IMAGETYPE PNG24
> # Start of web interface definition (including WMS enabling metadata)
> NAME "Terrain"
> TYPE RASTER
> STATUS ON
> DATA "../graphics/testing_29_28.png"
> DEBUG ON
> 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).
> OS is WinXP with IIS running.
> Installation of mapserver was from HOBU's Kitchen sink download. I
> would not at all be suprised if I am missing something from my
> Bryce Bangerter
Most likely the problem is with coordinates. The units of the EXTENT
are the map projection units (e.g. feet, meters, degrees, etc depending
on your projection). Have a look at Pericles' tutorial at
And don't forget to make sure that your input raster is "geo-referenced".
And if your desired output projection is not the same as your input data
projection, you will need to add a definition for each in the map file.
More information about the mapserver-users