コード例 #1
0
    def getParameterInfo(self):
        """Define parameter definitions"""
        param0 = arcpy.Parameter(name="in_data",
                                 displayName="Input Discharge Dataset",
                                 direction="Input",
                                 parameterType="Required",
                                 datatype="GPValueTable")
        param0.columns = [['DEType', 'Dataset']]

        param1 = arcpy.Parameter(name="in_workspace",
                                 displayName="Input Workspace",
                                 direction="Input",
                                 parameterType="Required",
                                 datatype="DEWorkspace")
        param1.filter.list = ["Local Database", "Remote Database"]

        param2 = arcpy.Parameter(name="out_workspace",
                                 displayName="Output Workspace",
                                 direction="Output",
                                 parameterType="Derived",
                                 datatype="DEWorkspace")

        params = [param0, param1, param2]

        return params
コード例 #2
0
    def getParameterInfo(self):
        """Define parameter definitions"""
        # Input Feature Class
        param0 = arcpy.Parameter(displayName="Input Feature Class",
                                 name="in_feature",
                                 datatype="DEFeatureClass",
                                 parameterType="Required",
                                 direction="Input")

        # only accept Polygon Feature Class
        param0.filter.list = ["Polygon"]

        # Name of Field to be Added
        param1 = arcpy.Parameter(displayName="Field Name",
                                 name="field_name",
                                 datatype="Field",
                                 parameterType="Required",
                                 direction="Input")
        param1.parameterDependencies = [param0.name]
        param1.filter.list = ["LONG", "SHORT"]

        # Outpath
        param2 = arcpy.Parameter(displayName="Output Folder",
                                 name="field_value",
                                 datatype="GPFeatureLayer",
                                 parameterType="Required",
                                 direction="Output")

        # list of parameters for tool
        parameters = [param0, param1, param2]
        return parameters
コード例 #3
0
ファイル: mergeAreas.py プロジェクト: philmuise/GEM2Original
    def getParameterInfo(self):
        """Define parameter definitions"""
        params = [None] * 3

        params[0] = arcpy.Parameter(
            displayName="Overlap Dataset",
            name="overlapWorkspace",
            datatype=["DEWorkspace", "DEFeatureDataset"],
            parameterType="Required",
            direction="Input")

        params[1] = arcpy.Parameter(
            displayName="GDB Workspace",
            name="gdbWorkspace",
            datatype=["DEWorkspace", "DEFeatureDataset"],
            parameterType="Required",
            direction="Input")

        params[2] = arcpy.Parameter(
            displayName="Dark Features Dataset",
            name="dark_featWorkspace",
            datatype=["DEWorkspace", "DEFeatureDataset"],
            parameterType="Required",
            direction="Input")

        return params
コード例 #4
0
    def getParameterInfo(self):
        """Define parameter definitions"""
        # First parameter
        param0 = arcpy.Parameter(
            displayName="Initial Point Lon (in Decimal Degrees)",
            name="splon",
            datatype="GPDouble",
            parameterType="Required",
            direction="Input")

        # Second parameter
        param1 = arcpy.Parameter(
            displayName="Initial Point Lat (in Decimal Degrees)",
            name="splat",
            datatype="GPDouble",
            parameterType="Required",
            direction="Input")

        # Third parameter
        param2 = arcpy.Parameter(
            displayName="Distance (in Kilometers)",
            name="Distance",
            datatype="GPDouble",
            parameterType="Required",
            direction="Input")

        # Fourth parameter
        param3 = arcpy.Parameter(
            displayName="Azimuth (Degrees)",
            name="Azimuth",
            datatype="GPDouble",
            parameterType="Required",
            direction="Input")

        param4 = arcpy.Parameter(
            displayName="Report",
            name="Repfile",
            datatype="DEFile",
            parameterType="Required",
            direction="Output")

##        # Fourth param
##        param3 = arcpy.Parameter(
##            displayName="Slurp"
##            name="slurp"
##            datatype="GPFeatureLayer"
##            parameterType="Derived"
##            direction="Output")

        # param2.parameterDependencies = [param0.name]
        # param2.schema.clone = True

        params = [param0, param1, param2, param3, param4]
        param0.value = ""       # pfrr lon
        param1.value = ""       # pfrr lat
        param2.value = ""       # distance
        param3.value = ""       # azimuth
        param4.value = ""       # Report Name

        return params
コード例 #5
0
    def getParameterInfo(self):
        """
        Input parameter interface for Arc Toolbox.

        :return: <list> Input parameters
        """
        # First parameter (input raster)
        param0 = arcpy.Parameter(displayName="Input Raster Layer",
                                 name="in_raster",
                                 datatype="DERasterBand",
                                 parameterType="Required",
                                 direction="Input")

        # Second parameter (input sensor)
        param1 = arcpy.Parameter(displayName="Sensor",
                                 name="sensor",
                                 datatype="GPString",
                                 parameterType="Required",
                                 direction="Input")
        param1.filter.type = "ValueList"
        param1.filter.list = ['Landsat 8', 'Landsat 4-5, 7']

        # Third parameter (input band)
        param2 = arcpy.Parameter(displayName="Band",
                                 name="band",
                                 datatype="GPString",
                                 parameterType="Required",
                                 direction="Input")
        param2.filter.type = "ValueList"
        param2.filter.list = [
            'BQA', 'pixel_qa', 'radsat_qa', 'sr_aerosol', 'sr_cloud_qa'
        ]

        params = [param0, param1, param2]
        return params
コード例 #6
0
    def getParameterInfo(self):

        arcpy.env.overwriteOutput = True
        # Check out the ArcGIS Spatial Analyst extension license
        arcpy.CheckOutExtension("Spatial")

        params = []

        input_slope = arcpy.Parameter(
            name="input_slope",
            displayName="Input Slope Raster (degrees)",
            datatype="DERasterDataset",
            parameterType="Required",
            direction="Input",
        )
        input_slope.value = "D:\Example\TerrainToolsCalculateNorthnessEastness\slope_deg"
        params.append(input_slope)

        output_directory = arcpy.Parameter(
            name="output_directory",
            displayName="Output Directory",
            datatype="DEWorkspace",
            parameterType="Required",
            direction="Output",
        )
        params.append(output_directory)
        output_directory.value = "D:\Example\TerrainToolsCalculateNorthnessEastness\Output\/"
        return params
コード例 #7
0
    def getParameterInfo(self):

        # First parameter, input features (geodatabase)
        points = arcpy.Parameter(displayName="Input Point Feature Dataset",
                                 name="points",
                                 datatype="Feature Layer",
                                 parameterType="Required",
                                 direction="Input")
        points.filter.list = ["Point"]

        # Second parameter, input radius units
        radius_units = arcpy.Parameter(displayName="Radius Units",
                                       name="radius_units",
                                       datatype="String",
                                       parameterType="Required",
                                       direction="Input")

        radius_units.filter.type = "ValueList"
        radius_units.filter.list = ["METERS", "FEET", "KILOMETERS", "MILES"]
        radius_units.value = "METERS"

        # Third parameter, input radius magnitude
        radius_magnitude = arcpy.Parameter(displayName="Radius Magnitude",
                                           name="radius_magnitude",
                                           datatype="Long",
                                           parameterType="Required",
                                           direction="Input")
        radius_magnitude.filter.type = "Range"
        radius_magnitude.filter.list = [1, 2000]
        radius_magnitude.value = 1000

        return [points, radius_units, radius_magnitude]
    def getParameterInfo(self):
        """Define parameter definitions"""
        # First parameter
        param0 = arcpy.Parameter(displayName="Input netCDF File",
                                 name="in_netcdf",
                                 datatype="DEFile",
                                 parameterType="Required",
                                 direction="Input")

        # Second parameter
        param1 = arcpy.Parameter(displayName="Variables",
                                 name="in_variables",
                                 datatype="GPString",
                                 multiValue=True,
                                 parameterType="Required",
                                 direction="Input")

        # Third parameter
        param2 = arcpy.Parameter(displayName="Output Feature Layer",
                                 name="out_feature_layer",
                                 datatype="GPString",
                                 parameterType="Required",
                                 direction="Input")

        # Dummpy Parameter to Force Output NetCDF Layer to be added to the
        # display.
        param3 = arcpy.Parameter(displayName="Output Feature Layer",
                                 name="dummy_feature_layer",
                                 datatype="GPFeatureLayer",
                                 parameterType="Derived",
                                 direction="Output")

        params = [param0, param1, param2, param3]
        return params
コード例 #9
0
    def getParameterInfo(self):
        """Define parameter definitions"""
        path=os.path.dirname(os.path.abspath(__file__))+"/temp"+"\salida.dbf"

        fields = arcpy.ListFields(path)
        CAMPO=[]
        V_CAMPO=[]
        for field in fields:
            CAMPO.append(field.name)

        CAMPO_C = arcpy.Parameter(name="ATRIBUTO", displayName="CAMPO", datatype="String", parameterType="Required")
        CAMPO_C.value = "PROVINCIA"
        CAMPO_C.filter.list = CAMPO

        cursor = arcpy.da.SearchCursor(path, CAMPO_C.value)
        for row in cursor:
            V_CAMPO.append(format(row[0]))

        CAMPO_V = arcpy.Parameter(name="V_ATRIBUTO", displayName="VALOR DEL CAMPO", datatype="String",
                                  parameterType="Required")
        value = sorted(set(V_CAMPO))
        CAMPO_V.filter.list = value

        SAVE_S = arcpy.Parameter(name="Create_Shapefile", displayName="Desea Crear ShapeFile", datatype="String",
                                 parameterType="Required")
        SAVE_S.value = "NO"
        SAVE_S.filter.list = ["NO", "SI"]

        ADDRESS = arcpy.Parameter(name="Direccion de salida", displayName="Direccion", datatype="Address Locator",
                                  parameterType="Optional")
        ADDRESS.value = path

        return [CAMPO_C, CAMPO_V, SAVE_S, ADDRESS]
コード例 #10
0
    def getParameterInfo(self):
        """Define parameter definitions"""
        rasterLayers = arcpy.Parameter(displayName="Images for analyze",
                                       name="imgs",
                                       datatype="GPRasterLayer",
                                       parameterType="Required",
                                       direction="Input",
                                       multiValue=True)
        rlwShapefile = arcpy.Parameter(displayName="Railway track's shapefile",
                                       name="rlwshpfile",
                                       datatype="GPFeatureLayer",
                                       parameterType="Required",
                                       direction="Input")
        outName = arcpy.Parameter(displayName="Output layer's name",
                                  name="outname",
                                  datatype="GPString",
                                  parameterType="Required",
                                  direction="Input")
        outFolder = arcpy.Parameter(displayName="Output folder's path",
                                    name="outfolder",
                                    datatype="DEFolder",
                                    parameterType="Required",
                                    direction="Input")

        outFolder.value = os.environ.get('USERPROFILE')

        params = [rasterLayers, rlwShapefile, outName, outFolder]
        return params
    def getParameterInfo(self):
        """Define parameter definitions"""
        in_drainage_line = arcpy.Parameter(
                    displayName = 'Input Drainage Line Features',
                    name = 'input_drainage_line_features',
                    datatype = 'GPFeatureLayer',
                    parameterType = 'Required',
                    direction = 'Input')
        in_drainage_line.filter.list = ['Polyline']

        out_csv_file1 = arcpy.Parameter(
                    displayName = 'Output kfac File',
                    name = 'out_kfac_file',
                    datatype = 'DEFile',
                    parameterType = 'Required',
                    direction = 'Output')

        out_csv_file2 = arcpy.Parameter(
                    displayName = 'Output k File',
                    name = 'out_k_file',
                    datatype = 'DEFile',
                    parameterType = 'Required',
                    direction = 'Output')

        out_csv_file3 = arcpy.Parameter(
                    displayName = 'Output x File',
                    name = 'out_x_file',
                    datatype = 'DEFile',
                    parameterType = 'Required',
                    direction = 'Output')

        return [in_drainage_line,
				out_csv_file1,
				out_csv_file2,
				out_csv_file3]
コード例 #12
0
    def getParameterInfo(self):
        """Define parameter definitions"""
        param0 = arcpy.Parameter(displayName="Input workspace",
                                 name="arcpy.env.workspace",
                                 datatype="DEWorkspace",
                                 parameterType="Required",
                                 direction="Input")
        param1 = arcpy.Parameter(displayName="Input classified raster",
                                 name="input_raster",
                                 datatype="GPRasterLayer",
                                 parameterType="Required",
                                 direction="Input")
        param2 = arcpy.Parameter(displayName="Input features",
                                 name="input_features",
                                 datatype="GPFeatureLayer",
                                 parameterType="Required",
                                 direction="Input")

        param3 = arcpy.Parameter(displayName="In Fields",
                                 name="in_fields",
                                 datatype="Field",
                                 parameterType="Required",
                                 direction="Input")
        param3.parameterDependencies = [param2.name]

        params = [param0, param1, param2, param3]

        return params
コード例 #13
0
    def getParameterInfo(self):
        """Define parameter definitions"""
        in_drainage_line = arcpy.Parameter(
            displayName='Input Drainage Line Features',
            name='in_drainage_line_features',
            datatype='GPFeatureLayer',
            parameterType='Required',
            direction='Input')
        in_drainage_line.filter.list = ['Polyline']

        out_csv_file = arcpy.Parameter(
            displayName='Output Network Connectivity File',
            name='out_network_connectivity_file',
            datatype='DEFile',
            parameterType='Required',
            direction='Output')

        in_max_nbr_upstream = arcpy.Parameter(
            displayName='Maximum Number of Upstreams',
            name='max_nbr_upstreams',
            datatype='GPLong',
            parameterType='Optional',
            direction='Input')

        return [in_drainage_line, out_csv_file, in_max_nbr_upstream]
コード例 #14
0
    def getParameterInfo(self):
        """Define parameter definitions"""
        in_drainage_line = arcpy.Parameter(
            displayName='Input Drainage Line Features',
            name='in_drainage_line_features',
            datatype='GPFeatureLayer',
            parameterType='Required',
            direction='Input')
        in_drainage_line.filter.list = ['Polyline']

        param1 = arcpy.Parameter(name="stream_ID",
                                 displayName="Stream ID",
                                 direction="Input",
                                 parameterType="Required",
                                 datatype="Field"
                                 )
        param1.parameterDependencies = ["in_drainage_line_features"]
        param1.filter.list = ['Short', 'Long']

        param2 = arcpy.Parameter(name='out_comid_lat_lon_z',
                                 displayName='Output comid_lat_lon_z file',
                                 direction='Output',
                                 parameterType='Required',
                                 datatype='DEFile')

        params = [in_drainage_line, param1, param2]

        return params
コード例 #15
0
    def getParameterInfo(self):
        """Define parameter definitions"""
        # First parameter
        param0 = arcpy.Parameter(
            displayName="Input Lon (in Decimal Degrees)",
            name="lon",
            datatype="GPDouble",
            parameterType="Required",
            direction="Input")

        # Second parameter
        param1 = arcpy.Parameter(
            displayName="Input Lat (in Decimal Degrees)",
            name="lat",
            datatype="GPDouble",
            parameterType="Required",
            direction="Input")

        # Third parameter
        param2 = arcpy.Parameter(
            displayName="Input 3sigma Cirlce Radius (in Miles)",
            name="radius",
            datatype="GPDouble",
            parameterType="Required",
            direction="Input")

        # param2.parameterDependencies = [param0.name]
        # param2.schema.clone = True

        params = [param0, param1, param2]
        param0.value = -148.480679
        param1.value = 68.180358
        param2.value = 4

        return params
コード例 #16
0
    def getParameterInfo(self):
        param0 = arcpy.Parameter(displayName=_("Input Features"),
                                 name="in_layer",
                                 datatype="GPFeatureLayer",
                                 parameterType="Required",
                                 direction="Input")

        param0.filter.list = ["Polygon"]

        param1 = arcpy.Parameter(
            displayName=_("Output Features"),
            name="out_features",
            datatype="DEFeatureClass",
            parameterType="Required",
            #parameterType="Derived",
            direction="Output")

        param2 = arcpy.Parameter(displayName=_("Point Location"),
                                 name="point_location",
                                 datatype="GPString",
                                 parameterType="Required",
                                 direction="Input")

        param2.filter.type = "ValueList"
        param2.filter.list = ["TrueCentroid", "LabelPoint", "Centroid"]
        param2.value = "TrueCentroid"

        params = [param0, param1, param2]
        return params
コード例 #17
0
    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(
            os.path.dirname(os.path.dirname(__file__)), "layers",
            "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_Lowest_Point_Features
        param_3 = arcpy.Parameter()
        param_3.name = 'Output_Lowest_Point_Features'
        param_3.displayName = 'Output Lowest Point Features'
        param_3.parameterType = 'Required'
        param_3.direction = 'Output'
        param_3.datatype = 'Feature Class'
        output_layer_file_path = os.path.join(
            os.path.dirname(os.path.dirname(__file__)), "layers",
            "Lowest_Point_Output.lyr")
        param_3.symbology = output_layer_file_path

        return [param_1, param_2, param_3]
    def getParameterInfo(self):
        """Define parameter definitions"""
        param0 = arcpy.Parameter(name="in_ECMWF_runoff_file",
                                 displayName="Input ECMWF Runoff File",
                                 direction="Input",
                                 parameterType="Required",
                                 datatype="DEFile")

        param1 = arcpy.Parameter(name="in_weight_table",
                                 displayName="Input Weight Table",
                                 direction="Input",
                                 parameterType="Required",
                                 datatype="DEFile")

        param2 = arcpy.Parameter(name="out_inflow_file",
                                 displayName="Output Inflow File",
                                 direction="Output",
                                 parameterType="Required",
                                 datatype="DEFile")

        param3 = arcpy.Parameter(name="time_interval",
                                 displayName="Time Interval",
                                 direction="Input",
                                 parameterType="Optional",
                                 datatype="GPString")

        param3.filter.type = "ValueList"
        list_intervals = []
        param3.filter.list = list_intervals

        params = [param0, param1, param2, param3]

        return params
コード例 #19
0
    def getParameterInfo(self):
        """Define parameter definitions"""
        input_Drainage_Lines = arcpy.Parameter(
            name="input_Drainage_Lines",
            displayName="Input Drainage Lines",
            direction="Input",
            parameterType="Required",
            datatype="GPFeatureLayer")
        input_Drainage_Lines.filter.list = ['Polyline']

        stream_id = arcpy.Parameter(name="stream_ID",
                                    displayName="Stream ID",
                                    direction="Input",
                                    parameterType="Required",
                                    datatype="Field")
        stream_id.parameterDependencies = ["input_Drainage_Lines"]
        stream_id.filter.list = ['Short', 'Long', 'Double']
        stream_id.value = "HydroID"

        out_muskingum_x_file = arcpy.Parameter(name='out_muskingum_x_file',
                                               displayName='Muksingum X File',
                                               datatype='DEFile',
                                               parameterType='Required',
                                               direction='Output')

        params = [input_Drainage_Lines, stream_id, out_muskingum_x_file]

        return params
コード例 #20
0
    def _getParameterInfo(self):

        par = self.par

        par.zeitpunkt = arcpy.Parameter()
        par.zeitpunkt.name = u'Zeitpunkt'
        par.zeitpunkt.displayName = u'Zeitpunkt'
        par.zeitpunkt.parameterType = 'Required'
        par.zeitpunkt.datatype = u'GPString'
        par.zeitpunkt.value = "Alle Werte der fiskalischen Bilanz verstehen sich als 'pro Jahr'-Angaben. " + "Diese beziehen sich auf einen Zeitpunkt deutlich nach dem Bezugsbeginn des Planungsprojekts. Zu diesem Zeitpunkt ist der Bezug vollständig abgeschlossen. Zudem sind für Wohngebietsflächen mindestens sieben Jahre vergangen, denn in den ersten sieben Jahren hat die Zuweisung der Einkommensteuer i.d.R. noch nicht auf die Neubau-bedingten Einwohnerwanderungen reagiert."
        par.zeitpunkt.category = "1. Hinweis zum Zeitpunkt"

        par.kfa = arcpy.Parameter()
        par.kfa.name = u'Kommunaler Finanzausgleich'
        par.kfa.displayName = u'Kommunaler Finanzausgleich'
        par.kfa.parameterType = 'Required'
        par.kfa.datatype = u'GPString'
        par.kfa.value = "Den ermittelten Einnahmeverschiebungen bei der Grund-, Einkommen-, Gewerbe- und Umsatzsteuer sowie beim Familienleistungsausgleich stehen in allen Flächenländern Wirkungen des kommunalen Finanzausgleichs gegenüber. Bei den Stadtstaaten gibt es Rückwirkungen auf den Länderfinanzausgleich. Insbesondere bei Gewerbeflächen gleichen die Zuweisungen an die einzelnen Gemeinden einen großen Teil der mit ProjektCheck ermittelten Einnahmengewinne und -verluste wieder aus. Bei Wohnnutzungen fallen die Wirkungen im kommunalen Finanzausgleich i.d.R. deutlich geringer aus. Zudem führen Wanderungsgewinne (trotz der Steuermehreinnahmen) in den meisten Bundesländern eher zu Mehreinnahmen aus dem Kommunalen Finanzausgleich. Da die Regelungen des kommunalen Finanzausgleichs von Bundesland zu Bundesland unterschiedlich sind, regelmäßig verändert werden und in keiner amtlichen Statistik zentral erfasst werden wird in ProjektCheck keine Abschätzung der Veränderung der Zuweisungen aus dem Kommunalen Finanzausgleich angeboten."
        par.kfa.category = "2. Hinweis zum Kommunalen Finanzausgleich"

        par.kreisumlage = arcpy.Parameter()
        par.kreisumlage.name = u'Kreisumlage'
        par.kreisumlage.displayName = u'Kreisumlage'
        par.kreisumlage.parameterType = 'Required'
        par.kreisumlage.datatype = u'GPString'
        par.kreisumlage.value = "Auf Steuermehreinnahmen zahlen kreisangehörige Gemeinden eine – z.T. hebesatzbereinigte – Kreisumlage. Sinkende Steuereinnahmen führen zu geringeren Umlagezahlungen. Da die Kreisumlagesätze nicht zentral erfasst werden und sich die Umlagegrundlagen von Bundesland zu Bundesland unterscheiden wird in ProjektCheck keine Abschätzung der Kreisumlagezahlungen der Gemeinden angeboten."
        par.kreisumlage.category = "3. Hinweis zur Kreisumlage"

        return par
コード例 #21
0
    def getParameterInfo(self):
        params = []

        input_bathymetry = arcpy.Parameter(
            name="input_bathymetry",
            displayName="Input Bathymetry Raster",
            datatype="DERasterDataset",
            parameterType="Required",
            direction="Input",
        )
        input_bathymetry.value = "D:\Example\DeepSeaSDMToolsExtractDepths\depth.tif"
        params.append(input_bathymetry)

        # extraction_format
        depths = arcpy.Parameter(
            name="depths",
            displayName=
            "Select depths (WOA13v2, WOA05, Steinacher or Custom (in CSV style)",
            datatype="GPString",
            parameterType="Required",
            direction="Input",
        )
        depths.value = "WOA05"
        params.append(depths)

        output_directory = arcpy.Parameter(
            name="output_directory",
            displayName="Output Directory",
            datatype="DEWorkspace",
            parameterType="Required",
            direction="Output",
        )
        output_directory.value = r"D:\Example\DeepSeaSDMToolsExtractDepths\Depths"
        params.append(output_directory)
        return params
コード例 #22
0
    def getParameterInfo(self):
        """Define parameter definitions"""
        params = None
        param0 = arcpy.Parameter(displayName="Polygon Layer",
                                 name="in_layer",
                                 datatype="GPFeatureLayer",
                                 parameterType="Required",
                                 direction="Input")

        param0.filter.list = ["Polygon"]

        param1 = arcpy.Parameter(displayName="Cut Feature",
                                 name="in_feat",
                                 datatype="GPFeatureRecordSetLayer",
                                 parameterType="Required",
                                 direction="Input")

        param2 = arcpy.Parameter(displayName="Keep Cut Feature With",
                                 name="in_keep_with",
                                 datatype="GPString",
                                 parameterType="Required",
                                 direction="Input")

        param2.filter.type = "ValueList"
        param2.filter.list = ["EXISTING", "NEW"]

        return [param0, param1, param2]
コード例 #23
0
ファイル: MarxanPrepToolbox.py プロジェクト: yangxhcaf/PCPP
    def getParameterInfo(self):
        extent = arcpy.Parameter(
            displayName="Extent of Grid (select feature layer or raster)",
            name="extent",
            datatype="GPLayer",
            parameterType="Required",
            direction="Input")

        grid_shape = arcpy.Parameter(displayName="Shape of Grid",
                                     name="grid_shape",
                                     datatype="GPString",
                                     parameterType="Required",
                                     direction="Input")
        grid_shape.filter.type = "ValueList"
        grid_shape.filter.list = ["HEXAGON", "SQUARE", "TRIANGLE"]

        size = arcpy.Parameter(displayName="Area of Planning Unit",
                               name="size",
                               datatype="GPArealUnit",
                               parameterType="Required",
                               direction="Input")

        marxan_db = arcpy.Parameter(
            displayName="Existing Marxan Database Folder",
            name="marxan_db",
            datatype="DEFolder",
            parameterType="Required",
            direction="Input")

        params = [extent, grid_shape, size, marxan_db]
        return params
コード例 #24
0
ファイル: pub_tool.py プロジェクト: ChicagoRTI/ArcGIS-scripts
def getParameterInfo():
    try:
        logger.debug("Enter getParameterInfo")

        # layer =  arcpy.Parameter(
        #         displayName="Layer",
        #         name="layer",
        #         datatype="GPFeatureLayer",
        #         parameterType="Required",
        #         direction="Input")

        class_ = arcpy.Parameter(displayName="Community",
                                 name="class",
                                 datatype="String",
                                 parameterType="Required",
                                 direction="Input")
        class_.filter.type = "ValueList"
        class_.filter.list = sorted(COMMUNITIES)
        class_.value = class_.filter.list[0]

        output = arcpy.Parameter(displayName="Planting Sites",
                                 name="output",
                                 datatype="DEFeatureClass",
                                 parameterType="Derived",
                                 direction="Output")
        output.symbology = os.path.join(os.path.dirname(__file__),
                                        'symbology.lyrx')

        params = [class_, output]
    except Exception as e:
        logger.debug('Exception occurred %s' % (str(e)))
        logger.debug(traceback.format_exc())
        raise e
    return params
コード例 #25
0
    def getParameterInfo(self):
        """Define parameter definitions"""
        param0 = arcpy.Parameter(name="in_lines",
                                 displayName="Input Lines",
                                 direction="Input",
                                 parameterType="Required",
                                 datatype="DEFeatureClass")
        param1 = arcpy.Parameter(name="workspace",
                                 displayName="Workspace",
                                 direction="Input",
                                 parameterType="Required",
                                 datatype="DEWorkspace")
        param2 = arcpy.Parameter(name="out_lines",
                                 displayName="Output Partitioned Lines",
                                 direction="Input",
                                 parameterType="Required",
                                 datatype="GPString")
        param3 = arcpy.Parameter(name="length",
                                 displayName="Length",
                                 direction="Input",
                                 parameterType="Required",
                                 datatype="GPLong")
        param4 = arcpy.Parameter(name="overwrite_output",
                                 displayName="Overwrite Output",
                                 direction="Input",
                                 parameterType="Required",
                                 datatype="GPBoolean")
        param4.value = True

        params = [param0, param1, param2, param3, param4]
        return params
コード例 #26
0
ファイル: toolbox.py プロジェクト: shizhongming/CEAforArcGIS
 def getParameterInfo(self):
     scenario_path = arcpy.Parameter(displayName="Path to the scenario",
                                     name="scenario_path",
                                     datatype="DEFolder",
                                     parameterType="Required",
                                     direction="Input")
     prop_thermal_flag = arcpy.Parameter(
         displayName="Generate thermal properties of the building envelope",
         name="prop_thermal_flag",
         datatype="GPBoolean",
         parameterType="Required",
         direction="Input")
     prop_thermal_flag.value = True
     prop_architecture_flag = arcpy.Parameter(
         displayName="Generate construction and architecture properties",
         name="prop_architecture_flag",
         datatype="GPBoolean",
         parameterType="Required",
         direction="Input")
     prop_architecture_flag.value = True
     prop_HVAC_flag = arcpy.Parameter(
         displayName="Generate HVAC systems properties",
         name="prop_HVAC_flag",
         datatype="GPBoolean",
         parameterType="Required",
         direction="Input")
     prop_HVAC_flag.value = True
     return [
         scenario_path, prop_thermal_flag, prop_architecture_flag,
         prop_HVAC_flag
     ]
コード例 #27
0
    def getParameterInfo(self):
        """Define parameter definitions"""
        # input TIGER file layer (shp file)
        param0 = arcpy.Parameter(displayName="Input Feature Class",
                                 name="in_feature",
                                 datatype="DEFeatureClass",
                                 parameterType="Required",
                                 direction="Input")

        # Name of Field to be Added
        param1 = arcpy.Parameter(displayName="New Field",
                                 name="new_field",
                                 datatype="GPString",
                                 parameterType="Required",
                                 direction="Input")

        # Value to populate the field
        param2 = arcpy.Parameter(displayName="Field Integer Value",
                                 name="field_value",
                                 datatype="GPLong",
                                 parameterType="Required",
                                 direction="Input")

        # list of parameters for tool
        parameters = [param0, param1, param2]
        return parameters
コード例 #28
0
ファイル: toolbox.py プロジェクト: shizhongming/CEAforArcGIS
 def getParameterInfo(self):
     path_data = arcpy.Parameter(
         displayName="File containing the data to read (Total_demand.csv)",
         name="path_data",
         datatype="DEFile",
         parameterType="Required",
         direction="Input")
     path_data.filter.list = ['csv']
     analysis_field_variables = arcpy.Parameter(
         displayName="Variables to analyse",
         name="analysis_field_variables",
         datatype="String",
         parameterType="Required",
         multiValue=True,
         direction="Input")
     analysis_field_variables.filter.list = []
     path_buildings = arcpy.Parameter(displayName="Buildings file",
                                      name="path_buildings",
                                      datatype="DEFile",
                                      parameterType="Required",
                                      direction="Input")
     path_buildings.filter.list = ['shp']
     path_results = arcpy.Parameter(displayName="Results folder",
                                    name="path_results",
                                    datatype="DEFolder",
                                    parameterType="Required",
                                    direction="Input")
     return [
         path_data, analysis_field_variables, path_buildings, path_results
     ]
コード例 #29
0
    def getParameterInfo(self):
        """Define parameter definitions"""
        in_routes = arcpy.Parameter(
            displayName='Input Route Features',
            name='in_routes',
            datatype='GPFeatureLayer',
            parameterType='Required',
            direction='Input')
        in_routes.filter.list = ["Polyline"]

        route_id_field = arcpy.Parameter(
            displayName='Route Identifier Field',
            name='route_id_field',
            datatype='Field',
            parameterType='Required',
            direction='Input')

        route_id_field.filter.list = ['Short', 'Long', 'Text']
        route_id_field.parameterDependencies = [in_routes.name]

        out_table = arcpy.Parameter(
            displayName='Output Event Table',
            name='out_table',
            datatype='DETable',
            parameterType='Required',
            direction='Output')

        params = [in_routes, route_id_field, out_table]
        return params
コード例 #30
0
    def getParameterInfo(self):
        params = []

        input_slope = arcpy.Parameter(
            name="input_slope",
            displayName="Input Slope Raster",
            datatype="DERasterDataset",
            parameterType="Required",
            direction="Input",
        )
        input_slope.value = "D:\Example\TerrainToolsCalculateSlopeVariability\slope_deg"
        params.append(input_slope)

        output_directory = arcpy.Parameter(
            name="output_directory",
            displayName="Output Directory",
            datatype="DEWorkspace",
            parameterType="Required",
            direction="Output",
        )
        output_directory.value = "D:\Example\TerrainToolsCalculateSlopeVariability\/"
        params.append(output_directory)

        focal_neighbourhood = arcpy.Parameter(
            name="focal_neighbourhood",
            displayName="Focal Neighbourhood",
            datatype="GPSANeighborhood",
            parameterType="Required",
            direction="Output",
        )
        focal_neighbourhood.value = "Rectangle 3 3 CELL"
        params.append(focal_neighbourhood)

        return params