Intersect Inter = new Intersect(); Inter.in_features = features; Inter.out_feature_class = 'result.shp'; gp.Execute(Inter, null);
ESRI.ArcGIS.Geoprocessor.Geoprocessor GP = new ESRI.ArcGIS.Geoprocessor.Geoprocessor(); GP.OverwriteOutput = true; IGPUtilities2 gpUtils = new GPUtilitiesClass(); IFeatureClass inFeature1 = gpUtils.OpenFeatureClassFromString(@E:\Test.gdb\states); IFeatureClass inFeature2 = gpUtils.OpenFeatureClassFromString(@E:\Test.gdb\us_rivers); IGpValueTableObject vt = new GpValueTableObjectClass(); //vt.SetColumns(1); vt.SetColumns(2); object weight; weight = 1 as object; object obj1 = inFeature1; vt.AddRow(ref obj1); vt.SetValue(0, 1, ref weight); object obj2 = inFeature2; vt.AddRow(ref obj2); vt.SetValue(1, 1, ref weight); ESRI.ArcGIS.AnalysisTools.Intersect intersect = new ESRI.ArcGIS.AnalysisTools.Intersect(); intersect.in_features = vt; intersect.out_feature_class = "E:\testout.shp"; GP.Execute(intersect, null);
Geoprocessor gp = new Geoprocessor(); Intersect Inter = new Intersect(); string[] features = {"c:\\shape1.shp", "c:\\shape2.shp"} ; Inter.in_features = features as object; Inter.out_feature_class = "c:\\result.shp"; gp.Execute(Inter, null);
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.