View source: R/handle_ru_geopoints.R
handle_ru_geopoints | R Documentation |
handle_ru_geopoints(data, form_schema, wkt = FALSE, verbose = get_ru_verbose())
data |
Submissions rectangled into a tibble. E.g. the output of ruODK::odata_submission_get(parse = FALSE) %>% ruODK::odata_submission_rectangle() |
form_schema |
The |
wkt |
Whether geofields are GeoJSON (if FALSE) or WKT strings (if TRUE), default: FALSE. |
verbose |
Whether to display debug messages or not. Read |
For a given tibble of submissions, find all columns which are listed
in the form schema as type geopoint
, and extract their components.
Extracted components are longitude (X), latitude (Y), altitude (Z, where
given), and accuracy (M, where given).
The original column is retained to allow parsing into other spatially enabled formats.
The submissions tibble with all geopoints retained in their original
format, plus columns of their coordinate components as provided by
split_geopoint
.
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_geoshapes()
,
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()
library(magrittr)
data("geo_fs")
data("geo_gj_raw")
data("geo_wkt_raw")
# GeoJSON
geo_gj_parsed <- geo_gj_raw %>%
ruODK::odata_submission_rectangle(form_schema = geo_fs) %>%
ruODK::handle_ru_geopoints(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_geopoints(form_schema = geo_fs, wkt = TRUE)
dplyr::glimpse(geo_wkt_parsed)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.