-
Notifications
You must be signed in to change notification settings - Fork 163
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
Geo vector feature selection field type? #1348
Comments
Cool stuff. Not sure if this requires any changes on the formhub side. On the enketo side:
|
Thanks for the guidance, this is enormously helpful.
Assuming the initial implementation targets enketo-legacy, would it be
In our current implementation we just capture the ID(s) of the selected
This seems like a pretty expedient approach, thanks so much for suggesting |
Yes, but currently this file won't be automatically added to the ApplicationCache. Actually, if feasible, I would consider adding the geo shapes to the XForm itself (not as external data). I also wonder if it makes sense to use the existing geoshape format instead of GeoJSON. It make the widget simpler as you could use the current geowidget as a basis (as this will already be able to display geoshapes in this format). With the above, and using select and select-one with appearance="geoshape", your project could perhaps be reduced to simply creating a new enketo-core widget and nothing else (I would then be very interested in a pull request). I may be overlooking something though and you may need to use a handcrafted XPath expression in your form to obtain the id from the selected geoshape.
If external data is required, it would be nice to use a format that can easily be converted to XML (XML itself would be best), in order to be able to use plain XPath (or some custom XPath function) to obtain the required values from it. |
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:
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
The text was updated successfully, but these errors were encountered: