Skip to content
Permalink
Browse files

[feature][processing] Complete random raster algorithm collection #2

This refactors and completes the recently added work on random number raster layer creation algorithms (see #35835) and reworks the single algorithm implementation proposed in #36065 to a base-algorithm solution which avoids duplicate code.

With the new algorithms aimed towards distribution based random number creation, QGIS reaches to the same level of functionality as current ArcGIS random raster creation tools. In total, the PR adds the following algorithms (normal and uniform raster layer creation algs are refactored to be in line the new naming scheme):

Create random raster layer (binomial distribution)
Create random raster layer (exponential distribution)
Create random raster layer (gamma distribution)
Create random raster layer (negative binomial distribution)
Create random raster layer (normal distribution)
Create random raster layer (poisson distribution)
Create random raster layer (uniform distribution)
  • Loading branch information
root676 committed May 3, 2020
1 parent 5623229 commit 096b80e44462760728b7cb93d86132d312ebe2ed
@@ -113,9 +113,12 @@
<file>themes/default/algorithms/mAlgorithmNormalRaster.svg</file>
<file>themes/default/algorithms/mAlgorithmNetworkAnalysis.svg</file>
<file>themes/default/algorithms/mAlgorithmPolygonToLine.svg</file>
<file>themes/default/algorithms/mAlgorithmRandomExponentialRaster.svg</file>
<file>themes/default/algorithms/mAlgorithmRandomGammaRaster.svg</file>
<file>themes/default/algorithms/mAlgorithmRandomPointsOnLines.svg</file>
<file>themes/default/algorithms/mAlgorithmRandomPointsWithinPolygon.svg</file>
<file>themes/default/algorithms/mAlgorithmRandomPointsWithinExtent.svg</file>
<file>themes/default/algorithms/mAlgorithmRandomPoissonRaster.svg</file>
<file>themes/default/algorithms/mAlgorithmRandomRaster.svg</file>
<file>themes/default/algorithms/mAlgorithmRegularPoints.svg</file>
<file>themes/default/algorithms/mAlgorithmRoundRastervalues.svg</file>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 6.35 6.35"><path fill="#f30" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M.189.241h1.485v1.485H.189z"/><path fill="#4cba00" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M1.674.241h1.485v1.485H1.674z"/><path fill="#e500ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M3.159.241h1.485v1.485H3.159z"/><path fill="#4cba00" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M4.644.241h1.485v1.485H4.644z"/><path fill="#0308ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M.189 1.725h1.485V3.21H.189z"/><path fill="#da6200" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M1.674 1.725h1.485V3.21H1.674z"/><path fill="#f30" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M3.159 1.725h1.485V3.21H3.159z"/><path fill="#e500ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M4.644 1.725h1.485V3.21H4.644z"/><path fill="#4cba00" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M.189 3.21h1.485v1.485H.189z"/><path fill="#e500ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M1.674 3.21h1.485v1.485H1.674z"/><path fill="#0308ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M3.159 3.21h1.485v1.485H3.159z"/><path fill="#da6200" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M4.644 3.21h1.485v1.485H4.644zM.189 4.695h1.485V6.18H.189z"/><path fill="#f30" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M1.674 4.695h1.485V6.18H1.674z"/><path fill="#4cba00" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M3.159 4.695h1.485V6.18H3.159z"/><path fill="#0308ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M4.644 4.695h1.485V6.18H4.644z"/><path d="M.259.933c1.068 0-.642 4.426 5.797 4.426" fill="none" stroke="#fbfbfb" stroke-width=".563"/></svg>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 6.35 6.35"><path fill="#f30" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M.189.241h1.485v1.485H.189z"/><path fill="#4cba00" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M1.674.241h1.485v1.485H1.674z"/><path fill="#e500ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M3.159.241h1.485v1.485H3.159z"/><path fill="#4cba00" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M4.644.241h1.485v1.485H4.644z"/><path fill="#0308ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M.189 1.725h1.485V3.21H.189z"/><path fill="#da6200" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M1.674 1.725h1.485V3.21H1.674z"/><path fill="#f30" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M3.159 1.725h1.485V3.21H3.159z"/><path fill="#e500ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M4.644 1.725h1.485V3.21H4.644z"/><path fill="#4cba00" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M.189 3.21h1.485v1.485H.189z"/><path fill="#e500ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M1.674 3.21h1.485v1.485H1.674z"/><path fill="#0308ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M3.159 3.21h1.485v1.485H3.159z"/><path fill="#da6200" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M4.644 3.21h1.485v1.485H4.644zM.189 4.695h1.485V6.18H.189z"/><path fill="#f30" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M1.674 4.695h1.485V6.18H1.674z"/><path fill="#4cba00" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M3.159 4.695h1.485V6.18H3.159z"/><path fill="#0308ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M4.644 4.695h1.485V6.18H4.644z"/><path d="M.543 6.11c.004-1.055.587-2.62 1.374-2.62.938 0 1.372 2.337 4.134 2.337" fill="none" stroke="#fafafa" stroke-width=".563"/></svg>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 6.35 6.35"><path fill="#f30" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M.189.241h1.485v1.485H.189z"/><path fill="#4cba00" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M1.674.241h1.485v1.485H1.674z"/><path fill="#e500ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M3.159.241h1.485v1.485H3.159z"/><path fill="#4cba00" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M4.644.241h1.485v1.485H4.644z"/><path fill="#0308ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M.189 1.725h1.485V3.21H.189z"/><path fill="#da6200" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M1.674 1.725h1.485V3.21H1.674z"/><path fill="#f30" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M3.159 1.725h1.485V3.21H3.159z"/><path fill="#e500ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M4.644 1.725h1.485V3.21H4.644z"/><path fill="#4cba00" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M.189 3.21h1.485v1.485H.189z"/><path fill="#e500ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M1.674 3.21h1.485v1.485H1.674z"/><path fill="#0308ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M3.159 3.21h1.485v1.485H3.159z"/><path fill="#da6200" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M4.644 3.21h1.485v1.485H4.644zM.189 4.695h1.485V6.18H.189z"/><path fill="#f30" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M1.674 4.695h1.485V6.18H1.674z"/><path fill="#4cba00" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M3.159 4.695h1.485V6.18H3.159z"/><path fill="#0308ff" fill-rule="evenodd" stroke="#000" stroke-width=".143" d="M4.644 4.695h1.485V6.18H4.644z"/><path d="M.544.31c0 4.917.054 5.517 5.507 5.517" fill="none" stroke="#fff" stroke-width=".563"/><path d="M.256 5.825c1.302 0 1.69-2.97 2.901-2.97 1.24 0 1.345 2.972 2.894 2.972" fill="none" stroke="#fafafa" stroke-width=".563"/></svg>
@@ -94,7 +94,6 @@ SET(QGIS_ANALYSIS_SRCS
processing/qgsalgorithmmultiparttosinglepart.cpp
processing/qgsalgorithmmultiringconstantbuffer.cpp
processing/qgsalgorithmnearestneighbouranalysis.cpp
processing/qgsalgorithmnormalraster.cpp
processing/qgsalgorithmoffsetlines.cpp
processing/qgsalgorithmorderbyexpression.cpp
processing/qgsalgorithmorientedminimumboundingbox.cpp

This file was deleted.

This file was deleted.

0 comments on commit 096b80e

Please sign in to comment.
You can’t perform that action at this time.