dcgull / WPDx-Toolset

Tools for working with the Water Point Data Exchange
http://data.waterpointdata.org/
MIT License
0 stars 2 forks source link

Repair Priority is very Slow #8

Open slibby opened 6 years ago

slibby commented 6 years ago

For any area with a substantial number of points needing repair (SL for example), Repair Priority is very slow as it runs at no more than 1 pt/ 3seconds. Will need to look into the iteration in the script to see if it can be improved.

https://github.com/dcgull/WPDx-Toolset/blob/master/WPDx_Toolset.pyt#L366 is where to start.

dcgull commented 6 years ago

Right now we iterate through points one by one because ZonalStatisticsAsTable doesn't work when the zones overlap each other. Should be possible to speed this up by running ZonalStatisticsAsTable on all the non-overlapping water points first, then only going through the remainder one-by-one.