Package com.esri.core.geometry
Class MultiVertexGeometry
java.lang.Object
com.esri.core.geometry.Geometry
com.esri.core.geometry.MultiVertexGeometry
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MultiPath
,MultiPoint
,MultiVertexGeometryImpl
This class is a base for geometries with many vertices.
The vertex attributes are stored in separate arrays of corresponding type.
There are as many arrays as there are attributes in the vertex.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.esri.core.geometry.Geometry
Geometry.GeometryAccelerationDegree, Geometry.GeometryType, Geometry.Type
-
Field Summary
Fields inherited from class com.esri.core.geometry.Geometry
m_description, m_touchFlag
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_assignVertexDescriptionImpl
(VertexDescription newDescription) (package private) abstract double
getAttributeAsDbl
(int semantics, int index, int ordinate) Returns value of the given vertex attribute as double.(package private) abstract int
getAttributeAsInt
(int semantics, int index, int ordinate) Returns value of the given vertex attribute as int.Point2D[]
Returns XY coordinates as an array.(package private) Point3D[]
Returns XYZ coordinates as an array.abstract Point
getPoint
(int index) Returns given vertex of the Geometry.void
Returns given vertex of the Geometry by value.abstract void
getPointByVal
(int index, Point outPoint) Returns given vertex of the Geometry.abstract int
Returns the total vertex count in this Geometry.abstract Point2D
getXY
(int index) Returns XY coordinates of the given vertex of the Geometry.abstract void
(package private) abstract Point3D
getXYZ
(int index) Returns XYZ coordinates of the given vertex of the Geometry.abstract void
queryCoordinates
(Point[] dst) abstract void
queryCoordinates
(Point2D[] dst) Queries XY coordinates as an array.(package private) abstract void
queryCoordinates
(Point3D[] dst) Queries XYZ coordinates as an array.(package private) abstract void
setAttribute
(int semantics, int index, int ordinate, double value) Sets the value of given attribute at given posisiotnsis.(package private) abstract void
setAttribute
(int semantics, int index, int ordinate, int value) Same as above, but works with ints.abstract void
Sets the vertex at given index of the Geometry.abstract void
setPointByVal
(int index, Point pointSrc) Sets the vertex at given index of the Geometry.abstract void
Sets XY coordinates of the given vertex of the Geometry.(package private) abstract void
Sets XYZ coordinates of the given vertex of the Geometry.Methods inherited from class com.esri.core.geometry.Geometry
_clone, _getImpl, _touch, addAttribute, addID, addM, addZ, applyTransformation, applyTransformation, assignVertexDescription, calculateArea2D, calculateLength2D, copy, copyTo, createInstance, dropAllAttributes, dropAttribute, estimateMemorySize, estimateMemorySize, getBoundary, getDescription, getDimension, getDimensionFromType, getStateFlag, getType, hasAttribute, hasID, hasM, hasZ, isArea, isEmpty, isLinear, isMultiPath, isMultiVertex, isPoint, isSegment, mergeVertexDescription, queryEnvelope, queryEnvelope2D, queryEnvelope3D, queryInterval, queryLooseEnvelope2D, queryLooseEnvelope3D, replaceNaNs, setEmpty, toString, vertex_count, writeReplace
-
Constructor Details
-
MultiVertexGeometry
public MultiVertexGeometry()
-
-
Method Details
-
_assignVertexDescriptionImpl
- Specified by:
_assignVertexDescriptionImpl
in classGeometry
-
getPointCount
public abstract int getPointCount()Returns the total vertex count in this Geometry. -
getPoint
Returns given vertex of the Geometry. -
getPoint
Returns given vertex of the Geometry by value. -
setPoint
Sets the vertex at given index of the Geometry.- Parameters:
index
- The index of the vertex being changed.pointSrc
- The Point instance to set given vertex attributes from. The pointSrc can not be empty.
The method throws if the pointSrc is not of the Point type.
The attributes, that are present in the pointSrc and missing in this Geometry, will be added to the Geometry.
The vertex attributes missing in the pointSrc but present in the Geometry will be set to the default values (see VertexDescription::GetDefaultValue).
-
getXY
Returns XY coordinates of the given vertex of the Geometry. -
getXY
-
setXY
Sets XY coordinates of the given vertex of the Geometry. All other attributes are unchanged. -
getXYZ
Returns XYZ coordinates of the given vertex of the Geometry. If the Geometry has no Z's, the default value for Z is returned (0). -
setXYZ
Sets XYZ coordinates of the given vertex of the Geometry. If Z attribute is not present in this Geometry, it is added. All other attributes are unchanged. -
getCoordinates2D
Returns XY coordinates as an array. -
getCoordinates3D
Point3D[] getCoordinates3D()Returns XYZ coordinates as an array. -
queryCoordinates
-
queryCoordinates
Queries XY coordinates as an array. The array must be larg enough (See GetPointCount()). -
queryCoordinates
Queries XYZ coordinates as an array. The array must be larg enough (See GetPointCount()). -
getAttributeAsDbl
abstract double getAttributeAsDbl(int semantics, int index, int ordinate) Returns value of the given vertex attribute as double.- Parameters:
semantics
- The atribute semantics.index
- is the vertex index in the Geometry.ordinate
- is the ordinate of a vertex attribute (for example, y has ordinate of 1, because it is second ordinate of POSITION) If attribute is not present, the default value is returned. See VertexDescription::GetDefaultValue() method.
-
getAttributeAsInt
abstract int getAttributeAsInt(int semantics, int index, int ordinate) Returns value of the given vertex attribute as int.- Parameters:
semantics
- The atribute semantics.index
- is the vertex index in the Geometry.ordinate
- is the ordinate of a vertex attribute (for example, y has ordinate of 1, because it is second ordinate of POSITION) If attribute is not present, the default value is returned. See VertexDescription::GetDefaultValue() method. Avoid using this method on non-integer atributes.
-
setAttribute
abstract void setAttribute(int semantics, int index, int ordinate, double value) Sets the value of given attribute at given posisiotnsis.- Parameters:
semantics
- The atribute semantics.index
- is the vertex index in the Geometry.ordinate
- is the ordinate of a vertex attribute (for example, y has ordinate of 1, because it is seond ordinate of POSITION)value
- is the value to set. as well as the number of components of the attribute. If the attribute is not present in this Geometry, it is added.
-
setAttribute
abstract void setAttribute(int semantics, int index, int ordinate, int value) Same as above, but works with ints. Avoid using this method on non-integer atributes because some double attributes may have NaN default values (e.g. Ms) -
getPointByVal
Returns given vertex of the Geometry. The outPoint will have same VertexDescription as this Geometry. -
setPointByVal
Sets the vertex at given index of the Geometry.- Parameters:
index
- The index of the vertex being changed.pointSrc
- The Point instance to set given vertex attributes from. The pointSrc can not be empty.
The method throws if the pointSrc is not of the Point type.
The attributes, that are present in the pointSrc and missing in this Geometry, will be added to the Geometry.
The vertex attributes missing in the pointSrc but present in the Geometry will be set to the default values (see VertexDescription::GetDefaultValue).
-