data.utils.bbox =============== .. py:module:: data.utils.bbox Classes ------- .. autoapisummary:: data.utils.bbox.BoundingBox Module Contents --------------- .. py:class:: BoundingBox(*, north, west, south, east, check=True) Represent a geographic bounding box. :param north: Northern latitude (degrees) :type north: :class:`number` :param west: Western longitude (degrees) :type west: :class:`number` :param south: Southern latitude (degrees) :type south: :class:`number` :param east: Eastern longitude (degrees) :type east: :class:`number` .. py:method:: add_margins(margins) Generates a new :obj:`BoundingBox` object with adjusted ``margins``. :param margins: The margin to be added to each side. When it is a ``str`` must specify a percentage in terms of the current size like "50%", while a ``number`` must specify degrees. :type margins: :class:`str` or :class:`number` :returns: New object with adjusted ``margins``. :rtype: :obj:`BoundingBox` .. py:method:: as_dict() .. py:method:: as_list() .. py:method:: as_tuple() .. py:method:: from_geopandas(gdf) :classmethod: .. py:property:: height Returns the North-South size (degrees) :type: number .. py:method:: make_invalid() :classmethod: .. py:method:: union(bboxes) :classmethod: Generates the union of a list of :obj:`BoundingBox` objects. :param bboxes: Input :obj:`BoundingBox` objects. :type bboxes: :class:`list` :returns: Union of input objects. :rtype: :obj:`BoundingBox` .. seealso:: :obj:`union_with` .. py:method:: union_with(other) Generates the union of the current object and ``other``. :param other: The object to make the union with. :type other: :obj:`BoundingBox` :returns: New object containing the union. :rtype: :obj:`BoundingBox` .. seealso:: :obj:`union` .. py:property:: width Returns the East-West size (degrees) :type: number