Initialize Database
Summary
Initialize Database creates a project file geodatabase for a Gas High Tool analysis workflow at your specified file location. This is the first tool you run in any of the Gas HCA Tool workflows. Your project database has a pre-defined standard schema and is used to store all the data and process information generated by any of the Gas HCA Tool analyses.
Usage
The Initialize Database tool will automatically create the following tables within the specified file location:
- PROJECT_INFO: This table stores project name, project ID, and project creation date.
- ERROR: This table stores all non-catastrophic errors for any of the Gas HCA Tool processes. ERROR_TYPE identifies the error source, and ERROR_DESCRIPTION clarifies why the error was flagged. The Gas HCA Tool is built to be fault tolerant. In many cases, if an error occurs during processing, the input records causing the error are simply skipped (omitted from processing), with relevant information about the errant input records written to this table. The intent is to let you know what went wrong and which input records were not processed, so that you can correct the issue and process corrected versions of the errant records later.
- DEFAULT: This table records the default values the tools use for required input parameters in the event you do not provide them directly.
- SETTING: This table records the specific setting values that you supply for various tool input parameters.
- LOG: This table records processing information, including the date and time when major tool functions are completed. You may choose what level of logging to include (ERROR, DEBUG, or MESSAGE) in the LOG table. The Choose the Log Level parameter values stored in the SETTING table governs what to include in the log table. The default logging level is ERROR.
- The project database is saved at your specified file location. The database is in the Esri file geodatabase format. All the required input data, intermediate processing data and the final output data used or generated by the Gas HCA Tool is saved to the project database.
- Your Units for Calculations parameter will default to Feet. However, you have the option to select from either Feet or Meters.
- For the Number of Measure Decimal Places parameter, you should provide the desired number of places after the decimal for any floating point numeric values present in the project database. The default value is two decimal places.
- When specifying your choice in the Choose the Log Level parameter, you can select from three options:
-
- If you choose ERROR, only error messages are written to the LOG table. This is the default.
- If you choose MESSAGE, all normal processing and error messages are written to the LOG table.
- If you choose DEBUG, more detailed process and error messages are written to the LOG table. This may be helpful for debugging problems encountered by the Gas HCA Tool. This is the most verbose logging option.
-
- The Initialize Database tool provides you with four optional buffer tolerance parameters:
-
- Buffer Tolerance Value for Point Structures – You may use this parameter to provide an optional buffer tolerance distance for structure points. This is an additional distance you may use to the standard DOT defined buffer distances for structures (either the 660‑foot radius for DOT Class Location analysis, or the Potential Impact Radius (PIR) for HCA and Moderate Consequence Area (MCA) analysis). It is intended to allow you to account for the combined uncertainty in the location of both your pipeline centerlines and structure features. The value you enter assumes the same units you defined in the Units for Calculation parameter. This parameter applies to point structure features.
- Buffer Tolerance Value for Polygon Structures – This parameter is analogous to the above Buffer Tolerance Value for Structure Points parameter but applies instead to polygon structure features.
- Buffer Tolerance Value for Point Qualifying Areas – This parameter is analogous to the above Buffer Tolerance Value for Structure Points parameter but applies instead to DOT Class qualifying area/structure or HCA-MCA identified site point
- Buffer Tolerance Value for Polygon Qualifying Areas – This parameter is analogous to the above Buffer Tolerance Value for Structure Points parameter but applies instead to DOT Class qualifying area/structure or HCA-MCA identified site point features.
-
The next tool to run in all Gas HCA Tool workflows is the Copy Centerlines tool.
Syntax
InitializeDatabase_Tool_ (project_name, unit_for_calculation, number_of_measure_decimal_places, log_level, {buf_tolerance_value_for_structure_point}, {buf_tolerance_value_for_structure_polygon}, {buf_tolerance_value_for_qa_point}, {buf_tolerance_value_for_qa_polygon}, project_database)
Parameter | Explanation | Data Type |
project_name |
Dialog Reference Specify a project name. There is no Python reference for this parameter. |
String |
unit_for_calculation |
Dialog Reference Select the desired units for calculation. The default is Feet. There is no Python reference for this parameter. |
String |
number_of_measure_decimal_places |
Dialog Reference Specify the number of places after decimal on all numeric values. The default is 2. There is no Python reference for this parameter. |
Long |
log_level |
Dialog Reference Select the desired logging level for the LOG table. Refer to the tool usage section in this help topic for details on the logging level options. There is no Python reference for this parameter. |
String |
buf_tolerance_value_for_structure_ point(Optional) |
Dialog Reference Provide a buffer tolerance distance for structure points. Refer to the tool usage section in this help topic for details on specifying a buffer tolerance. There is no Python reference for this parameter. |
Long |
buf_tolerance_value_for_structure_ polygon(Optional) |
Dialog Reference Provide a buffer tolerance distance for structure polygons. Refer to the tool usage section in this help topic for details on specifying a buffer tolerance. There is no Python reference for this parameter. |
Long |
buf_tolerance_value_for_qa_point (Optional) |
Dialog Reference Provide a buffer tolerance distance for qualifying area points. Refer to the tool usage section in this help topic for details on specifying a buffer tolerance. There is no Python reference for this parameter. |
Long |
buf_tolerance_value_for_qa_polygon (Optional) |
Dialog Reference Provide a buffer tolerance distance for qualifying area polygons. Refer to the tool usage section in this help topic for details on specifying a buffer tolerance. There is no Python reference for this parameter. |
Long |
project_database |
Dialog Reference Browse to the folder where you want to create the project database and specify a name for your database. There is no Python reference for this parameter. |
Workspace |
Code sample
Initialize Database
import hcapy
arcpy.ImportToolbox(“C:/Workspace/hcapy/src/hcapy/esri/Toolboxes/Gas HCA Tools.pyt”)
project_name= “HCARun”
out_project_database = r”C:\Temp\HCA.gdb”
arcpy.InitializeDatabase_hcapy (project_name, project_database = out_project_database)
There is no description for this code sample.
Environments
Current Workspace, Scratch Workspace, Default Output Z Value, M Resolution, M Tolerance, Output M Domain, Output XY Domain, Output Z Domain, Output Coordinate System, Extent, Geographic Transformations, Output has M values, Output has Z values, XY Resolution, XY Tolerance, Z Resolution, Z Tolerance
Licensing information
This tool requires a valid Gas HCA Tool user license or subscription. Please see the Request License and Register License tool help topics for details on obtaining and registering a Gas HCA Tool software license.
Related topics
Tags
Initialize Database, HCA, Pipeline.
Credits
Copyright © 2016-2020 by G2 Integrated Solutions, LLC. All Rights Reserved.
Use limitations
There are no access and use limitations for this item.