osm2pgsql-dev / osm2pgsql

OpenStreetMap data to PostgreSQL converter
https://osm2pgsql.org
GNU General Public License v2.0
1.48k stars 473 forks source link

Allow empty config file in flex output #2200

Closed joto closed 3 months ago

joto commented 3 months ago

No flex config file, or one that doesn't define any tables is usually not very useful. But it can be used in slim mode to have the middle tables only. Or it can be used to do some other processing or instead if the null output for testing.

We still output a warning, but no error any more if the style file is missing from the command line or if there are no tables defined.

lonvia commented 3 months ago

Empty tables are fine but I would prefer that you have to explicitly state -S empty.lua to achieve the goal. It's an easy mistake to forget the -S parameter and then searching for hours why the output tables do not appear.

joto commented 3 months ago

Changed as requested.