Link to home
Start Free TrialLog in
Avatar of Dr_Snapid
Dr_SnapidFlag for Australia

asked on

Convert Latitude & Longitude (Decimal) to Easting & Northing

I need to convert Longitude and Latitude to Easting and Northing for locations in Australia, so our mapping engine can display them on a map. While the engine supports a single location using Latitude and Longitude, it requires eastings and northings if I want it to display more than one location at the same time.

I want to write a PHP script which can convert latitude to northing, and longitude to easting.

The script will be easy if I know the mathematical formula, I guess. Most of the places on the web that show the formula use complex looking squiggles and symbols, and I cant understand them, as i'm no mathemetician. Can anyone show me the equation to do this? I think it should be easy...
Avatar of Lee Wadwell
Lee Wadwell
Flag of Australia image

not sure of the formula myself either...(but it looks reasonably complex)...below is a link to web site that does the conversions...it even has an Excel speadsheet you can download that does the conversions using Redfearn's formulae.

http://www.ga.gov.au/nmd/geodesy/datums/calcs.jsp#coords

hope it helps..
This link sounds relevant

   http://www.ga.gov.au/nmd/geodesy/datums/redfearn_geo_to_grid.jsp

It gives a link as well to

   http://www.icsm.gov.au/icsm/gda/index.html

Where you can find interesting data (see FAQs and Technical manuals)
Avatar of Dr_Snapid

ASKER

Yes, there is alot of data there, but they still dont show me (at least not that I could see) a usable conversion equation that i could put in my script.

I think easting is meters east of 0deg at the equator, and northing is meters north of the equator (negative values for west and south, respectively) is that right?

I have thought of trying:
 Distance around earth at equator is 40,075,160 meters.
So Easting for 180deg LONGITUDE must be half this, correct?

Distance around earth pole to pole is 40,008,000 meters.
So Northing for 90deg LATITUDE must be 1/4 of this, correct?

Would the formulae below work?
EASTING=LONGITUDEx(40075160/360)
NORTHING=LATITUDEx((40008000/4)/90)

I understand that this may not take altitude and imperfections in earth's shape into account, but would this work with any degree of accuracy?

My first map will only be displayed 600 pixels wide, so i cant be amazingly accurate anyway.
ASKER CERTIFIED SOLUTION
Avatar of Mercantilum
Mercantilum
Flag of Japan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It looks like all the info i need to complete my task is available to me now, through the very good post by Mercantilum. The links are also useful. Cheers guys.
Hi :)
How did your program go finally?
Very well thankyou, Merc. Now we can plot multiple points using Lat & Long, so i dont need to use easting and northing anymore, greatly simplifying my script. I know that I would have been able to use multiple points by doing a easting and northing conversion though, thanks to the help I got in this thread.
Cool :)
By the way I thought my investigation deserved better than a 'B' ...
It was great information you provided, the only reason I gave you a B was because I read the suggested scoring (this was my first time) and since I was hoping for someone to actually give me the required formula to convert to Easting and Northing (i hope that doesnt sound lazy), I was reserving a A for this only. I also appreciate your on-going interest. You are real asset to experts-exchange!
Well, usually there are more A's than B's !
I thought I gave the formula :(
Funny I'm back to this thread searching for a data from my own answer :) Since I'm here, let me add that:

Considering the time to make this answer and its rareness (you can search google - and you probably did it :) it deserved an A.
You talk about a << real asset to experts-exchange >> but you don't contribute to encourage people keeping answering.

This is what I think :)
I think that is a fair comment Merc, you are right. I couldnt find the answer on Google, and this is not something I considered when grading your score.

Your answer came up with this result:
Mercantilum>>>"So you get your (lat,long) = (31S, 80W)  => UTM (Northern -6555, Eastern 611km zone 17)"

When the answer i needed was:
Mercantilum>>>"So you get your (lat,long) = (31S, 80W)  = -XXXXX mtrs Northing, -XXXXX mtrs Easting"

I can see how much effort you went to. It was an A grade effort, and had I kept the thread running longer I am sure you would have landed me on the correct calculation. Please understand that we never actually got to the correct answer, we only got part of the way there, I did the rest myself. This is why I originally went for a B. I got there in the end only because of your help though - so I agree I 'could' have given you an A, but I am not totally convinced I should have. Personally, your grade is not that important to me that I would stand back and insist it's a 'B' - it obviously is important to you - so I'd give you an 'A' no worries. I am dissapointed by this statement:

Mercantilum>>>"but you don't contribute to encourage people keeping answering"

Even though I'd like to, I cant change your grade, as far as I know. I'm sorry mate. I really do think you are an asset to experts exchange, and I hope you continue to be. I wouldnt take the time to write this post unless I sincerely meant it.
Well, maybe a Page Editor can  change to A :)
This is exactly what I think:
- yes I care about points but may times my answer was not accepted as the author chose the first or last one ... and I don't really care
- the think is sometimes I really want as a personnal challenge to provide an accurate answer - it was the case for this one

And when other people will look for a similar question - they will see a B and think, well it's not what i'm looking for :)
If a page editor can change it to an A, I invite them to. You deserve an A. Cheers.

Mercantilum >>>"- the think is sometimes I really want as a personnal challenge to provide an accurate answer - it was the case for this one"

I like your attitude. Do you need a Job? I'd give you one...
You can send a job description to my email https://www.experts-exchange.com/M_2239020.html :)