[Tile-serving] [openstreetmap/osm2pgsql] How can you get country boundaries with flex output? (Discussion #1934)

Isaac Boates notifications at github.com
Sun Feb 26 19:39:22 UTC 2023


I am really struggling to get country boundaries when using the flex output.

I filtered my pbf with osmium:

```
osmium tags-filter final.pbf n/amenity=charging_station admin_level "-o", filtered_pbf,
```

This should give me all objects with any value at all in `admin_level` (in addition to the charging stations

And then I try to turn them into polygons in the flex style file:

```
function osm2pgsql.process_way(object)

tables.country:insert({
    name = object.tags["name:en"],
    geom = object.as_polygon()

})
```
But i only get some selected polygons as a result. This table is huge, with many tens of thousands of entries, but only a few have geometry:

![image](https://user-images.githubusercontent.com/13814358/221432935-106f0893-32e9-4a6b-bb77-b5f192316108.png)

I don't see any examples of this in the example lua files, is there some trick to this I'm not getting?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/discussions/1934
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/osm2pgsql/repo-discussions/1934 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230226/3f358236/attachment-0001.htm>


More information about the Tile-serving mailing list