Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to figure out how to query a WMS server by using latitude/longitude coordinates. The reason is I'm trying to create an iPhone application and overlay custom tiles with data from the WMS server.

In the iPhone world I can only operate on latitude and longitude and as far as I know, this is the equivalent of EPSG:900913 / EPSG:3857 system.

Now the WMS server examples only lists coordinates in EPSG:32633.

Example url:

http://openwms.statkart.no/skwms1/wms.toporaster2?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&SRS=EPSG:32633&BBOX=196436.79,6685163.95,203635.21,6690907.58&LAYERS=topografiskraster&STYLES=&WIDTH=762&HEIGHT=608&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=FALSE

After hours of searching on Google, I realize I must be missing something!

  1. Can I query the WMS by using latitude/longitude?
  2. How can I convert between EPSG:32633 and the iPhone format (latitude/longitude) EPSG: 3587?

Any help is appreciated!

share|improve this question
add comment

1 Answer

Latitude and Longitude can be in many projections, however in the case of the iPhone (and any other mobile device for that matter) it is most likely WGS84 coming from the device's GPS and would therefore be EPSG:4326. EPSG:900913 and EPSG:3857 are both Web Spherical Mercator projections and are based on metres and not degrees.

Ordinarily you would need to transform the coordinates using something like Proj4. However, in your case the WMS you are targeting will support requests for data in EPSG:4326 so you will be able to make the request without having to transform your coordinates. This can be seen in the response to a GetCapabilities request to that server. The XML response provides all the details you need to know how to connect to the server and request data.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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