Select to view content in your preferred language

Difficulty getting indicator to utilize length geodetic

509
1
03-23-2023 01:24 PM
jasonheyman
Occasional Contributor

I am trying to get my indicator to display the sum of the Shape_Length field values in geodetic, but my arcade expression does not appear to work. 

var test = Round(LengthGeodetic($datapoint.sum_Shape__Length, 'feet'),2)

0 Kudos
1 Reply
DavidPike
MVP Frequent Contributor

From the docs I'd say that LengthGeodetic()  input is the feature, not a length field from the feature (which wouldn't make any real sense). https://developers.arcgis.com/arcade/function-reference/geometry_functions/

 

var test = Round(LengthGeodetic($datapoint, 'feet'),2)

 

 

LengthGeodetic

LengthGeodetic(inputGeometry, unit?) -> Number

Since version 1.7

Function bundle: Geometry

Returns the geodetic length of the input geometry or Feature in the given units. This is more reliable measurement of length than Length() because it takes into account the Earth's curvature. Support is limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.

Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. $feature) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.

Parameters

  • inputGeometry: Geometry | Feature | Array<Point> - The geometry for which to calculate the geodetic length.
  • unit (Optional😞 Text | Number - Measurement unit of the return value. For the visualization, labeling, and popup profiles, the default unit is the map's spatial reference. In other profiles, like field calculation, the default is based on the spatial reference of the data.
    Possible values: feet | kilometers | miles | nautical-miles | meters | yards

Return value: Number

Example

Returns the geodetic length of the feature in kilometers

 
 
 
 
 
 
LengthGeodetic($feature, 'kilometers')
0 Kudos