Extent Class
Summary: A two-dimensional spatial bounding box.
Module: aspose.gis
Full Name: aspose.gis.Extent
Aspose.PSD Version: 25.9.0
Constructors
| Name | Description |
|---|---|
| Extent() | Creates new instance. |
| Extent(srs) | Creates new instance. |
| Extent(x_min, y_min, x_max, y_max, srs) | Creates new instance. |
Properties
| Name | Type | Access | Description |
|---|---|---|---|
| center | IPoint | r | Center of the extent. |
| height | double | r | Height of the extent. |
| is_valid | bool | r | Determines whether this Extent is valid. |
| spatial_reference_system | SpatialReferenceSystem | r/w | SpatialReferenceSystem associated with this extent. Can be Use Aspose.Gis.Extent.GetTransformed(Aspose.Gis.SpatialReferencing.SpatialReferenceSystem) in order to transform extent between difference spatial reference systems. |
| width | double | r | Width of the extent. |
| x_max | double | r/w | Maximum value of the X coordinate. |
| x_min | double | r/w | Minimum value of the X coordinate. |
| y_max | double | r/w | Maximum value of the Y coordinate. |
| y_min | double | r/w | Minimum value of the Y coordinate. |
Methods
| Name | Description |
|---|---|
| clone() | Clones this instance. |
| contains(extent) | Determines whether this extent contains the argument. |
| contains(geometry) | Determines whether this extent contains the argument. |
| contains(x, y) | Determines whether this extent contains a coordinate defined by the arguments. |
| get_transformed(target_srs) | Returns new extent in specified SpatialReferenceSystem that contains this extent. |
| grow(extent) | Grows this extent so it includes the argument. |
| grow(x, y) | Grows this extent so it includes the specified point. |
| grow_x(value) | Grows this extent along the X axis so it includes the specified value. |
| grow_y(value) | Grows this extent along the Y axis so it includes the specified value. |
| intersects(extent) | Determines whether this extent intersects with the argument. |
| intersects(geometry) | Determines whether this extent intersects with the argument. |
| normalize() | Swaps Extent.x_min with Extent.x_max if Extent.width is negative and Extent.y_min with Extent.y_max if Extent.height is negative. |
| to_polygon() | Converts this extent to a rectangular polygon that represents it. |
Constructor: Extent()
Extent()
Creates new instance.
Constructor: Extent(srs)
Extent(srs)
Creates new instance.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| srs | SpatialReferenceSystem | SpatialReferenceSystem associated with this extent. Can be |
Constructor: Extent(x_min, y_min, x_max, y_max, srs)
Extent(x_min, y_min, x_max, y_max, srs)
Creates new instance.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| x_min | double | Minimum X value. |
| y_min | double | Minimum Y value. |
| x_max | double | Maximum X value. |
| y_max | double | Maximum Y value. |
| srs | SpatialReferenceSystem | SpatialReferenceSystem associated with this extent. Can be |
Method: clone()
clone()
Clones this instance.
Returns
| Type | Description |
|---|---|
| Extent | Clone of this instance. |
Method: contains(extent)
contains(extent)
Determines whether this extent contains the argument.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| extent | Extent | Another extent. |
Returns
| Type | Description |
|---|---|
| bool | Value, indicating whether this extent contains the argument. |
Method: contains(geometry)
contains(geometry)
Determines whether this extent contains the argument.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| geometry | IGeometry | A geometry to test for containment. |
Returns
| Type | Description |
|---|---|
| bool | Value, indicating whether this extent contains the argument. |
Method: contains(x, y)
contains(x, y)
Determines whether this extent contains a coordinate defined by the arguments.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| x | double | X of the coordinate. |
| y | double | Y of the coordinate. |
Returns
| Type | Description |
|---|---|
| bool | Value, indicating whether coordinate is inside bounding box. |
Method: get_transformed(target_srs)
get_transformed(target_srs)
Returns new extent in specified SpatialReferenceSystem that contains this extent.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| target_srs | SpatialReferenceSystem | SpatialReferenceSystem to transform to. |
Returns
| Type | Description |
|---|---|
| Extent | The result of transformation this extent to the specified SRS. |
Method: grow(extent)
grow(extent)
Grows this extent so it includes the argument.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| extent | Extent | Other extent. |
Method: grow(x, y)
grow(x, y)
Grows this extent so it includes the specified point.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| x | double | X coordinate to include. |
| y | double | Y coordinate to include. |
Method: grow_x(value)
grow_x(value)
Grows this extent along the X axis so it includes the specified value.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | double | Value to include. |
Method: grow_y(value)
grow_y(value)
Grows this extent along the Y axis so it includes the specified value.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | double | Value to include. |
Method: intersects(extent)
intersects(extent)
Determines whether this extent intersects with the argument.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| extent | Extent | Another extent. |
Returns
| Type | Description |
|---|---|
| bool | Value, indicating whether this extent intersects with the argument. |
Method: intersects(geometry)
intersects(geometry)
Determines whether this extent intersects with the argument.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| geometry | IGeometry | A geometry to test for intersection |
Returns
| Type | Description |
|---|---|
| bool | Value, indicating whether this extent intersects with the argument. |
Method: to_polygon()
to_polygon()
Converts this extent to a rectangular polygon that represents it.
Returns
| Type | Description |
|---|---|
| Polygon | A rectangular Polygon that represents this extent. For invalid extents an empty polygon is returned. |