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

Improve performance of GeoRasterLayer editing functions #72

Open
kb173 opened this issue Mar 1, 2023 · 0 comments
Open

Improve performance of GeoRasterLayer editing functions #72

kb173 opened this issue Mar 1, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@kb173
Copy link
Member

kb173 commented Mar 1, 2023

GeoRasterLayer::smooth_add_value_at_position and GeoRasterLayer::overlay_image_at_position both work by repeatedly calling GeoRasterLayer::set_value_at_position. This produces a lot of single RasterIO calls, which is very inefficient. It would be better to write all data into the dataset at once. This means that we need to adapt RasterTileExtractor::write_into_dataset to take arbitrarily large arrays, and then construct these arrays in the GeoRasterLayer functions.

Perhaps we could re-use code more efficiently by making GeoRasterLayer::smooth_add_value_at_position call GeoRasterLayer::get_image and then GeoRasterLayer::overlay_image_at_position with the modified image.

@kb173 kb173 added the enhancement New feature or request label Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant