:tocdepth: 3 :py:mod:`gws.gis.bounds` ======================== .. py:module:: gws.gis.bounds .. autoapi-nested-parse:: Utilities to work with Bounds objects. **Source code:** :source:`gws.gis.bounds` Package Contents ---------------- .. py:function:: buffer(b: gws.Bounds, buf_size: int) -> gws.Bounds Creates a bounds object with buffer to another bounds object. :param b: A Bounds object. :param buf_size: Buffer between b and the output. If buf is positive the returned bounds object will be bigger. :returns: A bounds object. .. py:function:: copy(b: gws.Bounds) -> gws.Bounds Copies and creates a new bounds object. .. py:function:: from_extent(extent: gws.Extent, crs: gws.Crs, always_xy=False) -> gws.Bounds Create Bounds from an Extent. :param extent: An Extent. :param crs: A Crs object. :param always_xy: If ``True``, coordinates are assumed to be in the XY (lon/lat) order :returns: A Bounds object. .. py:function:: from_request_bbox(bbox: str, default_crs: gws.Crs = None, always_xy=False) -> Optional[gws.Bounds] Create Bounds from a KVP BBOX param. See OGC 06-121r9, 10.2.3 Bounding box KVP encoding. :param bbox: A string with four coordinates, optionally followed by a CRS spec. :param default_crs: Default Crs. :param always_xy: If ``True``, coordinates are assumed to be in the XY (lon/lat) order :returns: A Bounds object. .. py:function:: intersect(b1: gws.Bounds, b2: gws.Bounds) -> bool Returns ``True`` if the bounds are intersecting, otherwise ``False``. .. py:function:: transform(b: gws.Bounds, crs_to: gws.Crs) -> gws.Bounds Transforms the bounds object to a different crs. :param b: Bounds object. :param crs_to: Output crs. :returns: A bounds object. .. py:function:: union(bs: list[gws.Bounds]) -> gws.Bounds Creates the smallest bound that contains all the given bounds. :param bs: Bounds. :returns: A Bounds object. Its crs is the same as the crs of the first object in bs. .. py:function:: wgs_extent(b: gws.Bounds) -> Optional[gws.Extent]