mapmaker.flatmap.layers module

class mapmaker.flatmap.layers.FeatureLayer(id, flatmap, exported=False)[source]

Bases: object

property annotations
property exported
property description
property features
property flatmap
property id
property raster_layers
add_feature(feature: Feature)[source]
annotate(feature: Feature, properties: dict)[source]
set_feature_properties()[source]
class mapmaker.flatmap.layers.MapLayer(id: str, source: MapSource, exported=False)[source]

Bases: FeatureLayer

property boundary_feature
property bounds
property detail_features
property outer_geometry
property raster_layers
property source
property zoom
add_feature(feature: Feature)[source]
add_raster_layer(id, extent, map_source, min_zoom=2, local_world_to_base=None)[source]
add_features(group_name, features, tile_layer='features', outermost=False)[source]
class mapmaker.flatmap.layers.RasterLayer(id, extent, map_source, min_zoom=2, local_world_to_base=None)[source]

Bases: object

Details of layer for creating raster tiles.

Parameters:
  • id (str) – the id of the source layer to rasterise

  • extent (tuple(south, west, north, east)) – the extent of the base map in which the layer is to be reasterised as decimal latitude and longitude coordinates.

  • map_source (MapSource) – the source of the layer’s data

  • min_zoom – The minimum zoom level to generate tiles for. Optional, defaults to MIN_ZOOM

  • local_world_to_base (Transform) – an optional transform from the raster layer’s local world coordinates to the base map’s world coordinates. Defaults to None, meaning the Identity() transform

property extent
property id
property local_world_to_base
property map_source
property min_zoom
property source_data: bytes
property source_extent
property source_kind
property source_path
property source_range