Switch on writing of VRTs by default#956
Open
olsen232 wants to merge 2 commits into
Open
Conversation
craigds
reviewed
Dec 5, 2023
| VRT files | ||
| ~~~~~~~~~ | ||
| Setting an environment variable ``KART_RASTER_VRTS=1`` when creating the Kart working copy or checking out a commit will cause Kart to create a `VRT <vrt_>`_ (Virtual Raster) file for each raster dataset. This single file comprises a mosaic of all the tiles in the working copy that belong to that dataset, so that if you load this file in your tile-editing software, you have effectively loaded the entire dataset. The individual tiles are referenced by the VRT, rather than the data from each tile being duplicated in the VRT. Creation of VRTs is still experimental but should become the default in a future version of Kart. | ||
| When creating the working copy or checking out a commit, Kart will create a `VRT <vrt_>`_ (Virtual Raster) file for each raster dataset. This single file comprises a mosaic of all the tiles in the working copy that belong to that dataset, so that if you load this file in your tile-editing software, you have effectively loaded the entire dataset. The individual tiles are referenced by the VRT, rather than the data from each tile being duplicated in the VRT. To turn off the automatic creation of VRTs, set environment variable ``KART_RASTER_VRTS`` to ``0``. |
Member
There was a problem hiding this comment.
Suggested change
| When creating the working copy or checking out a commit, Kart will create a `VRT <vrt_>`_ (Virtual Raster) file for each raster dataset. This single file comprises a mosaic of all the tiles in the working copy that belong to that dataset, so that if you load this file in your tile-editing software, you have effectively loaded the entire dataset. The individual tiles are referenced by the VRT, rather than the data from each tile being duplicated in the VRT. To turn off the automatic creation of VRTs, set environment variable ``KART_RASTER_VRTS`` to ``0``. | |
| When creating the working copy or checking out a commit, Kart will create a `VRT <vrt_>`_ (Virtual Raster) file for each raster dataset. This single file comprises a mosaic of all the tiles in the working copy that belong to that dataset, so that if you load this file in your GIS software, you have effectively loaded the entire dataset as one layer. To turn off the automatic creation of VRTs, set environment variable ``KART_RASTER_VRTS`` to ``0``. |
not sure what that sentence means, doesn't seem to add much
Contributor
|
We're undertaking some software testing to make sure this behaviour won't have unintended side-effects in some commonly used software packages. |
during working copy checkout of raster datasets. Adds a utility method to check if an environment variable is turned off since bool(os.environ.get(key)) won't work anymore.
bdef3f6 to
478efda
Compare
rcoup
reviewed
Dec 11, 2023
| vrt_text = vrt_path.read_text() | ||
| vrt_text = vrt_text.replace( | ||
| "</VRTDataset>", | ||
| ' <OverviewList resampling="average">2 4 8</OverviewList>\n</VRTDataset>', |
Contributor
There was a problem hiding this comment.
How do we know that 2,4,8 is the right list here?
AFAIK we're not storing overview info in the schema, so we should really be sampling the tiles.
Collaborator
Author
There was a problem hiding this comment.
Yeah... we don't
I pushed this last night so we can better test the effect of having this element. But I don't really understand this element: need to figure out what it should contain when and why.
I should have put a TODO, I won't merge this until I at least know some more
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
... during working copy checkout of raster datasets.
Adds a utility method to check if an environment variable is turned off since bool(os.environ.get(key)) won't work anymore.
Checklist: