geopackage-sdk/src/main/java/mil/nga/geopackage/tiles/features/DefaultFeatureTiles.java
private boolean drawFeature(int zoom, BoundingBox boundingBox, BoundingBox expandedBoundingBox, ProjectionTransform transform, FeatureTileCanvas canvas, FeatureRow row) {

        boolean drawn = false;

        try {
            GeoPackageGeometryData geomData = row.getGeometry();
            if (geomData != null) {
                Geometry geometry = geomData.getGeometry();
                if (geometry != null) {

                    GeometryEnvelope envelope = geomData.getOrBuildEnvelope();
                    BoundingBox geometryBoundingBox = new BoundingBox(envelope);
                    BoundingBox transformedBoundingBox = geometryBoundingBox.transform(transform);

                    if (expandedBoundingBox.intersects(transformedBoundingBox, true)) {

                        double simplifyTolerance = TileBoundingBoxUtils.toleranceDistance(zoom, tileWidth, tileHeight);
                        drawn = drawShape(simplifyTolerance, boundingBox, transform, canvas, row, geometry);

                    }
                }
            }
        } catch (Exception e) {
            Log.e(DefaultFeatureTiles.class.getSimpleName(), "Failed to draw feature in tile. Table: "
                    + featureDao.getTableName(), e);
        }

        return drawn;
    }
private boolean drawFeature(int zoom, BoundingBox boundingBox, BoundingBox expandedBoundingBox, ProjectionTransform transform, FeatureTileCanvas canvas, FeatureRow row) {

        boolean drawn = false;

        try {
            GeoPackageGeometryData geomData = row.getGeometry();
            if (geomData != null) {
                Geometry geometry = geomData.getGeometry();
                if (geometry != null) {

                    GeometryEnvelope envelope = geomData.getOrBuildEnvelope();
                    BoundingBox geometryBoundingBox = new BoundingBox(envelope);
                    BoundingBox transformedBoundingBox = geometryBoundingBox.transform(transform);

                    if (expandedBoundingBox.intersects(transformedBoundingBox, true)) {

                        double simplifyTolerance = TileBoundingBoxUtils.toleranceDistance(zoom, tileWidth, tileHeight);
                        drawn = drawShape(simplifyTolerance, boundingBox, transform, canvas, row, geometry);

                    }
                }
            }
        } catch (Exception e) {
            Log.e(DefaultFeatureTiles.class.getSimpleName(), "Failed to draw feature in tile. Table: "
                    + featureDao.getTableName(), e);
        }

        return drawn;
    }
private boolean drawFeature ( int zoom , BoundingBox boundingBox , BoundingBox expandedBoundingBox , ProjectionTransform transform , FeatureTileCanvas canvas , FeatureRow row ) { boolean drawn = false ; try { GeoPackageGeometryData geomData = row . getGeometry ( ) ; if ( geomData != null ) { Geometry geometry = geomData . getGeometry ( ) ; if ( geometry != null ) { GeometryEnvelope envelope = geomData . getOrBuildEnvelope ( ) ; BoundingBox geometryBoundingBox = new BoundingBox ( envelope ) ; BoundingBox transformedBoundingBox = geometryBoundingBox . transform ( transform ) ; if ( expandedBoundingBox . intersects ( transformedBoundingBox , true ) ) { double simplifyTolerance = TileBoundingBoxUtils . toleranceDistance ( zoom , tileWidth , tileHeight ) ; drawn = drawShape ( simplifyTolerance , boundingBox , transform , canvas , row , geometry ) ; } } } } catch ( Exception e ) { Log . e ( DefaultFeatureTiles . class . getSimpleName ( ) , "Failed to draw feature in tile. Table: " + featureDao . getTableName ( ) , e ) ; } return drawn ; }
Draw the feature on the canvas

@param zoom                zoom level
@param boundingBox         bounding box
@param expandedBoundingBox expanded bounding box
@param transform           projection transform
@param canvas              feature tile canvas
@param row                 feature row
@return true if at least one feature was drawn
Draw the feature on the canvas