Skip to content
Permalink
Browse files

Fix some numeric parameters which should be doubles

  • Loading branch information
nyalldawson committed Jan 9, 2018
1 parent a934060 commit f6d561655bd2b5c341f79e3c667824f180b89c1e
@@ -49,9 +49,9 @@ def __init__(self):

def initParameters(self, config=None):
self.addParameter(QgsProcessingParameterNumber(self.START_DISTANCE,
self.tr('Start distance'), defaultValue=0.0))
self.tr('Start distance'), type=QgsProcessingParameterNumber.Double, defaultValue=0.0))
self.addParameter(QgsProcessingParameterNumber(self.END_DISTANCE,
self.tr('End distance'), defaultValue=0.0))
self.tr('End distance'), type=QgsProcessingParameterNumber.Double, defaultValue=0.0))

def name(self):
return 'extendlines'
@@ -68,7 +68,7 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterFeatureSource(self.BOUNDARY_LAYER,
self.tr('Boundary layer'), [QgsProcessing.TypeVectorPolygon]))
self.addParameter(QgsProcessingParameterNumber(self.STEP,
self.tr('Step'), minValue=0.0, maxValue=999999999.999999, defaultValue=100.0))
self.tr('Step'), type=QgsProcessingParameterNumber.Double, minValue=0.0, maxValue=999999999.999999, defaultValue=100.0))
self.addParameter(QgsProcessingParameterBoolean(self.USE_PERCENTAGE,
self.tr('Use % of area instead of absolute value'), defaultValue=False))

@@ -73,11 +73,11 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterFeatureSource(self.INPUT,
self.tr('Input layer'), [QgsProcessing.TypeVectorPolygon, QgsProcessing.TypeVectorLine]))
self.addParameter(QgsProcessingParameterNumber(self.DISTANCE,
self.tr('Distance'), minValue=0.0, defaultValue=1.0))
self.tr('Distance'), type=QgsProcessingParameterNumber.Double, minValue=0.0, defaultValue=1.0))
self.addParameter(QgsProcessingParameterNumber(self.START_OFFSET,
self.tr('Start offset'), minValue=0.0, defaultValue=0.0))
self.tr('Start offset'), type=QgsProcessingParameterNumber.Double, minValue=0.0, defaultValue=0.0))
self.addParameter(QgsProcessingParameterNumber(self.END_OFFSET,
self.tr('End offset'), minValue=0.0, defaultValue=0.0))
self.tr('End offset'), type=QgsProcessingParameterNumber.Double, minValue=0.0, defaultValue=0.0))

self.addParameter(QgsProcessingParameterFeatureSink(self.OUTPUT, self.tr('Points'), QgsProcessing.TypeVectorPoint))

0 comments on commit f6d5616

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