|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vividsolutions.jts.io.WKTFileReader
public class WKTFileReader
Reads a sequence of Geometry
s in WKT format
from a text file.
The geometries in the file may be separated by any amount
of whitespace and newlines.
Constructor Summary | |
---|---|
WKTFileReader(File file,
WKTReader wktReader)
Creates a new WKTFileReader given the File to read from and a WKTReader to use to parse the geometries. |
|
WKTFileReader(Reader reader,
WKTReader wktReader)
Creates a new WKTFileReader, given a Reader to read from. |
|
WKTFileReader(String filename,
WKTReader wktReader)
Creates a new WKTFileReader, given the name of the file to read from. |
Method Summary | |
---|---|
List |
read()
Reads a sequence of geometries. |
void |
setLimit(int limit)
Sets the maximum number of geometries to read. |
void |
setOffset(int offset)
Sets the number of geometries to skip before storing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WKTFileReader(File file, WKTReader wktReader)
file
- the File to read fromwktReader
- the geometry reader to usepublic WKTFileReader(String filename, WKTReader wktReader)
filename
- the name of the file to read fromwktReader
- the geometry reader to usepublic WKTFileReader(Reader reader, WKTReader wktReader)
Reader
to read from.
reader
- the reader to read fromwktReader
- the geometry reader to useMethod Detail |
---|
public void setLimit(int limit)
limit
- the maximum number of geometries to readpublic void setOffset(int offset)
offset
- the number of geometries to skippublic List read() throws IOException, ParseException
IOException
- if an I/O exception was encountered
ParseException
- if an error occured reading a geometry
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |