[Mapserver-users] how to creat reference map?

Dylan Keon keon at nacse.org
Wed May 21 11:36:52 EDT 2003


Thorsten Fischer wrote:
> On Tue, 2003-05-20 at 01:18, pond bear wrote:
> 
>>I have to a geotiff raster file and a shape file. I want to creat a small 
>>reference map for them. how to do it?
>>Thanks  a lot.
> 
> 
> 1. include your data in a standard cgi mapserver application
> 
> 2. zoom/pan to the area that you want to serve as a reference map. You
> probably want to use a very small map, like 150x150 pixels for example.
> 
> 3. take the values for [imgext]/[mapext] from the page in your web
> browser. that's the actual extent for the current image.
> 
> 4. save the map image. you can now use this as your reference map.

What I do is create a minimal mapfile containing just the layers I want 
visible in the reference map.  I use the same EXTENT as my regular 
mapfile, but make the SIZE small (like 150x150).

Run shp2img against that mapfile, and you'll end up with a great 
reference map image.  For example:  shp2img -m foo.map -o refmap.png

--Dylan




More information about the mapserver-users mailing list