TUFLOW Setup with Kart QGIS Plugin: Difference between revisions

Content deleted Content added
 
(4 intermediate revisions by the same user not shown)
Line 10:
All of these are useful from a quality assurance perspective, allowing a history of the development of a TUFLOW model geometry files to be understood and analysed. Kart is very easy to use once it is set up. The set up of Kart to be used with TUFLOW is a little cumbersome but the steps below provide information of how to set up the Kart QGIS Plugin, set up the TUFLOW folders and initialise the Kart repository.
 
== InstallInstalling the Kart Plugin ==
The first step is to install the Kart QGIS plugin. This is done using the '''Manage and Install Plugins''' tool within QGIS. Search for Kart and install the plugin.
 
Line 19:
[[File:Kart Repository.png|thumb|Initial Kart Repository|alt=|none|465x465px]]
 
== SetSetting up the TUFLOW Model and Initialise Kart Repository ==
With Kart set up, we can now move towards setting up your TUFLOW model. To use Kart, you would need to be using a Geopackage GIS Format. We will start at the beginning of a TUFLOW model build but it would be possible to set up kart with an existing model with a similar workflow. However, in this instance, commits and changes would only be tracked for edits to the geometry data after the TUFLOW model is initialised within a Kart folder.
 
Line 25:
 
With the TUFLOW folders set up, there is now some fiddly steps to go through so that we can set up a Kart repository. This is because a Kart repository can only be set up for an empty folder but our GIS folder has an empty folder and a geopackage in it already. We also want to initialise Kart using the TUFLOW model name rather than have a geopackage called gis, which is based on the GIS folder. The below steps are one way to get address these and provide a neat GIS folder, with a geopackage name that matches the model, which is initialised as a Kart repository.
[[File:GIS Folder.png|none|thumb|300x300px390x390px|The Desired TUFLOW GIS Folder Initialised as a Kart Repository|alt=]]
 
 
Line 31:
 
* Cut and paste the '''empty''' folder and the model Geopackage file from the '''TUFLOW\Model\GIS''' folder to TUFLOW\Model. This is because Kart can not initialise a repository if the folder is not empty.
* Rename the '<nowiki/>'''GIS'''<nowiki/>' folder to ''''*Model_Name*'''<nowiki/>' where '*Model_Name*' is the same as your Geopackage name.
 
* Use the Kart Create new repository tool to create a new Kart repository.
Line 78:
 
== Using Remote Repositories ==
The above steps are for a local Kart repository. However, it is possible to use Kart with remote repositories. This isallows doneaccess byfrom cloningmultiple amachines remoteas repository on Gitlab/Github or similar. Once a repository is cloned, changes can be push/pulled to and fromwell theas remotemultiple repositoryusers.
 
[[File:Remote repository.png|none|Kart Push/Pull Functions to Remote Repository|alt=|thumb|400x400px]]It should be noted that the TUFLOW team have not made sufficient use of Kart with remote repository so cannot suggest that it is a recommended approach.
This can be done by cloning a remote respository on Gitlab/Github or similar or pushing the local repository to Gitlab/Github or similar.
 
To do push a local repository to Gitlab or Github, firstly create the remote repository in Gitlab/Github.  Don’t initialise the project with a readme file as this can cause issues.  Once set up, got to the Kart plugin within QGIS, navigate to the local repository you would like to upload and right click on the repository and choose to ‘push’ changes. 
[[File:Kart Push.png|none|thumb|400x400px]]
Choose to ‘Manage remotes’. Within the resulting dialogue, add the remote name and URL.  It is recommended to use SSH Keys for authentication. When using SSH keys the form of the url would be git@gitlab.com: 'username' 'git repository.git' where username would be your own Gitlab user name and the git repository would be the remote repository ID.
[[File:Kart Manage Remotes.png|none|thumb|400x400px]]
 
 
Choose Add New/Save to save the options.  In the next dialogue, select OK.  If the permissions are set up correctly, the repository should be pushed to the remote repository and a message will pop up within QGIS indicating success.
 
An example of the TUFLOW Tutorial Geopackage dataset from modules 1 and 2, is available from the [https://gitlab.com/tuflow-user-group TUFLOW Gitlab User Group] at following location: https://gitlab.com/tuflow-user-group/third-party-tools/other/tuflow_tutorial_model_kart.
 
This can be cloned using Kart by selecting Clone Repository.
[[File:Kart CLone.png|none|thumb|400x400px]]
 
 
If using SSH keys the URL for the repository would be: git@gitlab.com: tuflow-user-group/third-party-tools/other/tuflow_tutorial_model_kart.git. Choose a suitable location to save the repository locally.
[[File:Kart CLone 2.png|none|thumb|400x400px]]
The repository will then appear within Kart in the list of repositories and can be interrogated with the above tools. A remote repository can also allow multi-user editing, providing the opportunity for conflicts which can be dealt with. See the [https://docs.kartproject.org/en/latest/ Kart documentation] for more details.
 
{{Tips Navigation