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 -
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.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.voidapplyTransformation(Transformation2D transform) Applies 2D affine transformation in XY plane.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) intgetAttributeAsInt(int semantics, int index, int ordinate) 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.voidinthashCode()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.voidqueryEnvelope(Envelope env) Returns the axis aligned bounding box of the geometry.voidReturns tight bbox of the Geometry in X, Y plane.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) voidsetAttribute(int semantics, int index, int ordinate, int value) 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.Methods inherited from class MultiVertexGeometry
_assignVertexDescriptionImpl, getCoordinates2D, getPointMethods inherited from class Geometry
addID, addM, calculateArea2D, calculateLength2D, copy, estimateMemorySize, getDimensionFromType, hasAttribute, hasID, hasM, hasZ, isArea, isLinear, isMultiPath, isMultiVertex, isPoint, isSegment, queryLooseEnvelope2D, toString, vertex_count
-
Constructor Details
-
MultiPoint
public MultiPoint()Creates a new empty multipoint. -
MultiPoint
-
-
Method Details
-
getAttributeAsDbl
public double getAttributeAsDbl(int semantics, int index, int ordinate) -
getAttributeAsInt
public int getAttributeAsInt(int semantics, int index, int ordinate) -
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
-
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
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.
-
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.
-
setAttribute
public void setAttribute(int semantics, int index, int ordinate, double value) -
setAttribute
public void setAttribute(int semantics, int index, int ordinate, int value) -
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
-
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.
-
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.
-
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
-
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.
-