def getParameterInfo(self): # Input_Area param_1 = arcpy.Parameter() param_1.name = 'Input_Area' param_1.displayName = 'Input Area' param_1.parameterType = 'Required' param_1.direction = 'Input' param_1.datatype = 'Feature Set' # Set the Feature Set schema input_layer_file_path = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "InputArea_FeatureSetGDB.lyr") param_1.value = input_layer_file_path # Input_Surface param_2 = arcpy.Parameter() param_2.name = 'Input_Surface' param_2.displayName = 'Input Surface' param_2.parameterType = 'Required' param_2.direction = 'Input' param_2.datatype = 'Raster Layer' # Output_Highest_Point_Features param_3 = arcpy.Parameter() param_3.name = 'Output_Highest_Point_Features' param_3.displayName = 'Output Highest Point Features' param_3.parameterType = 'Required' param_3.direction = 'Output' param_3.datatype = 'Feature Class' output_layer_file_path = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "Highest Point Output.lyr") param_3.symbology = output_layer_file_path return [param_1, param_2, param_3]
def getParameterInfo(self): ''' Define parameter definitions ''' input_area_features = arcpy.Parameter( name='input_area_features', displayName='Input Area to Number', direction='Input', datatype='GPFeatureRecordSetLayer', parameterType='Required', enabled=True, multiValue=False) input_layer_file_path = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "RelativeNumberFeaturesAreaInput.lyr") input_area_features.value = input_layer_file_path input_number_features = arcpy.Parameter( name='input_point_features', displayName='Features to Number', direction='Input', datatype='GPFeatureLayer', parameterType='Required', enabled=True, multiValue=False) field_to_number = arcpy.Parameter(name='field_to_number', displayName='Field to Number', direction='Input', datatype='Field', parameterType='Optional', enabled=True, multiValue=False) field_to_number.filter.list = ['Short', 'Long', 'Double', 'Single'] field_to_number.parameterDependencies = [input_number_features.name] output_features = arcpy.Parameter( name='output_features', displayName='Output Numbered Features', direction='Output', datatype='DEFeatureClass', parameterType='Optional', enabled=True, multiValue=False) app = Utilities.GetPlatform() #ArcGIS Pro Labeling layerFile = "NumberedFeatures.lyrx" if (app == 'ARCMAP'): #ArcMap Labeling layerFile = "NumberedFeatures.lyr" output_features.symbology = os.path.join( MilitaryToolsUtilities.GetLayerPath(), layerFile) return [ input_area_features, input_number_features, field_to_number, output_features ]
def initializeParameters(self): """Refine the properties of a tool's parameters. This method is called when the tool is opened.""" # Input Center Features (Feature Set) [0] # Input Table (Table) [1] # Selected Type (String) [2] # Number of Radials (Long) [3] # Output Ring Features (Feature Class) [4] # Output Radial Features (Feature Class) [5] # Spatial Reference (Spatial Reference) [6] # Input Table Type Name Field (Field) [7] # Input Table Minimum Range Field (Field) [8] # Input Table Maximum Range Field (Field) [9] inputParamsTable = os.path.join( MilitaryToolsUtilities.GetCurrentFilePath(), "tooldata", "Range Rings.gdb", "rrInputTable") self.params[1].value = inputParamsTable # Get list of type names from InputTable [1] typeNames = self.updateTypes(str(self.params[1].value)) self.params[2].filter.list = typeNames self.params[2].value = typeNames[0] return
def getParameterInfo(self): # Input_Center_Features param_1 = arcpy.Parameter() param_1.name = u'Input_Center_Features' param_1.displayName = u'Input Center Features' param_1.parameterType = 'Required' param_1.direction = 'Input' param_1.datatype = u'Feature Set' # Same as u'GPFeatureRecordSetLayer' # Set the Feature Set schema input_layer_file_path = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "RangeRingInputObserversGDB.lyr") param_1.value = input_layer_file_path # Number_of_Rings param_2 = arcpy.Parameter() param_2.name = u'Number_of_Rings' param_2.displayName = u'Number of Rings' param_2.parameterType = 'Required' param_2.direction = 'Input' param_2.datatype = u'Long' param_2.value = u'4' # Interval_Between_Rings param_3 = arcpy.Parameter() param_3.name = u'Interval_Between_Rings' param_3.displayName = u'Interval Between Rings' param_3.parameterType = 'Required' param_3.direction = 'Input' param_3.datatype = u'Double' param_3.value = u'100' # Distance_Units param_4 = arcpy.Parameter() param_4.name = u'Distance_Units' param_4.displayName = u'Distance Units' param_4.parameterType = 'Required' param_4.direction = 'Input' param_4.datatype = u'String' param_4.value = u'METERS' param_4.filter.list = [ u'METERS', u'KILOMETERS', u'MILES', u'NAUTICAL_MILES', u'FEET', u'US_SURVEY_FEET' ] # Number_of_Radials param_5 = arcpy.Parameter() param_5.name = u'Number_of_Radials' param_5.displayName = u'Number of Radials' param_5.parameterType = 'Required' param_5.direction = 'Input' param_5.datatype = u'Long' param_5.value = u'8' # Output_Ring_Features param_6 = arcpy.Parameter() param_6.name = u'Output_Ring_Features' param_6.displayName = u'Output Ring Features' param_6.parameterType = 'Required' param_6.direction = 'Output' param_6.datatype = u'Feature Class' param_6.value = u'%scratchGDB%\\Rings' param_6.symbology = os.path.join(MilitaryToolsUtilities.GetLayerPath(), "RangeRings.lyr") # Output_Radial_Features param_7 = arcpy.Parameter() param_7.name = u'Output_Radial_Features' param_7.displayName = u'Output Radial Features' param_7.parameterType = 'Required' param_7.direction = 'Output' param_7.datatype = u'Feature Class' param_7.value = u'%scratchGDB%\\Radials' param_7.symbology = os.path.join(MilitaryToolsUtilities.GetLayerPath(), "RangeRadials.lyr") # Spatial_Reference param_8 = arcpy.Parameter() param_8.name = u'Spatial_Reference' param_8.displayName = u'Spatial Reference' param_8.parameterType = 'Optional' param_8.direction = 'Input' param_8.datatype = u'Spatial Reference' return [ param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8 ]
def getParameterInfo(self): # Input_Center_Features param_1 = arcpy.Parameter() param_1.name = u'Input_Center_Features' param_1.displayName = u'Input Center Features' param_1.parameterType = 'Required' param_1.direction = 'Input' param_1.datatype = u'Feature Set' # Set the Feature Set schema input_layer_file_path = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "RangeRingInputObserversGDB.lyr") param_1.value = input_layer_file_path # Input_Table param_2 = arcpy.Parameter() param_2.name = u'Input_Table' param_2.displayName = u'Input Table' param_2.parameterType = 'Required' param_2.direction = 'Input' param_2.datatype = u'Table' # military-tools-geoprocessing-toolbox\\toolboxes\\tooldata\\Range # Rings.gdb\\rrInputTable' param_2.value = os.path.join( MilitaryToolsUtilities.GetCurrentFilePath(), "tooldata", "Range Rings.gdb", "rrInputTable") # Selected_Type param_3 = arcpy.Parameter() param_3.name = u'Selected_Type' param_3.displayName = u'Selected Type' param_3.parameterType = 'Required' param_3.direction = 'Input' param_3.datatype = u'String' param_3.value = u'M4' param_3.filter.list = [u'M4', u'M249'] # Number_Of_Radials param_4 = arcpy.Parameter() param_4.name = u'Number_Of_Radials' param_4.displayName = u'Number Of Radials' param_4.parameterType = 'Required' param_4.direction = 'Input' param_4.datatype = u'Long' param_4.value = u'8' # Output_Ring_Features param_5 = arcpy.Parameter() param_5.name = u'Output_Ring_Features' param_5.displayName = u'Output Ring Features' param_5.parameterType = 'Required' param_5.direction = 'Output' param_5.datatype = u'Feature Class' param_5.value = u'%scratchGDB%\\Rings' param_5.symbology = os.path.join(MilitaryToolsUtilities.GetLayerPath(), "RangeRings.lyr") # Output_Radial_Features param_6 = arcpy.Parameter() param_6.name = u'Output_Radial_Features' param_6.displayName = u'Output Radial Features' param_6.parameterType = 'Required' param_6.direction = 'Output' param_6.datatype = u'Feature Class' param_6.value = u'%scratchGDB%\\Radials' param_6.symbology = os.path.join(MilitaryToolsUtilities.GetLayerPath(), "RangeRadials.lyr") # Spatial_Reference param_7 = arcpy.Parameter() param_7.name = u'Spatial_Reference' param_7.displayName = u'Spatial Reference' param_7.parameterType = 'Optional' param_7.direction = 'Input' param_7.datatype = u'Spatial Reference' # Input_Table_Type_Name_Field param_8 = arcpy.Parameter() param_8.name = u'Input_Table_Type_Name_Field' param_8.displayName = u'Input Table Type Name Field' param_8.parameterType = 'Optional' param_8.direction = 'Input' param_8.datatype = u'Field' param_8.value = u'Name' param_8.parameterDependencies = ["Input_Table"] param_8.category = "Input Table Options" # Input_Table_Minimum_Range_Field param_9 = arcpy.Parameter() param_9.name = u'Input_Table_Minimum_Range_Field' param_9.displayName = u'Input Table Minimum Range Field' param_9.parameterType = 'Optional' param_9.direction = 'Input' param_9.datatype = u'Field' param_9.value = u'Min' param_9.parameterDependencies = ["Input_Table"] param_9.category = "Input Table Options" # Input_Table_Maximum_Range_Field param_10 = arcpy.Parameter() param_10.name = u'Input_Table_Maximum_Range_Field' param_10.displayName = u'Input Table Maximum Range Field' param_10.parameterType = 'Optional' param_10.direction = 'Input' param_10.datatype = u'Field' param_10.value = u'Max' param_10.parameterDependencies = ["Input_Table"] param_10.category = "Input Table Options" return [ param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8, param_9, param_10 ]
def getParameterInfo(self): # Input_Observer_Features param_1 = arcpy.Parameter() param_1.name = u'Input_Observer_Features' param_1.displayName = u'Input Observer Features' param_1.parameterType = 'Required' param_1.direction = 'Input' param_1.datatype = u'Feature Set' input_layer_file_path = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "LLOS_InputObserversGDB.lyr") param_1.value = input_layer_file_path # Observer_Height_Above_Surface param_2 = arcpy.Parameter() param_2.name = u'Observer_Height_Above_Surface' param_2.displayName = u'Observer Height Above Surface' param_2.parameterType = 'Required' param_2.direction = 'Input' param_2.datatype = u'Double' param_2.value = u'2' # Radius_Of_Observer param_3 = arcpy.Parameter() param_3.name = u'Radius_Of_Observer' param_3.displayName = u'Radius Of Observer' param_3.parameterType = 'Required' param_3.direction = 'Input' param_3.datatype = u'Double' param_3.value = u'1000' # Input_Surface param_4 = arcpy.Parameter() param_4.name = u'Input_Surface' param_4.displayName = u'Input Surface' param_4.parameterType = 'Required' param_4.direction = 'Input' param_4.datatype = u'Raster Layer' # Output_Visibility param_5 = arcpy.Parameter() param_5.name = u'Output_Visibility' param_5.displayName = u'Output Visibility' param_5.parameterType = 'Required' param_5.direction = 'Output' param_5.datatype = u'Feature Class' param_5.value = u'%scratchGDB%/outputRLOS' param_5.symbology = os.path.join(MilitaryToolsUtilities.GetLayerPath(), "Radial Line Of Sight Output.lyr") # Force_Visibility_To_Infinity__Edge_Of_Surface_ param_6 = arcpy.Parameter() param_6.name = u'Force_Visibility_To_Infinity__Edge_Of_Surface_' param_6.displayName = u'Force Visibility To Infinity (Edge Of Surface)' param_6.parameterType = 'Optional' param_6.direction = 'Input' param_6.datatype = u'Boolean' # Spatial_Reference param_7 = arcpy.Parameter() param_7.name = u'Spatial_Reference' param_7.displayName = u'Spatial Reference' param_7.parameterType = 'Optional' param_7.direction = 'Input' param_7.datatype = u'Spatial Reference' param_7.value = arcpy.SpatialReference( 54032).exportToString() # World Azimuthal Equidistant return [param_1, param_2, param_3, param_4, param_5, param_6, param_7]
def getParameterInfo(self): # Observers param_1 = arcpy.Parameter() param_1.name = u'Observers' param_1.displayName = u'Observers' param_1.parameterType = 'Required' param_1.direction = 'Input' param_1.datatype = u'Feature Set' input_layer_file_path = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "LLOS_InputObserversGDB.lyr") param_1.value = input_layer_file_path # Observer_Height_Above_Surface param_2 = arcpy.Parameter() param_2.name = u'Observer_Height_Above_Surface' param_2.displayName = u'Observer Height Above Surface' param_2.parameterType = 'Required' param_2.direction = 'Input' param_2.datatype = u'Double' param_2.value = u'2' # Targets param_3 = arcpy.Parameter() param_3.name = u'Targets' param_3.displayName = u'Targets' param_3.parameterType = 'Required' param_3.direction = 'Input' param_3.datatype = u'Feature Set' input_layer_file_path = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "LLOS_InputTargetsGDB.lyr") param_3.value = input_layer_file_path # Target_Height_Above_Surface param_4 = arcpy.Parameter() param_4.name = u'Target_Height_Above_Surface' param_4.displayName = u'Target Height Above Surface' param_4.parameterType = 'Required' param_4.direction = 'Input' param_4.datatype = u'Double' param_4.value = u'0' # Input_Elevation_Surface param_5 = arcpy.Parameter() param_5.name = u'Input_Elevation_Surface' param_5.displayName = u'Input Elevation Surface' param_5.parameterType = 'Required' param_5.direction = 'Input' param_5.datatype = u'Raster Layer' # Output_Line_Of_Sight_Features param_6 = arcpy.Parameter() param_6.name = u'Output_Line_Of_Sight_Features' param_6.displayName = u'Output Line Of Sight Features' param_6.parameterType = 'Required' param_6.direction = 'Output' param_6.datatype = u'Feature Class' param_6.value = u'%scratchGDB%/outputLOS' param_6.symbology = os.path.join(MilitaryToolsUtilities.GetLayerPath(), "LLOS_OutputLLOS.lyr") # Output_Sight_Line_Features param_7 = arcpy.Parameter() param_7.name = u'Output_Sight_Line_Features' param_7.displayName = u'Output Sight Line Features' param_7.parameterType = 'Required' param_7.direction = 'Output' param_7.datatype = u'Feature Class' param_7.value = u'%scratchGDB%/outputSightLines' param_7.symbology = os.path.join(MilitaryToolsUtilities.GetLayerPath(), "LLOS_OutputSightLines.lyr") # Output_Observer_Features param_8 = arcpy.Parameter() param_8.name = u'Output_Observer_Features' param_8.displayName = u'Output Observer Features' param_8.parameterType = 'Required' param_8.direction = 'Output' param_8.datatype = u'Feature Class' param_8.value = u'%scratchGDB%/outputObservers' param_8.symbology = os.path.join(MilitaryToolsUtilities.GetLayerPath(), "LLOS_Output_Observers.lyr") # Output_Target_Features param_9 = arcpy.Parameter() param_9.name = u'Output_Target_Features' param_9.displayName = u'Output Target Features' param_9.parameterType = 'Required' param_9.direction = 'Output' param_9.datatype = u'Feature Class' param_9.value = u'%scratchGDB%/outputTargets' param_9.symbology = os.path.join(MilitaryToolsUtilities.GetLayerPath(), "LLOS_Output_Targets.lyr") # Input_Obstruction_Features param_10 = arcpy.Parameter() param_10.name = u'Input_Obstruction_Features' param_10.displayName = u'Input Obstruction Features' param_10.parameterType = 'Optional' param_10.direction = 'Input' param_10.datatype = u'Feature Layer' return [ param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8, param_9, param_10 ]
def getParameterInfo(self): # Input_Observer param_1 = arcpy.Parameter() param_1.name = u'Input_Observer' param_1.displayName = u'Input Observer' param_1.parameterType = 'Required' param_1.direction = 'Input' param_1.datatype = u'Feature Set' # Set the Feature Set schema input_layer_file_path = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "RangeRingInputObserversGDB.lyr") param_1.value = input_layer_file_path # Input_Surface param_2 = arcpy.Parameter() param_2.name = u'Input_Surface' param_2.displayName = u'Input Surface' param_2.parameterType = 'Required' param_2.direction = 'Input' param_2.datatype = u'Raster Layer' # Near_Distance__RADIUS1_ param_3 = arcpy.Parameter() param_3.name = u'Near_Distance__RADIUS1_' param_3.displayName = u'Near Distance (RADIUS1)' param_3.parameterType = 'Required' param_3.direction = 'Input' param_3.datatype = u'String' param_3.value = u'1000' # Maximum_Distance__RADIUS2_ param_4 = arcpy.Parameter() param_4.name = u'Maximum_Distance__RADIUS2_' param_4.displayName = u'Maximum Distance (RADIUS2)' param_4.parameterType = 'Required' param_4.direction = 'Input' param_4.datatype = u'String' param_4.value = u'3000' # Left_Azimuth__AZIMUTH1_ param_5 = arcpy.Parameter() param_5.name = u'Left_Azimuth__AZIMUTH1_' param_5.displayName = u'Left Azimuth (AZIMUTH1)' param_5.parameterType = 'Required' param_5.direction = 'Input' param_5.datatype = u'String' param_5.value = u'40' # Right_Azimuth__AZIMUTH2_ param_6 = arcpy.Parameter() param_6.name = u'Right_Azimuth__AZIMUTH2_' param_6.displayName = u'Right Azimuth (AZIMUTH2)' param_6.parameterType = 'Required' param_6.direction = 'Input' param_6.datatype = u'String' param_6.value = u'120' # Observer_Offset__OFFSETA_ param_7 = arcpy.Parameter() param_7.name = u'Observer_Offset__OFFSETA_' param_7.displayName = u'Observer Offset (OFFSETA)' param_7.parameterType = 'Required' param_7.direction = 'Input' param_7.datatype = u'String' param_7.value = u'20' # Output_Viewshed param_8 = arcpy.Parameter() param_8.name = u'Output_Viewshed' param_8.displayName = u'Output Viewshed' param_8.parameterType = 'Required' param_8.direction = 'Output' param_8.datatype = u'Feature Class' param_8.value = u'in_memory\\Viewshed' param_8.symbology = os.path.join(MilitaryToolsUtilities.GetLayerPath(), "Radial Line Of Sight Output.lyr") # Output_Wedge param_9 = arcpy.Parameter() param_9.name = u'Output_Wedge' param_9.displayName = u'Ouput Field of View' param_9.parameterType = 'Required' param_9.direction = 'Output' param_9.datatype = u'Feature Class' param_9.value = u'in_memory\\Field_Of_View' param_9.symbology = os.path.join(MilitaryToolsUtilities.GetLayerPath(), "RLOSPieWedge.lyr") # Output_FullWedge param_10 = arcpy.Parameter() param_10.name = u'Output_FullWedge' param_10.displayName = u'Output Range' param_10.parameterType = 'Required' param_10.direction = 'Output' param_10.datatype = u'Feature Class' param_10.value = u'in_memory\\Range' param_10.symbology = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "RLOSDonutWedge.lyr") return [ param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8, param_9, param_10 ]
def getParameterInfo(self): ''' Define parameter definitions ''' input_area_features = arcpy.Parameter( name='input_grg_area', displayName='Input GRG Area', direction='Input', datatype='GPFeatureRecordSetLayer', parameterType='Required', enabled=True, multiValue=False) input_layer_file_path = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "RelativeGRGInputArea.lyr") input_area_features.value = input_layer_file_path cell_width = arcpy.Parameter(name='cell_width', displayName='Cell Width', direction='Input', datatype='GPDouble', parameterType='Required', enabled=True, multiValue=False) cell_width.value = 100.0 cell_height = arcpy.Parameter(name='cell_height', displayName='Cell Height', direction='Input', datatype='GPDouble', parameterType='Required', enabled=True, multiValue=False) cell_height.value = 100.0 cell_units = arcpy.Parameter(name='cell_units', displayName='Cell Units', direction='Input', datatype='GPString', parameterType='Required', enabled=True, multiValue=False) cell_units.filter.type = 'ValueList' cell_units.filter.list = [ 'Meters', 'Feet', 'Miles', 'Kilometers', 'Nautical Miles', 'Yards' ] cell_units.value = cell_units.filter.list[0] label_start_position = arcpy.Parameter(name='label_start_position', displayName='Start Position', direction='Input', datatype='GPString', parameterType='Required', category='Label Properties', enabled=True, multiValue=False) label_start_position.filter.type = 'ValueList' label_start_position.filter.list = [ 'Upper-Left', 'Lower-Left', 'Upper-Right', 'Lower-Right' ] label_start_position.value = label_start_position.filter.list[0] label_type = arcpy.Parameter(name='label_type', displayName='Type', direction='Input', datatype='GPString', parameterType='Required', category='Label Properties', enabled=True, multiValue=False) label_type.filter.type = 'ValueList' label_type.filter.list = ['Alpha-Numeric', 'Alpha-Alpha', 'Numeric'] label_type.value = label_type.filter.list[0] label_seperator = arcpy.Parameter( name='label_seperator', displayName='Separator (Only used for Alpha-Alpha labeling)', direction='Input', datatype='GPString', parameterType='Required', category='Label Properties', enabled=False, multiValue=False) label_seperator.filter.type = 'ValueList' label_seperator.filter.list = ['-', ',', '.', '/'] label_seperator.value = label_seperator.filter.list[0] # TODO: define output schema as method output_features = arcpy.Parameter(name='output_grg_features', displayName='Output GRG Features', direction='Output', datatype='DEFeatureClass', parameterType='Required', enabled=True, multiValue=False) output_features.value = r"%scratchGDB%/area_grg" output_features.symbology = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "GRG.lyr") return [ input_area_features, cell_width, cell_height, cell_units, label_start_position, label_type, label_seperator, output_features ]
def getParameterInfo(self): ''' Define parameter definitions ''' input_area_features = arcpy.Parameter( name='input_area_features', displayName='Input Grid Area', direction='Input', datatype='GPFeatureRecordSetLayer', parameterType='Required', enabled=True, multiValue=False) input_layer_file_path = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "RelativeGRGInputArea.lyr") input_area_features.value = input_layer_file_path input_grid_reference_system = arcpy.Parameter( name='input_grid_reference_system', displayName='Grid Reference System', direction='Input', datatype='GPString', parameterType='Required', enabled=True, multiValue=False) input_grid_reference_system.filter.type = 'ValueList' input_grid_reference_system.filter.list = self.REF_GRID_TYPE input_grid_reference_system.value = input_grid_reference_system.filter.list[ 0] grid_square_size = arcpy.Parameter(name='grid_square_size', displayName='Grid Square Size', direction='Input', datatype='GPString', parameterType='Required', enabled=True, multiValue=False) grid_square_size.filter.type = 'ValueList' grid_square_size.filter.list = self.GRID_LIST grid_square_size.value = grid_square_size.filter.list[0] output_grid_features = arcpy.Parameter( name='output_grid_features', displayName='Output GRG Features', direction='Output', datatype='DEFeatureClass', parameterType='Required', enabled=True, multiValue=False) output_grid_features.value = r"%scratchGDB%/output_grid" output_grid_features.symbology = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "OutputRefGrid.lyr") large_grid_handling = arcpy.Parameter( name='large_grid_handling', displayName='Large Grid Handling', direction='Input', datatype='GPString', parameterType='Optional', enabled=True, multiValue=False) large_grid_handling.filter.type = 'ValueList' large_grid_handling.filter.list = self.LARGE_GRID_OPTIONS large_grid_handling.value = large_grid_handling.filter.list[0] return [ input_area_features, input_grid_reference_system, grid_square_size, output_grid_features, large_grid_handling ]
def getParameterInfo(self): ''' Define parameter definitions ''' input_start_location = arcpy.Parameter( name='input_start_location', displayName='Input Start Location', direction='Input', datatype='GPFeatureRecordSetLayer', parameterType='Required', enabled=True, multiValue=False) input_layer_file_path = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "RelativeGRGInputPoint.lyr") input_start_location.value = input_layer_file_path horizontal_cells = arcpy.Parameter(name='horizontal_cells', displayName='Number of Rows', direction='Input', datatype='GPDouble', parameterType='Required', enabled=True, multiValue=False) horizontal_cells.value = 10 vertical_cells = arcpy.Parameter(name='vertical_cells', displayName='Number of Columns', direction='Input', datatype='GPDouble', parameterType='Required', enabled=True, multiValue=False) vertical_cells.value = 10 cell_width = arcpy.Parameter(name='cell_width', displayName='Cell Width', direction='Input', datatype='GPDouble', parameterType='Required', enabled=True, multiValue=False) cell_width.value = 250.0 cell_height = arcpy.Parameter(name='cell_height', displayName='Cell Height', direction='Input', datatype='GPDouble', parameterType='Required', enabled=True, multiValue=False) cell_height.value = 250.0 cell_units = arcpy.Parameter(name='cell_units', displayName='Cell Units', direction='Input', datatype='GPString', parameterType='Required', enabled=True, multiValue=False) cell_units.filter.type = 'ValueList' cell_units.filter.list = [ 'Meters', 'Feet', 'Miles', 'Kilometers', 'Nautical Miles', 'Yards' ] cell_units.value = cell_units.filter.list[0] label_start_position = arcpy.Parameter(name='label_start_position', displayName='Start Position', direction='Input', datatype='GPString', parameterType='Required', category='Label Properties', enabled=True, multiValue=False) label_start_position.filter.type = 'ValueList' label_start_position.filter.list = [ 'Upper-Left', 'Lower-Left', 'Upper-Right', 'Lower-Right' ] label_start_position.value = label_start_position.filter.list[0] label_type = arcpy.Parameter(name='label_type', displayName='Type', direction='Input', datatype='GPString', parameterType='Required', category='Label Properties', enabled=True, multiValue=False) label_type.filter.type = 'ValueList' label_type.filter.list = ['Alpha-Numeric', 'Alpha-Alpha', 'Numeric'] label_type.value = label_type.filter.list[0] label_seperator = arcpy.Parameter( name='label_seperator', displayName='Separator (Only used for Alpha-Alpha labeling)', direction='Input', datatype='GPString', parameterType='Required', category='Label Properties', enabled=False, multiValue=False) label_seperator.filter.type = 'ValueList' label_seperator.filter.list = ['-', ',', '.', '/'] label_seperator.value = label_seperator.filter.list[0] grid_angle = arcpy.Parameter(name='grid_angle', displayName='Grid Rotation', direction='Input', datatype='GPLong', parameterType='Required', enabled=True, multiValue=False) grid_angle.value = 0 output_features = arcpy.Parameter(name='output_grg_features', displayName='Output GRG Features', direction='Output', datatype=u'Feature Class', parameterType='Required', enabled=True, multiValue=False) output_features.value = r"%scratchGDB%/point_grg" output_features.symbology = os.path.join( MilitaryToolsUtilities.GetLayerPath(), "GRG.lyr") return [ input_start_location, horizontal_cells, vertical_cells, cell_width, cell_height, cell_units, label_start_position, label_type, label_seperator, grid_angle, output_features ]