Registry / maps / fast-geo-distance

fast-geo-distance

JSON →
library0.4.2pypypi✓ verified 80d ago

Fast computation of geographical distances between coordinates using optimized algorithms. Current version 0.4.2, requires Python >=3.8. Low release cadence (last update 2021).

pip install fast-geo-distance
INSTALL
IMPORT
SIG · FAST-GEO-DISTANCE
F
fast-geo-distance
mapspythonv0.4.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

geodesic
from fast_geo_distance import geodesic
from fast_geo_distance import GeoDistance
batch_geodesic
from fast_geo_distance import batch_geodesic
fast_geo_distance
import fast_geo_distance

Compute distance between two points in kilometers.

from fast_geo_distance import GeoDistance, DistanceAlgorithm # Create GeoDistance instance (default algorithm: Haversine) geo = GeoDistance() # Coordinates: (lat1, lon1, lat2, lon2) dist = geo.distance(52.5200, 13.4050, 48.8566, 2.3522) # Berlin to Paris print(f"Distance: {dist:.2f} km")
Debug
Known issues
deprecatedThe `distance_haversine` and `distance_vincenty` functions are deprecated. Use `GeoDistance.distance()` with algorithm parameter instead.
fix
Replace with `GeoDistance(algorithm=DistanceAlgorithm.HAVERSINE).distance(lat1, lon1, lat2, lon2)`
affects: <0.4.0
gotchaCoordinates order is (lat, lon), not (lon, lat). Many other libraries use (lon, lat).
fix
Always pass latitude first, then longitude.
affects: all
breakingIn version 0.4.0, the `GeoDistance` class replaced the previous module-level functions. Old imports will fail.
fix
Use `from fast_geo_distance import GeoDistance` instead of `from fast_geo_distance import distance_haversine`.
affects: >=0.4.0
Upgrade
Version history
0.4.2latest on PyPI · released Nov 7, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
30 hits · last 30 days
node
26
OpenAI (training)
1
Resources

No resource links recorded.

fast-geo-distance — pip install fast-geo-distance · libregistry