Answer the question
In order to leave comments, you need to log in
How to correctly convert the length in rectangular coordinates to the wgs84 projection?
Good afternoon!
I am writing a small program. It specifies a polygon, in wgs84 projection coordinates. It looks something like this:
I have some distance (set by the number of meters), and I need to draw this distance from one point of this polygon, and as I understand it, I need to convert the length of the distance in rectangular coordinates to the WGS84 projection. I can't figure out how to do this, please help.
Answer the question
In order to leave comments, you need to log in
The question is how exactly do you need to calculate.
As a first and simplest approximation, you can use the following:
For a polygon point with given X, Y coordinates, calculate approximate conversion factors to meters for that point.
For latitude it is about 6356752/360~17657 meters per degree
For longitude it is calculated depending on latitude, for each point separately: 6378137/360 * cos(latitude
) 0000; 37.0000) per 1000 meters, then:
17657 meters per degree of latitude gives us a distance of 0.056634762 degrees per 1000 meters
For longitude: 6 378 137/360 * cos(55 degrees) ~ 10162 meters per degree, which gives 0.098405826 degrees per 1000 meters.
In total, the points we need lie within 55 + dY; 37+dY, where (dx/0.056634762)^2 + (dy/0.098405826)^2 < 1000^2
The calculations are approximate, and probably with errors, but the general meaning should be clear. The accuracy of these calculations is about a meter, you need more - consider more precisely. With increasing distances, the curvature of the earth will begin to affect and this method will become completely inaccurate.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question