Package org.geotools.data
Class WorldFileReader
- Object
- 
- WorldFileReader
 
- 
 public class WorldFileReader extends Object This class is responsible for parsing a world file in order to build an affine transform using the parameters provided in the file itself.The parameters found in the file should be as follows: - size of pixel in x direction
- rotation term for row
- rotation term for column
- size of pixel in y direction
- x coordinate of centre of upper left pixel in map units
- y coordinate of centre of upper left pixel in map units
 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. - Since:
- 2.3
- Author:
- Simone Giannecchini, GeoSolutions
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intDEFAULT_BUFFER_SIZEDefault size for the underlying buffer,
 - 
Constructor SummaryConstructors Constructor Description WorldFileReader(File inFile)Default constructor for aWorldFileReader.WorldFileReader(File worldfile, int bufferSize)Constructor for aWorldFileReader.WorldFileReader(URL worldfile)Constructor for aWorldFileReader.WorldFileReader(URL worldfile, int bufferSize)Constructor for aWorldFileReader.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description AffineTransformgetAffineTransform()Creates anAffineTransformfor interoperability with Java2d.doublegetRotationX()doublegetRotationY()MathTransformgetTransform()doublegetXPixelSize()doublegetXULC()doublegetYPixelSize()doublegetYULC()
 
- 
- 
- 
Field Detail- 
DEFAULT_BUFFER_SIZEpublic static final int DEFAULT_BUFFER_SIZE Default size for the underlying buffer,- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
WorldFileReaderpublic WorldFileReader(File inFile) throws IOException Default constructor for aWorldFileReader.- Parameters:
- inFile- holds the location where to read from.
- Throws:
- IOException- in case something bad happens.
 
 - 
WorldFileReaderpublic WorldFileReader(File worldfile, int bufferSize) throws IOException Constructor for aWorldFileReader.- Parameters:
- worldfile- holds the location where to read from.
- bufferSize- to buffer when reading.
- Throws:
- IOException- in case something bad happens.
 
 - 
WorldFileReaderpublic WorldFileReader(URL worldfile, int bufferSize) throws IOException Constructor for aWorldFileReader.- Parameters:
- worldfile-- URLwhere to read from.
- bufferSize- to buffer when reading.
- Throws:
- IOException- in case something bad happens.
 
 - 
WorldFileReaderpublic WorldFileReader(URL worldfile) throws IOException Constructor for aWorldFileReader.- Parameters:
- worldfile-- URLwhere to read from.
- Throws:
- IOException- in case something bad happens.
 
 
- 
 - 
Method Detail- 
getRotationXpublic double getRotationX() 
 - 
getRotationYpublic double getRotationY() 
 - 
getXPixelSizepublic double getXPixelSize() 
 - 
getXULCpublic double getXULC() 
 - 
getYPixelSizepublic double getYPixelSize() 
 - 
getYULCpublic double getYULC() 
 - 
getTransformpublic MathTransform getTransform() 
 - 
getAffineTransformpublic AffineTransform getAffineTransform() Creates anAffineTransformfor interoperability with Java2d.- Returns:
- an AffineTransformrepresenting the transformation represented by the underlying world file.
 
 
- 
 
-