public Object getValue(Element element, ElementValue[] value, Attributes attrs, Map hints) throws SAXException, OperationNotSupportedException { CRSEnvelope bbox = new CRSEnvelope(); String crs = attrs.getValue("CRS"); if (crs == null || crs.length() == 0) { crs = attrs.getValue("SRS"); if (crs == null || crs.length() == 0) { throw new SAXException( "Bounding Box element contains no CRS/SRS attribute"); } } bbox.setEPSGCode(crs.toUpperCase()); bbox.setMinX(Double.parseDouble(attrs.getValue("minx"))); bbox.setMaxX(Double.parseDouble(attrs.getValue("maxx"))); bbox.setMinY(Double.parseDouble(attrs.getValue("miny"))); bbox.setMaxY(Double.parseDouble(attrs.getValue("maxy"))); return bbox; }
public Object getValue(Element element, ElementValue[] value, Attributes attrs, Map hints) throws SAXException, OperationNotSupportedException { CRSEnvelope bbox = new CRSEnvelope(); String crs = attrs.getValue("CRS"); if (crs == null || crs.length() == 0) { crs = attrs.getValue("SRS"); if (crs == null || crs.length() == 0) { throw new SAXException("Bounding Box element contains no CRS/SRS attribute"); } } bbox.setEPSGCode(crs.toUpperCase()); bbox.setMinX(Double.parseDouble(attrs.getValue("minx"))); bbox.setMaxX(Double.parseDouble(attrs.getValue("maxx"))); bbox.setMinY(Double.parseDouble(attrs.getValue("miny"))); bbox.setMaxY(Double.parseDouble(attrs.getValue("maxy"))); return bbox; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { CRSEnvelope ret = new CRSEnvelope(); ret.setEPSGCode("EPSG:4326"); ret.setMaxX(Double.parseDouble((String)node.getAttributeValue("maxx"))); ret.setMaxY(Double.parseDouble((String)node.getAttributeValue("maxy"))); ret.setMinX(Double.parseDouble((String)node.getAttributeValue("minx"))); ret.setMinY(Double.parseDouble((String)node.getAttributeValue("miny"))); return ret; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { CRSEnvelope ret = new CRSEnvelope(); ret.setEPSGCode((String)node.getAttributeValue("SRS")); ret.setMaxX(Double.parseDouble((String)node.getAttributeValue("maxx"))); ret.setMaxY(Double.parseDouble((String)node.getAttributeValue("maxy"))); ret.setMinX(Double.parseDouble((String)node.getAttributeValue("minx"))); ret.setMinY(Double.parseDouble((String)node.getAttributeValue("miny"))); return ret; }
bb.setEPSGCode("EPSG:4326"); // for some reason WMS doesn't
bb.setEPSGCode("EPSG:4326"); // for some reason WMS doesn't