public class MultiPoint extends MultiVertexGeometry implements Serializable
Geometry.GeometryAccelerationDegree, Geometry.GeometryType, Geometry.Type
Constructor and Description |
---|
MultiPoint()
Creates a new empty multipoint.
|
MultiPoint(VertexDescription description) |
Modifier and Type | Method and Description |
---|---|
protected Object |
_getImpl() |
void |
add(double x,
double y)
Adds a point with the specified X, Y coordinates to this multipoint.
|
void |
add(MultiVertexGeometry src,
int srcFrom,
int srcTo)
Appends points from another multipoint at the end of this multipoint.
|
void |
add(Point point)
Adds a point multipoint.
|
void |
add(Point2D pt)
Adds a point with the specified X, Y coordinates to this multipoint.
|
void |
addAttribute(int semantics)
Adds a new attribute to the Geometry.
|
void |
applyTransformation(Transformation2D transform)
Applies 2D affine transformation in XY plane.
|
void |
assignVertexDescription(VertexDescription src)
Assigns the new VertexDescription by adding or dropping attributes.
|
void |
copyTo(Geometry dst)
Copies this geometry to another geometry of the same type.
|
Geometry |
createInstance()
Creates an instance of an empty geometry of the same type.
|
void |
dropAllAttributes()
Drops all attributes from the Geometry with exception of POSITON.
|
void |
dropAttribute(int semantics)
Drops an attribute from the Geometry.
|
boolean |
equals(Object other)
Returns TRUE when this geometry has exactly same type, properties, and
coordinates as the other geometry.
|
long |
estimateMemorySize()
Returns an estimate of this object size in bytes.
|
double |
getAttributeAsDbl(int semantics,
int index,
int ordinate)
Returns value of the given vertex attribute as double.
|
int |
getAttributeAsInt(int semantics,
int index,
int ordinate)
Returns value of the given vertex attribute as int.
|
Geometry |
getBoundary()
Returns boundary of this geometry.
|
VertexDescription |
getDescription()
Returns the VertexDescription of this geometry.
|
int |
getDimension()
Returns the topological dimension of the geometry object based on the
geometry's type.
|
Point |
getPoint(int index)
Returns given vertex of the Geometry.
|
void |
getPointByVal(int index,
Point outPoint)
Returns given vertex of the Geometry.
|
int |
getPointCount()
Returns the total vertex count in this Geometry.
|
int |
getStateFlag()
The stateFlag value changes with changes applied to this geometry.
|
Geometry.Type |
getType()
Returns the geometry type.
|
Point2D |
getXY(int index)
Returns XY coordinates of the given vertex of the Geometry.
|
void |
getXY(int index,
Point2D pt) |
int |
hashCode()
Returns a hash code value for this multipoint.
|
void |
insertPoint(int beforePointIndex,
Point pt)
Inserts a point to this multipoint.
|
boolean |
isEmpty()
IsEmpty returns TRUE when the Geometry object does not contain geometric
information beyond its original initialization state.
|
void |
mergeVertexDescription(VertexDescription src)
Merges the new VertexDescription by adding missing attributes from the
src.
|
void |
queryCoordinates(Point[] dst) |
void |
queryCoordinates(Point2D[] dst)
Queries XY coordinates as an array.
|
void |
queryEnvelope(Envelope env)
Returns the axis aligned bounding box of the geometry.
|
void |
queryEnvelope2D(Envelope2D env)
Returns tight bbox of the Geometry in X, Y plane.
|
Envelope1D |
queryInterval(int semantics,
int ordinate)
Returns the min and max attribute values at the ordinate of the Geometry.
|
void |
removePoint(int pointIndex)
Removes a point from this multipoint.
|
void |
replaceNaNs(int semantics,
double value)
Replaces NaNs in the attribute with the given value.
|
void |
resize(int pointCount)
Resizes the multipoint to have the given size.
|
void |
setAttribute(int semantics,
int index,
int ordinate,
double value)
Sets the value of given attribute at given posisiotnsis.
|
void |
setAttribute(int semantics,
int index,
int ordinate,
int value)
Same as above, but works with ints.
|
void |
setEmpty()
Returns the geometry to its original initialization state by releasing
all data referenced by the geometry.
|
void |
setPoint(int index,
Point pointSrc)
Sets the vertex at given index of the Geometry.
|
void |
setPointByVal(int index,
Point pointSrc)
Sets the vertex at given index of the Geometry.
|
void |
setXY(int index,
Point2D pt)
Sets XY coordinates of the given vertex of the Geometry.
|
_assignVertexDescriptionImpl, getCoordinates2D, getPoint
addID, addM, calculateArea2D, calculateLength2D, copy, estimateMemorySize, getDimensionFromType, hasAttribute, hasID, hasM, hasZ, isArea, isLinear, isMultiPath, isMultiVertex, isPoint, isSegment, queryLooseEnvelope2D, toString, vertex_count
public MultiPoint()
public MultiPoint(VertexDescription description)
public double getAttributeAsDbl(int semantics, int index, int ordinate)
MultiVertexGeometry
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.public int getAttributeAsInt(int semantics, int index, int ordinate)
MultiVertexGeometry
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.public Point getPoint(int index)
MultiVertexGeometry
getPoint
in class MultiVertexGeometry
public int getPointCount()
MultiVertexGeometry
getPointCount
in class MultiVertexGeometry
public Point2D getXY(int index)
MultiVertexGeometry
getXY
in class MultiVertexGeometry
public void getXY(int index, Point2D pt)
getXY
in class MultiVertexGeometry
public void queryCoordinates(Point2D[] dst)
MultiVertexGeometry
queryCoordinates
in class MultiVertexGeometry
public void queryCoordinates(Point[] dst)
queryCoordinates
in class MultiVertexGeometry
public void add(Point point)
point
- The Point to be added to this multipoint.public void add(double x, double y)
x
- The new Point's X coordinate.y
- The new Point's Y coordinate.public void add(Point2D pt)
pt
- the point to addpublic void add(MultiVertexGeometry src, int srcFrom, int srcTo)
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.public void insertPoint(int beforePointIndex, Point pt)
beforePointIndex
- The index right before the new point to insert.pt
- The point to insert.public void removePoint(int pointIndex)
pointIndex
- The index of the point to be removed.public void resize(int pointCount)
pointCount
- - The number of points in this multipoint.public void setAttribute(int semantics, int index, int ordinate, double value)
MultiVertexGeometry
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.public void setAttribute(int semantics, int index, int ordinate, int value)
MultiVertexGeometry
public void setPoint(int index, Point pointSrc)
MultiVertexGeometry
setPoint
in class MultiVertexGeometry
index
- The index of the vertex being changed.pointSrc
- The Point instance to set given vertex attributes from. The
pointSrc can not be empty. public void setXY(int index, Point2D pt)
MultiVertexGeometry
setXY
in class MultiVertexGeometry
public void applyTransformation(Transformation2D transform)
Geometry
applyTransformation
in class Geometry
transform
- The affine transformation to be applied to this geometry.public void copyTo(Geometry dst)
Geometry
public Geometry createInstance()
Geometry
createInstance
in class Geometry
public int getDimension()
Geometry
Returns 0 for point and multipoint.
Returns 1 for lines and polylines.
Returns 2 for polygons and envelopes
Returns 3 for objects with volume
getDimension
in class Geometry
public long estimateMemorySize()
Geometry
This estimate doesn't include the size of the VertexDescription
object
because instances of VertexDescription
are shared among
geometry objects.
estimateMemorySize
in class Geometry
public Geometry.Type getType()
Geometry
public VertexDescription getDescription()
Geometry
getDescription
in class Geometry
public void addAttribute(int semantics)
Geometry
addAttribute
in class Geometry
semantics
- The VertexDescription.Semantics to add.public void assignVertexDescription(VertexDescription src)
Geometry
assignVertexDescription
in class Geometry
src
- VertexDescription to assign.public void dropAllAttributes()
Geometry
dropAllAttributes
in class Geometry
public void dropAttribute(int semantics)
Geometry
dropAttribute
in class Geometry
semantics
- The VertexDescription.Semantics to drop.public void mergeVertexDescription(VertexDescription src)
Geometry
mergeVertexDescription
in class Geometry
src
- VertexDescription to merge.public boolean isEmpty()
Geometry
public void queryEnvelope(Envelope env)
Geometry
queryEnvelope
in class Geometry
env
- The envelope to return the result in.public void queryEnvelope2D(Envelope2D env)
Geometry
queryEnvelope2D
in class Geometry
env
- The envelope to return the result in.public Envelope1D queryInterval(int semantics, int ordinate)
Geometry
queryInterval
in class Geometry
semantics
- The semantics of the interval.ordinate
- The ordinate of the interval.public void setEmpty()
Geometry
public boolean equals(Object other)
public int hashCode()
public void getPointByVal(int index, Point outPoint)
MultiVertexGeometry
getPointByVal
in class MultiVertexGeometry
public void setPointByVal(int index, Point pointSrc)
MultiVertexGeometry
setPointByVal
in class MultiVertexGeometry
index
- The index of the vertex being changed.pointSrc
- The Point instance to set given vertex attributes from. The
pointSrc can not be empty. public int getStateFlag()
Geometry
getStateFlag
in class Geometry
public Geometry getBoundary()
Geometry
getBoundary
in class Geometry
public void replaceNaNs(int semantics, double value)
Geometry
replaceNaNs
in class Geometry
semantics
- The semantics for which to replace the NaNs.value
- The value to replace NaNs with.Copyright © 2018. All rights reserved.