holoviews.element.tiles module#

class holoviews.element.tiles.Tiles(data=None, kdims=None, vdims=None, **params)[source]#

Bases: Element2D

The Tiles element represents tile sources, specified as URL containing different template variables or xyzservices.TileProvider. These variables correspond to three different formats for specifying the spatial location and zoom level of the requested tiles:

  • Web mapping tiles sources containing {x}, {y}, and {z} variables

  • Bounding box tile sources containing {XMIN}, {XMAX}, {YMIN}, {YMAX} variables

  • Quadkey tile sources containing a {Q} variable

Tiles are defined in a pseudo-Mercator projection (EPSG:3857) defined as eastings and northings. Any data overlaid on a tile source therefore has to be defined in those coordinates or be projected (e.g. using GeoViews).

Parameter Definitions


Parameters inherited from:

group = String(constant=True, default='Tiles', label='Group')

A string describing the data wrapped by the object.

kdims = List(bounds=(2, 2), constant=True, default=[Dimension('x'), Dimension('y')], label='Kdims')

The key dimensions of a geometry represent the x- and y- coordinates in a 2D space.

dimension_values(dimension, expanded=True, flat=True)[source]#

Return the values along the requested dimension.

Parameters#

dimension

The dimension to return values for

expandedbool, optional

Whether to expand values Whether to return the expanded values, behavior depends on the type of data:

  • Columnar

    If false returns unique values

  • Geometry

    If false returns scalar values per geometry

  • Gridded

    If false returns 1D coordinates

flatbool, optional

Whether to flatten array

Returns#

NumPy array of values along the requested dimension

static easting_northing_to_lon_lat(easting, northing)[source]#

Projects the given easting, northing values into longitude, latitude coordinates.

See docstring for holoviews.util.transform.easting_northing_to_lon_lat for more information

static lon_lat_to_easting_northing(longitude, latitude)[source]#

Projects the given longitude, latitude values into Web Mercator (aka Pseudo-Mercator or EPSG:3857) coordinates.

See docstring for holoviews.util.transform.lon_lat_to_easting_northing for more information

range(dim, data_range=True, dimension_range=True)[source]#

Return the lower and upper bounds of values along dimension.

Parameters#

dimension

The dimension to compute the range on.

data_rangebool

Compute range from data values

dimension_rangebool

Include Dimension ranges Whether to include Dimension range and soft_range in range calculation

Returns#

Tuple containing the lower and upper bound