ArcGIS Engine 开发 执行CreateFishnet GP工具

工具与运行报错
已邀请:

岳官印

赞同来自:

【解决办法】:
IFeatureClass pFeatureClass = OpenShp_featureclass();
IGeoDataset pGeoDataset = pFeatureClass as IGeoDataset;
double xmin = pGeoDataset.Extent.XMin;
double xmax = pGeoDataset.Extent.XMax;
double ymin = pGeoDataset.Extent.YMin;
double ymax = pGeoDataset.Extent.YMax;
Geoprocessor gp = new Geoprocessor();
gp.OverwriteOutput = true;
CreateFishnet pCF = new CreateFishnet();
pCF.out_feature_class = @D:\data\new folder\66666.shp;
pCF.origin_coord = xmin.ToString() + + ymin.ToString();
pCF.y_axis_coord = xmin.ToString() + + ymax.ToString();
//pCF.cell_width = 0;
//pCF.cell_width = 0;
pCF.number_rows = 10;
pCF.number_columns = 10;
pCF.corner_coord = xmax.ToString() + + ymax.ToString(); ;
pCF.labels = LABELS;
//pCF.template = ''#'';
pCF.geometry_type = POLYGON;
gp.Execute(pCF, null);

要回复问题请先登录注册