|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jwo.landserf.structure.SpatialObject jwo.landserf.structure.GISVector
Models a GIS vector object such as a single point, line or area. Objects can contain more than 1 'subpath' allowing discontinuities, holes and islands to be represented.
Field Summary |
Fields inherited from interface jwo.landserf.structure.SpatialModel |
ADJACENT, AREA, CONTOUR, ENCLOSES, INTERSECTION, LINE, MATCHES, MSN, NO_VALUE, OUT_OF_BOUNDS, OVERLAPS, POINT, RASTER_2D, RASTER_3D, SEPARATE, TIN, UNDEFINED, UNION, UNKNOWN_MODEL, VECTOR_2D, VECTOR_3D, VOLUME, WITHIN |
Constructor Summary | |
GISVector()
Creates an empty GIS vector object. |
|
GISVector(float[] xCoords,
float[] yCoords,
int type,
float attrib)
Creates the GIS vector object with the given x and y coords. |
|
GISVector(float easting,
float northing,
float attribute)
Creates a GIS vector point object with given coordinates and attribute. |
|
GISVector(float n,
float s,
float e,
float w)
Creates a bounding box with the given north, south, east and west cordinates. |
|
GISVector(Footprint fp)
Creates a bounding box from the given footprint. |
|
GISVector(GISVector oldVector)
Creates a clone of the given GIS Vector. |
Method Summary | |
void |
addCoords(Footprint footprint)
Adds the given footprint to the vector's coordinates and updates the bounding area. |
boolean |
combine(GISVector otherVector)
Combines the given GIS Vector with this one to form a composite object. |
int |
compare(SpatialModel other)
Makes a spatial comparison between this vector and a given spatial object's MER. |
Vector |
findLineIntersections(GISVector otherVector)
Reports the intersections between this and the given vector. |
Vector |
findLineIntersections(GISVector otherVector,
boolean interior)
Reports the intersections between this and the given vector. |
Vector |
findObjectIntersections(GISVector otherVector)
Reports the itersection object(s) of this one and the given one. |
float |
getAttribute()
Reports the attribute associated with the GIS vector. |
float |
getAttribute(Footprint fp)
Reports the attribute at the given point location. |
float |
getAttribute(Footprint fp,
float snappingDistance)
Reports the attribute at the given point location. |
GeneralPath |
getCoords()
Returns a drawable set of coordinates representing vector object. |
boolean |
getCoords(float[] x,
float[] y)
Fills the given coordinate arrays with coordinates representing the GIS vector. |
float |
getDistance(Footprint fp)
Reports the closest distance to the given point location. |
void |
getImage(int[] img,
int imgWidth)
Converts the GIS vector into colour image for display. |
float |
getMaxAttribute()
Reports the maximum attribute value of the object. |
float |
getMinAttribute()
Reports the minimum attribute value of the object. |
int |
getNumCoords()
Reports the number of coordintes in this GIS vector. |
int |
getNumSubpaths()
Reports the number of sub-paths represented by this object. |
Vector |
getSubpaths()
Returns a collection of separate GISVectors, each representing a separate subpath. |
int |
getType()
Reports the type of vector. |
float[] |
getZCoords()
Returns a set of z coordinates matching each (x,y) pair. |
void |
reverse()
Reveses the order of coordinates making up the object. |
void |
setAttribute(float attrib)
Sets the attribute of the GIS vector. |
void |
setCoords(float[] xCoords,
float[] yCoords)
Sets the coordinates of the vector object from the given arrays. |
void |
setCoords(GeneralPath coords)
Sets the coordinates of the vector object from the given generla path. |
void |
setType(int type)
Sets the type of vector. |
boolean |
setZCoords(float[] zCoords)
Adds an array of z-coordinates to match each (x,y pair). |
Vector |
split(GISVector otherVector)
Splits this object into two new ones around the given object. |
SpatialModel |
subset(Footprint clipRect)
Subsets this GIS vector by clipping to the given rectangle. |
void |
updateBounds()
Updates the bounding rectangle of this object by examining coordinates that make up the feature. |
void |
updateNumSubpaths()
Calculates the number of sub-paths represented by this object. |
Methods inherited from class jwo.landserf.structure.SpatialObject |
getAttributeTable, getBounds, getColourTable, getComparisonText, getHeader, getIntersectionMER, getProjection, getUnionMER, move, setAttributeTable, setBounds, setColourTable, setHeader, setProjection, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GISVector()
public GISVector(GISVector oldVector)
oldVector
- Vector to clone.public GISVector(float easting, float northing, float attribute)
easting
- x-coordinate of point.northing
- y-coordinate of point.attribute
- Attribute of point.public GISVector(float n, float s, float e, float w)
n
- y-coordinate of northern bounds.s
- y-coordinate of southern bounds.e
- x-coordinate of eastern bounds.w
- x-coordinate of western bounds.public GISVector(Footprint fp)
fp
- Footprint representing bounding box.public GISVector(float[] xCoords, float[] yCoords, int type, float attrib)
xCoords
- Array holding x-coordinates of object.yCoords
- Array holding y-coordinates of object.type
- Type of vector object (POINT, LINE, AREA, VOLUME).attrib
- Attribute associated with this GIS vector.Method Detail |
public void addCoords(Footprint footprint)
footprint
- Coordinates to add.public boolean setZCoords(float[] zCoords)
zCoords
- Array of z coordinates.
public boolean combine(GISVector otherVector)
otherVector
- GIS Vector to combine with this one.
public SpatialModel subset(Footprint clipRect)
subset
in interface SpatialModel
subset
in class SpatialObject
clipRect
- Clipping rectangle.
public void getImage(int[] img, int imgWidth)
getImage
in interface SpatialModel
getImage
in class SpatialObject
img
- Image array to store colours (unchanged by this method).imgWidth
- Image width (ignored).public Vector findLineIntersections(GISVector otherVector)
compare()
.
To make a full point/line/area comparison use findObjectIntersections
.
otherVector
- GIS vector with which to make comparison.
compare(jwo.landserf.structure.SpatialModel)
,
findObjectIntersections(GISVector)
public Vector findLineIntersections(GISVector otherVector, boolean interior)
compare()
.
To make a full point/line/area comparison use findObjectIntersections
.
otherVector
- GIS vector with which to make comparison.interior
- Ignores endpoints of lines if true.
compare(jwo.landserf.structure.SpatialModel)
,
findObjectIntersections(GISVector)
public Vector split(GISVector otherVector)
otherVector
- GIS Vector (point) about which to split.
public void reverse()
public int compare(SpatialModel other)
findLineIntersections()
to identify crossing lines etc.
compare
in interface SpatialModel
compare
in class SpatialObject
other
- Spatial model with which to make a comparison.
findLineIntersections(GISVector)
,
findObjectIntersections(GISVector)
public Vector findObjectIntersections(GISVector otherVector)
otherVector
- GIS vector to compare with this one.
findLineIntersections(jwo.landserf.structure.GISVector)
public void updateBounds()
updateBounds
in class SpatialObject
public void updateNumSubpaths()
public GeneralPath getCoords()
public float[] getZCoords()
public boolean getCoords(float[] x, float[] y)
x
- Array to be filled with x coordinates.y
- Array to be filled with y coordinates.
public Vector getSubpaths()
public int getNumCoords()
public int getNumSubpaths()
public int getType()
getType
in interface SpatialModel
getType
in class SpatialObject
public float getAttribute()
public float getAttribute(Footprint fp)
getAttribute
in interface SpatialModel
getAttribute
in class SpatialObject
fp
- Location and snapping distance to query.
public float getAttribute(Footprint fp, float snappingDistance)
fp
- Location to query.snappingDistance
- Tolerance of query location.
public float getDistance(Footprint fp)
fp
- Location to query.
public float getMinAttribute()
getMinAttribute
in class SpatialObject
public float getMaxAttribute()
getMaxAttribute
in class SpatialObject
public void setType(int type)
type
- Type of vector (POINT, LINE, AREA or VOLUME).public void setAttribute(float attrib)
attrib
- Attribute of the GIS vector.public void setCoords(float[] xCoords, float[] yCoords)
xCoords
- Array holding x coordinates.yCoords
- Array holding y coordinates.public void setCoords(GeneralPath coords)
coords
- General path containing coordinates.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |