| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
setStrictParsing(boolean isStrict)
Allows ignoring WKT parse errors
after at least one geometry has been read,
to return a partial result.
|
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 void setLimit(int limit)
limit - the maximum number of geometries to readpublic void setStrictParsing(boolean isStrict)
isStrict - whether to ignore parse errorspublic void setOffset(int offset)
offset - the number of geometries to skippublic List read() throws IOException, ParseException
IOException - if an I/O exception was encounteredParseException - if an error occurred reading a geometryCopyright © 2024. All rights reserved.