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

Automatic handling of swapped xy coords in basemapper.py, if a template URL is provided #340

Closed
spwoodcock opened this issue Jan 30, 2025 · 1 comment
Assignees
Labels

Comments

@spwoodcock
Copy link
Member

spwoodcock commented Jan 30, 2025

Is your feature request related to a problem? Please describe.

  • We have an --xy flag to manually specify swapped coords.
  • The user can pass URLs in many formats that we need to parse.
  • A common format is with placeholders: https://dma-tokha.naxa.com.np/api/v1/tile/raster-tiles/{z}/{y}/{x}.png

Describe the solution you'd like

  • If placeholders are in the URL, we can actually determine if xy are inverse automatically.
  • URLs like ...{z}/{x}/{y}.png we process normally.
  • URLs like ...{z}/{y}/{x}.png we automatically use the xy param to swap the coords during processing.

Additional context

  • This is a 'nice to have' for command line functionality.
  • But for upstream services using this, like FMTM, we have no way to determine if the URL needs the --xy flag specified.
  • So this would help to make the TMS processing more flexible in FMTM (required for Tokha survey).
@spwoodcock
Copy link
Member Author

We are going to abandon basemapper.py in favour of tilezen/go-tilepacks most likely. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants