public Object getValue(Element element, ElementValue[] value, Attributes attrs, Map hints) throws SAXException, OperationNotSupportedException { CRSEnvelope bbox = new CRSEnvelope(); 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(); 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; }
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; }
public Object getValue(Element element, ElementValue[] value, Attributes attrs, Map hints) throws SAXException, OperationNotSupportedException { CRSEnvelope bbox = new CRSEnvelope(); for (int i = 0; i < value.length; i++) { if (sameName(elems[0], value[i])) { bbox.setMinX(((Double) value[i].getValue()).doubleValue()); } if (sameName(elems[1], value[i])) { bbox.setMaxX(((Double) value[i].getValue()).doubleValue()); } if (sameName(elems[2], value[i])) { bbox.setMinY(((Double) value[i].getValue()).doubleValue()); } if (sameName(elems[3], value[i])) { bbox.setMaxY(((Double) value[i].getValue()).doubleValue()); } } return bbox; }
public Object getValue(Element element, ElementValue[] value, Attributes attrs, Map hints) throws SAXException, OperationNotSupportedException { CRSEnvelope bbox = new CRSEnvelope(); for (int i = 0; i < value.length; i++) { if (sameName(elems[0], value[i])) { bbox.setMinX(((Double) value[i].getValue()).doubleValue()); } if (sameName(elems[1], value[i])) { bbox.setMaxX(((Double) value[i].getValue()).doubleValue()); } if (sameName(elems[2], value[i])) { bbox.setMinY(((Double) value[i].getValue()).doubleValue()); } if (sameName(elems[3], value[i])) { bbox.setMaxY(((Double) value[i].getValue()).doubleValue()); } } return bbox; }