Class TileDao

    • Constructor Detail

    • Method Detail

      • getBoundingBox

        public BoundingBox getBoundingBox​(long zoomLevel)
        Get the bounding box of tiles
        Parameters:
        zoomLevel - zoom level
        Returns:
        bounding box of zoom level, or null if no tiles
        Since:
        1.1.1
      • getBoundingBox

        public BoundingBox getBoundingBox​(long zoomLevel,
                                          Projection projection)
        Get the bounding box of tiles at the zoom level
        Parameters:
        zoomLevel - zoom level
        projection - desired projection
        Returns:
        bounding box of zoom level, or nil if no tiles
        Since:
        5.0.0
      • getTileGrid

        public TileGrid getTileGrid​(long zoomLevel)
        Get the tile grid of the zoom level
        Parameters:
        zoomLevel - zoom level
        Returns:
        tile grid at zoom level, null if not tile matrix at zoom level
        Since:
        1.1.1
      • adjustTileMatrixLengths

        public void adjustTileMatrixLengths()
        Adjust the tile matrix lengths if needed. Check if the tile matrix width and height need to expand to account for pixel * number of pixels fitting into the tile matrix lengths
      • getTileDb

        public TileConnection getTileDb()
        Get the Tile connection
        Returns:
        tile connection
      • getTileMatrixSet

        public TileMatrixSet getTileMatrixSet()
        Get the tile matrix set
        Returns:
        tile matrix set
      • getTileMatrices

        public List<TileMatrix> getTileMatrices()
        Get the tile matrices
        Returns:
        tile matrices
      • getZoomLevels

        public Set<Long> getZoomLevels()
        Get the zoom levels
        Returns:
        zoom level set
        Since:
        5.0.0
      • getTileMatrix

        public TileMatrix getTileMatrix​(long zoomLevel)
        Get the tile matrix at the zoom level
        Parameters:
        zoomLevel - zoom level
        Returns:
        tile matrix
      • getTileMatrixAtMinZoom

        public TileMatrix getTileMatrixAtMinZoom()
        Get the tile matrix at the min (first) zoom
        Returns:
        tile matrix
        Since:
        5.0.0
      • getSrsId

        public long getSrsId()
        Get the Spatial Reference System id
        Returns:
        srs id
        Since:
        4.0.0
      • getMinZoom

        public long getMinZoom()
        Get the min zoom
        Returns:
        min zoom
      • getMaxZoom

        public long getMaxZoom()
        Get the max zoom
        Returns:
        max zoom
      • queryForTile

        public TileRow queryForTile​(long column,
                                    long row,
                                    long zoomLevel)
        Query for a Tile
        Parameters:
        column - column
        row - row
        zoomLevel - zoom level
        Returns:
        tile row
      • queryForTile

        public TileResultSet queryForTile​(long zoomLevel)
        Query for Tiles at a zoom level
        Parameters:
        zoomLevel - zoom level
        Returns:
        tile result set, should be closed
      • queryForTileDescending

        public TileResultSet queryForTileDescending​(long zoomLevel)
        Query for Tiles at a zoom level in descending row and column order
        Parameters:
        zoomLevel - zoom level
        Returns:
        tile result set, should be closed
      • queryForTilesInColumn

        public TileResultSet queryForTilesInColumn​(long column,
                                                   long zoomLevel)
        Query for Tiles at a zoom level and column
        Parameters:
        column - column
        zoomLevel - zoom level
        Returns:
        tile result set
      • queryForTilesInRow

        public TileResultSet queryForTilesInRow​(long row,
                                                long zoomLevel)
        Query for Tiles at a zoom level and row
        Parameters:
        row - row
        zoomLevel - zoom level
        Returns:
        tile result set
      • getZoomLevel

        public Long getZoomLevel​(double length)
        Get the zoom level for the provided width and height in the default units
        Parameters:
        length - in default units
        Returns:
        zoom level
      • getZoomLevel

        public Long getZoomLevel​(double width,
                                 double height)
        Get the zoom level for the provided width and height in the default units
        Parameters:
        width - in default units
        height - in default units
        Returns:
        zoom level
        Since:
        1.2.1
      • getClosestZoomLevel

        public Long getClosestZoomLevel​(double length)
        Get the closest zoom level for the provided width and height in the default units
        Parameters:
        length - in default units
        Returns:
        zoom level
        Since:
        1.2.1
      • getClosestZoomLevel

        public Long getClosestZoomLevel​(double width,
                                        double height)
        Get the closest zoom level for the provided width and height in the default units
        Parameters:
        width - in default units
        height - in default units
        Returns:
        zoom level
        Since:
        1.2.1
      • getApproximateZoomLevel

        public Long getApproximateZoomLevel​(double length)
        Get the approximate zoom level for the provided length in the default units. Tiles may or may not exist for the returned zoom level. The approximate zoom level is determined using a factor of 2 from the zoom levels with tiles.
        Parameters:
        length - length in default units
        Returns:
        approximate zoom level
        Since:
        2.0.2
      • getApproximateZoomLevel

        public Long getApproximateZoomLevel​(double width,
                                            double height)
        Get the approximate zoom level for the provided width and height in the default units. Tiles may or may not exist for the returned zoom level. The approximate zoom level is determined using a factor of 2 from the zoom levels with tiles.
        Parameters:
        width - width in default units
        height - height in default units
        Returns:
        approximate zoom level
        Since:
        2.0.2
      • getMaxLength

        public double getMaxLength()
        Get the max length in default units that contains tiles
        Returns:
        max distance length with tiles
        Since:
        1.2.0
      • getMinLength

        public double getMinLength()
        Get the min length in default units that contains tiles
        Returns:
        min distance length with tiles
        Since:
        1.2.0
      • queryByTileGrid

        public TileResultSet queryByTileGrid​(TileGrid tileGrid,
                                             long zoomLevel)
        Query by tile grid and zoom level
        Parameters:
        tileGrid - tile grid
        zoomLevel - zoom level
        Returns:
        result set from query or null if the zoom level tile ranges do not overlap the bounding box
      • queryByTileGrid

        public TileResultSet queryByTileGrid​(TileGrid tileGrid,
                                             long zoomLevel,
                                             String orderBy)
        Query by tile grid and zoom level
        Parameters:
        tileGrid - tile grid
        zoomLevel - zoom level
        orderBy - order by
        Returns:
        result set from query or null if the zoom level tile ranges do not overlap the bounding box
        Since:
        1.2.1
      • queryForTileGrid

        public TileGrid queryForTileGrid​(long zoomLevel)
        Query for the bounding
        Parameters:
        zoomLevel - zoom level
        Returns:
        tile grid of tiles at the zoom level
        Since:
        1.1.1
      • deleteTile

        public int deleteTile​(long column,
                              long row,
                              long zoomLevel)
        Delete a Tile
        Parameters:
        column - column
        row - row
        zoomLevel - zoom level
        Returns:
        number deleted, should be 0 or 1
      • count

        public int count​(long zoomLevel)
        Count of Tiles at a zoom level
        Parameters:
        zoomLevel - zoom level
        Returns:
        count
      • isXYZTiles

        public boolean isXYZTiles()
        Determine if the tiles are in the XYZ tile coordinate format
        Returns:
        true if XYZ tile format
        Since:
        3.5.0
      • getMapZoomRange

        public long[] getMapZoomRange()
        Get the map zoom level range
        Returns:
        map zoom level range, min at index 0, max at index 1
        Since:
        5.0.0
      • getMapMinZoom

        public long getMapMinZoom()
        Get the map min zoom level
        Returns:
        map min zoom level
        Since:
        5.0.0
      • getMapMaxZoom

        public long getMapMaxZoom()
        Get the map max zoom level
        Returns:
        map max zoom level
        Since:
        5.0.0
      • getMapZoom

        public long getMapZoom​(TileMatrix tileMatrix)
        Get the map zoom level from the tile matrix
        Parameters:
        tileMatrix - tile matrix
        Returns:
        map zoom level
        Since:
        5.0.0
      • getMapZoom

        public long getMapZoom​(long zoomLevel)
        Get the map zoom level from the tile matrix zoom level
        Parameters:
        zoomLevel - tile matrix zoom level
        Returns:
        map zoom level
        Since:
        5.0.0
      • getTileMatrixSetDao

        public TileMatrixSetDao getTileMatrixSetDao()
        Get a tile matrix set DAO
        Returns:
        tile matrix set DAO
        Since:
        5.0.0
      • getTileMatrixDao

        public TileMatrixDao getTileMatrixDao()
        Get a tile matrix DAO
        Returns:
        tile matrix DAO
        Since:
        5.0.0