Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(36)  |  Call(30)  |  Derive(0)  |  Import(6)
This class contains methods to calculate bbox, etc. of metatiles.

:param grid: the grid to use for the metatiles
:param meta_size: the number of tiles a metatile consist
:type meta_size: ``(x_size, y_size)``
:param meta_buffer: the buffer size in pixel that is added to each metatile.
    the number is added to all four borders.
    this buffer may improve the handling of lables overlapping (meta)tile borders.
:type meta_buffer: pixel

src/m/a/MapProxy-1.6.0/mapproxy/seed/seeder.py   MapProxy(Download)
 
from mapproxy.config import base_config
from mapproxy.grid import MetaGrid
from mapproxy.source import SourceError
from mapproxy.config import local_base_config
        meta_size = self.tile_mgr.meta_grid.meta_size if self.tile_mgr.meta_grid else (1, 1)
        self.tiles_per_metatile = meta_size[0] * meta_size[1]
        self.grid = MetaGrid(self.tile_mgr.grid, meta_size=meta_size, meta_buffer=0)
        self.count = 0
        self.seed_progress = seed_progress or SeedProgress()

src/m/a/MapProxy-1.6.0/mapproxy/cache/tile.py   MapProxy(Download)
from contextlib import contextmanager
 
from mapproxy.grid import MetaGrid
from mapproxy.image.merge import merge_images
from mapproxy.image.tile import TileSplitter
        if meta_buffer or (meta_size and not meta_size == [1, 1]):
            if all(source.supports_meta_tiles for source in sources):
                self.meta_grid = MetaGrid(grid, meta_size=meta_size, meta_buffer=meta_buffer)
            elif any(source.supports_meta_tiles for source in sources):
                raise ValueError('meta tiling configured but not supported by all sources')

src/m/a/mapproxy-HEAD/mapproxy/seed/seeder.py   mapproxy(Download)
 
from mapproxy.config import base_config
from mapproxy.grid import MetaGrid
from mapproxy.source import SourceError
from mapproxy.config import local_base_config
        meta_size = self.tile_mgr.meta_grid.meta_size if self.tile_mgr.meta_grid else (1, 1)
        self.tiles_per_metatile = meta_size[0] * meta_size[1]
        self.grid = MetaGrid(self.tile_mgr.grid, meta_size=meta_size, meta_buffer=0)
        self.count = 0
        self.seed_progress = seed_progress or SeedProgress()

src/m/a/mapproxy-HEAD/mapproxy/cache/tile.py   mapproxy(Download)
from contextlib import contextmanager
 
from mapproxy.grid import MetaGrid
from mapproxy.image.merge import merge_images
from mapproxy.image.tile import TileSplitter
        if meta_buffer or (meta_size and not meta_size == [1, 1]):
            if all(source.supports_meta_tiles for source in sources):
                self.meta_grid = MetaGrid(grid, meta_size=meta_size, meta_buffer=meta_buffer)
            elif any(source.supports_meta_tiles for source in sources):
                raise ValueError('meta tiling configured but not supported by all sources')

src/m/a/MapProxy-1.6.0/mapproxy/test/unit/test_grid.py   MapProxy(Download)
from __future__ import division
from nose.tools import eq_, assert_almost_equal, raises
from mapproxy.grid import (
    MetaGrid,
    TileGrid,
def test_metagrid_tiles():
    mgrid = MetaGrid(grid=TileGrid(), meta_size=(2, 2))
    assert list(mgrid.meta_tile((0, 0, 0)).tile_patterns) == \
        [((0, 0, 0), (0, 0))]
    assert list(mgrid.meta_tile((0, 1, 1)).tile_patterns) == \
def test_metagrid_tiles_w_meta_size():
    mgrid = MetaGrid(grid=TileGrid(), meta_size=(4, 2))
    assert list(mgrid.meta_tile((1, 2, 2)).tile_patterns) == \
        [((0, 3, 2), (0, 0)), ((1, 3, 2), (256, 0)),
         ((2, 3, 2), (512, 0)), ((3, 3, 2), (768, 0)),
    def setup(self):
        self.mgrid = MetaGrid(grid=tile_grid('EPSG:4326'), meta_size=(2, 2), meta_buffer=10)
 
    def test_meta_bbox_level_0(self):
        eq_(self.mgrid._meta_bbox((0, 0, 0)), ((-180, -90, 180, 90), (0, 0, 0, -128)))
    def setup(self):
        self.tile_grid = tile_grid('EPSG:4326', origin='ul')
        self.mgrid = MetaGrid(grid=self.tile_grid, meta_size=(2, 2), meta_buffer=10)
 
    def test_tiles_level_0(self):

src/m/a/mapproxy-HEAD/mapproxy/test/unit/test_grid.py   mapproxy(Download)
from __future__ import division
from nose.tools import eq_, assert_almost_equal, raises
from mapproxy.grid import (
    MetaGrid,
    TileGrid,
def test_metagrid_tiles():
    mgrid = MetaGrid(grid=TileGrid(), meta_size=(2, 2))
    assert list(mgrid.meta_tile((0, 0, 0)).tile_patterns) == \
        [((0, 0, 0), (0, 0))]
    assert list(mgrid.meta_tile((0, 1, 1)).tile_patterns) == \
def test_metagrid_tiles_w_meta_size():
    mgrid = MetaGrid(grid=TileGrid(), meta_size=(4, 2))
    assert list(mgrid.meta_tile((1, 2, 2)).tile_patterns) == \
        [((0, 3, 2), (0, 0)), ((1, 3, 2), (256, 0)),
         ((2, 3, 2), (512, 0)), ((3, 3, 2), (768, 0)),
    def setup(self):
        self.mgrid = MetaGrid(grid=tile_grid('EPSG:4326'), meta_size=(2, 2), meta_buffer=10)
 
    def test_meta_bbox_level_0(self):
        eq_(self.mgrid._meta_bbox((0, 0, 0)), ((-180, -90, 180, 90), (0, 0, 0, -128)))
    def setup(self):
        self.tile_grid = tile_grid('EPSG:4326', origin='ul')
        self.mgrid = MetaGrid(grid=self.tile_grid, meta_size=(2, 2), meta_buffer=10)
 
    def test_tiles_level_0(self):