Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more checks of command line options #2132

Merged
merged 3 commits into from
Feb 3, 2024

Conversation

joto
Copy link
Collaborator

@joto joto commented Feb 2, 2024

These three commits add various checks for combinations of command line options which make no sense and so should not be used. For most of these warnings about ignored options are printed (which we can turn into hard fails in a later version of osm2pgsql). For the projection setting options (--latlong, -l, --merc, -m, --proj, and -E) an error is produced, because results are undefined if they are used together.

See individual commits.

Fixes #142

Adds some additional checks of the command line options. Adds warnings
for
* options ignored when using "flex" output
* options ignored when using "null" output
* incompatible options setting the output projection

The function `opt->get_name(false, true)` used here returns a string
with all the (short and long) names of a command line option.
@joto joto force-pushed the check-cmdline-options branch from 68ea660 to d732c3b Compare February 2, 2024 15:35
@joto joto force-pushed the check-cmdline-options branch from d732c3b to d463a63 Compare February 2, 2024 16:12
@lonvia lonvia merged commit 95f330f into osm2pgsql-dev:master Feb 3, 2024
26 checks passed
@joto joto deleted the check-cmdline-options branch February 4, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

osm2pgsql accepts multiple conflicting arguments
3 participants