GeoPackage Tips: Difference between revisions

Content deleted Content added
No edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 5:
*Supports spatial indexing, greatly reducing loading and viewing times, making it much faster to work within GIS packages.
*Faster to write from TUFLOW than the shapefile format.
For more information, seerefer to Section 4.4.3 of the <u>[https://wwwdocs.tuflow.com/downloads/tuflow-classichpcclassic-archivehpc/manual/latest/#2023 2023 ReleaseTUFLOW NotesManual]</u>.
 
= Database Organisation =
There are many ways to organise model inputs when using GPKG. This allows modellers to decide how they structure their inputs files, for example some options include:
*singleSingle database for an entire project
*separateSeparate database for each control file (e.g. geometry, boundary control file)
*separateSeparate database for an existing or developed case
*separateSeparate databases for each type of input (e.g. elevation, materials, culverts)
 
== Referencing a GeoPackage Database ==
Line 35:
<li>To specify a table in a GPKG, use ">>":<br>
<font color="blue"><tt>Read GIS Z Shape </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_zsh.gpkg >> 2d_zsh_L </tt><br>
<li>To specify more than one table in a GPKG in the same command line, use "|". The database has to be referencereferenced for all the tables. <br>
<font color="blue"><tt>Read GIS Z Shape </tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>gis\2d_zsh.gpkg >> 2d_zsh_L | gis\2d_zsh.gpkg >> 2d_zsh_P </tt><br>
<li>To specify more than one table in a GPKG in the same command line, use "&&". This is similar to "|", however there is no need to reference the database again. <br>
Line 63:
Result and check file vector outputs can be written into separate databases or grouped, with 'grouped' being the default. Grouped databases will group by output folder location, for example, the check file folder will contain one GPKG Database that contains all check file layers within it. Separate databases will group geometries together, for example, PLOT_P, PLOT_L, PLOT_R will be written to one database. The following command can be used to set the output to either separate or grouped: <br>
<font color="blue"><tt>Spatial Database Output</tt></font> <font color="red"><tt>== </tt></font> <font color="black"><tt>SEPARATE | {GROUPED} </tt></font> <br><br>
This is a huge benefit in terms of file organisation. The below shows athe TUFLOW 'Check' folder from a model using the GPKG (grouped) and a model using the GPKG separate. The same 'Check' folder for a model using Shapefile would have 44(!) items in it. <br><br>
*Grouped:
{{Video|name=GPKG_Tips_CheckFiles_aAnimation_Outputs_grouped.mp4|width=1000}}<br>
*Separate (grouped geometries):
{{Video|name=Animation_Outputs_separate.mp4|width=1000}}<br>
 
= QGIS Tips & Tricks =
Line 105 ⟶ 108:
<li>Move a layer from one GPKG to another.<br>
<br>
{{Video|name=browser_panel_move_layer_abrowser_panel_move_layer_b.mp4|width=1000}}
<br>
<li>Move a shapefile into a GPKG. QGIS automatically converts it to a GPKG layer.<br>
Line 134 ⟶ 137:
<li>In the 'Spatial Database Options' section, there are the following options:
<ol>
<li>'''Convert to GPKG'''. This will convertconverts the imported format to a GPKG even if the empty file format is not a GPKG. The video below shows it being used for the 'separateSeparate' option, however it can be toggled on for any of the export options. <br>
<br>
{{Video|name=Animation_import_layer_convert.mp4|width=1000}}
Line 146 ⟶ 149:
{{Video|name=Animation_import_layer_group_geom.mp4|width=1000}}
<br>
<li>'''All to one:''' Adds the new files to a GPKG. It can be a preexistingnew or a newexisting GPKG.<br>
<br>
{{Video|name=Animation_import_layer_alltoone_preexisting.mp4|width=1000}}
Line 198 ⟶ 201:
<br>
For more information, see the <u>[[QGIS_TUFLOW_Apply_GPKG_Layer_Names| Updating a GPKG Layer Name]]</u>
=Tutorials=
Free TUFLOW tutorials using the GeoPackage format are availble via: <u>[[Tutorial Introduction|TUFLOW HPC Tutorials]]</u>