Adding existing Polygons to the Map

1. What is the issue? Please be detailed.
Hello. I am developing a crowdsourcing app where users are going to validate the polygons on the map in the woods to which they can navigate in the map and they will validate, if there was any specific forest cut or similar occurence. The polygons were made with remote sensing and are primarily shapefiles but I can also export them as geojson.

2. What steps can we take to reproduce this issue?
Please recheck my xls file

3. What have you tried to fix the issue?
I searched for tutorials of how to import the polygons as geojson and although I manage to import the file correctly, later unfortunately it never works when I open the app. I tried with polygons and I tried with points as well and I
always get some specific error. I tried with CSV as well and it also does not work.

4. Upload any forms or screenshots you can share publicly below.

Hi @luna_ricky_tavi !

Welcome to the ODK community. When you get a chance, please introduce yourself here and if you don't mind, don't hesitate to use a picture for your profile as it helps to build the community ;-).

You forgot it. Could you share your geojson too, or at least a part of it ?
Maybe it simply contains non simple geometries...

Do your polyhones include a last (closing) element which is identical to the first element? See https://docs.getodk.org/form-question-types/#geoshape.

Thank you for your reply. Yes I can share you my xls file and geojson file:

DeFree_crowdsourcing.xlsx (633.8 KB)

download: because I cannot upload geojson file I renamed the file to .json; but actually it is .geojson file and you need to rename the file back once you downloaded it!!!
dimbokro_poly - Copy.json (78.1 KB)

Thank you for your support!

Hi @luna_ricky_tavi
as the error says we only support Points, LineStrings and Polygons but your file uses MultiPolygon types.

1 Like

You'll also need to set the appearence of the select_one_from_file to map.
And to set the title column :

1 Like

Thank you very much !! PROBLEM SOLVED!

  1. The problem was really that my polygons were Multipolygons and I was able to change them to normal Polygons with QGIS using ,,Multipart to Singlepart" Tool. However this tool works only if you use it on already exported .GEOJSON file.

2.The .GEOJSON file needs to have ID and TITLE columns in the array table! and you need to specify them in the xls file in the parameters column as follows: value=id, label=title
Furthermore the appearance needs to be set on maps

  1. To be able to see the polygons in the map you need to specify the coordinate system of the .GEOJSON file. The EPSG: 4326, which shows longitude and latitude in the positions is the right one.

The result is shown in the picture:

I hope with this, I will be able to help also other people struggling with the same issue in the community.

3 Likes