com.esri.core.geometry
Class MultiPoint

java.lang.Object
  extended by com.esri.core.geometry.Geometry
      extended by com.esri.core.geometry.MultiPoint
All Implemented Interfaces:
Serializable

public final class MultiPoint
extends Geometry
implements 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:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.esri.core.geometry.Geometry
Geometry.Type
 
Constructor Summary
MultiPoint()
          Creates a new empty multipoint.
 
Method Summary
 void add(double x, double y)
          Adds a point with the specified X, Y coordinates to this multipoint.
 void add(com.esri.core.geometry.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 addAttribute(int semantics)
          Adds a new attribute to the Geometry.
 void applyTransformation(Transformation2D transform)
          Applies 2D affine transformation in XY plane.
 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.
 com.esri.core.geometry.VertexDescription getDescription()
          Returns the VertexDescription of this geomtry.
 int getDimension()
          Returns the topological dimension of the geometry object based on the geometry's type.
 Point getPoint(int index)
           
 void getPoint(int arg0, Point arg1)
           
 int getPointCount()
           
 int getStateFlag()
          Returns the state of the geometry.
 Geometry.Type getType()
          Returns the geometry type.
 int hashCode()
          Returns a hash code value for this multipoint.
 void insertPoint(int beforePointIndex, Point pt)
          Inserts a point to this multipoint.
 boolean isEmpty()
          Indicates if the geometry object contains geometric information.
 void mergeVertexDescription(com.esri.core.geometry.VertexDescription src)
          Merges the new VertexDescription by adding missing attributes from the src.
 void queryEnvelope(Envelope env)
          Gets the axis aligned bounding box of the geometry.
 void queryEnvelope2D(com.esri.core.geometry.Envelope2D env)
          Returns tight bbox of the Geometry in X, Y plane.
 void removePoint(int pointIndex)
          Removes a point from this multipoint.
 void resize(int pointCount)
          Resizes the multipoint to have the given size.
 void setEmpty()
          Sets the geometry to its original initialization state by releasing all data referenced by the geometry.
 void setPoint(int index, Point pointSrc)
           
 
Methods inherited from class com.esri.core.geometry.Geometry
calculateArea2D, calculateLength2D, copy, getDimensionFromType, isArea, isLinear, isMultiPath, isMultiVertex, isPoint, isSegment
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiPoint

public MultiPoint()
Creates a new empty multipoint.

Method Detail

getPoint

public Point getPoint(int index)

getPointCount

public int getPointCount()

add

public void add(Point point)
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

public void add(com.esri.core.geometry.MultiVertexGeometry src,
                int srcFrom,
                int srcTo)
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

public void insertPoint(int beforePointIndex,
                        Point pt)
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.

setPoint

public void setPoint(int index,
                     Point pointSrc)

applyTransformation

public void applyTransformation(Transformation2D transform)
Description copied from class: Geometry
Applies 2D affine transformation in XY plane.

Specified by:
applyTransformation in class Geometry
Parameters:
transform - The affine transformation to be applied to this geometry.

copyTo

public void copyTo(Geometry dst)
Description copied from class: Geometry
Copies this geometry to another geometry of the same type. The result geometry is an exact copy.

Specified by:
copyTo in class Geometry

createInstance

public Geometry createInstance()
Description copied from class: Geometry
Creates an instance of an empty geometry of the same type.


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 class Geometry
Returns:
Returns the integer value of the dimension of geometry.

getType

public Geometry.Type getType()
Description copied from class: Geometry
Returns the geometry type.

Specified by:
getType in class Geometry
Returns:
Returns the geometry type.

getDescription

public com.esri.core.geometry.VertexDescription getDescription()
Description copied from class: Geometry
Returns the VertexDescription of this geomtry.


addAttribute

public void addAttribute(int semantics)
Description copied from class: Geometry
Adds a new attribute to the Geometry.


dropAllAttributes

public void dropAllAttributes()
Description copied from class: Geometry
Drops all attributes from the Geometry with exception of POSITON.


dropAttribute

public void dropAttribute(int semantics)
Description copied from class: Geometry
Drops 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.


mergeVertexDescription

public void mergeVertexDescription(com.esri.core.geometry.VertexDescription src)
Description copied from class: Geometry
Merges the new VertexDescription by adding missing attributes from the src. The Geometry will have a union of the current and the src descriptions.


isEmpty

public boolean isEmpty()
Description copied from class: Geometry
Indicates if the geometry object contains geometric information. IsEmpty returns true when the geometry object does not contain geometric information beyond its original initialization state.

Specified by:
isEmpty in class Geometry
Returns:
boolean Returns true if this geometry is empty.

queryEnvelope

public void queryEnvelope(Envelope env)
Description copied from class: Geometry
Gets the axis aligned bounding box of the geometry.

Specified by:
queryEnvelope in class Geometry
Parameters:
env - The envelope to return the result in.

queryEnvelope2D

public void queryEnvelope2D(com.esri.core.geometry.Envelope2D env)
Description copied from class: Geometry
Returns tight bbox of the Geometry in X, Y plane.


setEmpty

public void setEmpty()
Description copied from class: Geometry
Sets the geometry to its original initialization state by releasing all data referenced by the geometry.

Specified by:
setEmpty in class Geometry

equals

public boolean equals(Object other)
Returns TRUE when this geometry has exactly same type, properties, and coordinates as the other geometry.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns a hash code value for this multipoint.

Overrides:
hashCode in class Object

getStateFlag

public int getStateFlag()
Description copied from class: Geometry
Returns the state of the geometry. The stateFlag value changes with changes applied to this geometry. This allows the user to keep track of the geometry's state.

Overrides:
getStateFlag in class Geometry
Returns:
The state of the geometry.

getPoint

public void getPoint(int arg0,
                     Point arg1)


Copyright © 2012. All Rights Reserved.