[PROJ] Explaining geodesic distance discrepancies
Charles Karney
charles at karney.com
Fri May 15 13:45:30 PDT 2020
The ratio utm distance/geodesic distance is the "scale" of the UTM
transformation. (The "tilting" you refer to is called the "meridian
convergence"; this doesn't affect the distance calculation because TM is
a conformal projection.) For the midpoint of the geodesic you are
examining, the scale is 1.00028568317. And the ratio you get is
utm/geod = 1161.43346448816/1161.1017567084384 = 1.00028568364
So your utm and geod results are consistent. I can't reproduce your
geod cmdline result. If I run your python script, I get
one: 17
diff utm: 1161.433464475265
diff geod: 1161.1017567084402
diff geod cmdline: 1161.102
Perhaps you have the "wrong" geod in your path?
--Charles
On 5/15/20 4:12 PM, Dima Kogan wrote:
> Hi. I'm seeing behavior I don't understand. Any clarification would be
> greatly appreciated.
>
> I have two positions represented as latitude,longitude pairs, and I'm
> trying to get the distance between them. I've 3 methods that all yield
> different results, where I think they should be VERY close. The methods
> are:
>
> - Converting the lat/lon to a Cartesian UTM system, and then using the
> Cartesian distance
>
> - pyproj.Geod
>
> - The "geod" command-line tool
>
> For an arbitrary pair of points that are ~1km apart, I see:
>
> diff utm: 1161.43346448816
> diff geod: 1161.1017567084384
> diff geod cmdline: 1163.971
>
> This looks wrong. The UTM probably should be slightly off because the
> two Cartesian systems are slightly tilted, but is 30cm over 1km really
> how far off it should be?
>
> The difference between pyproj.Geod and the "geod" cmdline tool makes
> even less sense. In theory they're doing the same thing, so the results
> should be identical.
>
> I'm attaching a Python script to run the 3 methods, and print the
> ranges.
>
> Thanks!
>
>
> _______________________________________________
> PROJ mailing list
> PROJ at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/proj
>
More information about the PROJ
mailing list