Displaying geometry dynamically generated, Select_multiple question type with map appearance

Hi everyone,

This is my first topic here ! I'm a new user of ODK Collect. For the past couple of weeks, I have learned many things on this forum but I didn't quite succeed to get all the answers I was looking for.

To give a little bit of context, among other things, our survey aims to better understand households' food procurement practices and how they combine with travel/displacements related to their other activities.

For this survey, questionnaires will be administered in person by interviewers, who will be equipped with a digital tablet. We chose to use ODK to take advantage of its mapping integration within the form.

In the form, one question is quite tricky :

  • We would like the respondant to draw, on a map, a complete "travel loop" of a chosen activity.
    • E.g., if the chosen activity is "work", the travel loop could be : home => work => bakery => kid's school => home.
  • On top of that, we would like to provide 3 features :
    1. Displaying geopoints/markers of "places of activity" generated from a previous question ;
    2. Providing an option to add a "place of activity" that had been forgot by the respondant in the previous question ;
    3. For each segment of the loop, we want to specify the mode of transport.

I tried to formulate those problematics in ODK language:

A. Displaying geometry dynamically generated in the form when capturing new points ;
B. Select_multiple question type with map appearance that form a geotrace or polygon ;
C. Adding informations for each segment of the geotrace/polygon ;
D. Providing an "add other place" or "add new place" option on a map appearance question.

And eventually, here is what the questionnaire looks like :

Begin_repeat "All the places"
Q1 - text - Please, list the locations of activity (or places of bussiness ? Not sure of the translation)
End_repeat "All the places"

Begin_repeat "Choice of activity_N°X"
Q2 - select_one - Choose one activity (e.g. : "work")

Begin_repeat "Travel loop activity X"
Q3 - select_multiple - Please, from home to home, select all the places for this travel loop of activity.
Q4 - select_one - Segment 1/2/3/4 : Please tell us the mode of transportation for each segment
End_repeat "Travel loop activity X"

End_repeat "Choice of activity"

And maybe one last thing, we strive to ensure the best possible user experience with the form to prevent respondent attrition and errors from interviewers.

Thanks in advance for all the support !

Florian.

Hi Florian,

I didn't know you were living in Montpellier since I read your introduction !
It seems like people from Montpellier really want to select multiple from map :sweat_smile:

Looking for some partial answers, I found this discussion to create options to select from a repeat group. You'll have to estimate the max number of facilities users wil plot...

I imagine, as in the given example, dynamically populate the geometry column of the choices list...

You use case could also be another scenario for this discussion :

Thank you so much Mathieu for thoses ideas !

I tried to dynamically populate the geometry column of the choices list but without success at the moment. I asked AI if it would be possible to do such a thing and here is the response I get :

”Based on the knowledge sources, dynamically populating a choices list geometry column from within the same form is not directly supported. Choice lists (whether in the choices tab, CSV, or GeoJSON) are static — their geometry values are defined at form design time, not at data collection time.”

I’m doubtful about this response because “label” column can be dynamic.

I didn’t find further informations about this subject… does anyone have insights ?

Here is the file with my try :

Dynamic_geo_choices_TRY.xlsx (11.3 KB)

@Florian_Etien and @mathieubossaert, do you two know each other in real life?!

Bienvenue, @Florian_Etien, nous sommes plusieurs francophones ici et nous acceptons volontiers un peu de français au besoin!

I haven't had a chance to think deeply about this yet but wanted to give a hint in case it might be able to get you going.

You can build a truly dynamic select from a repeat: https://docs.getodk.org/form-logic/#generating-select-ones-from-repeats You cannot use form references for the geometry column on the choices tab, only for the label column.

If the repeat has a question literally named geometry inside of it, then you can use the map appearance for the corresponding select and the repeat instances will be mapped. As @mathieubossaert has noted, though, there is currently no way to select multiple geometries from a map.

It's not currently possible to show already-captured geometry as context for capturing new geometry but we are starting work on that functionality very soon. You can learn more and share your thoughts at Display existing geometry when capturing new point/trace/shape on map - #15 by Aly_Blenkin

Pas encore Hélène !!! ODK power ! :laughing:

I discoverd it yesterday evening :shushing_face: (thanks to Florian's 'question and kapa agent) and tried with a "geometry" called question without success.
New successful try this mornig after I read you :
test_dyanmic_choices_with_geo.xlsx (188,7 Ko)

Hi there :slight_smile:

Thanks a lot for your answer LN !

Pas encore ! On s’est peut-être déjà croisé sans le savoir ^^

This tips is really cool ! And it works pretty well ! We are going to keep this solution for the moment.

I’m currently working on an entities’ based solution. Specifically, I’d like to split the form into two parts (registration/follow-up) so I can take advantage of the feature of creating and managing multiple entity lists within one form. I’m waiting for our ODK Central (v2025.4.2) to be updated so I can test this solution, and I’ll get back to you with my feedback.

Merci pour ce test Mathieu tu m’as fait gagner du temps ! Et ça fonctionne super bien :slight_smile:

Et moi j'ai appris quelquechose !

I talked to @Grzesiek2010 and @seadowg about timeline for this and they made me promise I wouldn't say anything more precise than "summer!"

That said, we should have something in beta within the next month and a half or so. It may not be fully complete but at that point we can discuss release plan in more detail. There are going to be all kinds of interesting cases related to repeats and Entity lists so if you're all able to test with your desired forms that will be very helpful.