[Qgis-user] r.neigbors: use a DHM raster for the weighting function?
celati Laurent
laurent.celati at gmail.com
Wed Dec 17 02:19:34 PST 2025
Dear all,
I work with Qgis and grass via the processing toolbox. I have for my area
of interest:
- color infrared orthographic aerial (3 spectral bands: Near-infrared,
red, green). For information,, which I have downsampled to 1.5 meters
(original resolution: 20 cm).
- a raster that allows to identify/mask shadow areas (value 1: shadows.
Nodata: the remaining pixels of the raster data). For your information,
this raster has exactly the same resolution as the orthographic aerial data
(1.5 meters). And the pixels have the same alignment.
- A digital height model (DHM) raster (modeling derived from HD lidar).
The pixel alignement/resolution of the raster is different than the ortho
aerial/shadow raster : 50 cm.
Based on this 3 data, my objective for the aerial ortho dataset would be:
- to modify/edit the radiometric values only on the shadow pixels. To
assign them a new value.
- these new radiometric values for the shadow pixels for the aerial
dataset must be defined/assigned based on the neighboring pixels (mean,
median, maximum, minimum...).
- the complexity comes from the fact that I want to prioritize, or even
exclusively prioritize, radiometric values from "low" areas (grassland,
soil) and not from high areas that are the source of the shadow (buildings,
trees, etc.).
I looked for for a tool that might meet my needs. I found the grass
r.neigbors tool:
https://grass.osgeo.org/grass-stable/manuals/r.neighbors.html
It seems to match my purpose. I'm able to execute it successfully by
limiting the process to only the pixels in the aerial ortho datasset that
are affected by shadows. However, I'm stuck on the last step. The tool
allows the user to define a weight. I intended to use this weight function
so that the new radiometric values are defined only for low areas (thus
using the HD raster lidar height model-DHM for this step). But I don't
really know how to use it with this tool.
Could you provide me some guidances or point me towards another tool better
suited to my needs and input data?
Thanks so much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20251217/76f3d9a5/attachment.htm>
More information about the QGIS-User
mailing list