Class GeoPackageTileRetriever

  • All Implemented Interfaces:
    TileRetriever

    public class GeoPackageTileRetriever
    extends Object
    implements TileRetriever
    GeoPackage Tile Retriever, retrieves a tile from a GeoPackage from XYZ coordinates
    Since:
    1.2.0
    Author:
    osbornb
    • Constructor Detail

      • GeoPackageTileRetriever

        public GeoPackageTileRetriever​(TileDao tileDao)
        Constructor using GeoPackage tile sizes
        Parameters:
        tileDao - tile dao
      • GeoPackageTileRetriever

        public GeoPackageTileRetriever​(TileDao tileDao,
                                       String imageFormat)
        Constructor with specified tile size
        Parameters:
        tileDao - tile dao
        imageFormat - image format
      • GeoPackageTileRetriever

        public GeoPackageTileRetriever​(TileDao tileDao,
                                       Integer width,
                                       Integer height,
                                       String imageFormat)
        Constructor with specified tile size
        Parameters:
        tileDao - tile dao
        width - width
        height - height
        imageFormat - image format
    • Method Detail

      • hasTile

        public boolean hasTile​(int x,
                               int y,
                               int zoom)
        Check if there is a tile for the x, y, and zoom
        Specified by:
        hasTile in interface TileRetriever
        Parameters:
        x - x coordinate
        y - y coordinate
        zoom - zoom level
        Returns:
        true if a tile exists
      • getTile

        public GeoPackageTile getTile​(int x,
                                      int y,
                                      int zoom)
        Get a tile from the x, y, and zoom
        Specified by:
        getTile in interface TileRetriever
        Parameters:
        x - x coordinate
        y - y coordinate
        zoom - zoom level
        Returns:
        tile with dimensions and bytes
      • getScaling

        public TileScaling getScaling()
        Get the Tile Scaling options
        Returns:
        tile scaling options
        Since:
        2.0.2
      • setScaling

        public void setScaling​(TileScaling scaling)
        Set the Tile Scaling options
        Parameters:
        scaling - tile scaling options
        Since:
        2.0.2