Class EnvelopeUtil
java.lang.Object
com.vividsolutions.jump.geom.EnvelopeUtil
Utility functions for
Envelopes.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.locationtech.jts.geom.EnvelopebufferByFraction(org.locationtech.jts.geom.Envelope originalEnvelope, double extentFraction) static org.locationtech.jts.geom.Coordinatecentre(org.locationtech.jts.geom.Envelope e) static org.locationtech.jts.geom.Envelopeexpand(org.locationtech.jts.geom.Envelope env, double distance) Expands an Envelope by a given distance.static org.locationtech.jts.geom.GeometrytoGeometry(org.locationtech.jts.geom.Envelope envelope) static voidtranslate(org.locationtech.jts.geom.Envelope e, org.locationtech.jts.geom.Coordinate displacement)
-
Constructor Details
-
EnvelopeUtil
public EnvelopeUtil()
-
-
Method Details
-
expand
public static org.locationtech.jts.geom.Envelope expand(org.locationtech.jts.geom.Envelope env, double distance) Expands an Envelope by a given distance. Both positive and negative distances are handled.- Parameters:
env- the source envelopedistance- the distance we want to expand the envelop in all directions- Returns:
- the expanded envelope
-
translate
public static void translate(org.locationtech.jts.geom.Envelope e, org.locationtech.jts.geom.Coordinate displacement) -
bufferByFraction
public static org.locationtech.jts.geom.Envelope bufferByFraction(org.locationtech.jts.geom.Envelope originalEnvelope, double extentFraction) - Parameters:
originalEnvelope- the original envelopeextentFraction- the buffer distance expressed as a fraction of the average envelope extent- Returns:
- the buffered envelope
-
centre
public static org.locationtech.jts.geom.Coordinate centre(org.locationtech.jts.geom.Envelope e) -
toGeometry
public static org.locationtech.jts.geom.Geometry toGeometry(org.locationtech.jts.geom.Envelope envelope)
-