mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-07 00:03:52 -05:00
[processing] remove debug line and fix spatial index creation
This commit is contained in:
parent
63955e6574
commit
700441eec9
@ -127,13 +127,11 @@ class AlgorithmDialog(AlgorithmDialogBase):
|
|||||||
unmatchingCRS = True
|
unmatchingCRS = True
|
||||||
if isinstance(param, ParameterExtent):
|
if isinstance(param, ParameterExtent):
|
||||||
value = self.mainWidget.valueItems[param.name].leText.text().strip()
|
value = self.mainWidget.valueItems[param.name].leText.text().strip()
|
||||||
print value
|
|
||||||
if value:
|
if value:
|
||||||
hasExtent = True
|
hasExtent = True
|
||||||
|
|
||||||
return hasExtent and unmatchingCRS
|
return hasExtent and unmatchingCRS
|
||||||
|
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
self.settings.setValue("/Processing/dialogBase", self.saveGeometry())
|
self.settings.setValue("/Processing/dialogBase", self.saveGeometry())
|
||||||
|
|
||||||
|
|||||||
@ -221,7 +221,13 @@ def testForUniqueness(fieldList1, fieldList2):
|
|||||||
def spatialindex(layer):
|
def spatialindex(layer):
|
||||||
"""Creates a spatial index for the passed vector layer.
|
"""Creates a spatial index for the passed vector layer.
|
||||||
"""
|
"""
|
||||||
idx = QgsSpatialIndex(features(layer))
|
request = QgsFeatureRequest()
|
||||||
|
request.setSubsetOfAttributes([])
|
||||||
|
if ProcessingConfig.getSetting(ProcessingConfig.USE_SELECTED) \
|
||||||
|
and layer.selectedFeatureCount() > 0:
|
||||||
|
idx = layer.selectedFeaturesIterator(request)
|
||||||
|
else:
|
||||||
|
idx = QgsSpatialIndex(layer.getFeatures(request))
|
||||||
return idx
|
return idx
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user