Select to view content in your preferred language

Calculate geodetic distance for points in ETRS89 (wkid:4258)

116
1
2 weeks ago
Labels (2)
BenediktLummawie
New Contributor

Hallo,

 

i have a question regarding the DistanceGeodetic()-function. I wanted to calculate the distance of 2 points geo. referenced in ETRS89 (wkid: 4258), but it doesn't work. After further debugging in ArcGIS Pro, apparently the function thorws the attached error, while working greatly for the WGS GSC 1984 (wkid: 4326).

 

Is there any explanation or workaround for this error? My project strictly accept only ETRS89.

 

Thank you and cheers!

0 Kudos
1 Reply
BenediktLummawie
New Contributor
Snippet to the code:    

var pt1 = Point({
        x: x1,
        y: y1,
        spatialReference: { wkid: 4258}
    });
 
    var pt2 = Point({
        x:x2,
        y:y2,
        spatialReference: { wkid: 4258}
    });
    return DistanceGeodetic(pt1, pt2, 'meters')
0 Kudos