Hi to all,
is it possible to add a buffer tool on a Suvey123 Map? I would like to draw a buffer (radius 100m) on my position when the user click on a button. The buffer should be stay fixed on map and erased when the user click on another button. How Can I implement this function?
Thanks to all
Hi Michelle
Currently we don't support this functionality. I could get this added as an enhancement request - but in order to do so, could you provide more details of your workflow and what you are trying to acheive.
Thanks
John
Hi John,
in our application surveyors go into field to sample trees and plants. They wants create a buffer on the map because they wants move inside it. The law imposes samples along 100m from sick plant. Inside our organization does we can modify the source code for this need?
Michele
I developed some Javascript functions to create a buffer around a point/current position. This script uses the UTM coordinates from the point, calculates the UTM coordinates of 360 points around it, converts them all to Lat/Lon and creates a text string to be used in the geoshape Calculate column. You will need to save the .txt file as .js because javascript attachments are surprisingly not supported here.Please note that this script is not perfect and can be improved. It can also be used in a Repeat to create multiple buffers around the center point.
Daniel Dery
WOW, and thank you @DanielDery that looks sexy.
Good Morning Daniel! We love this approach and gave it a try in one of our org's surveys, but we can't get the desired results. We tried on a blank survey as well using the files provided and could not replicate that either. If you're able to take a look at our survey file, do you see any glaring issues? Thanks in advance for any advice!
Not sure if you're still looking for a solution, but I got it working on Survey123Connect 3.18 with a few tweaks.
I attached my modification of the script below, but I did shrink the script down to a single function so it will look different, but it's doing the same thing. No guarantee it will work, but I also ran into a few issues, but this solution is possible with a little tweaking and experimentation with the script.
Thank you, @DanielDery and @rrhee_bcfpd!
I'm having a weird issue. OB1, you're my only hope.
I'm using the form and the updated code from above, but my buffer isn't around my point in Beaumont, CA; it's in Arkansas. Have you encountered this issue before, and if so, how did you resolve it?
Oops, looks like I was a bit short-sighted on my last post, and I hard-coded my UTM zone instead of leaving that as a function parameter. Likewise, I also scratched the part of the script that accounts for northern/southern hemispheres for simplicity, so that would require some modification for use in the southern hemisphere.
For the UTM zone, just replace:
Alternatively, if you know that all of your operations are occurring in the same UTM Zone (like I did), you can simplify the script and ignore step 1 and 3 and just swap out the two "15" values in step 2 with "11" for California.
Thank you for your quick response. I'm relearning scripting and missed the hard-coding.
My team at ERM made some changes to get this to work for us (we opened it up for the US.
This is great work! Has anyone successfully applied this method to buffer a line?
Not 100% sure, but it might be possible. You would need to find a way to pull an array of coordinates for all vertices in your line or use repeat geopoint questions to construct that array and the geotrace simultaneously (https://community.esri.com/t5/arcgis-survey123-questions/exposing-geotrace-and-geoshape-vertices-for/td-p/1283989). JavaScript would then need to loop through that array to determine each vertex in the buffer polygon. However, the script would get substantially more complex if it needs to handle parsing the correct angle for each vertex to buffer out along.
If it's not required to see the buffer on the same form as the one you're collecting the line on, you can use webhooks to trigger a function hosted on AWS or Azure to generate the buffer after the survey is submitted, or even use PowerAutomate or Make.com to make a series of requests to the ArcGIS REST API's buffer & edit endpoints with JSON parsing between each step.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.