One engine, one mental model¶
A geospatial engine for Python, written in Rust. gometry replaces the day-to-day stack of Shapely + pyproj + h3-py + s2sphere + rtree with one coherent package — no GEOS, no GDAL, no system PROJ.
uv add gometry
import gometry as gm
origin = gm.Point(2.2945, 48.8584, crs=4326)
landmarks = {
"Arc de Triomphe": (2.2950, 48.8738),
"Louvre": (2.3376, 48.8606),
"Notre-Dame": (2.3499, 48.8530),
"Versailles": (2.1204, 48.8049),
}
print("Within 5 km of the Eiffel Tower")
for name, coordinates in landmarks.items():
distance = gm.distance(origin, gm.Point(*coordinates, crs=4326))
if distance <= 5_000:
print(f"{name:<18} {distance / 1_000:>4.1f} km")
Within 5 km of the Eiffel Tower
Arc de Triomphe 1.7 km
Louvre 3.2 km
Notre-Dame 4.1 km
Find Paris landmarks within 5 km of the Eiffel Tower. With EPSG:4326 attached,
distance measures the geodesic distance in metres, so the
filter works directly in familiar units.
-
Explicit Earth model
The CRS decides every metric, and the result is native for that CRS. No guessing whether
areais degrees² or m², or whetherbuffer(100)means meters. Geographic coordinates also retain their CRS-native angular units and periodic seam. -
Native, vectorized
Batched Rust kernels, GeoArrow-compatible interchange, and vectorized array methods. Scalar calls stay a single, ordinary method call.
-
Grids, indexes, geodesy
H3, S2, geohash, and tile covers with explicit
cell_rule, spatial indexing, and ellipsoidal geodesics — all on one geometry type.
Why gometry¶
Declare, transform, refine¶
with_crs labels coordinates;
to_crs transforms them.
Index candidates and grid cells narrow
a search; exact predicates on the source geometry decide membership.
One spelling per operation¶
Facts are properties, unary operations are methods, and binary relationships are free functions. Find familiar operations in the migration cheatsheet.
Start with what you need¶
For questions, bug reports, and security disclosures, see Support and the issue tracker.