[Tile-serving] [openstreetmap/osm2pgsql] Combining multiple sets of themes (Discussion #2078)
Jochen Topf
notifications at github.com
Thu Sep 14 07:53:22 UTC 2023
Regarding schemas: You can reset the schema with `set_option` any time. I thought it was easier that way instead of having to set the schema on all `add_topic` calls. So set it once for some topics, then include them, then set the schema to something else and then add the rest of the topics. But it should be no problem to add functionality to also allow setting with an option on the `add_topic()` call.
Regarding conflicts when modifying objects: Don't do that. Topics should only rarely change objects. The `core/clean-tags` topic is the rare exception here. Most topics should leave the input untouched. They can always amend it by adding data to the second parameter of the processing function. So you can have a topic parse some tag and write the parsed, cleaned up version into that variable and then later topics who know about this convention can use it from there. (See the `core/elevation` topic for an example.) I have thought about adding some kind of dependency processing, so that topics can declare a dependency on some other topic, but I am not sure how best to do that and maybe it is overkill. So for the moment you have to know what topics you might have to run first, so that others will work. Themepark can help you with assembling a config, but it is not magic, you still have to make sure topics keep to some rules and they need to be documented so that you can figure out what works together and what doesn't.
I don't think adding combining two config files is the way to go. You then need a third config file to tell osm2pgsql *how* to combine them, for instance by using schemas. But there could be other ways, for instance you can using table name prefixes. Or use schemas only on those tables with overlapping names. But this is all Lua so you can write a small wrapper that does the combining for you.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/discussions/2078#discussioncomment-6998668
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/repo-discussions/2078/comments/6998668 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230914/41381e4a/attachment.htm>
More information about the Tile-serving
mailing list