Skip to content

agrc/utrans-attribute-rules

Repository files navigation

UTRANS Attribute Rules

Setup

  1. create local database from sql management studio named UTRANS

  2. enable as enterprise gdb via pro

    import arcpy
    arcpy.management.EnableEnterpriseGeodatabase(r'...\utrans-attribute-rules\pro-project\localhost.sde', r'C:\Program Files\ESRI\License10.6\sysgen\keycodes')

    If you receive errors, you may need to execute the following sql

    ALTER DATABASE UTRANS
    SET ALLOW_SNAPSHOT_ISOLATION ON
    
    ALTER DATABASE UTRANS
    SET READ_COMMITTED_SNAPSHOT ON
  3. import the XML Workspace for the existing UTRANS database

    arcpy.management.ImportXMLWorkspaceDocument(r'...\utrans-attribute-rules\pro-project\localhost.sde', r'...\utrans-attribute-rules\data\STAGING.XML', 'SCHEMA_ONLY', None)
  4. Create a python conda workspace for the project

    conda create --clone arcgispro-py3 --name utrans
  5. Activate the environment

    activate utrans
  6. install the development requirements

    pip install -r requirements.dev.txt

Installation

Database Migrations

Add reference data

  1. County boundaries
  2. Municipal boundaries
  3. Zip code boundaries

Attribute Rules

  1. add localhost.sde, stage.sde, and prod.sde to the pro-project
  2. Install attribute rules
    • python ar.py update --env=local, dev, prod

This is a doc opt cli, so check the help for the tool.

Releasing

  1. Bump ar.py VERSION string
  2. Bump ruletypes.py Constraint.error_number to match in the integer form
    • Bump before you run since it adds a record to the Version_Information table

About

Attribute rule management for UTRANS road editors

Topics

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages