gemgis.vector.create_bbox
gemgis.vector.create_bbox#
- gemgis.vector.create_bbox(extent: List[Union[int, float]]) shapely.geometry.polygon.Polygon #
Creating a rectangular polygon from the provided bounding box values, with counter-clockwise order by default.
- Parameters
extent (List[Union[int, float]]) – List of minx, maxx, miny, maxy values, e.g.
extent=[0, 972, 0, 1069]
- Returns
bbox – Rectangular polygon based on extent
- Return type
shapely.geometry.polygon.Polygon
New in version 1.0.x.
Example
>>> # Loading Libraries >>> import gemgis as gg
>>> # Defining extent >>> extent = [0, 972, 0, 1069]
>>> # Creating bounding box >>> bbox = gg.vector.create_bbox(extent=extent) >>> bbox.wkt 'POLYGON ((972 0, 972 1069, 0 1069, 0 0, 972 0))'