Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[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.
(cherry picked from commit 8446d3b )
Loading branch information
@@ -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 )
@@ -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 = {}
@@ -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
Toggle all file notes
Toggle all file annotations