mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Make data type option translatable in GDAL algorithms dialog
This commit is contained in:
parent
83cbe24bbd
commit
491ca3315f
@ -50,12 +50,13 @@ class ClipRasterByExtent(GdalAlgorithm):
|
||||
DATA_TYPE = 'DATA_TYPE'
|
||||
OUTPUT = 'OUTPUT'
|
||||
|
||||
TYPES = ['Use input layer data type', 'Byte', 'Int16', 'UInt16', 'UInt32', 'Int32', 'Float32', 'Float64', 'CInt16', 'CInt32', 'CFloat32', 'CFloat64']
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
def initAlgorithm(self, config=None):
|
||||
|
||||
self.TYPES = [self.tr('Use Input Layer Data Type'), 'Byte', 'Int16', 'UInt16', 'UInt32', 'Int32', 'Float32', 'Float64', 'CInt16', 'CInt32', 'CFloat32', 'CFloat64']
|
||||
|
||||
self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT,
|
||||
self.tr('Input layer')))
|
||||
self.addParameter(QgsProcessingParameterExtent(self.EXTENT,
|
||||
|
@ -61,12 +61,13 @@ class ClipRasterByMask(GdalAlgorithm):
|
||||
MULTITHREADING = 'MULTITHREADING'
|
||||
OUTPUT = 'OUTPUT'
|
||||
|
||||
TYPES = ['Use input layer data type', 'Byte', 'Int16', 'UInt16', 'UInt32', 'Int32', 'Float32', 'Float64', 'CInt16', 'CInt32', 'CFloat32', 'CFloat64']
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
def initAlgorithm(self, config=None):
|
||||
|
||||
self.TYPES = [self.tr('Use Input Layer Data Type'), 'Byte', 'Int16', 'UInt16', 'UInt32', 'Int32', 'Float32', 'Float64', 'CInt16', 'CInt32', 'CFloat32', 'CFloat64']
|
||||
|
||||
self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT,
|
||||
self.tr('Input layer')))
|
||||
self.addParameter(QgsProcessingParameterFeatureSource(self.MASK,
|
||||
|
@ -48,12 +48,13 @@ class rearrange_bands(GdalAlgorithm):
|
||||
DATA_TYPE = 'DATA_TYPE'
|
||||
OUTPUT = 'OUTPUT'
|
||||
|
||||
TYPES = ['Use input layer data type', 'Byte', 'Int16', 'UInt16', 'UInt32', 'Int32', 'Float32', 'Float64', 'CInt16', 'CInt32', 'CFloat32', 'CFloat64']
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
def initAlgorithm(self, config=None):
|
||||
|
||||
self.TYPES = [self.tr('Use Input Layer Data Type'), 'Byte', 'Int16', 'UInt16', 'UInt32', 'Int32', 'Float32', 'Float64', 'CInt16', 'CInt32', 'CFloat32', 'CFloat64']
|
||||
|
||||
self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT, self.tr('Input layer')))
|
||||
self.addParameter(QgsProcessingParameterBand(self.BANDS,
|
||||
self.tr('Selected band(s)'),
|
||||
|
@ -51,12 +51,13 @@ class translate(GdalAlgorithm):
|
||||
DATA_TYPE = 'DATA_TYPE'
|
||||
OUTPUT = 'OUTPUT'
|
||||
|
||||
TYPES = ['Use input layer data type', 'Byte', 'Int16', 'UInt16', 'UInt32', 'Int32', 'Float32', 'Float64', 'CInt16', 'CInt32', 'CFloat32', 'CFloat64']
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
def initAlgorithm(self, config=None):
|
||||
|
||||
self.TYPES = [self.tr('Use Input Layer Data Type'), 'Byte', 'Int16', 'UInt16', 'UInt32', 'Int32', 'Float32', 'Float64', 'CInt16', 'CInt32', 'CFloat32', 'CFloat64']
|
||||
|
||||
self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT, self.tr('Input layer')))
|
||||
self.addParameter(QgsProcessingParameterCrs(self.TARGET_CRS,
|
||||
self.tr('Override the projection for the output file'),
|
||||
|
@ -59,8 +59,6 @@ class warp(GdalAlgorithm):
|
||||
EXTRA = 'EXTRA'
|
||||
OUTPUT = 'OUTPUT'
|
||||
|
||||
TYPES = ['Use input layer data type', 'Byte', 'Int16', 'UInt16', 'UInt32', 'Int32', 'Float32', 'Float64', 'CInt16', 'CInt32', 'CFloat32', 'CFloat64']
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
@ -78,6 +76,8 @@ class warp(GdalAlgorithm):
|
||||
(self.tr('First quartile'), 'q1'),
|
||||
(self.tr('Third quartile'), 'q3'))
|
||||
|
||||
self.TYPES = [self.tr('Use Input Layer Data Type'), 'Byte', 'Int16', 'UInt16', 'UInt32', 'Int32', 'Float32', 'Float64', 'CInt16', 'CInt32', 'CFloat32', 'CFloat64']
|
||||
|
||||
self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT, self.tr('Input layer')))
|
||||
self.addParameter(QgsProcessingParameterCrs(self.SOURCE_CRS,
|
||||
self.tr('Source CRS'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user