EcologyR / mappestRisk

Other
0 stars 0 forks source link

map_risk(): fix extent overlap error #34

Closed AMBarbosa closed 1 year ago

AMBarbosa commented 1 year ago

sometimes there's an unjustified error about extents not overlapping between region and t_rast

AMBarbosa commented 1 year ago

I believe this is fixed now -- @ajpelu, please confirm that you can now run the examples that gave you the error before.

ajpelu commented 1 year ago

Hi @AMBarbosa. Yes, after git pull, It works. Test:

tavg_file <- system.file("extdata/tavg_lux.tif", package = "mappestRisk")
tavg_rast <- terra::rast(tavg_file)
risk_rast_binary <- map_risk(t_vals = c(12.5, 21.4), t_rast = tavg_rast)
interactive_map(risk_rast_binary[[13]])

It works ok. No errors. No messages. No warnings.

Thanks!! Good work @AMBarbosa