3

I want to evaluate the distance between a set of points and lines on a small scale (points across China). I am using the sp package of R for this purpose which warns if the underlying coordinate system is not projected.

However, if I change my coordinate system to a projected coordinate system my distance calculations will not be 100% accurate due to distortions caused by the projection, right?

Thus, wouldn't it make more sense to calculate distances in a geographic coordinate system taking into account the refernce ellipsoid (like in the geosphere R package). Wouldn't this apporach give more accurate results?

  • What software are you using? – MappaGnosis Jun 29 '17 at 6:34
2

it depends on your tolerance to errors.

In most cases you can compute distances with enough precision when you work in a local projected coordinate system on a "small" regions (for instance, computing the shortest route for a car in a city). Accross China, you are no more in a local projected coordinate system, so the errors could be quite large.

Then, of cours, the geodetic distance (based on Vincenty's formula) is the "reference" distance for shortest path if you go straigth from A to B without obstacles, and it is not "that" slow to compute it with modern computers. But in Distance measurements across UTM zones: use geographic or planar approaches? , you can also see that a sinusoidal projection remains quite good approximation in most cases. And if you have a central point from which all distances are computed, then it would be accurate to use an azimuthal equidistant projection.

Finally, ask yourself what would be the largest source of errors to get the full picture of accuracy, e.g.

  • planes don't use the shortest distance but have several constraints to take into account, and the most important is the wind

  • most vehicles don't use the shortest distance but follow the road, rails etc.

  • if you climb a mountain, the real distance can sometimes be more effected by the slope than the distortions of the 2D projection

1

If you're measuring angular distance in degrees, a geographic projection would work, but, as I may understand, you're measuring in km, or miles, that wouldn't work as this document explains.

A projected coordinate system that would keep minimal to zero distortion in your distance would depend on the size of the area you're studying, but could include two point equidistant or especially Azimuthal Equidistant, that is mostly equidistant and keep true direction and it is also suitable for small to medium scale. Check this Esri summary of projections for more info.

  • The doc refers to a printed scalebar (so for measuring with a ruler, on paper). It does not talk about an algorithm for computing distances in lat-long and returning it in meters, like the Haversine formula – JGH Jun 29 '17 at 14:15
  • That's why I said in the first line that if he's measuring angular distance (and then converting it) it'll be fine. Thank you for your clarification. – Sergio C. Jun 29 '17 at 18:03
  • @SergioC. Angular distances have different linear distances depending on the location and direction of the line connecting to lat-lon coordinates. You can only approximate a linear distance if all you have is an angular distance. – mkennedy Jun 29 '17 at 19:25
1

There's a nice library written for different computer languages see. You can use the library to transform projected coordinate to geographic coordinates and than calculate the distance and area with the geographic coordinates. The results are in meter.

  • I agree (I'm the author of the library referred to here). In this application, measuring distances in various projections and assessing the resulting errors makes no sense. Just calculate the geodesic distance between pairs of points given in geographic coordinates (latitude and longitude). This is fast (about 1 microsecond per calculation, somewhat slower in interpretive languages) and accurate (error is about 0.01 micrometer). – cffk Jul 2 '17 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.