Bridges-Python 3.5.0-dev1
Bridges(Python API)
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Properties | List of all members
bridges.world_map.WorldMap Class Reference

This class provides an API to building, displaying and manipulating World maps in BRIDGES. More...

Inheritance diagram for bridges.world_map.WorldMap:
bridges.map.Map

Public Member Functions

 get_projection (self)
 
 get_overlay (self)
 
 get_data_structure_type (self)
 Getter for the data structure type as a JSON string Returns str the data structure type.
 
 get_map_representation (self)
 Getter for the data structure's JSON representation.
 
 get_map_representation (self)
 gets the JSON representation of the map data
 
 __init__ (self, countries=None)
 Constructor: creates an object with the given country data.
 

Protected Attributes

 _countries
 
 _all
 

Properties

 countries = property
 Returns a list of country objects.
 

Detailed Description

This class provides an API to building, displaying and manipulating World maps in BRIDGES.

In the current implementation, we can draw a World map with all country boundaries, or specify a set of countries and display the country* boundaries.

Functions are provided to access each country county and color its boundary, its interior using stroke and fill color functions. This lets us build map based applications where the fill color can be used to represent different data attributes, such as population counts, election statistics or any attribute at the country level. We stop at the country level as each country has its own subdivisions, such as discticts, states, regions, counties, etc.

See the Maps tutorials for examples of the usage of the World Map API at https://bridgesuncc.github.io/tutorials/Map.html

Author
: Kalpathi Subramanian Last May 22, 2025

Constructor & Destructor Documentation

◆ __init__()

bridges.world_map.WorldMap.__init__ (   self,
  countries = None 
)

Constructor: creates an object with the given country data.

   @param countries country information for a set of countries

Reimplemented from bridges.map.Map.

Member Function Documentation

◆ get_data_structure_type()

bridges.world_map.WorldMap.get_data_structure_type (   self)

Getter for the data structure type as a JSON string Returns str the data structure type.

◆ get_map_representation() [1/2]

bridges.world_map.WorldMap.get_map_representation (   self)

Getter for the data structure's JSON representation.

Returns
str the data structure representation

Reimplemented from bridges.map.Map.

◆ get_map_representation() [2/2]

bridges.world_map.WorldMap.get_map_representation (   self)

gets the JSON representation of the map data

   Uses functions to convert the state and country attributes to objects
   before serialization into a JSON string

Reimplemented from bridges.map.Map.

◆ get_overlay()

bridges.world_map.WorldMap.get_overlay (   self)

Reimplemented from bridges.map.Map.

◆ get_projection()

bridges.world_map.WorldMap.get_projection (   self)

Reimplemented from bridges.map.Map.

Member Data Documentation

◆ _all

bridges.world_map.WorldMap._all
protected

◆ _countries

bridges.world_map.WorldMap._countries
protected

Property Documentation

◆ countries

bridges.world_map.WorldMap.countries = property
static

Returns a list of country objects.


The documentation for this class was generated from the following file: