deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.model.spatialschema
Class MultiPointImpl

java.lang.Object
  extended by org.deegree.model.spatialschema.GeometryImpl
      extended by org.deegree.model.spatialschema.AggregateImpl
          extended by org.deegree.model.spatialschema.MultiPrimitiveImpl
              extended by org.deegree.model.spatialschema.MultiPointImpl
All Implemented Interfaces:
Serializable, Aggregate, Geometry, MultiPoint, MultiPrimitive

public class MultiPointImpl
extends MultiPrimitiveImpl
implements MultiPoint, Serializable

default implementation of the MultiPoint interface of package deegree.model.spatialschema.

------------------------------------------------------------

Version:
12.6.2001
Author:
Andreas Poth href="mailto:poth@lat-lon.de"

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.deegree.model.spatialschema.AggregateImpl
aggregate
 
Fields inherited from class org.deegree.model.spatialschema.GeometryImpl
boundary, centroid, convexHull, crs, empty, envelope, mute, valid
 
Fields inherited from interface org.deegree.model.spatialschema.Geometry
BUFFER_CAP_BUTT, BUFFER_CAP_ROUND, BUFFER_CAP_SQUARE
 
Constructor Summary
protected MultiPointImpl(CoordinateSystem crs)
          Creates a new MultiPointImpl object.
protected MultiPointImpl(Point[] gmp)
          Creates a new MultiPointImpl object.
protected MultiPointImpl(Point[] gmp, CoordinateSystem crs)
          Creates a new MultiPointImpl object.
 
Method Summary
 void addPoint(Point gmp)
          adds a Point to the aggregation
protected  void calculateParam()
          calculates the centroid and envelope of the aggregation
 Object clone()
           
 Point[] getAllPoints()
          returns all Points as array
 int getCoordinateDimension()
          The operation "coordinateDimension" shall return the dimension of the coordinates that define this Geometry, which must be the same as the coordinate dimension of the coordinate reference system for this Geometry.
 int getDimension()
          The operation "dimension" shall return the inherent dimension of this Geometry, which shall be less than or equal to the coordinate dimension.
 Point getPointAt(int index)
          returns the Point at the submitted index.
 void insertPointAt(Point gmp, int index)
          inserts a Point into the aggregation. all elements with an index equal or larger index will be moved. if index is larger then getSize() - 1 or smaller then 0 or gmp equals null an exception will be thrown.
 Point removePoint(Point gmp)
          removes the submitted Point from the aggregation
 Point removePointAt(int index)
          removes the Point at the submitted index from the aggregation. if index is larger then getSize() - 1 or smaller then 0 an exception will be thrown.
 void setPointAt(Point gmp, int index)
          sets the submitted Point at the submitted index. the element at the position index will be removed. if index is larger then getSize() - 1 or smaller then 0 or gmp equals null an exception will be thrown.
 
Methods inherited from class org.deegree.model.spatialschema.MultiPrimitiveImpl
getAllPrimitives, getPrimitiveAt, merge
 
Methods inherited from class org.deegree.model.spatialschema.AggregateImpl
add, equals, getAll, getIterator, getObjectAt, getSize, insertObjectAt, intersects, isEmpty, isMember, removeAll, removeObject, removeObjectAt, setCoordinateSystem, setObjectAt, toString, translate
 
Methods inherited from class org.deegree.model.spatialschema.GeometryImpl
contains, contains, difference, distance, getBoundary, getBuffer, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getEnvelope, getTolerance, intersection, isValid, isWithinDistance, setEmpty, setTolerance, setValid, union
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.model.spatialschema.MultiPrimitive
getAllPrimitives, getPrimitiveAt
 
Methods inherited from interface org.deegree.model.spatialschema.Aggregate
add, getAll, getIterator, getObjectAt, getSize, insertObjectAt, isMember, merge, removeAll, removeObject, removeObjectAt, setObjectAt
 
Methods inherited from interface org.deegree.model.spatialschema.Geometry
contains, contains, difference, distance, getBoundary, getBuffer, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getEnvelope, getTolerance, intersection, intersects, isEmpty, isWithinDistance, setTolerance, translate, union
 

Constructor Detail

MultiPointImpl

protected MultiPointImpl(CoordinateSystem crs)
Creates a new MultiPointImpl object.

Parameters:
crs -

MultiPointImpl

protected MultiPointImpl(Point[] gmp)
Creates a new MultiPointImpl object.

Parameters:
gmp -

MultiPointImpl

protected MultiPointImpl(Point[] gmp,
                         CoordinateSystem crs)
Creates a new MultiPointImpl object.

Parameters:
gmp -
crs -
Method Detail

addPoint

public void addPoint(Point gmp)
adds a Point to the aggregation

Specified by:
addPoint in interface MultiPoint

insertPointAt

public void insertPointAt(Point gmp,
                          int index)
                   throws GeometryException
inserts a Point into the aggregation. all elements with an index equal or larger index will be moved. if index is larger then getSize() - 1 or smaller then 0 or gmp equals null an exception will be thrown.

Specified by:
insertPointAt in interface MultiPoint
Parameters:
gmp - Point to insert.
index - position where to insert the new Point
Throws:
GeometryException

setPointAt

public void setPointAt(Point gmp,
                       int index)
                throws GeometryException
sets the submitted Point at the submitted index. the element at the position index will be removed. if index is larger then getSize() - 1 or smaller then 0 or gmp equals null an exception will be thrown.

Specified by:
setPointAt in interface MultiPoint
Parameters:
gmp - Point to set.
index - position where to set the new Point
Throws:
GeometryException

removePoint

public Point removePoint(Point gmp)
removes the submitted Point from the aggregation

Specified by:
removePoint in interface MultiPoint
Parameters:
gmp - to remove
Returns:
the removed Point

removePointAt

public Point removePointAt(int index)
                    throws GeometryException
removes the Point at the submitted index from the aggregation. if index is larger then getSize() - 1 or smaller then 0 an exception will be thrown.

Specified by:
removePointAt in interface MultiPoint
Returns:
the removed Point
Throws:
GeometryException

getPointAt

public Point getPointAt(int index)
returns the Point at the submitted index.

Specified by:
getPointAt in interface MultiPoint
Returns:
the Point at the submitted index.

getAllPoints

public Point[] getAllPoints()
returns all Points as array

Specified by:
getAllPoints in interface MultiPoint
Returns:
all Points as array

calculateParam

protected void calculateParam()
calculates the centroid and envelope of the aggregation

Overrides:
calculateParam in class MultiPrimitiveImpl

getDimension

public int getDimension()
Description copied from interface: Geometry
The operation "dimension" shall return the inherent dimension of this Geometry, which shall be less than or equal to the coordinate dimension. The dimension of a collection of geometric objects shall be the largest dimension of any of its pieces. Points are 0-dimensional, curves are 1-dimensional, surfaces are 2-dimensional, and solids are 3-dimensional.

Specified by:
getDimension in interface Geometry
Overrides:
getDimension in class MultiPrimitiveImpl
Returns:
dimension

getCoordinateDimension

public int getCoordinateDimension()
Description copied from interface: Geometry
The operation "coordinateDimension" shall return the dimension of the coordinates that define this Geometry, which must be the same as the coordinate dimension of the coordinate reference system for this Geometry.

Specified by:
getCoordinateDimension in interface Geometry
Overrides:
getCoordinateDimension in class MultiPrimitiveImpl
Returns:
-1

clone

public Object clone()
Overrides:
clone in class GeometryImpl

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org