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

If I tried to get Germany or France admin_level=2 (country boundaries) I got for Germany also Nederland. For France I got also Italy and Nederland. Is it wrong data or my query is wrong?

Check this under link: https://overpass-turbo.eu/s/1GCA

Or there is the whole query you can try on: https://overpass-turbo.eu/

Query:

   [out:json][timeout:180];
   {{geocodeArea:Germany}}->.searchArea;
   (
       relation[admin_level=2][boundary=administrative][name](area.searchArea);
   );
   out geom;
   >;
   out skel qt;

asked 30 Jan, 09:48

0602Petr's gravatar image

0602Petr
16113
accept rate: 0%


This is expected. You are asking for boundaries partly or completely within the German boundary. Germany has a dispute with the Netherlands at the Dollard about the boundary. For that reason, in the OSM data a section of the Netherland's boundary is within German borders.

I expect a similar effect wrt France and Italy somewhere at the Montblanc. France and Netherlands is a surprise pair because the two countries only border in the Carribean (Saint Martin/Sint Maarten), and borders there are expected to be fitting.

permanent link

answered 31 Jan, 06:35

Roland%20Olbricht's gravatar image

Roland Olbricht
6.7k36489
accept rate: 36%

I understand , but is there a way (how to change the query) to get only Germany boundary?

(31 Jan, 10:08) 0602Petr

Just query by name "Deutschland"? With tthe other criteria, you should get just https://www.openstreetmap.org/relation/51477 .

I'm not sure why you were searching for "countries within Germany" - were you expecting to look elsewhere and search for enclaves, maybe?

(31 Jan, 14:12) SomeoneElse ♦

My goal is to find all regions and districts in Germany so I am trying to search all relations (with admin_level=4(6)) in Germany area. But I also get regions and districts from Nederland because of dispute boundary. The better way would be to search relations by tag (like: ['ISO3166-1'='DE']) but this tag is not represent on relations.

(01 Feb, 08:50) 0602Petr

I have already found the solution how to query regions of Germany:

[out:json][timeout:180];
area["ISO3166-1"="DE"]->.searchArea;
(
   relation["ISO3166-2"~"DE"][admin_level=4][boundary=administrative][name](area.searchArea);
);
out geom;

and than for each region relation I can query districts of that region:

[out:json][timeout:180];
rel(28322); // relation id for 'Mecklenburg-Vorpommern' region
map_to_area -> .searchArea;  // map_to_area is mapping relation into area
(
   relation[admin_level=6][boundary=administrative][name](area.searchArea);
);
out geom;
permanent link

answered 01 Feb, 14:45

0602Petr's gravatar image

0602Petr
16113
accept rate: 0%

edited 01 Feb, 18:46

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:

×147
×129
×37
×26

question asked: 30 Jan, 09:48

question was seen: 784 times

last updated: 01 Feb, 18:46

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