deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.geometry.points
Interface Points

All Superinterfaces:
Cloneable, com.vividsolutions.jts.geom.CoordinateSequence, Iterable<Point>
All Known Implementing Classes:
JTSPoints, PackedPoints, PointsArray, PointsList, PointsPoints, PointsSubsequence

public interface Points
extends Iterable<Point>, com.vividsolutions.jts.geom.CoordinateSequence

Encapsulates a sequence of Points that each may be uniquely identifiable or not.

The motivation for this interface is to allow more compact and efficient representations than using lists or arrays of Point objects. This is essential, as geometries are usually build from many points, e.g. a detailed LineString may consist of tens or hundreds thousands of points.

Note that this interface extends JTS CoordinateSequence interface, so it's possible to use it for the efficient construction of JTS geometries.

Version:
$Revision: $, $Date: $
Author:
Markus Schneider, last edited by: $Author: schneider $

Field Summary
 
Fields inherited from interface com.vividsolutions.jts.geom.CoordinateSequence
M, X, Y, Z
 
Method Summary
 Point get(int i)
          Returns the Point at the specified position.
 double[] getAsArray()
          Returns all coordinates of the contained Points as an array.
 int getDimension()
          Returns the coordinate dimension, i.e. the dimension of the space that the points are embedded in.
 Point getEndPoint()
          Returns the last point of the sequence.
 Point getStartPoint()
          Returns the first point of the sequence.
 int size()
          Returns the number of represented Points.
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface com.vividsolutions.jts.geom.CoordinateSequence
clone, expandEnvelope, getCoordinate, getCoordinate, getCoordinateCopy, getOrdinate, getX, getY, setOrdinate, toCoordinateArray
 

Method Detail

getDimension

int getDimension()
Returns the coordinate dimension, i.e. the dimension of the space that the points are embedded in.

Specified by:
getDimension in interface com.vividsolutions.jts.geom.CoordinateSequence
Returns:
the coordinate dimension

size

int size()
Returns the number of represented Points.

Specified by:
size in interface com.vividsolutions.jts.geom.CoordinateSequence
Returns:
the number of points

get

Point get(int i)
Returns the Point at the specified position.

NOTE: It is generally more expensive to use this method than to access a Point by iterating over this object, because a new Point object may have to be created (depending on the implementation).

Parameters:
i -
Returns:
the point at the specified position

getStartPoint

Point getStartPoint()
Returns the first point of the sequence.

Returns:
the first point

getEndPoint

Point getEndPoint()
Returns the last point of the sequence.

Returns:
the last point

getAsArray

double[] getAsArray()
Returns all coordinates of the contained Points as an array.

NOTE: This method should be avoided, as it may involve expensive operations.

Returns:
coordinates as a one-dimensional array

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

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

]]>