algorithm - How do you determine the latitude and longitude of a point on a map? -


i make mapping application maps indoor places such malls. need able calculate latitude , longitude of point on particular map (i.e. know latitude , longitude of particular store). know maps rotated , not aligned true north, first need supply information few points sort of "calibrate" orientation of map known, if mean.

my map formatted grid/coordinate system. supply latitude , longitude of 3 specific points on map. after supplying information, how can calculate latitude , longitude of other point on map? example, have map, , tell program latitude , longitude data of (0, 0), (5, 5), , (10, 12). input (3, 5) , program should tell me latitude , longitude of point.

is possible do? how go writing algorithm this? also, possible user supplying positions of 2 points program? thanks!

assuming mall small enough can consider lat , long linear ie same x , y it's matter of applying scaling , rotation transformation matrices.

if maths little weak might want try simple introduction

you need able convert between lat/long , metres (or feet or pixels). latitude (how far north/south) easy - because circle drawn through poles same length, degree of latitude same number of metres (to accuracy). longitude trickier, because circles drawn around earth smaller go further north - see expressing_latitude_and_longitude_as_linear_units

alternately if know lat/long of known points (eg corners) can scale degrees metres/feet/pixels directly. remembering n-s scale different e-w scale.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -