I currently want to check if 2 given
GEOSGeometry objects of type
Point are within 100m of each other. (length flexible)
Looking at previous asked questions on this topic, most of the answers were totally not specific and even worse sent the author to other frameworks.
My goal is to stay with GEOS / GDAL (geo django) to solve this problem.
The current code I use:
from django.contrib.gis.geos import Point, GEOSGeometry pnt = GEOSGeometry('SRID=4326;POINT(40.396764 -3.68042)') pnt2 = GEOSGeometry('SRID=4326;POINT( 48.835797 2.329102 )') pnt.distance(pnt2) * 100
Found on gis.SO.
It is very difficult for me to confirm that this code works, because I would have to check the distances between to points and check the results against each other.
The main goal is to take 2 points and get the distance in meters based on the WGS84 projection and the GEOS or GDAL framework