pyufunc.gmns_read_zone#
- pyufunc.gmns_read_zone(zone_file='', cpu_cores=-1, verbose=False)#
Read zone.csv file and return a dict of Zones.
- Parameters:
- Raises:
FileNotFoundError – Error: File {zone_file} does not exist.
ValueError – Error: cpu_cores must be an integer greater than 0.
Exception – Error: Failed to read {zone_file}.
- Returns:
a dict of Zones.
- Return type:
Examples
>>> from pyufunc import gmns_read_zone >>> zone_dict = gmns_read_zone(zone_file = r"../dataset/ASU/zone.csv") >>> zone_dict[1] Zone(id=1, name='1', centroid_x=0.0, centroid_y=0.0, centroid='POINT (0 0)', x_max=0.0, x_min=0.0, y_max=0.0, y_min=0.0, node_id_list=[], poi_id_list=[], production=0, attraction=0, production_fixed=0, attraction_fixed=0, geometry='POLYGON ((0 0, 1 1, 1 0, 0 0))')