Modern GIS toolkit for Python - Simplifying geospatial workflows with built-in data sources, intelligent caching, and fluent APIs
PyMapGIS is designed as a modern, modular geospatial toolkit that prioritizes developer experience, performance, and extensibility. This document provides a high-level overview of the system architecture, design principles, and key components.
PyMapGIS Core
├── Universal IO Layer (pmg.read())
├── Data Processing Layer (vector, raster, ml)
├── Visualization Layer (viz, leafmap integration)
├── Service Layer (CLI, web services)
├── Infrastructure Layer (cache, settings, auth)
└── Extension Layer (plugins, integrations)
pymapgis/
├── __init__.py # Main API surface
├── io/ # Universal data reading
├── vector/ # Vector operations (GeoPandas)
├── raster/ # Raster operations (xarray)
├── viz/ # Visualization and mapping
├── serve/ # Web services (FastAPI)
├── cli/ # Command-line interface
├── cache/ # Caching system
├── settings/ # Configuration management
├── auth/ # Authentication & security
├── cloud/ # Cloud integrations
├── streaming/ # Real-time data processing
├── ml/ # Machine learning integration
├── network/ # Network analysis
├── pointcloud/ # Point cloud processing
├── plugins/ # Plugin system
├── deployment/ # Deployment utilities
├── performance/ # Performance optimization
└── testing/ # Testing utilities
pymapgis.io
)Purpose: Unified interface for reading geospatial data from any source
Key Features:
Architecture:
DataSourceRegistry
- Manages available data sourcesDataSourcePlugin
- Base class for custom sourcesCacheManager
- Handles intelligent cachingread()
function - Main entry pointpymapgis.vector
)Purpose: Spatial vector operations built on GeoPandas/Shapely
Key Features:
.pmg
)Architecture:
pymapgis.vector
namespace.pmg
on GeoDataFramespymapgis.raster
)Purpose: Raster data processing built on xarray/rioxarray
Key Features:
.pmg
)Architecture:
pymapgis.raster
namespace.pmg
on DataArrayspymapgis.viz
)Purpose: Interactive mapping and visualization
Key Features:
.map()
and .explore()
methodsArchitecture:
pymapgis.serve
)Purpose: Expose geospatial data as web services
Key Features:
Architecture:
serve()
function as main entry pointUser Request → pmg.read(url) → DataSourceRegistry →
Plugin Selection → Cache Check → Data Retrieval →
Format Processing → Return GeoDataFrame/DataArray
Input Data → Operation Function →
Validation → Processing →
Result Caching → Return Processed Data
Geospatial Data → .map()/.explore() →
Style Configuration → Leafmap Integration →
Interactive Map Rendering
DataSourcePlugin
interfaceDataSourceRegistry
Next: Package Structure for detailed module breakdown