tracktable.render.mapmaker module¶
Module contents¶
Convenience wrappers for geographic map creation and decoration
-
tracktable.render.mapmaker.
cartesian_map
(map_bbox=None, gridline_spacing=None, axes=None, **kwargs)[source]¶ Create a Cartesian map
Since Cartesian space is flat and undistinguished, a “map” is just a display region. You can also change the background color and draw axes/grid lines on the figure.
- Keyword Arguments
map_bbox ([minLon, maxLon, minLat, maxLat]) – bounding box for custom map extent. By default automatically set to make all trajectories visible. (Default: None)
gridline_spacing (int) – Spaceing to put between grid lines (Default: None)
axes (GeoAxes) – Domain to create the map in (Default: None)
kwargs (dict) – Any other arguments to customize the generated map (Default: dict)
- Returns
A cartesian domain map
-
tracktable.render.mapmaker.
mapmaker
(domain='terrestrial', *args, **kwargs)[source]¶ Generate a map for a given domain
-
tracktable.render.mapmaker.
terrestrial_map
(map_name, draw_coastlines=True, draw_countries=True, draw_states=True, draw_lonlat=True, fill_land=True, fill_water=True, land_fill_color='#101010', water_fill_color='#000000', land_zorder=4, water_zorder=4, lonlat_spacing=10, lonlat_color='#A0A0A0', lonlat_linewidth=0.2, lonlat_zorder=6, coastline_color='#808080', coastline_linewidth=1, coastline_zorder=5, country_border_color='#606060', country_fill_color='#303030', country_linewidth=0.5, country_zorder=3, state_border_color='#404040', state_fill_color='none', state_linewidth=0.3, state_zorder=2, draw_largest_cities=None, draw_cities_larger_than=None, city_label_size=12, city_dot_size=2, city_dot_color='white', city_label_color='white', city_zorder=6, border_resolution='110m', map_bbox=None, map_projection=None, map_scale_length=None, region_size=None, axes=None, **kwargs)[source]¶ Create and decorate a terrestrial map
Call the Cartopy toolkit to create a map of some predefined area, up to and including the entire world. The map will be decorated with some subset of coastlines, country borders, state/province borders and cities according to the keyword arguments you supply to mapmaker() or terrestrial_map().
- Parameters
map_name – Region name (‘region:XXX’ or ‘airport:XXX’ or ‘city:XXX’ or ‘custom’). Available regions are in tracktable.render.maps.available_maps().
- Keyword Arguments
draw_coastlines (bool) – Whether or not to draw coastlines on the map (Default: True)
draw_countries (bool) – Whether or not to draw country borders on the map (Default: True)
draw_states (bool) – Whether or not to draw US/Canada state borders (Default: True)
draw_lonlat (bool) – Whether or not to draw longitude/latitude lines (Default: True)
fill_land (bool) – Whether or not to fill in the land areas (Default: True)
fill_water (bool) – Whether or not to fill in the land areas (Default: True)
land_fill_color (str) – Color name or hex string for land area (Default: ‘#101010’)
water_fill_color (str) – Color name or hex string for sea area (Default: ‘#000000’)
land_zorder (int) – Image layer for land (Default: 4)
water_zorder (int) – Image layer for sea (Default: 4)
lonlat_spacing (int) – Distance in degrees between lon/lat lines (Default: 10)
lonlat_color (str) – Color name or hex string for longitude/latitude lines (Default: ‘#A0A0A0’)
lonlat_linewidth (float) – Width (in point) for lon/lat lines (Default: 0.2)
lonlat_zorder (int) – Image layer for coastlines (Default: 6)
coastline_color (str) – Color name or hex string for coastlines (Default: ‘#808080’)
coastline_linewidth (float) – Width (in points) of coastlines (Default: 1)
coastline_zorder (int) – Image layer for coastlines (Default: 5)
country_border_color (str) – Color name or hex string for coastlines (Default: ‘#606060’)
country_fill_color (str) – Color name or hex string for coastlines (Default:’#303030’ )
country_linewidth (float) – Width (in points) of coastlines (Default: 0.5)
country_zorder (int) – Image layer for coastlines (Default: 3)
state_border_color (str) – Color name or hex string for coastlines (Default: ‘#404040’)
state_fill_color (str) – Color name or hex string for coastlines (Default: ‘none’)
state_linewidth (float) – Width (in points) of coastlines (Default: 0.3)
state_zorder (int) – Image layer for coastlines (Default: 2)
draw_largest_cities (int) – Draw the N largest cities on the map (Default: None)
draw_cities_larger_than (int) – Draw cities with populations greater than N (Default: None)
city_label_size (int) – Size (in points) for city name labels (Default: 12)
city_dot_size (int) – Size (in points) for city markers (Default: 2)
city_dot_color (str) – Color name or hex string for city markers (Default: ‘white’)
city_label_color (str) – Color name or hex string for city names (Default: ‘white’)
city_zorder (int) – Color name or hex string for city names (Default: 6)
border_resolution (str) – Detail of borders (Default: ‘110m’)
map_bbox ([minLon, maxLon, minLat, maxLat]) – Bounding box for custom map extent (Default: None)
map_projection (Basemap) – Cartopy CRS projection object (optional) (Default: None)
map_scale_length (float) – Length of map scale indicator (in km) (Default: None)
region_size (float) – Size of region depicted around an airport (km width x km height) (Default: None)
axes (GeoAxes) – Matplotlib axes to render into (Default: None)
kwargs (dict) – Any other arguments to customize the generated map (Default: dict)
- Raises
KeyError – unknown map name
- Returns
Basemap instance and a list of Matplotlib artists that were rendered
- Return type
(basemap, artist_list)