How do I filter type of a search neighborhood in the "GPGASearchNeighborhood" parameter?

634
1
03-28-2021 05:48 AM
LossovControl
New Contributor

Hello! I'm trying to use the parameter "GPGASearchNeighborhood" in a tool in my toolbox. I noticed that some of the tools in the Geostatistical Analyst toolbox (for example, Radial Basis Functions interpolation method) limit the options of neighborhood types to 2 out of the default 4 - Standard and Standard Circular (sorry that all the text is in Russian)

LossovControl_0-1616934434244.png

Does anyone know how can I do that? I tried using filters, but I can't figure out how to use them with GPGASearchNeighborhood.

#Parameter definition
param8 = arcpy.Parameter(
    displayName="GA Neighborhood",
    name="ga_neighborhood",
    datatype="GPGASearchNeighborhood",
    parameterType="Optional",
    direction="Input")

#Trying to index just the type like in a multiValue parameter
param8[0].filter.type = "ValueList"
param8[0].filter.list = ["Standard", "StandardCircular"]
#Results in "TypeError: 'Parameter' object does not support indexing"

#Trying to just filter parameter as is
param8.filter.type = "ValueList"
param8.filter.list = ["Standard", "StandardCircular"]
#Results in "AttributeError: 'NoneType' object has no attribute 'type'"

 

0 Kudos
1 Reply
DanPatterson
MVP Honored Contributor

havent tried it, but  you may have to define them separately, then use the one you want as a choice

SearchNeighborhoodSmooth—ArcGIS Pro | Documentation

the others are defined with examples in the same link space


... sort of retired...
0 Kudos