[mapserver-users] Mapserver WMS Reprojection

Donald Kerr donald.kerr at dkerr.co.uk
Sun May 19 12:57:01 PDT 2013


Slight mistake below; the projection definition in the layer is as follows
with "epsg" in lowercase as I am led to believe that it should be so:
"init=epsg:27700"

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Donald Kerr
Sent: 19 May 2013 20:36
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Mapserver WMS Reprojection

Hi List,

I am trying to reproject a WMS request from 27700 (UK Ordnance Survey) to
900913 (OSM OpenStreetMap) without success. There no issue with the map file
map or layer definitions in terms of serving up the WMS in 27700 but
reprojection seems to fail. There appears to be very little online and I
cannot find a solution; hence this request for help or advice.

Relevant parts of map file (some parts removed):

PROJECTION
    "init=epsg:27700"
END

WEB
    METADATA
        "wms_title" "My WMS"
        "wms_onlineresource"  "http://localhost/mapserver/mapserv.asp?"
        "wms_srs" "EPSG:27700  EPSG:900913"
        "wms_enable_request" "*"
        "wms_abstract" "My WMS" 
        "wms_extent" "0 0 670000 1230000"
        "wms_feature_info_mime_type" "text/plain"
        "wms_feature_info_mime_type" "text/html"
        "wms_feature_info_mime_type" "application/vnd.ogc.gml" #
&info_format=application/vnd.ogc.gml
...

Layer:

METADATA
    "wms_title" "CME"
    "wms_extent" "0 0 670000 1230000"
#    "wms_srs" "EPSG:27700 EPSG:900913"
    "wms_include_items" "all" # No spaces
    "gml_include_items" "all" # No spaces
    "gml_featureid" "ID"
END

PROJECTION
    "init=EPSG:27700"
END # PROJECTION

Openlayers request:

http://maps1/cgi-bin/mapserv.exe?MAP=D:\MyMapFile.map&LAYERS=CME&TRANSPARENT
=TRUE&FORMAT=png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3
A900913&BBOX=-484682.60504583,7512726.3043776,-415889.27960147,7547122.96709
97&WIDTH=900&HEIGHT=450

The result is a transparent image with no data showing. :( The same map file
works correctly and serves an image if used with Openlayers and a map on
EPSG 27700 so it's pointing at the reprojection of the BBOX maybe.

What am I doing wrong? Any help greatly appreciated.

Many thanks.

Regards,

Donald

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3336 / Virus Database: 3162/6338 - Release Date: 05/19/13



More information about the mapserver-users mailing list