GPKGTileDao

Objective-C

@interface GPKGTileDao : GPKGUserDao

Swift

class GPKGTileDao : GPKGUserDao

Tile DAO for reading tile user tables

  • Tile Matrix Set

    Declaration

    Objective-C

    @property (nonatomic, strong) GPKGTileMatrixSet *tileMatrixSet;

    Swift

    var tileMatrixSet: GPKGTileMatrixSet! { get set }
  • Tile Matrices

    Declaration

    Objective-C

    @property (nonatomic, strong) NSArray<GPKGTileMatrix *> *tileMatrices;

    Swift

    var tileMatrices: [GPKGTileMatrix]! { get set }
  • Mapping between zoom levels and the tile matrix

    Declaration

    Objective-C

    @property (nonatomic, strong) NSDictionary<NSNumber *, GPKGTileMatrix *> *zoomLevelToTileMatrix;

    Swift

    var zoomLevelToTileMatrix: [NSNumber : GPKGTileMatrix]! { get set }
  • Zoom levels

    Declaration

    Objective-C

    @property (nonatomic, strong) NSArray<NSNumber *> *zoomLevels;

    Swift

    var zoomLevels: [NSNumber]! { get set }
  • Min zoom

    Declaration

    Objective-C

    @property (nonatomic) int minZoom;

    Swift

    var minZoom: Int32 { get set }
  • Max zoom

    Declaration

    Objective-C

    @property (nonatomic) int maxZoom;

    Swift

    var maxZoom: Int32 { get set }
  • Array of widths of the tiles at each zoom level in default units

    Declaration

    Objective-C

    @property (nonatomic, strong) NSArray *widths;

    Swift

    var widths: [Any]! { get set }
  • Array of heights of the tiles at each zoom level in default units

    Declaration

    Objective-C

    @property (nonatomic, strong) NSArray *heights;

    Swift

    var heights: [Any]! { get set }
  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithDatabase:(GPKGConnection *)database
                            andTable:(GPKGTileTable *)table
                    andTileMatrixSet:(GPKGTileMatrixSet *)tileMatrixSet
                     andTileMatrices:(NSArray<GPKGTileMatrix *> *)tileMatrices;

    Swift

    init!(database: GPKGConnection!, andTable table: GPKGTileTable!, andTileMatrixSet tileMatrixSet: GPKGTileMatrixSet!, andTileMatrices tileMatrices: [GPKGTileMatrix]!)

    Parameters

    database

    database connection

    table

    tile table

    tileMatrixSet

    tile matrix set

    tileMatrices

    tile matrices

    Return Value

    new tile dao

  • Get the bounding box of tiles at the zoom level

    Declaration

    Objective-C

    - (GPKGBoundingBox *)boundingBoxWithZoomLevel:(int)zoomLevel;

    Swift

    func boundingBox(withZoomLevel zoomLevel: Int32) -> GPKGBoundingBox!

    Parameters

    zoomLevel

    zoom level

    Return Value

    bounding box of zoom level, or nil if no tiles

  • Get the bounding box of tiles at the zoom level

    Declaration

    Objective-C

    - (GPKGBoundingBox *)boundingBoxWithZoomLevel:(int)zoomLevel
                                     inProjection:(PROJProjection *)projection;

    Swift

    func boundingBox(withZoomLevel zoomLevel: Int32, in projection: PROJProjection!) -> GPKGBoundingBox!

    Parameters

    zoomLevel

    zoom level

    projection

    desired projection

    Return Value

    bounding box of zoom level, or nil if no tiles

  • Get the tile grid of the zoom level

    Declaration

    Objective-C

    - (GPKGTileGrid *)tileGridWithZoomLevel:(int)zoomLevel;

    Swift

    func tileGrid(withZoomLevel zoomLevel: Int32) -> GPKGTileGrid!

    Parameters

    zoomLevel

    zoom level

    Return Value

    tile grid at zoom level, nil if no tile matrix at zoom level

  • Get the tile table

    Declaration

    Objective-C

    - (GPKGTileTable *)tileTable;

    Swift

    func tileTable() -> GPKGTileTable!

    Return Value

    tile table

  • Get the tile row for the current result in the result set

    Declaration

    Objective-C

    - (GPKGTileRow *)row:(GPKGResultSet *)results;

    Swift

    func row(_ results: GPKGResultSet!) -> GPKGTileRow!

    Parameters

    results

    result set

    Return Value

    tile row

  • Get the tile row for the current result in the result set

    Declaration

    Objective-C

    - (GPKGTileRow *)tileRow:(GPKGResultSet *)results;

    Swift

    func tileRow(_ results: GPKGResultSet!) -> GPKGTileRow!

    Parameters

    results

    result set

    Return Value

    tile row

  • Get the tile row for the row

    Declaration

    Objective-C

    - (GPKGTileRow *)rowWithRow:(GPKGRow *)row;

    Swift

    func row(with row: GPKGRow!) -> GPKGTileRow!

    Parameters

    row

    result row

    Return Value

    tile row

  • Create a new tile row

    Declaration

    Objective-C

    - (GPKGTileRow *)newRow;

    Swift

    func newRow() -> GPKGTileRow!

    Return Value

    tile row

  • 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

    Declaration

    Objective-C

    - (void)adjustTileMatrixLengths;

    Swift

    func adjustTileMatrixLengths()
  • Get the tile matrix at the zoom level

    Declaration

    Objective-C

    - (GPKGTileMatrix *)tileMatrixWithZoomLevel:(int)zoomLevel;

    Swift

    func tileMatrix(withZoomLevel zoomLevel: Int32) -> GPKGTileMatrix!

    Parameters

    zoomLevel

    zoom level

    Return Value

    tile matrix

  • Get the tile matrix at the min (first) zoom

    Declaration

    Objective-C

    - (GPKGTileMatrix *)tileMatrixAtMinZoom;

    Swift

    func tileMatrixAtMinZoom() -> GPKGTileMatrix!

    Return Value

    tile matrix

  • Get the Spatial Reference System

    Declaration

    Objective-C

    - (GPKGSpatialReferenceSystem *)srs;

    Swift

    func srs() -> GPKGSpatialReferenceSystem!

    Return Value

    srs

  • Get the Spatial Reference System id

    Declaration

    Objective-C

    - (NSNumber *)srsId;

    Swift

    func srsId() -> NSNumber!

    Return Value

    srs id

  • Query for a Tile

    Declaration

    Objective-C

    - (GPKGTileRow *)queryForTileWithColumn:(int)column
                                     andRow:(int)row
                               andZoomLevel:(int)zoomLevel;

    Swift

    func queryForTile(withColumn column: Int32, andRow row: Int32, andZoomLevel zoomLevel: Int32) -> GPKGTileRow!

    Parameters

    column

    column

    row

    row

    zoomLevel

    zoom level

    Return Value

    tile row

  • Query for a Tiles at a zoom level

    Declaration

    Objective-C

    - (GPKGResultSet *)queryforTileWithZoomLevel:(int)zoomLevel;

    Swift

    func queryforTile(withZoomLevel zoomLevel: Int32) -> GPKGResultSet!

    Parameters

    zoomLevel

    zoom level

    Return Value

    result set

  • Query for Tiles at a zoom level in descending row and column order

    Declaration

    Objective-C

    - (GPKGResultSet *)queryForTileDescending:(int)zoomLevel;

    Swift

    func query(forTileDescending zoomLevel: Int32) -> GPKGResultSet!

    Parameters

    zoomLevel

    zoom level

    Return Value

    result set

  • Query for Tiles at a zoom level and column

    Declaration

    Objective-C

    - (GPKGResultSet *)queryForTilesInColumn:(int)column
                                andZoomLevel:(int)zoomLevel;

    Swift

    func queryForTiles(inColumn column: Int32, andZoomLevel zoomLevel: Int32) -> GPKGResultSet!

    Parameters

    column

    column

    zoomLevel

    zoom level

    Return Value

    result set

  • Query for Tiles at a zoom level and row

    Declaration

    Objective-C

    - (GPKGResultSet *)queryForTilesInRow:(int)row andZoomLevel:(int)zoomLevel;

    Swift

    func queryForTiles(inRow row: Int32, andZoomLevel zoomLevel: Int32) -> GPKGResultSet!

    Parameters

    row

    row

    zoomLevel

    zoom level

    Return Value

    result set

  • Get the zoom level for the provided width and height in the default units

    Declaration

    Objective-C

    - (NSNumber *)zoomLevelWithLength:(double)length;

    Swift

    func zoomLevel(withLength length: Double) -> NSNumber!

    Parameters

    length

    length in default units

    Return Value

    zoom level

  • Get the zoom level for the provided width and height in the default units

    Declaration

    Objective-C

    - (NSNumber *)zoomLevelWithWidth:(double)width andHeight:(double)height;

    Swift

    func zoomLevel(withWidth width: Double, andHeight height: Double) -> NSNumber!

    Parameters

    width

    in default units

    height

    in default units

    Return Value

    zoom level

  • Get the closest zoom level for the provided width and height in the default units

    Declaration

    Objective-C

    - (NSNumber *)closestZoomLevelWithLength:(double)length;

    Swift

    func closestZoomLevel(withLength length: Double) -> NSNumber!

    Parameters

    length

    in default units

    Return Value

    zoom level

  • Get the closest zoom level for the provided width and height in the default units

    Declaration

    Objective-C

    - (NSNumber *)closestZoomLevelWithWidth:(double)width andHeight:(double)height;

    Swift

    func closestZoomLevel(withWidth width: Double, andHeight height: Double) -> NSNumber!

    Parameters

    width

    in default units

    height

    in default units

    Return Value

    zoom level

  • 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.

    Declaration

    Objective-C

    - (NSNumber *)approximateZoomLevelWithLength:(double)length;

    Swift

    func approximateZoomLevel(withLength length: Double) -> NSNumber!

    Parameters

    length

    length in default units

    Return Value

    approximate zoom level

  • 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.

    Declaration

    Objective-C

    - (NSNumber *)approximateZoomLevelWithWidth:(double)width
                                      andHeight:(double)height;

    Swift

    func approximateZoomLevel(withWidth width: Double, andHeight height: Double) -> NSNumber!

    Parameters

    width

    width in default units

    height

    height in default units

    Return Value

    approximate zoom level

  • Query by tile grid and zoom level

    Declaration

    Objective-C

    - (GPKGResultSet *)queryByTileGrid:(GPKGTileGrid *)tileGrid
                          andZoomLevel:(int)zoomLevel;

    Swift

    func query(by tileGrid: GPKGTileGrid!, andZoomLevel zoomLevel: Int32) -> GPKGResultSet!

    Parameters

    tileGrid

    tile grid

    zoomLevel

    zoom level

    Return Value

    result set

  • Query by tile grid and zoom level

    Declaration

    Objective-C

    - (GPKGResultSet *)queryByTileGrid:(GPKGTileGrid *)tileGrid
                          andZoomLevel:(int)zoomLevel
                            andOrderBy:(NSString *)orderBy;

    Swift

    func query(by tileGrid: GPKGTileGrid!, andZoomLevel zoomLevel: Int32, andOrderBy orderBy: String!) -> GPKGResultSet!

    Parameters

    tileGrid

    tile grid

    zoomLevel

    zoom level

    orderBy

    order by

    Return Value

    result set

  • Query for the bounding tile grid with tiles at the zoom level

    Declaration

    Objective-C

    - (GPKGTileGrid *)queryForTileGridWithZoomLevel:(int)zoomLevel;

    Swift

    func queryForTileGrid(withZoomLevel zoomLevel: Int32) -> GPKGTileGrid!

    Parameters

    zoomLevel

    zoom level

    Return Value

    tile grid of tiles at the zoom level

  • Delete a Tile

    Declaration

    Objective-C

    - (int)deleteTileWithColumn:(int)column
                         andRow:(int)row
                   andZoomLevel:(int)zoomLevel;

    Swift

    func deleteTile(withColumn column: Int32, andRow row: Int32, andZoomLevel zoomLevel: Int32) -> Int32

    Parameters

    column

    column

    row

    row

    zoomLevel

    zoom level

    Return Value

    number deleted, should be 0 or 1

  • Count of Tiles at a zoom level

    Declaration

    Objective-C

    - (int)countWithZoomLevel:(int)zoomLevel;

    Swift

    func count(withZoomLevel zoomLevel: Int32) -> Int32

    Parameters

    zoomLevel

    zoom level

    Return Value

    count

  • Get the max length in default units that contains tiles

    Declaration

    Objective-C

    - (double)maxLength;

    Swift

    func maxLength() -> Double

    Return Value

    max distance length with tiles

  • Get the min length in default units that contains tiles

    Declaration

    Objective-C

    - (double)minLength;

    Swift

    func minLength() -> Double

    Return Value

    min distance length with tiles

  • Determine if the tiles are in the XYZ tile coordinate format

    Declaration

    Objective-C

    - (BOOL)isXYZTiles;

    Swift

    func isXYZTiles() -> Bool

    Return Value

    true if XYZ tile format

  • Get the map zoom level range

    Declaration

    Objective-C

    - (int *)mapZoomRange;

    Swift

    func mapZoomRange() -> UnsafeMutablePointer<Int32>!

    Return Value

    map zoom level range, min at index 0, max at index 1

  • Get the map min zoom level

    Declaration

    Objective-C

    - (int)mapMinZoom;

    Swift

    func mapMinZoom() -> Int32

    Return Value

    map min zoom level

  • Get the map max zoom level

    Declaration

    Objective-C

    - (int)mapMaxZoom;

    Swift

    func mapMaxZoom() -> Int32

    Return Value

    map max zoom level

  • Get the map zoom level from the tile matrix

    Declaration

    Objective-C

    - (int)mapZoomWithTileMatrix:(GPKGTileMatrix *)tileMatrix;

    Swift

    func mapZoom(with tileMatrix: GPKGTileMatrix!) -> Int32

    Parameters

    tileMatrix

    tile matrix

    Return Value

    map zoom level

  • Get the map zoom level from the tile matrix zoom level

    Declaration

    Objective-C

    - (int)mapZoomWithZoomLevel:(int)zoomLevel;

    Swift

    func mapZoom(withZoomLevel zoomLevel: Int32) -> Int32

    Parameters

    zoomLevel

    tile matrix zoom level

    Return Value

    map zoom level

  • Get a tile matrix set DAO

    Declaration

    Objective-C

    - (GPKGTileMatrixSetDao *)tileMatrixSetDao;

    Swift

    func tileMatrixSetDao() -> GPKGTileMatrixSetDao!

    Return Value

    tile matrix set DAO

  • Get a tile matrix DAO

    Declaration

    Objective-C

    - (GPKGTileMatrixDao *)tileMatrixDao;

    Swift

    func tileMatrixDao() -> GPKGTileMatrixDao!

    Return Value

    tile matrix DAO