jwo.landserf.structure
Interface SpatialModel

All Known Implementing Classes:
DelaunayTriang, DummySpatialObject, GISVector, RasterMap, SpatialObject, VectorMap

public interface SpatialModel

Identifies minimum state and behaviour of all spatial models.

Version:
2.3, 6th November, 2006.
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
          Identifies 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
          Identifies 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
          Identifies the spatial model as a 2d raster.
static int RASTER_3D
          Identifies the spatial model as a 3d raster.
static int SEPARATE
          Identifies this object as being separate from another.
static int TIN
          Identifies 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
          Identifies that object is of unknown type.
static int UNKNOWN_MODEL
          Identifies the spatial model is unknown.
static int VECTOR_2D
          Identifies the spatial model as a 2d vector.
static int VECTOR_3D
          Identifies 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

static final int UNKNOWN_MODEL
Identifies the spatial model is unknown.

See Also:
Constant Field Values

RASTER_2D

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

See Also:
Constant Field Values

VECTOR_2D

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

See Also:
Constant Field Values

RASTER_3D

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

See Also:
Constant Field Values

VECTOR_3D

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

See Also:
Constant Field Values

TIN

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

See Also:
Constant Field Values

CONTOUR

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

See Also:
Constant Field Values

MSN

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

See Also:
Constant Field Values

NO_VALUE

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

See Also:
Constant Field Values

OUT_OF_BOUNDS

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

See Also:
Constant Field Values

UNKNOWN

static final int UNKNOWN
Identifies that object is of unknown type.

See Also:
Constant Field Values

POINT

static final int POINT
Identifies a point object.

See Also:
Constant Field Values

LINE

static final int LINE
Identifies a linear object.

See Also:
Constant Field Values

AREA

static final int AREA
Identifies an areal object.

See Also:
Constant Field Values

VOLUME

static final int VOLUME
Identifies a volumetric object.

See Also:
Constant Field Values

UNDEFINED

static final int UNDEFINED
Identifies an undefined spatial comparison.

See Also:
Constant Field Values

WITHIN

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

See Also:
Constant Field Values

MATCHES

static final int MATCHES
Identifies this object as matching another.

See Also:
Constant Field Values

OVERLAPS

static final int OVERLAPS
Identifies this object as overlapping another.

See Also:
Constant Field Values

ENCLOSES

static final int ENCLOSES
Identifies this object as enclosing another.

See Also:
Constant Field Values

ADJACENT

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

See Also:
Constant Field Values

SEPARATE

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

See Also:
Constant Field Values

UNION

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

See Also:
Constant Field Values

INTERSECTION

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

See Also:
Constant Field Values
Method Detail

getType

int getType()
Reports the type of spatial model.

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

getAttribute

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

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

Returns:
Outer boundary of the spatial object.

setBounds

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

Parameters:
bounds - New outer boundary of the object.

compare

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

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 defining the clipping region.
Returns:
Subset of spatial object.

getHeader

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

Returns:
Header information (title, copyright etc).

getImage

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-2009, last modified, 17th April, 2009