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

Support scanning directories for VRTs #123

Merged
merged 1 commit into from
Jun 27, 2022

Conversation

ianthomas23
Copy link
Contributor

This PR add support for scanning directories to find VRTs without having to set up a YAML config file.

Typical usage is to first build raster overviews and then to serve the tiles. For test purposes, first create the test VRT using

pytest -v --runlarge mapshader/tests/test_large_vrt.py::test_large_vrt_create

and then scan for this VRT and build some overviews using

mapshader build-raster-overviews --scan_directory examples --overview_levels 0,1,2,3,4,5,6

Overview levels to build are specified as a single string without whitespace containing comma-separate integer overview zoom levels.

To serve the same VRTs with the pre-generated overviews:

mapshader serve --scan_directory examples

Note that it builds a source configuration for each VRT and makes some basic assumptions. In particular it does not know the data limits (the span config setting) and it purposely does not load all the data to determine the span as the data may be much larger than RAM. This is not really a problem for overviews, but when you zoom down levels finer than the overviews each tile will determine its own span which will probably not be what you want.

A future idea is to store metadata in the VRT to include the span limits.

@brendancol brendancol merged commit 98140f8 into makepath:master Jun 27, 2022
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.

None yet

2 participants