[R-sig-Geo] Using distmap from spatstat with latitude and longitude

Philipp Boersch-Supan phb4 at st-andrews.ac.uk
Thu Jan 13 14:49:26 CET 2011


  Hi Gavan,

spDists/spDistsN1 from the sp package would be another option. It can 
return distances in kilometers based on the WGS84 ellipsoid.

HTH,
Philipp



On 13/01/2011 10:14, Barry Rowlingson wrote:
> On Thu, Jan 13, 2011 at 9:17 AM, Gavan McGrath<gavan.mcgrath at uwa.edu.au>  wrote:
>> Being new to spatial stats I need help calculating the distance to cyclone paths at continental scales.
>> I have a map with pixels at fixed latitude and longitude intervals and cyclone positions as lat and long points.
>> Can I use distmap from the spatstat package?
> Looks like that will only be happy with euclidean distances. You'll
> get an answer in degrees, which will depend on your latitude...
>
>   If you have lat-long data then the distance you probably want is the
> great circle distance, for which you can use the 'rdist.earth'
> function in the 'fields' package:
>
> -- Description:
>
>       Given two sets of longitude/latitude locations computes the Great
>       circle (geographic) distance matrix among all pairings.
>
>
>   RSiteSearch("great circle") gives some other options for working out
> distances on this non-spherical planet on which we live on.
>
> Barry
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-- 
Philipp Boersch-Supan, MRes

Pelagic Ecology Research Group
University of St. Andrews

Current Address:
University of Oxford
Department of Zoology
South Parks Road
Oxford
OX1 3PS
United Kingdom



More information about the R-sig-Geo mailing list