Hi everyone,
I am trying to build transit graphs directly in python for a project situated in Cape Town but this error keeps being thrown:
Cell In[4], line 8
4 data = Transit(proj)
5 # data.remove_graphs([1])
6
7 # Building transit graph
----> 8 graph = data.create_graph(
9 with_outer_stop_transfers=False,
10 with_walking_edges=False,
11 blocking_centroid_flows=False,
12 connector_method="overlapping_regions"
13 )
14 # print("Available graphs:", proj.network.graphs.keys())
15 # print("Connector edges:", len(edges[edges['is_connector'] == 1]))
16 # print("Number of stops:", len(data.transit_data.stops))
17 # print(data.transit_data.stops.head())
in Transit.create_graph(self, **kwargs)
101 period_id = kwargs.pop("period_id", self.periods.default_period.period_id)
103 graph = TransitGraphBuilder(self.project, period_id, **kwargs)
--> 104 graph.create_graph()
105 self.graphs[period_id] = graph
106 return graph
--> 212 raise ValueError("'zone_id' must consist of integers greater than 0")
214 if zones.geometry.dtype is str or zones.geometry.dtype is bytes:
215 geometry = shapely.from_wkt(zones.geometry.values)
ValueError: 'zone_id' must consist of integers greater than 0
I've imported the network for Cape Town using OSM ,and also tried inserting the zones into the database manually and forcing the id's into integer types but I keep geting the same error. The zones are being created but it seems they can't be read by Aequilibrae. If anyone has experience with this, I would appreciate any assistance in resolving it. Thank you for your time.