GPKGTileGenerator
Objective-C
@interface GPKGTileGenerator : NSObject
Swift
class GPKGTileGenerator : NSObject
Creates a set of tiles within a GeoPackage
-
GeoPackage
Declaration
Objective-C
@property (nonatomic, strong) GPKGGeoPackage *geoPackage;
Swift
var geoPackage: GPKGGeoPackage! { get set }
-
Table Name
Declaration
Objective-C
@property (nonatomic, strong) NSString *tableName;
Swift
var tableName: String! { get set }
-
Zoom levels
Declaration
Objective-C
@property (nonatomic, strong) NSMutableOrderedSet<NSNumber *> *zoomLevels;
Swift
var zoomLevels: NSMutableOrderedSet! { get set }
-
Tiles projection
Declaration
Objective-C
@property (nonatomic, strong) PROJProjection *projection;
Swift
var projection: PROJProjection! { get set }
-
Total tile count
Declaration
Objective-C
@property (nonatomic, strong) NSNumber *totalCount;
Swift
var totalCount: NSNumber! { get set }
-
Tile grids by zoom level
Declaration
Objective-C
@property (nonatomic, strong) NSMutableDictionary *tileGrids;
Swift
var tileGrids: NSMutableDictionary! { get set }
-
Tile bounding boxes by zoom level
Declaration
Objective-C
@property (nonatomic, strong) NSMutableDictionary *tileBounds;
Swift
var tileBounds: NSMutableDictionary! { get set }
-
Tile bounding box
Declaration
Objective-C
@property (nonatomic, strong) GPKGBoundingBox *boundingBox;
Swift
var boundingBox: GPKGBoundingBox! { get set }
-
Compress format
Declaration
Objective-C
@property (nonatomic) enum GPKGCompressFormat compressFormat;
Swift
var compressFormat: GPKGCompressFormat { get set }
-
Compress quality
Declaration
Objective-C
@property (nonatomic) CGFloat compressQuality;
Swift
var compressQuality: CGFloat { get set }
-
GeoPackage progress for callbacks
Declaration
Objective-C
@property (nonatomic, strong) NSObject<GPKGProgress> *progress;
Swift
var progress: (any GPKGProgress)! { get set }
-
True when generating tiles in standard z,x,y tile format, false when generating GeoPackage format where rows and columns do not match the standard row & column coordinates
Declaration
Objective-C
@property (nonatomic) BOOL xyzTiles;
Swift
var xyzTiles: Bool { get set }
-
Compress scale
Declaration
Objective-C
@property (nonatomic) CGFloat compressScale;
Swift
var compressScale: CGFloat { get set }
-
Tile grid bounding box
Declaration
Objective-C
@property (nonatomic, strong) GPKGBoundingBox *tileGridBoundingBox;
Swift
var tileGridBoundingBox: GPKGBoundingBox! { get set }
-
Matrix height when GeoPackage tile format
Declaration
Objective-C
@property (nonatomic) int matrixHeight;
Swift
var matrixHeight: Int32 { get set }
-
Matrix width when GeoPackage tile format
Declaration
Objective-C
@property (nonatomic) int matrixWidth;
Swift
var matrixWidth: Int32 { get set }
-
Tile scaling settings
Declaration
Objective-C
@property (nonatomic, strong) GPKGTileScaling *scaling;
Swift
var scaling: GPKGTileScaling! { get set }
-
Skip existing tiles
Declaration
Objective-C
@property (nonatomic) BOOL skipExisting;
Swift
var skipExisting: Bool { get set }
-
Initialize
Declaration
Objective-C
- (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage andTableName:(NSString *)tableName andBoundingBox:(GPKGBoundingBox *)boundingBox andProjection:(PROJProjection *)projection;
Swift
init!(geoPackage: GPKGGeoPackage!, andTableName tableName: String!, andBoundingBox boundingBox: GPKGBoundingBox!, andProjection projection: PROJProjection!)
Parameters
geoPackage
GeoPackage
tableName
table name
boundingBox
tiles bounding box
projection
tiles projection
Return Value
new tile generator
-
Initialize
Declaration
Objective-C
- (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage andTableName:(NSString *)tableName andZoom:(int)zoomLevel andBoundingBox:(GPKGBoundingBox *)boundingBox andProjection:(PROJProjection *)projection;
Swift
init!(geoPackage: GPKGGeoPackage!, andTableName tableName: String!, andZoom zoomLevel: Int32, andBoundingBox boundingBox: GPKGBoundingBox!, andProjection projection: PROJProjection!)
Parameters
geoPackage
GeoPackage
tableName
table name
zoomLevel
zoom level
boundingBox
tiles bounding box
projection
tiles projection
Return Value
new tile generator
-
Initialize
Declaration
Objective-C
- (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage andTableName:(NSString *)tableName andMinZoom:(int)minZoom andMaxZoom:(int)maxZoom andBoundingBox:(GPKGBoundingBox *)boundingBox andProjection:(PROJProjection *)projection;
Swift
init!(geoPackage: GPKGGeoPackage!, andTableName tableName: String!, andMinZoom minZoom: Int32, andMaxZoom maxZoom: Int32, andBoundingBox boundingBox: GPKGBoundingBox!, andProjection projection: PROJProjection!)
Parameters
geoPackage
GeoPackage
tableName
table name
minZoom
min zoom
maxZoom
max zoom
boundingBox
tiles bounding box
projection
tiles projection
Return Value
new tile generator
-
Initialize
Declaration
Objective-C
- (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage andTableName:(NSString *)tableName andZoomLevels:(NSArray<NSNumber *> *)zoomLevels andBoundingBox:(GPKGBoundingBox *)boundingBox andProjection:(PROJProjection *)projection;
Swift
init!(geoPackage: GPKGGeoPackage!, andTableName tableName: String!, andZoomLevels zoomLevels: [NSNumber]!, andBoundingBox boundingBox: GPKGBoundingBox!, andProjection projection: PROJProjection!)
Parameters
geoPackage
GeoPackage
tableName
table name
zoomLevels
zoom levels
boundingBox
tiles bounding box
projection
tiles projection
Return Value
new tile generator
-
Get the min zoom
Declaration
Objective-C
- (int)minZoom;
Swift
func minZoom() -> Int32
Return Value
min zoom
-
Get the max zoom
Declaration
Objective-C
- (int)maxZoom;
Swift
func maxZoom() -> Int32
Return Value
max zoom
-
Add a zoom level
Declaration
Objective-C
- (BOOL)addZoomLevel:(int)zoomLevel;
Swift
func addZoomLevel(_ zoomLevel: Int32) -> Bool
Parameters
zoomLevel
zoom level
Return Value
true if zoom level added
-
Add a range of zoom levels
Declaration
Objective-C
- (BOOL)addZoomLevelsFromMinZoom:(int)minZoom toMaxZoom:(int)maxZoom;
Swift
func addZoomLevels(fromMinZoom minZoom: Int32, toMaxZoom maxZoom: Int32) -> Bool
Parameters
minZoom
min zoom level
maxZoom
max zoom level
Return Value
true if at least one zoom level added
-
Add zoom levels
Declaration
Objective-C
- (BOOL)addZoomLevels:(NSArray<NSNumber *> *)zoomLevels;
Swift
func addZoomLevels(_ zoomLevels: [NSNumber]!) -> Bool
Parameters
zoomLevels
zoom levels
Return Value
true if at least one zoom level added
-
Get the bounding box, possibly expanded for the zoom level
Declaration
Objective-C
- (GPKGBoundingBox *)boundingBoxAtZoom:(int)zoom;
Swift
func boundingBox(atZoom zoom: Int32) -> GPKGBoundingBox!
Parameters
zoom
zoom level
Return Value
original or expanded bounding box
-
Set the compress quality as an integer percentage, 0 to 100
Declaration
Objective-C
- (void)setCompressQualityAsIntPercentage:(int)percentage;
Swift
func setCompressQualityAsIntPercentage(_ percentage: Int32)
Parameters
percentage
integer percentage
-
Set the compress scale as an integer percentage, 0 to 100
Declaration
Objective-C
- (void)setCompressScaleAsIntPercentage:(int)percentage;
Swift
func setCompressScaleAsIntPercentage(_ percentage: Int32)
Parameters
percentage
integer percentage
-
Get the tile count of tiles to be generated
Declaration
Objective-C
- (int)tileCount;
Swift
func tileCount() -> Int32
Return Value
tile count
-
Generate the tiles
Declaration
Objective-C
- (int)generateTiles;
Swift
func generateTiles() -> Int32
Return Value
tiles generated
-
Close the GeoPackage
Declaration
Objective-C
- (void)close;
Swift
func close()