NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.

learn more… | top users | synonyms

1
vote
1answer
136 views

How to visualize shortest path that is calculated using Networkx?

I have a graph G (made from a road network shapefile), and a source node S, and a destination node D. I have calculated the length of shortest path using single_source_dijkstra_path_length, but now I ...
0
votes
2answers
34 views

Adjacency matrix in GRASS

I have a line shapefile that I use as network. I connect a set of point to it using "v.net operation connect" command. . My questions are: (i) how can I get the list of neighbors for each ...
3
votes
1answer
52 views

nx_spatial does not read all shapefile features

I have a polyline shapefile for a road network. The roads are split at every intersection (node), e.g. if two roads intersect at one point, then they are split into four links(edges). So using the ...
0
votes
2answers
149 views

How to make a routable graph from a Point and a Line shapefile, using Networkx?

I have one shapefile which consists of all the streets in the study area, and another shapefile which has points representing origins and destinations. I would like to know if it's possible to find ...
2
votes
1answer
185 views

Does not show shortest path in networkx (in QGIS)

I used the following commands (in qgis console) to get the shortest path with astar algorithm. But the result shows 'NetworkXNoPath' every time. Why was that? Please help me to find a solution to this ...
3
votes
2answers
187 views

Create network from shapefile without ArcGIS?

I want to perform shortest-path analysis on a network whose edges represent real-world roads and whose nodes are buildings or other locations. I have the shapefile for the area I'm interested in. ...
4
votes
0answers
245 views

How to convert a raster (array) to a NetworkX graph and do a * search?

I want to use a slope-raster for a a_star path analysis in NetworkX. I am using Python for this project. My test raster looks like this First I read in the raster with GDAL input_raster = ...
0
votes
0answers
224 views

Issues when importing line shapefiles into NetworkX

Note that although I am using Python Console from within QGIS for this, I don't think it's a QGIS issue. Below is the difference of how NetworkX is dealing with 2 line layers created by the same ...
1
vote
1answer
627 views

how to install networkx python in QGIS

How to install and how to compile networkx python on QGIS? I always get an error that no module named networkx in the console of QGIS I copied the file networkx in C:\Program Files\Quantum GIS ...
2
votes
0answers
199 views

problem in read_shp() to generate a networkx.DiGraph from point and line shapefiles

I tried to use the Python module networkx and specifically the read-shp () to ensure the transformation of a graph to a file sharpe but I always find this error noting that this is the first time I ...
5
votes
1answer
391 views

How to restrict or block certain paths in NetworkX graphs?

I am trying to calculate shortest path between 2 points using Dijkstra and A Star algorithms (in a directed NetworkX graph). At the moment it works fine and I can see the calculated path but I would ...
10
votes
2answers
3k views

Point (of a linestring) within Polygon using ogr and Python

I'm currently working on a project in which I need to build a topological network out of the geometry features I find in shapefiles. So far using Ben Reilly's open source project I've managed to ...
9
votes
3answers
1k views

How to populate an undirected graph from PostGIS?

This question is more related to resources that I might not have identified yet, although I've been searching the web for a while. In the project I'm working at the moment I need to run a ...
9
votes
5answers
1k views

How to convert line simple features to topological network?

using Gdal/ OGR is there a way to convert a shp, kml, or PostGIS line layer into a network of nodes and segments so it can be used in packages such as networkx?