Skip to main content


I would appreciate some help on this: https://gis.stackexchange.com/questions/467781/convert-networkx-graph-to-qgsvectorlayer-in-pyqgis

#qgis #qgisprocess #qgishydro #hydroinformatics
in reply to Josep Pueyo-Ros :rstats:

This might help: https://stackoverflow.com/questions/62754277/networkx-writing-to-shape-file/68778945#68778945
This entry was edited (1 year ago)
in reply to Raúl Nanclares 🍜

Thanks! The script I'm "translating" outputs a geopackage with two layers (nodes and edges), so the problem is not converting to a file but to an object of class qgsvectorlayer that is usually returned by qgis plugins. I know I could return a pointer to a temporary file (like SAGA algorithms) but I would prefer just returning the QGIS layer directly.
This entry was edited (1 year ago)
in reply to Josep Pueyo-Ros :rstats:

yep, I don't think there's any obvious way to transform and object from networkx to a qgis object.
This entry was edited (1 year ago)

This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.