Select to view content in your preferred language

Arcade function to return X,Y in coordinate system other than that of the source data

1322
2
05-21-2021 05:39 AM
Status: Open
Labels (1)
MatthewAlbritton
Emerging Contributor

For background, we have a polygon dataset that changes frequently. In the polygon data we need to maintain XY values for the centroid of each polygon to pass to related inspection records (point). The related inspections get their geometry from the centroid of the polygon data (passed to the Survey123 in the submission URL).


We would like to use Arcade plus an attribute rule to automatically update the centroid XY each time the polygon's shape is modified. The problem is that our data is stored in Albers(meter), but we need the XY to be stored in Decimal Degrees. As far as we know, there isn't a way to specify which coordinate system the XY results are returned/displayed/stored in Arcade.


Right now, we have our staff manually run the calculate geometry attributes geoprocessing tool each time a shape is modified. If we could set this up in an attribute rule, it would save a lot of manual maintenance on the dataset.

2 Comments
rsun_TQB

Hi @MatthewAlbritton ,

It will be super handy to have spatial related values calculated dynamically!

Something like OGC Methods on Geometry Instances - SQL Server | Microsoft Docs

Allowing users to utilize arcade to extract centroid, X, Y, length, area, EPSG Id, and bbox etc.

Cheers,

Reno

 
BrettFrahm

Our organization would also like to be able to make XY calculations using Arcade with different coordinate systems. We can do it with python and arcpy, but we would really like to take advantage of attribute rules to handle this automatically.

Some use cases:

  • Getting decimal degrees in WGS 1984 Web Mercator Auxiliary Sphere for points so volunteers can use a familiar format that also works in older GPS devices.
  • Getting decimal degrees in a custom county coordinate system to be able to better collaborate with county staff on projects.