-
Notifications
You must be signed in to change notification settings - Fork 14
GRG From Point
GRGCreateGRGFromPointTestCase
Test the GP Tool: Military Tools (Toolbox) | Gridded Reference Graphic (Toolset) | CreateGRGFromPoint (Tool)
testGRGPointTarget
A basic test of CreateGRGFromPoint. Calls GRG with an input point and checks that the output matches the expected values given the input parameters
pointInput = 'testdata\MilitaryToolsTestData.gdb\GRGCenterPoint'
rows = 5
cols = 10
cellWidth = 100
cellHeight = 100
cellUnits = "Meters"
labelStart = "Lower-Left"
labelStyle = "Alpha-Numeric"
labelSeparator = "-"
gridRotationAngle = 0
CreateGRGFromPoint_mt(pointInput, rows, cols,
cellWidth, cellHeight, cellUnits,
labelStart, labelStyle, labelSeparator, gridRotationAngle, output_featureClass)
Does the tool output match the expected value and is the output feature class created?
Is the expected number of features created? count = (row X cols)
Check the perimeter length of each feature - is it the expected value?
Notes: each row shape length = (2 x width) + (2 x height)
Does value in Grid field match the Label Properties type? (Alpha-Numeric)
testGRGPointTarget_Numeric
A basic test of CreateGRGFromPoint. Calls GRG with an input Point and checks that the output matches the expected values given the input parameters. Same as testGRGPointGRG but checks that numeric grid labels are produced
pointInput = 'testdata\MilitaryToolsTestData.gdb\GRGCenterPoint'
rows = 10
cols = 20
cellWidth = 100
cellHeight = 200
cellUnits = "Meters"
labelStart = "Lower-Left"
labelStyle = "Numeric" # <---- Primary Test Parameter
labelSeparator = "-"
gridRotationAngle = 0
CreateGRGFromPoint_mt(pointInput, rows, cols,
cellWidth, cellHeight, cellUnits,
labelStart, labelStyle, labelSeparator, gridRotationAngle, output_featureClass)
Does the tool output match the expected value and is the output feature class created?
Is the expected number of features created? count = (row X cols)
Check the perimeter length each feature - is it the expected value?
Notes: each row shape length = (2 x width) + (2 x height)
Does value in Grid field match the Label Properties type? (Numeric)
testGRGPointTarget_Rotated
A basic test of CreateGRGFromPoint when rotation angle is specified. Calls GRG with an input Point and rotation angle and checks that the output matches the expected values given the input parameters.
pointInput = 'testdata\MilitaryToolsTestData.gdb\GRGCenterPoint'
rows = 5
cols = 10
cellWidth = 100
cellHeight = 100
cellUnits = "Meters"
labelStart = "Lower-Left"
labelStyle = "Numeric"
labelSeparator = "-"
gridRotationAngle = 10 <---- Primary Test Parameter
CreateGRGFromPoint_mt(pointInput, rows, cols,
cellWidth, cellHeight, cellUnits,
labelStart, labelStyle, labelSeparator, gridRotationAngle, output_featureClass)
Does the tool output match the expected value and is the output feature class created?
Is the expected number of features created? count = (row X cols)