OpenStreetMap

Download along my own virtual way in Overpass API

Posted by mmd on 12 August 2017 in English (English)

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/qX9

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

Comment from Polyglot on 17 August 2017 at 07:18

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

Jo

Hide this comment

Leave a comment

Parsed with Markdown

  • Headings

    # Heading
    ## Subheading

  • Unordered list

    * First item
    * Second item

  • Ordered list

    1. First item
    2. Second item

  • Link

    [Text](URL)
  • Image

    ![Alt text](URL)

Login to leave a comment