class Envelope extends Comparable[Envelope] with Serializable
- Annotations
- @SerialVersionUID()
- Alphabetic
- By Inheritance
- Envelope
- Serializable
- Comparable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Envelope(env: Envelope)
Create an
Envelopefrom an existing Envelope.Create an
Envelopefrom an existing Envelope.- env
the Envelope to initialize from
- new Envelope(p: Coordinate)
Creates an
Envelopefor a region defined by a single Coordinate.Creates an
Envelopefor a region defined by a single Coordinate.- p
the Coordinate
- new Envelope(p1: Coordinate, p2: Coordinate)
Creates an
Envelopefor a region defined by two Coordinates.Creates an
Envelopefor a region defined by two Coordinates.- p1
the first Coordinate
- p2
the second Coordinate
- new Envelope(x1: Double, x2: Double, y1: Double, y2: Double)
Creates an
Envelopefor a region defined by maximum and minimum values.Creates an
Envelopefor a region defined by maximum and minimum values.- x1
the first x-value
- x2
the second x-value
- y1
the first y-value
- y2
the second y-value
- new Envelope()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def centre: Coordinate
Computes the coordinate of the centre of this envelope (as long as it is non-null
Computes the coordinate of the centre of this envelope (as long as it is non-null
return the centre coordinate of this envelope
nullif the envelope is null - def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compareTo(o: Envelope): Int
Compares two envelopes using lexicographic ordering.
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.
- o
an Envelope object
- Definition Classes
- Envelope → Comparable
- def contains(x: Double, y: Double): Boolean
Tests if the given point lies in or on the envelope.
Tests if the given point lies in or on the envelope.
Note that this is not the same definition as the SFS contains, which would exclude the envelope boundary.
- x
the x-coordinate of the point which this
Envelopeis being checked for containing- y
the y-coordinate of the point which this
Envelopeis being checked for containing returntrueif(x, y)lies in the interior or on the boundary of thisEnvelope.
- See also
#covers(double, double)
- def contains(p: Coordinate): Boolean
Tests if the given point lies in or on the envelope.
Tests if the given point lies in or on the envelope.
Note that this is not the same definition as the SFS contains, which would exclude the envelope boundary.
- p
the point which this
Envelopeis being checked for containing returntrueif the point lies in the interior or on the boundary of thisEnvelope.
- See also
#covers(Coordinate)
- def contains(other: Envelope): Boolean
Tests if the
Envelope otherlies wholely inside thisEnvelope(inclusive of the boundary).Tests if the
Envelope otherlies wholely inside thisEnvelope(inclusive of the boundary).Note that this is not the same definition as the SFS contains, which would exclude the envelope boundary.
- other
the
Envelopeto check return true ifotheris contained in thisEnvelope
- See also
#covers(Envelope)
- def copy: Envelope
Creates a copy of this envelope object.
Creates a copy of this envelope object.
return a copy of this envelope
- def covers(other: Envelope): Boolean
Tests if the
Envelope otherlies wholely inside thisEnvelope(inclusive of the boundary).Tests if the
Envelope otherlies wholely inside thisEnvelope(inclusive of the boundary).- other
the
Envelopeto check return true if thisEnvelopecovers theother
- def covers(p: Coordinate): Boolean
Tests if the given point lies in or on the envelope.
Tests if the given point lies in or on the envelope.
- p
the point which this
Envelopeis being checked for containing returntrueif the point lies in the interior or on the boundary of thisEnvelope.
- def covers(x: Double, y: Double): Boolean
Tests if the given point lies in or on the envelope.
Tests if the given point lies in or on the envelope.
- x
the x-coordinate of the point which this
Envelopeis being checked for containing- y
the y-coordinate of the point which this
Envelopeis being checked for containing returntrueif(x, y)lies in the interior or on the boundary of thisEnvelope.
- def disjoint(other: Envelope): Boolean
Tests if the region defined by
otheris disjoint from the region of thisEnvelope.Tests if the region defined by
otheris disjoint from the region of thisEnvelope.- other
the
Envelopebeing checked for disjointness returntrueif theEnvelopes are disjoint
- See also
#intersects(Envelope)
- def distance(env: Envelope): Double
Computes the distance between this and another
Envelope.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. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(other: Any): Boolean
- Definition Classes
- Envelope → AnyRef → Any
- def expandBy(deltaX: Double, deltaY: Double): Unit
Expands this envelope by a given distance in all directions.
Expands this envelope by a given distance in all directions. Both positive and negative distances are supported.
- deltaX
the distance to expand the envelope along the the X axis
- deltaY
the distance to expand the envelope along the the Y axis
- def expandBy(distance: Double): Unit
Expands this envelope by a given distance in all directions.
Expands this envelope by a given distance in all directions. Both positive and negative distances are supported.
- distance
the distance to expand the envelope
- def expandToInclude(other: Envelope): Unit
Enlarges this
Envelopeso that it contains theotherEnvelope.Enlarges this
Envelopeso that it contains theotherEnvelope. Has no effect ifotheris wholly on or within the envelope.- other
the
Envelopeto expand to include
- def expandToInclude(x: Double, y: Double): Unit
Enlarges this
Envelopeso that it contains the given point.Enlarges this
Envelopeso that it contains the given point. Has no effect if the point is already on or within the envelope.- x
the value to lower the minimum x to or to raise the maximum x to
- y
the value to lower the minimum y to or to raise the maximum y to
- def expandToInclude(p: Coordinate): Unit
Enlarges this
Envelopeso that it contains the given {link Coordinate}.Enlarges this
Envelopeso that it contains the given {link Coordinate}. Has no effect if the point is already on or within the envelope.- p
the Coordinate to expand to include
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def getArea: Double
Gets the area of this envelope.
Gets the area of this envelope.
return the area of the envelope return 0.0 if the envelope is null
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getDiameter: Double
Gets the length of the diameter (diagonal) of the envelope.
Gets the length of the diameter (diagonal) of the envelope.
return the diameter length
- def getHeight: Double
Returns the difference between the maximum and minimum y values.
Returns the difference between the maximum and minimum y values.
return max y - min y, or 0 if this is a null
Envelope - def getMaxX: Double
Returns the
Envelopes maximum x-value.Returns the
Envelopes maximum x-value. min x > max x indicates that this is a nullEnvelope.return the maximum x-coordinate
- def getMaxY: Double
Returns the
Envelopes maximum y-value.Returns the
Envelopes maximum y-value. min y > max y indicates that this is a nullEnvelope.return the maximum y-coordinate
- def getMinX: Double
Returns the
Envelopes minimum x-value.Returns the
Envelopes minimum x-value. min x > max x indicates that this is a nullEnvelope.return the minimum x-coordinate
- def getMinY: Double
Returns the
Envelopes minimum y-value.Returns the
Envelopes minimum y-value. min y > max y indicates that this is a nullEnvelope.return the minimum y-coordinate
- def getWidth: Double
Returns the difference between the maximum and minimum x values.
Returns the difference between the maximum and minimum x values.
return max x - min x, or 0 if this is a null
Envelope - def hashCode(): Int
- Definition Classes
- Envelope → AnyRef → Any
- def init(env: Envelope): Unit
Initialize an
Envelopefrom an existing Envelope.Initialize an
Envelopefrom an existing Envelope.- env
the Envelope to initialize from
- def init(p: Coordinate): Unit
Initialize an
Envelopeto a region defined by a single Coordinate.Initialize an
Envelopeto a region defined by a single Coordinate.- p
the coordinate
- def init(p1: Coordinate, p2: Coordinate): Unit
Initialize an
Envelopeto a region defined by two Coordinates.Initialize an
Envelopeto a region defined by two Coordinates.- p1
the first Coordinate
- p2
the second Coordinate
- def init(x1: Double, x2: Double, y1: Double, y2: Double): Unit
Initialize an
Envelopefor a region defined by maximum and minimum values.Initialize an
Envelopefor a region defined by maximum and minimum values.- x1
the first x-value
- x2
the second x-value
- y1
the first y-value
- y2
the second y-value
- def init(): Unit
Initialize to a null
Envelope. - def intersection(env: Envelope): Envelope
Computes the intersection of two {link Envelope}s.
Computes the intersection of two {link Envelope}s.
- env
the envelope to intersect with return a new Envelope representing the intersection of the envelopes (this will be the null envelope if either argument is null, or they do not intersect
- def intersects(x: Double, y: Double): Boolean
Check if the point
(x, y)intersects (lies inside) the region of thisEnvelope.Check if the point
(x, y)intersects (lies inside) the region of thisEnvelope.- x
the x-ordinate of the point
- y
the y-ordinate of the point return
trueif the point overlaps thisEnvelope
- def intersects(p: Coordinate): Boolean
Tests if the point
pintersects (lies inside) the region of thisEnvelope.Tests if the point
pintersects (lies inside) the region of thisEnvelope.- p
the
Coordinateto be tested returntrueif the point intersects thisEnvelope
- def intersects(a: Coordinate, b: Coordinate): Boolean
Tests if the extent defined by two extremal points intersects the extent of this
Envelope.Tests if the extent defined by two extremal points intersects the extent of this
Envelope.- a
a point
- b
another point return
trueif the extents intersect
- def intersects(other: Envelope): Boolean
Tests if the region defined by
otherintersects the region of thisEnvelope.Tests if the region defined by
otherintersects the region of thisEnvelope.- other
the
Envelopewhich thisEnvelopeis being checked for intersecting returntrueif theEnvelopes intersect
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isNull: Boolean
Returns
trueif thisEnvelopeis a "null" envelope.Returns
trueif thisEnvelopeis a "null" envelope.return
trueif thisEnvelopeis uninitialized or is the envelope of the empty geometry. - def maxExtent: Double
Gets the maximum extent of this envelope across both dimensions.
Gets the maximum extent of this envelope across both dimensions.
return the maximum extent of this envelope
- def minExtent: Double
Gets the minimum extent of this envelope across both dimensions.
Gets the minimum extent of this envelope across both dimensions.
return the minimum extent of this envelope
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def overlaps(x: Double, y: Double): Boolean
- def setToNull(): Unit
Makes this
Envelopea "null" envelope, that is, the envelope of the empty geometry. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Envelope → AnyRef → Any
- def translate(transX: Double, transY: Double): Unit
Translates this envelope by given amounts in the X and Y direction.
Translates this envelope by given amounts in the X and Y direction.
- transX
the amount to translate along the X axis
- transY
the amount to translate along the Y axis
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def overlaps(p: Coordinate): Boolean
- Deprecated
Use #intersects instead.
- def overlaps(other: Envelope): Boolean
- Deprecated
Use #intersects instead. In the future, #overlaps may be changed to be a true overlap check; that is, whether the intersection is two-dimensional.