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.
GeoRasterLayer::smooth_add_value_at_position
andGeoRasterLayer::overlay_image_at_position
both work by repeatedly callingGeoRasterLayer::set_value_at_position
. This produces a lot of singleRasterIO
calls, which is very inefficient. It would be better to write all data into the dataset at once. This means that we need to adaptRasterTileExtractor::write_into_dataset
to take arbitrarily large arrays, and then construct these arrays in theGeoRasterLayer
functions.Perhaps we could re-use code more efficiently by making
GeoRasterLayer::smooth_add_value_at_position
callGeoRasterLayer::get_image
and thenGeoRasterLayer::overlay_image_at_position
with the modified image.