Search in sources :

Example 6 with Configuration

use of org.geotools.xml.Configuration in project coastal-hazards by USGS-CIDA.

the class GMLUtil method generateGMLConfiguration.

public static Configuration generateGMLConfiguration(File file) {
    Configuration configuration = null;
    InputStream inputStream = null;
    try {
        inputStream = new BufferedInputStream(new FileInputStream(file), 16 << 10);
        configuration = generateGMLConfiguration(inputStream);
    } catch (IOException e) {
        throw new RuntimeException(e);
    } finally {
        if (inputStream != null)
            try {
                inputStream.close();
            } catch (IOException e) {
            }
    }
    return configuration;
}
Also used : GMLConfiguration(org.geotools.gml3.GMLConfiguration) Configuration(org.geotools.xml.Configuration) ApplicationSchemaConfiguration(org.geotools.gml3.ApplicationSchemaConfiguration) BufferedInputStream(java.io.BufferedInputStream) BufferedInputStream(java.io.BufferedInputStream) FileInputStream(java.io.FileInputStream) InputStream(java.io.InputStream) IOException(java.io.IOException) FileInputStream(java.io.FileInputStream)

Aggregations

Configuration (org.geotools.xml.Configuration)6 IOException (java.io.IOException)4 ApplicationSchemaConfiguration (org.geotools.gml3.ApplicationSchemaConfiguration)4 GMLConfiguration (org.geotools.gml3.GMLConfiguration)4 InputStream (java.io.InputStream)3 BufferedInputStream (java.io.BufferedInputStream)2 FileInputStream (java.io.FileInputStream)2 StringReader (java.io.StringReader)2 QName (javax.xml.namespace.QName)2 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)2 Parser (org.geotools.xml.Parser)2 SAXException (org.xml.sax.SAXException)2 Coordinate (com.vividsolutions.jts.geom.Coordinate)1 Geometry (com.vividsolutions.jts.geom.Geometry)1 GeometryFactory (com.vividsolutions.jts.geom.GeometryFactory)1 Point (com.vividsolutions.jts.geom.Point)1 Polygon (com.vividsolutions.jts.geom.Polygon)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 ArrayList (java.util.ArrayList)1