Package com.esri.core.geometry
Class MultiVertexGeometry
- java.lang.Object
-
- com.esri.core.geometry.Geometry
-
- com.esri.core.geometry.MultiVertexGeometry
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
MultiPath
,MultiPoint
,MultiVertexGeometryImpl
public abstract class MultiVertexGeometry extends Geometry implements java.io.Serializable
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:
- Serialized Form
-
-
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 Constructor Description MultiVertexGeometry()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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[]
getCoordinates2D()
Returns XY coordinates as an array.(package private) Point3D[]
getCoordinates3D()
Returns XYZ coordinates as an array.abstract Point
getPoint(int index)
Returns given vertex of the Geometry.void
getPoint(int index, Point ptOut)
Returns given vertex of the Geometry by value.abstract void
getPointByVal(int index, Point outPoint)
Returns given vertex of the Geometry.abstract int
getPointCount()
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
getXY(int index, Point2D pt)
(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
setPoint(int index, Point pointSrc)
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
setXY(int index, Point2D pt)
Sets XY coordinates of the given vertex of the Geometry.(package private) abstract void
setXYZ(int index, Point3D pt)
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
-
-
-
-
Method Detail
-
_assignVertexDescriptionImpl
protected void _assignVertexDescriptionImpl(VertexDescription newDescription)
- Specified by:
_assignVertexDescriptionImpl
in classGeometry
-
getPointCount
public abstract int getPointCount()
Returns the total vertex count in this Geometry.
-
getPoint
public abstract Point getPoint(int index)
Returns given vertex of the Geometry.
-
getPoint
public void getPoint(int index, Point ptOut)
Returns given vertex of the Geometry by value.
-
setPoint
public abstract void setPoint(int index, Point pointSrc)
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
public abstract Point2D getXY(int index)
Returns XY coordinates of the given vertex of the Geometry.
-
getXY
public abstract void getXY(int index, Point2D pt)
-
setXY
public abstract void setXY(int index, Point2D pt)
Sets XY coordinates of the given vertex of the Geometry. All other attributes are unchanged.
-
getXYZ
abstract Point3D getXYZ(int index)
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
abstract void setXYZ(int index, Point3D pt)
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
public Point2D[] getCoordinates2D()
Returns XY coordinates as an array.
-
getCoordinates3D
Point3D[] getCoordinates3D()
Returns XYZ coordinates as an array.
-
queryCoordinates
public abstract void queryCoordinates(Point[] dst)
-
queryCoordinates
public abstract void queryCoordinates(Point2D[] dst)
Queries XY coordinates as an array. The array must be larg enough (See GetPointCount()).
-
queryCoordinates
abstract void queryCoordinates(Point3D[] dst)
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
public abstract void getPointByVal(int index, Point outPoint)
Returns given vertex of the Geometry. The outPoint will have same VertexDescription as this Geometry.
-
setPointByVal
public abstract void setPointByVal(int index, Point pointSrc)
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).
-
-