Auto-calculating Geodetic Length using Geographic Coordinate System other than WGS 1984

1220
3
Jump to solution
08-04-2022 09:53 PM
GraemeBrowning_Aurizon
Occasional Contributor II

At How to show geodatabase calculated area and length in meters from WGS84 FC?  (from 2018) it was said that "a little further ahead it will be possible to use Arcade expression (in Pro, not ArcMap) to leverage the Geometry Functions | ArcGIS for Developers" and at Geometry Functions | ArcGIS Arcade | ArcGIS Developers it appears that this has been implemented but only for "geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference".

I am using ArcGIS Roads and Highways with ArcGIS Pro 3.0.0 and a File Geodatabase (soon an Enterprise Geodatabase in SQL Server) and I wanted to set an Attribute Rule which would enable me to auto-populate a field named Length of each new feature I digitize with its geodetic length based on GCS_GDA_1994 (soon GCS_GDA_2020).  I tried using an Expression (written in Arcade) of :

 

 

 

LengthGeodetic($feature, 'meters')

 

 

 

 However, this resulted in an error of:

"ERROR 002717: Invalid Arcade expression, Arcade error: Projection is invalid, Script line: 1"

I am assuming that this is because GCS_GDA_1994 is neither Web Mercator (wkid 3857) nor WGS 84 (wkid 4326).

Have I hit a hard software limit here or is there another way that I can explore to meet my requirement?

As a workaround, after each batch of new features I capture, I'm manually running a Python Script tool written in ArcPy to do that calculation using the Calculate Geometry Attributes tool.

I have also asked the GIS Stack Exchange community about this under the same title at arcgis pro - Auto-calculating Geodetic Length using Geographic Coordinate System other than WGS 1984....

0 Kudos
1 Solution

Accepted Solutions
GraemeBrowning_Aurizon
Occasional Contributor II

This has become the subject of Enhancement Request ENH-000151609 to support Auto-calculating Geodetic Length using Geographic Coordinate System other than WGS 1984.



View solution in original post

0 Kudos
3 Replies
GraemeBrowning_Aurizon
Occasional Contributor II

This has become the subject of Enhancement Request ENH-000151609 to support Auto-calculating Geodetic Length using Geographic Coordinate System other than WGS 1984.



0 Kudos
tainahleon
New Contributor

Could you please show the solution?

0 Kudos
GraemeBrowning_Aurizon
Occasional Contributor II

Fortunately, for me, I already had measures (in meters) on the polylines (in lat/long) that I needed to calculate geodesic lengths for.  Consequently, as a workaround, I was able to just subtract the start measure from the end measure to get the geodesic length:

 

Geometry($feature).paths[-1][-1].m - Geometry($feature).paths[0][0].m

 

 

0 Kudos