Drawing GPS coordinates on screen.



  • Hi,

    I want to draw GPS location as a dot on screen. please let me know the correct way of doing this.

    How can i convert latitude & longitude into coordinates to draw on screen?
    Thanks in Advance.



  • That would ultimately depend on your map projection. What map projection is suitable, depends on your purposes: a display to indicate a point in a city on a map is different from one that would do the same for the whole world, for instance. Are you looking for a map to display on that screen as well (for reference perhaps)?



  • Hi
    Thanks for the reply.
    Actually i want to draw a point on blank screen only, not on map. (this is the requirement)
    There are @50 location available that i need to draw on screen relatively to each othere.



  • Again: on what scale? A park? A city? A small country? A continent? The world? And even: near the equator, or near the poles?



  • it is small park. or you can say play area of @1000 meter.
    I need info about how to convert latitude and longitude in coordinate system (x,y) so that I can draw it on my screen.


  • Moderators



  • I understand that, but in order to recommend a "map projection":http://en.wikipedia.org/wiki/Map_projection it is important to understand the scale you're working on.

    In your case, the distances are so small, that you can use a quite simple one. Perhaps a simple "equirectangular projection":http://en.wikipedia.org/wiki/Equirectangular_projection will do fine for your purpose.

    You can use the formula in the article referenced above to get a set of x, y coordinates. Then, all you need to do is to scale and transpose these coordinates so they can be mapped in a sensible way to your screen.



  • Thanks for the reply.
    My requirement is to draw GPS location which are very near to each other.
    I tried to draw it is but becuase of GPS location are very close @10 meter range, two points are getting overlapped.

    Do you have any solution for this?


  • Moderators

    bq. Do you have any solution for this?

    Zoom in closer on the area in your view?

    Otherwise, what behavior would you like to see if the points overlap?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.