[Qgis-developer] Help with a new processing plugin
Erik Borke
eborke at gmail.com
Tue Sep 27 11:16:11 PDT 2016
Hi
I'd like to release a script I wrote as a subplugin of processing.
The code can be found here: https://github.com/eborke/QGISGraphPlugin
My script builds a graph from a vector layer of polygons in the following
way:
The vertices (or nodes) of the graph are the values taken on by an
attribute field of the vector layer. There is an edge between two vertices
if any of their associated polygons intersect. It also appends a dictionary
of attributes to each vertex which were castable to either a string or a
float.
It isn't hard to write a short very simple script to do this, which will
run fine for a small data set. The value in my script is that it is
optimized for large data sets (any further optimization ideas are certainly
welcome). For example, a simple initial script took approximately 87
minutes to run over a test data set consisting of nearly 8000 polygons on a
global scale. The current version runs the same test data in approximately
12 minutes.
The output of my script is a pickled Network X graph. The user can then
write their own scripts to analyze the graph in the context of their
problem using the Network X library. Should they prefer not to use the
Network X library, they can simply comment out lines 3 and 367 and my
script will output the graph as a pickled dictionary based data structure
for which they can write their own analysis algorithms.
I've been told my script is not yet up to the standards for release. Any
direction you can give me for getting it there would be appreciated.
Erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160927/182c78c5/attachment.html>
More information about the Qgis-developer
mailing list