A package to extract geospatial extent from files and directories
Project description
geoextent
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
- Quick Start Guide - Get started in minutes
- Installation Guide - System dependencies, Docker setup
- Examples - Common usage patterns with code
- CLI Reference - Command-line options
- Python API - Function signatures and parameters
- Core Features - Essential features for everyday use
- Advanced Features - Specialized options
- Content Providers - Repository integration details
- Supported Formats - File format details
- Development Guide - Contributing and testing
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96040ed77454ceea76a71cae86d566630aa4b5b931a6bc5b052d69680f125b82
|
|
| MD5 |
e8e20de7e16bfccf5574f160d3d57d84
|
|
| BLAKE2b-256 |
5a2092fb7f46c2cc68cafb8a349973218e29dc9c5c2775cecf0684a85b240d28
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b542cfbba09bae21bba1861fc85ad64181a215c5e1c2aafa3524309d629fd52
|
|
| MD5 |
6846e95ea4d7866e003493a58e08a9c6
|
|
| BLAKE2b-256 |
508b5c1ca0bfc0cd8dd7d722e4399411c4bc4af876fce0b007663ad5af65d2f8
|