Difference between revisions of "Staging Area Database"
Line 54: | Line 54: | ||
[[Image:Staging_Area_Model_Hazard.png|center|700px]] | [[Image:Staging_Area_Model_Hazard.png|center|700px]] | ||
+ | For more on column names in the Staging area, see [[Name Rules Staging Area]], and for post-processing, see [[Post Processing SQL Scripts]]. | ||
+ | |||
===Special table===__NOEDITSECTION__ | ===Special table===__NOEDITSECTION__ | ||
{| class="wikitable" width="1000'" | {| class="wikitable" width="1000'" | ||
Line 67: | Line 69: | ||
|- | |- | ||
|} | |} | ||
+ | |||
+ | ==Geographical data in the IMSMA staging area==__NOEDITSECTION__ | ||
+ | {{Under construction| This section is under construction}} | ||
+ | When polygon/polyline is linked with the main object the properties from the main object applies to the entire object. This also applies to calculated area and length e.g. if Land-35 has three polygons with (total) calculated area 200 m2 then 200 is repeated on the three polygon rows. | ||
+ | |||
===Point, Polyline and Polygon tables===__NOEDITSECTION__ | ===Point, Polyline and Polygon tables===__NOEDITSECTION__ | ||
If the option of generating geodata has been chosen on the [[Staging Area Generator]] interface, then three related tables with geodata are generated for every main object/table (ACCIDENT, VICTIM, QM, HAZARD (Land), etc.): | If the option of generating geodata has been chosen on the [[Staging Area Generator]] interface, then three related tables with geodata are generated for every main object/table (ACCIDENT, VICTIM, QM, HAZARD (Land), etc.): | ||
Line 82: | Line 89: | ||
A series of database views are pre-defined on the staging area, three for each object: <OBJECT>_POINT_VIEW, <OBJECT>_POLYGON_VIEW and <OBJECT>_POLYLINE_VIEW - where <OBJECT> is HAZARD, GAZETTEER, MRE, etc. - each object that potentially has associated geodata. Each view is defined as an '''INNER JOIN''' between the <OBJECT> table, e.g. HAZARD, and each of the three geodata tables. The inner join means that data from e.g. the HAZARD table that has '''no''' polygon associated will not be found in the HAZARD_POLYGON_VIEW. Depending on the use case, either the tables or the views can be accessed. | A series of database views are pre-defined on the staging area, three for each object: <OBJECT>_POINT_VIEW, <OBJECT>_POLYGON_VIEW and <OBJECT>_POLYLINE_VIEW - where <OBJECT> is HAZARD, GAZETTEER, MRE, etc. - each object that potentially has associated geodata. Each view is defined as an '''INNER JOIN''' between the <OBJECT> table, e.g. HAZARD, and each of the three geodata tables. The inner join means that data from e.g. the HAZARD table that has '''no''' polygon associated will not be found in the HAZARD_POLYGON_VIEW. Depending on the use case, either the tables or the views can be accessed. | ||
− | + | ||
− | |||
− | |||
{{NavBox Business Intelligence}} | {{NavBox Business Intelligence}} | ||
[[Category:VIE]] | [[Category:VIE]] |
Revision as of 09:03, 9 July 2015
Structure of the IMSMA Staging Area
Flattening principles
This section requires basic knowledge of the IMSMANG database table structure. |
Database model
A simplified IMSMA staging area database model for the Land (Hazard) object is depicted below. For all the other main objects, the model looks very similar.
For more on column names in the Staging area, see Name Rules Staging Area, and for post-processing, see Post Processing SQL Scripts.
Special table
Table name | Description |
ETLHISTORY | This table is the only one that does never get dropped from the staging area, but persists as the database is re-generated again and again (see Staging Area Generator). It contains information about all the staging area generations on a specific database (i.e. for example when a staging area database with the same name is generated regularly, e.g. once per day or week). It has two columns:
Having x rows in this table means that the database has been generated x times, and allows to keep a history of the individual runs. It also allows to determine how old the information in the staging area is, by looking at latest timestamp. |
Geographical data in the IMSMA staging area
This section is under construction |
When polygon/polyline is linked with the main object the properties from the main object applies to the entire object. This also applies to calculated area and length e.g. if Land-35 has three polygons with (total) calculated area 200 m2 then 200 is repeated on the three polygon rows.
Point, Polyline and Polygon tables
If the option of generating geodata has been chosen on the Staging Area Generator interface, then three related tables with geodata are generated for every main object/table (ACCIDENT, VICTIM, QM, HAZARD (Land), etc.):
- <OBJECT>_POINT: contains all the data related to points defined on the object, with the following main information:
- point_type: e.g. Benchmark, Landmark, Turning Point (all points making up a polygon are also recorded in this table)
- lat: latitude
- lon: longitude
- coordinate_reference_system: e.g. "WGS 1984"
- coordinate_format: e.g. "Decimal Degrees"
- shape: PostGIS-representation of the shape that can be accessed with a PostGIS query
- <OBJECT>_POLYLINE: contains all the data related to polylines defined on the object. The individual points making up the polyline are stored in the <OBJECT>_POINT table, but the polyline object is additionally stored in the <OBJECT>_POLYLINE table. The main column is shape, a PostGIS-representation of the shape that can be accessed with a PostGIS query.
- <OBJECT>_POLYGON: similar to <OBJECT>_POLYLINE, but for polygon objects.
Views
A series of database views are pre-defined on the staging area, three for each object: <OBJECT>_POINT_VIEW, <OBJECT>_POLYGON_VIEW and <OBJECT>_POLYLINE_VIEW - where <OBJECT> is HAZARD, GAZETTEER, MRE, etc. - each object that potentially has associated geodata. Each view is defined as an INNER JOIN between the <OBJECT> table, e.g. HAZARD, and each of the three geodata tables. The inner join means that data from e.g. the HAZARD table that has no polygon associated will not be found in the HAZARD_POLYGON_VIEW. Depending on the use case, either the tables or the views can be accessed.
|