com.esri.arcgis.geoprocessing.tools.spatialstatisticstools
Class HighLowClustering
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.spatialstatisticstools.HighLowClustering
- All Implemented Interfaces:
- GPTool
public class HighLowClustering
- extends AbstractGPTool
Measures the degree of clustering for either high values or low values using the Getis-Ord General G statistic. Results are accessible from the Results window.
The High/Low Clustering (Getis-Ord General G) tool is contained in the Spatial Statistics Tools tool box.
Usage tips:
- The High/Low Clustering tool returns 5 values: Observed General G, Expected General G, Variance, z-score, and p-value. These values are accessible from the and are also passed as derived output values for potential use in models or scripts. Optionally, this tool will create an HTML file with a graphical summary of results. Double-clicking on the HTML file in the Results window will open the HTML file in the default Internet browser. Right-clicking on the in the Results window and selectingwill display the results in a. If you execute this tool in the , output values will also be displayed in the.
- The Input Field should contain a variety ofvalues. You will get an error message if the Input Field contains negative values. In addition, the math for this statistic requires some variation in the variable being analyzed; it cannot solve if all input values are 1, for example. If you want to use this tool to analyze the spatial pattern of incident data, consider .
- The z-score and p-value are measures of statistical significance which tell you whether or not to reject the null hypothesis. For this tool, the null hypothsis states that the values associated with features are randomly distributed.
- The z-score is based on the randomization null hypothesis computation. For more information on z-scores, see
- The higher (or lower) the z-score, the stronger the intensity of the clustering. A z-score near zero indicates no apparent clustering within the study area. A positive z-score indicates clustering of high values. A negative z-scores indicates clustering of low values.
- Calculations based on either Euclidean or Manhattan distance require to accurately measure distances.
- For line and polygon features, feature centroids are used in distance computations. For multipoints, polylines, or polygons with multiple parts, the centroid is computed using the weighted mean center of all feature parts. The weighting for point features is 1, for line features is length, and for polygon features is area.
- In ArcGIS 10, optional graphical output is no longer displayed automatically. Instead, an HTML file summarizing results is created. To view results, double-click on the HTML file in the . Custom scripts or model tools created prior to ArcGIS 10 that use this tool may need to be rebuilt. To rebuild these custom tools, open them, remove theparameter, then re-save.
- Your choice for the Conceptualization of Spatial Relationships parameter should reflect inherent relationships among the features you are analyzing. The more realistically you can model how features interact with each other in space, the more accurate your results will be. . Here are some additional tips:
- A binary weighting scheme is recommended for this statistic. Select Fixed Distance Band, Polygon Contiguity, K Nearest Neighbors, or Delaunay Triangulation for the Conceptualization of Spatial Relationships parameter. Select None for the Standardization parameter.
- Fixed Distance Band
- Inverse Distance or Inverse Distance Squared (not recommended)
- Additional options for the Conceptualization of Spatial Relationships parameter are available using the or tools. To take advantage of these additional options, use one of these tools to construct the prior to analysis; select GET_SPATIAL_WEIGHTS_FROM_FILE for the Conceptualization of Spatial Relationships parameter; and, for the Weights Matrix File parameter, specify the path to the spatial weights file you created.
- Map layers can be used to define the Input Feature Class. When using a layer with a selection, only the selected features are included in the analysis.
- If you provide a Weights Matrix File with a .SWM or .swm extension, this tool is expecting a spatial weights matrix file created using either the or tools. Otherwise this tool is expecting an . In some cases, behavior is different depending on which type of spatial weights matrix file you use:
- ASCII formatted spatial weights matrix files:Weights are used "as is". Missing feature-to-feature relationships are treated as zeros.If the weights are row standardized, results will likely be incorrect for analyses on selection sets. If you need to run your analysis on a selection set, convert the ASCII spatial weights file to a .swm file by reading the ASCII data into a table, then using the CONVERT_TABLE option with the tool.
- .SWM formatted spatial weights matrix fileIf the weights are row standardized, they will be restandardized for selection sets. Otherwise weights are used "as is".
- Running your analysis with an is memory intensive. For analyses on more than about 5000 features, consider converting your ASCII formatted spatial weights matrix file into a . First put your ASCII weights into a table (using Excel, for example). Next run the tool using CONVERT_TABLE for the Conceptualization of Spatial Relationships parameter. The output will be a .swm formatted spatial weights matrix file.
- The help topic provides additional information about this tool's parameters.
- When using shapefiles, keep in mind that they cannot store null values. Tools or other procedures that create shapefiles from non-shapefile inputs may store or interpret null values as zero. This can lead to unexpected results. See also .
Constructor Summary |
HighLowClustering()
Creates the High/Low Clustering (Getis-Ord General G) tool with defaults. |
HighLowClustering(Object inputFeatureClass,
Object inputField,
String conceptualizationOfSpatialRelationships,
String distanceMethod,
String standardization)
Creates the High/Low Clustering (Getis-Ord General G) tool with the required parameters. |
HighLowClustering
public HighLowClustering()
- Creates the High/Low Clustering (Getis-Ord General G) tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
HighLowClustering
public HighLowClustering(Object inputFeatureClass,
Object inputField,
String conceptualizationOfSpatialRelationships,
String distanceMethod,
String standardization)
- Creates the High/Low Clustering (Getis-Ord General G) tool with the required parameters.
Initializes the array of tool parameters with the values as specified for the required parameters and with the default values for the other parameters.
- Parameters:
inputFeatureClass
- the feature class for which the General G statistic will be calculated.inputField
- the numeric field to be evaluated.conceptualizationOfSpatialRelationships
- specifies how spatial relationships among features are conceptualized.distanceMethod
- specifies how distances are calculated from each feature to neighboring features.standardization
- row standardization is recommended whenever the distribution of your features is potentially biased due to sampling design or an imposed aggregation scheme.
getInputFeatureClass
public Object getInputFeatureClass()
- Returns the Input Feature Class parameter of this tool .
This parameter is the feature class for which the General G statistic will be calculated.
This is a required parameter.
- Returns:
- the Input Feature Class
setInputFeatureClass
public void setInputFeatureClass(Object inputFeatureClass)
- Sets the Input Feature Class parameter of this tool .
This parameter is the feature class for which the General G statistic will be calculated.
This is a required parameter.
- Parameters:
inputFeatureClass
- the feature class for which the General G statistic will be calculated.
getInputField
public Object getInputField()
- Returns the Input Field parameter of this tool .
This parameter is the numeric field to be evaluated.
This is a required parameter.
- Returns:
- the Input Field
setInputField
public void setInputField(Object inputField)
- Sets the Input Field parameter of this tool .
This parameter is the numeric field to be evaluated.
This is a required parameter.
- Parameters:
inputField
- the numeric field to be evaluated.
getGenerateReport
public String getGenerateReport()
- Returns the Generate Report parameter of this tool .
This is an optional parameter.
- Returns:
- the Generate Report
setGenerateReport
public void setGenerateReport(String generateReport)
- Sets the Generate Report parameter of this tool .
This is an optional parameter.
- Parameters:
generateReport
- null
getConceptualizationOfSpatialRelationships
public String getConceptualizationOfSpatialRelationships()
- Returns the Conceptualization of Spatial Relationships parameter of this tool .
This parameter is specifies how spatial relationships among features are conceptualized.
This is a required parameter.
- Returns:
- the Conceptualization of Spatial Relationships
setConceptualizationOfSpatialRelationships
public void setConceptualizationOfSpatialRelationships(String conceptualizationOfSpatialRelationships)
- Sets the Conceptualization of Spatial Relationships parameter of this tool .
This parameter is specifies how spatial relationships among features are conceptualized.
This is a required parameter.
- Parameters:
conceptualizationOfSpatialRelationships
- specifies how spatial relationships among features are conceptualized.
getDistanceMethod
public String getDistanceMethod()
- Returns the Distance Method parameter of this tool .
This parameter is specifies how distances are calculated from each feature to neighboring features.
This is a required parameter.
- Returns:
- the Distance Method
setDistanceMethod
public void setDistanceMethod(String distanceMethod)
- Sets the Distance Method parameter of this tool .
This parameter is specifies how distances are calculated from each feature to neighboring features.
This is a required parameter.
- Parameters:
distanceMethod
- specifies how distances are calculated from each feature to neighboring features.
getStandardization
public String getStandardization()
- Returns the Standardization parameter of this tool .
This parameter is row standardization is recommended whenever the distribution of your features is potentially biased due to sampling design or an imposed aggregation scheme.
This is a required parameter.
- Returns:
- the Standardization
setStandardization
public void setStandardization(String standardization)
- Sets the Standardization parameter of this tool .
This parameter is row standardization is recommended whenever the distribution of your features is potentially biased due to sampling design or an imposed aggregation scheme.
This is a required parameter.
- Parameters:
standardization
- row standardization is recommended whenever the distribution of your features is potentially biased due to sampling design or an imposed aggregation scheme.
getDistanceBandOrThresholdDistance
public double getDistanceBandOrThresholdDistance()
- Returns the Distance Band or Threshold Distance parameter of this tool .
This parameter is specifies a cutoff distance for Inverse Distance and Fixed Distance options. Features outside the specified cutoff for a target feature are ignored in analyses for that feature. However, for Zone of Indifference, the influence of features outside the given distance is reduced with distance, while those inside the distance threshold are equally considered. The value entered should match that of the output coordinate system. for the Inverse Distance conceptualizations of spatial relationships, a value of 0 indicates that no threshold distance is applied; when this parameter is left blank, a default threshold value is computed and applied. This default value is the Euclidean distance that ensures every feature has at least one neighbor. this parameter has no effect when Polygon Contiguity or Get Spatial Weights From File spatial conceptualizations are selected.
This is an optional parameter.
- Returns:
- the Distance Band or Threshold Distance
setDistanceBandOrThresholdDistance
public void setDistanceBandOrThresholdDistance(double distanceBandOrThresholdDistance)
- Sets the Distance Band or Threshold Distance parameter of this tool .
This parameter is specifies a cutoff distance for Inverse Distance and Fixed Distance options. Features outside the specified cutoff for a target feature are ignored in analyses for that feature. However, for Zone of Indifference, the influence of features outside the given distance is reduced with distance, while those inside the distance threshold are equally considered. The value entered should match that of the output coordinate system. for the Inverse Distance conceptualizations of spatial relationships, a value of 0 indicates that no threshold distance is applied; when this parameter is left blank, a default threshold value is computed and applied. This default value is the Euclidean distance that ensures every feature has at least one neighbor. this parameter has no effect when Polygon Contiguity or Get Spatial Weights From File spatial conceptualizations are selected.
This is an optional parameter.
- Parameters:
distanceBandOrThresholdDistance
- specifies a cutoff distance for Inverse Distance and Fixed Distance options. Features outside the specified cutoff for a target feature are ignored in analyses for that feature. However, for Zone of Indifference, the influence of features outside the given distance is reduced with distance, while those inside the distance threshold are equally considered. The value entered should match that of the output coordinate system. for the Inverse Distance conceptualizations of spatial relationships, a value of 0 indicates that no threshold distance is applied; when this parameter is left blank, a default threshold value is computed and applied. This default value is the Euclidean distance that ensures every feature has at least one neighbor. this parameter has no effect when Polygon Contiguity or Get Spatial Weights From File spatial conceptualizations are selected.
getWeightsMatrixFile
public Object getWeightsMatrixFile()
- Returns the Weights Matrix File parameter of this tool .
This parameter is the path to a file containing spatial weights that define spatial relationships among features.
This is an optional parameter.
- Returns:
- the Weights Matrix File
setWeightsMatrixFile
public void setWeightsMatrixFile(Object weightsMatrixFile)
- Sets the Weights Matrix File parameter of this tool .
This parameter is the path to a file containing spatial weights that define spatial relationships among features.
This is an optional parameter.
- Parameters:
weightsMatrixFile
- the path to a file containing spatial weights that define spatial relationships among features.
getObservedGeneralG
public double getObservedGeneralG()
- Returns the Observed General G parameter of this tool (Read only).
This is an derived parameter.
- Returns:
- the Observed General G
getZScore
public double getZScore()
- Returns the ZScore parameter of this tool (Read only).
This is an derived parameter.
- Returns:
- the ZScore
getPValue
public double getPValue()
- Returns the PValue parameter of this tool (Read only).
This is an derived parameter.
- Returns:
- the PValue
getHTMLReportFile
public Object getHTMLReportFile()
- Returns the HTML Report File parameter of this tool (Read only).
This is an derived parameter.
- Returns:
- the HTML Report File
getToolName
public String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias