public class WKTFileReader
extends java.lang.Object
Geometrys in WKT format
from a text file.
The geometries in the file may be separated by any amount
of whitespace and newlines.| Constructor | Description |
|---|---|
WKTFileReader(java.io.File file,
WKTReader wktReader) |
Creates a new WKTFileReader given the File to read from
and a WKTReader to use to parse the geometries.
|
WKTFileReader(java.io.Reader reader,
WKTReader wktReader) |
Creates a new WKTFileReader, given a
Reader to read from. |
WKTFileReader(java.lang.String filename,
WKTReader wktReader) |
Creates a new WKTFileReader, given the name of the file to read from.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.util.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.
|
public WKTFileReader(java.io.File file,
WKTReader wktReader)
file - the File to read fromwktReader - the geometry reader to usepublic WKTFileReader(java.lang.String filename,
WKTReader wktReader)
filename - the name of the file to read fromwktReader - the geometry reader to usepublic WKTFileReader(java.io.Reader reader,
WKTReader wktReader)
Reader to read from.reader - the reader to read fromwktReader - the geometry reader to usepublic void setLimit(int limit)
limit - the maximum number of geometries to readpublic void setOffset(int offset)
offset - the number of geometries to skippublic java.util.List read()
throws java.io.IOException,
ParseException
java.io.IOException - if an I/O exception was encounteredParseException - if an error occurred reading a geometryCopyright © 2018. All rights reserved.