Metadata-Version: 2.5
Name: geoparquet-io
Version: 1.8.0
Summary: Fast I/O and transformation tools for GeoParquet files
Project-URL: Homepage, https://github.com/geoparquet/geoparquet-io
Project-URL: Bug Tracker, https://github.com/geoparquet/geoparquet-io/issues
Project-URL: Documentation, https://geoparquet.io/
Project-URL: Source, https://github.com/geoparquet/geoparquet-io
Author-email: Chris Holmes <cholmes@9eo.org>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: geoparquet,geospatial,gis,io,parquet
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Python: >=3.11
Requires-Dist: aiohttp>=3.13.4
Requires-Dist: botocore>=1.34.0
Requires-Dist: click-plugins>=1.1.1
Requires-Dist: click>=8.0.0
Requires-Dist: duckdb<1.6,>=1.5.6
Requires-Dist: fsspec>=2023.9.0
Requires-Dist: geoarrow-pyarrow>=0.1.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: idna>=3.15
Requires-Dist: jsonschema>=4.0.0
Requires-Dist: lxml>=6.1.0
Requires-Dist: mercantile>=1.2.0
Requires-Dist: msgpack>=1.2.1
Requires-Dist: multidict>=6.9.1
Requires-Dist: obstore>=0.8.2
Requires-Dist: owslib>=0.29.0
Requires-Dist: pandas>=1.0.0
Requires-Dist: pmtiles>=3.0.0
Requires-Dist: psutil>=5.9.0
Requires-Dist: pyarrow>=23.0.1
Requires-Dist: pyproj>=3.0.0
Requires-Dist: pystac>=1.9.0
Requires-Dist: requests>=2.33.0
Requires-Dist: rich>=13.0.0
Requires-Dist: s3fs>=2023.9.0
Requires-Dist: urllib3>=2.7.0
Provides-Extra: benchmark
Requires-Dist: fiona>=1.9.0; extra == 'benchmark'
Requires-Dist: geopandas>=0.14.0; extra == 'benchmark'
Requires-Dist: pyogrio>=0.7.0; extra == 'benchmark'
Provides-Extra: dev
Requires-Dist: bandit>=1.7; extra == 'dev'
Requires-Dist: codespell>=2.2; extra == 'dev'
Requires-Dist: commitizen>=4.0; extra == 'dev'
Requires-Dist: deptry>=0.25.0; extra == 'dev'
Requires-Dist: diff-cover>=9.0; extra == 'dev'
Requires-Dist: import-linter>=2.0; extra == 'dev'
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: nbmake>=1.5.0; extra == 'dev'
Requires-Dist: pip-audit>=2.7; extra == 'dev'
Requires-Dist: pip>=26.2; extra == 'dev'
Requires-Dist: pre-commit>=4.3.0; extra == 'dev'
Requires-Dist: pylint==4.1.4; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest-forked>=1.6; extra == 'dev'
Requires-Dist: pytest-rerunfailures>=14; extra == 'dev'
Requires-Dist: pytest-timeout>=2.3; extra == 'dev'
Requires-Dist: pytest-xdist>=3.5.0; extra == 'dev'
Requires-Dist: pytest>=9.0.3; extra == 'dev'
Requires-Dist: pyyaml>=6.0; extra == 'dev'
Requires-Dist: radon>=6.0.1; extra == 'dev'
Requires-Dist: ruff>=0.8.0; extra == 'dev'
Requires-Dist: vulture>=2.14; extra == 'dev'
Requires-Dist: xenon>=0.9.3; extra == 'dev'
Provides-Extra: docs
Requires-Dist: pymdown-extensions>=10.21.3; extra == 'docs'
Requires-Dist: zensical>=0.0.69; (python_version >= '3.11') and extra == 'docs'
Provides-Extra: profile
Requires-Dist: memray>=1.19; (sys_platform != 'win32') and extra == 'profile'
Requires-Dist: py-spy>=0.4; extra == 'profile'
Requires-Dist: pyinstrument>=5.0; extra == 'profile'
Provides-Extra: raster
Requires-Dist: contourrs>=0.8.0; (python_version >= '3.12') and extra == 'raster'
Requires-Dist: rasterio>=1.3; extra == 'raster'
Provides-Extra: simplify
Requires-Dist: coarsen>=0.2.0; extra == 'simplify'
Description-Content-Type: text/markdown

<p align="center">
  <img class="gpio-logo" src="https://raw.githubusercontent.com/geoparquet/geoparquet-io/main/docs/assets/logo.png" alt="geoparquet-io logo: a globe robot carrying a stack of Parquet row groups" width="320">
</p>

# geoparquet-io

[![PyPI version](https://badge.fury.io/py/geoparquet-io.svg)](https://badge.fury.io/py/geoparquet-io)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/geoparquet-io.svg)](https://anaconda.org/conda-forge/geoparquet-io)
[![Tests](https://github.com/geoparquet/geoparquet-io/actions/workflows/tests.yml/badge.svg?event=push)](https://github.com/geoparquet/geoparquet-io/actions/workflows/tests.yml)
[![codecov](https://codecov.io/gh/geoparquet/geoparquet-io/branch/main/graph/badge.svg)](https://codecov.io/gh/geoparquet/geoparquet-io)
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/geoparquet/geoparquet-io/blob/main/LICENSE)

Fast I/O and transformation tools for [GeoParquet](https://geoparquet.org/) files, powered by [DuckDB](https://duckdb.org/) and [PyArrow](https://arrow.apache.org/docs/python/).

- **One interface** for conversion, sorting, partitioning, and spatial indexing.
- CLI and Python API with **full type hints**.
- **Unix pipes** with Arrow IPC streaming—no intermediate files.
- Read/write to **S3, GCS, Azure, HTTPS** via DuckDB and [obstore](https://github.com/developmentseed/obstore).
- Automatic **Hilbert sorting**, **ZSTD compression**, **bbox columns**.
- Add **H3, S2, A5, quadkey, KD-tree** spatial indices.
- **Aggregate** huge datasets into A5/H3 grid cells or admin regions for low-zoom visualization.
- **GeoParquet 1.1 and 2.0** support, including Parquet geometry types.

## Installation

```sh
uv tool install geoparquet-io   # CLI (recommended)
uv add geoparquet-io            # Python library
```

Or with pip:

```sh
pip install geoparquet-io
```

Or with conda (also works with mamba or pixi):

```sh
conda install -c conda-forge geoparquet-io
```

> **Note:** the conda-forge feedstock doesn't yet carry gpio's DuckDB pin (`<1.6`, see
> [#1346](https://github.com/geoparquet/geoparquet-io/issues/1346)), so a plain install pulls
> DuckDB 2.0 and breaks `add s2`/`partition s2`/a5. Pin it: `conda install -c conda-forge geoparquet-io 'python-duckdb<1.6'`

## Quickstart

```sh
# Convert any vector format to optimized GeoParquet (ZSTD, bbox, Hilbert order)
gpio convert places.geojson places.parquet
# Converting places.geojson...
# Done in 0.5s
# Output: places.parquet (63.45 KB)
# ✓ Output passes GeoParquet validation (metadata checks)

# Inspect the file
gpio inspect summary places.parquet
# 📄 places.parquet (63.45 KB)
# Rows: 766 | Row Groups: 1 | Compression: ZSTD
# GeoParquet Version: 1.1.0 | CRS: OGC:CRS84 (default)
# Geometry Types: Point
# Bbox: [-0.989102, 9.798559, 1.480825, 12.391399]

# Re-sort and upgrade to GeoParquet 2.0, with native per-row-group bbox stats
gpio sort hilbert places.parquet sorted.parquet --geoparquet-version 2.0

# Check it against best practices
gpio check all sorted.parquet
# ✓ Version 2.0.0
# ✓ Uses native Parquet GEOMETRY/GEOGRAPHY types
# ✓ Bbox covering column 'bbox' declared (optional in 2.0; enables page-level pruning)
# ✓ Row group statistics available for spatial filtering
# ✓ ZSTD compression on geometry column 'geom'
# ✓ Data appears to be spatially ordered
# Spec Validation: ✓ 40 checks passed
```

The same flow in Python, in-memory and without intermediate files:

```python
import geoparquet_io as gpio

table = gpio.convert('places.geojson').add_bbox().sort_hilbert()
table.write('sorted.parquet', geoparquet_version='2.0')
result = gpio.check_all('sorted.parquet')
result.passed()  # True
```

## Documentation

[Full documentation](https://geoparquet.io) is available on the website.

Head to [Getting Started](https://geoparquet.io/getting-started/quickstart/) to dig in.

## Development

```sh
git clone https://github.com/geoparquet/geoparquet-io.git
cd geoparquet-io
uv sync --all-extras
uv run pytest
```

See [Contributing Guide](https://geoparquet.io/contributing/) for details.

## License

[Apache 2.0](LICENSE)
