The method performs very poorly when used on state or national level networks. I've tried to improve the performance to levels which might make it usable but I'm not sure if I'm moving in the right direction, modifying line 223 seemed to help.
cmd = '''SELECT %(streetIdCol)s, %(source)s::integer, %(target)s::integer, %(cost)s::real, %(reverse_cost)s::real, %(km)s::real, %(kmh)s::real %(fwayCols)s FROM %(streetsTable)s''' % self.cmdDict
This could be resolved by using a WHERE geom && ST_BUFFER() clause, or using WITH filter_table AS ... at the moment it just seems to be downloading the entire network.
The dijkstra query is a bit more challenging, as it takes a text string and a temporary table cannot be passed in. This also means you can't pass a GeomFromText bounding box or similiar. The WHERE geom && ST_BUFFER() method would only work with qouteless postgres queries. Any ideas? Would you even expect any improvement in performance from sub sampling the dijkstra query?
The method performs very poorly when used on state or national level networks. I've tried to improve the performance to levels which might make it usable but I'm not sure if I'm moving in the right direction, modifying line 223 seemed to help.
cmd = '''SELECT %(streetIdCol)s, %(source)s::integer, %(target)s::integer, %(cost)s::real, %(reverse_cost)s::real, %(km)s::real, %(kmh)s::real %(fwayCols)s FROM %(streetsTable)s''' % self.cmdDictThis could be resolved by using a
WHERE geom && ST_BUFFER()clause, or usingWITH filter_table AS ...at the moment it just seems to be downloading the entire network.The dijkstra query is a bit more challenging, as it takes a text string and a temporary table cannot be passed in. This also means you can't pass a GeomFromText bounding box or similiar. The
WHERE geom && ST_BUFFER()method would only work with qouteless postgres queries. Any ideas? Would you even expect any improvement in performance from sub sampling the dijkstra query?