High-performance geospatial analysis library for Python, powered by Rust
Project description
surtgis
High-performance geospatial analysis library for Python, powered by Rust.
SurtGIS provides 30+ terrain, hydrology, and imagery algorithms with native performance through PyO3 bindings.
Installation
pip install surtgis
Quick Start
import numpy as np
import surtgis
# Create a sample DEM (100x100 grid)
dem = np.random.rand(100, 100) * 100 # Elevation in meters
cell_size = 30.0 # 30m resolution
# Compute terrain derivatives
slope = surtgis.slope(dem, cell_size)
aspect = surtgis.aspect(dem, cell_size)
hillshade = surtgis.hillshade(dem, cell_size, azimuth=315.0, altitude=45.0)
# Curvature analysis
profile_curv = surtgis.curvature(dem, cell_size, curvature_type="profile")
plan_curv = surtgis.curvature(dem, cell_size, curvature_type="plan")
# Hydrology
twi = surtgis.twi(dem, cell_size) # Topographic Wetness Index
tpi = surtgis.tpi(dem, cell_size, radius=3) # Topographic Position Index
tri = surtgis.tri(dem, cell_size) # Terrain Ruggedness Index
print(f"Slope range: {slope.min():.1f}° - {slope.max():.1f}°")
print(f"TWI range: {twi.min():.2f} - {twi.max():.2f}")
Available Functions
Terrain Analysis
| Function | Description |
|---|---|
slope(dem, cell_size) |
Slope in degrees |
aspect(dem, cell_size) |
Aspect in degrees (0-360) |
hillshade(dem, cell_size, azimuth, altitude) |
Analytical hillshade |
curvature(dem, cell_size, curvature_type) |
Profile, plan, or general curvature |
tpi(dem, cell_size, radius) |
Topographic Position Index |
tri(dem, cell_size) |
Terrain Ruggedness Index |
twi(dem, cell_size) |
Topographic Wetness Index |
geomorphons(dem, cell_size, flatness, radius) |
Landform classification |
northness(dem, cell_size) |
Cosine of aspect |
eastness(dem, cell_size) |
Sine of aspect |
dev(dem, cell_size, radius) |
Deviation from Mean Elevation |
multidirectional_hillshade(dem, cell_size) |
Multi-azimuth hillshade |
Imagery
| Function | Description |
|---|---|
ndvi(nir, red) |
Normalized Difference Vegetation Index |
ndwi(green, nir) |
Normalized Difference Water Index |
savi(nir, red, l_factor) |
Soil-Adjusted Vegetation Index |
Performance
SurtGIS is 5-10x faster than pure Python implementations thanks to Rust's zero-cost abstractions and automatic parallelization via Rayon.
License
MIT OR Apache-2.0
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 surtgis-0.1.0.tar.gz.
File metadata
- Download URL: surtgis-0.1.0.tar.gz
- Upload date:
- Size: 297.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5836063296acc09832d0fc0302f8252a5b0318837c1415f3836ec9e42edcb294
|
|
| MD5 |
59b72f572290b1023013fb50d475abed
|
|
| BLAKE2b-256 |
4cd994136326ea261ed327cfa3ba37b2fe6d09714649e96f699428daf43797de
|
File details
Details for the file surtgis-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: surtgis-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 398.6 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e4392de9422f676f1e878dcdb54f575032eabb6c712565f0fe8cfccf7234ee0
|
|
| MD5 |
6b6575199bd1d3317a0d3fc4ad80f9e6
|
|
| BLAKE2b-256 |
fbac0cbe3d9c20ecbcfc48eb391d04bedbd5ee6ea94c6088851938aedd238507
|