Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Esri GeoDatabase Template Code

IMPORTANT NOTE:

This version is deprecated with the v3.0 release and has not been tested.

Due to the reorganization of the repo, it is expected the example code WILL NOT run without repathing code references to new folder locations.


The material within this folder contains both a template Esri File Geodatabase (FGDB) that may be used directly, as a template, and a Python script with associated ArcGIS Toolboxes to generate a new FGDB either using ArcGIS Desktop or Esri Python libraries. The ArcGIS Toolboxes were used by the DS-GIS Template working group to generate the example FGDB.

The NENA GIS Data Model template is designed for organizations who utilize the Esri ArcGIS Platform but may also be modified by organizations for use in other GIS platforms.


Table of Contents


Folders and Files


Getting Started

Dependencies

  • Operating System: Windows 10 (or later)
  • GIS Software: ArcGIS 10.2 (or later) and/or ArcGIS Pro 2.x (or later)
  • GIS Software Licensing Level: Standard or Advanced

Note: While this script has been tested in versions of ArcGIS Desktop back to ArcGIS 10.2.x, there are some issues that have been documented. Please refer to Known Issues for additional information.

If you run into issues, run the script, please report a bug in the Issues, describe the issue that you had, screenshots are great, and please let us know the version and licensing level of ArcGIS Desktop you encountered the issue within.

Using the pre-built NG9-1-1 GIS Template

If only interested in the template FGDB itself, download and unzip NG911_GIS_Template.gdb.zip. This contains a pre-built NENA GIS Data Model template file geodatabase. The FGDB can be placed on the target machine and connected to using a suitable GIS application.

Using the ArcGIS Toolbox

If you are interested in creating the NENA GIS Data Model template from the supplied ArcGIS Toolboxes, follow the instructions appropriate to your version of ArcGIS Desktop.

NOTE: You must download the NENA_NG911_Toolbox.zip and unzip locally or download/clone the Git repository to your local computer before proceeding.

ArcGIS Desktop 10.x Instructions
  • From the Start menu, open ArcMap
  • Open ArcToolbox by going to Geoprocessing > ArcToolbox
  • When ArcToolbox opens, right-click in ArcToolbox and select Add Toolbox...
  • In the **Add Toolbox" file dialog, navigate to where the Git repository was downloaded, select NENA_NG911_Toolbox_for_ArcMap.tbx, and click Open.
  • In ArcToolbox, expand the NENA NG9-1-1 Toolbox
  • Double-click Create NG9-1-1 File Geodatabase (ArcMap) to run the geoprocessing tool.

ArcGIS Pro Instructions
  • From the Start menu, open ArcGIS Pro
  • Create a new project using the Catalog template
  • In the Catalog pane, right-click on Toolboxes and select Add Toolbox.
  • In the **Add Toolbox" file dialog, navigate to where the Git repository was downloaded, select NENA_NG911_Toolbox_for_ArcGIS_Pro.tbx, and click Open.
  • In ArcGIS Pro and double-click again on the NENA_NG911_Toolbox.tbx
  • Double-click Create NG9-1-1 File Geodatabase (ArcMap) to run the geoprocessing tool.

Create NG9-1-1 File Geodatabase Tool

The Create NG9-1-1 File Geodatabase tool uses the same input variables in both ArcGIS Desktop 10.8.x and ArcGIS Pro. In tests, it takes approximately seven to nine minutes to build out the complete file geodatabase.

  • Destination Folder - Select a destination folder for the creation of the file geodatabase.
  • File Geodatabase Name - The name of the output file geodatabase. A file type extension is not required and will be added automatically.
  • GDB Version - The version for the new geodatabase.
    • CURRENT - Creates a geodatabase compatible with the currently installed version of ArcGIS.
    • 10.0 - Creates a geodatabase compatible with ArcGIS version 10
  • Spatial Reference - The spatial reference of the output feature classes. The default is WGS 1984 per NENA-STA-006.2-2002.
  • Allow Overwrite - Allows existing file geodatabase in the destination folder to be overwritten if checked.
  • Primary Service Boundaries Only - Create only the primary Service Boundaries (PsapPolygon, FirePolygon, PolicePolygon, and EmsPolygon) or all Service Boundaries.
  • Import Metadata - Enables (checked) or disables (un-checked) the default file geodatabase metadata.

To monitor the progress in ArcGIS Pro, Click Run to run the script. Click View Details to see the progress details.

Modifying the Python Script Schema

The schema_fgdb_v2.py file contains four dictionaries containing all the information to create domains (DOMAINS), feature classes (FEATURE_CLASSES), tables (TABLES), relationships (RELATES), and populate initial data used by the create_ng911.fgdb.py script from from the NENA_NG911_Toolbox.

This schema may be modified by organizations to fit their individual needs and requirements by modifying the schema_fgdb_v2.py or easily incorporate into their own business processes.

Domain (DOMAIN) Dictionary Schema

The domain dictionary is based on Esri's ArcPy Create Domain (Data Management) command and contains the following keys:

  • domain_name: The name of the domain that will be created.
  • domain_description: The description of the domain that will be created.
  • field_type: Specifies the type of attribute domain that will be created. For more information please see the field_type parameter at Create Domain (Data Management).
  • domain_type: Specifies the domain type that will be created. For more information please see the field_type parameter at Create Domain (Data Management).
  • values: Specifies any initial values, as a dictionary, applied to the domain.

Feature Class (FEATURE_CLASSES) Dictionary Schema

The feature class dictionary is based on Esri's ArcPy Create Feature Class (Data Management) command and the dictionary contains the following keys:

  • out_name: The name of the feature class to be created.
  • out_alias: The alias name of the feature class to be created.
  • geometry_type: Specifies the geometry type of the feature class.
  • has_m: Specifies whether the feature class contains linear measurement values (m-values).
  • has_z: Specifies whether the feature class contains elevation values (z-values).
  • fields: Specifies the fields, as a list of lists, to apply to the feature class.
    • Each field is added using the following list template
      [field_name, field_type, field_precision, field_scale, field_length, field_alias, field_is_nullable, field_is_required, field_domain].
      See the ArcPy command Add Field (Data Management) for the appropriate values.

Table (TABLES) Dictionary Schema

The tables dictionary is based on Esri's ArcPy Create Table (Data Management) command and dictionary contains the following keys:

  • out_name: The name of the feature class to be created.
  • out_alias: The alias name of the feature class to be created.
  • fields: Specifies the fields, as a list of lists, to apply to the table.
    • Each field is added using the following list template
      [field_name, field_type, field_precision, field_scale, field_length, field_alias, field_is_nullable, field_is_required, field_domain].
      See the ArcPy command Add Field (Data Management) for the appropriate values.

Relationship (RELATES) Dictionary Schema

The relationship dictionary is based on Esri's ArcPy Create Relationship Class (Data Management) command. The schema keys are identical to the parameters, please visit the documentation for more information.


Help

For assistance not provided within this repositories documentation, please visit https://www.nena.org/page/DataStructures where contact information for the leadership of the Data Structures Committee can be found.


Known Issues

  • ArcGIS Desktop 10.x [Issues #33 and #37] - ArcGIS Desktop 10.x is not enforcing ranged domains correctly. ArcGIS Desktop also does not display an error but rather folds the value to the closest domain value. Due to the end-of-life for ArcGIS Desktop 10, it is not expected the vendor will address this issue.
    Recommended Solution Upgrade to the latest ArcGIS Pro where ranged domains are enforced.

  • ArcGIS Pro 2.9.0 [Issue #31] - Enabling Editor Tracking on the DateUpdate field results in an error when creating the NENA template file geodatabase. This seems to be an issue specifically with ArcGIS Pro 2.9.0.
    Recommended Solution Upgrade to ArcGIS Pro 2.9.5 or later.

  • Python Script RuntimeError [Issue #29] - When running as standalone Python script there are a couple of scenarios where the script will fail and immediately crash on the import arcpy line if the user is not signed in to ArcGIS Pro or isn't utilizing an offline Pro license. A workaround is provided in Issue #29, however, it was decided not to include this as it is a vendor issue, not an issue with the actual Python script.


Change Log


Contributors


Acknowledgements

Trademarks provided under license from Esri. Other companies and products mentioned are trademarks of their respective owners.