biigle / core

:large_blue_circle: Application core of BIIGLE
https://biigle.de
GNU General Public License v3.0
12 stars 16 forks source link

Polygons with holes #782

Open mzur opened 4 months ago

mzur commented 4 months ago

A user asked for the ability to punch holes into polygons with the eraser tool. While polygons with holes are supported by OpenLayers, this change would require significant work in the backend. Maybe a new shape (HolePolygon) could be introduced, so all the logic for a regular polygon can be kept? Or maybe it's easier to update all the logic surrounding polygons so they are supported with and without holes. This would require a database migration of all existing polygons, though. The main difference between regular polygons and polygons with holes is that a regular polygon can be described with a flat array and a polygon with holes is an array of arrays (the first array is the outline of the polygon and the following arrays are the holes).