|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.geometry.Triangles
public class Triangles
A collection of 3D triangles, where each consecutive triplet of vertices defines a new triangle
Constructor Summary | |
---|---|
Triangles()
Constructs a Triangles using ArcGIS Engine. |
|
Triangles(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. Triangles theTriangles = (Triangles) obj; |
Method Summary | |
---|---|
void |
addGeometries(int count,
IGeometry newGeometries)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.addGeometries(com.esri.arcgis.geometry.IGeometryCollection, com.esri.arcgis.geometry.IGeometry[]) . |
void |
addGeometry(IGeometry inGeometry,
Object before,
Object after)
Adds a reference to the input geometry either at the end, or before, or after the specified index. |
void |
addGeometryCollection(IGeometryCollection newGeometries)
Adds references to geometries in the input collection. |
void |
addPoint(IPoint inPoint,
Object before,
Object after)
Adds a vertex to a Path, Ring, Polyline, or Polygon; or adds a reference to the input point to a Multipoint, TriangleFan, or TriangleStrip. |
void |
addPointCollection(IPointCollection newPoints)
Adds copies of points in the input point collection to this Path, Ring, Polyline, or Polygon; or adds references to the points in the collection to this Multipoint, TriangleFan, or TriangleStrip. |
void |
addPoints(int count,
IPoint newPoints)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.addPoints(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.geometry.IPoint[]) . |
void |
addWKSPointZs(int count,
_WKSPointZ pointStructures)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.addWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.system._WKSPointZ[]) . |
void |
assign(IClone src)
Assigns the properties of src to the receiver. |
void |
deserialize(IXMLSerializeData data)
Deserializes an object from XML. |
void |
dropMs()
Sets all the M values to a non-valid number (NaN). |
void |
dropPointIDs()
Unsets all PointID values without changing awareness. |
void |
dropZs()
Sets all the Z values to a non-valid number (NaN). |
boolean |
equals(Object o)
Compare this object with another |
IClone |
esri_clone()
Clones the receiver and assigns the result to *clone. |
void |
geometriesChanged()
Tells this geometry collection that some of its geometries have been altered. |
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. |
static String |
getClsid()
getClsid. |
int |
getDimension()
The topological dimension of this geometry. |
IEnumVertex |
getEnumVertices()
A new enumerator for this point collection. |
IEnvelope |
getEnvelope()
Creates a copy of this geometry's envelope and returns it. |
IGeometry |
getGeometry(int index)
A reference to the ith geometry. |
int |
getGeometryCount()
The number of geometries in this collection. |
int |
getGeometryType()
The type of this geometry. |
IEnumVertex |
getIndexedEnumVertices(IGeometry queryGeometry)
An indexed vertex enumerator for this point collection. |
IPoint |
getPoint(int i)
A copy of the ith vertex of a Path, Ring, Polyline, or Polygon; or a reference to the ith point of a Multipoint, TriangleFan, or TriangleStrip. |
int |
getPointCount()
The number of points in the collection. |
void |
getPoints(int index,
int count,
IPoint[] points)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.getPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[][]) . |
ISpatialReference |
getSpatialReference()
The spatial reference associated with this geometry. |
int |
hashCode()
the hashcode for this object |
void |
insertGeometries(int index,
int count,
IGeometry newGeometries)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.insertGeometries(com.esri.arcgis.geometry.IGeometryCollection, int, com.esri.arcgis.geometry.IGeometry[]) . |
void |
insertGeometryCollection(int index,
IGeometryCollection newGeometries)
Inserts at the specified index references to all if the geometries in the input collection. |
void |
insertPointCollection(int index,
IPointCollection newPoints)
Inserts copies of points, from the input point collection, as vertices into this Path, Ring, Polyline, or Polygon; or references to points in the input point collection into this Multipoint, TriangleFan, or TriangleStrip. |
void |
insertPoints(int index,
int count,
IPoint newPoints)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.insertPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[]) . |
void |
insertWKSPointZs(int index,
int count,
_WKSPointZ newPoints)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.insertWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.system._WKSPointZ[]) . |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
boolean |
isEmpty()
Indicates whether this geometry contains any points. |
boolean |
isEqual(IClone other)
Indicates if the receiver and other have the same properties. |
boolean |
isIdentical(IClone other)
Indicates if the receiver and other are the same object. |
boolean |
isMAware()
Indicates whether or not the geometry is aware of and capable of handling Ms. |
boolean |
isMSimple()
Indicates if all the Ms are valid numbers. |
boolean |
isPointIDAware()
Indicates whether or not the geometry is aware of and capable of handling PointIDs. |
boolean |
isPointIDSimple()
Indicates if all PointID values for this geometry are well-defined. |
boolean |
isZAware()
Indicates whether or not the geometry is aware of and capable of handling Zs. |
boolean |
isZSimple()
Indicates if all the Zs are valid numbers. |
void |
move(double dx,
double dy)
Moves dx units horizontally and dy units vertically. |
void |
move3D(double dx,
double dy,
double dz)
Moves the object by dx, dy and dz along the x, y, and z axes respectively. |
void |
moveVector(ILine v)
Moves a direction and distance v. |
void |
moveVector3D(IVector3D v)
Moves the object by an offset defined by a 3D vector. |
void |
project(ISpatialReference newReferenceSystem)
Projects this geometry into a new spatial reference. |
void |
projectEx(ISpatialReference newReferenceSystem,
int direction,
IGeoTransformation geoTransformation,
boolean bAngularDensify,
double maxSegmentLength,
double maxDeviation)
Projects a geometry, optionally applies a GeoTransformation, and optionally densifies the geometry. |
IGeometry |
projectToPlane(IPoint planarOrigin,
IVector3D planarPositiveX,
IVector3D planarNorm)
Generates a polygon footprint for the object in an arbitrary plane. |
void |
queryEnvelope(IEnvelope outEnvelope)
Copies this geometry's envelope properties into the specified envelope. |
void |
queryGeometries(int index,
int count,
IGeometry[] geometries)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.queryGeometries(com.esri.arcgis.geometry.IGeometryCollection, int, com.esri.arcgis.geometry.IGeometry[][]) . |
void |
queryPoint(int index,
IPoint point)
Queries for a point in the PointCollection at given index. |
void |
queryPoints(int index,
int count,
IPoint points)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.queryPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[][]) . |
void |
queryWKSPointZs(int index,
int count,
_WKSPointZ[] pointStructures)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.queryWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.system._WKSPointZ[][]) . |
void |
removeGeometries(int index,
int count)
Removes references to some geometries from this collection. |
void |
removePoints(int index,
int count)
Removes vertices from a Path, Ring, Polyline, or Polygon, or references to points from a Multipoint, TriangleFan, or TriangleStrip. |
void |
replacePointCollection(int index,
int goingAway,
IPointCollection newPoints)
Replaces vertices/points within a PointCollection. |
void |
replacePoints(int index,
int comingIn,
int goingAway,
IPoint newPoints)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.replacePoints(com.esri.arcgis.geometry.IPointCollection4, int, int, com.esri.arcgis.geometry.IPoint[]) . |
void |
rotate(IPoint origin,
double rotationAngle)
Rotates about the specified origin point. |
void |
rotateVector3D(IVector3D axis,
double rotationAngle)
Rotates the object about axis defined by the specified vector through an angle measured in radians. |
void |
scale(IPoint origin,
double sx,
double sy)
Scales about the specified origin using seperate horizonal and vertical scales. |
void |
scale3D(IPoint origin,
double sx,
double sy,
double sz)
Scales the object about the specified origin point. |
void |
serialize(IXMLSerializeData data)
Serializes an object to XML. |
void |
setEmpty()
Removes all points from this geometry. |
void |
setGeometries(int count,
IGeometry newGeometries)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.setGeometries(com.esri.arcgis.geometry.IGeometryCollection, com.esri.arcgis.geometry.IGeometry[]) . |
void |
setGeometryCollection(IGeometryCollection newParts)
Replaces all geometries in the collection with references to geometries from the input collection. |
void |
setMAware(boolean mAware)
Indicates whether or not the geometry is aware of and capable of handling Ms. |
void |
setPointCollection(IPointCollection newPoints)
Replaces all vertices of this Path, Ring, Polyline, or Polygon with copies of the points in the input collection; or all points of this Multipoint, TriangleFan, or TriangleStrip with references to points from the input collection. |
void |
setPointIDAware(boolean idAware)
Indicates whether or not the geometry is aware of and capable of handling PointIDs. |
void |
setPoints(int count,
IPoint newPoints)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.setPoints(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.geometry.IPoint[]) . |
void |
setSpatialReferenceByRef(ISpatialReference spatialRef)
The spatial reference associated with this geometry. |
void |
setWKSPointZs(int count,
_WKSPointZ pointStructures)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.setWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.system._WKSPointZ[]) . |
void |
setZAware(boolean zAware)
Indicates whether or not the geometry is aware of and capable of handling Zs. |
void |
snapToSpatialReference()
Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system. |
void |
transform(int direction,
ITransformation transformation)
Applies an arbitrary transformation. |
void |
transform3D(int direction,
ITransformation3D transformation)
Applies an arbitrary 3D transformation. |
void |
updatePoint(int i,
IPoint p)
Changes the ith vertex or point to be a copy of the input point. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public Triangles() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic Triangles(Object obj) throws IOException
Triangles theTriangles = (Triangles) obj;
obj
to Triangles
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int getPointCount() throws IOException, AutomationException
Returns the number of Points in the PointCollection. The last Point in the PointCollection has an index equal to PointCount - 1.
getPointCount
in interface IPointCollection
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPoint getPoint(int i) throws IOException, AutomationException
getPoint
in interface IPointCollection
i
- The i (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addPoint(IPoint inPoint, Object before, Object after) throws IOException, AutomationException
Adds a Point to a PointCollection. If before and after are omitted, the Point is added to the end of the PointCollection. Additionally, by specifying either the before or after index, the Point can be added at a specific location in the PointCollection.
addPoint
in interface IPointCollection
inPoint
- A reference to a com.esri.arcgis.geometry.IPoint (in)before
- A Variant (in, optional, pass null if not required)after
- A Variant (in, optional, pass null if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void updatePoint(int i, IPoint p) throws IOException, AutomationException
Updates the ith Point with a copy of the input Point. Update replaces the reference to the indexed point with a reference to the input Point.
For efficiency UpdatePoint does not check if the spatial reference of the input point is equal to the spatial reference of the PointCollection. Please make sure that the spatial reference of the input point is equal to the spatial reference of the PointCollection before you pass the point in.
Note : You can also explicitly check the spatial reference by
using IClone::IsEqual
//To check spatial reference efficiently
IPoint pointIn = null;
IPointCollection ptColl = null;
ISpatialReference pSpatialReferenceOfCollection = null;
//The next line will not do anything if the two projections are equal
pointIn.project(pSpatialReferenceOfCollection);
ptColl.updatePoint( 1, pointIn);
updatePoint
in interface IPointCollection
i
- The i (in)p
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryPoints(int index, int count, IPoint points) throws IOException, AutomationException
GeometryEnvironment.queryPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[][])
.
Queries a specified number (Count) of Points starting at the given index into an array of Points.
queryPoints
in interface IPointCollection
index
- The index (in)count
- The count (in)points
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void insertPoints(int index, int count, IPoint newPoints) throws IOException, AutomationException
GeometryEnvironment.insertPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[])
.
Inserts a specified number (Count) of Points into the PointCollection at the given index from an array of Points. The first Count points from the array are inserted.
insertPoints
in interface IPointCollection
index
- The index (in)count
- The count (in)newPoints
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void insertPointCollection(int index, IPointCollection newPoints) throws IOException, AutomationException
Inserts a PointCollection of Points into the PointCollection at the specified index. The resulting PointCollection does not retain information about the distinction between the old and new Point Collections.
insertPointCollection
in interface IPointCollection
index
- The index (in)newPoints
- A reference to a com.esri.arcgis.geometry.IPointCollection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addPoints(int count, IPoint newPoints) throws IOException, AutomationException
GeometryEnvironment.addPoints(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.geometry.IPoint[])
.
Adds the first specified number (Count) of Points to the PointCollection from an array of Points (with at least Count points). The Points are all added to the end of the PointCollection in the same sequence as they are ordered in the array.
addPoints
in interface IPointCollection
count
- The count (in)newPoints
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addPointCollection(IPointCollection newPoints) throws IOException, AutomationException
Adds a PointCollection of Points to the end of the PointCollection. The resulting PointCollection does not retain the division between the old PointCollection and the additional PointCollection.
addPointCollection
in interface IPointCollection
newPoints
- A reference to a com.esri.arcgis.geometry.IPointCollection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPoints(int count, IPoint newPoints) throws IOException, AutomationException
GeometryEnvironment.setPoints(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.geometry.IPoint[])
.
Sets the contents of the PointCollection equal to the first Count Points from the input array of Points. After SetPoints is called, the PointCollection contains only count Points from the input Point array (regardless of what it may have contained previously).
setPoints
in interface IPointCollection
count
- The count (in)newPoints
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPointCollection(IPointCollection newPoints) throws IOException, AutomationException
Sets the contents of the PointCollection equal to the contents of the input PointCollection. After SetPointCollection is called, the PointCollection contains only the Points from the input PointCollection (regardless of what it may have contained previously).
setPointCollection
in interface IPointCollection
newPoints
- A reference to a com.esri.arcgis.geometry.IPointCollection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void removePoints(int index, int count) throws IOException, AutomationException
Removes a specified number (Count) of Points from a PointCollection starting at a given index.
removePoints
in interface IPointCollection
index
- The index (in)count
- The count (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumVertex getEnumVertices() throws IOException, AutomationException
Returns an EnumVertex for the vertices in the PointCollection. The EnumVertex allows the Points to be tranversed in a sequential order.
getEnumVertices
in interface IPointCollection
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void replacePoints(int index, int comingIn, int goingAway, IPoint newPoints) throws IOException, AutomationException
GeometryEnvironment.replacePoints(com.esri.arcgis.geometry.IPointCollection4, int, int, com.esri.arcgis.geometry.IPoint[])
.
Removes a specified number (goingAway) of Points from a PointCollection starting at a given index and replaces them (starting at the same index) with a specified number (comingIn) of Points from an array of Points.
If you are using attempting to use this method from a .NET enabled language, such as VB.NET, you may need to use the ReplacePoints method provided by the IGeometryBridge interface exposed on the GeometryEnvironment object.
replacePoints
in interface IPointCollection
index
- The index (in)comingIn
- The comingIn (in)goingAway
- The goingAway (in)newPoints
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void replacePointCollection(int index, int goingAway, IPointCollection newPoints) throws IOException, AutomationException
Replaces a specified number (goingAway) of Points in the PointCollection begining at a given index with a PointCollection of Points (inserted at the given index).
replacePointCollection
in interface IPointCollection
index
- The index (in)goingAway
- The goingAway (in)newPoints
- A reference to a com.esri.arcgis.geometry.IPointCollection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryPoint(int index, IPoint point) throws IOException, AutomationException
Queries the ith Point from the PointCollection. The first Point in the PointCollection has index 0, and the last Point has index equal to PointCount - 1. (Alternatively, the last Point in the PointCollection can be referenced using index -1.).
Note: The output geometry must be co-created prior to the query. The output geometry is not co-created 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.
queryPoint
in interface IPointCollection
index
- The index (in)point
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addWKSPointZs(int count, _WKSPointZ pointStructures) throws IOException, AutomationException
GeometryEnvironment.addWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.system._WKSPointZ[])
.
addWKSPointZs
in interface IPointCollection4
count
- The count (in)pointStructures
- A Structure: com.esri.arcgis.system._WKSPointZ (A com.esri.arcgis.system._WKSPointZ COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setWKSPointZs(int count, _WKSPointZ pointStructures) throws IOException, AutomationException
GeometryEnvironment.setWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.system._WKSPointZ[])
.
setWKSPointZs
in interface IPointCollection4
count
- The count (in)pointStructures
- A Structure: com.esri.arcgis.system._WKSPointZ (A com.esri.arcgis.system._WKSPointZ COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryWKSPointZs(int index, int count, _WKSPointZ[] pointStructures) throws IOException, AutomationException
GeometryEnvironment.queryWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.system._WKSPointZ[][])
.
queryWKSPointZs
in interface IPointCollection4
index
- The index (in)count
- The count (in)pointStructures
- A Structure: com.esri.arcgis.system._WKSPointZ (A com.esri.arcgis.system._WKSPointZ COM typedef) (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void insertWKSPointZs(int index, int count, _WKSPointZ newPoints) throws IOException, AutomationException
GeometryEnvironment.insertWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.system._WKSPointZ[])
.
insertWKSPointZs
in interface IPointCollection4
index
- The index (in)count
- The count (in)newPoints
- A Structure: com.esri.arcgis.system._WKSPointZ (A com.esri.arcgis.system._WKSPointZ COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumVertex getIndexedEnumVertices(IGeometry queryGeometry) throws IOException, AutomationException
getIndexedEnumVertices
in interface IPointCollection3
queryGeometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getPoints(int index, int count, IPoint[] points) throws IOException, AutomationException
GeometryEnvironment.getPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[][])
.
getPoints
in interface IPointCollection2
index
- The index (in)count
- The count (in)points
- A reference to a com.esri.arcgis.geometry.IPoint (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getGeometryCount() throws IOException, AutomationException
Returns the number of Geometries in the GeometryCollection. The last Geometry in the GeometryCollection has an index equal to GeometryCount - 1.
getGeometryCount
in interface IGeometryCollection
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IGeometry getGeometry(int index) throws IOException, AutomationException
getGeometry
in interface IGeometryCollection
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addGeometry(IGeometry inGeometry, Object before, Object after) throws IOException, AutomationException
When applying the AddGeometry method give either the before or after index and not both. Adding a Geometry to the collection as the first one is done by setting the before index as 0.
The spatial reference of the GeometryCollection is transferred
(objects projected if necessary) to any objects added to
it. However the spatial reference of the added geometry is not
transferred to the GeometryCollection. Always make sure to set
the spatial reference on the object GeometryCollection prior to add
other geometries to it to avoid creating invalid geometry. For
example, adding geometry objects to a GeometryBag that doesn't have
a well-defined spatial reference will set an undefined spatial
reference to all the objects added to the bag. Using this
GeometryBag may cause unexpected behavior with the
ITopologicalOperator::ConstructUnion method.
addGeometry
in interface IGeometryCollection
inGeometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)before
- A Variant (in, optional, pass null if not required)after
- A Variant (in, optional, pass null if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryGeometries(int index, int count, IGeometry[] geometries) throws IOException, AutomationException
GeometryEnvironment.queryGeometries(com.esri.arcgis.geometry.IGeometryCollection, int, com.esri.arcgis.geometry.IGeometry[][])
.
Note: The GeometryType returned by the QueryGeometries method depends on which object type points the IGeometryCollection pointer.
IGeometryCollection Object GeometryType | Returned Object GeometryType |
Polygon |
Rings |
Polyline |
Paths |
Multipoint |
Points |
Multipatch |
TriangleFans or TriangleStrips or Rings |
TriangleFan |
Points |
TriangleStrip |
Points |
Geometry Bag |
Any type of IGeometry |
queryGeometries
in interface IGeometryCollection
index
- The index (in)count
- The count (in)geometries
- A reference to a com.esri.arcgis.geometry.IGeometry (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addGeometries(int count, IGeometry newGeometries) throws IOException, AutomationException
GeometryEnvironment.addGeometries(com.esri.arcgis.geometry.IGeometryCollection, com.esri.arcgis.geometry.IGeometry[])
.
The geometries are added last in the list. Use an array of geometries (IGeometry) and the exact number (count ) of elements in the array. Exceeding the boundary of the array will cause an application error. If you don't want to place the geometries last in the collection then use the InsertGeometries method.
addGeometries
in interface IGeometryCollection
count
- The count (in)newGeometries
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addGeometryCollection(IGeometryCollection newGeometries) throws IOException, AutomationException
Adds references of all of the parts of the input GeometryCollection to the end of the current GeometryCollection.
addGeometryCollection
in interface IGeometryCollection
newGeometries
- A reference to a com.esri.arcgis.geometry.IGeometryCollection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void insertGeometries(int index, int count, IGeometry newGeometries) throws IOException, AutomationException
GeometryEnvironment.insertGeometries(com.esri.arcgis.geometry.IGeometryCollection, int, com.esri.arcgis.geometry.IGeometry[])
.
The geometries are inserted before the ith (index) element in the list. Use an array of geometries and give the exact number (count ) of elements in the array. A too large value for the count parameter causes exceeding the boundary of the array and will cause an application error. To place the geometries last in the collection then use the addGeometries method.
insertGeometries
in interface IGeometryCollection
index
- The index (in)count
- The count (in)newGeometries
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void insertGeometryCollection(int index, IGeometryCollection newGeometries) throws IOException, AutomationException
InsertGeometryCollection merges one GeometryCollection within another at a specified index.
insertGeometryCollection
in interface IGeometryCollection
index
- The index (in)newGeometries
- A reference to a com.esri.arcgis.geometry.IGeometryCollection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setGeometries(int count, IGeometry newGeometries) throws IOException, AutomationException
GeometryEnvironment.setGeometries(com.esri.arcgis.geometry.IGeometryCollection, com.esri.arcgis.geometry.IGeometry[])
.
SetGeometries is used to reset the references of the geometries within the GeometryCollection . The result is that all references are changed to point only at the geometries contained within the specified array. Note that the GeometryCount changes accordingly also.
setGeometries
in interface IGeometryCollection
count
- The count (in)newGeometries
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setGeometryCollection(IGeometryCollection newParts) throws IOException, AutomationException
SetGeometryCollection copies the geometry references from one GeometryCollection to another.
VB Example: Set GeometryCollection m_pGeoColl_A as m_pGeoColl_B
m_pGeoColl_A.SetGeometryCollection m_pGeoColl_B
setGeometryCollection
in interface IGeometryCollection
newParts
- A reference to a com.esri.arcgis.geometry.IGeometryCollection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void removeGeometries(int index, int count) throws IOException, AutomationException
removeGeometries
in interface IGeometryCollection
index
- The index (in)count
- The count (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void geometriesChanged() throws IOException, AutomationException
GeometriesChanged flags that the geometries have been changed. It also marks a top level geometry as being non-simple. Use it when manipulating the parts of a geometry directly (for example, rotating a ring). The top level geometry won't know that its cached envelope, length, centroid, etc. are invalid until this method is used.
geometriesChanged
in interface IGeometryCollection
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IClone esri_clone() throws IOException, AutomationException
esri_clone
in interface IClone
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void assign(IClone src) throws IOException, AutomationException
assign
in interface IClone
src
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isEqual(IClone other) throws IOException, AutomationException
IsEqual returns True if the receiver and the source have the same properties. Note, this does not imply that the receiver and the source reference the same object.
isEqual
in interface IClone
other
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isIdentical(IClone other) throws IOException, AutomationException
IsIdentical returns true if the receiver and the source reference the same object.
isIdentical
in interface IClone
other
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void move(double dx, double dy) throws IOException, AutomationException
Moves the Geometry dX units along the X-Axis and dY units along the Y-Axis. Only changes the position of the Geometry without altering any of the other characteristics. Move is a spatial offset.
move
in interface ITransform2D
dx
- The dx (in)dy
- The dy (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void moveVector(ILine v) throws IOException, AutomationException
Moves the Geometry dX units along the X-Axis and dY units along the Y-Axis, where dX and dY are calculated from the input vector Line. Only the Length and Angle of the vector affect the transformation. The location of the vector does not change the transformation. Only changes the position of the Geometry without altering any of the other characteristics. Move is a spatial offset.
moveVector
in interface ITransform2D
v
- A reference to a com.esri.arcgis.geometry.ILine (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void scale(IPoint origin, double sx, double sy) throws IOException, AutomationException
Stretches the Geometry a factor of sX along the X-Axis and a factor of sY along the Y-Axis (where sX is the ratio of Old Width to New Width, and sY is the ratio of Old Height to New Height). The Origin point is the reference Point from which the transformation is performed (Regardless of the location of the Origin point, the Geometry resulting from the transformation is the same, except for a positional offset). The Origin is the only point in the transformation guaranted to remain in the same location after the transformation is complete.
Note: Caution must be taken when scaling a CircularArc or a geometry containing CircularArc segments. Unless Abs(ScaleX) = Abs(ScaleY), the resulting CircularArcs will not retain the characteristics of the original geometry (since they remain CircularArcs).
scale
in interface ITransform2D
origin
- A reference to a com.esri.arcgis.geometry.IPoint (in)sx
- The sx (in)sy
- The sy (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void rotate(IPoint origin, double rotationAngle) throws IOException, AutomationException
Rotate performs an angular transform (rotation) on the Geometry. The Origin is the only point in the transformation guaranteed to remain in the same location after the transformation is performed. Regardless of the Origin, the transformed Geometry is the same, except for a positional offset. The RotationAngle is measured in radians.
An Envelope cannot be Rotated.
rotate
in interface ITransform2D
origin
- A reference to a com.esri.arcgis.geometry.IPoint (in)rotationAngle
- The rotationAngle (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void transform(int direction, ITransformation transformation) throws IOException, AutomationException
transform
in interface ITransform2D
direction
- A com.esri.arcgis.geometry.esriTransformDirection constant (in)transformation
- A reference to a com.esri.arcgis.geometry.ITransformation (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void move3D(double dx, double dy, double dz) throws IOException, AutomationException
move3D
in interface ITransform3D
dx
- The dx (in)dy
- The dy (in)dz
- The dz (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void moveVector3D(IVector3D v) throws IOException, AutomationException
moveVector3D
in interface ITransform3D
v
- A reference to a com.esri.arcgis.geometry.IVector3D (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void scale3D(IPoint origin, double sx, double sy, double sz) throws IOException, AutomationException
scale3D
in interface ITransform3D
origin
- A reference to a com.esri.arcgis.geometry.IPoint (in)sx
- The sx (in)sy
- The sy (in)sz
- The sz (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void rotateVector3D(IVector3D axis, double rotationAngle) throws IOException, AutomationException
The angle of rotation must be in radians. To convert to radians from decimal degrees, multiply by PI/180.
rotateVector3D
in interface ITransform3D
axis
- A reference to a com.esri.arcgis.geometry.IVector3D (in)rotationAngle
- The rotationAngle (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void transform3D(int direction, ITransformation3D transformation) throws IOException, AutomationException
transform3D
in interface ITransform3D
direction
- A com.esri.arcgis.geometry.esriTransformDirection constant (in)transformation
- A reference to a com.esri.arcgis.geometry.ITransformation3D (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IGeometry projectToPlane(IPoint planarOrigin, IVector3D planarPositiveX, IVector3D planarNorm) throws IOException, AutomationException
projectToPlane
in interface ITransform3D
planarOrigin
- A reference to a com.esri.arcgis.geometry.IPoint (in)planarPositiveX
- A reference to a com.esri.arcgis.geometry.IVector3D (in)planarNorm
- A reference to a com.esri.arcgis.geometry.IVector3D (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isMAware() throws IOException, AutomationException
Returns or sets the M Awareness state of the geometry object. If MAware is TRUE, then the object will recognize that it has M attributes and perform operations on them as necessary. If MAware is FALSE, the object will ignore Ms while performing operations.
isMAware
in interface IMAware
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMAware(boolean mAware) throws IOException, AutomationException
setMAware
in interface IMAware
mAware
- The mAware (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isMSimple() throws IOException, AutomationException
MSimple is TRUE if none of the M values held by the geometry object are NaN. If any of the Ms within the object are NaN, MSimple is FALSE.
isMSimple
in interface IMAware
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void dropMs() throws IOException, AutomationException
Resets all of the current M values held by the geometry object back to NaN. MAware does not change.
dropMs
in interface IMAware
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isZAware() throws IOException, AutomationException
Returns or sets the Z Awareness state of the geometry object. If ZAware is TRUE, then the object will recognize that it has Z attributes and perform operations on them as necessary. If ZAware is FALSE, the object will ignore Zs while performing operations. ZAware should only be set to TRUE when all of the Zs are not NaN.
Use ZAware = True when you want geometries to retain Z values during geometry operations.
isZAware
in interface IZAware
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setZAware(boolean zAware) throws IOException, AutomationException
setZAware
in interface IZAware
zAware
- The zAware (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isZSimple() throws IOException, AutomationException
ZSimple is TRUE if none of the Z values held by the geometry object are NaN. If any of the Zs within the object are NaN, ZSimple is FALSE.
isZSimple
in interface IZAware
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void dropZs() throws IOException, AutomationException
Resets all of the current Z values held by the geometry object back to NaN. ZAware does not change.
dropZs
in interface IZAware
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isPointIDAware() throws IOException, AutomationException
Returns or sets the PointID Awareness state of the geometry object. If PointIDAware is TRUE, then the object will recognize that it has PointID attributes and perform operations on them as necessary. If PointIDAware is FALSE, the object will ignore PointIDs while performing operations.
isPointIDAware
in interface IPointIDAware
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPointIDAware(boolean idAware) throws IOException, AutomationException
setPointIDAware
in interface IPointIDAware
idAware
- The idAware (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isPointIDSimple() throws IOException, AutomationException
PointIDSimple is TRUE when all of the PointIDs are well defined (not equal to 0). If any PointIDs equal 0, PointIDSimple is FALSE.
isPointIDSimple
in interface IPointIDAware
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void dropPointIDs() throws IOException, AutomationException
Resets all PointID values to there initial value of 0. PointIDAware does not change.
dropPointIDs
in interface IPointIDAware
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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
getGeometryType
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getDimension() throws IOException, AutomationException
Returns the dimension of the geometry object based on the geometry's type.
getDimension
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
getSpatialReference
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSpatialReferenceByRef(ISpatialReference spatialRef) throws IOException, AutomationException
setSpatialReferenceByRef
in interface IGeometry
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.public 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.
isEmpty
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setEmpty() throws IOException, AutomationException
SetEmpty returns the Geometry to its original initialization state by releasing all data referenced by the Geometry.
setEmpty
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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 co-created prior to the query. The output geometry is not co-created 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.
queryEnvelope
in interface IGeometry
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.public IEnvelope getEnvelope() throws IOException, AutomationException
Returns the unique Envelope that binds the Geometry object. This is the smallest Envelope that Contains the object.
getEnvelope
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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 high-level geometries only. High-Level geometries are point, multipoint, polyline and polygon. To use this method with low-level geometries such as segments (Line, Circular Arc, Elliptic Arc, Bézier Curve), paths or rings, they must be wrapped into high-level 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.
project
in interface IGeometry
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.public void snapToSpatialReference() throws IOException, AutomationException
snapToSpatialReference
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void geoNormalize() throws IOException, AutomationException
geoNormalize
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void geoNormalizeFromLongitude(double longitude) throws IOException, AutomationException
geoNormalizeFromLongitude
in interface IGeometry
longitude
- The longitude (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void projectEx(ISpatialReference newReferenceSystem, int direction, IGeoTransformation geoTransformation, boolean bAngularDensify, double maxSegmentLength, double maxDeviation) throws IOException, AutomationException
By default, ProjectEx will not densify geometries as they are 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. Set the bAngularDensify parameter if you want to densify the geometries while they are projected.
projectEx
in interface IGeometry2
newReferenceSystem
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)direction
- A com.esri.arcgis.geometry.esriTransformDirection constant (in)geoTransformation
- A reference to a com.esri.arcgis.geometry.IGeoTransformation (in)bAngularDensify
- The bAngularDensify (in)maxSegmentLength
- The maxSegmentLength (in)maxDeviation
- The maxDeviation (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void serialize(IXMLSerializeData data) throws IOException, AutomationException
serialize
in interface IXMLSerialize
data
- A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deserialize(IXMLSerializeData data) throws IOException, AutomationException
deserialize
in interface IXMLSerialize
data
- A reference to a com.esri.arcgis.system.IXMLSerializeData (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 |