Closed connorferster closed 1 year ago
Hmm...maybe I should put the scale constant outside of the function then? As per PEP8, constants should be all caps. I will try moving it to the module level (which I prefer not to do because then it will be visible during the module imports) to see if that makes flake8 happy.
Thanks @connorferster that should probably work - note N806
is "variable in function should be lowercase"
PEP8 says "Constants are usually defined on a module level", I guess that's what is making the linter upset.
When the geometries resulting from an operation result in a MultiPolygon that only touch at points, a hole is not recognized in shapely but it is "recognized" by humans. To fix this problem, the hole needs to be recognized by shapely as part of a Polygon. One solution to fix this would be to buffer the geometry by a very small amount to force this switch from MultiPolygon to Polygon.