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:
  • zone_file (str, optional) – the input zone file path. Defaults to “”.

  • cpu_cores (int, optional) – number of cpu cores for parallel processing. Defaults to -1.

  • verbose (bool, optional) – print processing information. Defaults to False.

Raises:
Returns:

a dict of Zones.

Return type:

dict

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))')