Package mapproxy :: Package wms :: Module cache :: Class WMSTileSource
[hide private]
[frames] | no frames]

Class WMSTileSource

source code

           object --+    
                    |    
core.cache.TileSource --+
                        |
                       WMSTileSource

This TileSource retrieves new tiles from a WMS server.

This class is able to request maps that are larger than one tile and split the large map into multiple tiles. The meta_size defines how many tiles should be generated per request.

Instance Methods [hide private]
 
__init__(self, grid, clients, format=None, meta_buffer=0, meta_size=(2, 2))
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_has_transparent_sources(self) source code
 
id(self)
Returns a unique but constant id of this TileSource used for locking.
source code
 
lock_filename(self, tile)
Returns a lock for one fixed tile per metatile.
source code
list of Tiles
create_tile(self, tile, tile_map)
Retrieve the metatile that contains the requested tile and save all tiles.
source code
 
_get_meta_tile(self, tile) source code
 
_split_meta_tile(self, meta_tile, tiles, tile_map) source code
 
__repr__(self)
repr(x)
source code

Inherited from core.cache.TileSource: tile_lock

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, grid, clients, format=None, meta_buffer=0, meta_size=(2, 2))
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Parameters:
  • grid - the associated grid
  • clients ([mapproxy.wms.client.WMSClient,...]) - WMSClient for each distinct WMS source
  • format - internal image format, if not set use format from first WMS client
  • meta_size ((x_size, y_size)) - the number of tiles to get per request
  • meta_buffer (pixel) - the buffer size in pixel that is added to each grid. the number is added to all four borders. this buffer may improve the handling of labels overlapping (meta)tile borders.
Overrides: object.__init__

id(self)

source code 
Returns a unique but constant id of this TileSource used for locking.
Overrides: core.cache.TileSource.id
(inherited documentation)

lock_filename(self, tile)

source code 
Returns a lock for one fixed tile per metatile.
Overrides: core.cache.TileSource.lock_filename

create_tile(self, tile, tile_map)

source code 
Retrieve the metatile that contains the requested tile and save all tiles.
Returns: list of Tiles
Overrides: core.cache.TileSource.create_tile

__repr__(self)
(Representation operator)

source code 
repr(x)
Overrides: object.__repr__
(inherited documentation)