Hi All,
I’m working on a Survey123 survey to capture the tree canopy based on the centroid (Lat, Long), Norh, South, East and West distances in meters. The idea is the mobile worker locates a point in the map and add the other fours readings manually (N,S, E, W) in meters and Survey123 would create a Bezier polygon (spline polygon) based on the readings.
After doing some research, I think this could be possible by using JavaScript functions in Survey123 connect app. Some examples can be found here: https://community.esri.com/t5/arcgis-survey123-blog/extending-survey123-smart-forms-with-custom-js/b...
The ConvexHull example (script attached for reference) could be a good starting point to modify the code but I’m after a Bezier polygon instead of ConvexHull,
Below an example of the ConvexHull javascript example by ESRI:
Below an example of spline curve (not closed) although my aim is having a close smooth polygon:
Any idea how to achieve this?
Thanks 😊
Hi. Creating the bezier curve using JS will be quite a fun challenge! Check this out: https://javascript.info/bezier-curve
Alternatively, you can also take advantage of a couple of features that may work for your use case:
In your geoshape question type try the different body::esri:style methods available:
You can also try the streaming method as described here: https://doc.arcgis.com/en/survey123/desktop/create-surveys/geotracegeoshape.htm With streaming, mobile users can create a polygon or line while they walk.