jwo.landserf.structure
Interface SpatialModel

All Known Implementing Classes:
DelaunayTriang, SpatialObject

public interface SpatialModel

Identifies minimum state and behaviour of all spatial models.

Version:
2.2, 7th August, 2003.
Author:
Jo Wood.

Field Summary
static int ADJACENT
          Identifies this object as being adjacent to another.
static int AREA
          Identifies an areal object.
static int CONTOUR
          Indentifies the spatial model as representing contour lines.
static int ENCLOSES
          Identifies this object as enclosing another.
static int INTERSECTION
          Used to signal an 'intersection' spatial combination.
static int LINE
          Identifies a linear object.
static int MATCHES
          Identifies this object as matching another.
static int MSN
          Indentifies the spatial model as representing metric surface network.
static float NO_VALUE
          Indicates the value of the spatial model is undefined.
static float OUT_OF_BOUNDS
          Indicates that query is outside bounds of model.
static int OVERLAPS
          Identifies this object as overlapping another.
static int POINT
          Identifies a point object.
static int RASTER_2D
          Indentifies the spatial model as a 2d raster.
static int RASTER_3D
          Indentifies the spatial model as a 3d raster.
static int SEPARATE
          Identifies this object as being separate from another.
static int TIN
          Indentifies the spatial model as a Triangulated Irregular Network.
static int UNDEFINED
          Identifies an undefined spatial comparison.
static int UNION
          Used to signal a 'union' spatial combination.
static int UNKNOWN_MODEL
          Indentifies the spatial model is unknown.
static int VECTOR_2D
          Indentifies the spatial model as a 2d vector.
static int VECTOR_3D
          Indentifies the spatial model as a 3d vector.
static int VOLUME
          Identifies a volumetric object.
static int WITHIN
          Identifies this object as being within another.
 
Method Summary
 int compare(SpatialModel other)
          Performs a spatial comparison between this object and another.
 float getAttribute(Footprint location)
          Reports the attribute of the model at the given location.
 Footprint getBounds()
          Reports the outer boundaries of the object.
 Header getHeader()
          Reports the header information associated with this object.
 void getImage(int[] img, int imgWidth)
          Converts the spatial object into colour image for display.
 int getType()
          Reports the type of spatial model.
 void setBounds(Footprint bounds)
          Sets the outer boundaries of the object.
 SpatialModel subset(Footprint bounds)
          Creates a new spatial model that is clipped to the given bounds.
 

Field Detail

UNKNOWN_MODEL

public static final int UNKNOWN_MODEL
Indentifies the spatial model is unknown.

See Also:
Constant Field Values

RASTER_2D

public static final int RASTER_2D
Indentifies the spatial model as a 2d raster.

See Also:
Constant Field Values

VECTOR_2D

public static final int VECTOR_2D
Indentifies the spatial model as a 2d vector.

See Also:
Constant Field Values

RASTER_3D

public static final int RASTER_3D
Indentifies the spatial model as a 3d raster.

See Also:
Constant Field Values

VECTOR_3D

public static final int VECTOR_3D
Indentifies the spatial model as a 3d vector.

See Also:
Constant Field Values

TIN

public static final int TIN
Indentifies the spatial model as a Triangulated Irregular Network.

See Also:
Constant Field Values

CONTOUR

public static final int CONTOUR
Indentifies the spatial model as representing contour lines.

See Also:
Constant Field Values

MSN

public static final int MSN
Indentifies the spatial model as representing metric surface network.

See Also:
Constant Field Values

NO_VALUE

public static final float NO_VALUE
Indicates the value of the spatial model is undefined.

See Also:
Constant Field Values

OUT_OF_BOUNDS

public static final float OUT_OF_BOUNDS
Indicates that query is outside bounds of model.

See Also:
Constant Field Values

POINT

public static final int POINT
Identifies a point object.

See Also:
Constant Field Values

LINE

public static final int LINE
Identifies a linear object.

See Also:
Constant Field Values

AREA

public static final int AREA
Identifies an areal object.

See Also:
Constant Field Values

VOLUME

public static final int VOLUME
Identifies a volumetric object.

See Also:
Constant Field Values

UNDEFINED

public static final int UNDEFINED
Identifies an undefined spatial comparison.

See Also:
Constant Field Values

WITHIN

public static final int WITHIN
Identifies this object as being within another.

See Also:
Constant Field Values

MATCHES

public static final int MATCHES
Identifies this object as matching another.

See Also:
Constant Field Values

OVERLAPS

public static final int OVERLAPS
Identifies this object as overlapping another.

See Also:
Constant Field Values

ENCLOSES

public static final int ENCLOSES
Identifies this object as enclosing another.

See Also:
Constant Field Values

ADJACENT

public static final int ADJACENT
Identifies this object as being adjacent to another.

See Also:
Constant Field Values

SEPARATE

public static final int SEPARATE
Identifies this object as being separate from another.

See Also:
Constant Field Values

UNION

public static final int UNION
Used to signal a 'union' spatial combination.

See Also:
Constant Field Values

INTERSECTION

public static final int INTERSECTION
Used to signal an 'intersection' spatial combination.

See Also:
Constant Field Values
Method Detail

getType

public int getType()
Reports the type of spatial model.

Returns:
Type of spatial model (RASTER_2D, VECTOR_3D etc).

getAttribute

public float getAttribute(Footprint location)
Reports the attribute of the model at the given location.

Parameters:
location - Location to query.
Returns:
Attribute at given location or NO_VALUE if none defined.

getBounds

public Footprint getBounds()
Reports the outer boundaries of the object.

Returns:
Outer boundary of the spatial object.

setBounds

public void setBounds(Footprint bounds)
Sets the outer boundaries of the object.

Parameters:
bounds - New outer boundary of the object.

compare

public int compare(SpatialModel other)
Performs a spatial comparison between this object and another.

Parameters:
other - Other spatial object to compare with this one.
Returns:
Type of spatial relationship (OVERLAPS, SEPARATE etc).

subset

public SpatialModel subset(Footprint bounds)
Creates a new spatial model that is clipped to the given bounds. Result can be null if the bounds are separate from the model.

Parameters:
bounds - Bounds defing the clipping region.
Returns:
Subset spatial object..

getHeader

public Header getHeader()
Reports the header information associated with this object.

Returns:
Header information (title, copyright etc).

getImage

public void getImage(int[] img,
                     int imgWidth)
Converts the spatial object into colour image for display. Colours should be based on colour table associated with the object.

Parameters:
img - Image array to store colours.
imgWidth - Image width.


Copyright Jo Wood, 1996-2005, last modified, 11th March, 2005