[R-sig-Geo] Verify units of distance between coordinates

Sarah Goslee sarah.goslee at gmail.com
Thu Aug 28 14:50:49 CEST 2014


They don't make sense.

Best: convert them into a projection where the distances are in meters
already, like UTM. Then distances calculated on your new coordinates
are in meters.

Latitude and longitude don't translate neatly into distances on their own.

Second best: find and use a great circle distance function that can
determine the correct distances for where those lat/lon coordinates
are on the earth's surface. There's been discussion on this list
before about calculating distances from geographic coordinates; google
should find them.

Sarah

On Thu, Aug 28, 2014 at 8:44 AM, Justin Michell <jwm302 at gmail.com> wrote:
> Dear geo R group
>
> I have a data frame like this:
>
> df <- data.frame(Lon = c(29.6000,29.7333,30.3887,30.6667,30.6833,30.8667), Lat = c(-4.9000,-4.6000,-5.1280,-1.0667,-2.7500,-3.3833),
>                   LonWater = c(29.63333,29.63333,30.25000,30.65000,30.35444,30.83278), LatWater = c(-4.31667,-4.31667,-4.76667,-1.35000,-2.46667,-3.57000), DstClW = c(0.5842815,0.3004491,0.3870362,0.2837918,0.4340793,0.1897561) )
>
> At these locations (Lon, Lat pairs) I calculated the shortest distance to a water source (DstClW) and where that source is (LonWater, LatWater).
>
> I want to now determine what units DstClW is in, and also verify that these distances make sense and were calculated correctly.
>
> Any suggestions as to how this might be done?
>
> Regards
> Justin Michell
>
>
>
-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-sig-Geo mailing list