ArcObjects Library Reference (DefenseSolutions)  

IGeoPolygon Interface

Provides access to members that generate GeoPolygon geometries.

Product Availability

Available with ArcGIS Engine and ArcGIS Desktop.

Description

A GeoPolygon is a spheroidal polygon geometry composed of Geolines, which can be geodesics, great circles, or rhumb lines. GeoPolygon creation is based on an input polygon geometry and a spatial reference, which provides the spheroid for the calculation. The GeoPolygon object can be used to provide the geometry of the GeoPolygonElement for display as a graphic element.

Members

Description
Read/write property BaseSpatialReference Spatial reference used for geodesy computations.
Read-only property EnhancedPolygon Provides the output polygon.
Read/write property MaxPercent Maximum segment length expressed as a percentage of the total segment length.
Read/write property MaxStepSize Maximum segment length in meters.
Read/write property Polygon The base polygon for the GeoPolygon object.
Read/write property SpecialGeolineType Type of Geoline used to represent the polygon's segments.
Read/write property UsePercent Indicates if MaxPercent is to be used to determine segment length.

CoClasses that implement IGeoPolygon

CoClasses and Classes Description
GeoPolygon Its a spheroidal polygon.

Remarks

The following VB example shows how to take a polygon graphic element selected in a map and create a GeoPolygon object from it.

Dim pDoc As IMxDocument
Dim pGraphSelect As IGraphicsContainerSelect
Dim pMap As IMap
Dim pGeoPolygon As IGeoPolygon
Dim pPolygon As IPolygon
Dim pEnhancePolygon As IPolygon
Dim pSelectElement As IElement

Set pDoc = Application.Document
Set pMap = pDoc.FocusMap
Set pGraphSelect = pMap

Set pSelectElement = pGraphSelect.SelectedElement(0)
Set pPolygon = pSelectElement.Geometry 'the geometry of the selected element

Set pGeoPolygon = New GeoPolygon
Set pGeoPolygon.BaseSpatialReference = pPolygon.SpatialReference
With pGeoPolygon
    .MaxPercent = 0.01 'a point will be placed every 1% of the total linear distance of the polygon
    .UsePercent = True
    '.MaxStepSize = 10000  'Use this property as an alternative to MaxPercent
    .Polygon = pPolygon
    .SpecialGeolineType = cjmtkSGTGeodesic
End With

Set pEnhancePolygon = pGeoPolygon.EnhancedPolygon 'the polygon representation of the geopolyline

.NET Samples

Geodesy MapControl (Code Files: GeodesyMapControl) |