Ejemplo n.º 1
0
 def get_row_slices(self):
     for row in self.get_tile_rows():
         top = self.origin_offset + self.padding \
             - (row * self.meters_per_tile)
         bottom = self.origin_offset - self.padding \
             - ((row + 1) * self.meters_per_tile)
         clip = _box(self._minx, top, self._maxx, bottom)
         clipped = clip.intersection(self.polygon)
         yield (row, clipped)
 def get_row_slices(self):
     for row in self.get_tile_rows():
         top = self.origin_offset + self.padding \
             - (row * self.meters_per_tile)
         bottom = self.origin_offset - self.padding \
             - ((row + 1) * self.meters_per_tile)
         clip = _box(self._minx, top, self._maxx, bottom)
         clipped = clip.intersection(self.polygon)
         yield (row, clipped)
Ejemplo n.º 3
0
    def get_tile_slices(self):
        for row, polygon in self.get_row_slices():
            for column in self.get_tile_columns():
                left = column * self.meters_per_tile - self.padding \
                    - self.origin_offset
                right = (column + 1) * self.meters_per_tile + self.padding \
                    - self.origin_offset
                clip = _box(left, self._miny, right, self._maxy)

                clipped = clip.intersection(polygon)

                if clipped:
                    wkb = _dump_polygon_wkb(clipped)
                    yield (row, column, wkb)
    def get_tile_slices(self):
        for row, polygon in self.get_row_slices():
            for column in self.get_tile_columns():
                left = column * self.meters_per_tile - self.padding \
                    - self.origin_offset
                right = (column + 1) * self.meters_per_tile + self.padding \
                    - self.origin_offset
                clip = _box(left, self._miny, right, self._maxy)

                clipped = clip.intersection(polygon)

                if clipped:
                    wkb = _dump_polygon_wkb(clipped)
                    yield (row, column, wkb)