How to merge and simplify a list of 2D polygons?
I have a list of 2D polygons represented as List<double[]> in Java defining gemetries of streets. Each array represents a polygon with coordinates in pairs (x1, y1, x2, y2, …). For example, a polygon might be represented as {x1, y1, x2, y2, x3, y3, x1, y1}.