Skip to content

Commit

Permalink
[processing][needs-docs] native vector split algorithm now outputs
Browse files Browse the repository at this point in the history
GeoPackages instead of shapefiles (refs #20557)

Also remove default output extension Processing settings as they are not
used anymore.
  • Loading branch information
alexbruy authored and nyalldawson committed Jan 29, 2019
1 parent 1cdff21 commit 8446d3b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/VectorSplit.py
Expand Up @@ -108,7 +108,7 @@ def processAlgorithm(self, parameters, context, feedback):
for current, i in enumerate(uniqueValues):
if feedback.isCanceled():
break
fName = u'{0}_{1}.shp'.format(baseName, str(i).strip())
fName = '{0}_{1}.gpkg'.format(baseName, str(i).strip())
feedback.pushInfo(self.tr('Creating layer: {}').format(fName))

sink, dest = QgsProcessingUtils.createFeatureSink(fName, context, fields, geomType, crs)
Expand Down
20 changes: 0 additions & 20 deletions python/plugins/processing/core/ProcessingConfig.py
Expand Up @@ -58,8 +58,6 @@ class ProcessingConfig:
POST_EXECUTION_SCRIPT = 'POST_EXECUTION_SCRIPT'
SHOW_CRS_DEF = 'SHOW_CRS_DEF'
WARN_UNMATCHING_CRS = 'WARN_UNMATCHING_CRS'
DEFAULT_OUTPUT_RASTER_LAYER_EXT = 'DEFAULT_OUTPUT_RASTER_LAYER_EXT'
DEFAULT_OUTPUT_VECTOR_LAYER_EXT = 'DEFAULT_OUTPUT_VECTOR_LAYER_EXT'
SHOW_PROVIDERS_TOOLTIP = 'SHOW_PROVIDERS_TOOLTIP'

settings = {}
Expand Down Expand Up @@ -136,24 +134,6 @@ def initialize():
valuetype=Setting.SELECTION,
options=invalidFeaturesOptions))

extensions = QgsVectorFileWriter.supportedFormatExtensions()
ProcessingConfig.addSetting(Setting(
ProcessingConfig.tr('General'),
ProcessingConfig.DEFAULT_OUTPUT_VECTOR_LAYER_EXT,
ProcessingConfig.tr('Default output vector layer extension'),
extensions[0],
valuetype=Setting.SELECTION,
options=extensions))

extensions = QgsRasterFileWriter.supportedFormatExtensions()
ProcessingConfig.addSetting(Setting(
ProcessingConfig.tr('General'),
ProcessingConfig.DEFAULT_OUTPUT_RASTER_LAYER_EXT,
ProcessingConfig.tr('Default output raster layer extension'),
extensions[0],
valuetype=Setting.SELECTION,
options=extensions))

@staticmethod
def setGroupIcon(group, icon):
ProcessingConfig.settingIcons[group] = icon
Expand Down

0 comments on commit 8446d3b

Please sign in to comment.