
Split all geoshapes of a submission tibble into their components.
Source:R/handle_ru_geoshapes.R
      handle_ru_geoshapes.RdUsage
handle_ru_geoshapes(
  data,
  form_schema,
  wkt = FALSE,
  odkc_version = get_default_odkc_version(),
  verbose = get_ru_verbose()
)Arguments
- data
 Submissions rectangled into a tibble. E.g. the output of
- form_schema
 The
form_schemafor the submissions. E.g. the output ofruODK::form_schema().- wkt
 Whether geofields are GeoJSON (if FALSE) or WKT strings (if TRUE), default: FALSE.
- odkc_version
 The ODK Central version as a semantic version string (year.minor.patch), e.g. "2023.5.1". The version is shown on ODK Central's version page
/version.txt. Discard the "v".ruODKuses this parameter to adjust for breaking changes in ODK Central.Default:
get_default_odkc_versionor "2023.5.1" if unset.Set default
get_default_odkc_versionthroughru_setup(odkc_version="2023.5.1").See
vignette("Setup", package = "ruODK").- verbose
 Whether to display debug messages or not.
Read
vignette("setup", package = "ruODK")to learn howruODK's verbosity can be set globally or per function.
Value
The submissions tibble with all geoshapes retained in their original
format, plus columns of their first point's coordinate components as
provided by split_geoshape.
Details
For a given tibble of submissions, find all columns which are listed
in the form schema as type geoshape, and extract their components.
Extracted components are longitude (X), latitude (Y), altitude (Z, where
given), and accuracy (M, where given) of the first point of the geoshape.
The original column is retained to allow parsing into other spatially enabled formats.
See also
Other utilities:
attachment_get(),
attachment_link(),
attachment_url(),
drop_null_coords(),
form_schema_parse(),
get_one_attachment(),
get_one_submission(),
get_one_submission_att_list(),
get_one_submission_audit(),
handle_ru_attachments(),
handle_ru_datetimes(),
handle_ru_geopoints(),
handle_ru_geotraces(),
isodt_to_local(),
odata_submission_rectangle(),
predict_ruodk_name(),
prepend_uuid(),
split_geopoint(),
split_geoshape(),
split_geotrace(),
strip_uuid(),
tidyeval,
unnest_all()
Examples
if (FALSE) { # \dontrun{
library(magrittr)
data("geo_fs")
data("geo_wkt_raw")
data("geo_gj_raw")
# GeoJSON
geo_gj_parsed <- geo_gj_raw %>%
  ruODK::odata_submission_rectangle(form_schema = geo_fs) %>%
  ruODK::handle_ru_geoshapes(form_schema = geo_fs, wkt = FALSE)
dplyr::glimpse(geo_gj_parsed)
# WKT
geo_wkt_parsed <- geo_wkt_raw %>%
  ruODK::odata_submission_rectangle(form_schema = geo_fs) %>%
  ruODK::handle_ru_geoshapes(form_schema = geo_fs, wkt = TRUE)
dplyr::glimpse(geo_wkt_parsed)
} # }