Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GeoJSON support #321

Open
latin-panda opened this issue Mar 3, 2025 · 1 comment
Open

Add GeoJSON support #321

latin-panda opened this issue Mar 3, 2025 · 1 comment

Comments

@latin-panda
Copy link
Collaborator

Useful links

Description

The default Geopoint question type was added as part of this work. It must support GeoJSON, too.

Evaluate the codec and see how to fit GeoJSON; maybe external secondary serialization to use the same encoding logic.

@lognaturel
Copy link
Member

lognaturel commented Mar 3, 2025

I believe there's already support for geojson external secondary instances! There are two aspects to that:

  • properties are made available like they would be for a CSV attachment or internal choice list
  • geometry is made available through a special well-known geometry property

You can validate that the former is working by doing a select_one_from_file on a geojson file like cities.geojson.zip. You should see a list of all options.

For the second, let's say you have that select_one_from_file cities.geojson and the field name is city. You should be able to do something like have a calculate on a geopoint question with calculation instance('cities')/root/item[name = ${city}]/geometry and the geopoint question should show the location of the selected city. It's possible this second part doesn't work yet, I'm not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

2 participants