Hi!
I need to use the parameter geo_question_name in a query with the API. I need to apply different geometries for some features. I appreciate some help with an example.
Hi!
I need to use the parameter geo_question_name in a query with the API. I need to apply different geometries for some features. I appreciate some help with an example.
Welcome to the community, @adchp! Is geo_question_name
a variable name in your case?
I found this in the API documentation:
About the GeoJSON format
Requesting the
geojson
format returns aFeatureCollection
where each submission is aFeature
. If your form has multiple geographic questions, use thegeo_question_name
query parameter to determine which question’s responses populate thegeometry
for eachFeature
; otherwise, the first geographic question is used. All question/response pairs are included in theproperties
of eachFeature
, but repeating groups are omitted.Question types are mapped to GeoJSON geometry types as follows:
geopoint
toPoint
;geotrace
toLineString
;geoshape
toPolygon
.
But I already have the solution. The geo_question_name parameter must be used as the following example:
https://[kpi-url]/api/v2/assets/[asset-uid]/data.geojson/?geo_question_name=[name of the geographic question]
This will return a GeoJSON file with the type of geometry that you need.
Thank you for sharing your solution