Package org.geotools.xml

Examples of org.geotools.xml.XSISAXHandler


    }
   
    public void testEncodeChoiceGeometryType() throws Exception {
        File f = TestData.copy(this,"xml/feature-type-choice.xsd");
        URI u = f.toURI();
        XSISAXHandler contentHandler = new XSISAXHandler(u);
        XSISAXHandler.setLogLevel(Level.WARNING);

        SAXParserFactory spf = SAXParserFactory.newInstance();
        spf.setNamespaceAware(true);
        spf.setValidating(false);
        SAXParser parser = spf.newSAXParser();
        parser.parse(f, contentHandler);

        Schema schema = contentHandler.getSchema();
        Element geomElement = schema.getElements()[0].findChildElement("GEOM");
        GeometryFactory factory=new GeometryFactory();
        LinearRing ring = factory.createLinearRing(new Coordinate[]{
                new Coordinate(0,0),
                new Coordinate(10,0),
View Full Code Here

TOP

Related Classes of org.geotools.xml.XSISAXHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.