###This guide will give you the tools and show you how to download from the OpenStreetMap Overpass API on Windows. These steps were documented while setting up a Windows 7 64-bit machine.###
cURL and Wget are similar utilities to help you download things from the Command Prompt, either one will work - I think cURL might be easier to setup, but depending on your IT restrictions, etc. one or the other might work. You DO NOT need to do both steps A and B, one or the other. But if one method fails, try the other!
-
A - cURL 0. get cURL
- download http://curl.haxx.se/latest.cgi?curl=win64-nossl from your closest mirror
- depending on your operating system version, download and install the appropriate Microsoft Visual C++ Redistributable dll from this webpage http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/the-program-cant-start-becuase-msvcr100dll-is/5c9d301a-2191-4edb-916e-5e4958558090 - - this is because you would get an error message
The Program can't start becuase MSVCR100.dll is missing from your computer. Try reinstalling the program to fix this problem.
without doing so. - to extract curl.exe from the .zip file you downloaded - I open 2 Windows Explorer windows. In one, navigate to
C:\Users\YourUserNameHere\Downloads\curl-7.23.1-win64-nossl.zip
, or wherever you download cURL - in the other, navigate toC:\Users\YourUsernameHere
the drag curl.exe from the 1st window into here (or extract it there). This makes it easy so that when you press the Windows logo button on your keyboard and type "cmd", then pressing enter, you'll have direct access to curl.exe because Command Prompt opens to theC:\Users\YourUsernameHere
path. Typingcurl
and pressing enter should returncurl: try 'curl --help' or 'curl --manual' for more information
You did it! skip the B - Wget section and continue.
-
B - Wget 0. get Wget http://gnuwin32.sourceforge.net/packages/wget.htm
- download the Binaries .zip file and extract to a known location - -
C:\Users\YourUsernameHere\Downloads\wget-1.11.4-1-bin
worked fine for me. - also download the Dependancies .zip file from the same page in step 0 - files in this archive will need to go into the same /bin/ directory where you have wget.exe or else you'll get a
This can't start because LIBEAY32.DLL is missing from your computer. Try reinstalling the program to fix this problem.
error. This webpage explains this step in length if you're having trouble http://www.openmutual.org/2011/08/gnu-wget-missing-libeay32-dll-on-new-install-on-windows/ - You should now be able to navidate to
C:\Users\Intern\Downloads\wget-1.11.4-1-bin\bin
in Windows Explorer, hold Shift and right-click, selectOpen command window here
, typewget
and pressing enter returns some text, with the last line sayingTry 'wget --help' for more options.
You did it! - proceed to the next paragraph.
- download the Binaries .zip file and extract to a known location - -
Once you have cURL or Wget working you can (sheesh!, finally) pass some parameters to the Overpass API to download OpenStreetMap data. Why we like Overpass is because we can download LOTS of data or only certain features or only certain data edited by certain usernames or from a certain date - all kinds of stuff...
Here's an example with cURL: curl -o your_file_name.osm -g http://overpass.osm.rambler.ru/cgi/xapi?*[building=*][bbox=-121.34792,34.89752,-119.47262,35.79522][@meta]
sometimes these servers go down, you may need to hit the other server: http://www.overpass-api.de/api/xapi?*[building=*][bbox=-121.34792,34.89752,-119.47262,35.79522][@meta]
https://gist.github.com/2853949
The same thing with Wget: wget -O your_file_name.osm http://overpass.osm.rambler.ru/cgi/xapi?way[building=*][bbox=-121.34792,34.89752,-119.47262,35.79522][@newer=2012-07-01T00:00:00Z][@meta]
https://gist.github.com/3035057
Copy either of those commands - maybe helpful to simply click 'raw' from those pages and paste into Command Promt by right-clicking, Paste.
Remember you can customize the parameters you throw at Overpass - I find this page most helpful for that http://wiki.openstreetmap.org/wiki/Overpass_API/XAPI_Compatibility_Layer#Meta_Data
You can find Causes and Solutions for,
The Program can't start because MSVCR100.dll is missing from your computer.
Try reinstalling the program to fix this problem.
at here