plepe / OpenStreetBrowser

An application to ‘browse’ the information in the displayed part of the map. Similar to common Wikis and also the main page of http://www.openstreetmap.org the website shows a narrow menu on the left side, most of the page is used for the display of the map. In contrast to most Wikis the menu is not static, but rather the content of the map can be browsed in categories. For the map a special style has been developed (sorry guys, I neither like the default Mapnik nor Osmarender styles), and special overlays are displayed to support the current browsed categories. When you click on an object (either from the list or directly on the map) informations on this object are displayed.
http://www.openstreetbrowser.org
GNU General Public License v3.0
88 stars 20 forks source link

Suggestion: Query within selected boundary #103

Open IgorEliezer opened 5 years ago

IgorEliezer commented 5 years ago

I was at the local university participating in a lecture about OpenStretMap presented by the Brazilian OSM chapter. I seized the opportunity to talk about OpenStreetBrowser -- they didn't know it, they like it -- then I noticed that querying within a boundary would be necessary, but that wasn't possible. So that's my idea:

Say I want query all shops within this suburb. The workflow would be the following:

  1. Menu "Places" > "Administrative Areas"
  2. Click on a boundary.
  3. The boundary pop-up will have the options show details, edit and select to query only here. Click on select to query only here. It gets the relation number 7734528;
  4. All the boundaries are "dehighlighed" while the selected boundary will keep its black outline.
  5. Now menu "Leisure, Sport and Shopping" > "Shopping"
  6. Generate the following query:
    [out:json][timeout:25];
    relation(7734528);
    out geom;
    map_to_area -> .a;
    (
    node[shop](area.a);
    way[shop](area.a);
    relation[shop](area.a);
    );
    out geom;
  7. Run the generated query.
  8. Result: https://overpass-turbo.eu/s/Ig4. Compare with: categories=shop

Notes:

EDIT: Forgot to add way and rel in the overpass-query. Fixed.

plepe commented 5 years ago

I already thought about such a feature and I'm pretty sure it will come. But will take some time :-) Btw, this is very similar to #95.