【025】◀▶ ArcObjects 类库(二)
ArcObjects 类库(二)
---------------------------------------------------------------------------------------------------------
●·● 目录:
Geometry 命名空间
A1 ………… IGeometry 接口
IGeometryCollection 接口
A2 ………… IEnvelope 接口
A3 ………… IPoint 接口
A4 ………… ICurve3 接口
A5 ………… ISegment 接口
A6 ………… ICircularArc 接口
IConstructCircularArc2 接口
A7 ………… ILine2 接口
A8 ………… IEllipticArc 接口
A9 ………… IBezierCurve3 接口
Aa ………… IPath 接口
Ab ………… IRing2 接口
Ac ………… IPolycurve2 接口
Ad ………… IPolyline6 接口
Ae ………… IPolygon4 接口
Af ………… ITopologicalOperator5 接口
Ag ………… IArea 接口
Ah ………… ISegmentCollection 接口
Ai ………… ISpatialReferenceFactory3 接口
Aj ………… IGeographicCoordinateSystemEdit 接口
Ak ………… IGeographicCoordinateSystem2 接口
Al ………… IProjectedCoordinateSystemEdit 接口
Am………… IProjectedCoordinateSystem5 接口
An ………… IVerticalCoordinateSystemEdit 接口
Ao ………… IVerticalCoordinateSystem 接口
Ap ………… IRelationalOperator 接口
Aq ………… IRelationalOperator 接口
Ar ………… IRelationalOperator 接口
As ………… IRelationalOperator 接口
At ………… IRelationalOperator 接口
Display 命名空间
G1 ………… IRgbColor 接口
G2 ………… ISimpleLineSymbol 接口
G3 ………… ISimpleFillSymbol 接口
G4 ………… IDisplayTransformation 接口
G5 ………… IScreenDisplay 接口
G6 ………… ITextSymbol 接口
G7 ………… IRgbColor 接口
G8 ………… ISimpleLineSymbol 接口
G9 ………… ISimpleFillSymbol 接口
Ga ………… IDisplayTransformation 接口
Gb ………… IScreenDisplay 接口
Gc ………… ITextSymbol 接口
Gd ………… FileSystemInfo 接口
---------------------------------------------------------------------------------------------------------
●·● Geometry 命名空间
1. Geometry 类库中提供了和矢量的几何体相关的对象,例如:点、线、面、三维模型等。矢量数据由最小的单元点组成,每个点都有 x、y、z、m 四个坐标值,z 表示高程,m 值表示测量值,一般用来存储里程值。对几何体的创建和修改,以及几何体之间的空间分析都通过该类库来实现。下图为一个点、线、面等对象之间的关系。
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第A1个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IGeometry 接口:
1. Provides access to members that describe properties and behavior of all geometric objects. Note: the IGeometry interface has been superseded byIGeometry5. Please consider using the more recent version.
Common properties and methods shared by all geometric objects. Geometries are objects that define a spatial location and an associated geometric shape.
CoClasses that implement IGeometry
CoClasses and Classes | Description |
---|---|
BezierCurve | A cubic Bezier curve defined between two points; optionally has measure, height and ID attributes at each endpoint. |
CircularArc | A portion of a circle that connects two points optionally has measure, height and ID attributes at each endpoint. |
EllipticArc | A portion of the boundary of a 2D ellipse that connects two points; optionally has measure, height and ID attributes at each endpoint. |
Envelope | A rectangle with sides parallel to a coordinate system defining the extent of another geometry; optionally has min and max measure, height and ID attributes. |
GeoEllipse (esriDefenseSolutions) | Its a spheroidal ellipse. |
GeometryBag | An ordered collection of objects that support the IGeometry interface. |
GeoPolygon (esriDefenseSolutions) | Its a spheroidal polygon. |
GeoPolyline (esriDefenseSolutions) | This is a spheroidal polyline. |
Line | A 2D straight line between a pair of 2D endpoints; can optionally have height, measure and ID attributes at each endpoint. |
MultiPatch | A collection of surface patches. |
Multipoint | An ordered collection of points; optionally has measure, height and ID attributes. |
Path | A sequence of connected segments. |
Point | A two dimensional point, optionally with measure, height, and ID attributes. |
Polygon | A collection of rings ordered by their containment relationship; optionally has measure, height and ID attributes. |
Polyline | An ordered collection of paths; optionally has measure, height and ID attributes. |
Ray | A 3D ray that begins at a point and extends infinitely along a line in one direction only. |
Ring | An area bounded by one, closed sequence of connected segments; optionally has measure, height and ID attributes at each vertex. |
Sphere | A complete sphere. |
TriangleFan | A continuous 3D fan of triangles, where each triangle after the first shares an edge with the preceding triangle, and all triangles share a common pivot point. |
Triangles | A collection of 3D triangles, where each consecutive triplet of vertices defines a new triangle |
TriangleStrip | A continuous 3D strip of triangles, where each triangle after the first shares an edge with the preceding triangle. |
2. 属性和方法:
Description | ||
---|---|---|
Dimension | The topological dimension of this geometry. | |
Envelope | Creates a copy of this geometry's envelope and returns it. | |
GeometryType esriGeometryType 枚举 |
The type of this geometry. 空、点、多点、线、圆、椭圆、贝塞尔、路径、折线、环、多边形…… |
|
GeoNormalize | Shifts longitudes, if need be, into a continuous range of 360 degrees. | |
GeoNormalizeFromLongitude | Normalizes longitudes into a continuous range containing the longitude. This method is obsolete. | |
IsEmpty | Indicates whether this geometry contains any points. | |
Project | Projects this geometry into a new spatial reference. | |
QueryEnvelope | Copies this geometry's envelope properties into the specified envelope. | |
SetEmpty | Removes all points from this geometry. | |
SnapToSpatialReference | Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system. | |
SpatialReference | The spatial reference associated with this geometry. |
---------------------------------------------------------------------------------------------------------
●·● IGeometryCollection 接口:
1. Provides access to members that can be used for accessing, adding and removing individual geometries of a multi-part geometry (Multipoint, Polyline, Polygon, MultiPatch, and GeometryBag).
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第A2个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IEnvelope 接口:
1. Provides access to methods and properties of envelopes. Note: the IEnvelope interface has been superseded byIEnvelope2. Please consider using the more recent version.
Envelopes are the rectangular window that contain a specific element. All Geometry objects have an envelope defined by the XMin, XMax, YMin, and YMax of the object. Envelopes can also serve as the viewing area for a particular view screen or data frame.
Inherited Interface:IGeometry
Envelope:CoClass
2. 属性和方法:
属性和方法 | Description | |
---|---|---|
CenterAt | Moves this envelope so it is centered at p. | |
DefineFromPoints | Defines the envelope to cover all the points. | |
Depth | The depth of the envelope. | |
Dimension | The topological dimension of this geometry. | |
Envelope | Creates a copy of this geometry's envelope and returns it. | |
Expand (double dx, double dy, bool asRatio) |
Moves the X and Y coordinates of the sides toward or away from each other. dx, dy 取大于1的数是缩小,取小于1的数是放大。 iEnv.Expand(0.5, 0.5, true); //放大 |
|
ExpandM | Moves the measure of the sides toward or away from each other. | |
ExpandZ | Moves the Z attribute of the sides toward or away from each other. | |
GeometryType | The type of this geometry. | |
GeoNormalize | Shifts longitudes, if need be, into a continuous range of 360 degrees. | |
GeoNormalizeFromLongitude | Normalizes longitudes into a continuous range containing the longitude. This method is obsolete. | |
Height | The height of the envelope. | |
Intersect | Adjusts to include only the area also included by inEnvelope. | |
IsEmpty | Indicates whether this geometry contains any points. | |
LowerLeft | The lower left corner. | |
LowerRight | The lower right corner. | |
MMax | The maximum measure value in the area of the envelope. | |
MMin | The minimum measure value in the area of the envelope. | |
Offset | Moves the sides x units horizontally and y units vertically. | |
OffsetM | Moves the sides m units. | |
OffsetZ | Moves the sides z units. | |
Project | Projects this geometry into a new spatial reference. | |
PutCoords | Constructs an envelope from the coordinate values of lower, left and upper, right corners. | |
QueryCoords | Returns the coordinates of lower, left and upper, right corners. | |
QueryEnvelope | Copies this geometry's envelope properties into the specified envelope. | |
SetEmpty | Removes all points from this geometry. | |
SnapToSpatialReference | Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system. | |
SpatialReference | The spatial reference associated with this geometry. | |
Union (IEnvelope inEnvelope) |
Adjusts to overlap inEnvelope. 注意在用的时候,union的主体不能为null,否则会出错的~! |
|
UpperLeft | The upper left corner. | |
UpperRight | The upper right corner. | |
Width | The width of the envelope. | |
XMax | The position of the right side. 获取最大的地图横坐标. |
|
XMin | The position of the left side. 获取最小的地图横坐标. |
|
YMax | The position of the top. | |
YMin | The position of the bottom. | |
ZMax | The maximum Z value in the area of the envelope. | |
ZMin | The minimum Z value in the area of the envelope. |
利用union的方法,实现缩放到选择的要素
首先:获取选择要素的OID值~
然后:将所有的envelope合并到一起~
最后:实现、刷新~
private void 缩放到所有选择要素ToolStripMenuItem_Click(object sender, EventArgs e) { DataGridViewSelectedRowCollection selectRows = dataGridView1.SelectedRows; //重新将选择的行排序 List<string> OIDList = new List<string>(); string strOID = string.Empty; for (int i = 0; i < selectRows.Count;i++ ) { DataGridViewRow row = selectRows[i]; strOID = row.Cells[strOBJECTID].Value.ToString(); //将重新排序的OID值提取出来 OIDList.Add(strOID); } string[] OIDArray = OIDList.ToArray(); if (OIDArray.Length == 0) return; //若是没有选择要素,则返回 IFeatureClass pFeatureClass = pLayer.FeatureClass; IFeature pFeature = null; IEnvelope wholeEnvelope = pFeatureClass.GetFeature(Convert.ToInt32(OIDArray[0])).Shape.Envelope; //要给其先赋值一个envelope,否则后面没办法union! IEnvelope featureEnvelpe = null; for (int i = 1; i < OIDArray.Length;i++ ) { pFeature = pFeatureClass.GetFeature(Convert.ToInt32(OIDArray[i])); featureEnvelpe = pFeature.Shape.Envelope; wholeEnvelope.Union(featureEnvelpe); } pMapControl.Extent = wholeEnvelope; pMapControl.ActiveView.Refresh(); }
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第A3个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IPoint 接口:
1. Provides access to members that define two dimensional points.【点】
A Point is a zero-dimensional object that represents a specific (X, Y) location in a the two-dimensional XY-Plane. A Point may also have Z, M, and ID attributes associated with it. Existence of attributes does not alter the dimensionality of a Point nor does it alter geometric calculations performed on the Point. Attributes are only considered for attribute calculations when the Point is ZAware, MAware, or PointIDAware. Points may be constructed using PutCoords, individually setting the X and Y properties, or using the IConstructPoint interface.
Inherited Interface:IGeometry
Point:CoClass
2. 属性和方法:
属性和方法 | Description | |
---|---|---|
Compare | Compares X, Y, M, Z, ID of this point (in that order) with that of the other point. Returns -1 if this point's value is less, 1 if greater, and 0 otherwise. Useful for sorting a group of points. | |
ConstrainAngle | Projects this point to the point on the infinite line defined by anchor and angle (in radians). If allowOpposite is true, then the point can also snap to angle + pi radians. | |
ConstrainDistance | Projects this point to the perimeter of the circle defined by radius and anchor. | |
Dimension | The topological dimension of this geometry. | |
Envelope | Creates a copy of this geometry's envelope and returns it. | |
GeometryType | The type of this geometry. | |
GeoNormalize | Shifts longitudes, if need be, into a continuous range of 360 degrees. | |
GeoNormalizeFromLongitude | Normalizes longitudes into a continuous range containing the longitude. This method is obsolete. | |
ID | The Point ID attribute. | |
IsEmpty | Indicates whether this geometry contains any points. | |
M | The measure attribute. | |
Project | Projects this geometry into a new spatial reference. | |
PutCoords (double x, double y) |
Sets the X and Y coordinates. 设置横纵坐标,既可以是像素坐标、也可以是地理坐标。 |
|
QueryCoords | Returns the X and Y coordinates. | |
QueryEnvelope | Copies this geometry's envelope properties into the specified envelope. | |
SetEmpty | Removes all points from this geometry. | |
SnapToSpatialReference | Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system. | |
SpatialReference | The spatial reference associated with this geometry. | |
X | The X coordinate. | |
Y | The Y coordinate. | |
Z | The Z attribute. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第A4个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● ICurve3 接口:
1. Provides access to members that extend the functionality of one dimensional curves. 【曲线】
CoClasses that implement ICurve3
CoClasses and Classes | Description |
---|---|
BezierCurve | A cubic Bezier curve defined between two points; optionally has measure, height and ID attributes at each endpoint. |
CircularArc | A portion of a circle that connects two points optionally has measure, height and ID attributes at each endpoint. |
EllipticArc | A portion of the boundary of a 2D ellipse that connects two points; optionally has measure, height and ID attributes at each endpoint. |
Line | A 2D straight line between a pair of 2D endpoints; can optionally have height, measure and ID attributes at each endpoint. |
Polyline | An ordered collection of paths; optionally has measure, height and ID attributes. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第A5个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● ISegment 接口:
1. Provides access to members that identify a segment. A segment is a way of getting between two endpoints.【两点之间的线】
CoClasses that implement ISegment
CoClasses and Classes | Description |
---|---|
BezierCurve | A cubic Bezier curve defined between two points; optionally has measure, height and ID attributes at each endpoint. |
CircularArc | A portion of a circle that connects two points optionally has measure, height and ID attributes at each endpoint. |
EllipticArc | A portion of the boundary of a 2D ellipse that connects two points; optionally has measure, height and ID attributes at each endpoint. |
Line | A 2D straight line between a pair of 2D endpoints; can optionally have height, measure and ID attributes at each endpoint. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第A6个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● ICircularArc 接口:
1. Provides access to members that control properties of circular arcs.【圆弧】
A CircularArc is an object that describes any portion of a circle. The size of the CircularArc is determined by the length of the Radius and the Central Angle. CircularArcs can be constructed by numerous different methods given a wide variety of input parameters. A CircularArc differs from an EllipticArc in that every point along the CircularArc must be a fixed distance (the Radius) from the CenterPoint.
---------------------------------------------------------------------------------------------------------
●·● IConstructCircularArc2 接口:
1. Provides access to members that construct a circular arc using other geometries and values.【用其他的几何体创建圆弧】
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第A7个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● ILine2 接口:
1. Provides access to the coordinates of a line segment in the form of Well Known Structures (WKS).【有起始点与终止点的直线段】
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第A8个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IEllipticArc 接口:
1. Provides access to members that control properties of elliptic arc segments.【椭圆弧线】
An Elliptic Arc is an object that describes any portion of an ellipse. The Major axis of the Elliptic Arc is the largest axis spanning between points on opposite sides of the ellipse. The Minor axis is the perpendicular bisector of the Major axis. Together, the Major and Minor axes determine the full ellipse on which the Elliptic Arc is generated. These parameters may also be specified in terms of the semi-Major axis (half of the Major axis) and the MinorMajorRatio (the ratio of the Minor axis to the Major axis). The ellipse may also be rotated. Rotation is described by the Rotation Angle. However, the effect of the Rotation Angle depends on the value of EllipseStd. If EllipseStd is TRUE, all angles and axes are calculated with respect to the Major Axis as though the Major Axis was at 0 radians. Also, the location of the From Point and To Point are given relative to the Center Point as though it is the origin. If EllipseStd is FALSE, all angles are caluclated in standard Cartesian coordinates. The portion of the complete ellipse represented by the Elliptic Arc is determined by the From Angle and Central Angle, both measured in radians.
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第A9个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IBezierCurve3 接口:
1. Provides access to members that identify third degree bezier curve segments and defines their properties.【贝塞尔曲线】
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Aa个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IPath 接口:
1. Provides access to members that identify a path and define its behavior.【由多个连续的 segment 组成】
A Path is a connected, continuous sequence of Segments. Except for the first and last Segments in the Path, each segment shares its FromPoint with the ToPoint of the previous Segment, and shares its ToPoint with the FromPoint of the following Segment.
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Ab个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IRing2 接口:
1. Provides extended access to members that identify a ring and define its behavior.【起始点与终止点重合的 path】
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Ac个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IPolycurve2 接口:
1. Provides access to members that extend IPolycurve with additional splitting and densification methods. Note: the IPolycurve2 interface has been superseded byIPolycurve3. Please consider using the more recent version.【polyline 与polygon 的边框线】
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Ad个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IPolyline6 接口:
1. Provides access to members that extend a polyline object.【相连、不相连,各种线都可以】
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Ae个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IPolygon4 接口:
1. Provides access to members that extend the IPolygon3 interface.【多边形边界,可以看成封闭的 polyline】
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Af个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● ITopologicalOperator5 接口:
1. Provides additional information on non-simple geometries.【拓扑操作】
Members
Description | ||
---|---|---|
Boundary 返回值:IGeometry |
The boundary of this geometry. A polygon's boundary is a polyline. A polyline's boundary is a multipoint. A point or multipoint's 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. 通过给定距离,得到操作图形的缓冲区,返回得到缓冲区几何图形! |
|
Clip (IEnvelope clipperEnvelope) |
Constructs the intersection of this geometry and the specified envelope. 返回矩形部分的要素,直接作用在要素上面! |
|
ClipDense | Constructs the intersection of this geometry and the specified envelope; densifies lines in output contributed by the clipping envelope. | |
ClipEx | Constructs the intersection of this geometry and the specified envelope. | |
ClipToDomain | Clips 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. | |
ConstructUnion | Defines this geometry to be the union of the inputs. More efficient for unioning multiple geometries than calling Union repeatedly. | |
ConvexHull | Constructs the convex hull of this geometry. | |
Cut (IPolyline cutter, ref IGeometry leftGeom, ref IGeometry rightGeom) |
Splits this geometry into a part left of the cutting polyline, and a part right of it. 通过给定的 cutter 来分割,同时得到操作几何的 leftGeom 和 rightGeom。 |
|
Cut2 | Divides a geometry into multiple parts | |
Difference | Constructs the geometry containing points from this geometry but not the other geometry. | |
GeoNormalizeEx | Shifts longitudes, if need be, into a continuous range of 360 degrees. | |
Intersect | Constructs the geometry that is the set-theoretic intersection of the input geometries. Use different resultDimension values to generate results of different dimensions. | |
IntersectMultidimension | Constructs the set-theoretic intersection of the inputs. The results are returned in a geometry bag with one element per result dimension. | |
IsKnownSimple | Indicates whether this geometry is known (or assumed) to be topologically correct. | |
IsKnownSimple | Indicates whether this geometry is known (or assumed) to be topologically correct. | |
IsSimple | Indicates 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. | |
IsSimpleEx | Determines why a geometry is not simple. Currently only implemented for polygons. | |
QueryClipped | Redefines clippedGeometry to be the intersection of this geometry and the clipping envelope. | |
QueryClippedDense | Redefines clippedGeometry to be the intersection of this geometry and the clipping envelope; densifies lines in the output contributed by the clipping envelope. | |
Simplify | Makes this geometry topologically correct. | |
SymmetricDifference | Constructs the geometry that contains points from either but not both input geometries. | |
Union (IGeometry other) 返回值:IGeometry |
Constructs the geometry that is the set-theoretic union of the input geometries. 将操作几何图形与 other 结合到一起,形成新的几何图形,对原图形不做改变! |
CoClasses that implement ITopologicalOperator
CoClasses and Classes | Description |
---|---|
GeoEllipse (esriDefenseSolutions) | Its a spheroidal ellipse. |
GeometryBag | An ordered collection of objects that support the IGeometry interface. |
GeoPolygon (esriDefenseSolutions) | Its a spheroidal polygon. |
GeoPolyline (esriDefenseSolutions) | This is a spheroidal polyline. |
MultiPatch | A collection of surface patches. |
Multipoint | An ordered collection of points; optionally has measure, height and ID attributes. |
Point | A two dimensional point, optionally with measure, height, and ID attributes. |
Polygon | A collection of rings ordered by their containment relationship; optionally has measure, height and ID attributes. |
Polyline | An ordered collection of paths; optionally has measure, height and ID attributes. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Ag个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IArea 接口:
1. Provides access to members that return properties common to rings and polygons.【封闭图形才有能实现 IArea 接口】
Use the IArea interface to get the Area of a Geometry. It can also be used to get the Centroid point and Labelpoint for a Geometry.
Members
Description | ||
---|---|---|
Area | The area. | |
Centroid | The center of gravity (centroid). | |
LabelPoint | A point guaranteed to be inside this area. | |
QueryCentroid | Copies the centroid of this area to the specified point. | |
QueryLabelPoint | Copies to the input point a point guaranteed to be inside this area. |
CoClasses that implement IArea
CoClasses and Classes | Description |
---|---|
Envelope | A rectangle with sides parallel to a coordinate system defining the extent of another geometry; optionally has min and max measure, height and ID attributes. |
GeoEllipse (esriDefenseSolutions) | Its a spheroidal ellipse. |
GeoPolygon (esriDefenseSolutions) | Its a spheroidal polygon. |
MultiPatch | A collection of surface patches. |
Polygon | A collection of rings ordered by their containment relationship; optionally has measure, height and ID attributes. |
Ring | An area bounded by one, closed sequence of connected segments; optionally has measure, height and ID attributes at each vertex. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Ah个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● ISegmentCollection 接口:
1. Provides access to members that manipulate the segments of a path, ring, polyline, or polygon.【段的集合】
m_ActiveView = m_hookHelper.ActiveView; m_Map = m_hookHelper.FocusMap; IScreenDisplay pScreenDisplay = m_ActiveView.ScreenDisplay; IRubberBand pRubberCircle = new RubberCircleClass(); ISimpleFillSymbol pFillSymbol = new SimpleFillSymbolClass(); pFillSymbol.Color = getRGB(255, 255, 0); IGeometry pCircle = pRubberCircle.TrackNew(pScreenDisplay, (ISymbol)pFillSymbol) as IGeometry; IPolygon pPolygon = new PolygonClass(); //空的多边形 ISegmentCollection pSegmentCollection = pPolygon as ISegmentCollection; //段集合 ISegment pSegment = pCircle as ISegment; //将圆赋值给段 object missing = Type.Missing; //显示默认值 pSegmentCollection.AddSegment(pSegment, ref missing, ref missing); //给空多边形加入圆 pFillSymbol.Style = esriSimpleFillStyle.esriSFSDiagonalCross; pFillSymbol.Color = getRGB(0, 255, 255); IFillShapeElement pPolygonEle = new PolygonElementClass(); pPolygonEle.Symbol = pFillSymbol; IElement pEle = pPolygonEle as IElement; pEle.Geometry = pPolygon; IGraphicsContainer pGraphicsContainer = m_Map as IGraphicsContainer; pGraphicsContainer.AddElement(pEle, 0); m_ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Ai 个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● ISpatialReferenceFactory3 接口:
1. Provides access to members that create vertical datums or coordinate systems.
可以用此属性来创建很多与空间参考相关的值,例如 Datum、Prime Meridian、Unit 等!
ISpatialReferenceFactory3 spatialReferenceFactory = new SpatialReferenceEnvironmentClass(); IDatum datum = spatialReferenceFactory.CreateDatum((int)esriSRDatumType.esriSRDatum_OSGB1936); IPrimeMeridian primeMeridian = spatialReferenceFactory.CreatePrimeMeridian((int)esriSRPrimeMType.esriSRPrimeM_Greenwich); IUnit unit = spatialReferenceFactory.CreateUnit((int)esriSRUnitType.esriSRUnit_Degree);
CoClasses that implement ISpatialReferenceFactory3
CoClasses and Classes | Description |
---|---|
SpatialReferenceEnvironment | Creates various spatial reference objects. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Aj 个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IGeographicCoordinateSystemEdit 接口:
1. Provides access to members that control the properties for a geographic coordinate system.【实现定义】
Members
Description | ||
---|---|---|
Define (ref object Name, ref object Alias, ref object Abbreviation, ref object Remarks, ref object useage, ref object Datum, ref object PrimeMeridian, ref object geographicUnit) |
Defines the properties for a geographic coordinate system. | |
DefineEx | Defines the properties for a geographic coordinate system. |
CoClasses that implement IGeographicCoordinateSystemEdit
CoClasses and Classes | Description |
---|---|
GeographicCoordinateSystem | Creates a geographic coordinate system. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Ak个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IGeographicCoordinateSystem2 接口:
1. Provides access to members that control additional properties and methods for all geographic coordinate systems.
CoClasses that implement IGeographicCoordinateSystemEdit
CoClasses and Classes | Description |
---|---|
GeographicCoordinateSystem | Creates a geographic coordinate system. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Al 个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IProjectedCoordinateSystemEdit 接口:
1. Provides access to members that control the properties of a projected coordinate system.
CoClasses that implement IProjectedCoordinateSystem5
CoClasses and Classes | Description |
---|---|
ProjectedCoordinateSystem | Creates a projected coordinate system. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Am个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IProjectedCoordinateSystem5 接口:
1. Provides access to members that control additional properties and methods for projected coordinate systems.
CoClasses that implement IProjectedCoordinateSystem5
CoClasses and Classes | Description |
---|---|
ProjectedCoordinateSystem | Creates a projected coordinate system. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第An个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IVerticalCoordinateSystemEdit 接口:
1. Provides access to members that control the properties of a vertical coordinate system.
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Ao个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IVerticalCoordinateSystem 接口:
1. Provides access to members that control the properties of a vertical coordinate system.
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Ap个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IRelationalOperator 接口:
1. Provides access to members that determine if a certain spatial relationship exists between two geometries.
Members
Description | ||
---|---|---|
Contains (IGeometry other) 返回值:bool |
Indicates if this geometry contains the other geometry. 表明该几何图形是否包含other几何图形? |
|
Crosses | Indicates if the two geometries intersect in a geometry of lesser dimension. | |
Disjoint | Indicates if the two geometries share no points in common. Negate this result to compute the Intersect relation. | |
Equals | Indicates if the two geometries are of the same type and define the same set of points in the plane. | |
Overlaps | Indicates if the intersection of the two geometries has the same dimension as one of the input geometries. | |
Relation | Indicates if the defined relationship exists. | |
Touches | Indicates if the boundaries of the geometries intersect. | |
Within | Indicates if this geometry is contained (is within) another geometry. |
CoClasses that implement IRelationalOperator
CoClasses and Classes | Description |
---|---|
Envelope | A rectangle with sides parallel to a coordinate system defining the extent of another geometry; optionally has min and max measure, height and ID attributes. |
GeometryBag | An ordered collection of objects that support the IGeometry interface. |
MultiPatch | A collection of surface patches. |
Multipoint | An ordered collection of points; optionally has measure, height and ID attributes. |
Point | A two dimensional point, optionally with measure, height, and ID attributes. |
Polygon | A collection of rings ordered by their containment relationship; optionally has measure, height and ID attributes. |
Polyline | An ordered collection of paths; optionally has measure, height and ID attributes. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Aq个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IRelationalOperator 接口:
1. Provides access to members that control the properties of a vertical coordinate system.
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第Ar个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IRelationalOperator 接口:
1. Provides access to members that control the properties of a vertical coordinate system.
---------------------------------------------------------------------------------------------------------
●·● Display 命名空间
1. DataSourcesFile 类库中提供了文件型数据的访问。基于文件的数据源有:shapefile、coverage、TIN、CAD 等。不同的数据源通过各自的工作空间工厂来访问。
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第G1个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IRgbColor 接口:
1. Provides access to members that control the RGB color values.
IRgbColor maintains information about a Color by using the RGB (Red, Green, Blue) color model.
Inherited Interface:IColor
RgbColor:CoClass
2. 属性和方法:
属性和方法 | Description | |
---|---|---|
Blue | The blue component of an IRgbColor (0-255). | |
CMYK | The CMYK value of color. | |
GetCIELAB | The CIELAB value of color. | |
Green | The green component of an IRgbColor (0-255). | |
NullColor | Indicates whether this color is null. | |
Red | The red component of an IRgbColor (0-255). | |
RGB | The RGB value of color. | |
SetCIELAB | The CIELAB value of color. | |
Transparency 返回值: byte |
The Alpha Blending value. (0 for transparent, 255 for opaque [əu'peik] 【不透明】). | |
UseWindowsDithering | Indicates if colors should be dithered to simulate colors that aren't supported by the display. This only applies on displays that have 256 or fewer colors. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第G2个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● ISimpleLineSymbol 接口:
1. Provides access to members that control the simple line symbol.
ISimpleLineSymbol is used to create a line symbol comprised of a predefinded set of styles. The availble styles are provided by the esriSimpleLineStyle enumeration. Use the ILineSymbol interface to set additional properties for ISimpleLineSymbols.
Inherited Interface:ILineSymbol
SimpleLineSymbol:CoClass
2. 属性和方法:
属性和方法 | Description | |
---|---|---|
Color | Line symbol color. | |
Style | The style of the line symbol. | |
Width | Line symbol width. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第G3个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● ISimpleFillSymbol 接口:
1. Provides access to members that control the simple fill symbol.
ISimpleFillSymbol is used to create a fill symbol comprised of a predefined set of styles. The available styles are provided by the esriSimpleFillStyle enumeration. Use the IFillSymbol interface to set additional properties for ISimpleFillSymbols.
It is strongly recommended to not use any Style other than esriSFSSolid. All of the remaining style enumerations can be accomplished using other fill symbol types such as ILineFillSymbol, or by specifying IColor::NullColor for hollow symbols.
Inherited Interface:IFillSymbol
SimpleFillSymbol:CoClass
2. 属性和方法:
Description | ||
---|---|---|
Color | Fill color. | |
Outline 返回值:ILineSymbol |
Line symbol of fill outline. | |
Style | Fill style. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第G4个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IDisplayTransformation 接口:
1. Provides access to members that control Display Transformation.
Use IDisplayTransformation for converting coordinates between real-world and device space and back. To prepare a transform for use, follow these steps:
- Set the full map extent with the Bounds property
- Set the visible map extent (zoom rectangle) with the VisibleBounds property
- Set the output area of the device using the DeviceFrame property
- Set the resolution of the output device using the Resolution property
The transform is based on the ratio between the VisibleBounds and the DeviceFrame. Normally the DeviceFrame is simply the full extent of the device with the origin equal to 0,0.
The transform object calculates the FittedBounds automatically and this is the visible map extent adjusted to fit the device.
在 MapControl 和 PageLayoutControl 之间建立联系!
Inherited Interfaces
Interfaces | Description |
---|---|
ITransformation | Provides access to members that apply a function (or its inverse) to a set of points or measures. The suffix of each method indicates the type of parameters operated on. |
CoClasses that implement IDisplayTransformation
CoClasses and Classes | Description |
---|---|
DisplayTransformation | Display transformation class for converting from world to device units. |
2. 属性和方法:
Description | ||
---|---|---|
Bounds | Full extent in world coordinates. | |
ConstrainedBounds | Intersection of Bounds and VisibleBounds. | |
DeviceFrame | Visible extent in device coordinates. | |
FittedBounds | Device frame in world coordinates. | |
FromMapPoint | Calculates device coordinates corresponding to the map point. | |
FromPoints | Calculates a map distance corresponding to a point (1/72) distance. | |
ReferenceScale | Reference scale for computing scaled symbol sizes. | |
Resolution | Resolution of the device in dots (pixels) per inch. | |
Rotation | Rotation angle in degrees. | |
ScaleRatio | Scale between FittedBounds and DeviceFrame. | |
SpatialReference | Current spatial reference. | |
SuppressEvents | Indicates if transformation object suppresses events. | |
ToMapPoint (int x, int y) 返回值:IPoint |
Calculates a point in map coordinates corresponding to the device point. 可以用来获取鼠标点击处的窗体坐标!绘制图形! |
|
ToPoints | Calculates a distance in points (1/72 inch) corresponding to the map distance. | |
TransformCoords | Transforms a set of points or measurements from device to world space or vice versa. Use the flags specified by esriDisplayTransformEnum. | |
TransformMeasuresFF | Transforms floating point measures to floating point measures (or do the inverse). | |
TransformMeasuresFI | Transforms floating point measures to integer measures (or do the inverse). | |
TransformMeasuresIF | Transforms integer measures to floating point measures (or do the inverse). | |
TransformMeasuresII | Transforms integer measures to integer measures (or do the inverse). | |
TransformPointsFF | Transforms floating point points to floating point points (or do the inverse). | |
TransformPointsFI | Transforms floating point points to integer points (or do the inverse). | |
TransformPointsIF | Transforms integer points to floating point points (or do the inverse). | |
TransformPointsII | Transforms integer points to integer points (or do the inverse). | |
TransformRect | Transforms a rectangle from device to world space or vice versa. Use the flags specified by esriDisplayTransformEnum. | |
Units | Units used by world coordinates. | |
VisibleBounds 返回值:IEnvelope |
Visible extent in world coordinates. 在 PageLayoutControl 中实现放大缩小的操作,要通过此属性来完成,相当于 MapControl 中的 Extent 属性! |
|
ZoomResolution | Indicates if resolution is tied to visible bounds. If true, zooming in magnifies contents (i.e., zoom in on page). |
实现 MapControl 与 PageLayoutControl 之间的联系:
IActiveView pActiveView = axPageLayoutControl1.ActiveView.FocusMap as IActiveView; //将地图赋值
IDisplayTransformation pDisplayTransformation = pActiveView.ScreenDisplay.DisplayTransformation; //定义新的转换
pDisplayTransformation.VisibleBounds = axMapControl1.Extent; //通过 pDisplayTransformation 的属性达到关联
axPageLayoutControl1.ActiveView.Refresh(); //刷新
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第G5个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IScreenDisplay 接口:
1. Provides access to members that control Screen Display. Note: the IScreenDisplay interface has been superseded byIScreenDisplay2. Please consider using the more recent version.
The IScreenDisplay interface manages the display attributes of a screen. IScreenDisplay also handles other issues specific to windows including the backing store, scrolling, and invalidation.
Two objects currently implement IScreenDisplay, AppDisplay and ScreenDisplay. Each object's implementation of IScreenDisplay is slightly different; look at the help for a particular member for more details.
Inherited Interfaces
Interfaces | Description |
---|---|
IDisplay | Provides access to members that control the Display. |
CoClasses that implement IScreenDisplay
CoClasses and Classes | Description |
---|---|
AppDisplay (esriArcMapUI) | ESRI Display. |
GlobeDisplay (esriGlobeCore) | The globe display object. |
SceneGraph (esri3DAnalyst) | A container for recording data and events that occur in a scene. |
ScreenDisplay | Display class for drawing to window. |
2. 属性和方法:
Description | ||
---|---|---|
ActiveCache | Screen cache where drawing occurs. Use rarely. Change cache inside StartDrawing/FinishDrawing sequence. | |
AddCache | Creates a new cache and return its ID. The ID can be specified to StartDrawing to direct output to the cache. It can also be used with a number of other methods such as DrawCache and Invalidate. | |
CacheCount | Number of screen caches. | |
CacheMemDC | Memory device context for the specified screen cache. | |
CancelTracker | Cancel tracker that is associated with the display. | |
ClipEnvelope | The bounds of the invalid region. Use after StartDrawing and before FinishDrawing. | |
ClipEnvelopes | The invalid region as a set of envelopes. Use after StartDrawing and before FinishDrawing. | |
ClipGeometry | User-specified clip shape. This shape is merged with the invalid region to arrive at the actual clip region. Must be specified before StartDrawing. | |
DisplayTransformation | The transformation used by the display. | |
DoScroll | Scrolls the screen by the specified amount. | |
DrawCache | Draws the specified screen cache to the specified window device context. Pass an empty rectangle to copy the full bitmap to the DC origin. | |
DrawMultipoint | Draws specified multipoint on the display. | |
DrawPoint | Draws specified point on the display. | |
DrawPolygon | Draws specified polygon on the display. | |
DrawPolyline | Draws specified line on the display. | |
DrawRectangle | Draws specified rectangle on the display. | |
DrawText | Draws specified text on the display. | |
Filter | Display filter. Must call while in a StartDrawing-FinishDrawing sequence. Set Filter to 0 to resume normal drawing. | |
FinishDrawing | Completes drawing. | |
hDC | The device context that the display is currently drawing to. Only valid between calls to StartDrawing and FinishDrawing. | |
hPalette | Palette. | |
hWnd | Associated window handle. | |
IlluminationProps | Illumination properties used by the display. | |
Invalidate | Cause the specified area of the specified cache to redraw. | |
IsCacheDirty | Indicates if the specified cache needs refreshing. | |
IsFirstCacheTransparent | Indicates if the bottom cache is transparent. | |
IsFramed | Indicates if drawing occurs in a frame rather than on the whole window. | |
PanMoveTo (IPoint mouseLocation) |
Pans to a new point. 首先要执行 PanStart 方法,从那个点的位置,移动到当前点的位置! |
|
PanStart | Prepares display for panning. | |
PanStop | Stops panning and returns new visible bounds. | |
Progress | Call frequently during drawing process. | |
RemoveAllCaches | Removes all caches. | |
RemoveCache | Removes the specified cache. | |
RotateMoveTo (IPoint pPoint) |
Rotates to new point. 旋转到的点! |
|
RotateStart (IPoint mousePt, IPoint centerPt) |
Prepares display for rotating. If centerPt is NULL, the center of the visible bounds is used. 以鼠标点绕中心点进行旋转! |
|
RotateStop 返回值:double |
Stops rotating and returns new angle. 返回旋转的角度。 |
|
RotateTimer | Draws the rotated display. Call in response to WM_TIMER. | |
ScaleContents | Indicates if the contents of the screen scale when a resize occurs. True means scale contents to fit new window size. False means contents stays the same with more or less of it showing. | |
SetScrollbarHandles | Optionally specify application supplied scrollbars. | |
SetSymbol | Sets the symbol used for drawing. Four different symbols can be specified simultaneously: Marker, Line, Fill, Text. | |
StartDrawing (int hDC, short cacheID) |
Prepare the display for drawing. Specify the device context and the cache to draw to (normally esriNoScreenCache). The ScreenDisplay coclass will automatically create a window device context if you specify hdc = 0. hDC:screendisplay.hDC cacheID:esriScreenCache 枚举:要将其强制转换为 short 类型! |
|
StartRecording | Starts recording all output to the recording cache. | |
StopRecording | Stops recording to the recording cache. | |
SuppressEvents | Indicates if display object suppresses events. | |
SuppressResize | Indicates if display resizing is suppressed. True means the display doesn't resize with the window. False ensures that the display is the same size as the window. | |
TrackPan | Interactively pans the screen. 实现漫游! |
|
TrackRotate | Interactively rotates the screen. 实现旋转! |
|
UpdateWindow | Forces a redraw. | |
UseScrollbars | Indicates if scrollbars should appear. | |
WindowDC | Device context for the associated window. Only use this between calls to StartDrawing and FinishDrawing. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第G6个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● ITextSymbol 接口:
1. Provides access to members that control text symbols.
ITextSymbol is the generic interface for properties of IFormattedTextSymbol and ISimpleTextSymbol.
CoClasses that implement ITextSymbol
CoClasses and Classes | Description |
---|---|
TextMarkerSymbol (esriTrackingAnalyst) | Class used to create a text marker symbol used to symbolize point geometries. |
TextSymbol | A symbol that controls how text is displayed. |
2. 属性和方法:
Description | ||
---|---|---|
Angle | Text baseline angle. | |
Color | Text color. | |
Font 返回值:IFontDisp |
Text font.System.Drawing.Font netFont = new System.Drawing.Font("Courier New", 20f,FontStyle.Bold); |
|
GetTextSize | Gets the x and y dimensions of 'text' in points (1/72 inch). | |
HorizontalAlignment | Horizontal alignment style. | |
RightToLeft | Indicates if the text is drawn from right to left. | |
Size | Text size. | |
Text | Text to draw. | |
VerticalAlignment | Vertical alignment style. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第G7个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IStyleGalleryItem 接口:
1. Provides access to members modify the Style Gallery.
IStyleGallery is used to access styles, add new items with AddItem, remove items with RemoveItem, make updates with UpdateItem and save your changes with SaveStyle. Styles provide storage for your colors, map elements, symbols, and properties of symbols.
CoClasses that implement IStyleGallery
CoClasses and Classes | Description |
---|---|
ServerStyleGallery | The Server Style Gallery. |
StyleGallery (esriFramework) | The Style Gallery object. |
2. 属性和方法:
Description | ||
---|---|---|
AddItem | Adds an item to the target style file. | |
Categories | The categories within the given class. | |
Class | The class at the given index. | |
ClassCount | Number of classes in the Style Gallery. | |
Clear | Removes all styles from the Style Gallery. | |
ImportStyle | Imports a style from a file other than a .style file. | |
Items | The style items from the specified style file, in the specified class and category. The style set and category may be blank to return all items. | |
LoadStyle | Loads a style from a file. If class is specified, only items in that class will be loaded. | |
RemoveItem | Removes an item from the target style file. | |
SaveStyle | Saves the specified style to a file. If class is specified, only items in that class will be saved. | |
UpdateItem | Updates an existing item in target style file. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第G7个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● ISymbol 接口:
1. Provides access to members that control symbols.
CoClasses that implement ISymbol
CoClasses and Classes | Description |
---|---|
ArrowMarkerSymbol | A marker symbol created from a predefined arrow. |
BarChartSymbol | Defines a bar chart symbol. |
CartographicLineSymbol | A line symbol for drawing solid or dashed lines. |
CharacterMarker3DSymbol (esri3DAnalyst) | 3D Character Marker Symbol component. |
CharacterMarkerSymbol | A marker symbol based on a character from a font. |
ColorRampSymbol (esriCarto) | ESRI ColorRampSymbol for raster rendering. |
ColorSymbol (esriCarto) | ESRI ColorSymbol for raster rendering. |
DotDensityFillSymbol | Defines a dot density fill symbol, a data driven symbol commonly used with the dot density renderer. |
GradientFillSymbol | A fill symbol composed from a ramp of colors. |
HashLineSymbol | A line symbol for drawing hashed or slanted lines. |
LineFillSymbol | A fill symbol comprised of any of the supported line symbols. |
Marker3DSymbol (esri3DAnalyst) | 3D Marker Symbol component. |
MarkerFillSymbol | A fill symbol comprised of any of the supported marker symbols. |
MarkerLineSymbol | A line symbol composed of repeating markers. |
MoleFillSymbol (esriDefenseSolutions) | Mole Fill Symbol Class. |
MoleLineSymbol (esriDefenseSolutions) | Mole Line Symbol Class. |
MoleMarkerSymbol (esriDefenseSolutions) | Mole Marker Symbol Class. |
MultiLayerFillSymbol | A fill symbol that contains one or more layers. |
MultiLayerLineSymbol | A line symbol that contains one or more layers. |
MultiLayerMarkerSymbol | A marker symbol that contains one or more layers. |
PictureFillSymbol | A fill symbol based on either a BMP or an EMF picture. |
PictureLineSymbol | A line symbol composed of either a BMP or an EMF picture. |
PictureMarkerSymbol | A marker symbol based on either a BMP or an EMF picture. |
PieChartSymbol | Defines a pie chart symbol. |
RasterRGBSymbol (esriCarto) | ESRI RasterRGBSymbol for raster rendering. |
SimpleFillSymbol | A fill symbol comprised from a predefined set of styles. |
SimpleLine3DSymbol (esri3DAnalyst) | Simple 3D Line Symbol component. |
SimpleLineSymbol | A line symbol comprised of a predefined set of styles. |
SimpleMarker3DSymbol (esri3DAnalyst) | Simple 3D Marker Symbol component. |
SimpleMarkerSymbol | A marker symbol comprised of a predefined set of styles. |
StackedChartSymbol | Defines a stacked chart symbol. |
TextMarkerSymbol (esriTrackingAnalyst) | Class used to create a text marker symbol used to symbolize point geometries. |
TextSymbol | A symbol that controls how text is displayed. |
TextureFillSymbol (esri3DAnalyst) | Texture Fill Symbol component. |
TextureLineSymbol (esri3DAnalyst) | Texture Line Symbol component. |
---------------------------------------------------------------------------------------------------------
╔════════╗
╠════╣ 第G8个 ╠══════════════════════════════════════════════════╣
╚════════╝
●·● IRubberBand 接口:
1. Provides access to members that control symbols.
Provides access to members that control simple rubberbanding. Note: the IRubberBand interface has been superseded byIRubberBand2. Please consider using the more recent version.
CoClasses that implement IRubberBand
CoClasses and Classes | Description |
---|---|
RubberCircle | Rubberbanding class for circles. |
RubberEnvelope | Rubberbanding class for simple envelopes. |
RubberLine | Rubberbanding class for lines. |
RubberPoint | Rubberbanding class for points. |
RubberPolygon | Rubberbanding class for polygons. |
RubberRectangularPolygon | Rubberbanding class for rectangular polygons (rotatable envelopes). |
Members
Description | ||
---|---|---|
TrackExisting | Indicates if to move or reshape an existing shape on the specified screen in response to a mouse down event. | |
TrackNew (IScreenDisplay ScreenDisplay, ISymbol Symbol) 返回值:IGeometry |
Call in response to mouse down event to rubberband a new shape on the specified screen. 返回鼠标在屏幕上绘制的几何图形~ |
//在屏幕上画多边形
private void axMapControl1_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e) { IScreenDisplay pScreenDisplay = axMapControl1.ActiveView.ScreenDisplay; //实例 屏幕显示 实例 IRubberBand pRubber = new RubberPolygon(); //实例一个 多边形橡皮条带 IPolygon pPolygon = pRubber.TrackNew(pScreenDisplay, null) as IPolygon; //获取屏幕鼠标绘制的多边形 ISimpleLineSymbol pSimpleLineSymbol = new SimpleLineSymbol(); //定义样式 pSimpleLineSymbol.Color = GetColor(255, 0, 0); pSimpleLineSymbol.Width = 2; ISimpleFillSymbol pSimpleFillSymbol = new SimpleFillSymbol(); pSimpleFillSymbol.Color = GetColor(128, 255, 0); pSimpleFillSymbol.Outline = pSimpleLineSymbol; pScreenDisplay.StartDrawing(pScreenDisplay.hDC, (short)esriScreenCache.esriNoScreenCache); //开始绘制 pScreenDisplay.SetSymbol(pSimpleFillSymbol as ISymbol); //将样式赋值过去 pScreenDisplay.DrawPolygon(pPolygon); //将几何体赋值过去 pScreenDisplay.FinishDrawing(); //结束绘制 } private IRgbColor GetColor(int r, int g, int b) { IRgbColor pColor = new RgbColor(); pColor.Red = r; pColor.Green = g; pColor.Blue = b; return pColor; }
---------------------------------------------------------------------------------------------------------
●·● DataSourcesFile 命名空间
1. DataSourcesFile 类库中提供了文件型数据的访问。基于文件的数据源有:shapefile、coverage、TIN、CAD 等。不同的数据源通过各自的工作空间工厂来访问。
---------------------------------------------------------------------------------------------------------
●·● DataSourcesGDB 命名空间
1. DataSourcesGDB 类库包含了对 Geodatabase 数据源的访问,这些数据源包括:MS Access、File Geodatabase 和 ArcSDE 数据源。在访问空间数据之前首先确定数据源的类型,如果是 Geodatabase,那么就需要引用 DataSourcesGDB,如果是文件型的数据源,那么就需要引用 DataSourcesFile。下图描述了 DataSourcesGDB 类库中的几个工作空间工厂之间的关系。
---------------------------------------------------------------------------------------------------------
●·● DataSourcesRaster 命名空间
1. DataSourcesRaster 类库封装了对栅格数据的访问,DataSourcesFile 和 DataSourcesGDB 类库中封装的数据访问接口都是针对矢量数据调用的,对于栅格数据的访问需要使用 DataSourcesRaster 类库,通过该类库用户可以各个 ArcGIS 支持的栅格数据。
ISegment
posted on 2012-03-16 11:46 McDelfino 阅读(3395) 评论(1) 编辑 收藏 举报