I am analyzing Germany's high voltage electricity grid. I extracted the data from OSM, imported it in QGIS and simplified its structure by hand, specifically creating single nodes where power lines are connected in contrast to having a lot of high voltage substations with complicated geometries. Ultimately, I want to export that network and use it in GAMS to run an optimization model on it. But long story short. I have two .shp files, standard WGS 84 CRS.
- a file containing the network as lines (about 250)
- a file containing all the nodes (about 350) in the network (where the power lines intersect)
Now I want to extract a shortest distance matrix containing the distances between all nodes in file 2, having used file 1 as my "road" network.
I have read through a couple of answers suggesting python, GRASS or PostGIS with pgrouting but none of them worked for me. I'm new to Python, GRASS and PostGIS, which sure does not really help.
(almost forgot. Mac OS 10.7.5, GRASS 7.0, QGIS 2.8.1, PostgreSQL 9.0.13, PostGIS 2.1.7, pgrouting 2.0.0)