@Override
    public boolean isValid() {

        if (getIcon() != null && getCenter() == null) {
            return false;
        }

        switch (getType()) {
            case GROUP:
                return false;
            case MARKER:
                return getCenter() != null && getCenter().isValid();
            case CIRCLE:
                return getCenter() != null && getCenter().isValid() && getRadius() > 0;
            case POLYGON:
                //a valid polygon needs 4 points (with start/end being the same point)
                return getPoints().size() >= 4;
            case POLYLINE:
            default:
                return getPoints().size() >= 2;
        }
    }
This constructor is specifically for creating objects with applied default style
main/src/main/java/cgeo/geocaching/models/geoitem/GeoPrimitive.java