I have a PostGIS database in the "Osm2pgsql/schema". I get a 7 rows when I query the
Only 3 of them have a geometry. Unfortunately none of them is the big Germany polygon. They are all enclaves in Belgium or Switzerland. Every single on has an way_area (real type) information. Should I work with this? How? Or what am I doing wrong? If I do the same for states in Germany, I can't find a single state polygon :( asked 30 May '12, 14:50 np00 |
In OSM, polygons, especially large ones, often break because someone makes a small edit somewhere that causes the boundary to be incomplete or self-intersecting, and osm2pgsql may not then be able to build the geometry. It is also possible that the data extract you were using did non contain everything required to build the boundary. Depending on what you need the polygon for, there are various things you could do.
Having said that, on my osm2pgsql-imported database I get exactly one result for e.g. "admin_level='4' and name='Bayern'", and for "admin_level='2' and boundary='administrative' and name='Deutschland'" I get the following list:
Indeed the way_area column can be used as an indicator which of those is the "big Germany polygon". answered 31 May '12, 10:17 Frederik Ramm ♦ |