tracktable.render.mapmaker module¶
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.
-
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 map
Call the Basemap 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.
- Parameters
map_name – Region name (‘region:XXX’ or ‘airport:XXX’ or ‘city:XXX’ or ‘custom’). Available regions are in tracktable.render.maps.available_maps().
draw_coastlines – Whether or not to draw coastlines on the map
draw_countries – Whether or not to draw country borders on the map
draw_states – Whether or not to draw US/Canada state borders
draw_lonlat – Whether or not to draw longitude/latitude lines
land_color – Color name or hex string for land area
sea_color – Color name or hex string for sea area
lonlat_spacing – Distance in degrees between lon/lat lines
lonlat_color – Color name or hex string for longitude/latitude lines
lonlat_linewidth – Width (in point) for lon/lat lines
lonlat_zorder – Image layer for coastlines
coastline_color – Color name or hex string for coastlines
coastline_linewidth – Width (in points) of coastlines
coastline_zorder – Image layer for coastlines
country_color – Color name or hex string for coastlines
country_linewidth – Width (in points) of coastlines
country_zorder – Image layer for coastlines
state_color – Color name or hex string for coastlines
state_linewidth – Width (in points) of coastlines
state_zorder – Image layer for coastlines
draw_largest_cities – Draw the N largest cities on the map
draw_cities_larger_than – Draw cities with populations greater than N
city_label_size – Size (in points) for city name labels
city_dot_size – Size (in points) for city markers
city_dot_color – Color name or hex string for city markers
city_label_color – Color name or hex string for city names
border_resolution – ‘c’, ‘i’, ‘h’ or ‘f’ (in increasing order of complexity)
axes – Matplotlib axes to render into
map_bbox – Bounding box for custom map extent
region_size – Size of region depicted around an airport (km width x km height)
map_projection – Cartopy CRS projection object (optional)
map_scale_length – Length of map scale indicator (in km)
- Raises
KeyError – unknown map name
- Returns
Basemap instance and a list of Matplotlib artists that were rendered
- Return type
(basemap, artist_list)