Take the 2-minute tour ×

I have a set of latitude and longitude points in decimal form for a city and I need to convert them to x and y coordinates in order to draw them on a canvas and find the distance between them. I am confused as to what the formula for this would be, any help would be appreciated. I don't need to account for the curvature of the Earth as it's just a flat map.


share|improve this question
it's just a flat map -- It's really not that simple. Read up on map projections. –  aioobe Aug 6 '12 at 6:45
add comment

1 Answer

Since Longitude and Latitude Co-ordinates are co-ordinates for a spherical shape, it is just not a matter of transposing them from one point to another. As pointed out here, you will need to take into account certain factors.

My recommendation would be to take a look at SwingX products, especially the JXMapViewer. Take a look at this tutorial, it should help you out with what you need.

share|improve this answer
add comment

Your Answer


