Skip to main content

A package to extract geospatial extent from files and directories

Project description

geoextent

Python package PyPI version Binder Project Status: Active – The project has reached a stable, usable state and is being actively developed. DOI SWH

Python library for extracting geospatial and temporal extents from files and directories.

Key Capabilities:

  • Extract spatial extents (bounding boxes, convex hulls) and temporal extents
  • Support for 9+ file formats (GeoJSON, CSV, Shapefile, GeoTIFF, GeoPackage, GPX, GML, KML, FlatGeobuf) plus world files
  • Direct integration with 11 research repositories (Zenodo, PANGAEA, OSF, Figshare, Dryad, GFZ, Dataverse, Pensoft, TU Dresden Opara, Senckenberg, BGR)
  • Process single files, directories, or multiple repositories in one call
  • Command-line interface and Python API
  • Export as GeoJSON, WKT, or WKB

📖 Full Documentation | 📦 PyPI | 🚀 Quick Start | 📓 EarthCube 2021 Article

Installation

pip install geoextent

Requirements: Python 3.10+ and GDAL 3.11.x

See the installation guide for system dependencies and Docker setup.

Quick Start

Command Line

# Extract from a file
geoextent -b -t tests/testdata/geojson/muenster_ring_zeit.geojson

# Extract from research repository
python -m geoextent -b -t https://doi.org/10.5281/zenodo.4593540

# Extract from multiple repositories (returns merged geometry)
python -m geoextent -b 10.5281/zenodo.123 10.25532/OPARA-456

See the CLI guide for all options.

Python API

import geoextent.lib.extent as geoextent

# From file
result = geoextent.fromFile('data.geojson', bbox=True, tbox=True)

# From directory
result = geoextent.fromDirectory('data/', bbox=True, tbox=True)

# From repository (single or multiple)
result = geoextent.fromRemote('10.5281/zenodo.4593540', bbox=True)

identifiers = ['10.5281/zenodo.4593540', '10.25532/OPARA-581']
result = geoextent.fromRemote(identifiers, bbox=True)
print(result['bbox'])  # Merged bounding box covering all resources

See the API documentation and examples.

What Can I Do With geoextent?

  • Extract Spatial Extents - Get bounding boxes or convex hulls from geospatial files
  • Process Research Data - Extract extents from Zenodo, Figshare, Dryad, PANGAEA, OSF, BGR, and more
  • Batch Processing - Process directories or multiple repositories in one call
  • Add Location Context - Automatic placename lookup for your data
  • Flexible Output - Export as GeoJSON, WKT, or WKB for use in other tools
  • Interactive Visualization - Open extracted extents in geojson.io with one command

Documentation

Development

This project was developed as part of the DFG-funded research project Opening Reproducible Research (o2r, https://o2r.info).

# Install dev and test dependencies
pip install -e .[dev,test,docs]

# Run tests (parallel execution enabled by default with -n auto)
pytest

# Run tests with specific number of workers
pytest -n 4

# Disable parallel execution for debugging
pytest -n 0

# Format code
black geoextent/ tests/
pre-commit install

See the development guide for detailed instructions.

Contributing

Contributions are welcome! Please use the issue tracker to report bugs or suggest features, and submit pull requests for code or documentation improvements.

Citation

If you use geoextent in your research, please cite:

Nüst, Daniel; Garzón, Sebastian and Qamaz, Yousef. (2021, May 11). o2r-project/geoextent (Version v0.7.1). Zenodo. https://doi.org/10.5281/zenodo.3925693

License

This software is published under the MIT license. See the LICENSE file for details.

This documentation is published under a Creative Commons CC0 1.0 Universal License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geoextent-0.12.0.tar.gz (16.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geoextent-0.12.0-py3-none-any.whl (116.9 kB view details)

Uploaded Python 3

File details

Details for the file geoextent-0.12.0.tar.gz.

File metadata

  • Download URL: geoextent-0.12.0.tar.gz
  • Upload date:
  • Size: 16.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for geoextent-0.12.0.tar.gz
Algorithm Hash digest
SHA256 96040ed77454ceea76a71cae86d566630aa4b5b931a6bc5b052d69680f125b82
MD5 e8e20de7e16bfccf5574f160d3d57d84
BLAKE2b-256 5a2092fb7f46c2cc68cafb8a349973218e29dc9c5c2775cecf0684a85b240d28

See more details on using hashes here.

File details

Details for the file geoextent-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: geoextent-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 116.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for geoextent-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b542cfbba09bae21bba1861fc85ad64181a215c5e1c2aafa3524309d629fd52
MD5 6846e95ea4d7866e003493a58e08a9c6
BLAKE2b-256 508b5c1ca0bfc0cd8dd7d722e4399411c4bc4af876fce0b007663ad5af65d2f8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page