Replies: 1 comment 1 reply
-
I can't help you yet. I would need an example dataset and maybe a sketch what you try to achieve |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there and 10x a lot for your work.
I am an urban planner and GIS analyst, trying to get into Python step by step. However still on the fundamental parts.
Anyway, I have a working task related to some kindergarten issues, supply demand, and location-allocation, as a sub-step of it is to preprocess and filter the city properties (polygons incl concave ones = irregular ones with an angles of more than 180 degrees) so that they meet some requirements as size/area for example but also a shape which is so called normal, and a normal kindergarten could fit inside. This means lets say that I want to check if a square of 20/20m could fit inside, if not , the polygon is removed.
After some research i did find that the best way to do this is exactly finding the largest rectangle inscribed the polygon and afterwards compare it. Tried different approaches as one fo them almost worked, but with largest inscribed triangle instead of rectangle :)
Then found your code, the discussion and comments on stackoverflow, as well as the research paper there with the algorithm.
It is interesting that this one could work mainly thanks to the cv2 with raster images, something i might try to use related to satellite images and roofs. Anyway in this case my dataset are vector singlesparts polygons.
Tried somehow to adapt your code to my needs and dataset but I could not reach the desired result. After solving various errors, had results where it generates again triangles, or shows a grid with very small black squares which I assume are the cells of the grid.
Had issues with coordinates, format of coordinates, or other things like that, which I solved while reading, based on my knowledge and ChatGPT too, but it still did not work.
So I am asking for some help and navigation. I will upload a small test set of the polygons as well as some codes:
code 1:
https://pastebin.com/wpJ8kauD
code 2:
https://pastebin.com/9QPUCRxq
code 3:
https://pastebin.com/9tnCHL46
Thx
Beta Was this translation helpful? Give feedback.
All reactions