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

Using GeoRasterLayer.smooth_add_value_at_position() requires to clean and rebuild overviews to show effect #74

Open
MathiasBaumgartinger opened this issue Mar 22, 2023 · 1 comment

Comments

@MathiasBaumgartinger
Copy link
Collaborator

The function (at least on a GPKG) will not show immediate effects in the landscapelab. QGIS showed the added values, but only on a specific zoom level. Rebuilding overviews is necessary:

  1. gdaladdo -clean GPKG:LL.gpkg:dhm
  2. gdaladdo -r nearest GPKG:LL.gpkg:dhm

The geopackage might not be flushed properly. It also weirdly adds a journal and wal file which summed up made almost half a gigabyte.

This would also explain another problematic behavior, which causes crashes when using the function multiple times on the same dataset.

@kb173
Copy link
Member

kb173 commented Aug 1, 2023

Can be done from code via BuildOverviews(): https://gdal.org/doxygen/classGDALDataset.html#aaaa6eccc928a80a94e9686cee64792c9

Since rebuilding overviews takes some time, it might be more sensible to clean overviews automatically in smooth_add_value_at_position and allow the user to rebuild them later with something like GeoRasterLayer.rebuild_overviews().

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

No branches or pull requests

2 participants