Refining polygon grid based on data density #3076
Unanswered
AlexanderJuestel
asked this question in
Q&A
Replies: 1 comment
-
This is a QuadTree data structure. I suppose you can get some existing implementation of QuadTree and link it to your polygons, likely via centroid. Then you will be able to reconstruct the refined grid from there. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
next question from my side is if there is a better way to do things. I have building footprints as polygons and my polygon mask, similar to #3063. However, in areas with more polygons (cities) in comparison to rural areas with less buildings/polygons, I would like to refine the original polygon grid in areas with more polygons.
I have come up with the following code that works but wonder if it could be optimized. It is basically counting the number of points within each mask and creates new smaller masks within each polygon. How about using KDE (Kernel density estimation) to calculate the density of points? I have found PyGridTools but it seems unmaintained (https://github.com/Geosyntec/pygridtools).
Beta Was this translation helpful? Give feedback.
All reactions