ODK Collect v2022.2 Beta: select from map, geojson datasets

The GeoJSON parser seems to freak out if an attribute in a geojson is null, like

"name:ja": null,

Replacing all unquoted nulls with a pair of double-quotes avoids the problem, this works:

"name:ja": "",

So for now if you have attributes in the GeoJSON that are not filled out for all features, you might need to replace the nulls with empty strings.

Additionally (I think this one is already known; pardon me if I'm repeating already-reported issues): if the list of attributes is too long, the Select button at the bottom of the list goes off the bottom of the screen and can't be reached. So I trim the number of attribute fields.

Here's a working GeoJSON that I created by:

[out:json][timeout:200];
(
  nwr["building"]({{bbox}});
);
out body;
>;
out body;

as GeoJSON.

  • Then pulling the polygons from the JSON into QGIS, creating centroids, and saving as GeoJSON with only a few fields (id, name, amenity, building, etc).

  • Then manually editing the GeoJSON to remove the layer attributes (as per previous post; removing everything between "type": FeatureCollection", and "features": [.

  • Then global replace-string of null with "".

And voila, it works with the (extremely basic) xlsform attached.

map_osm_buildings_in_odk.xlsx (9.3 KB)

buildings.zip (6.8 KB)

2 Likes