Skip to content
Permalink
Browse files

[processing] do not set an upper limit for points in random points layer

fixes #13483
  • Loading branch information
volaya committed Oct 13, 2015
1 parent 36ebf1c commit ca27277bb3b0de5d44b3b977c50b634918fb3911
@@ -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')))

@@ -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')))

@@ -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')))

@@ -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')))

@@ -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):

0 comments on commit ca27277

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