コード例 #1
0
 def getParameterInfo(self):
     """
     defines the parameters
     """
     params = [
         Parameter(displayName='Input Raster DEM',
                   name='input_raster',
                   datatype=['DERasterDataset', 'DERasterCatalog'],
                   parameterType='Required',
                   direction='Input'),
         Parameter(displayName='Input Points Layer',
                   name='input_points',
                   datatype=['DEFeatureClass', 'GPFeatureLayer'],
                   parameterType='Required',
                   direction='Input'),
         Parameter(
             displayName='New Elevation Field Name',
             name='title',
             direction='Input',
             datatype='GPString',
             parameterType='Required',
         )
     ]
     params[_field_name].value = 'point_elevation'
     return params
コード例 #2
0
 def getParameterInfo(self):
     return [
         Parameter(
             displayName='From Database',
             name='from_db',
             direction='Input',
             datatype='Workspace',
             parameterType='Required',
         ),
         Parameter(
             displayName=
             'To Database (Existing features in here will be deleted!)',
             name='to_db',
             direction='Input',
             datatype='Workspace',
             parameterType='Required',
         ),
         Parameter(
             displayName='Projection File',
             name='projection',
             direction='Input',
             datatype='DEPrjFile',
             parameterType='Required',
         ),
         Parameter(displayName='Skip Empty Rows',
                   name='skip_empty',
                   direction='Input',
                   datatype='GPBoolean',
                   parameterType='Optional')
     ]
コード例 #3
0
 def getParameterInfo(self):
     return [Parameter(
         displayName = 'From Database',
         name = 'from_db',
         direction = 'Input',
         datatype = 'Workspace',
         parameterType = 'Required',
     ), Parameter(
         displayName = 'To Database (Existing features in here will be deleted!)',
         name = 'to_db',
         direction = 'Input',
         datatype = 'Workspace',
         parameterType = 'Required',
     ), Parameter(
         displayName = 'Projection File',
         name = 'projection',
         direction = 'Input',
         datatype = 'DEPrjFile',
         parameterType = 'Required',
     ), Parameter(
         displayName = 'Clipping Layer',
         name = 'clip_layer',
         direction = 'Input',
         datatype = 'DEFeatureClass',
         parameterType = 'Required',
     )]
コード例 #4
0
 def getParameterInfo(self):
     """
     defines the parameters
     """
     params = [
         Parameter(displayName='Input attachment table',
                   name='attach_table',
                   datatype=['Table', 'GPTableView'],
                   parameterType='Required',
                   direction='Input'),
         Parameter(displayName='Output attachments folder',
                   name='out_folder',
                   datatype=['DEFolder'],
                   parameterType='Required',
                   direction='Input')
     ]
     return params
コード例 #5
0
    def getParameterInfo(self):
        """
        Define parameter definitions
        """
        params = [
            Parameter(displayName='Input Polygon Layer',
                      name='input_fc',
                      datatype='DEFeatureClass',
                      parameterType='Required',
                      direction='Input'),
            Parameter(displayName='Use input as template',
                      name='use_template',
                      datatype='GPBoolean',
                      direction='Input'),
            Parameter(displayName='Output Points Layer',
                      name='output_fc',
                      datatype='DEFeatureClass',
                      parameterType='Required',
                      direction='Output')
        ]

        params[_use_template].value = False
        return params
コード例 #6
0
 def getParameterInfo(self):
     return [
         Parameter(displayName='Map',
                   name='map',
                   datatype='GPString',
                   parameterType='Required',
                   direction='Input'),
         Parameter(displayName='Field',
                   name='field',
                   datatype='GPString',
                   parameterType='Required',
                   direction='Input'),
         Parameter(displayName='Old Value',
                   name='old_value',
                   datatype='GPString',
                   parameterType='Required',
                   direction='Input'),
         Parameter(displayName='New Value',
                   name='new_value',
                   datatype='GPString',
                   parameterType='Required',
                   direction='Input')
     ]
コード例 #7
0
 def getParameterInfo(self):
     """
     defines the parameters
     """
     params = [Parameter(
         displayName='Input attachment table',
         name='attach_table',
         datatype=['Table', 'GPTableView'],
         parameterType='Required',
         direction='Input'
     ), Parameter(
         displayName='Output attachments folder',
         name='out_folder',
         datatype=['DEFolder'],
         parameterType='Required',
         direction='Input'
     ), Parameter(
         displayName='Group By Field (place images in subfolders)',
         name='group_by_field',
         datatype='GPString',
         parameterType='Optional',
         direction='Input'
     )]
     return params
コード例 #8
0
    def getParameterInfo(self):
        """Define parameter definitions"""

        #1
        paramclsinput = Parameter(displayName="Input Classified Points",
                                  name="in_cls_points",
                                  datatype="DEFeatureClass",
                                  parameterType="Required",
                                  direction="Input")
        paramclsinput.filter.list = ["Point"]

        #2
        paramcntridfield = Parameter(displayName="Center ID Field",
                                     name="cntr_id_field",
                                     datatype="Field",
                                     parameterType="Required",
                                     direction="Input")
        paramcntridfield.parameterDependencies = [paramclsinput.name]
        paramcntridfield.filter.list = ['Short', 'Long']
        paramcntridfield.value = 'CNTR_ID'

        #3
        paramboundaryoutput = Parameter(displayName="Output Class Boundaries",
                                        name="boundary_output",
                                        datatype="DEFeatureClass",
                                        parameterType="Required",
                                        direction="Output")

        #4
        paramdevice = Parameter(displayName="Device for Calculation",
                                name="calc_device",
                                datatype="GPString",
                                parameterType="Required",
                                direction="Input")
        paramdevice.filter.list = ['CPU']
        paramdevice.value = 'CPU'

        #5
        paramcpuc = Parameter(displayName="CPU Parallel Cores",
                              name="cpu_cores",
                              datatype="GPLong",
                              parameterType="Required",
                              direction="Input")
        paramcpuc.value = cpu_count()

        params = [
            paramclsinput, paramcntridfield, paramboundaryoutput, paramdevice,
            paramcpuc
        ]
        return params
コード例 #9
0
 def getParameterInfo(self):
     """Define parameter definitions"""
     
     #1
     paraminput = Parameter(
             displayName="Input Points with Densities",
             name="in_points",
             datatype="DEFeatureClass",
             parameterType="Required",
             direction="Input")
     paraminput.filter.list = ["Point"]
     
     
     #2
     paramidfield = Parameter(                
             displayName="Identifier Field",
             name="id_field",
             datatype="Field",
             parameterType="Required",
             direction="Input")
     paramidfield.parameterDependencies = [paraminput.name]
     paramidfield.filter.list = ['Short','Long']
     
     #3
     paramdens = Parameter(                
             displayName="Density Field",
             name="density_field",
             datatype="Field",
             parameterType="Required",
             direction="Input")
     # Set the filter to accept only fields that are Short or Long type
     paramdens.filter.list = ['Short','Long','Float','Single','Double']
     paramdens.parameterDependencies = [paraminput.name]
     paramdens.value='DENSITY'
     
     #4
     paramoutput = Parameter(
             displayName="Output Result Points",
             name="out_points",
             datatype="DEFeatureClass",
             parameterType="Required",
             direction="Output")
     
     #5
     paramdevice = Parameter(
             displayName="Device for Calculation",
             name="calc_device",
             datatype="GPString",
             parameterType="Required",
             direction="Input"
             )
     paramdevice.filter.list=['CPU','GPU']
     paramdevice.value='CPU'
     
     #6
     paramcpuc = Parameter(
             displayName="CPU Parallel Cores",
             name="cpu_cores",
             datatype="GPLong",
             parameterType="Required",
             direction="Input"
             )
     paramcpuc.value=cpu_count()
     
     params = [paraminput,paramidfield,paramdens,
               paramoutput,paramdevice,paramcpuc]
     return params
コード例 #10
0
    def getParameterInfo(self):
        """Define parameter definitions"""

        #1
        paraminput = Parameter(displayName="Input Points",
                               name="in_points",
                               datatype="DEFeatureClass",
                               parameterType="Required",
                               direction="Input")
        paraminput.filter.list = ["Point"]

        #2
        paramidfield = Parameter(displayName="Identifier Field",
                                 name="id_field",
                                 datatype="Field",
                                 parameterType="Required",
                                 direction="Input")
        paramidfield.parameterDependencies = [paraminput.name]
        paramidfield.filter.list = ['Short', 'Long']

        #3
        paramparentidfield = Parameter(displayName="Parent ID Field",
                                       name="parent_id_field",
                                       datatype="Field",
                                       parameterType="Required",
                                       direction="Input")
        paramparentidfield.parameterDependencies = [paraminput.name]
        paramparentidfield.filter.list = ['Short', 'Long']
        paramparentidfield.value = 'PARENTID'

        #4
        parammultifield = Parameter(displayName="Multiply Field",
                                    name="multi_field",
                                    datatype="Field",
                                    parameterType="Required",
                                    direction="Input")
        # Set the filter to accept only fields that are Short or Long type
        parammultifield.filter.list = [
            'Short', 'Long', 'Float', 'Single', 'Double'
        ]
        parammultifield.parameterDependencies = [paraminput.name]
        parammultifield.value = 'MULTIPLY'

        #5
        paramcntroutput = Parameter(displayName="Output Center Points",
                                    name="out_cntr_points",
                                    datatype="DEFeatureClass",
                                    parameterType="Required",
                                    direction="Output")

        #6
        paramclsoutput = Parameter(displayName="Output Classified Points",
                                   name="out_cls_points",
                                   datatype="DEFeatureClass",
                                   parameterType="Required",
                                   direction="Output")

        #7
        paramcntrnum = Parameter(displayName="Maxinum Number of Center Points",
                                 name="cntr_num",
                                 datatype="GPLong",
                                 parameterType="Required",
                                 direction="Input")
        paramcntrnum.value = 100

        params = [
            paraminput, paramidfield, paramparentidfield, parammultifield,
            paramcntrnum, paramcntroutput, paramclsoutput
        ]
        return params
コード例 #11
0
    def getParameterInfo(self):
        """Define parameter definitions"""

        #1
        paramclsinput = Parameter(displayName="Input Classified Points",
                                  name="in_cls_points",
                                  datatype="DEFeatureClass",
                                  parameterType="Required",
                                  direction="Input")
        paramclsinput.filter.list = ["Point"]

        #2
        paramcntrinput = Parameter(displayName="Input Centers Points",
                                   name="in_cntr_points",
                                   datatype="DEFeatureClass",
                                   parameterType="Required",
                                   direction="Input")
        paramcntrinput.filter.list = ["Point"]

        #3
        paramidfield = Parameter(displayName="Identifier Field",
                                 name="id_field",
                                 datatype="Field",
                                 parameterType="Required",
                                 direction="Input")
        paramidfield.parameterDependencies = [paramclsinput.name]
        paramidfield.filter.list = ['Short', 'Long']

        #4
        paramcntridfield = Parameter(displayName="Center ID Field",
                                     name="cntr_id_field",
                                     datatype="Field",
                                     parameterType="Required",
                                     direction="Input")
        paramcntridfield.parameterDependencies = [paramclsinput.name]
        paramcntridfield.filter.list = ['Short', 'Long']
        paramcntridfield.value = 'CNTR_ID'

        #5
        paramdens = Parameter(displayName="Density Field",
                              name="density_field",
                              datatype="Field",
                              parameterType="Required",
                              direction="Input")
        # Set the filter to accept only fields that are Short or Long type
        paramdens.filter.list = ['Short', 'Long', 'Float', 'Single', 'Double']
        paramdens.parameterDependencies = [paramclsinput.name]
        paramdens.value = 'DENSITY'

        #6
        paramclsoutput = Parameter(displayName="Output Classified Points",
                                   name="out_cls_points",
                                   datatype="DEFeatureClass",
                                   parameterType="Required",
                                   direction="Output")

        #7
        paramdistthrs = Parameter(
            displayName="Distance for Density Connection",
            name="distthrs",
            datatype="GPDouble",
            parameterType="Required",
            direction="Input")
        paramdistthrs.value = 100.0

        #8
        paramdensthrs = Parameter(
            displayName="Density Threshold for Density Connection",
            name="densthrs",
            datatype="GPDouble",
            parameterType="Required",
            direction="Input")
        paramdensthrs.value = 1.2

        #9
        paramdevice = Parameter(displayName="Device for Calculation",
                                name="calc_device",
                                datatype="GPString",
                                parameterType="Required",
                                direction="Input")
        paramdevice.filter.list = ['CPU']
        paramdevice.value = 'CPU'

        #10
        paramcpuc = Parameter(displayName="CPU Parallel Cores",
                              name="cpu_cores",
                              datatype="GPLong",
                              parameterType="Required",
                              direction="Input")
        paramcpuc.value = cpu_count()

        params = [
            paramclsinput, paramcntrinput, paramidfield, paramcntridfield,
            paramdens, paramclsoutput, paramdistthrs, paramdensthrs,
            paramdevice, paramcpuc
        ]
        return params
コード例 #12
0
 def getParameterInfo(self):
     """Define parameter definitions"""
     
     #1
     paraminput = Parameter(
             displayName="Input Points",
             name="in_points",
             datatype="DEFeatureClass",
             parameterType="Required",
             direction="Input")
     paraminput.filter.list = ["Point"]
     
     #2
     paramidfield = Parameter(                
             displayName="Identifier Field",
             name="id_field",
             datatype="Field",
             parameterType="Required",
             direction="Input")
     paramidfield.parameterDependencies = [paraminput.name]
     paramidfield.filter.list = ['Short','Long']
     
     #3
     paramweight = Parameter(                
             displayName="Weight Field",
             name="weight_field",
             datatype="Field",
             parameterType="Required",
             direction="Input")
     # Set the filter to accept only fields that are Short or Long type
     paramweight.filter.list = ['Short','Long','Float','Single','Double']
     paramweight.parameterDependencies = [paraminput.name]
     
     #4
     paramoutput = Parameter(
             displayName="Output Result Points",
             name="out_points",
             datatype="DEFeatureClass",
             parameterType="Required",
             direction="Output")
     
     #5
     paramkt = Parameter(
             displayName="Density Kernel Type",
             name="kernel_type",
             datatype="GPString",
             parameterType="Required",
             direction="Input"
             )
     paramkt.filter.list=['CUT_OFF','GAUSS']
     paramkt.value='GAUSS'
     
     #6
     paramcod = Parameter(
             displayName="Cut Off Distance",
             name="cut_off_d",
             datatype="GPDouble",
             parameterType="Required",
             direction="Input"
             )
     paramcod.value="100"
     paramcod.enabled=0
     
     #7
     paramgks = Parameter(
             displayName="Gauss Kernel's Sigma",
             name="gauss_sigma",
             datatype="GPDouble",
             parameterType="Required",
             direction="Input"
             )
     paramgks.value="30"
     
     #8
     paramdevice = Parameter(
             displayName="Device for Calculation",
             name="calc_device",
             datatype="GPString",
             parameterType="Required",
             direction="Input"
             )
     paramdevice.filter.list=['CPU','GPU']
     paramdevice.value='CPU'
     
     #9
     paramcpuc = Parameter(
             displayName="CPU Parallel Cores",
             name="cpu_cores",
             datatype="GPLong",
             parameterType="Required",
             direction="Input"
             )
     paramcpuc.value=cpu_count()
     
     params = [paraminput,paramidfield,paramweight,
               paramoutput,paramkt,paramcod,
               paramgks,paramdevice,paramcpuc]
     return params