GeoJSON export with area in repeated group

Hi!
I have known about KoboToolbox for a long time although I haven’t used it much, but I really love this tool!

I have an issue exporting the GeoJSON data of a form with an area element into a repeated group. The result is basically empty.
Exporting the same form as xls it works properly (creating a dedicated sheet for the group).

I also tried creating a form without a repeated group and the GeoJSON export works properly.

Can you help me?
Thanks in advance!

Welcome to the community, @mgiacomozzirc! Thank you for bringing this to our attention. Let me confirm with our team to see if this is something missing or was not set up previously. However, as a workaround, you could do the following to get the GPS data in JSON format:

  • Download your data in XLS format (where the GPS data is within the repeat group).
  • Keep the repeat group sheet that has the GPS data and remove all the other sheets that you do not need at the moment. At this stage, you could also trim your unwanted variables so that you only keep the variables that you need.
  • Save the XLS file (with all the changes you made).
  • There are many XLS to JSON online converter. You could use any one of them that is available and you prefer. I chose this one randomly and it worked for me.

Sample XLS File:

Repeat GPS.xlsx (8.5 KB)

Sample JSON File (converted):

"Repeat":[
 {
  "GPS": "27.614451 85.324956 0 0",
  "_GPS_latitude": "27.614451",
  "_GPS_longitude": "85.324956",
  "_index": 1
 },
 {
  "GPS": "27.615287 85.323925 0 0",
  "_GPS_latitude": "27.615287",
  "_GPS_longitude": "85.323925",
  "_index": 2
 },
 {
  "GPS": "14.43468 22.918803 0 0",
  "_GPS_latitude": "14.43468",
  "_GPS_longitude": "22.918803",
  "_index": 3
 },
 {
  "GPS": "27.614527 85.324956 0 0",
  "_GPS_latitude": "27.614527",
  "_GPS_longitude": "85.324956",
  "_index": 4
 },
 {
  "GPS": "-6.769369 18.696186 0 0",
  "_GPS_latitude": "-6.769369",
  "_GPS_longitude": "18.696186",
  "_index": 5
 },
 {
  "GPS": "-14.445984 -56.899851 0 0",
  "_GPS_latitude": "-14.445984",
  "_GPS_longitude": "-56.899851",
  "_index": 6
 }
]
}```

**Note:** All the GPS points shared here are randomly generated geopoints.

Hello! Unfortunately, we do not support repeating groups in GeoJSON exports at this time:


(Source: https://kf.kobotoolbox.org/api/v2/assets/<your asset UID>/data/)

You would be most welcome to suggest an improvement to KoboToolbox in our Suggestion Box. Do you have ideas of how the repeating group responses would be structured in the GeoJSON?

1 Like

Thank you so much for the quick answer.

I think that I will use something like @Kal_Lam suggestion, but I need something a little bit more complex because I have a polygon (“area” element type) and also because I need to make it periodically.

@jnm Let me investigate a little bit more before suggest the improvement, honestly I’m not very familiar with the geoJSON format.

Thanks!

2 Likes