case class Extent(xmin: Double, ymin: Double, xmax: Double, ymax: Double) extends Product with Serializable
A rectangular region of geographic space
- xmin
The minimum x coordinate
- ymin
The minimum y coordinate
- xmax
The maximum x coordinate
- ymax
The maximum y coordinate
- Alphabetic
- By Inheritance
- Extent
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
def
&(other: Extent): Option[Extent]
Create an optional extent which represents the intersection with a provided extent
-
def
area: Double
The area of this extent
- def buffer(width: Double, height: Double): Extent
-
def
buffer(d: Double): Extent
Create a new extent using a buffer around this extent
-
def
center: org.locationtech.jts.geom.Point
The centroid of this extent
-
def
combine(other: Extent): Extent
Return the smallest extent that contains this extent and the provided extent.
-
def
compare(other: Extent): Int
Orders two bounding boxes by their (geographically) lower-left corner.
Orders two bounding boxes by their (geographically) lower-left corner. The bounding box that is further south (or west in the case of a tie) comes first.
If the lower-left corners are the same, the upper-right corners are compared. This is mostly to assure that 0 is only returned when the extents are equal.
Return type signals:
-1 this bounding box comes first 0 the bounding boxes have the same lower-left corner 1 the other bounding box comes first
-
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
This is the same definition as the SFS contains, which is unlike the JTS Envelope.contains, which would include the envelope boundary.
-
def
contains(p: org.locationtech.jts.geom.Point): Boolean
Tests if the given point lies in or on the envelope.
Tests if the given point lies in or on the envelope.
- Note
This is the same definition as the SFS contains, which is unlike the JTS Envelope.contains, which would include the envelope boundary.
-
def
contains(other: Extent): Boolean
Empty extent contains nothing, though non empty extent contains iteslf
-
def
covers(x: Double, y: Double): Boolean
Predicate for whether this extent covers a point
-
def
covers(p: org.locationtech.jts.geom.Point): Boolean
Predicate for whether this extent covers a point
-
def
covers(other: Extent): Boolean
Predicate for whether this extent covers another
-
def
distance(other: Extent): Double
Distance from another extent
-
def
equals(o: Any): Boolean
Equality check against this extent
Equality check against this extent
- Definition Classes
- Extent → Equals → AnyRef → Any
- Note
only returns true given another extent
-
def
expandBy(deltaX: Double, deltaY: Double): Extent
Return an extent of this extent expanded by the provided x and y distances
-
def
expandBy(distance: Double): Extent
Return an extent of this extent expanded by the provided distance on all sides
-
def
expandToInclude(x: Double, y: Double): Extent
Return the smallest extent that contains this extent and the provided point.
-
def
expandToInclude(p: org.locationtech.jts.geom.Point): Extent
Return the smallest extent that contains this extent and the provided point.
-
def
expandToInclude(other: Extent): Extent
Return the smallest extent that contains this extent and the provided extent.
-
def
hashCode(): Int
- Definition Classes
- Extent → AnyRef → Any
- val height: Double
-
def
interiorIntersects(other: Extent): Boolean
Predicate for whether this extent intersects the interior of another
-
def
intersection(other: Extent): Option[Extent]
Create an optional extent which represents the intersection with a provided extent
-
def
intersects(x: Double, y: Double): Boolean
Predicate for whether this extent intersects the specified point
-
def
intersects(p: org.locationtech.jts.geom.Point): Boolean
Predicate for whether this extent intersects another
-
def
intersects(other: Extent): Boolean
Predicate for whether this extent intersects another
-
def
isEmpty: Boolean
Predicate for whether this extent has 0 area
- def jtsEnvelope: Envelope
- def max: org.locationtech.jts.geom.Point
-
def
maxExtent: Double
The maximum between the height and width of this extent
- def min: org.locationtech.jts.geom.Point
-
def
minExtent: Double
The minimum between the height and width of this extent
-
def
northEast: org.locationtech.jts.geom.Point
The NE corner (xmax, ymax) as a Point.
-
def
northWest: org.locationtech.jts.geom.Point
The NW corner (xmin, ymax) as a Point.
-
def
southEast: org.locationtech.jts.geom.Point
The SE corner (xmax, ymin) as a Point.
-
def
southWest: org.locationtech.jts.geom.Point
The SW corner (xmin, ymin) as a Point.
-
def
toPolygon(): org.locationtech.jts.geom.Polygon
Return this extent as a polygon
-
def
toString(): String
- Definition Classes
- Extent → AnyRef → Any
-
def
translate(deltaX: Double, deltaY: Double): Extent
Return this extent moved x and y amounts
- val width: Double
- val xmax: Double
- val xmin: Double
- val ymax: Double
- val ymin: Double