mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-15 00:07:25 -05:00
Add flag to a few more algorithms
This commit is contained in:
parent
54953b167b
commit
7c0c56b96b
@ -22,7 +22,8 @@ __copyright__ = '(C) 2014, Alexander Bruy'
|
||||
import random
|
||||
|
||||
from qgis.PyQt.QtCore import QVariant
|
||||
from qgis.core import (QgsField,
|
||||
from qgis.core import (Qgis,
|
||||
QgsField,
|
||||
QgsFeatureSink,
|
||||
QgsFeature,
|
||||
QgsFields,
|
||||
@ -81,6 +82,9 @@ class RandomPointsAlongLines(QgisAlgorithm):
|
||||
def displayName(self):
|
||||
return self.tr('Random points along line')
|
||||
|
||||
def documentationFlags(self):
|
||||
return Qgis.ProcessingAlgorithmDocumentationFlag.RegeneratesPrimaryKey
|
||||
|
||||
def processAlgorithm(self, parameters, context, feedback):
|
||||
source = self.parameterAsSource(parameters, self.INPUT, context)
|
||||
if source is None:
|
||||
|
||||
@ -24,7 +24,8 @@ import random
|
||||
|
||||
from qgis.PyQt.QtGui import QIcon
|
||||
from qgis.PyQt.QtCore import QVariant
|
||||
from qgis.core import (QgsApplication,
|
||||
from qgis.core import (Qgis,
|
||||
QgsApplication,
|
||||
QgsField,
|
||||
QgsFeatureSink,
|
||||
QgsFeature,
|
||||
@ -90,6 +91,9 @@ class RandomPointsLayer(QgisAlgorithm):
|
||||
def displayName(self):
|
||||
return self.tr('Random points in layer bounds')
|
||||
|
||||
def documentationFlags(self):
|
||||
return Qgis.ProcessingAlgorithmDocumentationFlag.RegeneratesPrimaryKey
|
||||
|
||||
def processAlgorithm(self, parameters, context, feedback):
|
||||
source = self.parameterAsSource(parameters, self.INPUT, context)
|
||||
if source is None:
|
||||
|
||||
@ -23,7 +23,8 @@ import os
|
||||
import random
|
||||
|
||||
from qgis.PyQt.QtCore import QVariant
|
||||
from qgis.core import (QgsApplication,
|
||||
from qgis.core import (Qgis,
|
||||
QgsApplication,
|
||||
QgsField,
|
||||
QgsFeatureSink,
|
||||
QgsFeature,
|
||||
@ -118,6 +119,9 @@ class RandomPointsPolygons(QgisAlgorithm):
|
||||
def displayName(self):
|
||||
return self.tr('Random points inside polygons')
|
||||
|
||||
def documentationFlags(self):
|
||||
return Qgis.ProcessingAlgorithmDocumentationFlag.RegeneratesPrimaryKey
|
||||
|
||||
def processAlgorithm(self, parameters, context, feedback):
|
||||
source = self.parameterAsSource(parameters, self.INPUT, context)
|
||||
if source is None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user