|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Allows manipulation of a Geometry's CoordianteSequece.
The number of ordinates in each Coordiante is getDimension() + getNumAttributes()
The examples given in this interface are based on a 2-dimensional
coordinate system, x and y,
with two attributes: z and t.
In this case z is the third dimension, but is not used for rendering and
the coordinate
remains 2-dimensional.
| Field Summary |
| Fields inherited from interface com.vividsolutions.jts.geom.CoordinateSequence |
M, X, Y, Z |
| Method Summary | |
java.lang.Object |
getAttribute(int coordinate,
int attribute)
getAttribute purpose. |
int |
getDimension()
Retrieve the number of spatial dimensions of Coordiantes. |
int |
getNumAttributes()
Retrieve number of measures associated with a Coordiantes This is the number of non spatially significant ordinates. |
double |
getOrdinate(int coordinate,
int ordinate)
Retrive a single ordinate |
void |
setAt(int coordinate,
double[] ordinates,
java.lang.Object[] attributes)
Allows modification of a single coordinate (including attribute values). |
void |
setAttribute(int coordinate,
int attribute,
java.lang.Object value)
setAttribute purpose. |
void |
setAttributeArray(int attribute,
java.lang.Object attributeArray)
setAttributeArray purpose. |
void |
setCoordinateArrays(double[][] ordinateArrays,
java.lang.Object[] attributeArrays)
Completely replace sequence with the provided information. |
void |
setOrdinate(int coordinate,
int ordinate,
double value)
Set a single ordinate. |
void |
setOrdinateArray(int ordinate,
double[] ordinateArray)
Supplies an array of ordiantes. |
java.lang.Object[] |
toAttributeArray(int attribute)
toAttributeArray purpose. |
java.lang.Object[] |
toAttributeArrays()
Retrieve Attribute information (an array of attributes for each coordiante). |
double[] |
toOrdinateArray(int ordinate)
Retrive ordinates as an array. |
double[][] |
toOrdinateArrays()
Retrieve ordinate information (an array of ordinates for each coordinate). |
| Methods inherited from interface com.vividsolutions.jts.geom.CoordinateSequence |
clone, expandEnvelope, getCoordinate, getCoordinate, getCoordinateCopy, getX, getY, size, toCoordinateArray |
| Method Detail |
public int getDimension()
This is the number of spatially significant ordiantes (usually 2 or 3)
public int getNumAttributes()
This is the number of non spatially significant ordinates.
public double getOrdinate(int coordinate,
int ordinate)
getOrdinate in interface com.vividsolutions.jts.geom.CoordinateSequencecoordinate - Coordinate to retrive fromordinate - Ordinate to retrive from coordiante
public java.lang.Object getAttribute(int coordinate,
int attribute)
attribute is between 0 and getNumAttributes()
coordinate - attribute - is between 0 and getNumAttributes()
public void setOrdinate(int coordinate,
int ordinate,
double value)
setOrdinate in interface com.vividsolutions.jts.geom.CoordinateSequencecoordinate - Corrdinate to modifyordinate - Ordinate to modify in coordinatevalue - new value
public void setAttribute(int coordinate,
int attribute,
java.lang.Object value)
attribute is between 0 and getNumAttributes()
coordinate - the coordinate to be modifiedattribute - between 0 and getNumAttributes()value - public double[] toOrdinateArray(int ordinate)
Example: (x,y) getDimension()==2
This is defined for the number of dimensions. If the other attributes
happen to be a double, they can still be accessed by using an ordinate
value geater than getDimension().
ordinate - Ordinate to retrieve. ordinate is less than public java.lang.Object[] toAttributeArray(int attribute)
Description ...
attribute - Between 0 and getNumAttrributes()
public void setOrdinateArray(int ordinate,
double[] ordinateArray)
The ordinateArray should be the same length as the CoordinateSequence.
ordinate should be between 0 and getDimension().
If the attributes are doubles as well, then ordinate can be as great as
getDimension() + getNumAttributes().
public void setAttributeArray(int attribute,
java.lang.Object attributeArray)
Description ...
attribute - between 0 and getNumAttributes()attributeArray - May be an object or primative arraypublic double[][] toOrdinateArrays()
Example: (x,y,m,g) getDimension()==2, getNumAttributes()==2
[ [ x1, x2,...,xN], [ y1, y2,...,yN] ]
public java.lang.Object[] toAttributeArrays()
Example: (x,y,m,g) getDimension()==2, getAttributes()==2
[ [ m1, m2,...,mN], [ g1, g2,..., gN] ]
public void setCoordinateArrays(double[][] ordinateArrays,
java.lang.Object[] attributeArrays)
Example: (x,y,m,g) getDimension()==2, getNumAttributes()==2
dimensions:[ [ x1, x2,...,xN], [ y1, y2,...,yN] ]
attributes:[ [ m1, m2,...,mN], [ g1, g2,..., gN] ]
attributeArrays - Indiviual attribute arrays may be primative or
object arrays
public void setAt(int coordinate,
double[] ordinates,
java.lang.Object[] attributes)
Normal Use: where D is getDimensions() and N is getNumAttributes():
dimensions: [ ordX, ordY, ..., ordD ]
attributes: [ atr1, atr2, ...., atrN ]
When dealing with attributes that are all double values the ordinates array may be used to set both ordinates and attribute values.
Optimized Use: where D is getDimensions() and N is getNumAttributes():
dimensions: [ ordX, ordY, ..., ordD, atr1, atr2, ... attrN ]
attributes: null
coordinate - index of coordiante to be modifiedordinates - array ordinate values (may be extended with attribute
values)attributes - array of attribute values, or null is ordinates has
been extended
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||