| Title: | Data Sources for 'tmap' |
|---|---|
| Description: | Provides support for a variety of spatial data sources in 'tmap', including remote, tiled, and streaming formats. Enables the use of external vector and raster data without requiring full data import, facilitating efficient visualization workflows. |
| Authors: | Martijn Tennekes [aut, cre] |
| Maintainer: | Martijn Tennekes <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1 |
| Built: | 2026-06-04 11:24:52 UTC |
| Source: | https://github.com/r-tmap/tmap.sources |
Convenience functions to extract specific parts of the metadata object
returned by tmap_src_meta.
tmap_src_layers(meta) tmap_src_vars(meta, layer = NULL) tmap_src_cats(meta, layer = NULL, var)tmap_src_layers(meta) tmap_src_vars(meta, layer = NULL) tmap_src_cats(meta, layer = NULL, var)
meta |
List. Output of |
layer |
Character. Layer name. May be omitted when the source has exactly one layer; required otherwise. |
var |
Character. Variable name within the layer. |
tmap_src_layersCharacter vector of layer names.
tmap_src_varsData frame with columns variable,
class, categories (list-column), and palette
(list-column) for all variables in the layer.
tmap_src_catsA list with elements categories
(character vector of known category values) and palette
(named character vector of hex colours), both NULL when no
catalogue entry exists for layer.var.
## Not run: urls <- tmap_src_overture() meta <- tmap_src_meta(urls$buildings) tmap_src_layers(meta) #> [1] "building" "building_part" tmap_src_vars(meta, layer = "building") tmap_src_cats(meta, layer = "building", var = "subtype") #> $categories #> [1] "residential" "commercial" ... #> $palette #> residential commercial ... #> "#f4a460" "#4169e1" ... ## End(Not run)## Not run: urls <- tmap_src_overture() meta <- tmap_src_meta(urls$buildings) tmap_src_layers(meta) #> [1] "building" "building_part" tmap_src_vars(meta, layer = "building") tmap_src_cats(meta, layer = "building", var = "subtype") #> $categories #> [1] "residential" "commercial" ... #> $palette #> residential commercial ... #> "#f4a460" "#4169e1" ... ## End(Not run)
Returns all known metadata for a PMTiles source. For Overture Maps URLs,
the layer_vars data frames are automatically annotated with
categories and palette list-columns for variables that have
a known closed value set.
tmap_src_meta(x)tmap_src_meta(x)
x |
URL or local file path to a PMTiles source. |
A list with elements: input, type,
tile_type, url, layers, layer_vars,
bbox, zoom. Each element of layer_vars is a
data frame with columns variable, class,
categories (list), palette (list).
Returns a named list of PMTiles URLs for all Overture themes. When
release = "latest" (default), the version is resolved via the
Overture STAC catalog at runtime.
tmap_src_overture(release = "latest")tmap_src_overture(release = "latest")
release |
Character. |
Named list of URLs: addresses, base,
buildings, divisions, places,
transportation.