196197198199200201202203204205206
if (line.isEmpty()) { return null; } assert line.isClose() : "the ring is not close"; line.deleteOverPoint(); line.close(); return new Ring(line.toCoordinateSeq()); }