Skip to content

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. NumPy is a required dependency; every dense result is a typed ndarray.
  • Columnar interchange / lakehouse / storage & maps → Arrow & storage (Arrow PyCapsules, pyarrow optional; also GeoParquet files and lonboard maps).
  • DataFrames → DataFrames (explicit pandas extension storage, Polars WKB Series, and GeoPandas round-trip).
  • Files, wire formats, databases → Text & binary 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 → 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 to_arrow PROJJSON native layouts
GeoParquet gometry[arrow] from_geoparquet arr.to_geoparquet() PROJJSON header via pyarrow
pandas gometry[pandas] from_pandas arr.to_pandas() registered gometry.geometry dtype native extension storage
polars gometry[polars] gm.from_polars(series) arr.to_polars() EWKB EPSG SRID only encode/decode copy
GeoPandas gometry[geopandas] from_geopandas arr.to_geopandas() from frame vectorized WKB
Arrow C consumers (none) — consume gometry __arrow_c_*__ metadata capsule path
lonboard gometry[viz] — explore, notebook _repr_html_ reprojects toward WGS84 Arrow capsule route; preprocessing and widget construction may allocate
Shapely (none) __geo_interface__, GeometryArray([...]) geom.__geo_interface__, Features.__geo_interface__ no (GeoJSON) —
pyproj (none) CRS(pyproj_crs) (duck-typed) crs.to_wkt() / to_authority() — —
scipy / scikit-learn (none) — np.asarray(geom.coords, dtype=np.float64) → ndarray project first matrix copy
pickle / multiprocessing (none) pickle.loads pickle.dumps preserved (+ epoch) —

Optional extras

Install an extra for the adapter you use, such as pip install "gometry[pandas]". See Installation 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 for the supported NumPy protocols and coordinate handoff.