Difference between revisions of "TUFLOW Viewer - Batch Exporting Maps"

From Tuflow
Jump to navigation Jump to search
(spelling mistake fixed)
 
(4 intermediate revisions by one other user not shown)
Line 8: Line 8:
 
<li> Open the batch export map tool via '''Export >> Export Maps'''<br>
 
<li> Open the batch export map tool via '''Export >> Export Maps'''<br>
 
[[File: batch_exporting_maps_01b.png]]
 
[[File: batch_exporting_maps_01b.png]]
<li> In the layout tab, the user has the option to use a '''Default Layout''' or a '''Custom Layout'''. A cusom layout uses a '''Print Layout Template (.qpt)''' as an input. The recommended workflow is to:
+
<li> In the layout tab, the user has the option to use a '''Default Layout''' or a '''Custom Layout'''. A custom layout uses a '''Print Layout Template (.qpt)''' as an input. The recommended workflow is to:
 
<ol>
 
<ol>
 
<li> Use the '''Default Layout''' initially.
 
<li> Use the '''Default Layout''' initially.
Line 16: Line 16:
 
</ol>
 
</ol>
 
[[File: Batch_exporting_maps_02a.png]]
 
[[File: Batch_exporting_maps_02a.png]]
 +
 
<li> During Step 1 above, the '''Default Layout''' lets the user specify some items to add to the layout.
 
<li> During Step 1 above, the '''Default Layout''' lets the user specify some items to add to the layout.
 
<li> '''Page Properties''' - defines the page size and the orientation of the exported maps. A page border is added by default, however can be turned off or edited in this section.<br>
 
<li> '''Page Properties''' - defines the page size and the orientation of the exported maps. A page border is added by default, however can be turned off or edited in this section.<br>
Line 27: Line 28:
 
* '''Dynamic Date''' - will add the date the map was exported.
 
* '''Dynamic Date''' - will add the date the map was exported.
 
* '''Dynamic Workspace Location''' - will add the workspace path to the label.
 
* '''Dynamic Workspace Location''' - will add the workspace path to the label.
[[File: Maps_LayoutTab_Label.PNG | 450px]]
+
[[File: Batch_exporting_maps_05a.png]]
 
<li> '''Plots''' - These are dynamic plot objects that will be added to the maps. To add a plot, the plot must already be available in one of the TUFLOW Viewer plotting windows.<br>
 
<li> '''Plots''' - These are dynamic plot objects that will be added to the maps. To add a plot, the plot must already be available in one of the TUFLOW Viewer plotting windows.<br>
[[File: Animation_Layout_Plot_Item.PNG | 450px]]
+
[[File: Batch_exporting_maps_06b.png]]
 
<ol>
 
<ol>
<li> Use the add button [[File: Animation_add_button.PNG | 20px]] to add a plot.
+
<li> Use the add button [[File: plus_icon_01a.png]] to add a plot.
 
<li> Select the source of the plot lines that will be added (i.e. time series, cross section etc.).
 
<li> Select the source of the plot lines that will be added (i.e. time series, cross section etc.).
 
<li> Select the plotting lines to add to the plot. Users can add more than one line or split the lines onto multiple plots. If the line is on secondary axis, this will be retained unless the need for the secondary axis becomes redundant (e.g. it's the only line on the plot).
 
<li> Select the plotting lines to add to the plot. Users can add more than one line or split the lines onto multiple plots. If the line is on secondary axis, this will be retained unless the need for the secondary axis becomes redundant (e.g. it's the only line on the plot).
Line 37: Line 38:
 
<li> Set the position. This is only the starting position and can be moved later in the print layout.
 
<li> Set the position. This is only the starting position and can be moved later in the print layout.
 
<li> Set the plot properties. When the user clicks this button, TUFLOW Viewer will calculate the min/max for the plot axes. For lines on the cross-section and vertical profile plots, this can take some time as TUFLOW Viewer will need to step through every timestep to find the min/max values.<br>
 
<li> Set the plot properties. When the user clicks this button, TUFLOW Viewer will calculate the min/max for the plot axes. For lines on the cross-section and vertical profile plots, this can take some time as TUFLOW Viewer will need to step through every timestep to find the min/max values.<br>
[[File: Animation_Plot_Properties_Dialog.PNG | 450px]]
+
[[File: Batch_exporting_maps_07a.png]]
 
<ol>  
 
<ol>  
 
<li> '''Plot Title''' - can be useful to indicate where the plot was extracted from by aligning the title with labels in the print layout.
 
<li> '''Plot Title''' - can be useful to indicate where the plot was extracted from by aligning the title with labels in the print layout.
Line 50: Line 51:
 
<li> Label position relative to the graphic object
 
<li> Label position relative to the graphic object
 
<li> Label properties:<br>
 
<li> Label properties:<br>
[[File: Animation_Label_Properties_Dialog.PNG | 450px]]
+
[[File: Batch_exporting_maps_08a.png]]
 
<ol>
 
<ol>
 
<li> Label font settings
 
<li> Label font settings
Line 57: Line 58:
 
</ol>
 
</ol>
 
<li> '''Images''' - Adds static images (e.g. company logo) to the maps. Adding images can also be added / edited later in the print layout.<br>
 
<li> '''Images''' - Adds static images (e.g. company logo) to the maps. Adding images can also be added / edited later in the print layout.<br>
[[File: Animation_Image_Item.PNG | 450px]]
+
[[File: Batch_exporting_maps_09b.png]]
 
<ol>
 
<ol>
<li> Use the add button [[File: Animation_add_button.PNG | 20px]] to add an image.
+
<li> Use the add button [[File: plus_icon_01a.png]] to add an image.
 
<li> Browse or copy the file path location of the image to be added.
 
<li> Browse or copy the file path location of the image to be added.
 
<li> Position - this is the starting position and can be changed later in the print layout.
 
<li> Position - this is the starting position and can be changed later in the print layout.
 
<li> Image properties:<br>
 
<li> Image properties:<br>
[[File: Animation_Image_Properties_Dialog.PNG | 450px]]
+
[[File: Batch_exporting_maps_10a.png]]
 
<ol>
 
<ol>
 
<li> Image size options - this can be changed later in the print layout.
 
<li> Image size options - this can be changed later in the print layout.
Line 73: Line 74:
 
* '''Vector Type''' - vector result type to be mapped. If the result isn't loaded yet, the user will need to type this result type in manually.
 
* '''Vector Type''' - vector result type to be mapped. If the result isn't loaded yet, the user will need to type this result type in manually.
 
* '''Time''' - timestep used for the map. If the result isn't loaded yet, the user will need to type this result type in manually.
 
* '''Time''' - timestep used for the map. If the result isn't loaded yet, the user will need to type this result type in manually.
* '''Output''' - output location of map.
+
* '''Output''' - output location of map.<br>
 +
[[File: batch_exporting_maps_18b.png]]
 
<li> Users can import a list of maps from a csv file using the '''Import''' button. This allows users to use a program such as MS Excel to populate the map list.<br>
 
<li> Users can import a list of maps from a csv file using the '''Import''' button. This allows users to use a program such as MS Excel to populate the map list.<br>
[[File: Maps_Import_Map_List_Dialog.PNG | 450px]]
+
[[File: Batch_exporting_maps_11a.png]]
 
<ol>
 
<ol>
 
<li> '''Delimited File''' - csv (or other text file) containing the map list.
 
<li> '''Delimited File''' - csv (or other text file) containing the map list.
 
<li> '''Delimited Format''' - delimited format of the input file.
 
<li> '''Delimited Format''' - delimited format of the input file.
 
<li> '''Header Rows''' - number of header rows to discard.
 
<li> '''Header Rows''' - number of header rows to discard.
<li> '''Columns''' - the columns that correspond to the appropriate columns in the tool. If the columnn names match the names in the tool, the import tool will automatically populate these values.
+
<li> '''Columns''' - the columns that correspond to the appropriate columns in the tool. If the column names match the names in the tool, the import tool will automatically populate these values.
 
</ol>
 
</ol>
 
<li> Once all layout items have been chosen and added, clicking '''Preview''' will allow the user to view how it's going to look.<br>
 
<li> Once all layout items have been chosen and added, clicking '''Preview''' will allow the user to view how it's going to look.<br>
[[File: Maps_Preview_Button.PNG | 450px]]
+
[[File: Batch_exporting_maps_12a.png]]
 
<li> Clicking the preview button will open up the layout in the QGIS print layout. In this layout, the user can modify, move, resize, add, and remove items in the layout. The following items must retain their IDs:
 
<li> Clicking the preview button will open up the layout in the QGIS print layout. In this layout, the user can modify, move, resize, add, and remove items in the layout. The following items must retain their IDs:
 
* The dynamic label must have the ID 'title'.
 
* The dynamic label must have the ID 'title'.
Line 90: Line 92:
 
Some of the useful information and tools in the print layout are:
 
Some of the useful information and tools in the print layout are:
 
* All plot items are listed in the 'Items' box and their corresponding ID. Items can be selected in this box to show their properties and allow users to edit them (they can also be selected in the print layout).<br>
 
* All plot items are listed in the 'Items' box and their corresponding ID. Items can be selected in this box to show their properties and allow users to edit them (they can also be selected in the print layout).<br>
: [[File: Animation_Print_Layout_Items.PNG | 350px]]
+
: [[File: Batch_exporting_maps_13a.png]]
 
* Item properties can be edited using the '''Item Properties''' tab below the 'Items' box.<br>
 
* Item properties can be edited using the '''Item Properties''' tab below the 'Items' box.<br>
: [[File: Animation_Print_Layout_ItemProperties.PNG | 350px]]
+
: [[File: Batch_exporting_maps_14a.png]]
* Use the tool '''Interactively Edit Map Extent''' [[File: Animation_Interact_With_Map_Icon.PNG | 25px]] to edit the zoom and position of the map in the print layout.
+
* Use the tool '''Interactively Edit Map Extent''' [[File: Interactively_edit_map_extent_icon_01a.png]] to edit the zoom and position of the map in the print layout.
 
* When the map zoom and extents are adjusted the graphic objects will no longer be in the correct position, however that's ok because the next time either the preview is clicked or if the export maps tool is run, they will be placed in their correct position.
 
* When the map zoom and extents are adjusted the graphic objects will no longer be in the correct position, however that's ok because the next time either the preview is clicked or if the export maps tool is run, they will be placed in their correct position.
* Use the tool '''Select / Move Item''' [[File: Animation_Move_Resize_Item_Icon.PNG | 25px]] to move and resize items in the print layout.
+
* Use the tool '''Select / Move Item''' [[File: select_move_item_icon_01a.png]] to move and resize items in the print layout.
 
* Use '''Add Item''' menu to add other custom items such as a north arrow or scale bar.<br>
 
* Use '''Add Item''' menu to add other custom items such as a north arrow or scale bar.<br>
: [[File: Animation_Add_Item_Menu.PNG | 200px]]
+
: [[File: Batch_exporting_maps_15a.png]]
 
<li> Save the print layout as a template (.qpt) via the menu '''Layout >> Save as Template'''.<Br>
 
<li> Save the print layout as a template (.qpt) via the menu '''Layout >> Save as Template'''.<Br>
[[File: Animation_Layout_Menu.PNG | 200px]]
+
[[File: Batch_exporting_maps_16a.png]]
 
<li> Close the print layout.
 
<li> Close the print layout.
 
<li> Select the '''Custom Layout''' radio button in the layout tab in the export animation dialog and browse the saved template file (.qpt).<br>
 
<li> Select the '''Custom Layout''' radio button in the layout tab in the export animation dialog and browse the saved template file (.qpt).<br>
[[File: Maps_Custom_Layout_Button.PNG | 450px]]<br>
+
[[File: Batch_exporting_maps_17a.png]]<br>
Note that all the default layout items will be overriden with the '''Custom Layout''' except for the plots and dynamic text. The plot position and size from the custom layout template will be used, however the plot content will still be taken from the '''Default Layout'''. Likewise for the dynamic text, the text will be taken from the '''Default Layout'''.
+
Note that all the default layout items will be overridden with the '''Custom Layout''' except for the plots and dynamic text. The plot position and size from the custom layout template will be used, however the plot content will still be taken from the '''Default Layout'''. Likewise for the dynamic text, the text will be taken from the '''Default Layout'''.
 
<li> The '''Preview''' button can be used multiple times to check that the layout is correctly being imported from the template.
 
<li> The '''Preview''' button can be used multiple times to check that the layout is correctly being imported from the template.
 
<li> Click '''Ok''' to run the tool and export the maps.
 
<li> Click '''Ok''' to run the tool and export the maps.

Latest revision as of 11:02, 19 August 2024

TUFLOW Viewer offers the ability to batch export maps using mesh layers. This tool does not seek to replace other similar tools that may be inherently built in to QGIS, however does offer the ability to:

  • Automatically add plots from the mesh layer to the maps.
  • Automatically load mesh results, plot, and export maps.

It also offers convenience functionality for adding items (such as a legend, images and scales), however these can also be added manually in the print layout.

The following steps through the process of batch exporting maps:

  1. Open the batch export map tool via Export >> Export Maps
    Batch exporting maps 01b.png
  2. In the layout tab, the user has the option to use a Default Layout or a Custom Layout. A custom layout uses a Print Layout Template (.qpt) as an input. The recommended workflow is to:
    1. Use the Default Layout initially.
    2. Customise the layout using the print layout in QGIS.
    3. Export the print layout as a template (.qpt).
    4. Use Custom Layout using the created template file.

    Batch exporting maps 02a.png

  3. During Step 1 above, the Default Layout lets the user specify some items to add to the layout.
  4. Page Properties - defines the page size and the orientation of the exported maps. A page border is added by default, however can be turned off or edited in this section.
    Batch exporting maps 03a.png
  5. Legend, Scale Bar, North Arrow - the next three items will add common map items. Users can edit the properties of the item and add things like a background and border.
    Batch exporting maps 04a.png
  6. Label - Users can also add a custom label with dynamic text. This is useful if the user would like to add information to the map such as the result name, result type, or date the map was produced. This can be done by using the buttons on the right-hand side of the label properties. User's can also add their own text to the label, however this will be static.
    • Dynamic Map Number - will add a map number to the label based on the order that the maps are exported.
    • Dynamic Result Name - will add the result name to the label (e.g. M03_5m_001).
    • Dynamic Result Type - will add the result type to the label (e.g. Depth - Max).
    • Dynamic Date - will add the date the map was exported.
    • Dynamic Workspace Location - will add the workspace path to the label.
    Batch exporting maps 05a.png
  7. Plots - These are dynamic plot objects that will be added to the maps. To add a plot, the plot must already be available in one of the TUFLOW Viewer plotting windows.
    Batch exporting maps 06b.png
    1. Use the add button Plus icon 01a.png to add a plot.
    2. Select the source of the plot lines that will be added (i.e. time series, cross section etc.).
    3. Select the plotting lines to add to the plot. Users can add more than one line or split the lines onto multiple plots. If the line is on secondary axis, this will be retained unless the need for the secondary axis becomes redundant (e.g. it's the only line on the plot).
      • In addition to the plotted result types, users have the option of specifying Active Dataset and Active Dataset [Water Level For Depth]. This will use the plot location, but plot the active scalar result of the map. The latter option will use water level if the active scalar is depth. This option will not work for plotting from a vector layer if the user is using one of the fields for the plot legend entry (this will need to be turned off in the Settings >> Options >> Plotting.
    4. Set the position. This is only the starting position and can be moved later in the print layout.
    5. Set the plot properties. When the user clicks this button, TUFLOW Viewer will calculate the min/max for the plot axes. For lines on the cross-section and vertical profile plots, this can take some time as TUFLOW Viewer will need to step through every timestep to find the min/max values.
      Batch exporting maps 07a.png
      1. Plot Title - can be useful to indicate where the plot was extracted from by aligning the title with labels in the print layout.
      2. Axis labels - will be populated with default values.
      3. Axis Limits - will be populated with calculated extents and the extents can be recalculated using Auto Calc.
      4. Legend - legend can be added or removed. Legend location options are not as extensive as the TUFLOW Viewer itself, most notably 'Auto' is not available.
      5. Grid lines - can be toggled on/off.
      6. Figure Size - will default to 100 x 100. This can be changed in the print layout and the plot will be re-rendered prior to the animation to fit the desired size.
    6. If the plot point/line was drawn by the user (not a vector layer), a graphic object will be added to the appropriate location to indicate the extraction location. This can be toggled off by unchecking this box.
    7. Label for the graphic object - this can be changed later in the print layout
    8. Label position relative to the graphic object
    9. Label properties:
      Batch exporting maps 08a.png
      1. Label font settings
      2. Background and box settings
  8. Images - Adds static images (e.g. company logo) to the maps. Adding images can also be added / edited later in the print layout.
    Batch exporting maps 09b.png
    1. Use the add button Plus icon 01a.png to add an image.
    2. Browse or copy the file path location of the image to be added.
    3. Position - this is the starting position and can be changed later in the print layout.
    4. Image properties:
      Batch exporting maps 10a.png
      1. Image size options - this can be changed later in the print layout.
  9. Add maps in the Export Maps tab.
    • Result - result file (e.g. the .xmdf file). Results can be chosen from mesh layers that are already loaded into QGIS, or a file path can be specified and the tool will automatically load the mesh when required.
    • Scalar Type - scalar result type to be mapped. If the result isn't loaded yet, the user will need to type this result type in manually.
    • Vector Type - vector result type to be mapped. If the result isn't loaded yet, the user will need to type this result type in manually.
    • Time - timestep used for the map. If the result isn't loaded yet, the user will need to type this result type in manually.
    • Output - output location of map.
    Batch exporting maps 18b.png
  10. Users can import a list of maps from a csv file using the Import button. This allows users to use a program such as MS Excel to populate the map list.
    Batch exporting maps 11a.png
    1. Delimited File - csv (or other text file) containing the map list.
    2. Delimited Format - delimited format of the input file.
    3. Header Rows - number of header rows to discard.
    4. Columns - the columns that correspond to the appropriate columns in the tool. If the column names match the names in the tool, the import tool will automatically populate these values.
  11. Once all layout items have been chosen and added, clicking Preview will allow the user to view how it's going to look.
    Batch exporting maps 12a.png
  12. Clicking the preview button will open up the layout in the QGIS print layout. In this layout, the user can modify, move, resize, add, and remove items in the layout. The following items must retain their IDs:
    • The dynamic label must have the ID 'title'.
    • Dynamic plots will have an ID 'plot_<n>' where <n> is the plot index (starting at index 0) based on the order they were added in the Default Layout.
    • The graphic objects have an ID corresponding to their ID in the Default Layout.
    Some of the useful information and tools in the print layout are:
    • All plot items are listed in the 'Items' box and their corresponding ID. Items can be selected in this box to show their properties and allow users to edit them (they can also be selected in the print layout).
    Batch exporting maps 13a.png
    • Item properties can be edited using the Item Properties tab below the 'Items' box.
    Batch exporting maps 14a.png
    • Use the tool Interactively Edit Map Extent Interactively edit map extent icon 01a.png to edit the zoom and position of the map in the print layout.
    • When the map zoom and extents are adjusted the graphic objects will no longer be in the correct position, however that's ok because the next time either the preview is clicked or if the export maps tool is run, they will be placed in their correct position.
    • Use the tool Select / Move Item Select move item icon 01a.png to move and resize items in the print layout.
    • Use Add Item menu to add other custom items such as a north arrow or scale bar.
    Batch exporting maps 15a.png
  13. Save the print layout as a template (.qpt) via the menu Layout >> Save as Template.
    Batch exporting maps 16a.png
  14. Close the print layout.
  15. Select the Custom Layout radio button in the layout tab in the export animation dialog and browse the saved template file (.qpt).
    Batch exporting maps 17a.png
    Note that all the default layout items will be overridden with the Custom Layout except for the plots and dynamic text. The plot position and size from the custom layout template will be used, however the plot content will still be taken from the Default Layout. Likewise for the dynamic text, the text will be taken from the Default Layout.
  16. The Preview button can be used multiple times to check that the layout is correctly being imported from the template.
  17. Click Ok to run the tool and export the maps.



Up
Go-up.png Back to TUFLOW Viewer Main Page