OpenStreetMap 로고 OpenStreetMap

Download along my own virtual way in Overpass API

mmd님이 English로 2017년 8월 12일에 게시함. 최근 2018년 5월 2일에 업데이트됨.

THIS FEATURE IS NOW OFFICIALLY AVAILABLE IN OVERPASS API 0.7.55

Again a bit of prototyping today.

I always wondered what the best way to download all objects along some GPX track (more generally a list of lat/lon pairs) in Overpass API might be.

Usually, you don’t want to create some complex poly-filter for this, or even worse upload your gpx track as OSM way just for the sake of finding out what’s close by.

You might have come across the around filter, which comes in handy to find objects around a center point. I have extended this idea a bit to also handle linestrings.

Here’s a first result: a turquoise circle in the middle is our great made up GPX track, consisting of about 20 points. All the yellow stuff in the background is what Overpass API returned as highways up to 500m away from our circle. Obviously, that circle doesn’t exist in OSM, so we’re really looking at what’s close to our virtual way.

Circle

Image

Live demo: http://overpass-turbo.eu/s/yt2

Road trip

Imagine you want to create a map with only minimum features (motorways, some important nodes), and some place names along your own lat/lon pairs. Here’s an example for such a trip from Frankfurt to Basel, downloaded as 10MB PBF file, processed via osm2pgsql and rendered by Kosmtik:

Image 2

Live demo: http://overpass-turbo.eu/s/qXI

Github issue: https://github.com/drolbr/Overpass-API/issues/418

이메일 아이콘 Bluesky 아이콘 Facebook 아이콘 LinkedIn 아이콘 마스토돈 아이콘 텔레그램 아이콘 X 아이콘

토론

2017년 8월 17일 07:18Polyglot님의 의견

It would be stupendous if that could be integrated into JOSM.

Jo

2017년 8월 18일 12:09mmd님의 의견

Well, I guess this needs to be merged into the official Overpass API branch first. So far, this is only in my own personal branch and not part of the official release.

2017년 8월 18일 22:01santamariense님의 의견

Perfect to download objects for mapping bus lines.

2017년 8월 20일 10:55Multigon님의 의견

https://josm.openstreetmap.de/wiki/Help/Menu/GPXLayer

@Polyglot: JOSM does support this for a long time, although the online help spares out a separate page about the download action.

2017년 8월 20일 11:00mmd님의 의견

JOSM indeed supports downloading along a gpx track, but it would do so by downloading all data in a number of smaller bboxes rather than the data you’re only interested in.

2017년 8월 21일 07:18Multigon님의 의견

I did not post it to diminish your work, just to update Polyglot.

Personally I’ve used overpass-turbo to remote control and import data into JOSM, which worked marvelously, as long as the metadata is included. My guess is that this will continue to work with your update to overpass api, so the need to duplicate this functionality in JOSM is weak.

댓글을 남기려면 로그인하세요