Skip to content

Commit

Permalink
[processing] do not set an upper limit for points in random points layer
Browse files Browse the repository at this point in the history
fixes #13483
  • Loading branch information
volaya committed Oct 13, 2015
1 parent 36ebf1c commit ca27277
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/qgis/RandomPointsAlongLines.py
Expand Up @@ -51,9 +51,9 @@ def defineCharacteristics(self):
self.addParameter(ParameterVector(self.VECTOR,
self.tr('Input layer'), [ParameterVector.VECTOR_TYPE_LINE]))
self.addParameter(ParameterNumber(self.POINT_NUMBER,
self.tr('Number of points'), 1, 9999999, 1))
self.tr('Number of points'), 1, None, 1))
self.addParameter(ParameterNumber(self.MIN_DISTANCE,
self.tr('Minimum distance'), 0.0, 9999999.0, 0.0))
self.tr('Minimum distance'), 0.0, None, 0.0))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Random points')))

Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/qgis/RandomPointsExtent.py
Expand Up @@ -52,9 +52,9 @@ def defineCharacteristics(self):
self.addParameter(ParameterExtent(self.EXTENT,
self.tr('Input extent')))
self.addParameter(ParameterNumber(self.POINT_NUMBER,
self.tr('Points number'), 1, 9999999, 1))
self.tr('Points number'), 1, None, 1))
self.addParameter(ParameterNumber(self.MIN_DISTANCE,
self.tr('Minimum distance'), 0.0, 9999999, 0.0))
self.tr('Minimum distance'), 0.0, None, 0.0))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Random points')))

Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/qgis/RandomPointsLayer.py
Expand Up @@ -51,9 +51,9 @@ def defineCharacteristics(self):
self.addParameter(ParameterVector(self.VECTOR,
self.tr('Input layer'), [ParameterVector.VECTOR_TYPE_POLYGON]))
self.addParameter(ParameterNumber(self.POINT_NUMBER,
self.tr('Points number'), 1, 9999999, 1))
self.tr('Points number'), 1, None, 1))
self.addParameter(ParameterNumber(self.MIN_DISTANCE,
self.tr('Minimum distance'), 0.0, 9999999, 0.0))
self.tr('Minimum distance'), 0.0, None, 0.0))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Random points')))

Expand Down
Expand Up @@ -59,9 +59,9 @@ def defineCharacteristics(self):
self.addParameter(ParameterSelection(self.STRATEGY,
self.tr('Sampling strategy'), self.strategies, 0))
self.addParameter(ParameterNumber(self.VALUE,
self.tr('Number or density of points'), 0.0001, 9999999.0, 1.0))
self.tr('Number or density of points'), 0.0001, None, 1.0))
self.addParameter(ParameterNumber(self.MIN_DISTANCE,
self.tr('Minimum distance'), 0.0, 9999999, 0.0))
self.tr('Minimum distance'), 0.0, None, 0.0))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Random points')))

Expand Down
Expand Up @@ -63,7 +63,7 @@ def defineCharacteristics(self):
self.tr('Number field'),
self.VECTOR, ParameterTableField.DATA_TYPE_NUMBER))
self.addParameter(ParameterNumber(self.MIN_DISTANCE,
self.tr('Minimum distance'), 0.0, 9999999, 0.0))
self.tr('Minimum distance'), 0.0, None, 0.0))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Random points')))

def processAlgorithm(self, progress):
Expand Down

0 comments on commit ca27277

Please sign in to comment.