-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle all location types: geopoint, geotrace, geoshape #69
Labels
Milestone
Comments
florianm
pushed a commit
that referenced
this issue
May 14, 2020
* add new test form `fid_wkt` containing geopoints, geotraces, geoshapes with each widget appearance * add test form to settings, settings tests, instructions to contributing * odata_submission_rectangle now takes a form_schema (and passes it on to unnest_all) to exempt geo{point, trace, shape} from unnesting * geo fields GeoJSON become nested lists, geo fields WKT remain character strings * TODO: add handlers to value-add geo fields
This was referenced May 15, 2020
Closed
florianm
pushed a commit
that referenced
this issue
May 18, 2020
* odata_submission_rectangle takes param form_schema to prevent unnesting of GeoJSON (nested list of fixed (geopoint) or arbitrary (geotrace, -shape) length == rectangling drama) * odata_submission_get handballs all geopoint business to handle_ru_geopoints * handle_ru_geopoints takes param form_schema to infer geopoint fields and wkt to tell split_geopoint whether to expect GeoJSON or WKT * split_geopint takes param wkt from handle_ru_geopoints * geopoint tests refactored Remaining work: geotrace and geoshape
florianm
pushed a commit
that referenced
this issue
May 18, 2020
florianm
pushed a commit
that referenced
this issue
May 18, 2020
florianm
pushed a commit
that referenced
this issue
May 19, 2020
* handle_ru_geotrace() retains original format (GeoJSON or WKT) and extracts lon, lat, alt from the first point of the geotrace. * Add package data with example geofields, use in tests and examples, document * Add source for geolocation test form as odkbuild and xml * Add ODKC_TEST_FID_WKT to GHA * RMD skeleton updated with comments re geofields * Bump dev version
florianm
pushed a commit
that referenced
this issue
May 19, 2020
* bump version * handle_ru_geoshape, split_geoshape work very similar to geotrace equivalents * refactor tests * update packaged geofields test data with parsed geoshape * make_data: bugfix geo_fs: set form_schema
Current status:
This issue could make it into ropensci/software-review#335 |
florianm
pushed a commit
that referenced
this issue
May 19, 2020
* streamline spatial bits * insert comments on how to split up and simplify vignettes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Spatial musings
ODK Collect can capture points (geopoints), lines (geotrace), and polygons (geoshape).
ODK Central's 0.7 OData submissions export geopoints either as GeoJSON (ODK Central and ruODK default) or WKT.
ODK Central's 0.7 OData submissions export geotrace and geoshape always as GeoJSON.
Since v0.8, GeoJSON and WKT export seems to work across all geo field types.
What does a data analyst want to do with each location type?
How much parsing should ruODK provide?
As a data analyst, I need to:
Which formats should ruODK output:
Implementation
Current behaviour
Suggested new behaviour (discuss)
Probably out of scope
Challenges
odata_submission_rectangle
needs to exempt geo{point, trace, shape} from unnestingodata_submission_rectangle
will blindly (as it has no form introspection ...yet) unnest any list column. This works OK-ish for GeoJSON points as these have a set length. Unnesting geotraces and geoshapes will inevitably end in tears over their variable number of points.This means that
odata_submission_get(parse = TRUE, wkt = FALSE)
will fail with geotraces or geoshapes.Therefore
odata_submission_rectangle
needs a parameterform_schema = NULL
to pass an optional form schema, extract field names of geo{point, trace, shape}s, and exempt those from rectangling. This would preserve GeoJSON and parse GeoJSON into list columns, which then could be further parsed into spatial classes.Getting too funky with spatial classes will add dependencies
Downside: sf, st, rgdal, rgeos dependencies could be a pain for users to install.
Upside: Adding some nice helpers and working examples (mapping, spatial operations, coordinate extraction) would be immensely useful to less spatially versed R users.
Testing
Test form: https://sandbox.central.getodk.org/#/projects/14/forms/build_Locations_1589344221/submissions
Added to CONTRIBUTING.md / Test:
As DBCA still runs a production server on ODK Central v0.6, and the spatial output has changed since then, I will address this issue after migrating our server. ETA mid 2020.
Checklist
Once spatial parsing has changed, make sure to update all the docs and examples.
The text was updated successfully, but these errors were encountered: