-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compaction Algorithm / Perfect the hybridisation #2
Comments
Is this a bug in the algorithm? |
Neither really, more an opportunity to save a tiny bit of memory space. If you're wondering how it happens... A coarse cell is currently used only if it is entirely contained within the Polygon. Else, we will explore the subcells. If going by overlaps and at the finest resolution, all of the subcells may overlap with atleast one not being contained (since the parent wasnt fully contained of course). In this case, all the children will be appended anyway (fill_strategy=overlaps) and we could have represented them with the coarser cell. But we needed to check by children first. |
Right - the algorithm tried to exclude some of it but found they all overlapped. If you had gone another level finer, some would have been excluded. So that is the difference. Whether it makes sense to merge some of them I'm not sure. |
Could maybe process children together and use recursive function calls rather then a stack as a list. it would be a stack of recursive fn calls. Depth first search style would be managable too. |
After finding all cells (for overlaps or centroids strategies only), it is occasionally the case that a full set of subcells were included depsite a parent cell not fitting entirely (which initial criteria for coarser cells to be included). In this case, represent the subcells using the parent.
Add in after checks which will need to recurse upwards in the event a parent cell is created that possibly now complete a higher set of children.
A recursive algorithm as such would be able to hybridise a set of cells that only contains cells of the finest resolution.
The text was updated successfully, but these errors were encountered: