ninoxconsulting / PEMprepr

This sub package prepares data for Predictive Ecosystem Mapping workflow
Apache License 2.0
0 stars 0 forks source link

Fix get cded dem res #17

Closed gcperk closed 3 weeks ago

gcperk commented 3 weeks ago

Hi @ateucher I reworked this function to allow output resolution to be controlled by default template or user defined output (param = res, as a numeric (in meters).

I might be missing something in the if else statements, as I converted default res to a TRUE /FALSE, for initial check but I think this may skip over the is.numeric() check. It is a bit cumbersome as is with series of if statements.

Tests passing, but failing on internet download issue as discussed.

This should closes #15.

Thanks

ateucher commented 3 weeks ago

Hey @gcperk - I pushed a change where I simplified the logic of dealing with the res argument and creating the template aoi, and pulled it into a helper function.

I also added another test so we test both default res, and a new res. Let me know what you think

gcperk commented 3 weeks ago

@ateucher - Thanks - that is great. I like the res check and it seems much cleaner, I might even use for other function down the line.