Multipolygon support in geoshape?

Hello,

I was wondering if there is a way to allow multiple polygons to be drawn on the map at the same time.. The use case is land use, e.g. to identify certain crop types on the map. It is quite tedious to add a repeat group for every field of the same crop. It would be nice if there was a way to identify all fields of the same crop in one go using a multi-polygon. Can this be done?

Sort answer: no, there is no ‘array of {...}’ data type in XForms [other than perhaps the pseudo-array of strings used to encode select-multis]. So either you’ll need to use repeat groups, or somehow make a single geoshape polygon to capture everything (eg joining each perimeter with a really thin line...)

Thanks Gareth,

But could it not be saved in WKT format? WKT supports multi polygons. And if I remember correctly geoodk used to be able to do it too (?)

WKT is certainly not out of the realm of possibility for ODK Collect, just AFAIK its not a current supported feature and there's nothing currently in the development pipeline to add it. But if the likes of GeoODK already supports it then perhaps there's some existing code we could pull in... And I see there's already been previous discussion around this, here, so perhaps followup in that thread and see if you can get more traction on turning it into a reality!

Thanks for the feedback and link. Will try :slight_smile: