|
||||||||||
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.VectorMap
A collection of GIS vectors that model object boundaries.
Field Summary | |
static int |
QUALITY
Indicates a rendering style to maximise quality. |
static int |
SPEED
Indicates a rendering style to maximise speed. |
protected DelaunayTriang |
triangulation
Triangulation topology. |
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 | |
VectorMap()
Creates an empty vector map with default characteristics. |
|
VectorMap(Footprint fp,
Header header)
Creates an empty vector map with a given footprint and header. |
|
VectorMap(GISVector gisVector,
Header header)
Creates a vector map from the given GIS vector. |
|
VectorMap(SpatialObject spObj)
Creates a vector map based on the dimensions and header of the spatial object |
Method Summary | |
void |
add(GISVector gisVector)
Adds the given GIS vector object to the map and updates the vector bounds. |
void |
add(GISVector gisVector,
boolean updateBounds)
Adds the given GIS vector object to the map with option boundary update. |
void |
add(VectorMap newVectorMap)
Adds the given vector map to this one and updates the bounds. |
Object |
clone()
Clones this vector map. |
void |
draw(AffineTransform trans,
AffineTransform iTrans,
float lineWidth,
float pointWidth,
Color borderColour,
float transparency,
int renderStyle,
Graphics g)
Draws the vector map using the given graphics context. |
void |
drawLabels(AffineTransform trans,
AffineTransform iTrans,
Color backgroundColour,
Color foregroundColour,
float fontSize,
Graphics g)
Draws the attributes associated with point vectors. |
float |
getAttribute(Footprint fp)
Reports the attribute at the given point location. |
Object |
getAttribute(Footprint fp,
AttributeTable attributeTable)
Reports the attribute at the given point location. |
GISVector |
getGISVector(Footprint fp)
Reports the GISVector at the given point location. |
Vector |
getGISVectors()
Returns a collection of GIS vectors stored in this map. |
void |
getImage(int[] pixels,
int imgWidth)
Converts the vector map into a centred 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 |
getNumObjects()
Returns the number of GIS vector objects associated with the vector map. |
DelaunayTriang |
getTriangulation()
Returns the triangulation topology associated with vector map. |
int |
getType()
Reports the type of spatial model. |
boolean |
hasZCoords()
Processes all GIS vectors to see if they all have z coordinates. |
boolean |
readFile(String fileName)
Reads the contents of the given native format file into this vector map. |
boolean |
remove(GISVector gisVector)
Removes the given GIS vector object from the map. |
void |
setDefaultColours()
Sets up a default colour scheme based on the range of values in this vector map. |
void |
setImageContainer(Container imageContainer)
Sets the image container that can hold a rasterised version of this vector map. |
void |
setTriangulation(DelaunayTriang tri)
Sets the triangulation topology associated with vector map. |
void |
setType(int type)
Sets the type of vector model (e.g. |
SpatialModel |
subset(Footprint clipRect)
Creates a subset of this vector map based on the given rectangle. |
void |
tinToVector()
Creates a vector map from current triangulation topology. |
String |
toString()
Reports the details of this vector map. |
void |
updateBounds()
Updates the minimum enclosing rectangle as that enclosing all GIS Vectors within this map. |
void |
vectorToTin()
Creates and stores TIN topology from this vector map. |
boolean |
writeFile(String fileName,
int fileType,
GISFrame gisFrame)
Writes the contents of the vector map to one or more files. |
boolean |
writeFile(String fileName,
int fileType,
GISFrame gisFrame,
LSThread lsThread)
Writes the contents of the vector map to one or more files. |
Methods inherited from class jwo.landserf.structure.SpatialObject |
compare, getAttributeTable, getBounds, getColourTable, getComparisonText, getHeader, getIntersectionMER, getProjection, getUnionMER, move, setAttributeTable, setBounds, setColourTable, setHeader, setProjection |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected transient DelaunayTriang triangulation
public static final int SPEED
public static final int QUALITY
Constructor Detail |
public VectorMap()
public VectorMap(Footprint fp, Header header)
fp
- Footprint defining map's bounds.header
- Header associated with the vector map.public VectorMap(GISVector gisVector, Header header)
gisVector
- GIS vector object from which to create map.header
- Header associated with the vector map.public VectorMap(SpatialObject spObj)
spObj
- Spatial object from which to extract bounds and header.Method Detail |
public Object clone()
public void add(GISVector gisVector)
gisVector
- GIS vector object to add.public void add(GISVector gisVector, boolean updateBounds)
gisVector
- GIS vector object to add.updateBounds
- Will update the map's bounds if true.public void add(VectorMap newVectorMap)
newVectorMap
- Vector map to add.public boolean remove(GISVector gisVector)
gisVector
- GIS Vector object to remove.
public Vector getGISVectors()
public void tinToVector()
public void vectorToTin()
public String toString()
toString
in class SpatialObject
public boolean writeFile(String fileName, int fileType, GISFrame gisFrame)
fileName
- Name of main file to save.fileType
- Type of file format to save.gisFrame
- GUI in which to report results.
FileHandler
public boolean writeFile(String fileName, int fileType, GISFrame gisFrame, LSThread lsThread)
fileName
- Name to save file under.fileType
- Type of file format to save.gisFrame
- GUI in which to report results.lsThread
- Thread that called this method (allowing it to be interrupted).
Can be null, in which case, method cannot be interrupted.
FileHandler
public boolean readFile(String fileName)
fileName
- Name to file to read.
public void draw(AffineTransform trans, AffineTransform iTrans, float lineWidth, float pointWidth, Color borderColour, float transparency, int renderStyle, Graphics g)
trans
- georeference to pixel transformation.iTrans
- pixel to georeference transformation.lineWidth
- Line width of vector representation (in pixels, can be fractions of a pixel).pointWidth
- Size of point features in pixels.borderColour
- Colour of polygon borders or null if no border.transparency
- Polygon interior transparency.renderStyle
- Either optimise for QUALITY or SPEED.g
- Graphics context in which to draw.public void drawLabels(AffineTransform trans, AffineTransform iTrans, Color backgroundColour, Color foregroundColour, float fontSize, Graphics g)
trans
- georeference to pixel transformation.iTrans
- pixel to georeference transformation.backgroundColour
- Colour of label background.foregroundColour
- Colour of label foregroundground.fontSize
- Size of label text in font point units.g
- Graphics context in which to draw.public float getMinAttribute()
getMinAttribute
in class SpatialObject
public float getMaxAttribute()
getMaxAttribute
in class SpatialObject
public void setImageContainer(Container imageContainer)
imageContainer
- Container in which to draw rasterised image.public int getNumObjects()
public DelaunayTriang getTriangulation()
public void setTriangulation(DelaunayTriang tri)
tri
- Triangulation topology.public void setType(int type)
type
- Type of vector model.public void updateBounds()
updateBounds
in class SpatialObject
public boolean hasZCoords()
public SpatialModel subset(Footprint clipRect)
subset
in interface SpatialModel
subset
in class SpatialObject
clipRect
- Clipping rectangle.
public int getType()
getType
in interface SpatialModel
getType
in class SpatialObject
public float getAttribute(Footprint fp)
getAttribute
in interface SpatialModel
getAttribute
in class SpatialObject
fp
- Location to query. The larger of the width/height
is used to define the snapping distance for the query.
public GISVector getGISVector(Footprint fp)
fp
- Location to query. The larger of the width/height
is used to define the snapping distance for the query.
public Object getAttribute(Footprint fp, AttributeTable attributeTable)
fp
- Location to query.attributeTable
- Attribute table to look up.
public void getImage(int[] pixels, int imgWidth)
getImage
in interface SpatialModel
getImage
in class SpatialObject
pixels
- Image array to store colours.imgWidth
- Image width.public void setDefaultColours()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |