Initialize Database
Summary
Initialize Database creates a project file geodatabase for a Liquids HCA Tool analysis workflow at your specified file location, along with predefined processing data tables. This is the first tool you run in any of the Liquids HCA Tool workflows.
To learn more about the Liquids HCA Tool in general, please see Liquids HCA Tool Frequently Asked Questions.
To learn more about the structure of the Liquids HCA Tool project geodatabase, please see the Liquids HCA Tool Data Dictionary.
Usage
In addition to creating the basic schema for a Liquids HCA Tool project geodatabase, Initialize Database copies the centerline route features you are analyzing into the project geodatabase. The copied centerline route features are stored in the ROUTES feature class in the Liquids HCA Tool project geodatabase. The ROUTES feature class defines the linear referencing backbone upon which all Liquids HCA Tool calculations are performed. All Liquids HCA Tool point and linear outputs incorporate Measure, or BeginMeasure and EndMeasure attributes, respectively, derived from their underlying centerline route features. Because of this, many of the Liquids HCA Tool workflows use the ROUTES feature class.
The centerline route features that you supply as input to Initialize Database should consist of the continuous, non-branching runs of pipe on which you desire to perform calculations. Typically, your input centerline route features correspond to named pipeline segments. Under the Pipeline Open Data Standard (PODS) nomenclature, your centerline features should consist of PODS Route features. Under Esri Utility and Pipeline Data Model (UPDM) nomenclature, your centerline features should consist of UPDM Continuous Network features. One or more centerline route features may be grouped together to comprise a line. The ROUTES feature class stores centerline route features as m-aware polylines, with the m-values at the vertices in a ROUTES feature, defining the linear referencing system of measurement along the ROUTES feature. Your input centerline route features may be either simple polylines or m-aware polylines. If you input m-aware polylines, existing m-values are preserved. If you input simple polylines, m-values are created in the output ROUTES features by linearly interpolating m-values along your centerline route features in the direction of digitization between the BeginMeasure and EndMeasure values defined by your input Route Begin Measure and Route End Measure fields.
Initialize Database requires that some attribution be present in your input route features, as specified below. Beyond these few required data attributes, remaining attribution in your input route features is copied to the output ROUTES feature class as-is.
- Input Route Features – Your input centerline route features must contain the following attribution (your field names need not match, but fields containing this information must be present):
- Route Identifier Field – A field that uniquely identifies each centerline route feature. Your route identifier field is preserved in the ORIGINAL_ROUTE_ID field in the output copied centerline route features. The tool generates a new route unique identifier field, ROUTE_ID, that is used to identify centerline route features in all subsequent calculations.
- Route Name Field – A field that stores the human-readable name or description for your centerline route features. Your route name values are preserved in the copied centerline route features in the ROUTE_DESC field.
- Route Begin Measure Field – A field that defines the begin measure values of your centerline route features. Your begin measure values are preserved in the copied centerline route features in the FROM_MEAS field.
- Route End Measure Field – A field that defines the end measure values of your centerline route features. Your end measure values are preserved in the copied centerline route features in the TO_MEAS field.
Initialize Database creates the following:
- Output Project Database – This is the destination location for your output Liquids HCA Tool project geodatabase.
- Output Global Inputs Table – The tool generates a table named, by default, GLOBAL_INPUTS in the output project geodatabase schema. This table stores vital attribution used by other tools in the Liquids HCA Analysis workflow. There is generally no reason to change the default name of the table.
- Output HCA Intersection Methods Lookup Table – The tool generates a lookup table named, by default, HCA_INTERSECTIONS_METHOD_LOOKUP in the output project geodatabase schema. This table stores the different ways by which a release plume may intersect an HCA (e.g., direct centerline intersection, direct overland plume intersection, direct hydrographic transport intersection) and combinations of these intersection types. There is generally no reason to change the default name of the table.
- Output HCA Group Lookup Table – The tool generates a lookup table named, by default, HCA_GROUP_LOOKUP in the output project geodatabase schema. This table stores the different types of HCAs, and combinations of HCA types (HCA groups). There is generally no reason to change the default name of the table.
- Output HCA Could Affect Segments Definition Table – The tool generates a lookup table named, by default, HCA_CA_SEGMENTS_DEF in the output project geodatabase schema. This table stores combinations of values from the intersection methods and HCA group lookup tables to arrive at different types of ‘could affect’ segment definitions. While it is true that any type of intersection with any type of HCA results in a ‘could affect’ segment, it is often useful to define subtypes of ‘could affect’ segments to better understand release consequence as it pertains to risk analysis. The purpose of the ‘could affect’ segment definition table is to provide a repository for definitions of different subtypes of ‘could affect’ segments. There is generally no reason to change the default name of the table.
- Output NHD HUC Velocity Table – The tool generates a data table named, by default, HydroHUC4SubRegionsVelocity in the output project geodatabase schema. This table stores historic stream velocity statistics derived from the National Water Information System (NWIS) historic stream gauge data aggregated at the National Hydrology Dataset (NHD) Hydrologic Unit Code (HUC) level 4 (subregion) watersheds. Although the NHDPlus High Resolution dataset used by the Liquids HCA Tool contains stream velocity data for individual hydrologic reaches in most areas, coverage is not ubiquitous. In areas where NHDPlus stream velocity data is missing, the stream velocity value from the underlying HUC-4 watershed from this table is used. There is generally no reason to change the default name of the table.
- Output Product Properties Table – The tool generates a table named, by default, PRODUCT_PROPERTIES_LOOKUP in the output project geodatabase schema. This table stores physical product properties data for a variety of crude oils and refined products. (See: Fingas, Merv. (2011). Oil and Petroleum Evaporation. J. Pet. Sci. Res. 2. 426-459. 10.1002/9781118989982.ch7 and “Physiochemical properties of petroleum products.” canada,ca. Environment and Climate Change Canada, 24 May 2017. Web. 1 June 2020.) When you select one of the products in this table in the Enter Global Input Data tool, relevant product properties data is used to support drain rate calculations for release points, overland spread simulation, and evaporation loss calculations for the release plume during overland spread and hydrographic transport.
- Output Route Features – The tool generates a polyline-m feature class named, by default, ROUTES in the output project geodatabase schema to store your copied centerline route features. There is generally no reason to change the default name of the feature class.
In a typical Liquids HCA Tool analysis workflow, Import Global Input Data or Enter Global Input Data is run after Initialize Database.
For visual reference on Liquids HCA Tool execution order, see Liquids HCA Tool Process Flow Diagrams.
Syntax
InitializeDatabase (in_route_features, in_route_id_field, in_route_name_field, in_route_fm_field, in_route_tm_field, out_workspace, out_global_inputs, out_hca_int_method_lookup, out_hca_group_lookup, out_hca_ca_seg_def, out_nhd_huc_vel, out_prod_properties, out_route_feature_class)
Parameter | Explanation | Data Type |
n_route_features |
Dialog Reference Specify your input centerline route features. There is no Python reference for this parameter. |
Feature Layer |
in_route_id_field |
Dialog Reference Specify the field that uniquely identifies each of your input centerline route features. There is no Python reference for this parameter. |
Field |
in_route_name_field |
Dialog Reference Specify the field that stores the name or description of your input centerline route features. There is no Python reference for this parameter. |
Field |
in_route_fm_field |
Dialog Reference Specify the field that stores the begin measure values your input centerline route features. There is no Python reference for this parameter. |
Field |
in_route_tm_field |
Dialog Reference Specify the field that stores the end measure values your input centerline route features. There is no Python reference for this parameter. |
Field |
out_workspace |
Dialog Reference Specify the destination and name of your output Liquids HCA project geodatabase. There is no Python reference for this parameter. |
Workspace |
out_global_inputs |
Dialog Reference Specify the name of the output global inputs table in the output project geodatabase. There is no Python reference for this parameter. |
Table |
out_hca_int_method_lookup |
Dialog Reference Specify the name of the output HCA intersection methods lookup table in the output project geodatabase. There is no Python reference for this parameter. |
Table |
out_hca_group_lookup |
Dialog Reference Specify the name of the output HCA/HCA group type lookup table in the output project geodatabase. There is no Python reference for this parameter. |
Table |
out_hca_ca_seg_def |
Dialog Reference Specify the name of the output HCA could affect segment definitions lookup table in the output project geodatabase. There is no Python reference for this parameter. |
Table |
out_nhd_huc_vel |
Dialog Reference Specify the name of the output NHD HUC-4 stream velocity statistics data table in the output project geodatabase. There is no Python reference for this parameter. |
Table |
out_prod_properties |
Dialog Reference Specify the name of the output product properties lookup table in the output project geodatabase. There is no Python reference for this parameter. |
Table |
out_route_feature_class |
Dialog Reference Specify the name of the output copied centerline routes feature class in the output project geodatabase. There is no Python reference for this parameter. |
Feature Class |
Code sample
The following script demonstrates how to use Initialize Database with file geodatabase data:
import arcpy
arcpy.ImportToolbox(r”C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\liquidshca\esri\toolboxes\LiquidsHCA.pyt”)
route_features = “Centerlines”
route_id_field = “ROUTE_ID”
route_name_field = “ROUTE_DESC”
route_fm_field = “FROM_MEAS”
route_tm_field = “TO_MEAS”
out_prj_database = r”C:\data\test.gdb”
global_inputs = r”C:\data\test.gdb\GLOBAL_INPUTS”
hca_int_method_lookup = r”C:\data\test.gdb\HCA_INTERSECTIONS_METHOD_LOOKUP”
hca_group_lookup = r”C:\data\test.gdb\HCA_GROUP_LOOKUP”
hca_ca_seg_def = r”C:\data\test.gdb\HCA_CA_SEGMENTS_DEF”
nhd_huc4_vel = r”C:\data\test.gdb\HydroHUC4SubRegionsVelocity”
out_prod_properties = r”C:\data\test.gdb\PRODUCT_PROPERTIES_LOOKUP”
out_rotues = r”C:\temp\test13.gdb\ROUTES”
arcpy.liquidshca.InitializeDatabase(route_features, route_id_field, route_line_id_field, route_fm_field, route_tm_field, out_prj_database, global_inputs, hca_int_method_lookup, hca_group_lookup, hca_ca_seg_def, nhd_huc4_vel, out_prod_properties, out_rotues)
Environments
Current Workspace, Scratch Workspace, Output Coordinate System, Extent, Geographic Transformations, XY Resolution, XY Tolerance, Output has M values, M Resolution, M Tolerance, Output has Z values, Default Output Z Value, Z Resolution, Z Tolerance, Qualified Field Names, Output CONFIG Keyword, Maintain Attachments, Auto Commit, Output XY Domain, Output M Domain, Output Z Domain, Transfer Field Domain Descriptions, Preserve Global IDs
Licensing information
This tool requires a valid Liquids HCA Tool user license or subscription. Please see the Request License and Register License tool help topics for details on obtaining and registering a Liquids HCA Tool software license.
Related topics
- An overview of the Liquids HCA Tool toolbox
- Liquids HCA Tool Data Dictionary
- Import Global Input Data
- Enter Global Input Data
Tags
Pipeline, hazardous liquids, high consequence area, HCA, high population area, HPA, other populated area, OPA, ecologically sensitive area, ESA, drinking water area, DWA, commercially navigable waterway, CNW, could affect.
Credits
Copyright © 2003-2020 by G2 Integrated Solutions, LLC. All Rights Reserved.
Use limitations
There are no access and use limitations for this item.