I am trying to extract the coordinates of the first and last vertices of a geotrace (mode=vertex).
I think that the best solution is to use a custom Javascript function but I was not able to get it working. I did not find enough documentation on how to handle geotrace geometry in javascript for Survey123 Connect.
Does someone know how to create such a function? Is there a work around?
type | name | label | calculation |
geotrace | transect | Transect | |
decimal | UTM_X_start | UTM_X_start | pulldata("@javascript","get_coordinates.js","getCoordinates_X_start",${transect}) |
decimal | UTM_Y_start | UTM_Y_start | pulldata("@javascript","get_coordinates.js","getCoordinates_Y_start",${transect}) |
decimal | UTM_X_end | UTM_X_end | pulldata("@javascript","get_coordinates.js","getCoordinates_X_end",${transect}) |
decimal | UTM_Y_end | UTM_Y_end | pulldata("@javascript","get_coordinates.js","getCoordinates_Y_end",${transect}) |