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
 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
Example #3
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
    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
 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