hotosm / fmtm

Field Mapping Tasking Manager - coordinated field mapping.
https://fmtm.hotosm.org/
GNU Affero General Public License v3.0
42 stars 45 forks source link

Support multiple feature selection within single form submission #1653

Open manjitapandey opened 1 month ago

manjitapandey commented 1 month ago

Is your feature request related to a problem? Please describe. I am trying to upload xlsx file where there is the need for selection of more than one feature. The building feature and road connecting that building. The another case could be selection of main building in case we are surveying associated building.

Describe the solution you'd like User should be allowed to select multiple features. This increases the use case on FMTM for multiple field surveying scenario. May be we could store the geojson of only the entity we are surveying and in case of main feature, we can just store the feature id.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context This is the user's requirement from the Janakpur field mapping activity. Survey_ready_form (12).zip

manjitapandey commented 1 month ago

@Sujanadh , @spwoodcock , need your suggestions on how can we technically achieve this on FMTM.

Sujanadh commented 1 month ago

I think we can add geopoint of the main building for the survey of its associate buildings and select the geometry of the associate building.

spwoodcock commented 1 month ago

My knowledge of the use case is hazy, but as Sujan says one option and probably the best solution for selecting 'associated' features, is to add a geopoint question in the XLSForm asking the user to 'pinpoint associated feature' on the map.

It is possible to enable select_multiple_from_file, but then you would have to distinguish somehow which is the 'main' building being mapped and which is the 'associated'.

If we need the select_multiple capability for something then we can explore this option further.

Otherwise if it's just an issue of form design using geopoints, I think this issue could be closed (maybe we add docs on how to do this)

manjitapandey commented 1 month ago

@spwoodcock, the use case here is that user should be able to select associated building as well as the main building which is also present within the same geojson file. Moreover, They also needs to select the road (linear feature) associated with the building from the same geojson. This means we should allow user to select multiple feature.

It is possible to enable select_multiple_from_file, but then you would have to distinguish somehow which is the 'main' building being mapped and which is the 'associated'.

Exactly, Enabling "Select_multiple_from_file" solves the problem. How do we distinguish which is the main building being mapped and which one is associated.

spwoodcock commented 1 month ago

We need to fit around what XLSForms and ODK Collect support, and as far as my knowledge goes we can't distinguish between the geometries using select_multiple_from_file.

We could do one of the following:

As for supporting mixed geometry type - this is something we don't support in FMTM yet and I'm not sure how much effort it would take. In theory I don't see why it would not work (as Entity geometries are simply a javarosa geometry string of any type).

They are two separate issues and should be split 👍

Is this really a priority:high issue that is essential for most users though, or is this an edge case that would be excellent to support, but not the main priority of FMTM?

manjitapandey commented 1 month ago
  • Use multiple select_one_from_file fields: one of the primary feature, another for an associated feature.

I would go with this option of selecting one from file for multiple times. For supporting mixed geometry type, We should definitely create another issue but we need to confirm first, which may take more time. Hence, We could only work on supporting multiple "select_one_from_file" for now.

spwoodcock commented 2 weeks ago

My knowledge of this was hazy previously but I have more clarity now.

This was a requirement for the Janakpur field survey a while ago too.

We can achieve like this:

Tasks:

We should probably include this in the project creation overhaul!

If we create a stub project first (there is an issue for this #1291), then we can upload as many Entity lists during project creation as we need