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

Hello,

I'd like to get all the disused train lines in France.

The following query can time-out, and iOT isn't happy if I run it again ("Check your quota"):

[out:json][timeout:25];

//Metropolitan France 1403916
rel(1403916);
map_to_area -> .searchArea;

(
  way[railway~"(disused|abandoned)"](area.searchArea);
);

out geom;

Is there a better way, possibly using the command-line?

Thank you.

asked 25 Aug '21, 18:44

Shohreh's gravatar image

Shohreh
85131318
accept rate: 0%


If you're after actual closed railways the popular tags are:

area(3600008640);
way[~"(disused:railway|abandoned:railway)"~"^rail$"](area); 
out geom;

I've used a smaller relation for ease of explanation. For the whole of France & Corsica use area(3601403916); (~20mb)

If you're specifically after tags which aren't the above then you'll almost certainly need to split your search into smaller areas as using the 'railway' key searched all values for it, which returns quite a bit more data than just 'rail'.

permanent link

answered 26 Aug '21, 15:38

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

Thanks much for the syntax.

(26 Aug '21, 17:26) Shohreh

Addendum to original answer:

You may get away with calling this just once, for the whole of the country (~40mb). The Regex '^' & '$' means the search has to start & end with those words so, in fact, it's only searching for whole words.

area(3601403916);
way[railway~"^(disused|abandoned)$"](area);
out geom;
permanent link

answered 26 Aug '21, 18:01

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

I'll give it a try, and see if OT doesn't complain with my querying too much data.

(26 Aug '21, 18:11) Shohreh
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:

×228

question asked: 25 Aug '21, 18:44

question was seen: 1,382 times

last updated: 26 Aug '21, 18:11

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