public class WorldFileReader extends Object
The parameters found in the file should be as follows:
It is worth to point out that various data sources describe the parameters in the world file as the mapping from the pixel centres' to the associated world coords. Here we directly build the needed grid to world transform and we DO NOT add any half a pixel translation given that, as stated above, the values we receive should map to the centre of the pixel.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BUFFER_SIZE
Default size for the underlying buffer,
|
Constructor and Description |
---|
WorldFileReader(File inFile)
Default constructor for a
WorldFileReader . |
WorldFileReader(File worldfile,
int bufferSize)
Constructor for a
WorldFileReader . |
WorldFileReader(URL worldfile)
Constructor for a
WorldFileReader . |
WorldFileReader(URL worldfile,
int bufferSize)
Constructor for a
WorldFileReader . |
Modifier and Type | Method and Description |
---|---|
AffineTransform |
getAffineTransform()
Creates an
AffineTransform for interoperability with Java2d. |
double |
getRotationX() |
double |
getRotationY() |
MathTransform |
getTransform() |
double |
getXPixelSize() |
double |
getXULC() |
double |
getYPixelSize() |
double |
getYULC() |
public static final int DEFAULT_BUFFER_SIZE
public WorldFileReader(File inFile) throws IOException
WorldFileReader
.inFile
- holds the location where to read from.IOException
- in case something bad happens.public WorldFileReader(File worldfile, int bufferSize) throws IOException
WorldFileReader
.worldfile
- holds the location where to read from.bufferSize
- to buffer when reading.IOException
- in case something bad happens.public WorldFileReader(URL worldfile, int bufferSize) throws IOException
WorldFileReader
.worldfile
- URL
where to read from.bufferSize
- to buffer when reading.IOException
- in case something bad happens.public WorldFileReader(URL worldfile) throws IOException
WorldFileReader
.worldfile
- URL
where to read from.bufferSize
- to buffer when reading.IOException
- in case something bad happens.public double getRotationX()
public double getRotationY()
public double getXPixelSize()
public double getXULC()
public double getYPixelSize()
public double getYULC()
public MathTransform getTransform()
public AffineTransform getAffineTransform()
AffineTransform
for interoperability with Java2d.AffineTransform
representing the transformation represented by the
underlying world file.Copyright © 1996–2019 Geotools. All rights reserved.