alex_bn_lee

导航

【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 ClassesDescription
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
Read-only property Dimension The topological dimension of this geometry.
Read-only property Envelope Creates a copy of this geometry's envelope and returns it.
Read-only property GeometryType
esriGeometryType 枚举
The type of this geometry.
空、点、多点、线、圆、椭圆、贝塞尔、路径、折线、环、多边形……
Method GeoNormalize Shifts longitudes, if need be, into a continuous range of 360 degrees.
Method GeoNormalizeFromLongitude Normalizes longitudes into a continuous range containing the longitude. This method is obsolete.
Read-only property IsEmpty Indicates whether this geometry contains any points.
Method Project Projects this geometry into a new spatial reference.
Method QueryEnvelope Copies this geometry's envelope properties into the specified envelope.
Method SetEmpty Removes all points from this geometry.
Method SnapToSpatialReference Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system.
Read/write property 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
Method CenterAt Moves this envelope so it is centered at p.
Method DefineFromPoints Defines the envelope to cover all the points.
Read/write property Depth The depth of the envelope.
Read-only property Dimension The topological dimension of this geometry.
Read-only property Envelope Creates a copy of this geometry's envelope and returns it.
Method 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);          //放大
iEnv.Expand(2, 2, true); //缩小

pEnv = axMapControl1.Extent;  //当前赋值
pEnv.Expand(2,2,true);    //缩小操作
axMapControl1.Extent = pEnv;  //赋值给当前
Method ExpandM Moves the measure of the sides toward or away from each other.
Method ExpandZ Moves the Z attribute of the sides toward or away from each other.
Read-only property GeometryType The type of this geometry.
Method GeoNormalize Shifts longitudes, if need be, into a continuous range of 360 degrees.
Method GeoNormalizeFromLongitude Normalizes longitudes into a continuous range containing the longitude. This method is obsolete.
Read/write property Height The height of the envelope.
Method Intersect Adjusts to include only the area also included by inEnvelope.
Read-only property IsEmpty Indicates whether this geometry contains any points.
Read/write property LowerLeft The lower left corner.
Read/write property LowerRight The lower right corner.
Read/write property MMax The maximum measure value in the area of the envelope.
Read/write property MMin The minimum measure value in the area of the envelope.
Method Offset Moves the sides x units horizontally and y units vertically.
Method OffsetM Moves the sides m units.
Method OffsetZ Moves the sides z units.
Method Project Projects this geometry into a new spatial reference.
Method PutCoords Constructs an envelope from the coordinate values of lower, left and upper, right corners.
Method QueryCoords Returns the coordinates of lower, left and upper, right corners.
Method QueryEnvelope Copies this geometry's envelope properties into the specified envelope.
Method SetEmpty Removes all points from this geometry.
Method SnapToSpatialReference Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system.
Read/write property SpatialReference The spatial reference associated with this geometry.
Method Union
(IEnvelope inEnvelope)
Adjusts to overlap inEnvelope.
注意在用的时候,union的主体不能为null,否则会出错的~!
Read/write property UpperLeft The upper left corner.
Read/write property UpperRight The upper right corner.
Read/write property Width The width of the envelope.
Read/write property XMax The position of the right side.
获取最大的地图横坐标.
Read/write property XMin The position of the left side.
获取最小的地图横坐标.
Read/write property YMax The position of the top.
Read/write property YMin The position of the bottom.
Read/write property ZMax The maximum Z value in the area of the envelope.
Read/write property 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
Method 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.
Method 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.
Method ConstrainDistance Projects this point to the perimeter of the circle defined by radius and anchor.
Read-only property Dimension The topological dimension of this geometry.
Read-only property Envelope Creates a copy of this geometry's envelope and returns it.
Read-only property GeometryType The type of this geometry.
Method GeoNormalize Shifts longitudes, if need be, into a continuous range of 360 degrees.
Method GeoNormalizeFromLongitude Normalizes longitudes into a continuous range containing the longitude. This method is obsolete.
Read/write property ID The Point ID attribute.
Read-only property IsEmpty Indicates whether this geometry contains any points.
Read/write property M The measure attribute.
Method Project Projects this geometry into a new spatial reference.
Method PutCoords
(double x, double y)
Sets the X and Y coordinates.
设置横纵坐标,既可以是像素坐标、也可以是地理坐标。
Method QueryCoords Returns the X and Y coordinates.
Method QueryEnvelope Copies this geometry's envelope properties into the specified envelope.
Method SetEmpty Removes all points from this geometry.
Method SnapToSpatialReference Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system.
Read/write property SpatialReference The spatial reference associated with this geometry.
Read/write property X The X coordinate.
Read/write property Y The Y coordinate.
Read/write property 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 ClassesDescription
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 ClassesDescription
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
Read-only property 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.
Method 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.
通过给定距离,得到操作图形的缓冲区,返回得到缓冲区几何图形!
Method Clip
(IEnvelope clipperEnvelope)
Constructs the intersection of this geometry and the specified envelope.
返回矩形部分的要素,直接作用在要素上面!
Method ClipDense Constructs the intersection of this geometry and the specified envelope; densifies lines in output contributed by the clipping envelope.
Method ClipEx Constructs the intersection of this geometry and the specified envelope.
Method 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.
Method ConstructUnion Defines this geometry to be the union of the inputs. More efficient for unioning multiple geometries than calling Union repeatedly.
Method ConvexHull Constructs the convex hull of this geometry.
Method 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。
Method Cut2 Divides a geometry into multiple parts
Method Difference Constructs the geometry containing points from this geometry but not the other geometry.
Method GeoNormalizeEx Shifts longitudes, if need be, into a continuous range of 360 degrees.
Method Intersect Constructs the geometry that is the set-theoretic intersection of the input geometries. Use different resultDimension values to generate results of different dimensions.
Method IntersectMultidimension Constructs the set-theoretic intersection of the inputs. The results are returned in a geometry bag with one element per result dimension.
Read-only property IsKnownSimple Indicates whether this geometry is known (or assumed) to be topologically correct.
Write-only property IsKnownSimple Indicates whether this geometry is known (or assumed) to be topologically correct.
Read-only property 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.
Read-only property IsSimpleEx Determines why a geometry is not simple. Currently only implemented for polygons.
Method QueryClipped Redefines clippedGeometry to be the intersection of this geometry and the clipping envelope.
Method QueryClippedDense Redefines clippedGeometry to be the intersection of this geometry and the clipping envelope; densifies lines in the output contributed by the clipping envelope.
Method Simplify Makes this geometry topologically correct.
Method SymmetricDifference Constructs the geometry that contains points from either but not both input geometries.
Method Union
(IGeometry other)
返回值:IGeometry
Constructs the geometry that is the set-theoretic union of the input geometries.
将操作几何图形与 other 结合到一起,形成新的几何图形,对原图形不做改变!

  CoClasses that implement ITopologicalOperator

CoClasses and ClassesDescription
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
Read-only property Area The area.
Read-only property Centroid The center of gravity (centroid).
Read-only property LabelPoint A point guaranteed to be inside this area.
Method QueryCentroid Copies the centroid of this area to the specified point.
Method 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 ClassesDescription
SpatialReferenceEnvironment Creates various spatial reference objects.

---------------------------------------------------------------------------------------------------------

            ╔════════╗
╠════╣    第Aj 个    ╠══════════════════════════════════════════════════╣
            ╚════════╝

●·● IGeographicCoordinateSystemEdit 接口

1. Provides access to members that control the properties for a geographic coordinate system.【实现定义】

  Members

  Description
Method 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.
Method DefineEx Defines the properties for a geographic coordinate system.

  CoClasses that implement IGeographicCoordinateSystemEdit

CoClasses and ClassesDescription
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 ClassesDescription
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 ClassesDescription
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 ClassesDescription
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
Method Contains
(IGeometry other)
返回值:bool
Indicates if this geometry contains the other geometry.
表明该几何图形是否包含other几何图形?
Method Crosses Indicates if the two geometries intersect in a geometry of lesser dimension.
Method Disjoint Indicates if the two geometries share no points in common. Negate this result to compute the Intersect relation.
Method Equals Indicates if the two geometries are of the same type and define the same set of points in the plane.
Method Overlaps Indicates if the intersection of the two geometries has the same dimension as one of the input geometries.
Method Relation Indicates if the defined relationship exists.
Method Touches Indicates if the boundaries of the geometries intersect.
Method Within Indicates if this geometry is contained (is within) another geometry.

  CoClasses that implement IRelationalOperator

CoClasses and ClassesDescription
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
Read/write property Blue The blue component of an IRgbColor (0-255).
Read/write property CMYK The CMYK value of color.
Method GetCIELAB The CIELAB value of color.
Read/write property Green The green component of an IRgbColor (0-255).
Read/write property NullColor Indicates whether this color is null.
Read/write property Red The red component of an IRgbColor (0-255).
Read/write property RGB The RGB value of color.
Method SetCIELAB The CIELAB value of color.
Read/write property Transparency
返回值: byte
The Alpha Blending value. (0 for transparent, 255 for opaque [əu'peik] 【不透明】).
Read/write property 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
Read/write property Color Line symbol color.
Read/write property Style The style of the line symbol.
Read/write property 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
Read/write property Color Fill color.
Read/write property Outline
返回值:ILineSymbol
Line symbol of fill outline.
Read/write property 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

InterfacesDescription
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 ClassesDescription
DisplayTransformation Display transformation class for converting from world to device units.

2. 属性和方法:

  Description
Read/write property Bounds Full extent in world coordinates.
Read-only property ConstrainedBounds Intersection of Bounds and VisibleBounds.
Read/write property DeviceFrame Visible extent in device coordinates.
Read-only property FittedBounds Device frame in world coordinates.
Method FromMapPoint Calculates device coordinates corresponding to the map point.
Method FromPoints Calculates a map distance corresponding to a point (1/72) distance.
Read/write property ReferenceScale Reference scale for computing scaled symbol sizes.
Read/write property Resolution Resolution of the device in dots (pixels) per inch.
Read/write property Rotation Rotation angle in degrees.
Read/write property ScaleRatio Scale between FittedBounds and DeviceFrame.
Read/write property SpatialReference Current spatial reference.
Read/write property SuppressEvents Indicates if transformation object suppresses events.
Method ToMapPoint
(int x, int y)
返回值:IPoint
Calculates a point in map coordinates corresponding to the device point.
可以用来获取鼠标点击处的窗体坐标!绘制图形!
Method ToPoints Calculates a distance in points (1/72 inch) corresponding to the map distance.
Method TransformCoords Transforms a set of points or measurements from device to world space or vice versa. Use the flags specified by esriDisplayTransformEnum.
Method TransformMeasuresFF Transforms floating point measures to floating point measures (or do the inverse).
Method TransformMeasuresFI Transforms floating point measures to integer measures (or do the inverse).
Method TransformMeasuresIF Transforms integer measures to floating point measures (or do the inverse).
Method TransformMeasuresII Transforms integer measures to integer measures (or do the inverse).
Method TransformPointsFF Transforms floating point points to floating point points (or do the inverse).
Method TransformPointsFI Transforms floating point points to integer points (or do the inverse).
Method TransformPointsIF Transforms integer points to floating point points (or do the inverse).
Method TransformPointsII Transforms integer points to integer points (or do the inverse).
Method TransformRect Transforms a rectangle from device to world space or vice versa. Use the flags specified by esriDisplayTransformEnum.
Read/write property Units Units used by world coordinates.
Read/write property VisibleBounds
返回值:IEnvelope
Visible extent in world coordinates.
在 PageLayoutControl 中实现放大缩小的操作,要通过此属性来完成,相当于 MapControl 中的 Extent 属性!
Read/write property 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

InterfacesDescription
IDisplay Provides access to members that control the Display.

  CoClasses that implement IScreenDisplay

CoClasses and ClassesDescription
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
Read/write property ActiveCache Screen cache where drawing occurs. Use rarely. Change cache inside StartDrawing/FinishDrawing sequence.
Method 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.
Read-only property CacheCount Number of screen caches.
Read-only property CacheMemDC Memory device context for the specified screen cache.
Read/write property CancelTracker Cancel tracker that is associated with the display.
Read-only property ClipEnvelope The bounds of the invalid region. Use after StartDrawing and before FinishDrawing.
Read-only property ClipEnvelopes The invalid region as a set of envelopes. Use after StartDrawing and before FinishDrawing.
Read/write property 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.
Read/write property DisplayTransformation The transformation used by the display.
Method DoScroll Scrolls the screen by the specified amount.
Method 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.
Method DrawMultipoint Draws specified multipoint on the display.
Method DrawPoint Draws specified point on the display.
Method DrawPolygon Draws specified polygon on the display.
Method DrawPolyline Draws specified line on the display.
Method DrawRectangle Draws specified rectangle on the display.
Method DrawText Draws specified text on the display.
Read/write property Filter Display filter. Must call while in a StartDrawing-FinishDrawing sequence. Set Filter to 0 to resume normal drawing.
Method FinishDrawing Completes drawing.
Read-only property hDC The device context that the display is currently drawing to. Only valid between calls to StartDrawing and FinishDrawing.
Read/write property hPalette Palette.
Read/write property hWnd Associated window handle.
Read/write property IlluminationProps Illumination properties used by the display.
Method Invalidate Cause the specified area of the specified cache to redraw.
Method IsCacheDirty Indicates if the specified cache needs refreshing.
Read/write property IsFirstCacheTransparent Indicates if the bottom cache is transparent.
Read/write property IsFramed Indicates if drawing occurs in a frame rather than on the whole window.
Method PanMoveTo
(IPoint mouseLocation)
Pans to a new point.
首先要执行 PanStart 方法,从那个点的位置,移动到当前点的位置!
Method PanStart Prepares display for panning.
Method PanStop Stops panning and returns new visible bounds.
Method Progress Call frequently during drawing process.
Method RemoveAllCaches Removes all caches.
Method RemoveCache Removes the specified cache.
Method RotateMoveTo
(IPoint pPoint)
Rotates to new point.
旋转到的点!
Method RotateStart
(IPoint mousePt, IPoint centerPt)
Prepares display for rotating. If centerPt is NULL, the center of the visible bounds is used.
以鼠标点绕中心点进行旋转!
Method RotateStop
返回值:double
Stops rotating and returns new angle.
返回旋转的角度。
Method RotateTimer Draws the rotated display. Call in response to WM_TIMER.
Read/write property 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.
Method SetScrollbarHandles Optionally specify application supplied scrollbars.
Method SetSymbol Sets the symbol used for drawing. Four different symbols can be specified simultaneously: Marker, Line, Fill, Text.
Method 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 类型!
Method StartRecording Starts recording all output to the recording cache.
Method StopRecording Stops recording to the recording cache.
Read/write property SuppressEvents Indicates if display object suppresses events.
Read/write property 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.
Method TrackPan Interactively pans the screen.
实现漫游!
Method TrackRotate Interactively rotates the screen.
实现旋转!
Method UpdateWindow Forces a redraw.
Read/write property UseScrollbars Indicates if scrollbars should appear.
Read-only property 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 ClassesDescription
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
Read/write property Angle Text baseline angle.
Read/write property Color Text color.
Read/write property Font
返回值:IFontDisp
Text font.
System.Drawing.Font netFont = new System.Drawing.Font("Courier New", 20f,FontStyle.Bold);
//首先定义一个 .net 中的Font
IFontDisp font = ESRI.ArcGIS.ADF.COMSupport.OLE.GetIFontDispFromFont(netFont) as IFontDisp;
//通过上面这个方法进行转换!


// Define the font you want to use.
stdole.IFontDisp stdFontCls = ((stdole.IFontDisp)(new stdole.StdFont()));
stdFontCls.Name = "ESRI Default Marker";
stdFontCls.Size = 24;
Method GetTextSize Gets the x and y dimensions of 'text' in points (1/72 inch).
Read/write property HorizontalAlignment Horizontal alignment style.
Read/write property RightToLeft Indicates if the text is drawn from right to left.
Read/write property Size Text size.
Read/write property Text Text to draw.
Read/write property 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 ClassesDescription
ServerStyleGallery The Server Style Gallery.
StyleGallery (esriFramework) The Style Gallery object.

2. 属性和方法:

  Description
Method AddItem Adds an item to the target style file.
Read-only property Categories The categories within the given class.
Read-only property Class The class at the given index.
Read-only property ClassCount Number of classes in the Style Gallery.
Method Clear Removes all styles from the Style Gallery.
Method ImportStyle Imports a style from a file other than a .style file.
Read-only property 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.
Method LoadStyle Loads a style from a file. If class is specified, only items in that class will be loaded.
Method RemoveItem Removes an item from the target style file.
Method SaveStyle Saves the specified style to a file. If class is specified, only items in that class will be saved.
Method 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 ClassesDescription
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 ClassesDescription
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
Method TrackExisting Indicates if to move or reshape an existing shape on the specified screen in response to a mouse down event.
Method 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  阅读(3371)  评论(1编辑  收藏  举报