I am working on a small project and have to draw the location of the indoor map. I have a mapping between some points on an image from pixel to coordinates (point, Latitude, Longitude):
- 55.9444578385393,-3.1866151839494705
- 55.94444244275808,-3.18672649562358860
- 55.94452336441765,-3.1866540759801865
- 55.94452261340533,-3.1867526471614838
Each of these points corresponds to the pixel location on an image, (x, y), where (0,0) is the top left corner:
- 1428.5, 552.5
- 1092.5, 537.5
- 1392.5, 168.5
- 1140.5, 96.5
P.S. 43.1 pixels map to 1 meter
Is there a quick way to calculate the pixel location given new coordinate, let us say, (latitude) 55.94445295695079, (longitude)-3.186666816473007 if I know that an image is 2060px(width) by 1109px(height)?
I was trying to the position of a pixel by creating a proportional relation between the coordinates and pixels, but that gave me non-sensible results.

Take the abscissa/ordinate (in pixels) and the longitude/latitude of any three points (preferably far apart).
The transformation relations are affine:
$$x=a u+b v+c,\\y=d u+e v+f.$$
You have two independent systems of 3 equations in 3 unknowns, which you can solve for $a,b,c,d,e,f$.
You can obtain the inverse transform by solving the equations anew with the roles of $x,y$ and $u,v$ exchanged.