Skip to content

Default 'ivert validate -ex' bboxes to W/E/S/N order with --wsen flag - #51

Merged
mmacferrin merged 1 commit into
mainfrom
validate-wsen-flag
Jul 19, 2026
Merged

Default 'ivert validate -ex' bboxes to W/E/S/N order with --wsen flag#51
mmacferrin merged 1 commit into
mainfrom
validate-wsen-flag

Conversation

@mmacferrin

Copy link
Copy Markdown
Collaborator

Summary

The `-ex`/`--exclude` bounding boxes in `ivert validate` were parsed in W/S/E/N (`minx/miny/maxx/maxy`) order, inconsistent with `ivert database` commands, which default to W/E/S/N (`minx/maxx/miny/maxy`) with an opt-in `--wsen` flag.

This PR makes `ivert validate` behave the same way:

  • `-ex`/`--exclude` bounding boxes now default to W/E/S/N (`minx/maxx/miny/maxy`).
  • A new `--wsen` flag switches interpretation to W/S/E/N (`minx/miny/maxx/maxy`), mirroring `ivert database download`.
  • Downstream `validate_dem` still receives `(minx, miny, maxx, maxy)` tuples, so nothing below the CLI layer changes.

Changes

  • `_parse_exclude_spec(value, wsen=False)` reorders the four values based on the flag and returns the same tuple shape as before.
  • Updated `-ex`/`--exclude` help text to document the new default order and the `--wsen` switch.
  • Added the `--wsen` flag to the `validate` command and threaded it through.

Verification

  • `_parse_exclude_spec('1/2/3/4')` → `(1.0, 3.0, 2.0, 4.0)` (default W/E/S/N)
  • `_parse_exclude_spec('1/2/3/4', wsen=True)` → `(1.0, 2.0, 3.0, 4.0)` (W/S/E/N)
  • `ivert validate --help` shows the updated `-ex` help and the new `--wsen` option.

Make the -ex/--exclude bounding boxes in 'ivert validate' use the same
W/E/S/N (minx/maxx/miny/maxy) default order as 'ivert database' commands,
with an opt-in --wsen flag to switch to W/S/E/N (minx/miny/maxx/maxy).
@mmacferrin
mmacferrin merged commit afb5524 into main Jul 19, 2026
3 checks passed
@mmacferrin
mmacferrin deleted the validate-wsen-flag branch July 19, 2026 06:48
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.

1 participant