Example #1
0
 def __add__(self, other):
     if not isinstance(other, MapExtent):
         raise NotImplemented
     if other.is_default:
         return self
     if self.is_default:
         return other
     return MapExtent(merge_bbox(self.llbbox, other.llbbox), SRS(4326))
Example #2
0
 def __add__(self, other):
     if not isinstance(other, MapExtent):
         raise NotImplemented
     if other.is_default:
         return self
     if self.is_default:
         return other
     return MapExtent(merge_bbox(self.llbbox, other.llbbox), SRS(4326))
Example #3
0
    def _tiles_bbox(self, tiles):
        """
        Returns the bbox of multiple tiles.
        The tiles should be ordered row-wise, bottom-up.

        :param tiles: ordered list of tiles
        :returns: the bbox of all tiles
        """
        ll_bbox = self.tile_bbox(tiles[0])
        ur_bbox = self.tile_bbox(tiles[-1])
        return merge_bbox(ll_bbox, ur_bbox)
Example #4
0
    def _tiles_bbox(self, tiles):
        """
        Returns the bbox of multiple tiles.
        The tiles should be ordered row-wise, bottom-up.

        :param tiles: ordered list of tiles
        :returns: the bbox of all tiles
        """
        ll_bbox = self.tile_bbox(tiles[0])
        ur_bbox = self.tile_bbox(tiles[-1])
        return merge_bbox(ll_bbox, ur_bbox)