Packagecom.esri.baserver.tasks.analyses
Classpublic class FindSimilarParameters
InheritanceFindSimilarParameters Inheritance AnalysisParameters Inheritance AnalysisParameters Inheritance BATaskParameters Inheritance Object

The FindSimilarParameters class provides input parameters for the Find Similar task.

The analysis can be restricted to an analysis extent if the analysisExtent parameter is specified. The boundary layer sites are ranked based on similarity to a master site. If the masterSiteLayer parameter is specified, the master site is selected from the master site layer. Otherwise, the master site is selected from the boundary layer. In both cases, the master site is selected by the OID value specified in the masterSiteOID parameter.

The variables to rank sites by are collected from two sources: the commonFields parameter specifies fields of the boundary layer and the summarizations parameter specifies demographic variables. If the demographic variables are specified, the dataHierarchy parameter can specify a name of data hierarchy to summarize demographic variables by.

Two types of analysis are supported—the Conventional Analysis and the Principal Component Analysis.

For the Conventional Analysis, the percentValues array specifies positive tolerance values in percents for ranking variables: at the beginning for the boundary layer fields and after that for the demographic variables. The Conventional Analysis is limited to 5 variables.

For the Principal Component Analysis, the pcaRankSites parameter can specify the maximal number of sites with the best rank to be written to the output layer. If it is negative, all sites are ranked. The pcaEigenValue parameter specifies the eigenvalue boundary for Kaiser Criterion used in the Principal Component Analysis. The default value is 1 as recommended.

Output options for this task include rendering an output image (outputTypes.getMapImage) and/or creating a feature class for subsequent analysis (outputTypes.getFeatureClass). If no output options are specified, the required output options are specified as follows. If the renderingParameters parameter is specified, the image output is requested. If the outputAnalysisItem parameter is specified, the output analysis feature class will be stored in the repository. If both renderingParameters and outputAnalysisItem parameters are missing, the feature class output is requested.

View the examples

See also

FindSimilarTask


Public Properties
 PropertyDefined By
 InheritedactiveDatasetID : String
Active dataset ID.
BATaskParameters
  analysisExtent : Geometry
Spatial/geographic extent to restrict analysis by.
FindSimilarParameters
  analysisType : FindSimilarAnalysisType
Analysis type.
FindSimilarParameters
  boundaries : Boundaries
Target polygon layer whose sites are ranked on similarity to the master site.
FindSimilarParameters
  commonFields : Array
Fields of the boundaries layer used for ranking sites.
FindSimilarParameters
  dataHierarchy : String
Name of data hierarchy to get demography for analysis from.
FindSimilarParameters
  masterSiteLayer : Boundaries
Polygon layer to get the master site from.
FindSimilarParameters
  masterSiteOID : int
OID of the master site.
FindSimilarParameters
 InheritedoutputAnalysisItem : FolderItem
Configuration options for storing the output feature class in the repository.
AnalysisParameters
 InheritedoutputSpatialReference : SpatialReference
The spatial reference to return the output feature set in.
AnalysisParameters
 InheritedoutputTypes : OutputTypes
Task output types.
BATaskParameters
  pcaEigenvalue : Number
Eigenvalue boundary for Principal Component Analysis.
FindSimilarParameters
  pcaRankSites : int
Maximal number of sites to rank with Principal Component Analysis.
FindSimilarParameters
  percentValues : Array
Array of tolerance values in percents for Conventional Analysis.
FindSimilarParameters
 InheritedrenderingParameters : RenderingParameters
Configuration options for rendering output to map image.
AnalysisParameters
 InheritedresultType : BAResultType
[read-only] Type of the result returned by the task associated with these parameters.
BATaskParameters
 InheritedreturnGeometry : Boolean
An option specifying the presence of the shape attribute in the returned record set.
AnalysisParameters
  summarizations : Array
Demographic variables used for ranking sites.
FindSimilarParameters
 InheritedtaskName : String
[read-only] Name of a Community Analyst Task associated with these parameters.
BATaskParameters
Public Methods
 MethodDefined By
  
Creates a new instance of the FindSimilarParameters class.
FindSimilarParameters
Property Detail
analysisExtentproperty
analysisExtent:Geometry

Spatial/geographic extent to restrict analysis by. This parameter expects a value of the Extent or Polygon type.


Implementation
    public function get analysisExtent():Geometry
    public function set analysisExtent(value:Geometry):void

See also

analysisTypeproperty 
analysisType:FindSimilarAnalysisType

Analysis type.

The default value is FindSimilarAnalysisType.PCA.


Implementation
    public function get analysisType():FindSimilarAnalysisType
    public function set analysisType(value:FindSimilarAnalysisType):void
boundariesproperty 
boundaries:Boundaries

Target polygon layer whose sites are ranked on similarity to the master site.


Implementation
    public function get boundaries():Boundaries
    public function set boundaries(value:Boundaries):void
commonFieldsproperty 
commonFields:Array

Fields of the boundaries layer used for ranking sites.


Implementation
    public function get commonFields():Array
    public function set commonFields(value:Array):void
dataHierarchyproperty 
dataHierarchy:String

Name of data hierarchy to get demography for analysis from. This property is used if a nonempty summarizations array is specified. If its value is null or empty, the default data hierarchy is used. List of available data hierarchies can be retrieved with Get Data Hierarchies task.


Implementation
    public function get dataHierarchy():String
    public function set dataHierarchy(value:String):void

See also

masterSiteLayerproperty 
masterSiteLayer:Boundaries

Polygon layer to get the master site from.


Implementation
    public function get masterSiteLayer():Boundaries
    public function set masterSiteLayer(value:Boundaries):void
masterSiteOIDproperty 
masterSiteOID:int

OID of the master site. Value of -1 means that OID is missing.

The default value is -1.


Implementation
    public function get masterSiteOID():int
    public function set masterSiteOID(value:int):void
pcaEigenvalueproperty 
pcaEigenvalue:Number

Eigenvalue boundary for Principal Component Analysis.

The default value is 1.


Implementation
    public function get pcaEigenvalue():Number
    public function set pcaEigenvalue(value:Number):void
pcaRankSitesproperty 
pcaRankSites:int

Maximal number of sites to rank with Principal Component Analysis. Negative value means ranking all sites.

The default value is -1.


Implementation
    public function get pcaRankSites():int
    public function set pcaRankSites(value:int):void
percentValuesproperty 
percentValues:Array

Array of tolerance values in percents for Conventional Analysis.


Implementation
    public function get percentValues():Array
    public function set percentValues(value:Array):void
summarizationsproperty 
summarizations:Array

Demographic variables used for ranking sites. This array should contain items of the String type. Available summarization fields can be retrieved with the Get Summarizations task.


Implementation
    public function get summarizations():Array
    public function set summarizations(value:Array):void

See also

GetSummarizationsTask
Constructor Detail
FindSimilarParameters()Constructor
public function FindSimilarParameters(outputTypes:OutputTypes = null)

Creates a new instance of the FindSimilarParameters class.

Parameters
outputTypes:OutputTypes (default = null) — Task output types.
Examples
ActionScript to create FindSimilarParameters and then use in a Find Similar task:
                     
     var parameters : FindSimilarParameters = new FindSimilarParameters();
     
     // The Boundaries type could take either data as type 
     // com.esri.ags.tasks.FeatureSet, com.esri.baserver.FolderItem, or com.esri.bacore.StandardLayer.
     
     // Set boundaries with a valid data type.
     parameters.boundaries = new Boundaries(boundaries);
     
     // Set demographic variables to rank sites with.
     parameters.summarizations = ["TOTPOP_CY", "HHPOP_CY"];
     
     // Set ID of a geography layer to get demography data from.
     parameters.dataLayerID = "US.BlockGroups";
     
     // Set OID of the master site to 1.     
     parameters.masterSiteOID = 1;
     
     // The Principal Component Analysis is the default analysis type.
     //parameters.AnalysisType = FindSimilarAnalysisType.PCA;
     
     parameters.pcaRankSites = 10;   // Rank not more than 10 sites.
     parameters.pcaEigenvalue = 0.5; // The less value of this threshold, the more principal components are taken into account.
     
     // Optionally restrict analysis to myExtent that is a value of the Extent or Polygon type.
     //parameters.analysisExtent = myExtent;
     
     findSimilarTask.execute(parameters, new Responder(resultHandler, faultHandler));