geopackage-sdk/src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java
private void addPolygon(double simplifyTolerance, BoundingBox boundingBox, ProjectionTransform transform, Path path, Polygon polygon) {
        List<LineString> rings = polygon.getRings();
        if (!rings.isEmpty()) {

            // Add the polygon points
            LineString polygonLineString = rings.get(0);
            List<Point> polygonPoints = polygonLineString.getPoints();
            if (polygonPoints.size() >= 2) {
                addRing(simplifyTolerance, boundingBox, transform, path, polygonPoints);

                // Add the holes
                for (int i = 1; i < rings.size(); i++) {
                    LineString holeLineString = rings.get(i);
                    List<Point> holePoints = holeLineString.getPoints();
                    if (holePoints.size() >= 2) {
                        addRing(simplifyTolerance, boundingBox, transform, path, holePoints);
                    }
                }
            }
        }
    }
private void addPolygon(double simplifyTolerance, BoundingBox boundingBox, ProjectionTransform transform, Path path, Polygon polygon) {
        List<LineString> rings = polygon.getRings();
        if (!rings.isEmpty()) {

            // Add the polygon points
            LineString polygonLineString = rings.get(0);
            List<Point> polygonPoints = polygonLineString.getPoints();
            if (polygonPoints.size() >= 2) {
                addRing(simplifyTolerance, boundingBox, transform, path, polygonPoints);

                // Add the holes
                for (int i = 1; i < rings.size(); i++) {
                    LineString holeLineString = rings.get(i);
                    List<Point> holePoints = holeLineString.getPoints();
                    if (holePoints.size() >= 2) {
                        addRing(simplifyTolerance, boundingBox, transform, path, holePoints);
                    }
                }
            }
        }
    }
private void addPolygon ( double simplifyTolerance , BoundingBox boundingBox , ProjectionTransform transform , Path path , Polygon polygon ) { List < LineString > rings = polygon . getRings ( ) ; if ( ! rings . isEmpty ( ) ) { // Add the polygon points LineString polygonLineString = rings . get ( 0 ) ; List < Point > polygonPoints = polygonLineString . getPoints ( ) ; if ( polygonPoints . size ( ) >= 2 ) { addRing ( simplifyTolerance , boundingBox , transform , path , polygonPoints ) ; // Add the holes for ( int i = 1 ; i < rings . size ( ) ; i ++ ) { LineString holeLineString = rings . get ( i ) ; List < Point > holePoints = holeLineString . getPoints ( ) ; if ( holePoints . size ( ) >= 2 ) { addRing ( simplifyTolerance , boundingBox , transform , path , holePoints ) ; } } } } }
Add the polygon on the canvas

@param simplifyTolerance simplify tolerance in meters
@param boundingBox       bounding box
@param transform         projection transform
@param path              path
@param polygon           polygon
Add the polygon on the canvas