|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jwo.landserf.structure.VectorMap
Class for holding a vector map layer and supplementary information. Includes a header with georeferenced boundaries. This is the basic vector layer class that includes file input/output methods, but no analysis or visualisation. It includes topological connections for Delaunay triangulation.
Field Summary | |
static float |
OUT_OF_BOUNDS
Indiciates coordinate outside map's boundaries. |
protected DelaunayTriang |
triangulation
Triangulation topology. |
protected ColourTable |
vectColours
Colour table associated with vector map. |
protected VectHeader |
vectHead
Vector header (outer boundaries etc.) |
protected Vector |
vectObjects
1D array of vector objects (points, lines etc. |
Constructor Summary | |
VectorMap()
Creates a minimal empty vector map. |
|
VectorMap(double north,
double south,
double east,
double west)
Creates an empty vector map with given dimensions. |
|
VectorMap(float[] x,
float[] y,
float[] z,
int type)
Creates a vector map based on the given arrays of coordinates. |
|
VectorMap(float[] x,
float[] y,
int type)
Creates a vector map based on the given arrays of coordinates. |
|
VectorMap(RastSurf rast)
Creates vector map based around the dimensions of a raster. |
|
VectorMap(VectorMap oldVectMap)
Creates a copy of an existing vector map. |
Method Summary | |
void |
addPoint(float x,
float y)
Adds a vector point object to the current list. |
void |
addPoint(float x,
float y,
float z)
Adds a vector point object with attribute to the current list. |
void |
addVectorObject(VectorObject vectObject)
Adds a vector object to the current list. |
void |
createTinVector()
Creates a vector map from current triangulation topology. |
void |
createTinVector(DelaunayTriang triangulation)
Creates a vector map from the given Triangulation topology. |
float |
getAttribute(double x,
double y)
Returns the attribute value at given georeferenced coordinates. |
ColourTable |
getColourTable()
Returns colour table associated with vector map. |
double |
getEast()
Returns the eastern edge of the vector map. |
VectHeader |
getHeader()
Returns header information associated with vector map. |
float |
getMax()
Returns the maximum attribute value associated with the vector map. |
float |
getMin()
Returns the minimum attribute value associated with the vector map. |
double |
getNorth()
Returns the northern edge of the vector map. |
String |
getNotes()
Returns the supplementary notes associated with the vector map. |
int |
getNumObjects()
Returns the number of vector objects associated with the vector map. |
double |
getSouth()
Returns the southern edge of the vector map. |
String |
getTitle()
Returns the title of the vector map. |
DelaunayTriang |
getTriangulation()
Returns the triangulation topology associated with vector map. |
VectorMap |
getVectorMap()
Returns this VectorMap object (used for subclasses that need to identify their superclass). |
VectorObject |
getVectorObjectAt(int i)
Gets a vector object at a given position in the list. |
Vector |
getVectorObjects()
Returns the vector objects associated with the vector map. |
float |
getVersion()
Reports the version of the vector map. |
double |
getWest()
Returns the western edge of the vector map. |
boolean |
readFile(String fileName,
int fileType)
Reads one or more files and places the contents into the current vector map object. |
boolean |
readFile(String fileName,
String attribName,
int fileType)
Reads one or more files and places the contents into the current vector map object. |
void |
removeVectorObject(VectorObject vectObj)
Removes the given vector object from the map. |
void |
removeVectorObjectAt(int i)
Removes vector object at the given position in the list. |
void |
removeVectorObjects()
Removes all vector objects stored in map. |
void |
setColourTable(ColourTable ct)
Sets the colour table assocaited with vector map. |
void |
setEast(double e)
Sets the vector map eastern boundary. |
void |
setHeader(VectHeader newHeader)
Sets the header information associated with vector map. |
void |
setNorth(double n)
Sets the vector map northern boundary. |
void |
setNotes(String notes)
Create notes to be associated with the vector map. |
void |
setSouth(double s)
Sets the vector map southern boundary. |
void |
setTitle(String title)
Sets the title of the vector map. |
void |
setTriangulation(DelaunayTriang triangulation)
Sets the triangulation topology associated with vector map. |
void |
setVectorObjects(Vector newObjects)
Sets the vector objects associated with the vector map. |
void |
setVersion(float version)
Sets the version number of the vector map. |
void |
setWest(double w)
Sets the vector map western boundary. |
void |
updateBounds()
Updates the vector map with the minimum enclosing rectangle of the vector objects stored in this vector map. |
boolean |
writeFile(String fileName,
int fileType)
Writes the contents of the vector and supplementary information to a single file. |
boolean |
writeFile(String fileName,
String attribName,
int fileType)
Writes the contents of the vector and supplementary information to one or more files. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected VectHeader vectHead
protected Vector vectObjects
protected ColourTable vectColours
protected DelaunayTriang triangulation
public static final float OUT_OF_BOUNDS
Constructor Detail |
public VectorMap()
public VectorMap(RastSurf rast)
rast
- Raster used to set vector map dimensions.public VectorMap(double north, double south, double east, double west)
north
- Northern boundary of vector map.south
- Southern boundary of vector map.east
- Eastern boundary of vector map.west
- Western boundary of vector map.public VectorMap(float[] x, float[] y, int type)
x
- Array holding x coordinates.y
- Array holding y coordinates.type
- Type of vector feature (VectorObject.POINT, VectorObject.LINE).public VectorMap(float[] x, float[] y, float[] z, int type)
x
- Array holding x coordinates.y
- Array holding y coordinates.z
- Array holding z coordinates.type
- Type of vector feature (VectorObject.POINT, VectorObject.LINE).public VectorMap(VectorMap oldVectMap)
oldVectMap
- Original vector map to copy.Method Detail |
public void updateBounds()
public void removeVectorObjects()
public void createTinVector(DelaunayTriang triangulation)
triangulation
- Triangulation topology.public void createTinVector()
public boolean writeFile(String fileName, int fileType)
fileName
- Name to save file under.fileType
- Type of file format to save.
public boolean writeFile(String fileName, String attribName, int fileType)
fileName
- Name to save file under.attribName
- Name of file containing attributes.fileType
- Type of file format to save.
public boolean readFile(String fileName, int fileType)
fileName
- Name of file containing geometry to read.fileType
- Type of file format to read.
public boolean readFile(String fileName, String attribName, int fileType)
fileName
- Name of file containing geometry to read.attribName
- Name of file containing attributes to read.fileType
- Type of file format to read.
public void addVectorObject(VectorObject vectObject)
public void removeVectorObjectAt(int i)
i
- Position in list to remove.public void removeVectorObject(VectorObject vectObj)
vectObj
- Vector object to remove.public void addPoint(float x, float y)
x
- x coordinate of the point to add.y
- y coordinate of the point to add.public void addPoint(float x, float y, float z)
x
- x coordinate of the point to add.y
- y coordinate of the point to add.z
- z attribute of the point to add.public VectorMap getVectorMap()
public VectHeader getHeader()
public Vector getVectorObjects()
public int getNumObjects()
public VectorObject getVectorObjectAt(int i)
i
- The position in the list to extract vector object.
public String getTitle()
public String getNotes()
public double getNorth()
public double getSouth()
public double getEast()
public double getWest()
public float getMax()
public float getMin()
public float getAttribute(double x, double y)
x
- X coordinate of the location to interrogate.y
- Y coordinate of the location to interrogate.
public DelaunayTriang getTriangulation()
public ColourTable getColourTable()
public float getVersion()
public void setHeader(VectHeader newHeader)
newHeader
- New vector map header information.public void setVectorObjects(Vector newObjects)
newObjects
- A java vector (1D array) of vector objects.public void setTitle(String title)
title
- New vector map title.public void setNotes(String notes)
notes
- New vector map notes.public void setNorth(double n)
n
- Northern boundarypublic void setSouth(double s)
s
- Southern boundarypublic void setEast(double e)
e
- Eastern boundarypublic void setWest(double w)
w
- Western boundarypublic void setTriangulation(DelaunayTriang triangulation)
triangulation
- Triangulation topology to associate with vector.public void setColourTable(ColourTable ct)
ct
- New colour table to associate with vectorpublic void setVersion(float version)
version
- Version number of the vector map.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |