Interface IGeometryBag
Provides access to members that identify a geometry bag.
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("B5B8CDA0-9D24-11D3-810D-0080C75E8A71")]
public interface IGeometryBag : IGeometry
Remarks
Every Geometry created within ArcGIS should be assigned a spatial reference. Always attach well-defined spatial references to new geometries. This improves processing efficiency, in particular, when using ITopologicalOperator on geometries that contain curved segments (circular arcs, bezier curves, elliptical arcs). New geometries include any geometry that is created in memory. It does not matter whether it will be stored in a feature class or not. Well-defined as applied to a spatial reference means that it not only has its coordinate system (projection) defined, but also its coordinate grid. The coordinate grid consists of the xy domain, xy resolution, and xy cluster tolerance properties of a spatial reference. If the Geometry includes z or m values, the z or m domains, z or m resolutions, and z or m cluster tolerance properties must also be defined. The cluster tolerance and resolutions can be quickly and easily set using SetDefault methods on ISpatialReferenceResolution and ISpatialReferenceTolerance interfaces.
For example, a line should be converted to a polyline before adding it to the geometry bag as shown in the following code:
ISegmentCollection segColl = new PathClass() as ISegmentCollection;
ISegment seg = myLine as ISegment;
object obj = Type.Missing;
segColl.AddSegment(seg, ref obj, ref obj);
IGeometryCollection geomColl = new PolylineClass() as IGeometryCollection;
geomColl.AddGeometry((IGeometry)segColl, ref obj, ref obj);
IGeometryCollection bag = new GeometryBagClass() as IGeometryCollection;
bag.AddGeometry((IGeometry)geomColl, ref obj, ref obj);
Properties
Dimension
esriGeometryDimension Dimension { get; }
Property Value
Envelope
IEnvelope Envelope { get; }
Property Value
GeometryType
esriGeometryType GeometryType { get; }
Property Value
IsEmpty
bool IsEmpty { get; }
Property Value
LosslessExport
Indicates if this geometry bag exported itself to a shapefile buffer with no loss of information. Currently always returns false.
bool LosslessExport { get; }
Property Value
Remarks
currently not implemented; always returns FALSE.
SpatialReference
ISpatialReference SpatialReference { get; set; }
Property Value
Methods
GeoNormalize()
void GeoNormalize()
GeoNormalizeFromLongitude(double)
void GeoNormalizeFromLongitude(double Longitude)
Parameters
Longitudedouble
Project(ISpatialReference)
void Project(ISpatialReference newReferenceSystem)
Parameters
newReferenceSystemISpatialReference
QueryEnvelope(IEnvelope)
void QueryEnvelope(IEnvelope outEnvelope)
Parameters
outEnvelopeIEnvelope
SetEmpty()
void SetEmpty()
SnapToSpatialReference()
void SnapToSpatialReference()