|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<org.opengis.geometry.coordinate.Position>
org.geotools.geometry.iso.coordinate.PointArrayImpl
public class PointArrayImpl
Many of the geometric constructs in this International Standard require the use of reference points which are organized into sequences or grids (sequences of equal length sequences). PointArray::column[1..n] : Position PointGrid::row[1..n] : PointArray The class name follows the ISO19107. It is a confusing name, since it contains an array of positions and not of points. The positions themselves contain either a direct position or a point.
Nested Class Summary | |
---|---|
class |
PointArrayImpl.LineSegmentsSequence
Class to support on-the-fly generation of LineSegments |
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
PointArrayImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Please add content; according to ISO 19117 an empty PointArray cannot exist. |
|
PointArrayImpl(org.opengis.geometry.DirectPosition p1,
org.opengis.geometry.DirectPosition p2)
|
|
PointArrayImpl(java.util.List<org.opengis.geometry.coordinate.Position> positions)
Construct a new PointArray. |
|
PointArrayImpl(org.opengis.geometry.coordinate.PointArray aPointArray)
Creates a new PointArray based on another PointArray. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
double[] |
getCoordinate(int index)
Returns the coordiantes of the Position at index |
org.opengis.referencing.crs.CoordinateReferenceSystem |
getCoordinateReferenceSystem()
|
int |
getDimension()
|
org.opengis.geometry.DirectPosition |
getDirectPosition(int index,
org.opengis.geometry.DirectPosition dest)
|
double |
getDistanceSum()
Creates the absolute length over all points in point array |
EnvelopeImpl |
getEnvelope()
Creates an envelope for all points in point array |
org.opengis.geometry.coordinate.Position |
getFirst()
Returns the first element |
org.opengis.geometry.coordinate.Position |
getLast()
Returns the last element |
java.util.List<? extends org.opengis.geometry.coordinate.LineSegment> |
getLineSegments(CurveImpl parentCurve)
Creates a LineSegment connecting the Positins p0 and p1, whereas p0 is the position at arg0 and p1 is the position at (arg0+1). |
java.util.List<org.opengis.geometry.coordinate.Position> |
getPointArray()
Returns the Point array as Set of Position |
org.opengis.geometry.coordinate.Position |
getPosition(int index)
Gets the position at index |
org.opengis.geometry.DirectPosition |
getPosition(int col,
org.opengis.geometry.DirectPosition dest)
|
int |
hashCode()
|
int |
length()
|
void |
merge(double minSpacing)
|
java.util.List |
positions()
|
boolean |
removePosition(org.opengis.geometry.coordinate.Position p)
Removes the first occurrence of this position from the PointArray |
void |
set(int index,
double[] coord)
Sets the Coordinates of the Position at index in the PointArray |
void |
setDirectPosition(int index,
org.opengis.geometry.DirectPosition position)
|
void |
setPosition(int index,
org.opengis.geometry.DirectPosition position)
|
void |
split(double maxSpacing)
This method splits the sequence of positions according to a maximum distance. |
java.lang.String |
toString()
|
Methods inherited from class java.util.ArrayList |
---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
add, add, addAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
Constructor Detail |
---|
public PointArrayImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
crs
- public PointArrayImpl(org.opengis.geometry.DirectPosition p1, org.opengis.geometry.DirectPosition p2)
public PointArrayImpl(org.opengis.geometry.coordinate.PointArray aPointArray)
aPointArray
- public PointArrayImpl(java.util.List<org.opengis.geometry.coordinate.Position> positions)
positions
- Method Detail |
---|
public java.util.List<org.opengis.geometry.coordinate.Position> getPointArray()
public double[] getCoordinate(int index)
arg0
-
public org.opengis.geometry.coordinate.Position getPosition(int index)
arg0
-
public org.opengis.geometry.coordinate.Position getFirst()
public org.opengis.geometry.coordinate.Position getLast()
public int length()
length
in interface org.opengis.geometry.coordinate.PointArray
public double getDistanceSum()
public EnvelopeImpl getEnvelope()
public boolean removePosition(org.opengis.geometry.coordinate.Position p)
p
-
public java.lang.String toString()
toString
in class java.util.AbstractCollection<org.opengis.geometry.coordinate.Position>
public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
getCoordinateReferenceSystem
in interface org.opengis.geometry.coordinate.PointArray
public org.opengis.geometry.DirectPosition getPosition(int col, org.opengis.geometry.DirectPosition dest) throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException
public void setPosition(int index, org.opengis.geometry.DirectPosition position) throws java.lang.IndexOutOfBoundsException, java.lang.UnsupportedOperationException
java.lang.IndexOutOfBoundsException
java.lang.UnsupportedOperationException
public void set(int index, double[] coord)
index
- coord
- public java.util.List positions()
positions
in interface org.opengis.geometry.coordinate.PointArray
public void merge(double minSpacing)
minSpacing
- public void split(double maxSpacing)
maxSpacing
- public java.util.List<? extends org.opengis.geometry.coordinate.LineSegment> getLineSegments(CurveImpl parentCurve)
public int getDimension()
getDimension
in interface org.opengis.geometry.coordinate.PointArray
public int hashCode()
hashCode
in interface java.util.Collection<org.opengis.geometry.coordinate.Position>
hashCode
in interface java.util.List<org.opengis.geometry.coordinate.Position>
hashCode
in class java.util.AbstractList<org.opengis.geometry.coordinate.Position>
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Collection<org.opengis.geometry.coordinate.Position>
equals
in interface java.util.List<org.opengis.geometry.coordinate.Position>
equals
in class java.util.AbstractList<org.opengis.geometry.coordinate.Position>
public org.opengis.geometry.DirectPosition getDirectPosition(int index, org.opengis.geometry.DirectPosition dest) throws java.lang.IndexOutOfBoundsException
getDirectPosition
in interface org.opengis.geometry.coordinate.PointArray
java.lang.IndexOutOfBoundsException
public void setDirectPosition(int index, org.opengis.geometry.DirectPosition position) throws java.lang.IndexOutOfBoundsException, java.lang.UnsupportedOperationException
setDirectPosition
in interface org.opengis.geometry.coordinate.PointArray
java.lang.IndexOutOfBoundsException
java.lang.UnsupportedOperationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |