Skip to content

Commit 8446d3b

Browse files
alexbruynyalldawson
authored andcommittedJan 29, 2019
[processing][needs-docs] native vector split algorithm now outputs
GeoPackages instead of shapefiles (refs #20557) Also remove default output extension Processing settings as they are not used anymore.
1 parent 1cdff21 commit 8446d3b

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed
 

‎python/plugins/processing/algs/qgis/VectorSplit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def processAlgorithm(self, parameters, context, feedback):
108108
for current, i in enumerate(uniqueValues):
109109
if feedback.isCanceled():
110110
break
111-
fName = u'{0}_{1}.shp'.format(baseName, str(i).strip())
111+
fName = '{0}_{1}.gpkg'.format(baseName, str(i).strip())
112112
feedback.pushInfo(self.tr('Creating layer: {}').format(fName))
113113

114114
sink, dest = QgsProcessingUtils.createFeatureSink(fName, context, fields, geomType, crs)

‎python/plugins/processing/core/ProcessingConfig.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ class ProcessingConfig:
5858
POST_EXECUTION_SCRIPT = 'POST_EXECUTION_SCRIPT'
5959
SHOW_CRS_DEF = 'SHOW_CRS_DEF'
6060
WARN_UNMATCHING_CRS = 'WARN_UNMATCHING_CRS'
61-
DEFAULT_OUTPUT_RASTER_LAYER_EXT = 'DEFAULT_OUTPUT_RASTER_LAYER_EXT'
62-
DEFAULT_OUTPUT_VECTOR_LAYER_EXT = 'DEFAULT_OUTPUT_VECTOR_LAYER_EXT'
6361
SHOW_PROVIDERS_TOOLTIP = 'SHOW_PROVIDERS_TOOLTIP'
6462

6563
settings = {}
@@ -136,24 +134,6 @@ def initialize():
136134
valuetype=Setting.SELECTION,
137135
options=invalidFeaturesOptions))
138136

139-
extensions = QgsVectorFileWriter.supportedFormatExtensions()
140-
ProcessingConfig.addSetting(Setting(
141-
ProcessingConfig.tr('General'),
142-
ProcessingConfig.DEFAULT_OUTPUT_VECTOR_LAYER_EXT,
143-
ProcessingConfig.tr('Default output vector layer extension'),
144-
extensions[0],
145-
valuetype=Setting.SELECTION,
146-
options=extensions))
147-
148-
extensions = QgsRasterFileWriter.supportedFormatExtensions()
149-
ProcessingConfig.addSetting(Setting(
150-
ProcessingConfig.tr('General'),
151-
ProcessingConfig.DEFAULT_OUTPUT_RASTER_LAYER_EXT,
152-
ProcessingConfig.tr('Default output raster layer extension'),
153-
extensions[0],
154-
valuetype=Setting.SELECTION,
155-
options=extensions))
156-
157137
@staticmethod
158138
def setGroupIcon(group, icon):
159139
ProcessingConfig.settingIcons[group] = icon

0 commit comments

Comments
 (0)
Please sign in to comment.