private static void fixPolygonLine(final List<Geopoint> points, final boolean clockwise) {
        if (points.isEmpty()) {
            return;
        }

        //ensure that last point equals first point
        if (!Objects.equals(points.get(0), points.get(points.size() - 1))) {
            points.add(points.get(0));
        }

        //correct orientation if necessary
        if (isClockwise(points) != clockwise) {
            Collections.reverse(points);
        }

    }
This constructor is specifically for creating objects with applied default style
main/src/main/java/cgeo/geocaching/models/geoitem/GeoPrimitive.java