public class POIGeomReader extends java.lang.Object implements GeomReader
Modified by: Joseph A. Huwaldt
EOFMSG
Constructor and Description |
---|
POIGeomReader() |
Modifier and Type | Method and Description |
---|---|
GeomConfig |
read(java.io.InputStream inStream,
java.lang.String name)
Method that reads in a POINTS (POI) geometry file from the
specified input stream and returns a configuration geometry
object that contains the geometry from the POI file.
|
GeomNetwork |
readNetwork(java.io.LineNumberReader in)
Reads a single network from an input stream (pointing to a POI file).
|
void |
setFileUnits(javax.measure.unit.Unit<javax.measure.quantity.Length> units)
Method that specifies the units used for the geometry as stored
in the POI file.
|
void |
write(java.io.File filename,
GeomConfig theConfig)
Method that writes out a POINTS (POI) formatted geometry file
for the geometry contained in the supplied configuration geometry
object.
|
public GeomConfig read(java.io.InputStream inStream, java.lang.String name) throws java.io.IOException
Method that reads in a POINTS (POI) geometry file from the specified input stream and returns a configuration geometry object that contains the geometry from the POI file.
A POI file does not support multiple vehicles. Therefore, the configuration returned by this method will always contain only a single vehicle.
Each component will have an Integer object associated with it under the key "A502A633TypeCode" that contains the A502-A633 array type code for all the networks contained in that component.
read
in interface GeomReader
inStream
- The input stream to geometry file that we are reading from.name
- The name of the geometry being read in (null for no name).java.io.IOException
public void write(java.io.File filename, GeomConfig theConfig) throws java.io.IOException
write
in interface GeomReader
filename
- The name of the POI geometry file to be written out.theConfig
- The configuration geometry to be written out.java.io.IOException
public void setFileUnits(javax.measure.unit.Unit<javax.measure.quantity.Length> units)
setFileUnits
in interface GeomReader
units
- The units used for the geometry in the disk file.
If null is passed, the units will default to
the reference length units (meters).public GeomNetwork readNetwork(java.io.LineNumberReader in) throws java.io.IOException
in
- Reader for the POI file we are reading (positioned so that
the next read will occur on the line following the
line identifying component type).java.io.IOException