root676 / QNEAT3

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

OD Matrix from Layers as Lines (m:n) always reports NULL #49

Closed iintrater closed 3 years ago

iintrater commented 3 years ago

Same issue as #25 where the output OD Matrix creates a table with all of the origin_id and destination_id, but all of the costs are NULL. From what I read on the previous issue, the issue was patched, but I am using the latest version and still getting the error. Provided are the test shapefiles I am using. data.zip

root676 commented 3 years ago

Thanks for your message - I did't have time yet to push the fixes to the official QGIS plugin repo. Would you like to test the fix with the latest version in this github repository? It would be rather easy to test - just download the repo as a zip file and unzip it in the QGIS plugin folder (depending on the type of operating system you are using, the location of this folder varies - you can check out this Stack.SE answer for details). Just delete the old QNEAT3 folder from this directory, copy the extracted github repo (QNEAT3 folder) to the plugin directory and start QGIS. The bug should be fixed then.

josephholler commented 3 years ago

Your network data is stored in CRS 4326 (WGS 1984 geographic coordinate system), so I suggest projecting the network data into the same CRS as your origins and destinations: 26910, a UTM zone. It's recommended to use an equidistant CRS for the network layer and the same CRS for all inputs. I think @kufreu addressed these CRS issues as part of our last pull request

iintrater commented 3 years ago

What is the location of the latest version in the github repository? I am very unfamiliar with Github's layout.

iintrater commented 3 years ago

Your network data is stored in CRS 4326 (WGS 1984 geographic coordinate system), so I suggest projecting the network data into the same CRS as your origins and destinations: 26910, a UTM zone. It's recommended to use an equidistant CRS for the network layer and the same CRS for all inputs. I think @kufreu addressed these CRS issues as part of our last pull request

I tried doing that, defining the projection of the network to be the same as the origins and destinations, but it was putting it out in the middle of the ocean.

root676 commented 3 years ago

You can just navigate to the code section, click on the green button that says code and download as a zip. I don't know if this link works for you : https://github.com/root676/QNEAT3/archive/refs/heads/master.zip

root676 commented 3 years ago

For the OD algs it is not necessary to provide a projected coordinate system - this is only mandatory for the isochrone algs.

iintrater commented 3 years ago

I think I have it downloaded correctly, I renamed the folder from QNEAT3-master to QNEAT3 and placed it into the python->plugins folder. I re-ran the OD Matrix and I still got NULL values. Is there anything I am doing incorrectly?

root676 commented 3 years ago

As @josephholler already stated: You are using different coordinate systems for the network and your points. This cannot work as the points don't automatically get reprojected into the coordinate system of the network. Try reprojecting both and your analysis should work - even with the old QNEAT3 version.

iintrater commented 3 years ago

That worked thanks for your help!