-
Notifications
You must be signed in to change notification settings - Fork 0
add full name calculation #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
gregbunce
wants to merge
27
commits into
main
Choose a base branch
from
feat/road-name-calculation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
47ee8c2
are we on the right track
gregbunce c626ec6
get branch update from origin
gregbunce 6aee1eb
Merge branch 'feat/road-name-calculation' of https://github.com/agrc/…
gregbunce 3290cb4
remove hardcoded path
gregbunce e0b5985
add xml schema doc
gregbunce b17874c
docs: update reference data
steveoh d43c004
fix: make rules execute
steveoh ebb54bd
chore: create version information table
steveoh 82aae2d
fix: editable is not yes no any longer
steveoh dd489c9
refactor: remove for py3
steveoh 8367ebd
fix: syntax error
steveoh 3ac1701
fix: return null instead of setting value to true
steveoh a66b50e
chore: remove readme
steveoh 0874837
fix: add localhost connection
steveoh bdfa788
chore: add proproject
steveoh 46e1445
chore: ignore pro project cruft
steveoh bbb3eb2
chore: update dictionary
steveoh 245f9b2
chore: update readme
gregbunce 37b315b
chore: add road xml data
gregbunce 134215a
chore: make reference data a list
gregbunce cdc57c1
update sde file name
gregbunce ca6ed6f
update stage and prod sde conn file names
gregbunce 9a26889
fix null to zero expression
gregbunce e52be3e
fix null to zero expression
gregbunce d8e0f41
fix upper calculations
gregbunce 11cac04
update arcpy install to conda
gregbunce fa4748e
add rules testing for fullname
gregbunce File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,3 +30,5 @@ __pycache__ | |
| .DS_Store | ||
| cov.xml | ||
| .coverage | ||
| pro-project/Index | ||
| pro-project/.backups | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,11 +37,12 @@ | |
| "instafail", | ||
| "isort", | ||
| "keycodes", | ||
| "metas", | ||
| "pylint", | ||
| "pytest", | ||
| "ruletypes", | ||
| "sysgen", | ||
| "utrans", | ||
| "yapf" | ||
| ] | ||
| ], | ||
| } | ||
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| table = "Roads_Edit" | ||
| disabled_rule_value = 'rule disabled' calculated_attribute = 'FULLNAME' fields = ['NAME', 'POSTTYPE', 'POSTDIR', TEST_ATTRIBUTE] values = [ [None, None, None, disabled_rule_value], ['', '', '', disabled_rule_value], [' ', ' ', ' ', disabled_rule_value] ] | ||
| disabled_rule_value = 'rule disabled' calculated_attribute = 'FULLNAME' fields = ['NAME', 'POSTTYPE', 'POSTDIR', TEST_ATTRIBUTE] values = [ [None, None, None, disabled_rule_value], ['', '', '', disabled_rule_value], [' ', ' ', ' ', disabled_rule_value] ] | ||
| disabled_rule_value = 'rule disabled' calculated_attribute = 'FULLNAME' fields = ['NAME', 'POSTTYPE', 'POSTDIR', 'UTRANS_NOTES'] values = [ [None, None, None, disabled_rule_value], ['', '', '', disabled_rule_value], [' ', ' ', ' ', disabled_rule_value] ] | ||
| disabled_rule_value = 'rule disabled' calculated_attribute = 'FULLNAME' fields = ['NAME', 'POSTTYPE', 'POSTDIR', 'UTRANS_NOTES'] values = [ [None, None, None, disabled_rule_value], ['', '', '', disabled_rule_value], [' | ||
| disabled_rule_value = 'rule disabled' TEST_ATTRIBUTE = 'UTRANS_NOTES' calculated_attribute = 'FULLNAME' fields = ['NAME', 'POSTTYPE', 'POSTDIR', TEST_ATTRIBUTE] values = [ [None, None, None, disabled_rule_value], ['', '', '', disabled_rule_value], [' ', ' ', ' ', disabled_rule_value] ] | ||
| TABLE = table | ||
| with arcpy.da.InsertCursor(TABLE, fields) as cursor: for value in values: cursor.insertRow(value) | ||
| edit = arcpy.da.Editor("Roads_Edit") | ||
| edit = arcpy.da.Editor("C:\\Users\\gbunce\\AppData\\Roaming\\Esri\\ArcGISPro\\Favorites\\localhost@utrans_old.sde") | ||
| edit.startEditing(False, True) | ||
| edit.startOperation() | ||
| edit.stopOperation() | ||
| edit.stopEditing(True) | ||
| edit = arcpy.da.Editor("C:\\Users\\gbunce\\AppData\\Roaming\\Esri\\ArcGISPro\\Favorites\\localhost@utrans.sde") edit.startEditing(False, True) edit.startOperation() edit.stopOperation() edit.stopEditing(True) | ||
| edit = arcpy.da.Editor("C:\\Users\\gbunce\\AppData\\Roaming\\Esri\\ArcGISPro\\Favorites\\localhost@utrans.sde") | ||
| edit.startEditing(False, True) edit.startOperation() | ||
| edit.stopOperation() edit.stopEditing(True) | ||
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
|
|
||
| ```py | ||
| import arcpy | ||
| arcpy.management.EnableEnterpriseGeodatabase(r'...\utrans-attribute-rules\pro-project\localhost.sde', r'C:\Program Files\ESRI\License10.6\sysgen\keycodes') | ||
| arcpy.management.EnableEnterpriseGeodatabase(r'...\utrans-attribute-rules\pro-project\localhost@utrans.sde', r'C:\Program Files\ESRI\License10.6\sysgen\keycodes') | ||
| ``` | ||
|
|
||
| _If you receive errors, you may need to execute the following sql_ | ||
|
|
@@ -20,16 +20,34 @@ | |
| SET READ_COMMITTED_SNAPSHOT ON | ||
| ``` | ||
|
|
||
| 1. import the XML Workspace for the existing UTRANS database | ||
| 1. import the XML Workspace for the existing UTRANS roads data | ||
|
|
||
| ```py | ||
| arcpy.management.ImportXMLWorkspaceDocument(r'...\utrans-attribute-rules\pro-project\localhost.sde', r'...\utrans-attribute-rules\data\STAGING.XML', 'SCHEMA_ONLY', None) | ||
| arcpy.management.ImportXMLWorkspaceDocument(r'...\utrans-attribute-rules\pro-project\localhost@utrans.sde', r'...\utrans-attribute-rules\data\roads_edit.XML', 'DATA', None) | ||
| ``` | ||
|
|
||
| 1. import the reference data from [open sgid](https://gis.utah.gov/sgid/open-sgid/) | ||
|
|
||
| - County boundaries | ||
| - Metro Townships | ||
| - Municipal boundaries | ||
| - Utah state boundary | ||
| - Zip code boundaries | ||
| - National Grid | ||
| - Address system quadrants | ||
|
|
||
| ```py | ||
| import arcpy | ||
| arcpy.env.workspace = r' ...\agrc@opensgid.sde' | ||
| in_features = ['opensgid.boundaries.county_boundaries','opensgid.boundaries.metro_townships','opensgid.boundaries.municipal_boundaries','opensgid.boundaries.state_boundary','opensgid.boundaries.zip_code_areas','opensgid.indices.national_grid','opensgid.location.address_system_quadrants'] | ||
| out_location = r'...\utrans-attribute-rules\pro-project\localhost@utrans.sde' | ||
| arcpy.FeatureClassToGeodatabase_conversion(in_features, out_location) | ||
| ``` | ||
|
|
||
| 1. Create a python conda workspace for the project | ||
|
|
||
| ```sh | ||
| conda create --clone arcgispro-py3 --name utrans | ||
| conda create --name utrans | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. praise: niiiiiice! |
||
| ``` | ||
|
|
||
| 1. Activate the environment | ||
|
|
@@ -38,6 +56,12 @@ | |
| activate utrans | ||
| ``` | ||
|
|
||
| 1. install [arcpy](https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/installing-arcpy.htm) | ||
|
|
||
| ```sh | ||
| conda install arcpy -c esri | ||
| ``` | ||
|
|
||
| 1. install the development requirements | ||
|
|
||
| ```sh | ||
|
|
@@ -48,15 +72,9 @@ | |
|
|
||
| ### Database Migrations | ||
|
|
||
| #### Add reference data | ||
|
|
||
| 1. County boundaries | ||
| 1. Municipal boundaries | ||
| 1. Zip code boundaries | ||
|
|
||
| ### Attribute Rules | ||
|
|
||
| 1. add `localhost.sde`, `stage.sde`, and `prod.sde` to the pro-project | ||
| 1. add `localhost@utrans.sde`, `stage@utrans.sde`, and `prod@utrans.sde` to the pro-project | ||
| 1. Install attribute rules | ||
| - `python ar.py update --env=local, dev, prod` | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| return iif(isempty($feature.NAME), null, Upper(Trim(Replace(Concatenate([$feature.NAME, $feature.POSTTYPE, $feature.POSTDIR], " "), " ", " ")))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chore: add this file to the .gitignore please