|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjwo.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. |
abstract float |
getAttribute(Footprint location)
Should report the attribute of the model at the given location. |
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. |
abstract void |
getImage(int[] img,
int imgWidth)
Should convert the spatial object into colour image for display. |
Footprint |
getIntersectionMER(Footprint otherFp)
Calculates the the intersection of the given footprint with this MER. |
abstract float |
getMaxAttribute()
Should report the maximum attribute value of the object. |
abstract float |
getMinAttribute()
Should report the minimum attribute value of the object. |
Projection |
getProjection()
Reports the projection information used by this spatial 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. |
void |
setProjection(Projection projection)
Sets the projection information to be used by this spatial object. |
abstract SpatialModel |
subset(Footprint bounds)
Should creates a new spatial model that is clipped to the given bounds. |
String |
toString()
Reports the details of this spatial object. |
abstract void |
updateBounds()
Should force 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 |
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 abstract SpatialModel subset(Footprint bounds)
subset
in interface SpatialModel
bounds
- Bounds defing the clipping region.
public abstract void updateBounds()
public int getType()
getType
in interface SpatialModel
public Projection getProjection()
public void setProjection(Projection projection)
projection
- New projection information to be used.public abstract float getAttribute(Footprint location)
getAttribute
in interface SpatialModel
location
- Location to query.
public abstract float getMinAttribute()
public abstract float getMaxAttribute()
public abstract void getImage(int[] img, int imgWidth)
getImage
in interface SpatialModel
img
- Image array to store colours.imgWidth
- Image width.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 |