If there are missing coordinates:
Should camtrapdp
- throw an error eg when rounding coordinates
- only warn and do the calculations or updates ignoring the na's
2 case studies so far
Case study 1
A Camtrap DP with missing coordinates in 1 deployment.
Calling round_coordinates() results in a non-specific error:
dataset <-
dataset %>%
camtrapdp::round_coordinates(digits = 3)
> Error in if (digits >= original_digits) { :
> missing value where TRUE/FALSE needed
Case study 2
A Camtrap DP with missing coordinates in 1 deployment.
The DP is read and manipulated with camtrapdp. Eg some observations were filtered out. It is written to disk. Frictionless validation fails because the spatial metadata has been updated automatically and set to NA:
───────────────────────────────────────────────────────────────────────────────────────── Tables ──────────────────────────────────────────────────────────────────────────────────────────
dataset
┏━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Row ┃ Field ┃ Type ┃ Message ┃
┡━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ None │ None │ package-error │ The data package has an error: {'type': 'Polygon', 'coordinates': [[[None, None], [None, None], [None, None], [None, None], [None, None]]]} is not valid │
│ │ │ │ under any of the given schemas at property 'spatial' │
└──────┴───────┴───────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
If there are missing coordinates:
Should camtrapdp
2 case studies so far
Case study 1
A Camtrap DP with missing coordinates in 1 deployment.
Calling
round_coordinates()results in a non-specific error:Case study 2
A Camtrap DP with missing coordinates in 1 deployment.
The DP is read and manipulated with camtrapdp. Eg some observations were filtered out. It is written to disk. Frictionless validation fails because the spatial metadata has been updated automatically and set to
NA: