GPKGTileDaoUtils
Objective-C
@interface GPKGTileDaoUtils : NSObject
Swift
class GPKGTileDaoUtils : NSObject
Tile Data Access Object utilities
-
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)adjustTileMatrixLengthsWithTileMatrixSet: (GPKGTileMatrixSet *)tileMatrixSet andTileMatrices: (NSArray<GPKGTileMatrix *> *)tileMatrices;Swift
class func adjustTileMatrixLengths(with tileMatrixSet: GPKGTileMatrixSet!, andTileMatrices tileMatrices: [GPKGTileMatrix]!)Parameters
tileMatrixSettile matrix set
tileMatricestile matrices
-
Get the zoom level for the provided width and height in the default units
Declaration
Objective-C
+ (NSNumber *)zoomLevelWithWidths:(NSArray *)widths andHeights:(NSArray *)heights andTileMatrices:(NSArray<GPKGTileMatrix *> *)tileMatrices andLength:(double)length;Swift
class func zoomLevel(withWidths widths: [Any]!, andHeights heights: [Any]!, andTileMatrices tileMatrices: [GPKGTileMatrix]!, andLength length: Double) -> NSNumber!Parameters
widthswidths
heightsheights
tileMatricestile matrices
lengthlength 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 *)zoomLevelWithWidths:(NSArray *)widths andHeights:(NSArray *)heights andTileMatrices:(NSArray<GPKGTileMatrix *> *)tileMatrices andWidth:(double)width andHeight:(double)height;Swift
class func zoomLevel(withWidths widths: [Any]!, andHeights heights: [Any]!, andTileMatrices tileMatrices: [GPKGTileMatrix]!, andWidth width: Double, andHeight height: Double) -> NSNumber!Parameters
widthssorted widths
heightssorted heights
tileMatricestile matrices
widthin default units
heightin default units
Return Value
tile matrix zoom level
-
Get the closest zoom level for the provided width and height in the default units
Declaration
Objective-C
+ (NSNumber *)closestZoomLevelWithWidths:(NSArray *)widths andHeights:(NSArray *)heights andTileMatrices: (NSArray<GPKGTileMatrix *> *)tileMatrices andLength:(double)length;Swift
class func closestZoomLevel(withWidths widths: [Any]!, andHeights heights: [Any]!, andTileMatrices tileMatrices: [GPKGTileMatrix]!, andLength length: Double) -> NSNumber!Parameters
widthssorted widths
heightssorted heights
tileMatricestile matrices
lengthin default units
Return Value
tile matrix zoom level
-
Get the closest zoom level for the provided width and height in the default units
Declaration
Objective-C
+ (NSNumber *)closestZoomLevelWithWidths:(NSArray *)widths andHeights:(NSArray *)heights andTileMatrices: (NSArray<GPKGTileMatrix *> *)tileMatrices andWidth:(double)width andHeight:(double)height;Swift
class func closestZoomLevel(withWidths widths: [Any]!, andHeights heights: [Any]!, andTileMatrices tileMatrices: [GPKGTileMatrix]!, andWidth width: Double, andHeight height: Double) -> NSNumber!Parameters
widthssorted widths
heightssorted heights
tileMatricestile matrices
widthin default units
heightin default units
Return Value
tile matrix 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 *)approximateZoomLevelWithWidths:(NSArray *)widths andHeights:(NSArray *)heights andTileMatrices: (NSArray<GPKGTileMatrix *> *)tileMatrices andLength:(double)length;Swift
class func approximateZoomLevel(withWidths widths: [Any]!, andHeights heights: [Any]!, andTileMatrices tileMatrices: [GPKGTileMatrix]!, andLength length: Double) -> NSNumber!Parameters
widthssorted widths
heightssorted heights
tileMatricestile matrices
lengthlength in default units
Return Value
actual or approximate tile matrix 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 *)approximateZoomLevelWithWidths:(NSArray *)widths andHeights:(NSArray *)heights andTileMatrices: (NSArray<GPKGTileMatrix *> *)tileMatrices andWidth:(double)width andHeight:(double)height;Swift
class func approximateZoomLevel(withWidths widths: [Any]!, andHeights heights: [Any]!, andTileMatrices tileMatrices: [GPKGTileMatrix]!, andWidth width: Double, andHeight height: Double) -> NSNumber!Parameters
widthssorted widths
heightssorted heights
tileMatricestile matrices
widthwidth in default units
heightheight in default units
Return Value
actual or approximate tile matrix zoom level
-
Get the max distance length that matches the tile widths and heights
Declaration
Objective-C
+ (double)maxLengthWithWidths:(NSArray *)widths andHeights:(NSArray *)heights;Swift
class func maxLength(withWidths widths: [Any]!, andHeights heights: [Any]!) -> DoubleParameters
widthssorted tile matrix widths
heightssorted tile matrix heights
Return Value
max length
-
Get the min distance length that matches the tile widths and heights
Declaration
Objective-C
+ (double)minLengthWithWidths:(NSArray *)widths andHeights:(NSArray *)heights;Swift
class func minLength(withWidths widths: [Any]!, andHeights heights: [Any]!) -> DoubleParameters
widthssorted tile matrix widths
heightssorted tile matrix heights
Return Value
min length
-
Get the map zoom level range
Declaration
Objective-C
+ (int *) mapZoomRangeWithTileMatrixSetDao:(GPKGTileMatrixSetDao *)tileMatrixSetDao andTileMatrixSet:(GPKGTileMatrixSet *)tileMatrixSet andTileMatrices:(NSArray<GPKGTileMatrix *> *)tileMatrices;Swift
class func mapZoomRange(with tileMatrixSetDao: GPKGTileMatrixSetDao!, andTileMatrixSet tileMatrixSet: GPKGTileMatrixSet!, andTileMatrices tileMatrices: [GPKGTileMatrix]!) -> UnsafeMutablePointer<Int32>!Parameters
tileMatrixSetDaotile matrix set dao
tileMatrixSettile matrix set
tileMatricestile matrices
Return Value
map zoom level range, min at index 0, max at index 1
-
Get the map min zoom level
Declaration
Objective-C
+ (int)mapMinZoomWithTileMatrixSetDao:(GPKGTileMatrixSetDao *)tileMatrixSetDao andTileMatrixSet:(GPKGTileMatrixSet *)tileMatrixSet andTileMatrices:(NSArray<GPKGTileMatrix *> *)tileMatrices;Swift
class func mapMinZoom(with tileMatrixSetDao: GPKGTileMatrixSetDao!, andTileMatrixSet tileMatrixSet: GPKGTileMatrixSet!, andTileMatrices tileMatrices: [GPKGTileMatrix]!) -> Int32Parameters
tileMatrixSetDaotile matrix set dao
tileMatrixSettile matrix set
tileMatricestile matrices
Return Value
map min zoom level
-
Get the map max zoom level
Declaration
Objective-C
+ (int)mapMaxZoomWithTileMatrixSetDao:(GPKGTileMatrixSetDao *)tileMatrixSetDao andTileMatrixSet:(GPKGTileMatrixSet *)tileMatrixSet andTileMatrices:(NSArray<GPKGTileMatrix *> *)tileMatrices;Swift
class func mapMaxZoom(with tileMatrixSetDao: GPKGTileMatrixSetDao!, andTileMatrixSet tileMatrixSet: GPKGTileMatrixSet!, andTileMatrices tileMatrices: [GPKGTileMatrix]!) -> Int32Parameters
tileMatrixSetDaotile matrix set dao
tileMatrixSettile matrix set
tileMatricestile matrices
Return Value
map max zoom level
-
Get the map zoom level
Declaration
Objective-C
+ (int)mapZoomWithTileMatrixSetDao:(GPKGTileMatrixSetDao *)tileMatrixSetDao andTileMatrixSet:(GPKGTileMatrixSet *)tileMatrixSet andTileMatrix:(GPKGTileMatrix *)tileMatrix;Swift
class func mapZoom(with tileMatrixSetDao: GPKGTileMatrixSetDao!, andTileMatrixSet tileMatrixSet: GPKGTileMatrixSet!, andTileMatrix tileMatrix: GPKGTileMatrix!) -> Int32Parameters
tileMatrixSetDaotile matrix set dao
tileMatrixSettile matrix set
tileMatrixtile matrix
Return Value
map zoom level
View on GitHub
GPKGTileDaoUtils Class Reference