I have some satellite data which contains latitude and longitude information .>From this data I would like to calculate distance between first location(scalar latitude and longitude) and all other (vectors latitude and longitude) How I should solve this problem ? -- View this message in context: http://r.789695.n4.nabble.com/calculating-distance-between-latitude-and-longitude-tp4333332p4333332.html Sent from the R help mailing list archive at Nabble.com.
David L Carlson
2012-Jan-27 20:45 UTC
[R] calculating distance between latitude and longitude
Look at distm() in package geosphere or geoDist() in package SoDA. ---------------------------------------------- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4352 -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of uday Sent: Friday, January 27, 2012 6:41 AM To: r-help at r-project.org Subject: [R] calculating distance between latitude and longitude I have some satellite data which contains latitude and longitude information .>From this data I would like to calculate distance between first location(scalar latitude and longitude) and all other (vectors latitude and longitude) How I should solve this problem ? -- View this message in context: http://r.789695.n4.nabble.com/calculating-distance-between-latitude-and-long itude-tp4333332p4333332.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
MacQueen, Don
2012-Jan-27 23:15 UTC
[R] calculating distance between latitude and longitude
Also spDistsN1() and spDists() in package sp, a perhaps more basic starting point for working with spatial data in R. See also the r-sig-geo mailing list, as well as the CRAN spatial task view. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 1/27/12 12:45 PM, "David L Carlson" <dcarlson at tamu.edu> wrote:>Look at distm() in package geosphere or geoDist() in package SoDA. > > >---------------------------------------------- >David L Carlson >Associate Professor of Anthropology >Texas A&M University >College Station, TX 77843-4352 > > > >-----Original Message----- >From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] >On >Behalf Of uday >Sent: Friday, January 27, 2012 6:41 AM >To: r-help at r-project.org >Subject: [R] calculating distance between latitude and longitude > >I have some satellite data which contains latitude and longitude >information >. > >>From this data I would like to calculate distance between first location >(scalar latitude and longitude) and all other (vectors latitude and >longitude) > >How I should solve this problem ? > > > > > > >-- >View this message in context: >http://r.789695.n4.nabble.com/calculating-distance-between-latitude-and-lo >ng >itude-tp4333332p4333332.html >Sent from the R help mailing list archive at Nabble.com. > >______________________________________________ >R-help at r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code. > >______________________________________________ >R-help at r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code.
R. A. Bilonick
2012-Jan-29 06:28 UTC
[R] calculating distance between latitude and longitude
On 01/27/2012 07:40 AM, uday wrote:> I have some satellite data which contains latitude and longitude information > . > > > From this data I would like to calculate distance between first location > (scalar latitude and longitude) and all other (vectors latitude and > longitude) > > How I should solve this problem ? > > > > > > > -- > View this message in context: http://r.789695.n4.nabble.com/calculating-distance-between-latitude-and-longitude-tp4333332p4333332.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.You might want to look at the convUL function in the PBSmapping package. Rick -- --- Richard A. Bilonick, PhD Assistant Professor 412 647 5756 Dept. of Ophthalmology, School of Medicine Dept. of Biostatistics, Graduate School of Public Health Principal Investigator: Pittsburgh Aerosol Research and Inhalation Epidemiology Study (PARIES) University of Pittsburgh