split_geoshape fails to extract numeric coordinates of first point, while split_geotrace still works.
This stems from a recent fix in ODK Central 1.2, which now exports valid GeoJSON Polygons: https://github.com/getodk/central-backend/issues/322
Reproducible example
# Failing tests
expect_true(
gj_first_gt %>% magrittr::extract2(geofield_lon) %>% is.numeric(),
label = "split_geoshape casts extracted GeoJSON longitude to numeric"
)
expect_true(
gj_first_gt %>% magrittr::extract2(geofield_lat) %>% is.numeric(),
label = "split_geoshape casts extracted GeoJSON latitude to numeric"
)
expect_true(
gj_first_gt %>% magrittr::extract2(geofield_alt) %>% is.numeric(),
label = "split_geoshape casts extracted GeoJSON altitude to numeric"
)
# This should be the numeric longitude
R> gj_first_gt %>% magrittr::extract2(geofield_lon)
[[1]]
[[1]][[1]]
[1] 115.8835
[[1]][[2]]
[1] -31.99697
[[1]][[3]]
[1] 0
Session Info
```{r}
# utils::sessionInfo()
ruODK_0.10.2.9002
```
Problem
split_geoshape fails to extract numeric coordinates of first point, while split_geotrace still works. This stems from a recent fix in ODK Central 1.2, which now exports valid GeoJSON Polygons: https://github.com/getodk/central-backend/issues/322
Reproducible example
Session Info
```{r} # utils::sessionInfo() ruODK_0.10.2.9002 ```