Question

Convert Latitude & Longitude (Decimal) to Easting & Northing

Asked by: Dr_Snapid

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...

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2004-04-23 at 00:42:31ID20964650
Tags

latitude

,

convert

,

longitude

,

easting

,

northing

Topic

Math & Science

Participating Experts
2
Points
75
Comments
17

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Latitude and Longitude
    Hi, I am looking to find out what is the closest point based on Latitude and Longitude. For example, lets say i have a package at Location A, and I want to find out what carrier, pickup person, can pick it up based on the closest point. I have latitude and longitude coor...
  2. Miles to Latitude and Longitude,uk
    Hi I just wanted to find out how to convert miles to latitude and longitude in the UK. I have scoured the net and found that 1 degree of latitude converts to ~70 miles regardless of location, however the conversion of miles to longitude varies depending on location. What is ...
  3. Convert Latitude/Longitude values to x,y in Colombia (S…
    Does anyone know equations or math transformations needed to convert between Latitude/Longitude data to North,East (X,Y) Coordinates ? I need the method required for Colombia (South America) Thanks !
  4. Matlab: Pixels to Longitude/Latitude
    Hi all, I have a Matlab question that has been eating me for days. Any help wil be greatly appreciated =) I have a scanned bitmap image of a map. When I display it using imshow and axis on, the x and y axis are the pixels (width & height) of that image. What I want to d...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: lwadwellPosted on 2004-04-23 at 01:05:49ID: 10897167

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..

 

by: MercantilumPosted on 2004-04-23 at 05:40:43ID: 10898913

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)

 

by: Dr_SnapidPosted on 2004-04-23 at 21:44:25ID: 10906171

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.

 

by: MercantilumPosted on 2004-04-24 at 07:34:11ID: 10907623

Yes the link I gave above is not really friendly, while it should give specific data for Australia though.

Something more readable and pragmatic from  http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM
Where you get as well the average radius of Earth for Australia, for instance.

You want UTM international system coordinates, the ones used by GPS for instance:

The problem is that Earth is neither completely spherical nor flat in term of altitude.
Therefore the formulas provided are really complex.
They provide some explanations about the UTM system http://www.uwgb.edu/dutchs/FieldMethods/UTMSystem.htm
where it is said that (among other things)
- start counting from zero at the equator (latitude) ; actually South pole is 0 up to 9999 for 1 km before equator, then zero again up to North pole
   -1km (9999), and the North pole is 0 again :)
   So you see that intrinsecally the Eearth NS is approximated to 20,000km (e.g. 40000km for the whole Earth)
- longitude: a bit more complex. The 360 degrees of longitude are divided into 60 zones of 6 degrees.
   Each zone meridian (e.g. 3 degrees) is - it is a convention - 500km (500000m).
   It starts from actually 180W (or -180E): divide by 6 and round up to upper number to get the Zone.

   So the UTM coordinates you will get are basically (x,z Eastern, +/-y Northern) where y is from 0 to 9999km and x is >0 and <1000km, z being the zone from 1 to 60. To get the actual coordinates UTM like please look again this http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM.

This system, for the longitudes has the advantage, to my mind, to reduce largely the aspherical problem of the Earth, since your first get a zone which depends upon the longitude in degrees itself (not dependant of altitude or irregularities of Earth) then we are in a square of a few hundreds of km. Error is minimal.


So to summarize you don't have to use the complex math formula:

1. for longitude: convert your longitude to start from 180W, e.g. Lg = Lg + 180. (West being negative) So you get a Lg >=0 and < 360.
   Then divide by 6 and round up: e.g. 80W, would be 180-80 = 100.
    100/6 = 16.67, round up : 17. You are in zone 17. 100 modulo 6 = 4. So you are on the right side of the meridian of the zone 17!
    A degree is about 111km (40000/360), the center of the meridian is 3 degree, you have 4, you are 1 degree after the center of the zone ; so your coordinate in zone 17 should be 500+111 = 611. (I just checked against the calculator given below and it worked :)

2. for latitude it is simpler :)  Given the Earth radius R =~ 6366 km
   It should be something like for for
    North:   latitude * 2 * PI * R / 360.  
    South:  - (90 - latitude)  * 2 * PI * R / 360.  
    (latitude: North and South get 0 to 90 positive degrees in my formula) so that you get positive Northern or negative depending on N/S.
    E.g.  47N => Northern 47 * 2 * PI * R  / 360   =   5222 km
    E.g.  31S => Northern  -59 * 2 * PI * R  / 360 =  -6555 km
    (the calculator below will give you a slight different result as it uses the math formula :)

   So you get your (lat,long) = (31S, 80W)  => UTM (Northern -6555, Eastern 611km zone 17)

You can check your guesses against this (choose International UTM) http://www.ngs.noaa.gov/cgi-bin/utm_getut.prl (in metres)
   (enter for instance  N171234.0000 for latitude north 17 degrees 12' 34" and W0811234 for west 081 degrees 12'34")

Last thing if you think about using formulas given in links: beware degrees are usually given in Radians !!

A more math-like formula: http://www.tandt.be/wis/WiS/eqn2tf.html

 

by: Dr_SnapidPosted on 2004-04-24 at 22:03:50ID: 10910645

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.

 

by: MercantilumPosted on 2004-05-21 at 06:41:33ID: 11126552

Hi :)
How did your program go finally?

 

by: Dr_SnapidPosted on 2004-05-23 at 16:33:57ID: 11139459

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.

 

by: MercantilumPosted on 2004-05-23 at 19:21:06ID: 11139988

Cool :)
By the way I thought my investigation deserved better than a 'B' ...

 

by: Dr_SnapidPosted on 2004-05-24 at 15:44:16ID: 11147283

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!

 

by: MercantilumPosted on 2004-05-24 at 15:46:52ID: 11147303

Well, usually there are more A's than B's !
I thought I gave the formula :(

 

by: MercantilumPosted on 2004-05-25 at 20:03:00ID: 11158111

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 :)

 

by: Dr_SnapidPosted on 2004-05-25 at 20:34:58ID: 11158279

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.

 

by: MercantilumPosted on 2004-05-25 at 20:37:35ID: 11158302

Well, maybe a Page Editor can  change to A :)

 

by: MercantilumPosted on 2004-05-25 at 20:39:59ID: 11158325

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 :)

 

by: Dr_SnapidPosted on 2004-05-25 at 20:41:10ID: 11158338

If a page editor can change it to an A, I invite them to. You deserve an A. Cheers.

 

by: Dr_SnapidPosted on 2004-05-25 at 20:43:02ID: 11158366


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...

 

by: MercantilumPosted on 2004-05-25 at 23:42:48ID: 11159082

You can send a job description to my email http://www.experts-exchange.com/M_2239020.html :)

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...