Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, client, tilelayout, flags=0, exptime=0, **kwargs):
TileStore.__init__(self, **kwargs)
self.client = client
self.tilelayout = tilelayout
self.flags = flags
self.exptime = exptime
def __init__(self, tilelayout, **kwargs):
TileStore.__init__(self, **kwargs)
assert tilelayout is not None
self.tilelayout = tilelayout
def __init__(self, tilestore, filters, **kwargs):
TileStore.__init__(self, **kwargs)
self.tilestore = tilestore
self.filters = filters
def __init__(self, bucket, tilelayout, dry_run=False, s3_host=None, cache_control=None, **kwargs):
self._s3_host = s3_host
self._client = None
self.bucket = bucket
self.tilelayout = tilelayout
self.dry_run = dry_run
self.cache_control = cache_control
TileStore.__init__(self, **kwargs)
def __init__(self, queue, on_empty=maybe_stop, **kwargs):
TileStore.__init__(self, **kwargs)
self.queue = queue
self.on_empty = on_empty
def __init__(self, z, bounds, file=None, **kwargs):
TileStore.__init__(self, **kwargs)
self.z = z
self.xbounds, self.ybounds = bounds
self.width = self.xbounds.stop - self.xbounds.start
self.height = self.ybounds.stop - self.ybounds.start
if "bounding_pyramid" not in kwargs:
self.bounding_pyramid = BoundingPyramid({self.z: (self.xbounds, self.ybounds)})
if file:
self.image = PIL.Image.open(file)
assert self.image.mode == "1"
assert self.image.size == (self.width, self.height)
else:
self.image = PIL.Image.new("1", (self.width, self.height))
self.pixels = self.image.load()
def __init__(self, format, tile_size=256, border=0, **kwargs):
self.format = format
self.tile_size = tile_size
self.border = border
TileStore.__init__(self, **kwargs)
def __init__(self, tiles=None, **kwargs):
self.tiles = tiles or {}
TileStore.__init__(self, **kwargs)
:param tilegrid: the tilegrid.
:param mapfile: the file used to render the tiles.
:param buffer_size: the image buffer size default is 128.
:param output_format: the output format,
possible values 'jpeg', 'png', 'png256', 'grid',
default is 'png256'
:param layers: the layers and fields used in the grid generation,
example: { 'my_layer': ['my_first_field', 'my_segonf_field']},
default is {}.
:param **kwargs: for extended class.
"""
if layers_fields is None:
layers_fields = {}
TileStore.__init__(self, **kwargs)
self.tilegrid = tilegrid
self.buffer = image_buffer
self.output_format = output_format
self.resolution = resolution
self.layers_fields = layers_fields
self.drop_empty_utfgrid = drop_empty_utfgrid
self.mapnik = mapnik.Map(tilegrid.tile_size, tilegrid.tile_size)
mapnik.load_map(self.mapnik, mapfile, True)
self.mapnik.buffer_size = data_buffer
if proj4_literal is not None:
self.mapnik.srs = proj4_literal