Source: https://gometry.monicz.dev/

![gometry](https://gometry.monicz.dev/assets/logo.9c62a3050744e903.svg)

# 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.

[Get started](https://gometry.monicz.dev/get-started/quickstart/) 
[User guide](https://gometry.monicz.dev/guide/)

```bash
uv add gometry
```

```python
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")
```

```text
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`](https://gometry.monicz.dev/api/toplevel/measurement/#gometry.distance "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
  [`area`](https://gometry.monicz.dev/api/geometry/geometry/#gometry.Geometry.area "area property") is degrees² or m², or whether [`buffer(100)`](https://gometry.monicz.dev/api/geometry/geometry/#gometry.Geometry.buffer "buffer") means meters.
  Geographic coordinates also retain their CRS-native angular units and periodic seam.

  [Measurement & the CRS](https://gometry.monicz.dev/guide/crs/)
- **Native, vectorized**

  ---

  Batched Rust kernels, [GeoArrow](https://geoarrow.org/)-compatible interchange, and
  [vectorized array methods](https://gometry.monicz.dev/guide/arrays/). Scalar calls stay a single, ordinary method call.

  [Benchmarks](https://gometry.monicz.dev/about/benchmarks/)
- **Grids, indexes, geodesy**

  ---

  H3, S2, geohash, and tile covers with explicit `cell_rule`, spatial indexing,
  and [ellipsoidal geodesics](https://geographiclib.sourceforge.io/) — all on one geometry type.

  [Discrete grids](https://gometry.monicz.dev/guide/grids/)

## Why gometry

### Declare, transform, refine

[`with_crs`](https://gometry.monicz.dev/api/geometry/geometry/#gometry.Geometry.with_crs "with_crs") labels coordinates;
[`to_crs`](https://gometry.monicz.dev/api/geometry/geometry/#gometry.Geometry.to_crs "to_crs") transforms them.
[Index candidates](https://gometry.monicz.dev/guide/indexing/#candidates-vs-query) 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](https://gometry.monicz.dev/migrating/cheatsheet/).

## Start with what you need

[**Quickstart tutorial**
Build your first spatial query.
Installation, geometry, indexing, and exact refinement](https://gometry.monicz.dev/get-started/quickstart/)
[**User guide**
Solve a geometry task.
Focused guides for everyday operations](https://gometry.monicz.dev/guide/)
[**Mental model**
Understand CRS, units, and refinement.
The concepts that govern results](https://gometry.monicz.dev/get-started/mental-model/)
[**API reference**
Look up a public callable.
Signatures and behavior grouped by concept](https://gometry.monicz.dev/api/)

For questions, bug reports, and security disclosures, see
[Support](https://gometry.monicz.dev/about/support/) and the [issue tracker](https://github.com/Zaczero/pkgs/issues).
