Package com.esri.core.geometry
Class MultiPointImpl
- java.lang.Object
-
- com.esri.core.geometry.Geometry
-
- com.esri.core.geometry.MultiVertexGeometry
-
- com.esri.core.geometry.MultiVertexGeometryImpl
-
- com.esri.core.geometry.MultiPointImpl
-
- All Implemented Interfaces:
java.io.Serializable
final class MultiPointImpl extends MultiVertexGeometryImpl
The MultiPoint is a collection of points.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.esri.core.geometry.MultiVertexGeometryImpl
MultiVertexGeometryImpl.DirtyFlags, MultiVertexGeometryImpl.GeometryXSimple
-
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.MultiVertexGeometryImpl
m_accelerators, m_envelope, m_flagsMask, m_pointCount, m_reservedPointCount, m_simpleTolerance, m_vertexAttributes
-
Fields inherited from class com.esri.core.geometry.Geometry
m_description, m_touchFlag
-
-
Constructor Summary
Constructors Constructor Description MultiPointImpl()
MultiPointImpl(VertexDescription description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
_buildQuadTreeAccelerator(Geometry.GeometryAccelerationDegree accelDegree)
boolean
_buildRasterizedGeometryAccelerator(double toleranceXY, Geometry.GeometryAccelerationDegree accelDegree)
(package private) void
_copyToImpl(MultiVertexGeometryImpl mvg)
\internal CHildren implement this method to copy additional informationjava.lang.Object
_getImpl()
protected void
_notifyModifiedAllImpl()
protected void
_verifyStreamsImpl()
\internal Called inside of the VerifyAllStreams to get a child class a chance to do additional verify.void
add(double x, double y)
Adds a Point to this MultiPoint with given x, y coordinates.void
add(double x, double y, double z)
Adds a Point to this MultiPoint with given x, y, z coordinates.void
add(MultiVertexGeometryImpl src, int beginIndex, int endIndex)
Appends points from another MultiVertexGeometryImpl at the end of this one.void
add(Point point)
Adds a Point to this MultiPoint.void
addPoints(Point[] points)
void
addPoints(Point2D[] points)
void
applyTransformation(Transformation2D transform)
Applies 2D affine transformation in XY plane.(package private) void
applyTransformation(Transformation3D transform)
Applies 3D affine transformation.double
calculateArea2D()
Calculates the area of the geometry.double
calculateLength2D()
Calculates the length of the geometry.Geometry
createInstance()
Creates an instance of an empty geometry of the same type.boolean
equals(java.lang.Object other)
long
estimateMemorySize()
Returns an estimate of this object size in bytes.Geometry
getBoundary()
Returns boundary of this geometry.int
getDimension()
Returns the topological dimension of the geometry object based on the geometry's type.Geometry.Type
getType()
Returns the geometry type.void
insertPoint(int beforePointIndex, Point pt)
int
queryCoordinates(Point2D[] dst, int dstSize, int beginIndex, int endIndex)
(package private) void
removePoint(int pointIndex)
void
resize(int pointCount)
Resizes the MultiPoint to have the given size.void
setEmpty()
Returns the geometry to its original initialization state by releasing all data referenced by the geometry.-
Methods inherited from class com.esri.core.geometry.MultiVertexGeometryImpl
_assignVertexDescriptionImpl, _attributeStreamIsAllocated, _clearAccelerators, _copyToUnsafe, _getAccelerators, _getShortestDistance, _getSimpleTolerance, _hasDirtyFlag, _interpolateTwoVertices, _resizeImpl, _setDirtyFlag, _setEmptyImpl, _updateAllDirtyIntervals, _updateEnvelope, _updateEnvelope, _updateLooseEnvelope, _updateLooseEnvelope, _updateXYImpl, _verifyAllStreams, _verifyAllStreamsImpl, calculateEnvelope2D, copyTo, getAttributeAsDbl, getAttributeAsInt, getAttributeStreamRef, getDescriptionImpl, getIsSimple, getPoint, getPointByVal, getPointCount, getXY, getXY, getXYZ, hashCode, isEmpty, isEmptyImpl, notifyModified, queryCoordinates, queryCoordinates, queryCoordinates, QueryCoordinates, queryEnvelope, queryEnvelope2D, queryEnvelope3D, queryInterval, queryLooseEnvelope2D, queryLooseEnvelope3D, replaceNaNs, setAttribute, setAttribute, setAttributeStreamRef, setEnvelope, setIsSimple, setPoint, setPointByVal, setXY, setXY, setXYZ, throwIfEmpty, toString
-
Methods inherited from class com.esri.core.geometry.MultiVertexGeometry
getCoordinates2D, getCoordinates3D, getPoint
-
Methods inherited from class com.esri.core.geometry.Geometry
_clone, _touch, addAttribute, addID, addM, addZ, assignVertexDescription, copy, dropAllAttributes, dropAttribute, estimateMemorySize, getDescription, getDimensionFromType, getStateFlag, hasAttribute, hasID, hasM, hasZ, isArea, isLinear, isMultiPath, isMultiVertex, isPoint, isSegment, mergeVertexDescription, vertex_count, writeReplace
-
-
-
-
Constructor Detail
-
MultiPointImpl
public MultiPointImpl()
-
MultiPointImpl
public MultiPointImpl(VertexDescription description)
-
-
Method Detail
-
createInstance
public Geometry createInstance()
Description copied from class:Geometry
Creates an instance of an empty geometry of the same type.- Specified by:
createInstance
in classGeometry
- Returns:
- The new instance.
-
add
public void add(Point point)
Adds a Point to this MultiPoint.
-
add
public void add(double x, double y)
Adds a Point to this MultiPoint with given x, y coordinates.
-
add
public void add(double x, double y, double z)
Adds a Point to this MultiPoint with given x, y, z coordinates.
-
add
public void add(MultiVertexGeometryImpl src, int beginIndex, int endIndex)
Appends points from another MultiVertexGeometryImpl at the end of this one.- Parameters:
src
- The source MultiVertexGeometryImpl
-
addPoints
public void addPoints(Point2D[] points)
-
insertPoint
public void insertPoint(int beforePointIndex, Point pt)
-
removePoint
void removePoint(int pointIndex)
-
resize
public void resize(int pointCount)
Resizes the MultiPoint to have the given size.
-
_copyToImpl
void _copyToImpl(MultiVertexGeometryImpl mvg)
Description copied from class:MultiVertexGeometryImpl
\internal CHildren implement this method to copy additional information- Specified by:
_copyToImpl
in classMultiVertexGeometryImpl
-
setEmpty
public void setEmpty()
Description copied from class:Geometry
Returns the geometry to its original initialization state by releasing all data referenced by the geometry.
-
applyTransformation
public void applyTransformation(Transformation2D transform)
Description copied from class:Geometry
Applies 2D affine transformation in XY plane.- Specified by:
applyTransformation
in classGeometry
- Parameters:
transform
- The affine transformation to be applied to this geometry.
-
applyTransformation
void applyTransformation(Transformation3D transform)
Description copied from class:Geometry
Applies 3D affine transformation. Adds Z attribute if it is missing.- Specified by:
applyTransformation
in classGeometry
- Parameters:
transform
- The affine transformation to be applied to this geometry.
-
getDimension
public int getDimension()
Description copied from class:Geometry
Returns the topological dimension of the geometry object based on the geometry's type.Returns 0 for point and multipoint.
Returns 1 for lines and polylines.
Returns 2 for polygons and envelopes
Returns 3 for objects with volume
- Specified by:
getDimension
in classGeometry
- Returns:
- Returns the integer value of the dimension of geometry.
-
estimateMemorySize
public long estimateMemorySize()
Description copied from class:Geometry
Returns an estimate of this object size in bytes.This estimate doesn't include the size of the
VertexDescription
object because instances ofVertexDescription
are shared among geometry objects.- Specified by:
estimateMemorySize
in classGeometry
- Returns:
- Returns an estimate of this object size in bytes.
-
getType
public Geometry.Type getType()
Description copied from class:Geometry
Returns the geometry type.
-
calculateArea2D
public double calculateArea2D()
Description copied from class:Geometry
Calculates the area of the geometry. If the spatial reference is a Geographic Coordinate System (WGS84) then the 2D area calculation is defined in angular units.- Overrides:
calculateArea2D
in classGeometry
- Returns:
- A double value representing the 2D area of the geometry.
-
calculateLength2D
public double calculateLength2D()
Description copied from class:Geometry
Calculates the length of the geometry. If the spatial reference is a Geographic Coordinate System (a system where coordinates are defined using angular units such as longitude and latitude) then the 2D distance calculation is returned in angular units. In cases where length must be calculated on a Geographic Coordinate System consider the using the geodeticLength method on theGeometryEngine
- Overrides:
calculateLength2D
in classGeometry
- Returns:
- A double value representing the 2D length of the geometry.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classMultiVertexGeometryImpl
-
addPoints
public void addPoints(Point[] points)
-
queryCoordinates
public int queryCoordinates(Point2D[] dst, int dstSize, int beginIndex, int endIndex)
- Overrides:
queryCoordinates
in classMultiVertexGeometryImpl
-
_notifyModifiedAllImpl
protected void _notifyModifiedAllImpl()
- Specified by:
_notifyModifiedAllImpl
in classMultiVertexGeometryImpl
-
_verifyStreamsImpl
protected void _verifyStreamsImpl()
Description copied from class:MultiVertexGeometryImpl
\internal Called inside of the VerifyAllStreams to get a child class a chance to do additional verify.- Specified by:
_verifyStreamsImpl
in classMultiVertexGeometryImpl
-
_buildRasterizedGeometryAccelerator
public boolean _buildRasterizedGeometryAccelerator(double toleranceXY, Geometry.GeometryAccelerationDegree accelDegree)
- Specified by:
_buildRasterizedGeometryAccelerator
in classMultiVertexGeometryImpl
-
_buildQuadTreeAccelerator
public boolean _buildQuadTreeAccelerator(Geometry.GeometryAccelerationDegree accelDegree)
- Specified by:
_buildQuadTreeAccelerator
in classMultiVertexGeometryImpl
-
getBoundary
public Geometry getBoundary()
Description copied from class:Geometry
Returns boundary of this geometry. Polygon and Envelope boundary is a Polyline. For Polyline and Line, the boundary is a Multi_point consisting of path end points. For Multi_point and Point null is returned.- Specified by:
getBoundary
in classGeometry
- Returns:
- The boundary geometry.
-
-