资源预览内容
第1页 / 共22页
第2页 / 共22页
第3页 / 共22页
第4页 / 共22页
第5页 / 共22页
第6页 / 共22页
第7页 / 共22页
第8页 / 共22页
第9页 / 共22页
第10页 / 共22页
亲,该文档总共22页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
【051】 ArcEngine 实现空间分析实现空间分析1.熟悉 ITopologicalOperator 接口(用于空间拓扑运算)的使用 2.熟悉 IRelationalOperator 接口(用于空间关联运算)的使用 3.熟悉 IProximityOperator 接口(用于空间距离运算)的使用 目录:目录:A1 ITopologicalOperator5 接口接口公共方法公共方法:Buffer 方法方法:Boundary 方法方法:Clip 方法方法:ConvexHull 方法方法:Cut 方法方法:Union 方法方法:Intersect 方法方法:Difference 方法方法:A2 IRelationalOperator 接口接口公共方法公共方法:Contains 方法方法:Overlaps 方法方法:A3 IPoint 接口接口 A4 ICurve3 接口接口 A5 ISegment 接口接口 A6 ICircularArc 接口接口 - -写在前面:写在前面:使用空间分析的时候,会提示这样的错误“异常来自 HRESULT:0x80040215”,其 原因就是:在使用 ITopologicalOperator 求交集等操作的时候,有时会出现“ HRESULT:0x80040215”这个异常,原来是空间参考不一样所致。因此只要 SpatialReference 属性设为同一空间参考就不会出现“ HRESULT:0x80040215”异常。所以在进行空间分析之前,要保证所建立的 shapefile 文件具有相同的 SpatialReference!- - 第第 A1 个个 ITopologicalOperator5 接口接口:1. Provides additional information on non-simple geometries.【拓扑操作】MembersDescriptionBoundary返回值:IGeometryThe boundary of this geometry. A polygons boundary is a polyline. A polylines boundary is a multipoint. A point or multipoints boundary is an empty point or multipoint.Buffer(double distance)返回值:IGeometry Constructs a polygon that is the locus of points at a distance less than or equal to a specified distance from this geometry.通过给定距离,得到操作图形的缓冲区,返回得到缓冲区几何图形!但是这里面的距离很是蹊跷,同时实验发现,我写入 0.01 的时候,大约表示 1km,所以大约是 1:100 000 的关系!Clip(IEnvelope clipperEnvelope)Constructs the intersection of this geometry and the specified envelope.返回矩形部分的要素,直接作用在要素上面!ClipDenseConstructs the intersection of this geometry and the specified envelope; densifies lines in output contributed by the clipping envelope.ClipExConstructs the intersection of this geometry and the specified envelope.ClipToDomainClips the geometry to the domain of the spatial reference. Useful for ensuring that buffers can be fit within the spatial domain of the feature class to which they are being added.ConstructUnionDefines this geometry to be the union of the inputs. More efficient for unioning multiple geometries than calling Union repeatedly.ConvexHullConstructs the convex hull of this geometry.CutSplits this geometry into a part left of the cutting polyline, and a part right of it.Cut2Divides a geometry into multiple partsDifferenceConstructs the geometry containing points from this geometry but not the other geometry.GeoNormalizeExShifts longitudes, if need be, into a continuous range of 360 degrees.IntersectConstructs the geometry that is the set-theoretic intersection of the input geometries. Use different resultDimension values to generate results of different dimensions.IntersectMultidimensionConstructs the set-theoretic intersection of the inputs. The results are returned in a geometry bag with one element per result dimension.IsKnownSimpleIndicates whether this geometry is known (or assumed) to be topologically correct.IsKnownSimpleIndicates whether this geometry is known (or assumed) to be topologically correct.IsSimpleIndicates whether this geometry is known (or assumed) to be topologically correct, after explicitly determining this if the geometry is not already known (or assumed) to be simple.IsSimpleExDetermines why a geometry is not simple. Currently only implemented for polygons.QueryClippedRedefines clippedGeometry to be the intersection of this geometry and the clipping envelope.QueryClippedDenseRedefines clippedGeometry to be the intersection of this geometry and the clipping envelope; densifies lines in the output contributed by the clipping envelope.SimplifyMakes this geometry topologically correct.SymmetricDifferenceConstructs the geometry that contains points from either but not both input geometries.UnionConstructs the geometry that is the set-theoretic union of the input geometries.CoClasses that implement ITopologicalOperatorCoClasses and ClassesDescriptionGeoEllipse (esriDefenseSolutions)Its a spheroidal ellipse.GeometryBagAn ordered collection of objects that support the IGeometry interface.GeoPolygon (esriDefenseSolutions)Its a spheroidal polygon.GeoPolyline (esriDefenseSolutions)This is a spheroidal polyline.MultiPatchA collection of surface patches.MultipointAn ordered collection of points; optionally has measure, height and ID attributes.PointA two dimensional point, optionally with measure, height, and ID attributes.PolygonA collection of rings ordered by their containment relationship; optionally has measure, height and ID attributes.PolylineAn ordered collection of paths; optionally has measure, height and ID attributes. | 公共代码部分:公共代码部分:/公共变量!IMap pMap;IActiveView pActiveView;IEnvelope pEnv;ISelectionEnvironment pSelectionEnv;IEnumFeature pEnumFeature;IGraphicsContainer pGraphicsContainer;IFeature pFeature;IGeometry pGeometry;IEnvelope pEnvClip;IPolyline pLineC
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号