Patrick Connolly
2001-Jun-22 04:47 UTC
[R] Easting and northing cf. Latitude and longitude
I think I''ve seen this discussed here before but it doesn''t seem to appear in the archive. I am using the map package which so far has been fine for my purposes. Some people I work with have GPS type data that defines positions as number of metres not degrees. I don''t know how much the system varies, but in New Zealand, they are referred to as Eastings and Northings. What I would like to know is how complicated it is to convert between such data and the normal latitude and longitude that the map package uses. I assume various datum points are used for different parts of the world, and knowing the appropriate one and the definition of a "northing" and an "easting", the conversion would be relatively straight forward. TIA -- ************************************************************* Patrick Connolly HortResearch Great minds discuss ideas; Mt Albert Average minds discuss events; Auckland Small minds discuss people. New Zealand .... Anon Ph: +64-9 815 4200 x 7188 ************************************************************* ______________________________________________________ The contents of this e-mail are privileged and/or confidential to the named recipient and are not to be used by any other person and/or organisation. If you have received this e-mail in error, please notify the sender and delete all material pertaining to this e-mail. ______________________________________________________ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On 22-Jun-01 Patrick Connolly wrote:> I think I''ve seen this discussed here before but it doesn''t seem to > appear in the archive. > > I am using the map package which so far has been fine for my purposes. > Some people I work with have GPS type data that defines positions as > number of metres not degrees. I don''t know how much the system > varies, but in New Zealand, they are referred to as Eastings and > Northings. > > What I would like to know is how complicated it is to convert between > such data and the normal latitude and longitude that the map package > uses. I assume various datum points are used for different parts of > the world, and knowing the appropriate one and the definition of a > "northing" and an "easting", the conversion would be relatively > straight forward.Errr, sort of ... , though to some extent this depends on the accuracy you seek. I implemented such a conversion for Lat-Long/Eastings-Northings years ago, for the UK Ordnance Survey Grid (which uses E & N), using the method & formulae published by the OS in a little booklet (program written in C -- nasty-looking piece of work, since it is basically a transcription of their formulae). I can send you the C code for this, as an example, if you wish. For such a method, you will, strictly speaking, need to know, for your own national mapping agency: -- the major and minor semi-axes for the reference ellipsoid -- the Long. & Lat., and E and N, of the "True Origin" -- the scale factor on the "central meridian" -- the map projection they use to generate plane maps from Lat & Long data, i.e. the "National Projection" (the reference ellipsoid may also be called the "map datum"). Nowadays, there is also a complication in that "The Meridian" is no longer what it used to be, being now defined by satellite data (and allegedly superior through being immune to continental drift and similar sabotage of reference points rigidly attached to dry land). So, in fact, there is a choice of meridians, too ... There is a further complication in that the GPS system actually used to generate the data you get, may have been set up to use some other reference system; so you need to find out what this was. It may then turn out that you do not have access to the formulae defining the relationship between their Lat & Long and your E & N, unless you can find out the relationship netween their Lat & Long and your National Lat & Long. The National Projection ( [Lat,Long]->[E,N] ) is defined by a series of formulae which depend on your Nation; in this direction it is a one-pass operation. The inversion of it ( [E,N]->[Lat,Long] ) involves an iterative solution. You should be able to find out from your national mapping agency how their projection is defined. Good luck! Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 167 1972 Date: 22-Jun-01 Time: 10:07:14 ------------------------------ XFMail ------------------------------ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Fri, 22 Jun 2001, Patrick Connolly wrote:> I think I''ve seen this discussed here before but it doesn''t seem to > appear in the archive.In r-help, 20 April 2001.> > I am using the map package which so far has been fine for my purposes. > Some people I work with have GPS type data that defines positions as > number of metres not degrees. I don''t know how much the system > varies, but in New Zealand, they are referred to as Eastings and > Northings. >The answer I gave then - there were others - see the archives - was: One good source is http://www.remotesensing.org/proj/ for the PROJ.4 software. Another is the mapproject program in GMT at http://gmt.soest.hawaii.edu/. These are both external to R, but it seems likely that PROJ.4 will form part of an R map package at some stage. You didn''t say which platform you use - both these are native Unix/Linux, but at least GMT is available for NT too. While it would be possible to write R code to do this, both of these sources are well-tried and so more likely to work as expected. I feel that roll-your-own is not necessarily a good solution - map projection is numerically sensitive, especially when dealing with lots of significant digits in decimal degrees. The sources here also assume that you know about the parameters for your projection - as was already pointed out. Roger -- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Breiviksveien 40, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93 e-mail: Roger.Bivand at nhh.no and: Department of Geography and Regional Development, University of Gdansk, al. Mar. J. Pilsudskiego 46, PL-81 378 Gdynia, Poland. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
White.Denis@epamail.epa.gov
2001-Jun-22 17:32 UTC
[R] Easting and northing cf. Latitude and longitude
As Ted Harding suggested in an earlier reply, the conversions can be complicated. Most GPS units provide both geodetic coordinates (latitude, longitude) and coordinates in the Universal Transverse Mercator projection (northings and eastings in meters). See the r-help thread on "map projections" between 20 April and 23 April 2001. Also see public domain software available at http://mapping.usgs.gov/www/html/cartsoft.html. For background on map projections try a web search, e.g. http://www.colorado.edu/geography/gcraft/notes/mapproj/mapproj_f.html. Denis White US EPA, 200 SW 35th St, Corvallis, Oregon, 97333 USA voice: 541.754.4476, email: white.denis at epa.gov web: www.epa.gov/wed/pages/staff/white/ Patrick Connolly <P.Connolly at hortresea To: r-help at stat.math.ethz.ch rch.co.nz> (R-help) Sent by: cc: owner-r-help at stat.mat Subject: [R] Easting and northing h.ethz.ch cf. Latitude and longitude 06/21/2001 21:47 Please respond to Patrick Connolly I think I''ve seen this discussed here before but it doesn''t seem to appear in the archive. I am using the map package which so far has been fine for my purposes. Some people I work with have GPS type data that defines positions as number of metres not degrees. I don''t know how much the system varies, but in New Zealand, they are referred to as Eastings and Northings. What I would like to know is how complicated it is to convert between such data and the normal latitude and longitude that the map package uses. I assume various datum points are used for different parts of the world, and knowing the appropriate one and the definition of a "northing" and an "easting", the conversion would be relatively straight forward. TIA -- ************************************************************* Patrick Connolly HortResearch Great minds discuss ideas; Mt Albert Average minds discuss events; Auckland Small minds discuss people. New Zealand .... Anon Ph: +64-9 815 4200 x 7188 ************************************************************* ______________________________________________________ The contents of this e-mail are privileged and/or confidential to the named recipient and are not to be used by any other person and/or organisation. If you have received this e-mail in error, please notify the sender and delete all material pertaining to this e-mail. ______________________________________________________ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. -.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._._ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I don''t know whether this will help or not, but some time ago I had to implement a routine to determine the "great circle" distance between two geographical coordinates using the Haversine formula. I realise that this is the opposite of what you want, but it might be possible to work out how to reverse the formula. The relevant details are at: http://www.census.gov/cgi-bin/geo/gisfaq?Q5.1 or at least were when I programmed the solution. Jim -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._