This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

postal_code Relation is Missing When Using Area Filter

0

Hi there,

when running this overpass query, all postal_code relations in Germany are returned except for one (78266, relation id 3375856).

[out:json];
area[admin_level="2"][type="boundary"]["ISO3166-1"="DE"]->.country;
relation(area.country)[boundary="postal_code"];
out tags;

Without the area filter, the relation is found and returned. However, I don't want to (and cannot) process all postal_code relations, I only want to get the german ones.

Is there something wrong with Overpass/OSM or am I doing something wrong?

Thanks in advance, Daniel

asked 10 May '22, 15:44

danielkbx's gravatar image

danielkbx
11112
accept rate: 0%

The offending postal_code is of Büsingen am Hochrhein, a German exclave in Switzerland. The area is included in Germany's admin_level 2 relation.
Maybe there is an issue with the postal code and the country boundary being exactly the same? Just guessing.

(10 May '22, 19:15) TZorn

Source code available on GitHub .