RT90 in input data and WGS84 in output
Tommy Persson
tpe at IDA.LIU.SE
Thu Jun 22 11:42:41 PDT 2006
I have just started to use mapserver and have problem getting it to
work setting up a WMS server. My input data is GeoTIFF tiles in RT90
coordinate system (epsg:2400) and I would like to be able ask for the
map using WGS84 coordinates. The result is that when I ask for an
area in WGS84 the image is translated approximately 100 meter
east/west and 10 meters north/south. To test this I created the map
file below and the used:
<li><a href="http://porter/cgi-bin/mapserv?map=test.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=circles&STYLES=&SRS=EPSG:4326&BBOX=13.468145,55.721954,13.474291,55.725665&WIDTH=400&HEIGHT=400&FORMAT=image/jpeg">TEST WGS84</a></li>
<li><a href="http://porter/cgi-bin/mapserv?map=test.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=circles&STYLES=&SRS=EPSG:2400&BBOX=1353149.989085,6179449.949519,1353549.986932,6179849.988875&WIDTH=400&HEIGHT=400&FORMAT=image/jpeg">TEST RT90</a></li>
to access the data and the translation is obvious (and I have checked
the translation between WGS84 and RT90 in the URL:s above and it seems
to be correct). Any ides of how to fix this? Any obvious errors in
the file below?
Mapfile test.map:
MAP
NAME TestWMS
STATUS ON
SIZE 400 400
SYMBOLSET examples.sym
EXTENT 1352800.0 6179200.0 1353900.0 6180100.0
UNITS METERS
IMAGECOLOR 255 255 255
WEB
IMAGEPATH "/var/tmp/"
IMAGEURL "/var/tmp/"
METADATA
"wms_title" "GMap WMS Demo Server" ## REQUIRED
"wms_onlineresource" "http://porter.ida.liu.se/cgi-bin/mapserv?map=test.map&" ## Recommended
"wms_srs" "EPSG:2400 EPSG:4326" ## Recommended
END
END
PROJECTION
"init=epsg:2400" # rt90
END
LAYER
NAME "circles"
METADATA
"wms_title" "cirles" ## REQUIRED
END
PROJECTION
"init=epsg:2400" # rt90
END
STATUS DEFAULT
TYPE POINT
FEATURE
POINTS 1353350 6179650 END
POINTS 1353330 6179650 END
POINTS 1353300 6179600 END
POINTS 1353400 6179700 END
POINTS 1353310 6179610 END # 10-changed
POINTS 1353390 6179690 END # 10-changed
POINTS 1353310 6179690 END # 10-changed
POINTS 1353390 6179610 END # 10-changed
END
CLASS
SYMBOL 'circle'
COLOR 255 0 0
BACKGROUNDCOLOR 255 255 255
SIZE 10
END
DUMP TRUE ## REQUIRED
END
END # Map File
--
/Tommy Persson
More information about the MapServer-users
mailing list