9.1.2. aequilibrae.Network¶
-
class
aequilibrae.
Network
(project)¶ Bases:
object
Network class. Member of an AequilibraE Project
-
__init__
(project)¶ Instantiates the network with the project it is member of
- Args:
project (
Project
): Project
Methods
__init__
(project)Instantiates the network with the project it is member of
Adds spatial indices to links and nodes table
Adds consistency triggers to the project
Builds graphs for all modes currently available in the model
Returns the number of centroids in the model
Returns the number of links in the model
Returns the number of nodes in the model
Creates empty network tables for future filling
create_from_osm
([west, south, east, north, …])Downloads the network from Open-Street Maps
modes
()Returns a list of all the modes in this model
set_time_field
(time_field)Set the time field for all graphs built in the model
Returns a list of all fields that can be skimmed
Attributes
-
req_link_flds
= ['link_id', 'a_node', 'b_node', 'direction', 'distance', 'modes', 'link_type']¶
-
req_node_flds
= ['node_id', 'is_centroid']¶
-
protected_fields
= ['ogc_fid', 'geometry']¶
-
__init__
(project) Instantiates the network with the project it is member of
- Args:
project (
Project
): Project
-
_check_if_exists
()¶
-
skimmable_fields
()¶ Returns a list of all fields that can be skimmed
- Returns:
list
: List of all fields that can be skimmed
-
modes
()¶ Returns a list of all the modes in this model
- Returns:
list
: List of all modes
-
create_from_osm
(west: float = None, south: float = None, east: float = None, north: float = None, place_name: str = None, modes=['car', 'transit', 'bicycle', 'walk'], spatial_index=False) → None¶ Downloads the network from Open-Street Maps
- Args:
west (
float
, Optional): West most coordinate of the download bounding boxsouth (
float
, Optional): South most coordinate of the download bounding boxeast (
float
, Optional): East most coordinate of the download bounding boxplace_name (
str
, Optional): If not downloading with East-West-North-South boundingbox, this is requiredmodes (
list
, Optional): List of all modes to be downloaded. Defaults to the modes in the parameter filespatial_index (
bool
, Optional): Creates spatial index. Defaults to zero. REQUIRES SQLITE WITH RTREE
-
create_empty_tables
() → None¶ Creates empty network tables for future filling
-
build_graphs
() → None¶ Builds graphs for all modes currently available in the model
-
set_time_field
(time_field: str) → None¶ Set the time field for all graphs built in the model
- Args:
time_field (
str
): Network field with travel time information
-
count_links
() → int¶ Returns the number of links in the model
- Returns:
int
: Number of links
-
count_centroids
() → int¶ Returns the number of centroids in the model
- Returns:
int
: Number of centroids
-
count_nodes
() → int¶ Returns the number of nodes in the model
- Returns:
int
: Number of nodes
-
add_triggers
()¶ Adds consistency triggers to the project
-
add_spatial_index
() → None¶ Adds spatial indices to links and nodes table
Requires an Sqlite3 distribution with RTree (not the Python standard). Use with caution
-
_Network__add_mode_triggers
() → None¶
-
_Network__add_network_triggers
() → None¶
-
_Network__add_trigger_from_file
(qry_file: str)¶
-