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

0
1

I want to get every street in a postal code area, my code works fine for Germany

 [out:csv(name;false)];
area[postal_code="10115"]->.a;
way(area.a)[highway][name];
out;

But how can I query for other countries with postal code system? For example FIN or CH?

Thanks a lot :)

asked 14 Mar '17, 18:33

kampfkeks18's gravatar image

kampfkeks18
11112
accept rate: 0%

I think your query is incorrect as soon as there is another region somewhere in the world that also has postal code 10115.

(24 May '17, 15:01) escada

I think the closest you can get without having postal_code areas defined is:

[out:json][timeout:25];
// fetch area “Polska” to search in
{{geocodeArea:Polska}}->.searchArea;
// gather results
(
  node["addr:postcode"="04-035"](area.searchArea);
  way["addr:postcode"="04-035"](area.searchArea);
  relation["addr:postcode"="04-035"](area.searchArea);
)->.addr;
way["highway"]["name"](around.addr:20.0);
out body;
>;
out skel qt;

But it's not ideal, as far as I know no address at Ostrobramska has postal code 04-035. You may try to change the radius at around.addr: to smaller than 20.0 metres

permanent link

answered 24 May '17, 12:16

rmikke's gravatar image

rmikke
153
accept rate: 0%

edited 24 May '17, 12:21

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
×228

question asked: 14 Mar '17, 18:33

question was seen: 5,510 times

last updated: 24 May '17, 15:01

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