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

1
1

I'd like to look for recent nodes on exactly latitude -1. That's something a bit like this:

[out:json][timeout:25];
(
  node(-1.0,-180.0,-1.0,180.0);
);
// print results
out body;
>;
out skel qt;

Which nearly works, except that it's not looking for recent nodes. The documentation leads me to believe that something like

[out:json][timeout:25];
(
  node(-1.0,-180.0,-1.0,180.0)._(changed:"2016-01-01T00:00:00Z");
);
// print results
out body;
>;
out skel qt;

ought to work, but unfortunately that gives:

An error occured during the execution of the overpass query! This is what overpass API returned:
runtime error: Query run out of memory using about 2048 MB of RAM.

Presumably, that is because the bounding box is counted as "large" (because it covers every latitude) rather than "small" (only one longitude) and therefore the "changed" part is being executed first, and obviously every node on the planet added this year results in an "out of memory" error.

Is there any way to rephrase this query to only return nodes in that bounding box that were modified this year?

(edit: spelling)

asked 24 Nov '16, 18:12

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

edited 24 Nov '16, 19:06


Try using the newer: filter (instead of changed:)! -> http://overpass-turbo.eu/s/kio

permanent link

answered 24 Nov '16, 18:55

tyr_asd's gravatar image

tyr_asd
1.2k51927
accept rate: 64%

Thanks - that works!

(24 Nov '16, 19:01) SomeoneElse ♦

Is there a logic to having to use "diff" before the actual query (in []) and "changed" at the level of the queried items (in () )?

(25 Nov '16, 08:45) joost schouppe

@joost: Hmm, as far as I know, the operations of the two operations are actually quite different: changed is basically just a beefed-up version of the newer statement (but which is still a bit slower than that in many use cases). Whereas [diff:…] (and [adiff:…]) actually performs the following query twice and outputs only the difference between the two results (and also uses a different output format).

(26 Nov '16, 14:21) tyr_asd

OK thanks, just realized I've been using diff when I could have used the lighter changed or newer

(27 Nov '16, 08:55) joost schouppe
1

Just for completeness, an example combining with a bounding box:

[out:json][timeout:25];
// gather results
(
  // query part for: “waterway=stream”
  //node["waterway"="stream"]({{bbox}});
  way["waterway"="stream"]({{bbox}})(newer:"2017-03-18T00:00:00Z");
  //relation["waterway"="stream"]({{bbox}});
);
// print results
out body;
>;
out skel qt;
(18 Mar '17, 10:53) SomeoneElse ♦
Your answer
toggle preview

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: 24 Nov '16, 18:12

question was seen: 4,572 times

last updated: 18 Mar '17, 10:53

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