Package org.locationtech.jtstest.util.io
Class MultiFormatFileReader
java.lang.Object
org.locationtech.jtstest.util.io.MultiFormatFileReader
Reads a
Geometry
collection from a file which is in
WKT, WKBHex, GML, GeoJSON, or SHP format.- Version:
- 1.7
- Author:
- Martin Davis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionread
(String filename, int limit, int offset, GeometryFactory geomFactory) static Geometry
readGeometry
(String filename, int limit, int offset, GeometryFactory geomFactory) 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.
-
Constructor Details
-
MultiFormatFileReader
public MultiFormatFileReader() -
MultiFormatFileReader
-
-
Method Details
-
readGeometry
public static Geometry readGeometry(String filename, int limit, int offset, GeometryFactory geomFactory) throws Exception - Throws:
Exception
-
read
public static List<Geometry> read(String filename, int limit, int offset, GeometryFactory geomFactory) throws Exception - Throws:
Exception
-
setLimit
public void setLimit(int limit) Sets the maximum number of geometries to read.- Parameters:
limit
- the maximum number of geometries to read
-
setOffset
public void setOffset(int offset) Sets the number of geometries to skip before storing.- Parameters:
offset
- the number of geometries to skip
-
read
- Throws:
Exception
-
readList
- Throws:
Exception
-