The Envelope object is a C structure that contains the minimum and maximum X, Y coordinates for a rectangle bounding box. The naming of the variables is compatible with the OGR Envelope structure.
Attributes
| Attribute | Type | Description |
|---|
| min_x | float | Return the value of the minimum X coordinate. |
| min_y | float | Return the value of the minimum Y coordinate. |
| max_x | float | Return the value of the maximum X coordinate. |
| max_y | float | Return the value of the maximum Y coordinate. |
| ur | tuple | Return the upper-right coordinate. |
| ll | tuple | Return the lower-left coordinate. |
| tuple | tuple | Return a tuple representing the envelope. |
| wkt | string | Return WKT representing a Polygon for this envelope. |
Constructor
Signature
def Envelope(
*args: Any
) - > null
Parameters
| Name | Type | Description |
|---|
| *args | Any | Variable length argument list that can contain an OGREnvelope, a 4-item sequence, or 4 separate numeric values. |
Methods
expand_to_include()
@classmethod
def expand_to_include(
*args: any
)
Modify the envelope to expand to include the boundaries of the passed-in 2-tuple (a point), 4-tuple (an extent) or envelope.
Parameters
| Name | Type | Description |
|---|
| *args | any | A point (2-tuple), an extent (4-tuple), an Envelope object, or individual x/y coordinates to be merged into the current bounding box |
min_x()
@classmethod
def min_x() - > float
Return the value of the minimum X coordinate.
Returns
| Type | Description |
|---|
float | The westernmost X coordinate of the bounding box |
min_y()
@classmethod
def min_y() - > float
Return the value of the minimum Y coordinate.
Returns
| Type | Description |
|---|
float | The southernmost Y coordinate of the bounding box |
max_x()
@classmethod
def max_x() - > float
Return the value of the maximum X coordinate.
Returns
| Type | Description |
|---|
float | The easternmost X coordinate of the bounding box |
max_y()
@classmethod
def max_y() - > float
Return the value of the maximum Y coordinate.
Returns
| Type | Description |
|---|
float | The northernmost Y coordinate of the bounding box |
ur()
@classmethod
def ur() - > tuple
Return the upper-right coordinate.
Returns
| Type | Description |
|---|
tuple | A 2-tuple containing the (max_x, max_y) coordinates |
ll()
@classmethod
def ll() - > tuple
Return the lower-left coordinate.
Returns
| Type | Description |
|---|
tuple | A 2-tuple containing the (min_x, min_y) coordinates |
tuple()
@classmethod
def tuple() - > tuple
Return a tuple representing the envelope.
Returns
| Type | Description |
|---|
tuple | A 4-tuple of the envelope boundaries in (min_x, min_y, max_x, max_y) order |
wkt()
@classmethod
def wkt() - > string
Return WKT representing a Polygon for this envelope.
Returns
| Type | Description |
|---|
string | A Well-Known Text string defining a closed rectangular POLYGON based on the envelope boundaries |