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

add_spatial_index()

Adds spatial indices to links and nodes table

add_triggers()

Adds consistency triggers to the project

build_graphs()

Builds graphs for all modes currently available in the model

count_centroids()

Returns the number of centroids in the model

count_links()

Returns the number of links in the model

count_nodes()

Returns the number of nodes in the model

create_empty_tables()

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

skimmable_fields()

Returns a list of all fields that can be skimmed

Attributes

protected_fields

req_link_flds

req_node_flds

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 box

south (float, Optional): South most coordinate of the download bounding box

east (float, Optional): East most coordinate of the download bounding box

place_name (str, Optional): If not downloading with East-West-North-South boundingbox, this is required

modes (list, Optional): List of all modes to be downloaded. Defaults to the modes in the parameter file

spatial_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

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)