Package org.locationtech.jtstest.util.io
Class IOUtil
- java.lang.Object
-
- org.locationtech.jtstest.util.io.IOUtil
-
public class IOUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description IOUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Geometry
readFile(String filename, GeometryFactory geomFact)
static Geometry
readGeoJSONString(String s, GeometryFactory geomFact)
static Geometry
readGMLString(String gml, GeometryFactory geomFact)
static Geometry
readWKBHexString(String wkb, GeometryFactory geomFact)
static Geometry
readWKTString(String wkt, GeometryFactory geomFact)
Reads one or more WKT geometries from a string.static Geometry
readWKTString(String wkt, GeometryFactory geomFact, boolean isStrict)
-
-
-
Method Detail
-
readFile
public static Geometry readFile(String filename, GeometryFactory geomFact) throws Exception, IOException
- Throws:
Exception
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
-
readWKTString
public static Geometry readWKTString(String wkt, GeometryFactory geomFact, boolean isStrict) throws ParseException, IOException
- 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
-
readGeoJSONString
public static Geometry readGeoJSONString(String s, GeometryFactory geomFact) throws ParseException
- Throws:
ParseException
-
-