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 have been able to request a specific tile with my xml through gdal lib. However, is there is another way of requesting the tiles from a web server without using xml ?

i wanna do it directly through my c++ code. i will appreciate any directions or examples.

thanks in advance;

share|improve this question
add comment

1 Answer

You can do it through using any HTTP library. You first need to call GetCapabilities on the source URL:

http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?service=WMS&request=GetCapabilities&version=1.3.0

Which will give you a standard XML file (which will conform to a schema such as WMS) with information about layers, formats supported, and so on, which you'll need to parse. Then for the layers and areas you're interested in, you need to call GetMap:

http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,Symbolizer&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE

Which will give you the data in the format you requested as either a POST response, or possibly a download URL.

The details of how to do all this would best be asked on the main StackOverflow site.

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.