public class Extents extends Object
| Modifier and Type | Method and Description |
|---|---|
static Envelope |
antipodalEnvelope(Envelope envelope)
Returns an envelope that is diametrically opposite to the specified
envelope.
|
static Envelope |
calculateEnvelope(NodeList geomNodes)
Calculates the envelope that covers the given collection of GML geometry
elements.
|
static Envelope |
coalesceBoundingBoxes(List<Node> bboxNodes)
Coalesces a sequence of bounding boxes so as to create an envelope that
covers all of them.
|
static Envelope |
createEnvelope(Node envelopeNode)
Creates an Envelope from the given XML representation of a spatial extent
(ows:BoundingBox, ows:WGS84BoundingBox, or gml:Envelope).
|
static Document |
envelopeAsGML(Envelope envelope)
Generates a standard GML representation (gml:Envelope) of an Envelope
object.
|
static com.vividsolutions.jts.geom.Polygon |
envelopeAsPolygon(Envelope envelope)
Creates a JTS Polygon having the same extent as the given envelope.
|
static String |
envelopeToString(Envelope envelope)
Returns a String representation of a bounding box suitable for use as a
query parameter value (KVP syntax).
|
static double[] |
getAntipode(double[] coordTuple)
Returns the antipode of the specified coordinate tuple.
|
public static Envelope calculateEnvelope(NodeList geomNodes) throws JAXBException
geomNodes - A NodeList containing GML geometry elements; it is assumed
these all refer to the same CRS.JAXBException - If a node cannot be unmarshalled to a geometry object.public static Document envelopeAsGML(Envelope envelope)
envelope - An Envelope defining a bounding rectangle (or prism).public static com.vividsolutions.jts.geom.Polygon envelopeAsPolygon(Envelope envelope)
envelope - An Envelope defining a bounding rectangle.public static Envelope coalesceBoundingBoxes(List<Node> bboxNodes) throws FactoryException, TransformException
bboxNodes - A list of elements representing common bounding boxes
(ows:BoundingBox, ows:WGS84BoundingBox, or gml:Envelope).FactoryException - If an unrecognized CRS reference is encountered or a
corresponding CoordinateReferenceSystem cannot be
constructed.TransformException - If an attempt to perform a coordinate transformation fails
for some reason.public static Envelope createEnvelope(Node envelopeNode) throws FactoryException
envelopeNode - A DOM Node (Document or Element) representing a spatial
envelope.FactoryException - If an unrecognized CRS reference is encountered or a
corresponding CoordinateReferenceSystem cannot be constructed
for some reason.public static String envelopeToString(Envelope envelope)
LowerCorner coordinate 1 LowerCorner coordinate 2 LowerCorner coordinate N ... UpperCorner coordinate 1 UpperCorner coordinate 2 UpperCorner coordinate N crs URI (optional - default "urn:ogc:def:crs:OGC:1.3:CRS84")
Note: The colon character (":") is allowed in the query component of a URI and thus does not need to be escaped. See RFC 3986, sec. 3.4.
envelope - An envelope specifying a geographic extent.public static Envelope antipodalEnvelope(Envelope envelope)
envelope - An envelope (rectangle or cuboid).public static double[] getAntipode(double[] coordTuple)
coordTuple - An array containing a sequence of coordinate values.Copyright © 2020 Open Geospatial Consortium. All rights reserved.