Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

load_osm.py

Class OSM_to_network

Object to load OSM PBF to networkX objects.

OSM_to_network.generateRoadsGDF(in_df=None, outFile='', verbose=False)

Description:

post-process roads GeoDataFrame adding additional attributes

Parameters:

Returns:


Description:

Extract certain times of roads from the OSM before the netowrkX conversion

Parameters:

Returns:


OSM_to_network.fetch_roads(data_path)

Description:

Extracts roads from an OSM PBF

Parameters:

Returns:


OSM_to_network.fetch_roads_and_ferries(data_path)

Description:

Extracts roads and ferries from an OSM PBF

Parameters:

Returns:


OSM_to_network.line_length(line, ellipsoid='WGS-84')

Description:

Returns length of a line in kilometers, given in geographic coordinates. Adapted from this StackExchange answer.

Parameters:

Returns:


OSM_to_network.get_all_intersections(shape_input, idx_osm=None, unique_id='osm_id', verboseness=False)

Description:

Processes GeoDataFrame and splits edges as intersections

Parameters:

Returns:


OSM_to_network.initialReadIn(fpath=None, wktField='Wkt')

Description:

Convert the OSM object to a networkX object

Parameters:

Returns: