public interface GeomReader extends java.lang.Comparable
Modified by: Joseph A. Huwaldt
Modifier and Type | Field and Description |
---|---|
static int |
MAYBE
Constant indicating that a reader might be able to read a specified file,
but can't determine for sure.
|
static int |
NO
Constant indicating that a reader certainly can not read a specified file.
|
static int |
YES
Constant indicating that a reader certainly can read a specified file.
|
Modifier and Type | Method and Description |
---|---|
int |
canReadData(java.io.File inputFile)
Method that determines if this reader can read geometry from the specified input
file.
|
boolean |
canWriteData()
Returns true if this class can write at least some data in the format supported by
this class.
|
java.lang.String |
getExtension()
Returns the preferred file extension (not including the ".") for files of this
GeomReader's type.
|
java.util.List<java.lang.String> |
getWarnings()
Return a list of any warning messages that the reader/writer may have issued.
|
boolean |
isUnitAware()
Returns
true if this reader is unit aware (the format it reads from or
writes to stores the units being used) and returns false otherwise. |
GeometryList |
read(java.io.File inputFile)
Reads in a geometry file from the supplied input file and returns a
GeometryList object that contains the geometry from the file. |
void |
setFileUnits(Unit<Length> units)
Sets the units used for the geometry as stored in a non-unit aware geometry file
being read in.
|
void |
write(java.io.File outputFile,
GeometryList geometry)
Writes out a geometry file for the geometry contained in the supplied
GeometryList object. |
static final int NO
static final int YES
static final int MAYBE
GeometryList read(java.io.File inputFile) throws java.io.IOException
GeometryList
object that contains the geometry from the file.
WARNING: If the file being read in is not unit aware, then you must set the units to be used by calling "setFileUnits()" before calling this method!
inputFile
- The input file containing the geometry to be read in. May not
be null.GeometryList
object containing the geometry read in from the
file.java.io.IOException
- If there is a problem reading the specified file.setFileUnits(javax.measure.unit.Unit)
void write(java.io.File outputFile, GeometryList geometry) throws java.io.IOException
GeometryList
object.
WARNING: If the format being written is not unit aware, then the values are written out in whatever their current units are! Make sure to convert to the desired units for the file before calling this method.
outputFile
- The output File to which the geometry is to be written. May not
be null.geometry
- The GeometryList
object containing the geometry to be
written out. May not be null.java.io.IOException
- If there is a problem writing to the specified file.int canReadData(java.io.File inputFile) throws java.io.IOException
inputFile
- The input file containing the geometry to be read in.java.io.IOException
- If there is a problem reading from the specified
file.boolean canWriteData()
java.lang.String getExtension()
void setFileUnits(Unit<Length> units)
units
- The units used for the geometry in the file being read in. If null is
passed, the units will default to the default system units.isUnitAware()
boolean isUnitAware()
true
if this reader is unit aware (the format it reads from or
writes to stores the units being used) and returns false
otherwise.setFileUnits(javax.measure.unit.Unit)
java.util.List<java.lang.String> getWarnings()