Package org.locationtech.jtstest.util.io
Class IOUtil
java.lang.Object
org.locationtech.jtstest.util.io.IOUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
static Geometry
readFile
(String filename, GeometryFactory geomFact) private static Geometry
readGeoJSONFile
(String filename, GeometryFactory geomFact) static Geometry
readGeoJSONString
(String s, GeometryFactory geomFact) private static Geometry
readGMLFile
(String filename, GeometryFactory geomFact) static Geometry
readGMLString
(String gml, GeometryFactory geomFact) private static Geometry
readShapefile
(String filename, GeometryFactory geomFact) private static Geometry
readWKBHexFile
(String filename, GeometryFactory geomFact) static Geometry
readWKBHexString
(String wkb, GeometryFactory geomFact) private static Geometry
readWKTFile
(String filename, GeometryFactory geomFact) static Geometry
readWKTString
(String wkt, GeometryFactory geomFact) Reads one or more WKT geometries from a string.
-
Constructor Details
-
IOUtil
public IOUtil()
-
-
Method Details
-
readFile
public static Geometry readFile(String filename, GeometryFactory geomFact) throws Exception, IOException - Throws:
Exception
IOException
-
readShapefile
- Throws:
Exception
-
readGMLFile
private static Geometry readGMLFile(String filename, GeometryFactory geomFact) throws ParseException, IOException, SAXException, ParserConfigurationException -
readWKBHexFile
private static Geometry readWKBHexFile(String filename, GeometryFactory geomFact) throws ParseException, IOException - Throws:
ParseException
IOException
-
cleanHex
-
readWKTFile
private static Geometry readWKTFile(String filename, GeometryFactory geomFact) throws ParseException, IOException - Throws:
ParseException
IOException
-
readWKTString
public static Geometry readWKTString(String wkt, GeometryFactory geomFact) throws ParseException, IOException Reads one or more WKT geometries from a string.- Parameters:
wkt
-geomFact
-- Returns:
- the geometry read
- Throws:
ParseException
IOException
-
readWKBHexString
public static Geometry readWKBHexString(String wkb, GeometryFactory geomFact) throws ParseException, IOException - Throws:
ParseException
IOException
-
readGMLString
public static Geometry readGMLString(String gml, GeometryFactory geomFact) throws ParseException, IOException, SAXException, ParserConfigurationException -
readGeoJSONFile
private static Geometry readGeoJSONFile(String filename, GeometryFactory geomFact) throws ParseException, IOException, SAXException, ParserConfigurationException -
readGeoJSONString
- Throws:
ParseException
-