-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
1,195 additions
and
885 deletions.
There are no files selected for viewing
This file contains 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,3 +7,6 @@ __* | |
|
||
# AGOL only | ||
readme.html | ||
|
||
# Compiled | ||
*.pyc |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
This file contains 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,67 @@ | ||
[DOMAINS] | ||
|
||
Domain1 = YesNoMaybe | ||
Domain2 = StructureDamage | ||
Domain3 = ResComm | ||
Domain4 = RoadDamage | ||
Domain5 = | ||
|
||
[DOMAIN_VALUES] | ||
|
||
Domain1 = {"Yes": "Yes", "No": "No", "Maybe": "Maybe"} | ||
Domain2 = {"Destroyed": "Destroyed", "Major": "Major", "Minor": "Minor", "Affected": "Affected", "N/A": "N/A"} | ||
Domain3 = {"Residential": "Residential", "Commercial": "Commercial", "N/A": "N/A"} | ||
Domain4 = {"Passable": "Passable", "Partially blocked": "Partially blocked", "Not passable": "Not passable"} | ||
Domain5 = | ||
|
||
[FIELDS] | ||
|
||
Field1 = STRUCTDMG | ||
Field2 = STRUCTDMGEXT | ||
Field3 = RESCOM | ||
Field4 = ROADDMG | ||
Field5 = ROADDMGEXT | ||
Field6 = SPECIAL | ||
Field7 = | ||
Field8 = | ||
Field9 = | ||
Field10 = | ||
|
||
[FIELDS_ALIAS] | ||
|
||
Field1 = Structure Damage | ||
Field2 = Structure Damage Extent | ||
Field3 = Residential-Commercial | ||
Field4 = Road Damage | ||
Field5 = Road Damage Extent | ||
Field6 = Special Concerns | ||
Field7 = | ||
Field8 = | ||
Field9 = | ||
Field10 = | ||
|
||
[FIELD_DOMAIN] | ||
|
||
Field1 = YesNoMaybe | ||
Field2 = StructureDamage | ||
Field3 = ResComm | ||
Field4 = YesNoMaybe | ||
Field5 = RoadDamage | ||
Field6 = YesNoMaybe | ||
Field7 = | ||
Field8 = | ||
Field9 = | ||
Field10 = | ||
|
||
[VALUE_REQUIRED] | ||
|
||
Field1 = NON_NULLABLE | ||
Field2 = NULLABLE | ||
Field3 = NULLABLE | ||
Field4 = NON_NULLABLE | ||
Field5 = NULLABLE | ||
Field6 = NULLABLE | ||
Field7 = | ||
Field8 = | ||
Field9 = | ||
Field10 = |
This file contains 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,59 @@ | ||
import arcpy | ||
class ToolValidator(object): | ||
"""Class for validating a tool's parameter values and controlling | ||
the behavior of the tool's dialog.""" | ||
|
||
def __init__(self): | ||
"""Setup arcpy and the list of tool parameters.""" | ||
self.params = arcpy.GetParameterInfo() | ||
|
||
def initializeParameters(self): | ||
"""Refine the properties of a tool's parameters. This method is | ||
called when the tool is opened.""" | ||
return | ||
|
||
def updateParameters(self): | ||
"""Modify the values and properties of parameters before internal | ||
validation is performed. This method is called whenever a parameter | ||
has been changed.""" | ||
|
||
if self.params[0].value == 'Single Camera': | ||
|
||
self.params[1].enabled = 1 | ||
self.params[2].enabled = 0 | ||
self.params[3].enabled = 0 | ||
self.params[4].enabled = 0 | ||
self.params[6].enabled = 0 | ||
self.params[7].enabled = 0 | ||
|
||
|
||
else: | ||
self.params[1].enabled = 0 | ||
self.params[2].enabled = 1 | ||
self.params[3].enabled = 1 | ||
self.params[4].enabled = 1 | ||
self.params[6].enabled = 1 | ||
self.params[7].enabled = 1 | ||
|
||
return | ||
|
||
def updateMessages(self): | ||
"""Modify the messages created by internal validation for each tool | ||
parameter. This method is called after internal validation.""" | ||
|
||
if self.params[0].value == 'Single Camera': | ||
|
||
self.params[1].setErrorMessage("Photo folder required") | ||
self.params[5].setErrorMessage("Staging Geodatabase required") | ||
self.params[8].setErrorMessage("Survey question file required") | ||
|
||
else: | ||
|
||
self.params[2].setErrorMessage("Passenger side photos required") | ||
self.params[3].setErrorMessage("Driver side photos required") | ||
self.params[5].setErrorMessage("Staging Geodatabase required") | ||
self.params[6].setErrorMessage("Parcel (polygon) feature class required") | ||
self.params[7].setErrorMessage("Parcel Identification field required") | ||
self.params[8].setErrorMessage("Survey question file required") | ||
|
||
return |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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.