[R] distance by sea

David L Carlson dcarlson at tamu.edu
Thu Jun 5 16:59:37 CEST 2014

Package geosphere has functions to compute the great circle distance between any two points given the latitude and longitude. It does not care if they are at sea, but does not take topography into account.

David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Jeff Newmiller
Sent: Thursday, June 5, 2014 9:16 AM
To: Giulia Fassio; r-help at r-project.org
Subject: Re: [R] distance by sea

If it is possible at all (and I suspect it is) then it should be possible in R. However, your question is lazy... you should not be asking about black boxes that magically solve your problem, but rather do a search for algorithms that accomplish your goals (wouldn't you want to know if someone had found a solution that handled staying on land?), and then search for (using Google or RSiteSearch or package sos) implementations of the algorithm. At least that way you would encounter options to help do it yourself or use a different tool for that task if no canned solution were available.
Also, the R-sig-geo list would be more likely to have expertise in this area, especially if you described some algorithms you had already looked at.
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
Sent from my phone. Please excuse my brevity.

On June 5, 2014 5:58:11 AM PDT, Giulia Fassio <giuliafassio at gmail.com> wrote:
>someone know if it is possible to use R to calculate distance by sea
>between two geographic coordinates? I have many points in the sea and I
>want to create a matrix using R of the length of trajectories that pass
>only trough sea.

R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list