Skip to content

Commit

Permalink
Changed M-geometry test function to return an error instead of a warn…
Browse files Browse the repository at this point in the history
…ing.
  • Loading branch information
jesse-langdon committed Apr 25, 2018
1 parent 2f1b26f commit a88c280
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions GNAT.pyt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
# Seattle, Washington #
# #
# Created: 2015-Jan-08 #
# Version: 2.5.9 #
# Revised: 2018-April-9 #
# Released: 2018-April-23 #
# Version: 2.6.0 #
# Revised: 2018-April-24 #
# Released: 2018-April-25 #
# #
# License: MIT License #
# #
Expand All @@ -27,7 +27,7 @@ from tools import CalculateGradient, CalculateThreadedness, CombineAttributes, D
Sinuosity, Segmentation, TransferAttributesToLine, ValleyPlanform, moving_window
from tools.FCT import Centerline

GNAT_version = "2.5.9"
GNAT_version = "2.6.0"

strCatagoryStreamNetworkPreparation = "Analyze Network Attributes\\Step 1 - Stream Network Preparation"
strCatagoryStreamNetworkSegmentation = "Analyze Network Attributes\\Step 2 - Stream Network Segmentation"
Expand All @@ -42,7 +42,7 @@ class Toolbox(object):
.pyt file)."""
self.label = "Geomorphic Network and Analysis Toolbox"
self.alias = 'GNAT'
self.description = "Tools for generating a stream network and for generating geomorphic attributes."
self.description = "Tools for generating geomorphic attributes for a stream network."

# List of tool classes associated with this toolbox
self.tools = [FindSubnetworksTool,
Expand Down Expand Up @@ -2103,7 +2103,7 @@ def testProjected(parameter):
if parameter.value:
if arcpy.Exists(parameter.value):
if arcpy.Describe(parameter.value).spatialReference.type <> u"Projected":
parameter.setErrorMessage("Input " + parameter.name + " must be in a Projected Coordinate System.")
parameter.setErrorMessage("Input " + parameter.name + " must be in a projected coordinate system.")
return False
else:
return True
Expand All @@ -2113,7 +2113,7 @@ def testMValues(parameter):
if parameter.value:
if arcpy.Exists(parameter.value):
if arcpy.Describe(parameter.value).hasM is True:
parameter.setWarningMessage("Input " + parameter.name + " should not be M-enabled. Make sure to Disable M-values in the Environment Settings for this tool.")
parameter.setErrorMessage("Input " + parameter.name + " must not be M-enabled. Make sure to disable M-values in the Environment Settings for this tool.")
return False
else:
return True
Expand Down

0 comments on commit a88c280

Please sign in to comment.