polaris.network.active.active_networks.ActiveNetworks#

class polaris.network.active.active_networks.ActiveNetworks(geotool, data_tables)#

Bases: WorkerThread

Walking & Biking network building class

from polaris.network.network import Network
net = Network()
net.open(path/to/network)

active_net = new.active

# Limits the length of active links to a known value
# Any link grater than this value will be divided into pieces of
# equal length smaller than this limit
active_net.set_max_link_dist(800)

# We can re-build the entire active network
active_net.build()

# After rebuilding the network, it will automatically rebuild the
# reference to active links in the Location and Parking Tables

# To rebuild the association of active links for the Location
# and Parking tables after manual edit of the active network
# please look into the GeoConsistency submodule
__init__(geotool, data_tables) None#

Methods

__init__(geotool, data_tables)

build()

Builds the active network from scratch

copy_to_bike(**kwargs)

doWork()

Alias for build

finish()

Kills the progress bar so others can be generated

set_max_link_dist(max_dist)

Sets the maximum length an active link should have

set_osm_source([do_osm])

Allows user to get a walk network from the OSM network instead of the roadway network

update_bearing(conn)

Attributes

activenet = <polaris.utils.python_signal.PythonSignal object>#
__init__(geotool, data_tables) None#

Sets the maximum length an active link should have

Args:

max_dist (float): Maximum distance allowed for the link

doWork()#

Alias for build

build()#

Builds the active network from scratch

It also rebuilds the correlation between active links and the Location and Parking Tables

set_osm_source(do_osm=False)#

Allows user to get a walk network from the OSM network instead of the roadway network

Args:

do_osm (Bool): Boolean for whether we should get our active network from OSM instead road network

copy_to_bike(**kwargs)#
finish()#

Kills the progress bar so others can be generated

static update_bearing(conn: Connection)#