Hello,
I am trying to run a "simple" Getis-Ord analysis on a feature class using the Geoprocessor object, and can't seem to figure out what the problem is. I am getting the dreaded HRESULT E_FAIL error. I also have dissolved buffer, and explode multi-part geoprocessor methods that run without problem.
Has anyone used this tool before with ArcObjects? It just fails on Execute with no error. I've tried many variations of the parameters, but it tells me nothing.
I am trying to run a "simple" Getis-Ord analysis on a feature class using the Geoprocessor object, and can't seem to figure out what the problem is. I am getting the dreaded HRESULT E_FAIL error. I also have dissolved buffer, and explode multi-part geoprocessor methods that run without problem.
Code:
public static void PerformGetisOrdAnalysis(this Geoprocessor gp, string inFeature, string field, string outFeature)
{
HotSpots getisOrd = new HotSpots();
getisOrd.Input_Feature_Class = DatabaseUtils._scratchWorkspace.OpenFeatureClass(inFeature); // input feature class
getisOrd.Input_Field = field;
getisOrd.Output_Feature_Class = DatabaseUtils.FGDBPath + "\\" + outFeature; // location of output feature class
getisOrd.Conceptualization_of_Spatial_Relationships = "INVERSE_DISTANCE";
getisOrd.Distance_Method = "EUCLIDEAN_DISTANCE";
getisOrd.Standardization = "NONE";
getisOrd.Distance_Band_or_Threshold_Distance = 200;
gp.Execute(getisOrd, null);
if (gp.MessageCount > 0)
{
for (int Count = 0; Count <= gp.MessageCount - 1; Count++)
{
FormHelper.SendMessage(gp.GetMessage(Count));
}
}
FormHelper.PerformCurrentUpdate(10);
}