Geodesic Length result is off

419
3
08-11-2021 03:11 AM
MatthieuThery1
Occasional Contributor

Hello,

I'm trying to get the length of a polyline in webmercator (102100). I am using geodesicLength but the result is slighlty off compared to the real distance (I'm getting 7099m instead of 7114m in that case but it happens pretty much on all polylines). Other tools on the web returns me the correct length, as does arcmap.

I'm wondering if the tool runs some sort of simplification before calculating the length?

I have tried to use the geometryService.length but that function crashes all the time, I'm assuming because my polyline has got too many vertices ?

 

Thanks

Tags (3)
0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

Beside your question there are a number of Related links

For example Solved: Questions about Length and Area returned by Geomet... - Esri Community


... sort of retired...
0 Kudos
MatthieuThery1
Occasional Contributor

I have tried that before to no avail, still returns the same length.

0 Kudos
JohnGrayson
Esri Regular Contributor

Do you have a very simple codepen showing the issue?