Puede utilizar el Enlaces GDAL Python . Ejemplos de cómo usarlo puedes encontrar aquí .
Por ejemplo, se crean puntos con lat/lon así
from osgeo import ogr # first import the library
point1 = ogr.Geometry(ogr.wkbPoint)
point1.AddPoint(13.381348,52.536273) # Berlin
point2 = ogr.Geometry(ogr.wkbPoint)
point2.AddPoint(11.557617,48.136767) # Munich
Crear una transformación de EPSG:4326 (lat/long) a EPSG:3035 (Sistema de coordenadas proyectado para Europa en metros)
inSpatialRef = osr.SpatialReference()
inSpatialRef.ImportFromEPSG(4326)
outSpatialRef = osr.SpatialReference()
outSpatialRef.ImportFromEPSG(3035)
coordTransform = osr.CoordinateTransformation(inSpatialRef, outSpatialRef)
Transformar nuestros puntos
point1.Transform(coordTransform)
>> POINT (4550348.379724434576929 3275002.535206703934819 0)
point2.Transform(coordTransform)
>>POINT (4436977.705661337822676 2781579.793173507787287 0)
Y obtener la distancia así
point1.Distance(point2) # Distance in meter from Munich to Berlin
>>> 506279.480221 # roughly 506 km
O puede crear un polígono
ring = ogr.Geometry(ogr.wkbLinearRing)
ring.AddPoint(-23.378906,68.974164) # North West Corner of Europe
ring.AddPoint(-23.378906,34.307144) # South West Corner of Europe
ring.AddPoint(31.464844,34.307144) # South East Corner of Europe
ring.AddPoint(31.464844,68.974164) # North East Corner of Europe
ring.AddPoint(-23.378906,68.974164) # North West Corner of Europe (to close to polygon)
polygon = ogr.Geometry(ogr.wkbPolygon)
polygon.AddGeometry(ring) # rough bounding box around Europe
polygon.Transform(coordTransform) # transform it
Y comprueba si el polígono contiene el punto
polygon.Contains(point1) # Does Europe contain Berlin?
>>> True # It does ;)
Y para el resto puedes escribir funciones para hacer lo que quieras.