Class IOUtil


  • public class IOUtil
    extends java.lang.Object
    • Constructor Detail

      • IOUtil

        public IOUtil()
    • Method Detail

      • readFile

        public static Geometry readFile​(java.lang.String filename,
                                        GeometryFactory geomFact)
                                 throws java.lang.Exception,
                                        java.io.IOException
        Throws:
        java.lang.Exception
        java.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:
        ParseException
        java.io.IOException
        org.xml.sax.SAXException
        javax.xml.parsers.ParserConfigurationException
      • cleanHex

        private static java.lang.String cleanHex​(java.lang.String hexStuff)
      • 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:
        ParseException
        java.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:
        ParseException
        java.io.IOException
        org.xml.sax.SAXException
        javax.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:
        ParseException
        java.io.IOException
        org.xml.sax.SAXException
        javax.xml.parsers.ParserConfigurationException