MAS Geospatial Tools is a native Python QGIS plugin providing 177 advanced hydrological and geomorphometric analysis tools.
All packages are typically included with QGIS:
numpy >= 1.19scipy >= 1.5gdal >= 3.0C:\Users\<username>\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/~/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Clone repository git clone https://github.com/Mirjan-Ali-Sha/mas_geospatial_tools.git
Navigate to QGIS plugins directory cd ~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/
Create symbolic link ln -s /path/to/mas_geospatial_tools mas_geospatial_tools
Restart QGIS
Open Processing Toolbox
Navigate to: MAS Geospatial Tools → Geomorphometric Analysis → Slope
Select input DEM
Choose units (degrees/percent)
Run
from qgis import processing
processing.run("mas_geospatial:slope", {
'INPUT': '/path/to/dem.tif',
'UNITS': 0, # 0=degrees, 1=percent
'Z_FACTOR': 1.0,
'OUTPUT': '/path/to/slope.tif'
})
processing.run("mas_geospatial:watershed_delineation", { 'INPUT_DEM': '/path/to/dem.tif', 'INPUT_POUR_POINTS': '/path/to/points.gpkg', 'FILL_DEPRESSIONS': True, 'OUTPUT_WATERSHEDS': '/path/to/watersheds.tif', 'OUTPUT_FLOW_DIR': '/path/to/flow_dir.tif' })
filled = processing.run("mas_geospatial:fill_depressions", { 'INPUT': dem_path, 'OUTPUT': 'memory:' })['OUTPUT']
flow_acc = processing.run("mas_geospatial:d8_flow_accumulation", { 'INPUT_DEM': filled, 'FILL_DEPRESSIONS': False, 'OUTPUT_FLOW_ACC': 'memory:' })['OUTPUT_FLOW_ACC']
streams = processing.run("mas_geospatial:extract_streams", { 'INPUT_FLOW_ACC': flow_acc, 'THRESHOLD': 1000, 'OUTPUT': '/path/to/streams.tif' })
| Group | Our Implemented Tool | Function Count | Mapped Functions |
|---|---|---|---|
| Geomorphometric Analysis | HillshadeAlgorithm | 4 | Hillshade, MultidirectionalHillshade, ShadowImage, HypsometricallyTintedHillshade |
| Geomorphometric Analysis | SlopeAlgorithm | 2 | Slope, StandardDeviationOfSlope |
| Geomorphometric Analysis | AspectAlgorithm | 3 | Aspect, CircularVarianceOfAspect, RelativeAspect |
| Geomorphometric Analysis | CurvatureAlgorithm | 19 | PlanCurvature, ProfileCurvature, TangentialCurvature, MeanCurvature, GaussianCurvature, TotalCurvature, MaximalCurvature, MinimalCurvature, HorizontalExcessCurvature, VerticalExcessCurvature, DifferenceCurvature, AccumulationCurvature, Curvedness, Unsphericity, Rotor, ShapeIndex, RingCurvature, MultiscaleCurvatures, Profile |
| Geomorphometric Analysis | RoughnessAlgorithm | 5 | RuggednessIndex, MultiscaleRoughness, EdgeDensity, SurfaceAreaRatio, MultiscaleRoughnessSignature |
| Geomorphometric Analysis | TPIAlgorithm | 3 | RelativeTopographicPosition, MultiscaleTopographicPositionImage, TopographicPositionAnimation |
| Geomorphometric Analysis | FeatureDetectionAlgorithm | 6 | FindRidges, BreaklineMapping, EmbankmentMapping, MapOffTerrainObjects, RemoveOffTerrainObjects, Geomorphons |
| Geomorphometric Analysis | HypsometricAnalysisAlgorithm | 2 | HypsometricAnalysis, LocalHypsometricAnalysis |
| Geomorphometric Analysis | VisibilityAlgorithm | 6 | Viewshed, VisibilityIndex, HorizonAngle, TimeInDaylight, ShadowAnimation, TopoRender |
| Geomorphometric Analysis | DirectionalAnalysisAlgorithm | 6 | DirectionalRelief, ExposureTowardsWindFlux, FetchAnalysis, AverageNormalVectorAngularDeviation, MaxAnisotropyDev, MaxAnisotropyDevSignature |
| Geomorphometric Analysis | OpennessAlgorithm | 3 | Openness, SphericalStdDevOfNormals, MultiscaleStdDevNormalsSignature |
| Geomorphometric Analysis | MultiscaleAnalysisAlgorithm | 3 | MultiscaleElevationPercentile, MultiscaleStdDevNormals, GaussianScaleSpace |
| Geomorphometric Analysis | StatisticalAlgorithms | 13 | LocalQuadraticRegression, FeaturePreservingSmoothing, SmoothVegetationResidual, DevFromMeanElev, DiffFromMeanElev, MaxDifferenceFromMean, MaxElevationDeviation, PercentElevRange, ElevRelativeToMinMax, ElevRelativeToWatershedMinMax, PennockLandformClass, GeneratingFunction, MaxElevDevSignature |
| Geomorphometric Analysis | WetnessAlgorithm | 1 | WetnessIndex |
| Hydrological Analysis | D8FlowDirectionAlgorithm | 1 | D8Pointer |
| Hydrological Analysis | D8FlowAccumulationAlgorithm | 3 | D8FlowAccumulation, D8MassFlux, FlowAccumulationFullWorkflow |
| Hydrological Analysis | WatershedDelineationAlgorithm | 5 | Watershed, Basins, Subbasins, Isobasins, StochasticDepressionAnalysis |
| Hydrological Analysis | DepressionHandlingAlgorithm | 10 | FillDepressions, BreachDepressions, BreachDepressionsLeastCost, FillSingleCellPits, BreachSingleCellPits, FillBurn, FillDepressionsPlanchonAndDarboux, FillDepressionsWangAndLiu, DemVoidFilling, FillMissingData |
| Geomorphometric Analysis | FlowIndicesAlgorithm | 2 | StreamPowerIndex, SedimentTransportIndex |
| Hydrological Analysis | FlowRoutingAlgorithm | 11 | DInfPointer, DInfFlowAccumulation, DInfMassFlux, MDInfFlowAccumulation, FD8Pointer, FD8FlowAccumulation, Rho8Pointer, Rho8FlowAccumulation, QinFlowAccumulation, QuinnFlowAccumulation, PilesjoHasan |
| Hydrological Analysis | FlowDistanceAlgorithm | 4 | DownslopeDistanceToStream, ElevationAboveStream, ElevationAboveStreamEuclidean, DownslopeIndex |
| Hydrological Analysis | BasinAnalysisAlgorithm | 2 | UnnestBasins, StrahlerOrderBasins |
| Hydrological Analysis | FlowPathStatisticsAlgorithm | 12 | AverageFlowpathSlope, AverageUpslopeFlowpathLength, MaxUpslopeFlowpathLength, FlowLengthDiff, TraceDownslopeFlowpaths, NumInflowingNeighbours, NumDownslopeNeighbours, NumUpslopeNeighbours, LongestFlowpath, MaxDownslopeElevChange, MinDownslopeElevChange, MaxUpslopeElevChange |
| Hydrological Analysis | SinkAnalysisAlgorithm | 4 | Sink, DepthInSink, UpslopeDepressionStorage, ImpoundmentSizeIndex |
| Hydrological Analysis | HydroEnforcementAlgorithm | 4 | BurnStreamsAtRoads, RaiseWalls, FlattenLakes, InsertDams |
| Hydrological Analysis | SnapPourPointsAlgorithm | 2 | SnapPourPoints, JensonSnapPourPoints |
| Hydrological Analysis | FlowLengthAlgorithm | 2 | DownslopeFlowpathLength, MaxUpslopeValue |
| Hydrological Analysis | DemQualityAlgorithm | 3 | FindNoFlowCells, EdgeContamination, FindParallelFlow |
| Hydrological Analysis | HillslopesAlgorithm | 1 | Hillslopes |
| Hydrological Analysis | FloodOrderAlgorithm | 1 | FloodOrder |
| Hydrological Analysis | HydrologicConnectivityAlgorithm | 3 | HydrologicConnectivity, DepthToWater, LowPointsOnHeadwaterDivides |
| Stream Network Analysis | ExtractStreamsAlgorithm | 3 | ExtractStreams, RasterizeStreams, RiverCenterlines |
| Stream Network Analysis | StreamOrderingAlgorithm | 5 | StrahlerStreamOrder, ShreveStreamMagnitude, HortonStreamOrder, HackStreamOrder, TopologicalStreamOrder |
| Stream Network Analysis | StreamLinkAlgorithm | 5 | StreamLinkIdentifier, StreamLinkLength, StreamLinkSlope, StreamLinkClass, StreamSlopeContinuous |
| Stream Network Analysis | StreamNetworkAnalysisAlgorithm | 6 | DistanceToOutlet, FarthestChannelHead, FindMainStem, TributaryIdentifier, LengthOfUpstreamChannels, MaxBranchLength |
| Stream Network Analysis | VectorStreamNetworkAlgorithm | 3 | RasterStreamsToVector, VectorStreamNetworkAnalysis, RepairStreamVectorTopology |
| Stream Network Analysis | StreamCleaningAlgorithm | 1 | RemoveShortStreams |
| Stream Network Analysis | ValleyExtractionAlgorithm | 1 | ExtractValleys |
| Stream Network Analysis | LongProfileAlgorithm | 2 | LongProfile, LongProfileFromPoints |
| Geomorphometric Analysis | ContourAlgorithm | 2 | ContoursFromPoints, ContoursFromRaster |
| Geomorphometric Analysis | PlottingAlgorithm | 2 | SlopeVsAspectPlot, SlopeVsElevationPlot |
| Geomorphometric Analysis | AssessRouteAlgorithm | 1 | AssessRoute |
from qgis.utils import plugins print('mas_geospatial_tools' in plugins)
import qgis qgis.utils.iface.messageBar().pushMessage("Test", "Plugin check")
import numpy
import scipy
import gdal
print(f"NumPy: {numpy.version}")
print(f"SciPy: {scipy.version}")
print(f"GDAL: {gdal.version}")
GPL v2.0 - See LICENSE file