Monday, February 23, 2015

Spatial Distances in Python with GeoPy

So as I'm redoing my dissertation work, one of the functions I used was to calculate the distance between two locations based upon their coordinates (latitude and longitude).  At the time, I was referencing and using what is commonly referred to as the Great Circle distance.  So in the middle of my re-write into Python I stumbled across:

GeoPy

They not only provide the Great Circle distance calculation in their module, they introduced me to the Vincenty Distance.  According to the module authors this is a more accurate approach for calculating the distance.

It looks like I have a new way to calculate my spatial distances, and even better, I don't have to program it up myself.  I'm loving this Python re-write process already.

No comments:

Post a Comment