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).
Methods
dimension_values
(dimension[, expanded, flat])Return the values along the requested dimension.
easting_northing_to_lon_lat
(easting, northing)Projects the given easting, northing values into longitude, latitude coordinates.
lon_lat_to_easting_northing
(longitude, latitude)Projects the given longitude, latitude values into Web Mercator (aka Pseudo-Mercator or EPSG:3857) coordinates.
range
(dim[, data_range, dimension_range])Return the lower and upper bounds of values along dimension.
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData
: labelholoviews.core.dimension.Dimensioned
: cdims, vdimsholoviews.core.element.Element2D
: extentsgroup = 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
str
The dimension to return values for.
- expandedbool,
optional
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.
- dimension
- Returns:
np.ndarray
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