TransWikia.com

Distance between coordinates computation speed: conversion to UTM vs Great Circle

Geographic Information Systems Asked by whossname on January 23, 2021

For a program I am writing I need to calculate the distances between coordinates. Seeing as I need to perform a large number of these calculations for each coordinate (thousands) it makes sense to convert to UTM, then calculate the distance (seeing as I am just comparing distances, I can even work with the square of the distance between the points).

At what point does this trade off make sense? As far as I can tell by reading the relevant calculations Greater Circle would be the faster algorithm, but obviously once you do the conversion to UTM you don’t need to do it again. How many times do you need to run the Greater Circle algorithm before it makes sense to convert to UTM instead? (Assume that the accuracy isn’t a big deal in my situation).

One Answer

1)

IMHO, If your app were to run on a present-day server/desktop/notebook, be it real or virtual, any amount of effort you put into ramping up the computation throughput will far outweigh the return. Thousands of points or thousands of pairs of points are relatively small amounts. I would just use a library, e.g., the Karney formula/function in GeoPy.

2)

For 10 cm error margin, I would turn to Vincenty or Karney. But since your distances are small (i.e., within 100 meters), I doubt this recommendation matters.

3)

As JGH had correctly cautioned, if you go the convert-to-UTM-first route, all your points must be in the same UTM zone, or projected into the same Transverse Mercator grid/plane. And you need to be aware that a UTM Zone or a projected Transverse Mercator grid plane has its valid bounds.

Answered by Ralph Tee on January 23, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP