Convert geographic units (decimal degrees) to meters

5768
3
08-02-2011 06:03 AM
DimaShats
New Contributor III
Hi,

My application uses ArcEngine 10.0. The spatial reference of the data is  WGS84 Geo.
I need to calculate the distance between objects in meters. For this purpose i use pe_geodesic_distance function from pe.dll.
I need to perform queries "find all objects in 100 meters distance and azimuth 45 degrees" also.
For converting meters to map units (degrees) i use pe_geodesic_coordinate function from pe.dll.
I define the center point of calculation and find another point in given azimuth. After this action i calculate the distance in map units (degrees) between two points (simple Euclidean distance).

If i convert some distance from meters to map units and reverse (even if i define the same start point  and azimuth) i get different values of input and output.

Am i wrong when i use simple Euclidean distance while meters->degree conversion?
Did anybody implement something like this?

Thanks advance,

Dima Shats ??? GIS Software Infrastructure Team Leader
Ness Technologies
0 Kudos
3 Replies
DubravkoAntonic
New Contributor III
Something is strange here, computers are deterministic, if you user same input and get different outputs.:confused:
Verify that points you use are using same spatial reference, use SnapToSpatialReference to be sure coordinates are within resolution and on the map grid.

Other approach is to create Line by points and get Length from line.

regards Dubravko
0 Kudos
DimaShats
New Contributor III
I said "If i convert some distance from meters to map units and reverse (even if i define the same start point and azimuth) i get different values of input and output."
It means when i convert 10000 meters to degrees and reverse i don't get 10000 meters as a result.

Off course the results i get is deterministic.
0 Kudos
DubravkoAntonic
New Contributor III
That is deterministic enough 🙂
Transformation and rounding at decimal places takes therir price.
0 Kudos