/** * Manages the start of a new main or sub geometry. This method looks at the status of the * current handler and either returns a new sub-handler (if the last one was successfully * returned already) or passes the element start notification along to the current handler as a * sub geometry notice. * * @param localName The local name of the geometry, which corresponds to an OGC simple feature * type. * @param atts The attributes of the geometry, including SRID, etc. * @throws SAXException parser error. */ public void geometryStart(String localName, org.xml.sax.Attributes atts) throws SAXException { String srs = null; for (int i = 0; i < atts.getLength(); i++) { final String NAME = atts.getQName(i); if ("srs".equalsIgnoreCase(NAME)) { srs = atts.getValue(i); } } if (currentHandler == null) { currentHandler = handlerFactory.create(localName); } else { currentHandler.subGeometry(localName, currentHandler.GEOMETRY_START); } currentHandler.setSRS(srs); }
currentHandler = handlerFactory.create(internalType); } else if (type == GEOMETRY_END) { geometries.add(currentHandler.create(geometryFactory));
/** * Manages the start of a new main or sub geometry. This method looks at * the status of the current handler and either returns a new sub-handler * (if the last one was successfully returned already) or passes the * element start notification along to the current handler as a sub * geometry notice. * * @param localName The local name of the geometry, which corresponds to an * OGC simple feature type. * @param atts The attributes of the geometry, including SRID, etc. * * @throws SAXException parser error. */ public void geometryStart(String localName, org.xml.sax.Attributes atts) throws SAXException { String srs = null; for (int i = 0; i < atts.getLength(); i++) { final String NAME = atts.getQName(i); if( "srs".equalsIgnoreCase( NAME ) ){ srs = atts.getValue(i); } } if (currentHandler == null) { currentHandler = handlerFactory.create(localName); } else { currentHandler.subGeometry(localName, currentHandler.GEOMETRY_START); } currentHandler.setSRS( srs ); }
/** * Manages the start of a new main or sub geometry. This method looks at * the status of the current handler and either returns a new sub-handler * (if the last one was successfully returned already) or passes the * element start notification along to the current handler as a sub * geometry notice. * * @param localName The local name of the geometry, which corresponds to an * OGC simple feature type. * @param atts The attributes of the geometry, including SRID, etc. * * @throws SAXException parser error. */ public void geometryStart(String localName, org.xml.sax.Attributes atts) throws SAXException { String srs = null; for (int i = 0; i < atts.getLength(); i++) { final String NAME = atts.getQName(i); if( "srs".equalsIgnoreCase( NAME ) ){ srs = atts.getValue(i); } } if (currentHandler == null) { currentHandler = handlerFactory.create(localName); } else { currentHandler.subGeometry(localName, currentHandler.GEOMETRY_START); } currentHandler.setSRS( srs ); }
currentHandler = handlerFactory.create(internalType); } else if (type == GEOMETRY_END) { geometries.add(currentHandler.create(geometryFactory));
currentHandler = handlerFactory.create(internalType); } else if (type == GEOMETRY_END) { geometries.add(currentHandler.create(geometryFactory));