# Problem about convertion of coordinate

This topic is 4490 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I want to convert longitude and latitude coordinate into a 2D X-Y system. So I need to know how far one coordinate(longitude and latitude sysem) is from another horizontally and vertically.Does anyone kown this?May it be something about Map Making?Any link or articles will be appreciated.

##### Share on other sites
Think about it terms of mapping one square into another square. That is if you had a point 75% in the x direction on a square and you want it to map to the same relative spot on a square twice as large, how would you do it?

To break it down even further: Think about the problem of mapping a point on a line to the same relative point on another line of a different size

|--*--| <-- length 5, point at 3

Map to this
|----------| <-- length 10, point would be where?

Well, the percentage the point on the first number line is 3/5 or 60%, so on the second number line you would want it to be 60% on that line. or 6/10.

In code:

float perFirstLine = value / lengthFirstLine;
float xLocationSecondLine = perFirstLine * lengthSecondLine;

The same can be applied to the y coordinate.

##### Share on other sites
It depends on how the latitude and longitude are constructed. Assuming the map uses a Mercator projection, this might help.

##### Share on other sites
Are you referring to the longitude and latitude as locations on Earth ?

Here is what you might find useful:

http://www.ngs.noaa.gov/TOOLS/Inv_Fwd/Inv_Fwd.html

From this site you can find a code to calculate a distance and a direction (in XY-coordinate) between two coordinates presented as longitude and latitude.

With this information, you'll be able to map position to the XY-coordinates.

1. 1
2. 2
3. 3
4. 4
Rutin
12
5. 5

• 12
• 16
• 10
• 14
• 10
• ### Forum Statistics

• Total Topics
632660
• Total Posts
3007693
• ### Who's Online (See full list)

There are no registered users currently online

×