[Tile-serving] [openstreetmap/osm2pgsql] How can you get country boundaries with flex output? (Discussion #1934)
Jochen Topf
notifications at github.com
Sat Mar 4 10:36:29 UTC 2023
The simplest way to handle boundaries is to create multipolygons from the boundary relations in osm2pgsql. Then you can either just draw the outline of those multipolygons or turn them into (multi)linestrings in the database. You can also create multilinestrings directly from the relations if your osm2pgsql version is new enough.
This is often good enough if you only want to render one level of boundaries (i.e. only country boundaries). But if you want to render multiple levels (country, state, ...) or want to render the boundaries half-transparently, you'll get intro trouble. Then you really need to handle each piece of boundary separately. This is much more effort and you'll need some SQL magic for it and/or use 2-stage processing in osm2pgsql Lua which is a bit painful. I don't have a good out-of-the-box solution there, although I believe @pnorman has support for this in https://github.com/gravitystorm/openstreetmap-carto/pull/4431 .
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/discussions/1934#discussioncomment-5201050
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/repo-discussions/1934/comments/5201050 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230304/9fd5d1cb/attachment.htm>
More information about the Tile-serving
mailing list