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

0
1

Hi

I want to find all landuse=construction entities that were created over 2 years ago. I've looked at diff, adiff, changed etc. OverpassTurbo has 'newer' but not an equivalent 'older' it appears. All of these option work with their last modified date but I want it to be based on their created date. I'm unable to even find a 'created' attribute in an entities meta data. Does anyone have an example of what I require.

Edit: For clarity, I want to return all existing landuse=construction entities that are older than two years.

Cheers

Dave F.

asked 08 Dec '16, 18:40

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

edited 09 Dec '16, 11:33

You need all versions of an entity?

(09 Dec '16, 00:02) Wetitpig0

I need landuse=construction entities, within a boundary box, that were created over 2 years ago. I'm not interested in how many times they've been amended.

(09 Dec '16, 00:11) DaveF

You can achieve this in several ways with Overpass. For instance the changed predicate.

I have used the difference between all landuse=construction and landuse=construction newer than a given data. Link to query.

Core bits of query (just for ways to keep simple):

{{geocodeArea:Nottingham}}->.searchArea;
 (way["landuse"="construction"](area.searchArea)
  -
  way._(newer:"2014-12-14T07:00:00Z")["landuse"="construction"](area.searchArea);)
permanent link

answered 09 Dec '16, 22:30

SK53's gravatar image

SK53 ♦
28.1k48268433
accept rate: 22%

Not exactly "before 2 years ago", but here is one "at a particular date, which can be 2 years ago". Depending on what you're looking for, that might work.

permanent link

answered 09 Dec '16, 01:19

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

Thanks. I looked at 'date' but it appears to also return all entities which were landuse=construction, but have since had their tags amended. It also only goes back to 2012, which will not be far enough back in time for my future requirements. IMO 'date' is to generic a term. It should be more specific for it's detailed purpose. I've just checked: 'date' returns completely deleted entities. It definitely should be renamed.

(09 Dec '16, 11:29) DaveF
1

If you want pre licence-change data, you're probably going to need to handle the old planet files yourself.

With regard to "date" it's returning "the situation as of that date" - looks like it does what it says on the tin to me.

(09 Dec '16, 12:16) SomeoneElse ♦

First filter a full-history file with osmfilter, then choose select all within 2 years with Osmium. But all change versions will be kept.

permanent link

answered 09 Dec '16, 00:41

Wetitpig0's gravatar image

Wetitpig0
307161928
accept rate: 10%

I wish to use Overpass api or Preferably Overpass Turbo.

(09 Dec '16, 00:50) DaveF

If they don't provide it you do not have any choice.

(09 Dec '16, 01:04) Wetitpig0

I have never used Overpass API

(09 Dec '16, 01:05) Wetitpig0
1

Err... I'm unsure if they provide it, which is why I'm asking.

(09 Dec '16, 11:16) DaveF

If "I want to find all landuse=construction entities that were created over 2 years ago" means "I want to find all landuse=construction entities THAT STILL EXIST that were created over 2 years ago" then it's actually much easier. do a binary chop in the node, way and relation list to find roughly the date that you're interested in, and search for nodes, ways and relations with ids less than that.

That's probably doable with Overpass et al, and I'm sure that some of the links from here will explain how.

Obviously this doesn't solve the "object X was issued a new id Y during editing", but it'll get most of what you want.

permanent link

answered 09 Dec '16, 12:22

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

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
×9
×1

question asked: 08 Dec '16, 18:40

question was seen: 3,688 times

last updated: 09 Dec '16, 22:30

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