I am working with a pretty large dataset (~500K data points) in Python (GeoPandas) and I would like to perform geospatial clustering on some subsets (~60K points) of the data. My question has to do with computing the pairwise distances for the clustering algorithm. I am having difficulty understanding how to compute geospatial distance because I can use haversine distance, assuming a constant radius for the earth; I can compute Vicenty distance; or I can simply use the lat/lon values to compute distance. My preference is the latter, for the sake of speed and computational resources, but I'm not sure how to apply this. Should I compute Euclidean distance between two lat/lon pairs? How does that translate into a surface distance? That is, given a [(lat1 - lat2), (lon1 - lon2)] pair, how does this translate into a "distance of X meters on the surface"?

Sorry, if I'm not really saying any of this correctly; I'm pretty new to geospatial computations.

  • Cartesian degrees doesn't translate into a meaningful distance, which is why the other options are available. – Vince Jul 6 '20 at 17:50
  • So, when someone performs geospatial clustering, they always employ haversine, Vicenty, or something else along those lines? Are there any computationally efficient means of computing this? – CopyOfA Jul 6 '20 at 18:04
  • Only if they're not using a projected coordinate reference system. I've processed tens of millions of rows through geodetic ellipse generation and didn't get bored. – Vince Jul 6 '20 at 19:01

Your Answer

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

Browse other questions tagged or ask your own question.