1👍
Reading through the documentation I found that this distance calculation in the GEOSGeometry class does not respect the SRID and is different than the one provided directly by the PostGIS database.
I used the python libray geopy which provides the distance
method for calculating distance.
from geopy.distance import distance as geopy_distance
geopy_distance(customer1.gis_location, customer2.gis_location).kilometers
Unfortunately I still can’t figure out how to do a distance calculation with two Point
s using Django’s GIS library.
Source:stackexchange.com