-1

How can I convert this XML from EPSG::-27700 to EPSG::4326?

http://metaspatial.net/cgi-bin/ogc-wms.xml?VERSION=1.3.0&REQUEST=GetMap&SERVICE=WMS&LAYERS=DTM,Overview,Raster_250K,Topography,nationalparks,Infrastructure,Places&STYLES=,,,,,,&CRS=EPSG:27700&BBOX=424735.97883597884,96026.98412698413,467064.02116402116,127773.01587301587&WIDTH=400&HEIGHT=300&FORMAT=image/png&BGCOLOR=0xffffff&TRANSPARENT=TRUE&

2

First check that the WMS you are consuming supports the projection you want to use by issuing a GetCapabilities request, in this case like:

http://metaspatial.net/cgi-bin/ogc-wms.xml?VERSION=1.3.0&REQUEST=GetCapabilities&SERVICE=WMS&

We can see that the service supports the following CRS:

<CRS>EPSG:4326</CRS> <CRS>EPSG:27700</CRS> <CRS>EPSG:4258</CRS> <CRS>EPSG:29903</CRS> <CRS>EPSG:2157</CRS> <CRS>EPSG:3035</CRS> <CRS>EPSG:4937</CRS> <CRS>EPSG:3034</CRS> <CRS>EPSG:4936</CRS> <CRS>EPSG:3038</CRS> <CRS>EPSG:3039</CRS> <CRS>EPSG:3040</CRS> <CRS>EPSG:3041</CRS> <CRS>EPSG:3042</CRS> <CRS>EPSG:3043</CRS> <CRS>EPSG:3044</CRS> <CRS>EPSG:3045</CRS> <CRS>EPSG:3046</CRS> <CRS>EPSG:3047</CRS> <CRS>EPSG:3048</CRS> <CRS>EPSG:3049</CRS> <CRS>EPSG:3050</CRS> <CRS>EPSG:3051</CRS> <CRS>EPSG:900913</CRS>

Then issue a GetMap request specifying the CRS you want CRS=EPSG:4326& and the bounding box you need in those coordinates, for example like:

http://metaspatial.net/cgi-bin/ogc-wms.xml?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=52.97701162003504294,-3.226702304964539358,55.26821673989402939,-0.9489590248226960068&CRS=EPSG:4326&WIDTH=846&HEIGHT=851&LAYERS=OGC-WMS_reference-server_with_OrdnanceSurvey-OpenSpace-data&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE&

Gives: GetMap result

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.