mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
[processing][grass] v.transform: add missing parameters
-t, -w, -x, -y, -a and -b missing parameters added
This commit is contained in:
parent
2c58769f64
commit
8309c5ecaa
@ -10,4 +10,10 @@ QgsProcessingParameterNumber|yscale|Y scale|QgsProcessingParameterNumber.Double|
|
||||
QgsProcessingParameterNumber|zscale|Z scale|QgsProcessingParameterNumber.Double|1.0|True|None|None
|
||||
QgsProcessingParameterNumber|zrotation|Rotation around z axis in degrees counterclockwise|QgsProcessingParameterNumber.Double|0.0|True|None|None
|
||||
QgsProcessingParameterString|columns|Name of attribute column(s) used as transformation parameters (Format: parameter:column, e.g. xshift:xs,yshift:ys,zrot:zr)|None|True|True
|
||||
*QgsProcessingParameterBoolean|-t|Shift all z values to bottom=0|False
|
||||
*QgsProcessingParameterBoolean|-w|Swap coordinates x, y and then apply other parameters|False
|
||||
*QgsProcessingParameterBoolean|-x|Swap coordinates x, z and then apply other parameters|False
|
||||
*QgsProcessingParameterBoolean|-y|Swap coordinates y, z and then apply other parameters|False
|
||||
*QgsProcessingParameterBoolean|-a|Swap coordinates after the other transformations|False
|
||||
*QgsProcessingParameterBoolean|-b|Do not build topology|False
|
||||
QgsProcessingParameterVectorDestination|output|Transformed
|
||||
|
32
python/plugins/grassprovider/ext/v_transform.py
Normal file
32
python/plugins/grassprovider/ext/v_transform.py
Normal file
@ -0,0 +1,32 @@
|
||||
"""
|
||||
***************************************************************************
|
||||
v_transform.py
|
||||
----------
|
||||
Date : February 2024
|
||||
Copyright : (C) 2024 by Andrea Giudiceandrea
|
||||
Email : andreaerdna at libero dot it
|
||||
***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* any later version. *
|
||||
* *
|
||||
***************************************************************************
|
||||
"""
|
||||
|
||||
__author__ = 'Andrea Giudiceandrea'
|
||||
__date__ = 'February 2024'
|
||||
__copyright__ = '(C) 2024, Andrea Giudiceandrea'
|
||||
|
||||
|
||||
def checkParameterValuesBeforeExecuting(alg, parameters, context):
|
||||
""" Verify if we have the right parameters """
|
||||
# -w, -x and -y parameters are mutually exclusive
|
||||
w = alg.parameterAsBoolean(parameters, '-w', context)
|
||||
x = alg.parameterAsBoolean(parameters, '-x', context)
|
||||
y = alg.parameterAsBoolean(parameters, '-y', context)
|
||||
if sum([w, x, y]) > 1:
|
||||
return False, alg.tr("The 'Swap coordinates' parameters -w, -x and -y are mutually exclusive. You need to set either none or only one of them!")
|
||||
|
||||
return True, None
|
Loading…
x
Reference in New Issue
Block a user