C # for Arcengine Development 2

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.