When setting expiretiles_zoom in config file (ie: 10), imposm always generate expire tiles file with zoom 14.
If I set -expiretiles-zoom on cmdline, everything works.
Expected Behavior
When expiretiles_zoom is set in config file, imposm run should use this value
Actual Behavior
When expiretiles_zoom is set in config file, imposm run use 14
expiretiles-zoom has a default value of 14 but in updateFromConfig(), the value is updated from config file only if ExpireTilesZoom is equal to 0 (from cmdline)
Context
When setting expiretiles_zoom in config file (ie: 10), imposm always generate expire tiles file with zoom 14. If I set -expiretiles-zoom on cmdline, everything works.
Expected Behavior
When expiretiles_zoom is set in config file, imposm run should use this value
Actual Behavior
When expiretiles_zoom is set in config file, imposm run use 14
Possible Fix
I think the bug is in https://github.com/omniscale/imposm3/blob/c87a9a2b5761787a637e0fa73df9d4331846587d/config/config.go#L274
expiretiles-zoom has a default value of 14 but in
updateFromConfig()
, the value is updated from config file only if ExpireTilesZoom is equal to 0 (from cmdline)https://github.com/omniscale/imposm3/blob/c87a9a2b5761787a637e0fa73df9d4331846587d/config/config.go#L119-L124
I thing you should not set a default value (or 0) on cmdline argument, since it would be set to 14 if the value is invalid anyway.