shapely.box#
- box(xmin, ymin, xmax, ymax, ccw=True, **kwargs)#
Create box polygons.
- Parameters:
- xminfloat or array_like
Float or array of minimum x coordinates.
- yminfloat or array_like
Float or array of minimum y coordinates.
- xmaxfloat or array_like
Float or array of maximum x coordinates.
- ymaxfloat or array_like
Float or array of maximum y coordinates.
- ccwbool, default True
If True, box will be created in counterclockwise direction starting from bottom right coordinate (xmax, ymin). If False, box will be created in clockwise direction starting from bottom left coordinate (xmin, ymin).
- **kwargs
See NumPy ufunc docs for other keyword arguments.
Notes
Deprecated since version 2.1.0: A deprecation warning is shown if
ccwis specified as a positional argument. This will need to be specified as a keyword argument in a future release.Examples
>>> import shapely >>> shapely.box(0, 0, 1, 1) <POLYGON ((1 0, 1 1, 0 1, 0 0, 1 0))> >>> shapely.box(0, 0, 1, 1, ccw=False) <POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0))>