Difference between revisions of "GPKG Time Series Format Specification"

From Tuflow
Jump to navigation Jump to search
(Created page with "The below section lists the TUFLOW GPKG time series format specification. The specification sits ontop of the <b><u>[https://www.geopackage.org/spec120/index.html GPKG v1.2 Sp...")
 
Line 2: Line 2:
  
 
===GIS Layers===
 
===GIS Layers===
The results are stored in GPKG layers, typically between 1 - 3 layers are stored in the result file depending on the output (one for point results, one for line results, one for polygon results). However there is no requirement against storing results from multiple model runs in a single GPKG, this is just not typically how outputs are written.  
+
The results are stored in GPKG layers, typically between 1 - 3 layers are stored in the result file depending on the output (one for point results, one for line results, one for polygon results). However there is no requirement against storing results from multiple model runs in a single GPKG, this is just not typically how outputs are written.<Br>
 
+
The column names of the GPKG layers should follow the convention below:<br>
'''Requirement 1'''
+
{| class="wikitable" style="width:40%"
The GPKG layers should have the following columns:
+
! style="background-color:#005581; font-weight:bold; color:white;" width=20%| Column Name
In this example the GIS layers are <code>M06_5m_003_swmm_ts_L</code> and <code>M06_5m_003_swmm_ts_P</code>.
+
! style="background-color:#005581; font-weight:bold; color:white;" width=20%| Type
 +
! style="background-color:#005581; font-weight:bold; color:white;" width=60%| Description
 +
|-
 +
|fid||INTEGER||Primary key
 +
|-
 +
|geometry||GEOMETRY||GeoPackage Geometry
 +
|-
 +
|ID||TEXT||Element ID (e.g. Pipe1)
 +
|-
 +
|Type||TEXT||Element Type (e.g. CONDUIT)
 +
|-
 +
|Source||TEXT||Result Source (e.g. SWMM)
 +
|-
 +
|TimeId||INTEGER||Unique id for each timestep
 +
|-
 +
|Time_hours||FLOAT||Output time in hours
 +
|-
 +
|Datetime||DATETIME||Output time in datetime
 +
|-
 +
|colspan="3"|...[column for each result type - examples below]
 +
|-
 +
|Flow||FLOAT||Result flow
 +
|-
 +
|Velocity||FLOAT||Result velocity
 +
|-
 +
|}

Revision as of 02:19, 10 November 2023

The below section lists the TUFLOW GPKG time series format specification. The specification sits ontop of the GPKG v1.2 Specification with two additional required tables. The below lists the details of the additional tables with examples. The examples are based a the TUFLOW-SWMM linked example model based on TUFLOW's module 6 tutorial model - M06_5m_003.tcf.

GIS Layers

The results are stored in GPKG layers, typically between 1 - 3 layers are stored in the result file depending on the output (one for point results, one for line results, one for polygon results). However there is no requirement against storing results from multiple model runs in a single GPKG, this is just not typically how outputs are written.
The column names of the GPKG layers should follow the convention below:

Column Name Type Description
fid INTEGER Primary key
geometry GEOMETRY GeoPackage Geometry
ID TEXT Element ID (e.g. Pipe1)
Type TEXT Element Type (e.g. CONDUIT)
Source TEXT Result Source (e.g. SWMM)
TimeId INTEGER Unique id for each timestep
Time_hours FLOAT Output time in hours
Datetime DATETIME Output time in datetime
...[column for each result type - examples below]
Flow FLOAT Result flow
Velocity FLOAT Result velocity