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

Fix / improve tile spatial filtering #833

Merged
merged 2 commits into from
May 4, 2023
Merged

Conversation

olsen232
Copy link
Collaborator

@olsen232 olsen232 commented May 3, 2023

  • Make tile spatial filtering work for PAM files, which should be spatial filtered based on the extent stored in the tile pointer file, not in the PAM pointer file.

  • Fixes a bug: the hash of the current spatial filter should be stored in the "workdir-state.db" sqlite DB, since it's more likely to reflect the true state of the workdir than the git config which is easy for the user to tamper with. Since this step was missing previously, spatial filtering worked poorly for tile-based datasets - Kart would forget it had already applied a spatial filter and would reapply it, and would fail to unapply a spatial filter in response to kart checkout --spatial-filter=none

  • Have you reviewed your own change?

  • Have you included test(s)?

  • Have you updated the changelog?

- Make tile spatial filtering work for PAM files, which should be
spatial filtered based on the extent stored in the tile pointer file,
not in the PAM pointer file.
- Fixes a bug: the hash of the current spatial filter should be
  stored in the "workdir-state.db" sqlite DB, since it's more
  likely to reflect the true state of the workdir than the git
  config which is easy for the user to tamper with.
  Since this step was missing previously, spatial filtering worked
  poorly for tile-based datasets - Kart would forget it
  had already applied a spatial filter and would reapply it, and
  would fail to unapply a spatial filter in response to
  `kart checkout --spatial-filter=none`
@olsen232 olsen232 requested a review from craigds May 3, 2023 04:05
kart/workdir.py Outdated Show resolved Hide resolved
into working_copy.py where they are common to both tabular
and file-system working copies.
@olsen232 olsen232 merged commit b3a9654 into master May 4, 2023
@olsen232 olsen232 deleted the raster-spatial-filters branch May 4, 2023 03:13
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.

2 participants