Geoshapes missing in the GeoJSON extract compared to XLS extract

Good day team

Writing out of a rural village in Uganda.
We collected different polygons by each interviewer with ODKCollect.
When reviewing the coordinates of the geoshape in the KoboToolBox interface, all 8 uploaded interviews show at least a set of coordinates saves in the geoshape column.
However when a GeoJSOn extract is generated, only some (6) of the interviews still show polygons upon visualistion. (using https://geojson.io).
We struggle to understand why for some interviewers the polygons no longer appear in the GeoJSON file.
Thank you
Koen

I can share the files however as new user that seems not yet possible on the forum…
Hereby the GeoJson extract:
{
“type”: “FeatureCollection”,
“name”: “260423”,
“features”: [
{“type”: “Feature”, “geometry”: {“type”: “Polygon”, “coordinates”: [[[31.9039148, 0.1774198, 1224.1], [31.9036701, 0.1773628, 1222.6], [31.9037467, 0.1770799, 1223.4], [31.9039391, 0.177089, 1223.7], [31.9039148, 0.1774198, 1224.1]]]}, “properties”: {“username”: “Alex”, “Plot1Area”: “0.21292081467719734”, “_uuid”: “732fbc3b-7306-4487-93a9-1d35a888e743”}},
{“type”: “Feature”, “geometry”: {“type”: “Polygon”, “coordinates”: [[[31.9037535, 0.1771045, 1208.2], [31.9039746, 0.1770443, 1207.9], [31.9039233, 0.1774037, 1209.5], [31.9036756, 0.1773115, 1210.6000000000001], [31.9037535, 0.1771045, 1208.2]]]}, “properties”: {“username”: “Allan”, “Plot1Area”: “0.20885084381288907”, “_uuid”: “055d6b4f-9bed-4d6f-9a14-5f2f63790b88”}},
{“type”: “Feature”, “geometry”: {“type”: “Polygon”, “coordinates”: [[[31.9039441, 0.1774187, 1212.5], [31.9036943, 0.1773605, 1209.1000000000001], [31.903755, 0.1770813, 1211.7], [31.9039913, 0.1771115, 1209.6000000000001], [31.9039441, 0.1774187, 1212.5]]]}, “properties”: {“username”: "Musabe ", “Plot1Area”: “0.2281547369891959”, “_uuid”: “cc6871eb-4560-4c16-ae26-f46769e398b2”}},
{“type”: “Feature”, “geometry”: {“type”: “Polygon”, “coordinates”: [[[31.9039676, 0.1770469, 1214.3], [31.9039272, 0.1774086, 1217.9], [31.9036783, 0.1773465, 1211.3], [31.9037622, 0.1770668, 1215.2], [31.903899, 0.1770415, 1212.0], [31.9039676, 0.1770469, 1214.3]]]}, “properties”: {“username”: “Priscah”, “Plot1Area”: “0.23357204084157343”, “_uuid”: “406fc9e6-a5c8-4c83-a472-6cc40f3e1ed0”}},
{“type”: “Feature”, “geometry”: {“type”: “Polygon”, “coordinates”: [[[31.9039433, 0.1772767, 1226.0], [31.903932, 0.1773568, 1226.0], [31.9036739, 0.1773657, 0.0], [31.9037114, 0.1772755, 0.0], [31.9037373, 0.1771619, 0.0], [31.9038813, 0.1770898, 0.0], [31.9039433, 0.1772767, 1226.0]]]}, “properties”: {“username”: "KHADIJAH ", “Plot1Area”: “0.15380477239145357”, “_uuid”: “a653b92a-a597-4a1a-bcd8-669760b94b3b”}},
{“type”: “Feature”, “geometry”: {“type”: “Polygon”, “coordinates”: [[[31.9036693, 0.1773388, 1208.4864501953125], [31.9036769, 0.1773273, 1209.6474609375], [31.9037426, 0.1770503, 1210.8897705078125], [31.9039961, 0.1770516, 1200.274658203125], [31.9039797, 0.1770938, 1202.9326171875], [31.9036693, 0.1773388, 1208.4864501953125]]]}, “properties”: {“username”: "Rosemary ", “Plot1Area”: “0.12540724699104527”, “_uuid”: “7a69c39d-6cef-4830-a6af-72ecd0fc256f”}}
]
}

Welcome to the community, @koensneyers! Could you check out the _id for those two submissions where you feel the data is incomplete in the geojson format? You could have a look at these cases closely in the XLS format

Good day Mr Kal

Great to hear from you about the geoshape extraction issue.

The _uuid names look fine at first sight.
Allow me to copy them below with the highlighted ones which are missing (4th and 6th in line).

_uuid
732fbc3b-7306-4487-93a9-1d35a888e743
055d6b4f-9bed-4d6f-9a14-5f2f63790b88
cc6871eb-4560-4c16-ae26-f46769e398b2
c04d7149-8c0b-45e3-bce6-8eda7464f1c3
406fc9e6-a5c8-4c83-a472-6cc40f3e1ed0
cec7db74-faa6-42c5-b135-ca61c8979546
a653b92a-a597-4a1a-bcd8-669760b94b3b
7a69c39d-6cef-4830-a6af-72ecd0fc256f

260423_-latest_version-labels-_2023-04-27-06-43-17 (2).xlsx|attachment (6.0 KB)

Above I uploaded the XLS file also.
For the GeoJSON the platform does not allow to upload this file type, however I refer to the extract of the file in my first post.
As our survey continues, the issue also continues to escalate with about 1/3 polygons not appearing in the extract. Still hoping for your guidance how to address this inconsistency.
Thank you

thanks for sharing. i am also facing same issue.

@koensneyers, so you mean the yellow highlighted submissions are missing with the geojson download?

Hello sir, correct. For example the coordinates for user Patience do not appear in the GeoJSON file.
You can check the extract posted above.
From the look of the data, there seems to be no good reason why some polygons are absent.
This also occurs on a much larger scale with our full dataset…

Would you like me to share more examples or even share the GeoJSON file with you?
Eager to hear your suggestions please…

Hi @koensneyers

Not sure if it’ll be useful and if R is an option for you. I recently support for WKT for all spatial question types (geoshape, geotrace and geopoint).

We can turn to a simple feature in R and exports it to various format including GeoJSON.

This is a dummy example with a simple project, with geoshape_col being the variable name associated to your geoshape question.

library(robotoolbox)
library(tidyverse)
library(sf)

kobo_setup(url = "xxxxxxxxxxxx", token = "xxxxxxxxxxxxxxx")
uid <- "xxxxxxxxxxxxxxxxxxxxxxx"
data <- kobo_data(uid)

data_sf <- st_as_asf(drop_na(data,  geoshape_col_wkt),
                     wkt = "geoshape_col_wkt", crs = 4326)

## Export the data
write_sf(data_sf, "./test.geojson")

More info here

Just disregard this solution if R is not an option of course.

Best,

Dear Dickoa,
Very kind to support us however personally I do not have any R* exeperience.
Instead I wonder if there is a simply formula to use in a spreadsheet like MsExcel to convert the polygon coordinate set into a GeoJSON or KML file?

i am stil facing the issue. what to do.

Dear Dickoa,
Very kind to support us, however personally I do not have any R. exeperience.
Instead I wonder if there is a simply formula, to use in a spreadsheet like MsExcel to convert the polygon coordinate set into a GeoJSON or KML file.