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

[BUG] Description of built-in arguments is lost when used in custom map args #1135

Open
zstadler opened this issue Dec 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@zstadler
Copy link
Contributor

zstadler commented Dec 25, 2024

Describe the bug
When overriding any of the builtin args in a custom map yaml definition, the description is lost

To Reproduce
Steps to reproduce the behavior:

  1. Download railways.yaml
  2. Add minzoom: 10 to args
  3. Run command docker run --rm -v .:/w -w /w ghcr.io/onthegomap/planetiler railways.yml --help | grep "(no .*)"
  4. See 0:00:00 DEB - argument: minzoom=10 (no description provided)

Expected behavior
See 0:00:00 DEB - argument: minzoom=10 (minimum zoom level)

Environment

  • Hardware: WSL Docker
  • OS: WSL Docker
  • Planetiler build version: 0.8.4-SNAPSHOT
  • Planetiler build timestamp: 2024-12-07T10:56:55.013Z

Additional context
My usual workaround was to copy the description into args. For example:

args:
  max_point_buffer:
    description: "Additional global limit for the max tile pixels to include points outside tile bounds of all layers.  Set to a lower value to reduce tile size for clients that handle label collisions across tiles (most web and native clients). NOTE: Do not reduce if you need to support raster tile rendering"
    default: 0

However, this is not possible for minzoom and maxzoom.

args:
  minzoom:
    default: 10
    description: minimum zoom level

produces a "Cannot override built-in argument: minzoom" exception:

0:00:00 DEB - argument: schema=railways.yml (Location of YML-format schema definition file)
Exception in thread "main" com.onthegomap.planetiler.custommap.expression.ParseException: Cannot override built-in argument: minzoom
        at com.onthegomap.planetiler.custommap.Contexts.lambda$buildRootContext$0(Contexts.java:87)
        at java.base/java.util.Map.forEach(Map.java:733)
        at com.onthegomap.planetiler.custommap.Contexts.buildRootContext(Contexts.java:80)
        at com.onthegomap.planetiler.custommap.ConfiguredMapMain.main(ConfiguredMapMain.java:48)
        at com.onthegomap.planetiler.Main.main(Main.java:102)
@zstadler zstadler added the bug Something isn't working label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant