0
$\begingroup$

I am creating a map application and I need help in calculation.

map

I am having an image of map which is say 125px in height and 250px in width, I know coordinates of all the corners, now I want to find an offset for a point 80.25,12.5. How can I do that ? Can anyone suggest a formula for that ?

Please help.

  • 0
    Ok I will keep in mind2011-11-06

1 Answers 1

0

You need simple proportions. Your full height in pixels is $125px$; the height in your coordinate system is $80$, hence $12.5/80=X/125px$. More generally, if $x$ and $y$ are the coordinates in the original coordinate system and $X$ and $Y$ are the coordinates in the pixel space then $X=250px\times x/100$ and $Y=125px\times y/80$.

  • 0
    @AlekseyPichugin maybe you can help me with this question: http://math.stackexchange.com/questions/1548841/calculate-point-coordinates2015-11-27