b-cubed-eu / gcube

Simulation framework for biodiversity data cubes
https://b-cubed-eu.github.io/gcube/
Other
2 stars 2 forks source link

create add_coordinate_uncertainty #20

Closed avrodrigues closed 7 months ago

avrodrigues commented 7 months ago

Create the function to add a new column to an sf object with POINT geometry. There is an initial documentation for the function

PietrH commented 7 months ago

codecov also seems to think some lines are not covered by tests

wlangera commented 7 months ago

@micdimu can you check this out and add your code/comments where relevant?

wlangera commented 7 months ago

I just realised that it is maybe better to not use this function as a helper within sample_observations() since it is not known a priori how many observations will be there so the user cannot know how long his/her vector should be if he/she wants to set an uncertainty for each observation.

Maybe this should be a separate function to be used after sample_observations()? This would mostly influence the documentation, so no big issue. Maybe talk about this today.

PietrH commented 7 months ago

I've added unit tests, and changed some style things. Also added an extra assertion for the coords in meters argument.

One test still missing, I added an emtpy test as a reminder, but will probably not get to it this hackathon.

ToonVanDaele commented 7 months ago

Add coordinate_uncertainty

ToonVanDaele commented 7 months ago

add_coords_uncertainty