|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jwo.landserf.structure.SpatialObject
Class for defining spatial objects. All such spatial objects have some geographical footprint and can compare themselves with other geographical footprints. The also have a colour table associated with them for display.
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 | |
SpatialObject()
Creates a spatial object with a default spatial footprint. |
|
SpatialObject(Footprint footprint)
Creates an spatial object with the given spatial footprint. |
|
SpatialObject(Footprint footprint,
Header header)
Creates an spatial object with the given spatial footprint and header. |
|
SpatialObject(SpatialObject oldSpatialObject)
Creates a spatial object based on the attributes of the given one. |
Method Summary | |
int |
compare(SpatialModel other)
Makes a spatial comparison between this object and another. |
AttributeTable |
getAttributeTable()
Returns optional attribute table associated with this object or null if one has not been created. |
Footprint |
getBounds()
Returns the 2d bounding rectangle of the object. |
ColourTable |
getColourTable()
Returns colour table associated with this object. |
static String |
getComparisonText(int comparison)
Reports a textual representation of the given comparison type. |
Header |
getHeader()
Reports the header information associated with this object. |
Footprint |
getIntersectionMER(Footprint otherFp)
Calculates the the intersection of the given footprint with this MER. |
abstract float |
getMaxAttribute()
Reports the maximum attribute value of the object. |
abstract float |
getMinAttribute()
Reports the minimum attribute value of the object. |
int |
getType()
Reports the type of spatial object. |
Footprint |
getUnionMER(Footprint otherFp)
Calculates the MER of the union of the given footprint with this MER. |
void |
move(float xOffset,
float yOffset)
Moves the spatial object relatively by the given x,y coordinates. |
void |
setAttributeTable(AttributeTable aTable)
Sets the attribute table assocaited with this object. |
void |
setBounds(Footprint footprint)
Sets the bounding rectangle of this object. |
void |
setColourTable(ColourTable cTable)
Sets the colour table assocaited with this object. |
void |
setHeader(Header newHeader)
Sets a new the header to be associated with this object. |
String |
toString()
Reports the details of this spatial object. |
abstract void |
updateBounds()
Forces the object to find its new spatial and attribute bounds. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jwo.landserf.structure.SpatialModel |
getAttribute, getImage, subset |
Constructor Detail |
public SpatialObject()
public SpatialObject(Footprint footprint)
footprint
- Spatial footprint of this object.public SpatialObject(Footprint footprint, Header header)
footprint
- Spatial footprint of this object.header
- Header associated with this spatial object.public SpatialObject(SpatialObject oldSpatialObject)
oldSpatialObject
- Spatial object map to copy.Method Detail |
public int compare(SpatialModel other)
compare
in interface SpatialModel
other
- Spatial model with which to make a comparison.
public Footprint getUnionMER(Footprint otherFp)
otherFp
- Footprint of object to union with this MER.public Footprint getIntersectionMER(Footprint otherFp)
otherFp
- Footprint of object to intersect with this MER.public void move(float xOffset, float yOffset)
xOffset
- Offset in the x direction.yOffset
- Offset in the y direction.public String toString()
public int getType()
getType
in interface SpatialModel
public abstract float getMinAttribute()
public abstract float getMaxAttribute()
public abstract void updateBounds()
public Header getHeader()
getHeader
in interface SpatialModel
public void setHeader(Header newHeader)
newHeader
- New header information (title, copyright etc).public void setBounds(Footprint footprint)
setBounds
in interface SpatialModel
footprint
- Spatial footprint to assign to this object.public Footprint getBounds()
getBounds
in interface SpatialModel
public ColourTable getColourTable()
public void setColourTable(ColourTable cTable)
cTable
- New colour table to associate with this objectpublic AttributeTable getAttributeTable()
public void setAttributeTable(AttributeTable aTable)
aTable
- New attribute table to associate with this objectpublic static String getComparisonText(int comparison)
comparison
- Type of comparison to query.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |