Class MultiPoint
java.lang.Object
com.esri.core.geometry.Geometry
com.esri.core.geometry.MultiVertexGeometry
com.esri.core.geometry.MultiPoint
- All Implemented Interfaces:
Serializable
A Multipoint is a collection of points. A multipoint is a one-dimensional
geometry object. Multipoints can be used to store a collection of point-based
information where the order and individual identity of each point is not an
essential characteristic of the point set.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Geometry
Geometry.GeometryAccelerationDegree, Geometry.GeometryType, Geometry.Type -
Field Summary
FieldsFields inherited from class Geometry
m_description, m_touchFlag -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object_getImpl()voidadd(double x, double y) Adds a point with the specified X, Y coordinates to this multipoint.(package private) voidadd(double x, double y, double z) Adds a 3DPoint with the specified X, Y, Z coordinates to this multipoint.voidadd(MultiVertexGeometry src, int srcFrom, int srcTo) Appends points from another multipoint at the end of this multipoint.voidAdds a point multipoint.voidAdds a point with the specified X, Y coordinates to this multipoint.voidaddAttribute(int semantics) Adds a new attribute to the Geometry.(package private) void(package private) voidvoidapplyTransformation(Transformation2D transform) Applies 2D affine transformation in XY plane.(package private) voidapplyTransformation(Transformation3D transform) Applies 3D affine transformation.voidAssigns the new VertexDescription by adding or dropping attributes.voidCopies this geometry to another geometry of the same type.Creates an instance of an empty geometry of the same type.voidDrops all attributes from the Geometry with exception of POSITON.voiddropAttribute(int semantics) Drops an attribute from the Geometry.booleanReturns TRUE when this geometry has exactly same type, properties, and coordinates as the other geometry.longReturns an estimate of this object size in bytes.doublegetAttributeAsDbl(int semantics, int index, int ordinate) Returns value of the given vertex attribute as double.intgetAttributeAsInt(int semantics, int index, int ordinate) Returns value of the given vertex attribute as int.Returns boundary of this geometry.Returns the VertexDescription of this geometry.intReturns the topological dimension of the geometry object based on the geometry's type.getPoint(int index) Returns given vertex of the Geometry.voidgetPointByVal(int index, Point outPoint) Returns given vertex of the Geometry.intReturns the total vertex count in this Geometry.intThe stateFlag value changes with changes applied to this geometry.getType()Returns the geometry type.getXY(int index) Returns XY coordinates of the given vertex of the Geometry.void(package private) Point3DgetXYZ(int index) Returns XYZ coordinates of the given vertex of the Geometry.inthashCode()Returns a hash code value for this multipoint.voidinsertPoint(int beforePointIndex, Point pt) Inserts a point to this multipoint.booleanisEmpty()IsEmpty returns TRUE when the Geometry object does not contain geometric information beyond its original initialization state.voidMerges the new VertexDescription by adding missing attributes from the src.voidqueryCoordinates(Point[] dst) voidqueryCoordinates(Point2D[] dst) Queries XY coordinates as an array.(package private) intqueryCoordinates(Point2D[] dst, int dstSize, int beginIndex, int endIndex) (package private) voidqueryCoordinates(Point3D[] dst) Queries XYZ coordinates as an array.voidqueryEnvelope(Envelope env) Returns the axis aligned bounding box of the geometry.voidReturns tight bbox of the Geometry in X, Y plane.(package private) voidReturns tight bbox of the Geometry in 3D.queryInterval(int semantics, int ordinate) Returns the min and max attribute values at the ordinate of the Geometry.voidremovePoint(int pointIndex) Removes a point from this multipoint.voidreplaceNaNs(int semantics, double value) Replaces NaNs in the attribute with the given value.voidresize(int pointCount) Resizes the multipoint to have the given size.voidsetAttribute(int semantics, int index, int ordinate, double value) Sets the value of given attribute at given posisiotnsis.voidsetAttribute(int semantics, int index, int ordinate, int value) Same as above, but works with ints.voidsetEmpty()Returns the geometry to its original initialization state by releasing all data referenced by the geometry.voidSets the vertex at given index of the Geometry.voidsetPointByVal(int index, Point pointSrc) Sets the vertex at given index of the Geometry.voidSets XY coordinates of the given vertex of the Geometry.(package private) voidSets XYZ coordinates of the given vertex of the Geometry.Methods inherited from class MultiVertexGeometry
_assignVertexDescriptionImpl, getCoordinates2D, getCoordinates3D, getPointMethods inherited from class Geometry
_clone, _touch, addID, addM, addZ, calculateArea2D, calculateLength2D, copy, estimateMemorySize, getDimensionFromType, hasAttribute, hasID, hasM, hasZ, isArea, isLinear, isMultiPath, isMultiVertex, isPoint, isSegment, queryLooseEnvelope2D, queryLooseEnvelope3D, toString, vertex_count, writeReplace
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
m_impl
-
-
Constructor Details
-
MultiPoint
public MultiPoint()Creates a new empty multipoint. -
MultiPoint
-
-
Method Details
-
getAttributeAsDbl
public double getAttributeAsDbl(int semantics, int index, int ordinate) Description copied from class:MultiVertexGeometryReturns value of the given vertex attribute as double.- Specified by:
getAttributeAsDblin classMultiVertexGeometry- 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
public int getAttributeAsInt(int semantics, int index, int ordinate) Description copied from class:MultiVertexGeometryReturns value of the given vertex attribute as int.- Specified by:
getAttributeAsIntin classMultiVertexGeometry- 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.
-
getPoint
Description copied from class:MultiVertexGeometryReturns given vertex of the Geometry.- Specified by:
getPointin classMultiVertexGeometry
-
getPointCount
public int getPointCount()Description copied from class:MultiVertexGeometryReturns the total vertex count in this Geometry.- Specified by:
getPointCountin classMultiVertexGeometry
-
getXY
Description copied from class:MultiVertexGeometryReturns XY coordinates of the given vertex of the Geometry.- Specified by:
getXYin classMultiVertexGeometry
-
getXY
- Specified by:
getXYin classMultiVertexGeometry
-
getXYZ
Description copied from class:MultiVertexGeometryReturns XYZ coordinates of the given vertex of the Geometry. If the Geometry has no Z's, the default value for Z is returned (0).- Specified by:
getXYZin classMultiVertexGeometry
-
queryCoordinates
Description copied from class:MultiVertexGeometryQueries XY coordinates as an array. The array must be larg enough (See GetPointCount()).- Specified by:
queryCoordinatesin classMultiVertexGeometry
-
queryCoordinates
- Specified by:
queryCoordinatesin classMultiVertexGeometry
-
_getImpl
-
add
Adds a point multipoint.- Parameters:
point- The Point to be added to this multipoint.
-
add
public void add(double x, double y) Adds a point with the specified X, Y coordinates to this multipoint.- Parameters:
x- The new Point's X coordinate.y- The new Point's Y coordinate.
-
add
Adds a point with the specified X, Y coordinates to this multipoint.- Parameters:
pt- the point to add
-
add
void add(double x, double y, double z) Adds a 3DPoint with the specified X, Y, Z coordinates to this multipoint.- Parameters:
x- The new Point's X coordinate.y- The new Point's Y coordinate.z- The new Point's Z coordinate.
-
add
Appends points from another multipoint at the end of this multipoint.- Parameters:
src- The mulitpoint to append to this multipoint.srcFrom- The start index in the source multipoint from which to start appending points.srcTo- The end index in the source multipoint right after the last point to be appended. Use -1 to indicate the rest of the source multipoint.
-
addPoints
-
addPoints
-
insertPoint
Inserts a point to this multipoint.- Parameters:
beforePointIndex- The index right before the new point to insert.pt- The point to insert.
-
removePoint
public void removePoint(int pointIndex) Removes a point from this multipoint.- Parameters:
pointIndex- The index of the point to be removed.
-
resize
public void resize(int pointCount) Resizes the multipoint to have the given size.- Parameters:
pointCount- - The number of points in this multipoint.
-
queryCoordinates
Description copied from class:MultiVertexGeometryQueries XYZ coordinates as an array. The array must be larg enough (See GetPointCount()).- Specified by:
queryCoordinatesin classMultiVertexGeometry
-
setAttribute
public void setAttribute(int semantics, int index, int ordinate, double value) Description copied from class:MultiVertexGeometrySets the value of given attribute at given posisiotnsis.- Specified by:
setAttributein classMultiVertexGeometry- 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
public void setAttribute(int semantics, int index, int ordinate, int value) Description copied from class:MultiVertexGeometrySame 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)- Specified by:
setAttributein classMultiVertexGeometry
-
setPoint
Description copied from class:MultiVertexGeometrySets the vertex at given index of the Geometry.- Specified by:
setPointin classMultiVertexGeometry- 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).
-
setXY
Description copied from class:MultiVertexGeometrySets XY coordinates of the given vertex of the Geometry. All other attributes are unchanged.- Specified by:
setXYin classMultiVertexGeometry
-
setXYZ
Description copied from class:MultiVertexGeometrySets 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.- Specified by:
setXYZin classMultiVertexGeometry
-
applyTransformation
Description copied from class:GeometryApplies 2D affine transformation in XY plane.- Specified by:
applyTransformationin classGeometry- Parameters:
transform- The affine transformation to be applied to this geometry.
-
applyTransformation
Description copied from class:GeometryApplies 3D affine transformation. Adds Z attribute if it is missing.- Specified by:
applyTransformationin classGeometry- Parameters:
transform- The affine transformation to be applied to this geometry.
-
copyTo
-
createInstance
Description copied from class:GeometryCreates an instance of an empty geometry of the same type.- Specified by:
createInstancein classGeometry- Returns:
- The new instance.
-
getDimension
public int getDimension()Description copied from class:GeometryReturns 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:
getDimensionin classGeometry- Returns:
- Returns the integer value of the dimension of geometry.
-
estimateMemorySize
public long estimateMemorySize()Description copied from class:GeometryReturns an estimate of this object size in bytes.This estimate doesn't include the size of the
VertexDescriptionobject because instances ofVertexDescriptionare shared among geometry objects.- Specified by:
estimateMemorySizein classGeometry- Returns:
- Returns an estimate of this object size in bytes.
-
getType
Description copied from class:GeometryReturns the geometry type. -
getDescription
Description copied from class:GeometryReturns the VertexDescription of this geometry.- Overrides:
getDescriptionin classGeometry- Returns:
- VertexDescription
-
addAttribute
public void addAttribute(int semantics) Description copied from class:GeometryAdds a new attribute to the Geometry.- Overrides:
addAttributein classGeometry- Parameters:
semantics- The VertexDescription.Semantics to add.
-
assignVertexDescription
Description copied from class:GeometryAssigns the new VertexDescription by adding or dropping attributes. The Geometry will have the src description as a result.- Overrides:
assignVertexDescriptionin classGeometry- Parameters:
src- VertexDescription to assign.
-
dropAllAttributes
public void dropAllAttributes()Description copied from class:GeometryDrops all attributes from the Geometry with exception of POSITON.- Overrides:
dropAllAttributesin classGeometry
-
dropAttribute
public void dropAttribute(int semantics) Description copied from class:GeometryDrops an attribute from the Geometry. Dropping the attribute is equivalent to setting the attribute to the default value for each vertex, However, it is faster and the result Geometry has smaller memory footprint and smaller size when persisted.- Overrides:
dropAttributein classGeometry- Parameters:
semantics- The VertexDescription.Semantics to drop.
-
mergeVertexDescription
Description copied from class:GeometryMerges the new VertexDescription by adding missing attributes from the src. The Geometry will have a union of the current and the src descriptions.- Overrides:
mergeVertexDescriptionin classGeometry- Parameters:
src- VertexDescription to merge.
-
isEmpty
-
queryEnvelope
Description copied from class:GeometryReturns the axis aligned bounding box of the geometry.- Specified by:
queryEnvelopein classGeometry- Parameters:
env- The envelope to return the result in.
-
queryEnvelope2D
Description copied from class:GeometryReturns tight bbox of the Geometry in X, Y plane.- Specified by:
queryEnvelope2Din classGeometry- Parameters:
env- The envelope to return the result in.
-
queryEnvelope3D
Description copied from class:GeometryReturns tight bbox of the Geometry in 3D.- Specified by:
queryEnvelope3Din classGeometry- Parameters:
env- The envelope to return the result in.
-
queryInterval
Description copied from class:GeometryReturns the min and max attribute values at the ordinate of the Geometry.- Specified by:
queryIntervalin classGeometry- Parameters:
semantics- The semantics of the interval.ordinate- The ordinate of the interval.- Returns:
- The interval.
-
setEmpty
-
equals
-
hashCode
-
queryCoordinates
-
getPointByVal
Description copied from class:MultiVertexGeometryReturns given vertex of the Geometry. The outPoint will have same VertexDescription as this Geometry.- Specified by:
getPointByValin classMultiVertexGeometry
-
setPointByVal
Description copied from class:MultiVertexGeometrySets the vertex at given index of the Geometry.- Specified by:
setPointByValin classMultiVertexGeometry- 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).
-
getStateFlag
public int getStateFlag()Description copied from class:GeometryThe stateFlag value changes with changes applied to this geometry. This allows the user to keep track of the geometry's state.- Overrides:
getStateFlagin classGeometry- Returns:
- The state of the geometry.
-
getBoundary
Description copied from class:GeometryReturns 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:
getBoundaryin classGeometry- Returns:
- The boundary geometry.
-
replaceNaNs
public void replaceNaNs(int semantics, double value) Description copied from class:GeometryReplaces NaNs in the attribute with the given value. If the geometry is not empty, it adds the attribute if geometry does not have it yet, and replaces the values. If the geometry is empty, it adds the attribute and does not set any values.- Specified by:
replaceNaNsin classGeometry- Parameters:
semantics- The semantics for which to replace the NaNs.value- The value to replace NaNs with.
-