Package org.locationtech.jtstest.util.io
Class IOUtil
- java.lang.Object
-
- org.locationtech.jtstest.util.io.IOUtil
-
public class IOUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description IOUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.lang.StringcleanHex(java.lang.String hexStuff)static GeometryreadFile(java.lang.String filename, GeometryFactory geomFact)private static GeometryreadGeoJSONFile(java.lang.String filename, GeometryFactory geomFact)static GeometryreadGeoJSONString(java.lang.String s, GeometryFactory geomFact)private static GeometryreadGMLFile(java.lang.String filename, GeometryFactory geomFact)static GeometryreadGMLString(java.lang.String gml, GeometryFactory geomFact)private static GeometryreadShapefile(java.lang.String filename, GeometryFactory geomFact)private static GeometryreadWKBHexFile(java.lang.String filename, GeometryFactory geomFact)static GeometryreadWKBHexString(java.lang.String wkb, GeometryFactory geomFact)private static GeometryreadWKTFile(java.lang.String filename, GeometryFactory geomFact)static GeometryreadWKTString(java.lang.String wkt, GeometryFactory geomFact)Reads one or more WKT geometries from a string.
-
-
-
Method Detail
-
readFile
public static Geometry readFile(java.lang.String filename, GeometryFactory geomFact) throws java.lang.Exception, java.io.IOException
- Throws:
java.lang.Exceptionjava.io.IOException
-
readShapefile
private static Geometry readShapefile(java.lang.String filename, GeometryFactory geomFact) throws java.lang.Exception
- Throws:
java.lang.Exception
-
readGMLFile
private static Geometry readGMLFile(java.lang.String filename, GeometryFactory geomFact) throws ParseException, java.io.IOException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
- Throws:
ParseExceptionjava.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.parsers.ParserConfigurationException
-
readWKBHexFile
private static Geometry readWKBHexFile(java.lang.String filename, GeometryFactory geomFact) throws ParseException, java.io.IOException
- Throws:
ParseExceptionjava.io.IOException
-
cleanHex
private static java.lang.String cleanHex(java.lang.String hexStuff)
-
readWKTFile
private static Geometry readWKTFile(java.lang.String filename, GeometryFactory geomFact) throws ParseException, java.io.IOException
- Throws:
ParseExceptionjava.io.IOException
-
readWKTString
public static Geometry readWKTString(java.lang.String wkt, GeometryFactory geomFact) throws ParseException, java.io.IOException
Reads one or more WKT geometries from a string.- Parameters:
wkt-geomFact-- Returns:
- the geometry read
- Throws:
ParseExceptionjava.io.IOException
-
readWKBHexString
public static Geometry readWKBHexString(java.lang.String wkb, GeometryFactory geomFact) throws ParseException, java.io.IOException
- Throws:
ParseExceptionjava.io.IOException
-
readGMLString
public static Geometry readGMLString(java.lang.String gml, GeometryFactory geomFact) throws ParseException, java.io.IOException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
- Throws:
ParseExceptionjava.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.parsers.ParserConfigurationException
-
readGeoJSONFile
private static Geometry readGeoJSONFile(java.lang.String filename, GeometryFactory geomFact) throws ParseException, java.io.IOException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
- Throws:
ParseExceptionjava.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.parsers.ParserConfigurationException
-
readGeoJSONString
public static Geometry readGeoJSONString(java.lang.String s, GeometryFactory geomFact) throws ParseException
- Throws:
ParseException
-
-