Query Layer activity for multipoint
Hi,
Could you help me with adding multipoint to the Query Layer activity?
I use these activities:
1.Geometry Picker for more points
2.Project Geometry from Geometry Picker
3.Query Layer with the geometry from Project Geometry - but here is always only the first point from my points.
Should I rewrite the geometry from the all points to json and then use Get Geometry From JSON and then pass it to Query Layer?
Thanks,
Jana
-
Hi Marek,
That is a good suggestion. The other option, though not as clean, would be to run multiple query layers and combine the results.
Thanks, Stefan
0 -
Perhaps you can use:
Union Geometries Activity
0 -
I tried to feed Query Layer with geometry from json made from picked points but it didn't work (file is attached). Interesting that it works when I write point coordinates directly to Get Geometry From JSON:
={
points:[ [-757608,-975473], [-761043,-975192]
],
spatialReference:{wkid:102067}
}
0 -
Hi Marek,
I looked at the workflow you attached, and I think it might be an issue on the Get Geometry From JSON activity. This activity accepts either a json object or a string as an input, but the value it was provided with was a mix; the structure was a json object, but the $json_multipoint value inside it is a string.
I tried changing the input for the activity to a string expression instead, and it seems to work correctly:
=`{"points": [${$json_multipoint.result}], "spatialReference":{"wkid":102067}}`(if you're not familiar with the template literal format for writing string expressions, check out https://docs.geocortex.com/workflow/latest/help/Default.htm#wf5/help/expressions.htm#Use_String_Expressions%3FTocPath%3DExpressions%7C_____2)
0 -
Thanks for your advice, it works.
0
Please sign in to leave a comment.
Comments
5 comments