Lot 10: Export and translation/filtering of a mesh
Write apply modification on a mesh calling a salome_script: The modifications are the following:
- Translation: Input X Y translation values (can be negative)
- Variable filtering: select which variables to keep (by default all) (list of variable to display in a list and multiple selection possible)
- Time filtering: select time step to keep in the same way as for the variable (by default all) Also add button to keep only the last time step And three button to give (first time, last time, time step) and select the time in the display accordingly Those three button should be optional and be display if we select a checkbox called "Specific time range".
The list of variable and times should be read from the mesh (see if the qgis mesh api allows that)
Here are the modifications available through alter
:
Format modification:
-
--float switch between DOUBLE and SINGLE precision float
-
--endian switch between endian encoddings
Header modification:
-
--title TITLE set the title of the file
Date modification:
-
--datetime DATETIME set the start date of the file (yyyy-mm-dd hh:mm:ss)
Variable modification:
-
--vars XVARS specify which variables should remain (','-delimited)
-
--rename RENAME_VAR change the name of a VARIABLE: 'OLD VAR=NEW VAR'
-
--var? MODIF_VAR will modify var? ((var*? * val )+ var+?) operations on that VARIABLE name
-
--var+? ADD_VAR adds to the VARIABLE
-
--var*? MUL_VAR scales the VARIABLE
Time modification:
-
--times specify times index
-
-f TFROM, --from TFROM specify the first frame included
-
-s TEND, --stop TEND specify the last frame included (negative from the end)
-
-d TSTEP, --step TSTEP specify the step for the extraction of frames
-
--reset-time reset first time to zero by remove t0 to all times
-
--T+? ADD_TIME adds to the ATs
-
--T*? MUL_TIME scales the ATs
Coordinates modification:
-
--sph2ll SPH2LL SPH2LL convert from spherical to longitude-latitude
-
--ll2sph LL2SPH LL2SPH convert from longitude-latitude to spherical
-
--ll2utm LL2UTM zone info convert from longitude-latitude to UTM (giving XXX will let the script pick the zone otherwise specify zone with number + letter (for example 24S))
-
--utm2ll UTM2LL zone info to convert from UTM to longitude-latitude (for example 24S)
-
--X+? ADD_X adds to the meshx
-
--X*? MUL_X scales the meshx
-
--Y+? ADD_Y adds to the meshy
-
--Y*? MUL_Y scales the meshy
-
--orig ORIG ORIG Origin of coordinates (X_ORIG, Y_ORIG in file)
-
--rotate ROTATE Angle of rotation (counter clockwise) to apply in degree
-
--rotation-point ROT_PT ROT_PT Point around which to do the rotation
-
--center Apply rotation with center of mesh as rotation point
-
--proj PROJ Proj using pyproj format (CRSCODE1/CRSCODE2 for example EPSG:4326/EPSG:27561)
Edited by Jean-Marie Kerloch