[mapserver-users] using GDAL to display a PNG Raster.

Nelson Soto nellyfromma at gmail.com
Fri May 16 09:20:36 EDT 2008


Hello,

I have a PNG that I would like to use as an overlay for a 2x6 set of
aerial tiles. I just want to use MINSCALE and MAXSCALE to turn one and
the other off and on.

That isn't the problem I'm having.

I can't get the PNG to display. The file itself is fine, but I can not
make a mapfile display the PNG.

I have made a new mapfile that I want to just display the PNG first
before possibly integrating it into the same mapfile as my tileindex.
I know that the PNG is supposed to be georeferenced but I don't know
how to create those files so I would like to use GDAL to output the
PNG as I hear It will simply apply the extents.

Here is what I have:

MAP
	NAME 'overlay'
	SIZE 800 650
	STATUS ON
	EXTENT  201000.000000 874000.000000 213000.000000 882000.000000
	UNITS METERS
	FONTSET '../fonts/fontset.list'
	SYMBOLSET '../symbols/symbol.sym'
	TRANSPARENT OFF
	IMAGETYPE PNG

    OUTPUTFORMAT
        NAME png
        DRIVER "GDAL/PNG"
        MIMETYPE "image/png"
        FORMATOPTION "TARGET=95"
        IMAGEMODE PC256
    END

	QUERYMAP
		STATUS ON
		STYLE SELECTED
	END

	WEB
        INCLUDE "/ms4w/apps/GeoMOOSE/maps_test/web_config.map"
	END

	LEGEND
        STATUS OFF
	END

    LAYER
        NAME "overlay"
        STATUS DEFAULT
        TYPE RASTER
        DATA "overlay.png"
        #MINSCALE 14000
    END


END ## end Map

Also, the PNG is color. I would like my overlay to certainly be in color.

The mapfile and png are in the same dir.


More information about the mapserver-users mailing list