Cirad-ASTRE / mapMCDA

Produce an epidemiological risk map by weighting multiple risk factors
https://umr-astre.pages.mia.inra.fr/mapMCDA/
1 stars 2 forks source link

Optimisation: rasterise region once #26

Open famuvie opened 5 years ago

famuvie commented 5 years ago

Currently, when several vector maps are used as risk factors, the function distance_map() is called for each one. This function determines the region of interest by rasterising the map of epidemiological units. This operation should be done once for all.

famuvie commented 5 years ago

I need to refactor this function. It should take the raster of the region of interest as input, rather than computing it within the function. Perform one operation, and do it well. Leave the rasterisation outside.

famuvie commented 5 years ago

Each unnecessary rasterisation costs a couple of seconds for the CMR example at default resolution.