Mashin6 / orthogonalize-polygon

Orthogonalize polygon in python by making all its angles 90 or 180 deg
GNU General Public License v3.0
25 stars 4 forks source link

Be aware of CRS #4

Open eliasm56 opened 8 months ago

eliasm56 commented 8 months ago

Thank you for the wonderful code. I have a deep learning model trained for building detection and this repo had exactly what I needed to create presentable polygons. The only thing I will say is that you need to be careful with CRS. If you are working with polygons in a specific CRS that is not WGS84, you will receive an error. As referenced below, WGS84 is hard-coded into the algorithm, so please be aware that you will need to change these hard-coded CRS values or reproject your original data for the operation to work.

https://github.com/Mashin6/orthogonalize-polygon/blob/16a3b88f1b016fa0b2d0524a03e9d78c09b40bd4/orthogonalize_polygon.py#L166-L173