-
Notifications
You must be signed in to change notification settings - Fork 158
Description
Our surveys have a question type we call "planning unit". The way it works is that we create a GeoJSON FeatureCollection[1] where each feature is a grid rectangle (but they could really be any shape), and then the respondent selects a particular unit (or group of units for a multivalued question type) by pointing to the feature on the map[2].
We would like to explore the effort needed to extend Formhub and Enketo to support this question type (actually 2, a single and multiple selection version). I'm interested in doing this right, in such a way that it can be adopted out later, but I'm also very new to the ecosystem so don't have a good idea of whether an implementation would require changing more than just Formhub and enketo-legacy code. Reading through the ODK Developers thread discussing geotrace and geoshape for background.
Guidance?
Sketch of an implementation spec:
- Field types geofeatureselect and geofeatureselectgroup (unless there's a way to make the UI nice by special-casing the handling of the repeat tag to just show a single map widget using appearance).
- Add GeoJSON file containing features as a Media File (Supplementary Files must be CSV, yes?) and reference in field definition calculate field similar to [
pulldata](http://xlsform.org/#pre-loading csv data), something likepullfeatures('my_features.json').
Any major issues with this sketch? Suggestions to improve?
[1] Such as with geojson.io
[2] Our current implementation uses Open Layers 2