All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.geosolutions.geoserver.rest.decoder.RESTBoundingBox Maven / Gradle / Ivy

Go to download

GeoServer Manager is a library to interact with GeoServer The scope of this library is to have a simple API, and use as few external libs as possible.

There is a newer version: 1.8.7
Show newest version
package it.geosolutions.geoserver.rest.decoder;

import org.jdom.Element;

/**
 * Parse a Boundingbox of the following structure
 *
 * 
 * {@code
 * 472800.0
 * 817362.0
 * 35053.40625
 * 301500.0
 * EPSG:21781
 * }
 * 
* * @author nmandery * @version $Id: $ */ public class RESTBoundingBox { protected Element bboxElem; /** *

Constructor for RESTBoundingBox.

* * @param bboxElem a {@link org.jdom.Element} object. */ public RESTBoundingBox(Element bboxElem) { this.bboxElem = bboxElem; } /** *

getCRS

* * @return a {@link java.lang.String} object. */ public String getCRS() { return this.bboxElem.getChildText("crs"); } /** *

getEdge

* * @param edge a {@link java.lang.String} object. * @return a double. */ protected double getEdge(String edge) { return Double.parseDouble(this.bboxElem.getChildText(edge)); } /** *

getMinX

* * @return a double. */ public double getMinX() { return this.getEdge("minx"); } /** *

getMaxX

* * @return a double. */ public double getMaxX() { return this.getEdge("maxx"); } /** *

getMinY

* * @return a double. */ public double getMinY() { return this.getEdge("miny"); } /** *

getMaxY

* * @return a double. */ public double getMaxY() { return this.getEdge("maxy"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy