geoparquet-lite
Read, write and validate GeoParquet 1.0 and 1.1 with nothing but pyarrow.
No geopandas, shapely, GDAL or PROJ is required. That makes it a good fit for data pipelines, serverless functions, DuckDB and Spark interop, and small containers where a full geospatial stack is too heavy. geopandas and shapely remain available as optional extras for interop.
pip install geoparquet-lite # pyarrow only
pip install "geoparquet-lite[geopandas]" # + GeoDataFrame bridges
Features
- Metadata: read, write and validate the
geokey of GeoParquet 1.0.0 and 1.1.0. The validator applies every constraint of the official JSON schemas plus the rules that only the spec text states. It needs nojsonschemadependency. - Encodings: WKB, and the 1.1 native GeoArrow encodings
point,linestring,polygon,multipoint,multilinestringandmultipolygon(separated struct/list layout). Columns can be converted in both directions. - Pure-Python WKB codec: 2D, Z, M and ZM, all seven OGC types, both byte orders, and ISO WKB as well as PostGIS EWKB input. It converts between WKB, GeoJSON-like dicts and GeoArrow arrays.
- Spatial filtering: writes a 1.1
covering.bboxcolumn. On read, row groups are pruned using the Parquet min/max statistics of that column, or of thex/yleaves of a native encoding. The remaining rows are then filtered exactly by bounding box, or by true intersection when shapely is installed. Query boxes that cross the antimeridian are supported. - Hilbert sort on write, so row groups are spatially compact and pruning skips more of the file.
- CRS as PROJJSON, following the spec's defaults: no key means OGC:CRS84 and
nullmeans unknown. PROJJSON for OGC:CRS84, EPSG:4326, EPSG:3857, EPSG:4979 and EPSG:4258 is bundled, and pyproj is used for other codes if it is installed. edges(planar/spherical),orientation(counterclockwise, with ring rewinding),epoch,geometry_typesand the columnbbox.- Column projection, batch iteration and fsspec/pyarrow filesystems.
- A
validate(path)report with clear messages, andinfo(path). - A CLI:
geoparquet-lite info | validate | to-geojson | from-geojson | add-bbox | convert.
Quick start
import geoparquet_lite as gpq
fc = {
"type": "FeatureCollection",
"features": [
{"type": "Feature", "geometry": {"type": "Point", "coordinates": [29.0, 41.0]},
"properties": {"name": "Istanbul"}},
{"type": "Feature", "geometry": {"type": "Point", "coordinates": [32.85, 39.93]},
"properties": {"name": "Ankara"}},
],
}
# GeoParquet 1.1, WKB, bbox covering column, zstd. Returns the written `geo` metadata.
gpq.write(fc, "cities.parquet", crs="EPSG:4326", sort_hilbert=True, row_group_size=50_000)
# Native GeoArrow encoding instead of WKB:
gpq.write(fc, "cities_native.parquet", encoding="geoarrow")
# Read only what intersects a box. Row groups outside it are never read.
table = gpq.read_table("cities.parquet", bbox=(28, 40, 30, 42), columns=["name", "geometry"])
# Stream batches, or GeoJSON features:
for batch in gpq.iter_batches("cities.parquet", batch_size=10_000):
...
for feature in gpq.read_features("cities.parquet", bbox=(28, 40, 30, 42)):
print(feature["properties"]["name"], feature["geometry"])
report = gpq.validate("cities.parquet")
print(report) # "cities.parquet: valid GeoParquet (0 error(s), 0 warning(s), ...)"
assert report.ok
print(gpq.info("cities.parquet")) # rows, row groups, encodings, CRS, row-group bboxes
Converting and upgrading files
gpq.convert("in.parquet", "native.parquet", encoding="geoarrow") # WKB -> native
gpq.convert("native.parquet", "wkb.parquet", encoding="WKB") # native -> WKB
gpq.add_bbox_covering("v1_0.parquet", "v1_1.parquet", sort_hilbert=True)
table = gpq.read_table("in.parquet", to_encoding="geoarrow") # convert while reading
table = gpq.convert_table(table, "WKB")
gpq.write(table, "out.parquet") # tables keep their CRS / edges / orientation metadata
WKB and GeoArrow helpers
from geoparquet_lite import wkb, geoarrow
blob = wkb.dumps({"type": "Polygon", "coordinates": [[[0, 0], [1, 0], [1, 1], [0, 0]]]})
wkb.loads(blob) # -> GeoJSON-like dict
wkb.read_header(blob) # WKBHeader(Polygon XY, ISO, little)
# XYM has no GeoJSON form, so a "dims" key marks it:
wkb.dumps({"type": "Point", "coordinates": [1, 2, 7], "dims": "XYM"})
arr = geoarrow.from_geometries([...]) # narrowest native encoding that fits
geoarrow.to_geometries(arr, "polygon")
geoarrow.to_wkb(arr, "polygon"); geoarrow.from_wkb(wkb_array, "multipolygon")
geopandas / shapely (optional)
from geoparquet_lite import interop
gdf = interop.to_geopandas(gpq.read_table("cities.parquet", bbox=(28, 40, 30, 42)))
interop.from_geopandas(gdf, "out.parquet", encoding="geoarrow")
geoms = interop.to_shapely(table.column("geometry"), "WKB")
CLI
geoparquet-lite info data.parquet [--json]
geoparquet-lite validate data.parquet [--metadata-only] [--max-rows N] [--strict] [--json]
geoparquet-lite to-geojson data.parquet [-o out.geojson] [--bbox xmin,ymin,xmax,ymax] [--columns a,b] [--seq]
geoparquet-lite from-geojson in.geojson out.parquet [--encoding WKB|geoarrow|polygon|...]
[--crs EPSG:4326|unknown|crs.json] [--edges spherical] [--orientation]
[--geoparquet-version 1.0.0|1.1.0] [--no-bbox] [--sort] [--row-group-size N]
geoparquet-lite add-bbox in.parquet out.parquet [--name bbox] [--sort]
geoparquet-lite convert in.parquet out.parquet --encoding geoarrow
validate exits with status 1 when the file has errors, or with --strict when it has
warnings. Any other failure exits with status 2. from-geojson also reads newline-delimited
GeoJSON and RFC 8142 text sequences, and reads stdin when the input is -.
Spec coverage
| GeoParquet feature | 1.0 | 1.1 | Notes |
|---|---|---|---|
version, primary_column, columns |
yes | yes | written as 1.1.0 by default; version="1.0.0" is available |
encoding: WKB |
yes | yes | ISO WKB, little-endian on write; EWKB is accepted on read and flagged by validate |
native encodings (point ... multipolygon) |
n/a | yes | separated layout, XY/XYZ/XYM/XYZM; single and multi variants merge into the multi encoding |
geometry_types |
yes | yes | computed on write; checked per row (WKB) or per column (native) |
crs (PROJJSON, absent = OGC:CRS84, null = unknown) |
yes | yes | checks required PROJJSON members per CRS type |
edges, orientation, epoch, bbox |
yes | yes | orientation="counterclockwise" rewinds rings on write and is checked by validate |
covering.bbox |
n/a | yes | struct of xmin/ymin/xmax/ymax doubles; used for row-group pruning and verified per row |
validate() also checks the following:
- the physical Arrow type of each geometry column matches its declared encoding (and interleaved layouts are reported);
- every geometry decodes;
- each geometry lies inside the column
bboxand inside its covering bbox; - the covering column has min/max statistics.
How the validator compares with the official JSON schemas. It gives the same verdict as
the official schema.json for v1.0.0 and v1.1.0 (with the PROJJSON v0.7 schema) on 106
metadata objects. Those objects come from files written by this package, geopandas 1.2,
GDAL 3.13 and DuckDB 2.0. It is stricter in two places:
- A native
encodingmust agree withgeometry_types. The specification text requires this, but a JSON schema cannot express it. - A
crsobject must be a CRS. The PROJJSON schema would also accept, for example, a bare ellipsoid.
The official schema files are not bundled.
Interoperability (tested)
- geopandas 1.2 / pyarrow 26.
geopandas.read_parquetreads the files we write, in both WKB and native encodings, including with abbox=filter and with the CRS kept. We read files fromGeoDataFrame.to_parquetin both WKB andgeometry_encoding="geoarrow", with or withoutwrite_covering_bbox, and they passvalidate(). - GDAL 3.13 Parquet driver.
ogrinforeads our WKB and native files: feature count, geometry type, extent, CRS and-spatfiltering all work. Files from GDAL'sogr2ogr -f Parquet, in WKB and inGEOMETRY_ENCODING=GEOARROW, read and validate here. - DuckDB 2.0 spatial. DuckDB reads our WKB files as
GEOMETRYwith the CRS, andST_Intersectsand thebboxcovering struct work in SQL. GeoParquet written by DuckDBCOPY ... TOreads and validates here. DuckDB 2.0 exposes columns with a native encoding as their rawSTRUCT/LISTtype rather than asGEOMETRY. Use WKB when DuckDB is the consumer.
Limitations
- Geometry work is plain Python, roughly 30–70k simple features per second for writing and validation. Reading and bbox filtering use pyarrow compute and are fast. This package is not a replacement for GDAL in bulk ETL.
predicate="bbox"(the default) keeps rows whose geometry bounding box intersects the query. For exact geometric intersection, passpredicate="intersects", which requires shapely.- Bounding boxes are computed on the raw coordinates. For
edges="spherical", the box of an edge that bends poleward of its vertices is not widened. - Covering columns are written in 2D only (no
zmin/zmax). - Parquet's native
GEOMETRY/GEOGRAPHYlogical types (GeoParquet 2.0 / Parquet 2.11) are not handled.
Development
pip install -e ".[dev,geopandas]"
pytest --cov=geoparquet_lite
ruff check . && ruff format --check src tests && mypy src
The GDAL interop tests run when ogrinfo is on PATH, or when GEOPARQUET_LITE_OGRINFO
points to it. The DuckDB tests run when duckdb is installed.
Data credits
The bundled PROJJSON definitions in geoparquet_lite/data/projjson.json were exported with
PROJ from the EPSG Geodetic Parameter Dataset (https://epsg.org), © IOGP, and from the OGC
CRS84 definition.
License
MIT © Yusuf Eminoğlu
Metadata
Release files for geoparquet-lite 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| geoparquet_lite-0.1.1.tar.gz | 61.3 kB | With provenance | Details for geoparquet_lite-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| geoparquet_lite-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for geoparquet_lite-0.1.1-py3-none-any.whl |
Total release size: 106.2 kB
Release files / geoparquet_lite-0.1.1.tar.gz
| Download URL | geoparquet_lite-0.1.1.tar.gz |
|---|---|
| Size | 61.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7803f8434c1ea600572c18a4b45d82903e1d343ecd0c62c987a7447eb376d276
|
|
BLAKE2b-256 checksum How to use checksums |
97cc1efbfcc433431e410fcddc231e533390dd7b8ea12cdaf82979663f4cc3cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / geoparquet_lite-0.1.1-py3-none-any.whl
| Download URL | geoparquet_lite-0.1.1-py3-none-any.whl |
|---|---|
| Size | 44.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b01c92710f3261acc5e8fa893a09cec29b2fff2aa4cb81855a7040ee12bd620d
|
|
BLAKE2b-256 checksum How to use checksums |
21965394ee25e70b643cda6e6b69523bfa387642d1c43b0d89e86f40478f3ec6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logSecurity for geoparquet-lite 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for geoparquet_lite-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.