GeoProcessor is a comprehensive Python library for geospatial data processing, analysis, and visualization. It provides a unified interface for working with raster datasets using industry-standard libraries like Rasterio, GDAL, xarray, NumPy, and Pandas, with cloud integration via AWS.
- Raster Processing: Read, write, reproject, clip, and transform raster data
- Multi-dimensional Analysis: Leverage xarray for labeled multi-dimensional analysis
- Cloud Integration: Seamless AWS S3 support for cloud-based workflows
- Visualization: Tools for map creation and data plotting
- PostGIS Integration: Connect to and query spatial databases
- Performance Optimized: Efficient processing of large geospatial datasets
- Well-documented API: Comprehensive documentation with examples
# Clone the repository
git clone https://github.com/yourusername/geoprocessor.git
cd geoprocessor
# Install dependencies
pip install -r requirements.txt
# For development
pip install -r requirements-dev.txtimport rasterio
import numpy as np
from geoprocessor.raster.processing import calculate_ndvi, to_xarray
# Calculate NDVI from red and near-infrared bands
ndvi = calculate_ndvi('red_band.tif', 'nir_band.tif', 'ndvi_result.tif')
# Convert a raster to an xarray Dataset for advanced analysis
ds = to_xarray('elevation.tif')
print(f"Mean elevation: {ds.data.mean().values}")
# Process data directly from AWS S3
from geoprocessor.aws.s3 import read_raster_from_s3
data, metadata = read_raster_from_s3('my-bucket', 'path/to/raster.tif')Comprehensive documentation is available in the docs/ directory:
- User Guide: Detailed instructions and concepts
- API Reference: Complete API documentation
- Examples: Example workflows and use cases
Interactive examples and tutorials are available as Jupyter notebooks in the notebooks/ directory:
- Tutorials: Step-by-step introduction to basic concepts
- Examples: Real-world usage examples
- Utilities: Helper notebooks for data inspection and benchmarking
All notebooks are compatible with Google Colab. You can access Rasterio sample datasets directly in Colab using:
# Install dependencies
!pip install rasterio xarray numpy matplotlib geopandas
# Download sample data
!wget https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif -O sample.tifGeoProcessor is designed for integration with hardware-based geospatial workflows:
- Field data collection systems
- Drone and satellite imagery processing pipelines
- Real-time monitoring systems
- Edge computing devices for onsite processing
- Python: Core language for all operations
- Rasterio / GDAL: Handling and processing raster datasets
- xarray / NumPy / Pandas: Data manipulation and analysis
- AWS: Cloud-based data storage and processing
- PostGIS: Spatial data management (optional)
The repository is organized as follows:
geoprocessor/ # Main package directory
├── core/ # Core functionality
├── raster/ # Raster-specific modules
├── vector/ # Vector-specific modules
├── aws/ # AWS integration
├── postgis/ # PostGIS integration
└── visualization/ # Visualization tools
notebooks/ # Jupyter notebooks
├── tutorials/ # Step-by-step tutorials
├── examples/ # Example applications
└── utilities/ # Utility notebooks
data/ # Sample data
tests/ # Test suite
docs/ # Documentation
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
- The Rasterio and GDAL development teams
- The xarray and NumPy communities
- Contributors to the geospatial Python ecosystem
