New Release Workshop 2022 - Screen Recordings for new GIS formats

From Tuflow
Jump to navigation Jump to search


This page contains links and descriptions of screen recordings presented at the 2022 TUFLOW New Release Workshop in London (specifically the screen recordings that were presented as part of the new GIS formats session). These videos do not contain any embedded commentary as this was done live during the workshop by the presenter.

GeoTIFF

Video 01 - Converting a Model to GeoTIFF

01_GeoTIFF - Converting a Model to TIF

This video demonstrates how to convert an existing TUFLOW model into one that uses GeoTIFF as both input and output. This video shows how to:

  • Convert an ASC raster into a compressed GeoTIFF using QGIS. The method used ensures the output data contains 32 bit floating point data.
  • Update the TUFLOW model control files to use the converted GeoTIFF input and change the gridded output to GeoTIFF format.
  • Identify the GeoTIFF compression method in QGIS by viewing the layer properties.
  • Change the TUFLOW ouput GeoTIFF compression method
  • Other items to note:
    • QGIS is assigning a default projection of the TUFLOW output GeoTIFFs (based on settings in QGIS). This is because TUFLOW will not assign a projection by default to any output GeoTIFFs.

Video 02 - Adding a Projection to Output GeoTIFF

02_GeoTIFF - Adding projection for output TIF

This video demonstrates how to add a projection to the output GeoTIFFs. This video shows how to:

  • Add a command in the TCF to set a projection for output GeoTIFFs by using a GeoTIFF that does have a projection
  • Other items to note:
    • TUFLOW will only read the header information of a GeoTIFF being used to set a projection
    • TUFLOW will not perform a projection check (like it does for input vector layers) on input GeoTIFFs
    • The Coordinate Reference System (CRS) properties within QGIS for GeoTIFF will be populated regardless of whether a GeoTIFF has a projection or not

Video 03 - Checking GeoTIFF Header Info

03_GeoTIFF - Checking GeoTIFF header info

This video demonstrates how to use a utility within OSGeo4W to print the header information of a GeoTIFF file. This video shows how to:

  • Open the OSGeo4W shell
  • Print a list of available functions using "o-help"
  • Use the "listgeo" utility to obtain header information from a GeoTIFF
listgeo /path/to/geotiff.tif
  • Other items to note:
    • Information on the projection system will typically only be present if the GeoTIFF has a projection
    • "ModelTiePointTag" is typically the top left corner of the gridded dataset (but not always) and this is also where transformation information is kept if the GeoTIFF is a rotated grid
    • "ModelPixelScaleTag" is the dx and dy (cell size) values of the gridded dataset



GeoPackage

Video 04 - Loading a Large Shape File

04_GPKG - Loading large SHP file

This video demonstrates the speed and useability of a SHP file in QGIS. The SHP file is a point dataset containing approximately 46.5 million features. This video should be watched in tandem with, and compared to, Video 05.

Video 05 - Loading Large GPKG File

05_GPKG - Loading large GPKG file

This video demonstrates the speed and useability of a GPKG file in QGIS. The GPKG file is a point dataset containing approximately 46.5 million features. This video should be watched in tandem with, and compared to, Video 04.

Video 06 - Opening and Editing GPKG in Mapinfo Pro

06_GPKG - Opening and editing in Mapinfo Pro

This video demonstrates how to load GPKG layers into Mapinfo Pro. This video shows how to:

  • Open a GPKG database in Mapinfo and select which layers should be loaded
  • Make edits (and save them) to a GPKG layer
  • How to open a GPKG in QGIS
  • Other items to note:
    • Mapinfo will create a TAB file for each GPKG layer that it loads
    • The TAB file that Mapinfo creates for each GPKG layer does not contain any geometry or attribute information, and only stores connection information. Any edits made in Mapinfo, are made directly to the GPKG file and it is safe to delete the TAB files if desired (as long as they aren't open in Mapinfo).

Video 07 - Converting a Model GIS Format to GPKG

07_GPKG - Converting model GIS format to GPKG

This video demonstrates how to convert an existing TUFLOW model to GPKG i.e. converting all inputs to GPKG and referencing them correctly in the TUFLOW control file. This video shows how to:

  • Convert a TUFLOW model inputs from SHP to GPKG using the 'Convert TUFLOW Model GIS Format' tool in QGIS
  • Change the ouput grouping of GIS files when using the GPKG format so they are written to common databases
  • Other items to note:
    • WAL/SHM files will be created if TUFLOW (or QGIS) is writing to the GPKG. These are used to manage multiple applications accessing the same database as well as speed up transactions. The WAL (write ahead log) is particularly important and shouldn't be deleted manually as it can contain information that hasn't been transferred to the main database yet. These files should automatically be cleaned up by SQLite once the last application closes the database. If they are persisting (which can happen if one application accessing it crashes) then the best way to get rid of them is to open the database in SQLite (via OSGeo4W) and making a single SQL query and then closing the database. Alternatively opening and then closing any layer within the GPKG in QGIS will also work.

Video 08 - Incrementing and Importing an Empty GPKG

08_GPKG - Incrementing and importing empty GPKG

This video demonstrates the workflow of incrementing and importing new layers using GPKG in QGIS. This video shows how to:

  • Increment a GPKG layer while retaining the other layers in the database
  • Importing a new empty GPKG layer and saving it into an existing grouped database
  • Updating the TUFLOW control files with the changes
  • Other items to note:
    • When a database is incremented (run_001.gpkg -> run_002.gpkg), each layer that is either incremented or retained in the new database is updated within the QGIS workspace

Video 09 - Managing and Renaming GPKG Layers

09_GPKG - Managing and renaming GPKG layers

This video demonstrates how to manage GPKG layers within QGIS. This video shows how to:

  • Connect to a GPKG database in the browser panel in QGIS (navigating to the database location through the file directory also works)
  • Rename a layer within the GPKG database

Video 10 - Scrambling GPKG with SQLite - DON'T DO THIS!

10_GPKG - Scrambling GPKG with SQLite - DONT DO THIS

This video demonstrates what you should not do to rename layers within a GPKG (using SQLite to manage layer names). Although it is possible to do this via SQLite, it is not recommended unless you are familiar with SQLite and the GPKG format specification. This video shows:

  • What happens when a table is manually renamed using SQLite
  • Important to note that if you do run into this situation the best thing to do is to try and unwind the changes using SQLite. Trying to fix the names by then using the QGIS browser may further scramble things.

Video 11 - Plugin to Manage GPKG

11_GPKG - Plugin to manage GPKG

This video demonstrates how to manage GPKG layers using the 'File Management' plugin which is not currently publicly available (however will be released soon). This video shows how to:

  • Use the File Management plugin to rename layers within a GPKG database
  • Use the File Management plugin to rename the GPKG database within QGIS
  • Other items to note:
    • The File Management plugin also works for SHP / MIF / TAB layers

Video 12 - Kart Example

12_GPKG - Kart example

This video demonstrates the use of 'Kart' to version control and manage workflow of a centralised GPKG database. This video shows how to:

  • Setup a Kart repository
kart init --import /path/to/existing/gpkg /out/database/name
  • Check the status of a repository (has there been any changes?)
kart status
  • Print the difference between the changes and the last commit
kart diff
  • Undo any staged changes (changes that have not been committed yet)
kart reset --discard-changes
  • Commit changes
kart commit -m "<commit-message>"
  • Check the commit history
kart log
  • Checkout a previous commit (undo all changes up to a previous commit - this does not delete all changes, merely going back to a previous commit)
kart checkout <commit-id>
  • Merge branches (branch id could be a commit id)
kart merge <branch-id-to-merge>
  • kart documentation:
https://docs.kartproject.org/en/latest/pages/quick_guide.html

Video 13 - Geodiff Example

13_GPKG - Geodiff example

This video demonstrates how to use Geodiff to compare the differences between two GPKG databases (a 'base' database and a 'working copy' database that has been changed from the 'base' database). This video shows how to:

  • check the difference between two GPKG databases
geodiff diff --json <base.gpkg> <changed.gpkg>
  • create a diff file (can be used later to apply changes from the 'working copy' onto the 'base' database)
geodiff diff <base.gpkg> <changed.gpkg> <diff-out.diff>
  • merge (or rebase) one set of changes onto another so both changes can be safely applied to the 'base' database
geodiff rebase-diff <base.gpkg> <diff-to-be-rebased.diff> <diff-rebased-with.diff> <diff-out.diff> conflict
  • apply changes to the 'base' database
geodiff apply <base.gpkg> <diff-to-be-applied.diff>
  • undo changes by inverting difference file
geodiff invert <diff-in.diff> <diff-inverted.diff>
geodiff apply <base.gpkg> <diff-inverted.diff>
  • geodiff documentation
https://github.com/MerginMaps/geodiff