Closed knaaptime closed 4 years ago
on second thought im not sure this first attempt will be faster because im rebuilding the table
Could you make a benchmark comparing both performances? I think you could a small set of polygons.
will do. For now, i've just been running the dasymeric unit test, a la pytest tobler/tests/test_interpolators.py -k "masked"
, but i can add some more detailed tests.
currently, this PR helps us move to a single function rather than separating area_interpolate
from _slow_area_interpolate
but doesnt yield the performance boost. I'm still a little optimistic about the alernative approach i sketched out in the bottom of #2, so gonna continue exploring that
ok, i've been down several rabbit holes on this one and my current view is that we can't optimize our current implementation much more. Right now we're dealing with the raster side quite efficiently, and any speedups we might gain on the vector side by using area_tables_binning
are far outweighed by the additional raster processing we need to get there
Any advances in the scanlines approach?
no the scanlines stuff has been quiet for awhile, but this is a good reminder to revisit that stuff. Closing this as I'm confident i cant optimize until we get a really fast raster polygonizer
need to do some more extensive profiling, i think, but this resolves #2