bugand find some you're comfortable fixing. They require various level of expertise and some will be easier than other so you should be able to find some you're comfortable with. If you want to work on documentation, #1896 is a nice one to start with.
Still got some testing to do, but I ended up using https://github.com/dbworth/minimum-area-bounding-rectangle/blob/master/python/min_bounding_rect.py to make follow on operations easier.
It looks like
geom.minimum_rotated_rectangle doesn't guarantee right angles? They might be trying to accomplish different things.
Short answer everything works as intended - thank you again. FWIW the github link to
min_bounding_rect.py returns identical return as
Long answer is that the KML writer enforces geographic coordinates, which I did not know. So QGIS' project on the fly visually was not showing a true rectangle versus the underlying (in my case) local UTM. I had done quick tests with
min_bounding_rect.py at large scales only, and tests with
minimum_rotated_rectangle at small scale only. Obviously at large scale the difference in the projection were not as noticeable so the two calls appeared to have different results. Using the same projections for minimum rectangle and the underlying in a non-KML format works as intended.
applyand try to rely as much as you can on built-in GeoSeries methods. If needed use the underlying array of pygeos geometries directly with pygeos functions. You can access it as
gdf.geometry.values.data. When you can use numpy functions instead of for loops, use them. Look up some vectorization guide for pandas, the rules are fairly similar. And when using spatial index, use
get_geometry), but we've been adding more functions to vectorize the most common operations where you would get these back as ragged arrays (e.g.,
get_parts), where there are varying numbers of geometries within arrays of multi / geometry collections.