geopackage-sdk/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
public BoundingBox expandBoundingBox(BoundingBox boundingBox,
                                         Projection projection) {

        BoundingBox expandedBoundingBox = boundingBox;

        ProjectionTransform toWebMercator = projection
                .getTransformation(ProjectionConstants.EPSG_WEB_MERCATOR);
        if (!toWebMercator.isSameProjection()) {
            expandedBoundingBox = expandedBoundingBox.transform(toWebMercator);
        }

        expandedBoundingBox = expandBoundingBox(expandedBoundingBox);

        if (!toWebMercator.isSameProjection()) {
            ProjectionTransform fromWebMercator = toWebMercator
                    .getInverseTransformation();
            expandedBoundingBox = expandedBoundingBox
                    .transform(fromWebMercator);
        }

        return expandedBoundingBox;
    }
public BoundingBox expandBoundingBox(BoundingBox boundingBox,
                                         Projection projection) {

        BoundingBox expandedBoundingBox = boundingBox;

        ProjectionTransform toWebMercator = projection
                .getTransformation(ProjectionConstants.EPSG_WEB_MERCATOR);
        if (!toWebMercator.isSameProjection()) {
            expandedBoundingBox = expandedBoundingBox.transform(toWebMercator);
        }

        expandedBoundingBox = expandBoundingBox(expandedBoundingBox);

        if (!toWebMercator.isSameProjection()) {
            ProjectionTransform fromWebMercator = toWebMercator
                    .getInverseTransformation();
            expandedBoundingBox = expandedBoundingBox
                    .transform(fromWebMercator);
        }

        return expandedBoundingBox;
    }
public BoundingBox expandBoundingBox ( BoundingBox boundingBox , Projection projection ) { BoundingBox expandedBoundingBox = boundingBox ; ProjectionTransform toWebMercator = projection . getTransformation ( ProjectionConstants . EPSG_WEB_MERCATOR ) ; if ( ! toWebMercator . isSameProjection ( ) ) { expandedBoundingBox = expandedBoundingBox . transform ( toWebMercator ) ; } expandedBoundingBox = expandBoundingBox ( expandedBoundingBox ) ; if ( ! toWebMercator . isSameProjection ( ) ) { ProjectionTransform fromWebMercator = toWebMercator . getInverseTransformation ( ) ; expandedBoundingBox = expandedBoundingBox . transform ( fromWebMercator ) ; } return expandedBoundingBox ; }
Create an expanded bounding box to handle features outside the tile that
overlap

@param boundingBox bounding box
@param projection  bounding box projection
@return bounding box
@since 3.2.0
Create an expanded bounding box to handle features outside the tile that overlap