Distance between coordinates computation speed: conversion to UTM vs Great CirclePoint plus distance along...

US to Europe trip with Montreal layover - is 52 minutes enough?

Does splitting a potentially monolithic application into several smaller ones help prevent bugs?

How to deal with a cynical class?

Deleting missing values from a dataset

Does anyone draw a parallel between Haman selling himself to Mordechai and Esav selling the birthright to Yaakov?

Who is our nearest neighbor

Can you reject a postdoc offer after the PI has paid a large sum for flights/accommodation for your visit?

Examples of odd-dimensional manifolds that do not admit contact structure

My adviser wants to be the first author

Make a transparent 448*448 image

What exactly is the purpose of connection links straped between the rocket and the launch pad

What is the dot in “1.2.4."

Plywood subfloor won't screw down in a trailer home

What is the likely impact on flights of grounding an entire aircraft series?

Rejected in 4th interview round citing insufficient years of experience

How could a female member of a species produce eggs unto death?

My story is written in English, but is set in my home country. What language should I use for the dialogue?

Life insurance that covers only simultaneous/dual deaths

If Invisibility ends because the original caster casts a non-concentration spell, does Invisibility also end on other targets of the original casting?

Do I need to leave some extra space available on the disk which my database log files reside, for log backup operations to successfully occur?

Why would a jet engine that runs at temps excess of 2000°C burn when it crashes?

What Happens when Passenger Refuses to Fly Boeing 737 Max?

Why does Deadpool say "You're welcome, Canada," after shooting Ryan Reynolds in the end credits?

"However" used in a conditional clause?



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


Point plus distance along great circle using RGeo or WKTWhat's the difference between vincenty and great circle distance calculations?Drawing smooth great circle?Project location on a (great circle) pathProjecting Cross-Track distance on great Circle?NNJoin returns incorrect distancesConfusion regarding distance calculation in R (euclidean distance, “great circle distance”)PostGIS: Geography to geometry, best projection and architectureCalculate Great Circle Distance between two point layers via way pointFormula for the great circle arc between two points (lng/lat coordinates)













0















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).










share|improve this question














bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • How accurate do the distances need to be and what's the longest distance you plan to calculate? Transverse Mercator isn't a particularly speedy algorithm itself.

    – mkennedy
    Feb 11 at 4:03











  • small distances think in the 100m range. I thought Transverse Mercator would be the slower algorithm, the advantage would be that I only need to run it once per point instead of thousands of times with Greater Circle.

    – whossname
    Feb 11 at 4:12











  • as far as accuracy is concerned so long as it is within say 10cm, I'm happy. Is accuracy a concern with either of these algorithms?

    – whossname
    Feb 11 at 4:14






  • 1





    Have you considered doing performance tests for comparison?

    – Kirk Kuykendall
    Feb 11 at 4:37











  • Indeed, @KirkKuykendall has the right idea here. The best way to know how your data will perform on your hardware in two or three different algorithms is to perform a benchmark evaluation with a statistically significant sample of features.

    – Vince
    Feb 11 at 11:19
















0















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).










share|improve this question














bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • How accurate do the distances need to be and what's the longest distance you plan to calculate? Transverse Mercator isn't a particularly speedy algorithm itself.

    – mkennedy
    Feb 11 at 4:03











  • small distances think in the 100m range. I thought Transverse Mercator would be the slower algorithm, the advantage would be that I only need to run it once per point instead of thousands of times with Greater Circle.

    – whossname
    Feb 11 at 4:12











  • as far as accuracy is concerned so long as it is within say 10cm, I'm happy. Is accuracy a concern with either of these algorithms?

    – whossname
    Feb 11 at 4:14






  • 1





    Have you considered doing performance tests for comparison?

    – Kirk Kuykendall
    Feb 11 at 4:37











  • Indeed, @KirkKuykendall has the right idea here. The best way to know how your data will perform on your hardware in two or three different algorithms is to perform a benchmark evaluation with a statistically significant sample of features.

    – Vince
    Feb 11 at 11:19














0












0








0








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).










share|improve this question














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).







performance utm great-circle






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 11 at 4:00









whossnamewhossname

1011




1011





bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • How accurate do the distances need to be and what's the longest distance you plan to calculate? Transverse Mercator isn't a particularly speedy algorithm itself.

    – mkennedy
    Feb 11 at 4:03











  • small distances think in the 100m range. I thought Transverse Mercator would be the slower algorithm, the advantage would be that I only need to run it once per point instead of thousands of times with Greater Circle.

    – whossname
    Feb 11 at 4:12











  • as far as accuracy is concerned so long as it is within say 10cm, I'm happy. Is accuracy a concern with either of these algorithms?

    – whossname
    Feb 11 at 4:14






  • 1





    Have you considered doing performance tests for comparison?

    – Kirk Kuykendall
    Feb 11 at 4:37











  • Indeed, @KirkKuykendall has the right idea here. The best way to know how your data will perform on your hardware in two or three different algorithms is to perform a benchmark evaluation with a statistically significant sample of features.

    – Vince
    Feb 11 at 11:19



















  • How accurate do the distances need to be and what's the longest distance you plan to calculate? Transverse Mercator isn't a particularly speedy algorithm itself.

    – mkennedy
    Feb 11 at 4:03











  • small distances think in the 100m range. I thought Transverse Mercator would be the slower algorithm, the advantage would be that I only need to run it once per point instead of thousands of times with Greater Circle.

    – whossname
    Feb 11 at 4:12











  • as far as accuracy is concerned so long as it is within say 10cm, I'm happy. Is accuracy a concern with either of these algorithms?

    – whossname
    Feb 11 at 4:14






  • 1





    Have you considered doing performance tests for comparison?

    – Kirk Kuykendall
    Feb 11 at 4:37











  • Indeed, @KirkKuykendall has the right idea here. The best way to know how your data will perform on your hardware in two or three different algorithms is to perform a benchmark evaluation with a statistically significant sample of features.

    – Vince
    Feb 11 at 11:19

















How accurate do the distances need to be and what's the longest distance you plan to calculate? Transverse Mercator isn't a particularly speedy algorithm itself.

– mkennedy
Feb 11 at 4:03





How accurate do the distances need to be and what's the longest distance you plan to calculate? Transverse Mercator isn't a particularly speedy algorithm itself.

– mkennedy
Feb 11 at 4:03













small distances think in the 100m range. I thought Transverse Mercator would be the slower algorithm, the advantage would be that I only need to run it once per point instead of thousands of times with Greater Circle.

– whossname
Feb 11 at 4:12





small distances think in the 100m range. I thought Transverse Mercator would be the slower algorithm, the advantage would be that I only need to run it once per point instead of thousands of times with Greater Circle.

– whossname
Feb 11 at 4:12













as far as accuracy is concerned so long as it is within say 10cm, I'm happy. Is accuracy a concern with either of these algorithms?

– whossname
Feb 11 at 4:14





as far as accuracy is concerned so long as it is within say 10cm, I'm happy. Is accuracy a concern with either of these algorithms?

– whossname
Feb 11 at 4:14




1




1





Have you considered doing performance tests for comparison?

– Kirk Kuykendall
Feb 11 at 4:37





Have you considered doing performance tests for comparison?

– Kirk Kuykendall
Feb 11 at 4:37













Indeed, @KirkKuykendall has the right idea here. The best way to know how your data will perform on your hardware in two or three different algorithms is to perform a benchmark evaluation with a statistically significant sample of features.

– Vince
Feb 11 at 11:19





Indeed, @KirkKuykendall has the right idea here. The best way to know how your data will perform on your hardware in two or three different algorithms is to perform a benchmark evaluation with a statistically significant sample of features.

– Vince
Feb 11 at 11:19










1 Answer
1






active

oldest

votes


















0














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.






share|improve this answer


























  • 1) It's actually millions of points, it's just that I'm running an O(nlogn) algorithm so I only need to run it thousands of times per point. The previous thing I tried took 17 hours for 2 weeks of data. We have years of data to process.

    – whossname
    Feb 12 at 12:12











  • 3) Don't worry, I'm on top of this part of it. I've done a fait bit of work with UTM in the past

    – whossname
    Feb 12 at 12:14











  • 2) thanks for this, I'll check those out

    – whossname
    Feb 12 at 12:14











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "79"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f311708%2fdistance-between-coordinates-computation-speed-conversion-to-utm-vs-great-circl%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














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.






share|improve this answer


























  • 1) It's actually millions of points, it's just that I'm running an O(nlogn) algorithm so I only need to run it thousands of times per point. The previous thing I tried took 17 hours for 2 weeks of data. We have years of data to process.

    – whossname
    Feb 12 at 12:12











  • 3) Don't worry, I'm on top of this part of it. I've done a fait bit of work with UTM in the past

    – whossname
    Feb 12 at 12:14











  • 2) thanks for this, I'll check those out

    – whossname
    Feb 12 at 12:14
















0














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.






share|improve this answer


























  • 1) It's actually millions of points, it's just that I'm running an O(nlogn) algorithm so I only need to run it thousands of times per point. The previous thing I tried took 17 hours for 2 weeks of data. We have years of data to process.

    – whossname
    Feb 12 at 12:12











  • 3) Don't worry, I'm on top of this part of it. I've done a fait bit of work with UTM in the past

    – whossname
    Feb 12 at 12:14











  • 2) thanks for this, I'll check those out

    – whossname
    Feb 12 at 12:14














0












0








0







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.






share|improve this 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.







share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 12 at 5:46

























answered Feb 12 at 5:31









Ralph TeeRalph Tee

1,027210




1,027210













  • 1) It's actually millions of points, it's just that I'm running an O(nlogn) algorithm so I only need to run it thousands of times per point. The previous thing I tried took 17 hours for 2 weeks of data. We have years of data to process.

    – whossname
    Feb 12 at 12:12











  • 3) Don't worry, I'm on top of this part of it. I've done a fait bit of work with UTM in the past

    – whossname
    Feb 12 at 12:14











  • 2) thanks for this, I'll check those out

    – whossname
    Feb 12 at 12:14



















  • 1) It's actually millions of points, it's just that I'm running an O(nlogn) algorithm so I only need to run it thousands of times per point. The previous thing I tried took 17 hours for 2 weeks of data. We have years of data to process.

    – whossname
    Feb 12 at 12:12











  • 3) Don't worry, I'm on top of this part of it. I've done a fait bit of work with UTM in the past

    – whossname
    Feb 12 at 12:14











  • 2) thanks for this, I'll check those out

    – whossname
    Feb 12 at 12:14

















1) It's actually millions of points, it's just that I'm running an O(nlogn) algorithm so I only need to run it thousands of times per point. The previous thing I tried took 17 hours for 2 weeks of data. We have years of data to process.

– whossname
Feb 12 at 12:12





1) It's actually millions of points, it's just that I'm running an O(nlogn) algorithm so I only need to run it thousands of times per point. The previous thing I tried took 17 hours for 2 weeks of data. We have years of data to process.

– whossname
Feb 12 at 12:12













3) Don't worry, I'm on top of this part of it. I've done a fait bit of work with UTM in the past

– whossname
Feb 12 at 12:14





3) Don't worry, I'm on top of this part of it. I've done a fait bit of work with UTM in the past

– whossname
Feb 12 at 12:14













2) thanks for this, I'll check those out

– whossname
Feb 12 at 12:14





2) thanks for this, I'll check those out

– whossname
Feb 12 at 12:14


















draft saved

draft discarded




















































Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f311708%2fdistance-between-coordinates-computation-speed-conversion-to-utm-vs-great-circl%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Щит и меч (фильм) Содержание Названия серий | Сюжет |...

is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

Meter-Bus Содержание Параметры шины | Стандартизация |...