RAVE
Lib.rave_tile_registry Namespace Reference

Classes

class  tiledef
 

Functions

 has_tiled_area (aid)
 Returns if the area id is registered in the tile registry or not.
 
 get_tiled_areas (a)
 Get all the tiled areas belonging to the specified area.
 
 generate_tiles_for_area (aid, tiles)
 Creates the tiles for the specified area with the specified number of tiles.
 
 create_tile_definition_for_area (aid, tiles)
 Creates an appropriate tile registry definition for the specified area with the specified number of tiles.
 
 init ()
 Initializes the registry by reading the xml file with the plugin definitions.
 

Variables

 logger = rave_pgf_logger.create_logger()
 
bool _initialized = False
 
dict _registry = {}
 
 my_area_registry = area_registry.area_registry()
 

Detailed Description

Copyright (C) 2014- Swedish Meteorological and Hydrological Institute (SMHI)

This file is part of RAVE.

RAVE is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

RAVE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with RAVE.  If not, see <http://www.gnu.org/licenses/>.

Function Documentation

◆ create_tile_definition_for_area()

Lib.rave_tile_registry.create_tile_definition_for_area ( aid,
tiles )

Creates an appropriate tile registry definition for the specified area with the specified number of tiles.

The tiles should be a tuple containing (nr of x-tiles, nr of y-tiles).

Parameters
athe name of the area as defined in the area registry
tilesa tuple defining the tile definition (nr of x-tiles, nr of y-tiles)
Returns
the tile definition

◆ generate_tiles_for_area()

Lib.rave_tile_registry.generate_tiles_for_area ( aid,
tiles )

Creates the tiles for the specified area with the specified number of tiles.

The tiles should be a tuple containing (nr of x-tiles, nr of y-tiles).

Parameters
athe name of the area as defined in the area registry
tilesa tuple defining the tile definition (nr of x-tiles, nr of y-tiles)
Returns
the tile definition

◆ get_tiled_areas()

Lib.rave_tile_registry.get_tiled_areas ( a)

Get all the tiled areas belonging to the specified area.

The area has to reside in the area_registry in order for this area to be registered.

Parameters
athe AreaCore (_area) instance
Returns
: a list of tiled area definitions

◆ has_tiled_area()

Lib.rave_tile_registry.has_tiled_area ( aid)

Returns if the area id is registered in the tile registry or not.

Parameters
aidthe area identifier (e.g. swegmaps_2000)
Returns
if the area id has got a tile definition or not

◆ init()

Lib.rave_tile_registry.init ( )

Initializes the registry by reading the xml file with the plugin definitions.