[Qgis-developer] New Flow Trace plugin too slow
boesiii
boesiii at yahoo.com
Tue Oct 30 11:59:07 PDT 2012
Hello All,
I have written my first Qgis plugin and I am currently testing and improving
it. The plugin is called "Flow Trace" and it selects all lines upstream of
a selected line feature. The lines are selected by extracting upstream and
downstream coordinate values and getting a distance between the values. If
the value is less than a tolerance than the feature is added to a selection
list and is then repeated for each feature in the selection list. I will be
using this plugin to make sure all lines (sanitary sewers) are flowing in
the right direction. It can also check a line shapefile is connected to
each other line as expected. The plugin works for what I need but it is
very slow. How can I make it faster? Below is the basic outline of the
plugin.
Get selected feature upstream coordinate
Iterate thru ALL features, comparing upstream coordinate to downstream
coordinate.
Repeat for each feature found if distance is less than tolerance
I attached the file because it was too long to embed into the email
flowtrace.py
<http://osgeo-org.1560.n6.nabble.com/file/n5012357/flowtrace.py>
Ed
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/New-Flow-Trace-plugin-too-slow-tp5012357.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
More information about the Qgis-developer
mailing list