Hey,
I'm looking to pull up the records of any survey123 reports that fall within 100m of a certain location. I can't seem to get the query to work. I insert a location that has one record less than a meter away and the query returns nothing. It isn't a public feature service but here's a screenshot of what I've entered:
I've also flipped the coordinates around and still no luck.
Thanks,
Jon
Solved! Go to Solution.
Hey Jake,
I got it to work, I originally jumped straight to using Within but when I did that sample service you had there I left it on Intersects and got a count of 2. When I changed it to Within it came back with no records. So I switched mine to Intersects and worked fine. I should have gave it a go without looking too far into it first lol. Thanks for all the help!
Hi @Jonathan1517 , what is the coordinate system of your service? The coordinates you are specifying are WGS 84. However, these will default to whatever your coordinate system of your service is in. Try specifying 4326 for the Input Spatial Reference parameter.
Hey @JakeSkinner, I forgot to fill that in in the screenshot but I do have that filled and also ended up getting no results.
1. What is the coordinate system of the service? Have you tried using the same coordinate type (i.e. meters)?
2. What is the geometry type of the service? i.e. polygon If you are working with polygons or lines, have you tried changing the Spatial Relationship to Intersects?
1.
I'm gonna try a different coordinate system here now to see if that works.
2. It's just a point layer. I did some searching around and found that the within works for points.
Here is a service you can test with:
https://sampleserver6.arcgisonline.com/arcgis/rest/services/DamageAssessment/FeatureServer/0/query
Input Geometry: -100.3858152,38.4981439
Spatial Reference: 4326
Distance: 2000
Units: Meters
This should return 2 points.
Hey Jake,
I got it to work, I originally jumped straight to using Within but when I did that sample service you had there I left it on Intersects and got a count of 2. When I changed it to Within it came back with no records. So I switched mine to Intersects and worked fine. I should have gave it a go without looking too far into it first lol. Thanks for all the help!