The author is a founder of a mapping company, so he very likely knows this, and the article is aimed at a more layman audience who likes to play around with Google Maps and such.
The author is a founder of a mapping company, so he very likely knows this, and the article is aimed at a more layman audience who likes to play around with Google Maps and such.
Looks like the points are at approximately N57°18.280', W3°55.948' -> N56°54.152', W4°56.664' if anyone wants to do the math. My guess is the rhumb line and GC route differ by no more than a few meters.
I was hoping the article would go more into how they searched the data and found the points. An exhaustive search of all points in the U.K. would obviously be computationally prohibitive. Maybe create millions of polygons where the edges are roads, and sort them by area to reduce the search space? From the article's text it looks like he "eyeballed" the map to find empty areas to focus on, which is unsatisfying :)
library(oce)
lat <- c(57+18.280/60, 56+54.152/60)
lon <- -c(3+55.948/60, 4+56.664/60)
m <- lm(lat ~ lon)
# Find points along a great-circle route
gc <- oce::geodGc(lon, lat, 0.001)
# 'scale' is distance associated with 1 degree latitude shift
scale <- geodDist(mean(lon), mean(lat), mean(lon), mean(lat)+1)
# 'e' is latitude shift from great-circle route to 'straight' line route
e <- scale\*sapply(seq_along(gc$longitude),
function(i)
gc$latitude[i] - predict(m, data.frame(lon=gc$longitude[i])))
plot(gc$longitude, e, type="l",
xlab="Longitude [degE]", ylab="Distance error [km]", col=2)
max(e)The Mercator projection stretches things away from the equator vertically to compensate the horizontal stretching, in order to preserve local shapes. This makes it a bit better for these kinds of local measurements than one might think at first glance.
# Northing distance between rhumb and great-circle paths.
library(oce)
lat <- c(57+18.280/60, 56+54.152/60)
lon <- -c(3+55.948/60, 4+56.664/60)
# Great-circle path, first in longitude-latitude space, and then
# (for Mercator projection) in easting-northing space.
gc <- oce::geodGc(lon, lat, 0.01) # same results for 3rd arg any value < 0.01
gcXY <- lonlat2map(gc$longitude, gc$latitude, projection="+proj=merc")
# Create function, f(easting), that computes northing value on
# a rhumb line. We need this to make the two lines share easting
# values.
p <- oce::lonlat2map(lon, lat, "+proj=merc")
m <- lm(y ~ x, data=p)
X <- seq(p$x[1], p$x[2], length.out=length(gc$longitude))
Y <- predict(m, data.frame(x=X))
f <- approxfun(X, Y) # interpolating function
# Compute the northing error.
northingError <- f(gcXY$x) - gcXY$y
maxNorthingError <- round(max(abs(northingError)), 1)
message("maxNorthingError=", maxNorthingError, " [m]")
plot(gcXY$x, northingError, type="l", xlab="Easting [m]", ylab="Northing error [m]")
mtext(paste("max northing error ", maxNorthingError, " [m]"))Edit: My point here is that if you try to plot a literal straight line through 3D space, it will be necessary to allow some amount of deviation in one axis. Else your longest 3D line will be the distance between your first two points.
Reading total elevation gain/loss from his graph it hard but 3000m up and down seems about right.
Great video on this from Matt Parker (focusing on area in this case): https://youtu.be/PtKhbbcc1Rc
The OS published a good introductory (but detailed) guide some years ago: https://www.ordnancesurvey.co.uk/documents/resources/guide-c...
Or crossing water.
I think given this constraints a line from any non-pub-road, non-water place in GB to the center of the earth is the longest straight line, without considering space bending around mass. :)