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

Fawcett, David David.Fawcett at state.mn.us
Fri May 16 09:39:19 EDT 2008


Nelson, 

If you know the geographic extent of the image, you could create a world
file for it by hand.  MapServer should recognize it then.  

http://en.wikipedia.org/wiki/World_file

David.

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Nelson
Soto
Sent: Friday, May 16, 2008 8:21 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] using GDAL to display a PNG Raster.


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.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list