I am running a specific analysis where we use shapely to create buffers around points (store locations) and then check if other points (user locations) are present within that buffer value. When i check the distance using shapely, it turns out to be different from the distance I get from geopy. The haversine formula agrees with Geopy and a check on google maps using the measure distance function also gives around the same distance
Here is an example:
from shapely.geometry import Point, shape from pyproj import Proj, transform from geopy.distance import vincenty, great_circle pt_store=Point(transform(Proj(init='EPSG:4326'),Proj(init='EPSG:3857'),-76.799614, 39.435307)) pt_user=Point(transform(Proj(init='EPSG:4326'),Proj(init='EPSG:3857'),-76.79989,39.43604)) vincenty((39.435307,-76.799614),(39.43604,-76.79989)).meters great_circle((39.435307,-76.799614),(39.43604,-76.79989)).meters pt_store.distance(pt_user)
Haversine formula (http://www.movable-type.co.uk/scripts/latlong.html): 84.88
Which one is right? Shapely or others? Also, is such a big difference(~22%) expected? Or am I missing something?