Convert Longitude/Latitude to cartesian x,y

3saul
Messages
3
Reaction score
0
I have a series of maps from various parts of the world.

Each map is 512 pixels by 512 pixels. I also have approximate left, top, right and bottom latitude and longitude values for each map.

I'm wanting to plot variable lat/long value on the maps which need to be converted to x,y values - any advice on how to proceed?
 
Mathematics news on Phys.org
3saul: You are getting involved in an area of surveying known as geodesy. I think you should Google the term 'Universal Transverse Mercator' to learn the basics. Software to handle lat/long - UTM X/Y conversions can be downloaded from the US Army Corps of Engineers website - Google 'CORPSCON'
 
I forgot to mention, the map width is equal to 1024km - as is the height (so each pixel equates to approx. 2km).

SteamKing, thank you for your response. I've looked over some of the information, which seems relatively complicated for my purposes.

I don't need a huge amount of accuracy but my current calculations (below) aren't producing accurate enough results. The x/y are both off by about 40 (positive) pixels. This tells me my calculations are too simple.

currentlatitude = -27.445617
currentlongitude = 152.93503

--Make values positive
if currentlatitude < 0 then
currentlatitude = currentlatitude * -1
end

if currentlongitude < 0 then
currentlongitude = currentlongitude * -1
end
--The following are the coordinates for my map
mapLeftLong = 147.98
mapRightLong = 158.46
mapTopLat = -23.15 --was a negative figure
mapBottomLat = -32.31 --was a negative figure

--Make values positive
if mapLeftLong < 0 then
mapLeftLong = mapLeftLong * -1
end

if mapRightLong < 0 then
mapRightLong = mapRightLong * -1
end

if mapTopLat < 0 then
mapTopLat = mapTopLat * -1
end

if mapBottomLat < 0 then
mapBottomLat = mapBottomLat * -1
end


xadjusted = mapRightLong - currentlongitude
yadjusted = mapBottomLat - currentlatitude


ypoints = mapRightLong - mapLeftLong
xpoints = mapBottomLat - mapTopLat--Get pixel value
globalXTranslated = (512/xpoints) * xadjusted
globalYTranslated = (512/ypoints) * yadjusted
 
3saul: What do you know about these maps you have? What kind of projection (Mercator, etc.) was used to make them? Most map projections distort some feature (direction, location, area, etc.) in order to produce a 2-D representation of the surface of a 3-D body. Unless you have a special map projection, a simple linear scaling of lat/long to X/Y will not be accurate.
 
The projection for the map images is gnomonic. They are Lambert Conformal, with standard parallels of 18S and 40S.

I hope this helps you to help me further. It means very little to me.
 
Last edited:
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top