

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
public interface IGeometry
Provides access to members that describe properties and behavior of all geometric objects.
Common properties and methods shared by all geometric objects. Geometries are objects that define a spatial location and an associated geometric shape.
Every Geometry created within ArcGIS should be assigned a spatial reference. Always attach welldefined 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. Welldefined 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.
Method Summary  

void 
geoNormalize()
Shifts longitudes, if need be, into a continuous range of 360 degrees. 
void 
geoNormalizeFromLongitude(double longitude)
Normalizes longitudes into a continuous range containing the longitude. 
int 
getDimension()
The topological dimension of this geometry. 
IEnvelope 
getEnvelope()
Creates a copy of this geometry's envelope and returns it. 
int 
getGeometryType()
The type of this geometry. 
ISpatialReference 
getSpatialReference()
The spatial reference associated with this geometry. 
boolean 
isEmpty()
Indicates whether this geometry contains any points. 
void 
project(ISpatialReference newReferenceSystem)
Projects this geometry into a new spatial reference. 
void 
queryEnvelope(IEnvelope outEnvelope)
Copies this geometry's envelope properties into the specified envelope. 
void 
setEmpty()
Removes all points from this geometry. 
void 
setSpatialReferenceByRef(ISpatialReference spatialRef)
The spatial reference associated with this geometry. 
void 
snapToSpatialReference()
Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system. 
Method Detail 

int getGeometryType() throws IOException, AutomationException
esriGeometryNull = 0
esriGeometryPoint = 1
esriGeometryMultipoint = 2
esriGeometryPolyline = 3
esriGeometryPolygon = 4
esriGeometryEnvelope = 5
esriGeometryPath = 6
esriGeometryAny = 7
esriGeometryMultiPatch = 9
esriGeometryRing = 11
esriGeometryLine = 13
esriGeometryCircularArc = 14
esriGeometryBezier3Curve = 15
esriGeometryEllipticArc = 16
esriGeometryBag = 17
esriGeometryTriangleStrip = 18
esriGeometryTriangleFan = 19
esriGeometryRay = 20
esriGeometrySphere = 21
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.int getDimension() throws IOException, AutomationException
Returns the dimension of the geometry object based on the geometry's type.
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.ISpatialReference getSpatialReference() throws IOException, AutomationException
Returns and sets the Spatial Reference in which the geometry exists. If the spatial reference has not been set the property will return an empty ISpatialReference instance.
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void setSpatialReferenceByRef(ISpatialReference spatialRef) throws IOException, AutomationException
spatialRef
 A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.boolean isEmpty() throws IOException, AutomationException
IsEmpty returns TRUE when the Geometry object does not contain geometric information beyond its original initialization state. An object may be returned to its original initialization (IsEmpty = TRUE) state using SetEmpty.
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void setEmpty() throws IOException, AutomationException
SetEmpty returns the Geometry to its original initialization state by releasing all data referenced by the Geometry.
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void queryEnvelope(IEnvelope outEnvelope) throws IOException, AutomationException
Returns the unique Envelope that binds the Geometry object. This is the smallest Envelope that Contains the object.
Note: The output geometry must be cocreated prior to the query. The output geometry is not cocreated by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.
outEnvelope
 A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.IEnvelope getEnvelope() throws IOException, AutomationException
Returns the unique Envelope that binds the Geometry object. This is the smallest Envelope that Contains the object.
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void project(ISpatialReference newReferenceSystem) throws IOException, AutomationException
To Project, the geometry needs to have a Spatial Reference set, and not have an UnknownCoordinateSystem. The new spatial reference system passed to the method defines the output coordinate system. If either spatial reference is Unknown, the coordinates are not changed. The Z and measure values are not changed by the Project method.
A geometry is not densified before it is projected. This can lead to the output geometries not reflecting the 'true' shape in the new coordinate system. A straight line in one coordinate system is not necessarily a straight line in a different coordinate system. Use IGeometry2::ProjectEx if you want to densify the geometries while they are projected.
The Project method must be applied on highlevel geometries only. HighLevel geometries are point, multipoint, polyline and polygon. To use this method with lowlevel geometries such as segments (Line, Circular Arc, Elliptic Arc, Bézier Curve), paths or rings, they must be wrapped into highlevel geometry types.
If a geometry is projected to a projected coordinate system that can't represent the geographic area where the geometry is located (or if trying to move an xy coordinate from outside the projected coordinate system back into geographic), the geometry will be set to empty.
Note: This method can only be called upon the top level geometries (Points, Multipoints, Polylines and Polygons). If the from/to spatial references have different geographic coordinate systems, the Project method looks for a GeoTransformationsOperationSet. If the set of Geotransformations is present in memory, Project will use it to perform a geographic/datum Transformation. To use a specific geotransformation, use the IGeometry2::ProjectEx method.
newReferenceSystem
 A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void snapToSpatialReference() throws IOException, AutomationException
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void geoNormalize() throws IOException, AutomationException
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.void geoNormalizeFromLongitude(double longitude) throws IOException, AutomationException
longitude
 The longitude (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 