larzgeo
Geospatial basics.
Haversine distance, bearing, geohashing (canonical-vector-verified) and point-in-polygon — the geospatial primitives most apps actually need.
larzscript pkg install geo
What you get
- Haversine & bearing
- Geohash encode/decode
- Point-in-polygon
- Verified vectors
Try it
import "geo" as geo print(round(geo.haversine(51.5074, -0.1278, 48.8566, 2.3522), 1)) print(geo.geohash_encode(57.64911, 10.40744, 6)) print(geo.point_in_polygon(1, 1, [[0,0],[2,0],[2,2],[0,2]])) print(geo.point_in_polygon(5, 5, [[0,0],[2,0],[2,2],[0,2]]))
Output
343.6 u4pruy true false
Why it's in the Larz Stack
larzgeo is a real Larzscript package (larzscript pkg install geo) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.