Problem about convertion of coordinate

Started by
2 comments, last by Demus79 17 years, 10 months ago
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.
Advertisement
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.

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

--www.physicaluncertainty.com
--linkedin
--irc.freenode.net#gdnet

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.

This topic is closed to new replies.

Advertisement