root676 / QNEAT3

QNEAT3 - Qgis Network Analysis Toolbox 3
GNU General Public License v3.0
63 stars 12 forks source link

Using the Fastest Path Optimization for Data other than Speed #64

Closed alaatorkey95 closed 10 months ago

alaatorkey95 commented 10 months ago

Thank you for this fruitful plugin.

I have an inquiry about the "Fastest Path Optimization" used in OD Matrices in QNEAT 3. What if I have used another attribute instead of "Speed" in the "Speed Field"..as if I am trying to use the fastest path optimization to quantify the routes based on another attribute than speed?

How will this affect the calculation of the network cost as well as entry and exit costs?

root676 commented 10 months ago

You could simply try - but you will end up with bogous values. To achieve routing with other attributes you would have to implement another routing strategy class in python (inheriting from QgsNetworkStrategy). When choosing Speed as strategy, then QNEAT3 uses the QgsNetworkSpeedStrategy which converts speed values into time cost as an output for the plugin. So, using speed strategy with other attributes than speed would apply the transformation to time values, which would not result in meaningful values for the attribute that has been supplied.

alaatorkey95 commented 10 months ago

Can you please provide a link for the shared code where I can do this?

root676 commented 10 months ago

I already provided it (see links above). You have to implement the class yourself inheriting from the QgsNetworkStrategy class. There is no tutorial on how to do that.

alaatorkey95 commented 10 months ago

The links worked now. Thanks alot