[Mapserver-users] how to creat reference map?
Thorsten Fischer
thfischer at mapmedia.de
Wed May 21 15:52:26 PDT 2003
On Wed, 2003-05-21 at 17:36, Dylan Keon wrote:
> 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
This will most likely be error-prone.
Consider you have such an EXTENT entry in your mapfile:
EXTENT 5.0 5.0 10.0 15.0
Now you set your SIZE as this:
SIZE 150 150
As you can see, the ratio of the extents is 1:2, while the ratio of your
image size is 1:1. The image will be padded, and most of all, the EXTENT
in your mapfile will not be the extent of the resulting image. That's
why I suggested to read the [imgext]/[mapext] in an cgi application for
the actual value of the resulting map image.
hth,
thorsten
More information about the MapServer-users
mailing list