Envelope class

Constructors

Envelope(double x1, double x2, double y1, double y2)
Creates an Envelope for a region defined by maximum and minimum values.
Envelope.empty()
Creates a null Envelope.
Envelope.fromCoordinate(Coordinate p)
Creates an Envelope for a region defined by a single Coordinate.
Envelope.fromCoordinates(Coordinate p1, Coordinate p2)
Creates an Envelope for a region defined by two Coordinates.
Envelope.fromEnvelope(Envelope env)
Create an Envelope from an existing Envelope.

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

centre() Coordinate?
Computes the coordinate of the centre of this envelope (as long as it is non-null
compareTo(Object o) int
Compares two envelopes using lexicographic ordering. The ordering comparison is based on the usual numerical comparison between the sequence of ordinates. Null envelopes are less than all non-null envelopes.
contains(double x, double y) bool
Tests if the given point lies in or on the envelope.
containsCoordinate(Coordinate p) bool
Tests if the given point lies in or on the envelope.
containsEnvelope(Envelope other) bool
Tests if the Envelope other lies wholely inside this Envelope (inclusive of the boundary).
copy() Envelope
Creates a copy of this envelope object.
covers(double x, double y) bool
Tests if the given point lies in or on the envelope.
coversCoordinate(Coordinate p) bool
Tests if the given point lies in or on the envelope.
coversEnvelope(Envelope other) bool
Tests if the Envelope other lies wholely inside this Envelope (inclusive of the boundary).
disjoint(Envelope other) bool
Tests if the region defined by other is disjoint from the region of this Envelope.
distance(Envelope env) double
Computes the distance between this and another Envelope. The distance between overlapping Envelopes is 0. Otherwise, the distance is the Euclidean distance between the closest points.
expandBy(double deltaX, double deltaY) → void
Expands this envelope by a given distance in all directions. Both positive and negative distances are supported.
expandByDistance(double distance) → void
Expands this envelope by a given distance in all directions. Both positive and negative distances are supported.
expandToInclude(double x, double y) → void
Enlarges this Envelope so that it contains the given point. Has no effect if the point is already on or within the envelope.
expandToIncludeCoordinate(Coordinate p) → void
Enlarges this Envelope so that it contains the given {@link Coordinate}. Has no effect if the point is already on or within the envelope.
expandToIncludeEnvelope(Envelope other) → void
Enlarges this Envelope so that it contains the other Envelope. Has no effect if other is wholly on or within the envelope.
getArea() double
Gets the area of this envelope.
getDiameter() double
Gets the length of the diameter (diagonal) of the envelope.
getHeight() double
Returns the difference between the maximum and minimum y values.
getMaxX() double
Returns the Envelopes maximum x-value. min x > max x indicates that this is a null Envelope.
getMaxY() double
Returns the Envelopes maximum y-value. min y > max y indicates that this is a null Envelope.
getMinX() double
Returns the Envelopes minimum x-value. min x > max x indicates that this is a null Envelope.
getMinY() double
Returns the Envelopes minimum y-value. min y > max y indicates that this is a null Envelope.
getWidth() double
Returns the difference between the maximum and minimum x values.
init(double x1, double x2, double y1, double y2) → void
Initialize an Envelope for a region defined by maximum and minimum values.
initEmpty() → void
Initialize to a null Envelope.
initFromCoordinate(Coordinate p) → void
Initialize an Envelope to a region defined by a single Coordinate.
initFromCoordinates(Coordinate p1, Coordinate p2) → void
Initialize an Envelope to a region defined by two Coordinates.
initFromEnvelope(Envelope env) → void
Initialize an Envelope from an existing Envelope.
intersection(Envelope env) Envelope
Computes the intersection of two {@link Envelope}s.
intersects(double x, double y) bool
Check if the point (x, y) intersects (lies inside) the region of this Envelope.
intersectsCoordinate(Coordinate p) bool
Tests if the point p intersects (lies inside) the region of this Envelope.
intersectsEnvelope(Envelope other) bool
Tests if the region defined by other intersects the region of this Envelope.
intersectsEnvelopeCoordinates(Coordinate a, Coordinate b) bool
Tests if the extent defined by two extremal points intersects the extent of this Envelope.
isNull() bool
Returns true if this Envelope is a "null" envelope.
maxExtent() double
Gets the maximum extent of this envelope across both dimensions.
minExtent() double
Gets the minimum extent of this envelope across both dimensions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setToNull() → void
Makes this Envelope a "null" envelope, that is, the envelope of the empty geometry.
toString() String
A string representation of this object.
override
translate(double transX, double transY) → void
Translates this envelope by given amounts in the X and Y direction.

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

intersectsEnvelopeCoords(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2) bool
Tests whether the envelope defined by p1-p2 and the envelope defined by q1-q2 intersect.
intersectsPoint(Coordinate p1, Coordinate p2, Coordinate q) bool
Test the point q to see whether it intersects the Envelope defined by p1-p2 @param p1 one extremal point of the envelope @param p2 another extremal point of the envelope @param q the point to test for intersection @return true if q intersects the envelope p1-p2