NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello all,

I am trying to do an overpass query to show which streets had sidewalk tags added in 2016 in Portland, Oregon, USA. This query returns visible data in https://overpass-turbo.eu/, but when I try to export raw data, or use the same query from the command line, the .osm file that is created will not open in JOSM (message says "No data found in file..." I think I must be having some trouble with recursion?

Here is the query, with a small test bounding box:

[timeout:300][diff:"2016-01-01T00:00:00Z","2016-08-01T00:00:00Z"];
(way["highway"~"primary|secondary|tertiary|trunk|service|residential|primary_link|secondary_link|tertiary_link|unclassified"]["sidewalk"~"."](45.5,-122.72,45.52,-122.7);
>;
);
out meta;

Any help would be very much appreciated! FYI, I want the raw OSM data so I can use it to create a time lapse visualization with http://prabhasp.github.io/OSMTimeLapseR/

Thank you!

Madeline

asked 06 Aug '16, 01:01

mosteele's gravatar image

mosteele
11224
accept rate: 0%

edited 06 Aug '16, 01:03


By using the 'diff' setting you're asking for a so called augmented diff format. There are some apps like achavi which can visualize this format. JOSM for sure is not amongst them and it really has no clue about it. That's why you get the message about no data being found in JOSM.

Long story short, use [date:...] as often as needed to get data at some given point in time instead. You will receive the usual osm xml format JOSM will also be happy with.

permanent link

answered 06 Aug '16, 06:32

mmd's gravatar image

mmd
5.7k15388
accept rate: 37%

edited 06 Aug '16, 06:42

Thank you so much, this helps! However, I am still struggling with the query. Do you think that the best approach is to do a subtraction (as in http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Difference) between one set created with the old date (using "[date:...") and one created with the new date? I'm having trouble with this since it seems like the ["date:"] parameter, like the ["timeout:"] parameter, is meant to be set only once for the whole query, at the top.

I suppose another approach would be to try to convert the diff file to OSM using OSMConvert .

Any further pointers you could give me would be mush appreciated. A link to a working example of a query with two different dates (but not using "diff:") would be particularly valuable.

Thanks again,

Madeline

(08 Aug '16, 18:10) mosteele

[date: ...] is indeed meant to be a global setting for the query, i.e. you can only set it once and get all data which was available back then. difference does not work across different [date: ...] settings.

My idea was to simply run several different queries with different [date: ..] settings and get a series of snapshots for different points in time. Store each query result in a different file, like osm-portland-2015-01, 2015-02, 2015-03.osm, etc. Wouldn't that be exactly what you need to feed into OSMTimeLapseR?

Please note that [diff: ...] will only provide the difference between the first and the last timestamp. If there are multiple changes to an object during that timeframe, you will not get a full history containing all intermittent versions this way!

(08 Aug '16, 19:44) mmd

Thank you for the clarification on the [date:...] setting. Actually, if I understand it correctly, OSMTimeLapseR takes a single OSM file and animates it based on the date of last edit. Multiple time slices files could be used to create visualizations using a number of other techniques, though.

I think I've alighted on a different approach that will work. I'll just write a query that pulls streets with sidewalk tags that were edited by the people involved in the current effort. I think this should be close enough for what I need.

Thanks again for taking the time to help! It's much appreciated!

Madeline

(09 Aug '16, 19:45) mosteele

Thanks for your feedback. A pure 'date of last edit' approach might be a bit skewed by trivial edits occurring at a later point in time. When filtering based on the names, you should probably also cross check if there were some later (e.g. QA) fixes by mappers unrelated to your project. Otherwise, parts of your effort will not show up in the result.

Also, I've never really heard of OSMTimeLapseR before. To bring everyone up to speed, a few introductory words on what kind of data you're expecting would have been really helpful. Maybe next time... ;)

(09 Aug '16, 20:16) mmd

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×483

question asked: 06 Aug '16, 01:01

question was seen: 2,213 times

last updated: 09 Aug '16, 20:23

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum