OpenStreetMap-Logo OpenStreetMap

Trying Overpass API

Vum SimpleLuke matgedeelt de(n) 13. Abrëll 2015 op English.

I am a college student majoring in cartography and has contributed to OSM for almost a year. And I also exported and used the data in a community extent to make maps for my hometown, campus etc. For large scale data exports, I used to use the free download service provided by GeoFabrik. For example, I tried to make a railway map of China with ArcGIS so I downloaded Chinese section of the database. However it was a waste of resource for the server and waste of time for me when I downloaded data I didn’t need like waterways, buildings.

Recently my teacher asked me to get urban road networks of dozens of cities distributed around the world and I happened to find overpass-turbo. The query wizard is incredibly awesome that I can query with natural language. Really easy to use! However the GUI told me the data may be too large for my explorer to handle. This frustrated me a lot. Yet, I then found the export raw data from Overpass API without visualizing them and finally got what I need. This really saved time and resource to download all the irrelevant features, what’s more, I don’t have to use the OSM API via JOSM to manually download the corresponding administrative boundaries and clip the national or regional data. The API server responded really fast than I expected, after all it’s a great deal of computation to export what I want. Sincere thanks to the overpass API as well as turbo!

As a newbie to overpass, there’s also some questions.

  • Would it be too costly for the server to export an extent of a whole city?
  • Is there any way for me to achieve the same goal with other better methods or less public resource consumption?
Plaz: Faculty of Information Sciences, Wuhan University, 珞南街道, Hongshan District, Wuhan, Hubei, 430079, China
E-Mail-Symbol Bluesky-Symbol Facebook-Symbol LinkedIn-Symbol Mastodon-Symbol Telegram-Symbol X-Symbol

Diskussioun

Bemierkung vum Sanderd17 de(n) 13. Abrëll 2015 um 18:35 Auer

  1. A city is usually no problem. As mentioned in the introduction ( osm.wiki/Overpass_API#Introduction ), you can safely download 5 GB per day without harming the service for others.

  2. You can install your own overpass service if you really like, and keep it updated with the minutely diffs. This may be overdoing it if it’s only for your personal use. But if f.e. the complete University campus wants to get big data from Overpass regularly, then you might invest in setting up your own overpass server for your campus. Apart from that, you have the geographic extracts (like Geofabrik you mentioned). And of course, using the main Overpass server is usually no problem.

Bemierkung vum aseerel4c26 de(n) 13. Abrëll 2015 um 21:20 Auer

generally https://help.openstreetmap.org/ is a better place for such questions. you will find many already answered: https://help.openstreetmap.org/tags/?q=overpass (click on one of those and then maybe sort the list by “most voted”)

Bemierkung vum aseerel4c26 de(n) 13. Abrëll 2015 um 21:24 Auer

…. or may be a better place, because other users with the same question in the future could find the answer without the need to ask again

Bemierkung vum SimpleLuke de(n) 14. Abrëll 2015 um 01:12 Auer

Thank you, @Sanderd17 and @aseerel4c26. Then I’d be at ease using the service. I’ve heard about the help forum before but seldom use it. I write this in diary because I think this diary is mainly for a record of my own osm experience, which is not merely a technical inquery. I would try the help forum when I have pure technical problems next time.

Bemierkung vum Nakaner de(n) 14. Abrëll 2015 um 21:35 Auer

The combination of osmconvert and osmfilter (see OSM Wiki) might be a alternative at some use cases, especially if you need data of larger regions (counties, countries, …). You can download the raw data which is the input for osmfilter and osmconvert at download.geofabrik.de. I suggest PBF format.

Aloggen fir eng Bemierkung ze schreiwen