|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.dataAccess.image.WorldFile
public class WorldFile
A world file is a small text file that describes the geographic location of an image on a map. It looks like this:
20.154 <the dimension of a pixel in map units in the x direction> 0.000 <rotation term for row> 0.000 <rotation term for column> -20.154 <the dimension of a pixel in map units in the y direction> 424178 <the x coordinate of the center of pixel 1,1 (upper-left pixel)> 4313415 <the y coordinate of the center of pixel 1,1 (upper-left pixel)>The naming convention of the world file is that it should have the same name as the file it represents, with a modified extension. The extension should be the extension of the image file with a w attached to it, or the first and third letters of the image file extension with a w appended to it. It can also have a .wld extension.
Field Summary | |
---|---|
protected double |
colRot
The rotation term for column. |
static java.util.logging.Logger |
logger
|
protected double |
rowRot
The rotation term for row. |
protected double |
x
The x coordinate of the center of pixel 1,1 (upper-left pixel). |
protected double |
xDim
The dimension of a pixel in map units in the x direction. |
protected double |
y
The y coordinate of the center of pixel 1,1 (upper-left pixel). |
protected double |
yDim
The dimension of a pixel in map units in the y direction. |
Constructor Summary | |
---|---|
protected |
WorldFile()
|
|
WorldFile(double xDim,
double yDim,
double rowRot,
double colRot,
double x,
double y)
|
|
WorldFile(java.io.InputStream is)
|
|
WorldFile(java.net.URL fileURL)
|
Method Summary | |
---|---|
protected static java.io.InputStream |
checkValidityAndGetStream(java.lang.String wfURLString)
|
static WorldFile |
get(java.net.URL imageFileURL)
Given a path to a image file, discover the world file which should be next to it. |
double |
getColRot()
|
double |
getRowRot()
|
double |
getX()
|
double |
getXDim()
|
double |
getY()
|
double |
getYDim()
|
void |
read(java.io.InputStream is)
|
void |
setColRot(double colRot)
|
void |
setRowRot(double rowRot)
|
void |
setX(double x)
|
void |
setXDim(double dim)
|
void |
setY(double y)
|
void |
setYDim(double dim)
|
java.lang.String |
toString()
|
void |
write(java.io.OutputStream os)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.util.logging.Logger logger
protected double xDim
protected double yDim
protected double rowRot
protected double colRot
protected double x
protected double y
Constructor Detail |
---|
protected WorldFile()
public WorldFile(double xDim, double yDim, double rowRot, double colRot, double x, double y)
public WorldFile(java.net.URL fileURL) throws java.net.MalformedURLException, java.io.IOException
java.net.MalformedURLException
java.io.IOException
public WorldFile(java.io.InputStream is) throws java.net.MalformedURLException, java.io.IOException
java.net.MalformedURLException
java.io.IOException
Method Detail |
---|
public void read(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public void write(java.io.OutputStream os) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public static WorldFile get(java.net.URL imageFileURL)
imageFileURL
- the path to the image file, not the world file.
protected static java.io.InputStream checkValidityAndGetStream(java.lang.String wfURLString)
public double getColRot()
public void setColRot(double colRot)
public double getRowRot()
public void setRowRot(double rowRot)
public double getX()
public void setX(double x)
public double getXDim()
public void setXDim(double dim)
public double getY()
public void setY(double y)
public double getYDim()
public void setYDim(double dim)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |