NickySpatial
An open-source object-based image analysis library for remote sensing.
| Category | Badge |
|---|---|
| Build | |
| Code Quality | |
| Documentation | |
| Package Info | |
| Community |
Find Demo Frontend Here : https://nickyspatial-gpoqz.ondigitalocean.app/
Description
NickySpatial is a Python package that provides object-based image analysis (OBIA) functionality similar to commercial software like eCognition. It allows users to segment geospatial imagery into meaningful objects, calculate statistics, and apply rule-based classification.
Project Structure
nickyspatial/
├── __init__.py
├── io/
│ ├── __init__.py
│ ├── raster.py # Raster I/O
│ └── vector.py # Vector I/O
├── core/
│ ├── __init__.py
│ ├── layer.py # Layer class and management
│ ├── segmentation.py # Segmentation algorithms
│ └── rules.py # Rule engine
| └── classifier.py # Classification algorithms
├── stats/
│ ├── __init__.py
│ ├── basic.py # Basic statistics (min, max, mean, etc.)
│ ├── spatial.py # Spatial statistics (area, perimeter, etc.)
│ └── spectral.py # Spectral indices (NDVI, etc.)
├── filters/
│ ├── __init__.py
│ ├── spatial.py # Spatial filters (smoothing, merging)
│ └── spectral.py # Spectral filters (band math)
├── viz/
│ ├── __init__.py
│ ├── maps.py # Map visualization
│ └── charts.py # Statistical charts
└── utils/
├── __init__.py
└── helpers.py # Helper functions
Installation
pip install nickyspatial
Quick Start
import nickyspatial as ns
# Load a raster image
layer = ns.read_raster("path/to/your/satellite_image.tif")
# Perform segmentation
segments = ns.SlicSegmentation(scale=20, compactness=0.5)
segmented_layer = segments.execute(layer.raster, layer.transform, layer.crs)
# Calculate statistics
ns.attach_basic_stats(segmented_layer, "mean_intensity")
ns.attach_area_stats(segmented_layer)
ns.attach_spectral_indices(segmented_layer, indices=["ndvi"])
# Apply rules for classification
ruleset = ns.RuleSet(name="Land_Cover")
ruleset.add_rule(name="vegetation", condition="ndvi > 0.3 & area_units > 100")
classified_layer = ruleset.execute(segmented_layer, result_field="classification")
# Visualize results
ns.plot_layer_interactive(classified_layer, "classification")
Documentation
For detailed documentation and examples, see the documentation website. Deepwiki also provides documentation quite detailed , Do check it out if you like
Examples
Check out our comprehensive examples:
- Basic Usage: Complete workflow from loading data to visualization
- Supervised Classification: Machine learning-based classification with traditional algorithms
- CNN Classification: Deep learning approach using TensorFlow/Keras
- Interactive Demo: Web-based interface for exploring features
Key Features Demonstrated:
- Image Segmentation: SLIC algorithm for object-based analysis
- Statistical Analysis: Calculate spatial, spectral, and basic statistics
- Classification: Both traditional ML and deep learning approaches
- Rule Engine: Apply custom rules for object classification
- Visualization: Interactive maps and statistical charts
- I/O Operations: Read/write raster and vector formats
Contributing
Contributions are welcome! Follow dev setup guide & Please feel free to submit a Pull Request.
Acknowledgments
- Inspired by the functionality of eCognition and other OBIA methodologies
- Built on top of powerful open-source libraries like numpy, rasterio, scikit-image, and GeoPandas
- Nicky : Nicky is my belated dog and I named this package in his memory!
Contributors
Metadata
Release files for nickyspatial 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nickyspatial-1.1.1.tar.gz | 2.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nickyspatial-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.5 MB
Release files / nickyspatial-1.1.1.tar.gz
| Download URL | nickyspatial-1.1.1.tar.gz |
|---|---|
| Size | 2.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5283d4d55cb0a27c1d25d977ef7a3dbfe01ff15a094ae589359c2e433af527c1
|
|
BLAKE2b-256 checksum How to use checksums |
e60215c7393fce47e3c2bb892fa44d56c0dbf49cd2a9be3983140527a62d6e83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|
Release files / nickyspatial-1.1.1-py3-none-any.whl
| Download URL | nickyspatial-1.1.1-py3-none-any.whl |
|---|---|
| Size | 44.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f15c076f2a6d1017b23b85b52fb1b375349bee78d1bbe3c45b6da2f91727c49
|
|
BLAKE2b-256 checksum How to use checksums |
9377b392e1d46e76309dd5787965f2108dd41188aba45ae5fae2a66e8e360f89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|