it.geosolutions.geoserver.rest.decoder.RESTBoundingBox Maven / Gradle / Ivy
package it.geosolutions.geoserver.rest.decoder;
import org.jdom.Element;
/**
* Parse a Boundingbox of the following structure
*
* 472800.0
* 817362.0
* 35053.40625
* 301500.0
* EPSG:21781
*
* @author nmandery
*/
public class RESTBoundingBox {
protected Element bboxElem;
public RESTBoundingBox(Element bboxElem) {
this.bboxElem = bboxElem;
}
public String getCRS() {
return this.bboxElem.getChildText("crs");
}
protected double getEdge(String edge) {
return Double.parseDouble(this.bboxElem.getChildText(edge));
}
public double getMinX() {
return this.getEdge("minx");
}
public double getMaxX() {
return this.getEdge("maxx");
}
public double getMinY() {
return this.getEdge("miny");
}
public double getMaxY() {
return this.getEdge("maxy");
}
}