I have got a picture on which a user manually marks some points. Let's say for simplicity's sake these points always create a 4 point convex polygon. For each one of these points I know latitude and longitude.
Now the user enters latitude/ longitude for the 5th point and I have to show it on the same picture. What is the best way to calculate its screen position?
I have tried the following algorithm:
1) to calculate a geometrical center of the polygon on screen
2) to find an average longitude for the leftmost and the rightmost
points and an average latitude for the topmost and the lowest points
3) to place a point at the same relation to the geometrical center
as its' geocoordinates are to this average point.
I have a test image, where I know exact geocoordinates for each point on the 10px grid, and I can say that this algorithm doesn't work.
What would be the better way?