0 like 0 dislike
85 views
Good evening.

The crux of the matter is this, given the pattern region of the Russian Federation which is necessary on the existing coordinates (latitude and longitude) to put the point. How to translate the coordinates of the points on the image, i.e. in pixels. The origin of the picture at the top left. The accuracy is not very important. Has the approximate coordinates (latitude and longitude) of the corners of the picture.

Tried the available data to calculate how much a single pixel degrees but something with this idea that does not work, think not to do it.

Can someone tell me the algorithm?

0 like 0 dislike
Not sure, but I think something like this:
x= cos(longitude)*radiusperl* scale + shift section of the map
y= sin(latitude)*radiusperl* scale + shift section of the map
0 like 0 dislike
If the map is small and the curvature of the earth can be neglected, then the easiest way is the following:
Let's say the picture has a resolution of (Xmax, Ymax).
Coordinate the upper left corner of the image (X1, Y1) and lower right (X2, Y2).
Then an arbitrary point with geographical coordinates (A, B), provided X1 < A < X2 && Y1 < B < Y2 will receive pixel coordinates:
Xcoord = Xmax * (A — X1) / (X2 — X1)
Ycoord = Ymax * (B — Y1) / (Y2 — Y1)
0 like 0 dislike
Depending on which projections are made, the picture area? In any case you will need to georeference your drawing izuzetnih a pair of base points.
0 like 0 dislike
The task is not as trivial as it seems. It all depends on what projections are made card.
\r
For example, there is the Mercator projection (an example of its use is Google Maps). There are latitude and longitude depending on the number of pixel linearly, and it is enough to compute the coordinates of the four corners, and then easy to calculate.
\r
But if map projection is WGS84 (it is, for example, uses Google Earth), the above method is not suitable. There are the basic coordinates that depend on the pixel number linearly, and to move them into the latitude and longitude is necessary to use appropriate non-linear formulas.
\r
You need to know exactly what projection uses your file. There are quite a few different map projections and each has its own dependence of the coordinate of the pixel latitude and longitude. In the manufacture of the card, the choice of projection depends on the objectives pursued. The Mercator projection preserves angles but not distances, and for remote from the equator of territories gives a larger distortion.
\r
There are formats that allow for the projection of maps (geotiff, sid, img), and software that allows these data files to read. For example, geotiff is a simple command-line utility listgeo, which provides information about the type of projection and coordinates of the corners. Try to find a map that has projection information.