Arcengine Spatial Analysis:
What I know at the moment is:
1, geoprocessor use the relevant tools in the ESRI.ARCGIS.AnalysisTools for clip,interset,identity operation:
Take clip for example as follows:
String Ioutpath = Mlstr + xzshpstr;
Geoprocessor g = new Geoprocessor ();
G.overwriteoutput = true;
ESRI. ArcGIS.AnalysisTools.Clip Clip = new ESRI. ArcGIS.AnalysisTools.Clip ();
Clip.in_features = IFEATURECLASSXZ;
Clip.clip_features = IFEATURECLASSTB;
Clip.out_feature_class = Ioutpath;
Igeoprocessorresult Igresult = new Geoprocessorresultclass ();
Igresult = g.execute (clip, null) as Igeoprocessorresult;
Note: In the Arcengine file path, if there is no error, the file is occupied also error, generally for the path operation of the file, using the relevant classes in system to obtain an accurate path string and then used in Arcengine.
The above method is tested and can be used.
2. Using Ibasicgeoprocessor
3. Using Itopologyoperator
has never been used.
To modify the spatial reference of a feature set in Arcengine:
1. A feature class in the SDE database can only modify the spatial reference of a feature set if it is part of a feature set. (now think of pure nonsense, but this problem still bothers me good few moments)
2. An example:
Igeodataset Ifeatureclassds = Ifeatureclass as Igeodataset;
Igeodatasetschemaedit Igeoedit = Ifeatureclassds as Igeodatasetschemaedit;
if (igeoedit.canalterspatialreference)
{
Ispatialreferencefactory ispreferencefactory = new Spatialreferenceenvironmentclass ();
Iprojectedcoordinatesystem Ipcoorsys = Ispreferencefactory.createprojectedcoordinatesystem (2383),//2362xian 80 38 degree band 2383 Xian 114
Igeoedit.alterspatialreference (Ipcoorsys);
}
The number for the coordinate system can be found on a Web site:
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/esriSRProjCS3Type_Constants/ 002m0000003n000000/
Esrisrprojcs_wgs1984webmercatormajorauxsphere, 3857, WGS 1984 Web Mercator Major auxilliary Sphere
C # for Arcengine Development 2