I have a hazard layer as a raster (tif) that covers New Zealand. Some areas close to the coastline the raster has no data values due to how the raster was create (based on points on land). I want to ensure that when I sample my exposure layer I get a hazard values for all exposures points. Is there a way to sample the raster using centroid but then if its no_data then I would find the nearest raster value within a given distance.
If the exposures are points, then you can just use ‘closest’ spatial sampling and then specify a buffer distance. In the wizard, the question looks like:
1: Specify a buffer (i.e. margin of error) when matching exposure-layer elements against the hazards-layer
In a pipeline, this will look something like:
sample_one(exposure, coverage: hazard, buffer-distance: 5000)