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

# Ecosystem & interoperability

Use gometry with NumPy, dataframes, Arrow, and common geometry formats.
The adapters make copying and metadata loss explicit.

## Choose your boundary

- **Coordinates and bulk numeric results** → [NumPy arrays & coordinates](https://gometry.monicz.dev/ecosystem/numpy/).
  NumPy is a required dependency; every dense result is a typed ndarray.
- **Columnar interchange / lakehouse / storage & maps** → [Arrow & storage](https://gometry.monicz.dev/ecosystem/arrow/)
  (Arrow PyCapsules, pyarrow optional; also GeoParquet files and lonboard maps).
- **DataFrames** → [DataFrames](https://gometry.monicz.dev/ecosystem/dataframes/) (explicit pandas extension
  storage, Polars WKB Series, and GeoPandas round-trip).
- **Files, wire formats, databases** → [Text & binary formats](https://gometry.monicz.dev/ecosystem/text-formats/)
  (WKB/EWKB, WKT/EWKT, GeoJSON, `__geo_interface__`, pickle).

## Partner matrix

"Native" integrations need no optional install.

| Partner | Install | → gometry | gometry → | CRS carried | Copy/ownership note |
| --- | --- | --- | --- | --- | --- |
| **NumPy** | *(required)* | coordinate buffers → constructors / factories | ndarray returns, [`geom.coords`](https://gometry.monicz.dev/api/geometry/geometry/#gometry.Geometry.coords "coords property") → matrix / row-index views | n/a | matrix export copies; per-axis columns may borrow |
| **Arrow / GeoArrow** | *(native capsules)* | consume `__arrow_c_array__`/`__arrow_c_stream__` | export GeoArrow geometry and cell ID/token columns | PROJJSON | packed geometry or primitive cell values |
| **pyarrow** | `gometry[arrow]` | [`from_arrow`](https://gometry.monicz.dev/api/toplevel/io-interop/#gometry.from_arrow "from_arrow") | [`to_arrow`](https://gometry.monicz.dev/api/geometry/geometry/#gometry.Geometry.to_arrow "to_arrow") | PROJJSON | native layouts |
| **GeoParquet** | `gometry[arrow]` | [`from_geoparquet`](https://gometry.monicz.dev/api/interop/#gometry.from_geoparquet "from_geoparquet") | [`arr.to_geoparquet()`](https://gometry.monicz.dev/api/geometry/geometryarray/#gometry.GeometryArray.to_geoparquet "to_geoparquet") | PROJJSON header | via pyarrow |
| **pandas** | `gometry[pandas]` | [`from_pandas`](https://gometry.monicz.dev/api/interop/#gometry.from_pandas "from_pandas") | [`arr.to_pandas()`](https://gometry.monicz.dev/api/geometry/geometryarray/#gometry.GeometryArray.to_pandas "to_pandas") | registered `gometry.geometry` dtype | native extension storage |
| **polars** | `gometry[polars]` | [`gm.from_polars(series)`](https://gometry.monicz.dev/api/interop/#gometry.from_polars "from_polars") | [`arr.to_polars()`](https://gometry.monicz.dev/api/geometry/geometryarray/#gometry.GeometryArray.to_polars "to_polars") | EWKB EPSG SRID only | encode/decode copy |
| **GeoPandas** | `gometry[geopandas]` | [`from_geopandas`](https://gometry.monicz.dev/api/interop/#gometry.from_geopandas "from_geopandas") | [`arr.to_geopandas()`](https://gometry.monicz.dev/api/geometry/geometryarray/#gometry.GeometryArray.to_geopandas "to_geopandas") | from frame | vectorized WKB |
| **Arrow C consumers** | *(none)* | — | consume gometry `__arrow_c_*__` | metadata | capsule path |
| **lonboard** | `gometry[viz]` | — | [`explore`](https://gometry.monicz.dev/api/interop/#gometry.explore "explore"), notebook `_repr_html_` | reprojects toward WGS84 | Arrow capsule route; preprocessing and widget construction may allocate |
| **Shapely** | *(none)* | `__geo_interface__`, [`GeometryArray([...])`](https://gometry.monicz.dev/api/geometry/geometryarray/#gometry.GeometryArray "GeometryArray") | [`geom.__geo_interface__`](https://gometry.monicz.dev/ecosystem/text-formats/#__geo_interface__), [`Features.__geo_interface__`](https://gometry.monicz.dev/ecosystem/text-formats/#features__geo_interface__) | no (GeoJSON) | — |
| **pyproj** | *(none)* | [`CRS(pyproj_crs)`](https://gometry.monicz.dev/api/crs/#gometry.CRS "CRS") (duck-typed) | [`crs.to_wkt()`](https://gometry.monicz.dev/api/crs/#gometry.CRS.to_wkt "to_wkt") / [`to_authority()`](https://gometry.monicz.dev/api/crs/#gometry.CRS.to_authority "to_authority") | — | — |
| **scipy / scikit-learn** | *(none)* | — | `np.asarray(geom.coords, dtype=np.float64)` → ndarray | project first | matrix copy |
| **pickle / [multiprocessing](https://docs.python.org/3/library/multiprocessing.html)** | *(none)* | [`pickle.loads`](https://docs.python.org/3/library/pickle.html#pickle.loads) | [`pickle.dumps`](https://docs.python.org/3/library/pickle.html#pickle.dumps) | preserved (+ epoch) | — |

## Optional extras

Install an extra for the adapter you use, such as `pip install "gometry[pandas]"`.
See [Installation](https://gometry.monicz.dev/get-started/installation/#optional-extras) for all extras.

### Zero import cost when unused

`import gometry` does not import pandas, Polars, PyArrow, arro3, GeoPandas, or
lonboard. Adapters import the requested framework when called.

## Python Array API compatibility

Gometry is not a Python Array API provider; see [NumPy arrays & coordinates](https://gometry.monicz.dev/ecosystem/numpy/#python-array-api-compatibility)
for the supported NumPy protocols and coordinate handoff.
