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

Feature: Terrain Preview and simple Elevation Query #1425

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

okimiko
Copy link
Contributor

@okimiko okimiko commented Dec 17, 2024

This PR will add

  • a preview for terrain data (in addition to the current raw data preview)
    • highlight color is based on the encoding
  • a simple elevation api based on served terrain data
    • includes a link on the index page
    • for details, see endpoints.rst

Both require configured encoding (see config.rst).

In general this adds just some eye candy and an "inspect" function for terrain like the geojson endpoint.

src/serve_data.js Outdated Show resolved Hide resolved
src/serve_data.js Outdated Show resolved Hide resolved
src/serve_data.js Outdated Show resolved Hide resolved
docs/config.rst Outdated
Comment on lines 261 to 264
},
"terrain": {
"url": "mbtiles://terrain.mbtiles",
"encoding": "mapbox"
Copy link
Collaborator

@acalcutt acalcutt Dec 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are going to need to find a good spot to put this documentation since it doesn't just apply to mbtiles. maybe a new section that notes this and the information right below. ir might be good to note it only works with pmtiles or mbtiles

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like the second approach, in general the tileserver handles "data" even if we add some special terrain handling here, I think there is no need to show that in an own section. (This may change, if there will be more features in this section ;-)).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I miss understood your comment (I read it as a change of the code regarding configuration).

I updated the documentation with a dedicated section nested in "data".

@okimiko
Copy link
Contributor Author

okimiko commented Dec 22, 2024

Thanks for all suggestions so far. I did a local build and converted my terrain mbtile source to a pmtile and both are working so far :)

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

Successfully merging this pull request may close these issues.

2 participants