[mapserver-users] Mapserver WMS Reprojection

Rahkonen Jukka jukka.rahkonen at mmmtike.fi
Sun May 19 21:52:49 PDT 2013


Hi,

I do not see obvious error and the 900913 BBOX hit UK somewhere in Scotland so I guess that you have data there. I was thinking that the fake 900913 code is perhaps not included in the EPSG file and you should use EPSG:3785 instead but that case that would propably lead to some error message. Have still a try with 3785, and add DEBUG 5 into your layer setting and see what you get into your MS_ERRORFILE.

-Jukka Rahkonen-


Donald Kerr wrote:

> 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

_______________________________________________
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