pyufunc.gmns_read_link#
- pyufunc.gmns_read_link(link_file='', cpu_cores=-1, verbose=False)#
Read link.csv file and return a dict of Links.
- Parameters:
- Raises:
FileNotFoundError – File: {link_file} does not exist.
ValueError – cpu_cores should be integer, but got {type(cpu_cores)}
- Returns:
A dict of Links.
- Return type:
Examples
>>> from pyufunc import gmns_read_link >>> link_dict = gmns_read_link(link_file = r"../dataset/ASU/link.csv") >>> link_dict[1] Link(id=1, name='A', from_node_id=1, to_node_id=2, length=0.0, lanes=1, dir_flag=1, free_speed=0.0, capacity=0.0, link_type=1, link_type_name='motorway', geometry='LINESTRING (0 0, 1 1)')