0

i am building a system the visualizes cars moving in a huge parking using some device that keeps sending latitude and longitude for each object when it moves , i have a picture of the same parking in a webpage and am trying to match the location on the car over the image to the real latitude and longitude.

whats the best approach to achieve this , can i do it dynamically or do i have to define every bit of space in the parking and its equivalent in real latitude and longitude ? and i cant use google maps because it dose not have the details of the location like i need it and i might use it for some underground parkings too.

Thank you

Hasan Al-Natour
  • 1,936
  • 2
  • 14
  • 22
  • 1
    You'll need a bit of math to do this. Basically you need to create a function that takes as input `lat, lng` and outputs a pixel position `x, y` corresponding to the location on your visualization. A function like this is called a projection. Unfortunately it's not my area of expertise, I did manage to find a StackOverflow that goes into it. Perhaps it can help you: http://stackoverflow.com/questions/2651099/convert-long-lat-to-pixel-x-y-on-a-given-picture – shotor May 22 '17 at 11:12
  • That's a pretty broad topic, but I fail to understand what your actual question is? At such a small scale, mapping lat/long to x/y coordinates on screen is trivial. However note that GPS is often not precise enough to get an accurate position of cars at the level you're requiring (even more so if you're indoors). – jcaron May 22 '17 at 11:14

0 Answers0