hello everyone, I would like to know if it is possible to display the entities on the map according to a radius around the collector.
example display all entities that are 10 meters from the collector.
If it is possible how to do it?
hello everyone, I would like to know if it is possible to display the entities on the map according to a radius around the collector.
example display all entities that are 10 meters from the collector.
If it is possible how to do it?
Hello @steeve_kevin ,
not in an easy way. I tried something that woks on grids but it is really not clean nor efficient :
So I calculate the longitude and latitude of the geopoint and I filter the places to show on their own long / lat values...
In a secondary version I compare the actual position and the boundings coordinates of the select objects.
Tell me if it is not that clear...
We agree that such a capability, to filter features with the actual location, in a transparent (no geopoint needed), efficient (indexed) way would be great
Thanks @mathieubossaert please I can see your solution I would like to test it and if possible make an improvement
of course !
Here it is, compliant with the extraordinary xlsform tamplate
filter_on_location.zip (366,6 Ko)
Please share any trick or improvement
This is likely not performant enough for your needs, especially given @steeve_kevin's 180,000 points (!), but have either of you tried a choice filter of distance(geometry, ${current_location}) < 10
where current_location
would be a geopoint question?
I just tried but I can't make it run @LN.
Distance asks for one parameter.
I tried to concatenate both points as shown in the documentation : https://docs.getodk.org/form-operators-functions/#id22
distance(concat(geometry,’ ; ‘,${point})) < ${tolerance}
But now get an error saying the function distance requires a field as a parameter.
Now I remember I fried before I used coordinates calculation.
But your optimism with the distance function make me think it is possible and I am misusing the function.
Sadly my optimism was misplaced. I did not realize that the geo functions only accept nodeset arguments. I've filed an issue to explore changing that: https://github.com/getodk/javarosa/issues/740
Is there no possibility to "cast" a string to a node-set? (Something like a make_instance function ). This could help in other contexts too.