GPKGFeatureTiles

Objective-C

@interface GPKGFeatureTiles : NSObject

Swift

class GPKGFeatureTiles : NSObject

Tiles drawn from or linked to features. Used to query features and optionally draw tiles from those features.

  • When not null, features are retrieved using a feature index

    Declaration

    Objective-C

    @property (nonatomic, strong) GPKGFeatureIndexManager *indexManager;

    Swift

    var indexManager: GPKGFeatureIndexManager! { get set }
  • Feature Style extension

    Declaration

    Objective-C

    @property (nonatomic, strong) GPKGFeatureTableStyles *featureTableStyles;

    Swift

    var featureTableStyles: GPKGFeatureTableStyles! { get set }
  • Tile width

    Declaration

    Objective-C

    @property (nonatomic) int tileWidth;

    Swift

    var tileWidth: Int32 { get set }
  • Tile height

    Declaration

    Objective-C

    @property (nonatomic) int tileHeight;

    Swift

    var tileHeight: Int32 { get set }
  • Compress format

    Declaration

    Objective-C

    @property (nonatomic) enum GPKGCompressFormat compressFormat;

    Swift

    var compressFormat: GPKGCompressFormat { get set }
  • Point radius

    Declaration

    Objective-C

    @property (nonatomic) double pointRadius;

    Swift

    var pointRadius: Double { get set }
  • Point color

    Declaration

    Objective-C

    @property (nonatomic) int *pointColor;

    Swift

    var pointColor: UnsafeMutablePointer<Int32>! { get set }
  • Optional point icon in place of a drawn circle

    Declaration

    Objective-C

    @property (nonatomic, strong) GPKGFeatureTilePointIcon *pointIcon;

    Swift

    var pointIcon: GPKGFeatureTilePointIcon! { get set }
  • Line stroke width

    Declaration

    Objective-C

    @property (nonatomic) double lineStrokeWidth;

    Swift

    var lineStrokeWidth: Double { get set }
  • Line color

    Declaration

    Objective-C

    @property (nonatomic) int *lineColor;

    Swift

    var lineColor: UnsafeMutablePointer<Int32>! { get set }
  • Polygon stroke width

    Declaration

    Objective-C

    @property (nonatomic) double polygonStrokeWidth;

    Swift

    var polygonStrokeWidth: Double { get set }
  • Polygon color

    Declaration

    Objective-C

    @property (nonatomic) int *polygonColor;

    Swift

    var polygonColor: UnsafeMutablePointer<Int32>! { get set }
  • When true, polygon is filled with color

    Declaration

    Objective-C

    @property (nonatomic) BOOL fillPolygon;

    Swift

    var fillPolygon: Bool { get set }
  • Polygon fill color

    Declaration

    Objective-C

    @property (nonatomic) int *polygonFillColor;

    Swift

    var polygonFillColor: UnsafeMutablePointer<Int32>! { get set }
  • Height overlapping pixels between tile images

    Declaration

    Objective-C

    @property (nonatomic) double heightOverlap;

    Swift

    var heightOverlap: Double { get set }
  • Width overlapping pixels between tile images

    Declaration

    Objective-C

    @property (nonatomic) double widthOverlap;

    Swift

    var widthOverlap: Double { get set }
  • Optional max features per tile. When more features than this value exist for creating a single tile, the tile is not created

    Declaration

    Objective-C

    @property (nonatomic, strong) NSNumber *maxFeaturesPerTile;

    Swift

    var maxFeaturesPerTile: NSNumber! { get set }
  • When not null and the number of features is greater than the max features per tile, used to draw tiles for those tiles with more features than the max

    Declaration

    Objective-C

    @property (nonatomic, strong) NSObject<GPKGCustomFeaturesTile> *maxFeaturesTileDraw;

    Swift

    var maxFeaturesTileDraw: (any GPKGCustomFeaturesTile)! { get set }
  • When true, geometries are simplified before being drawn. Default is true

    Declaration

    Objective-C

    @property (nonatomic) BOOL simplifyGeometries;

    Swift

    var simplifyGeometries: Bool { get set }
  • Draw geometries using geodesic lines

    Declaration

    Objective-C

    @property (nonatomic) BOOL geodesic;

    Swift

    var geodesic: Bool { get set }
  • Scale factor from pixels to map points

    Declaration

    Objective-C

    @property (nonatomic) float scale;

    Swift

    var scale: Float { get set }
  • When true, geometry bounds are cached. Default is true

    Declaration

    Objective-C

    @property (nonatomic) BOOL cacheBoundingBoxes;

    Swift

    var cacheBoundingBoxes: Bool { get set }
  • When true, geometry map shapes are cached. Default is true

    Declaration

    Objective-C

    @property (nonatomic) BOOL cacheMapShapes;

    Swift

    var cacheMapShapes: Bool { get set }
  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithFeatureDao:(GPKGFeatureDao *)featureDao;

    Swift

    init!(featureDao: GPKGFeatureDao!)

    Parameters

    featureDao

    feature dao

    Return Value

    new feature tiles

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithFeatureDao:(GPKGFeatureDao *)featureDao
                           andGeodesic:(BOOL)geodesic;

    Swift

    init!(featureDao: GPKGFeatureDao!, andGeodesic geodesic: Bool)

    Parameters

    featureDao

    feature dao

    geodesic

    draw geometries using geodesic lines

    Return Value

    new feature tiles

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithFeatureDao:(GPKGFeatureDao *)featureDao
                              andScale:(float)scale;

    Swift

    init!(featureDao: GPKGFeatureDao!, andScale scale: Float)

    Parameters

    featureDao

    feature dao

    scale

    scale factor

    Return Value

    new feature tiles

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithFeatureDao:(GPKGFeatureDao *)featureDao
                              andScale:(float)scale
                           andGeodesic:(BOOL)geodesic;

    Swift

    init!(featureDao: GPKGFeatureDao!, andScale scale: Float, andGeodesic geodesic: Bool)

    Parameters

    featureDao

    feature dao

    scale

    scale factor

    geodesic

    draw geometries using geodesic lines

    Return Value

    new feature tiles

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithFeatureDao:(GPKGFeatureDao *)featureDao
                              andWidth:(int)width
                             andHeight:(int)height;

    Swift

    init!(featureDao: GPKGFeatureDao!, andWidth width: Int32, andHeight height: Int32)

    Parameters

    featureDao

    feature dao

    width

    drawn tile width

    height

    drawn tile height

    Return Value

    new feature tiles

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithFeatureDao:(GPKGFeatureDao *)featureDao
                              andWidth:(int)width
                             andHeight:(int)height
                           andGeodesic:(BOOL)geodesic;

    Swift

    init!(featureDao: GPKGFeatureDao!, andWidth width: Int32, andHeight height: Int32, andGeodesic geodesic: Bool)

    Parameters

    featureDao

    feature dao

    width

    drawn tile width

    height

    drawn tile height

    geodesic

    draw geometries using geodesic lines

    Return Value

    new feature tiles

  • Initialize, auto creates the index manager for indexed tables and feature styles for styled tables

    Declaration

    Objective-C

    - (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage
                         andFeatureDao:(GPKGFeatureDao *)featureDao;

    Swift

    init!(geoPackage: GPKGGeoPackage!, andFeatureDao featureDao: GPKGFeatureDao!)

    Parameters

    geoPackage

    GeoPackage

    featureDao

    feature dao

    Return Value

    new feature tiles

  • Initialize, auto creates the index manager for indexed tables and feature styles for styled tables

    Declaration

    Objective-C

    - (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage
                         andFeatureDao:(GPKGFeatureDao *)featureDao
                           andGeodesic:(BOOL)geodesic;

    Swift

    init!(geoPackage: GPKGGeoPackage!, andFeatureDao featureDao: GPKGFeatureDao!, andGeodesic geodesic: Bool)

    Parameters

    geoPackage

    GeoPackage

    featureDao

    feature dao

    geodesic

    draw geometries using geodesic lines

    Return Value

    new feature tiles

  • Initialize, auto creates the index manager for indexed tables and feature styles for styled tables

    Declaration

    Objective-C

    - (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage
                         andFeatureDao:(GPKGFeatureDao *)featureDao
                              andScale:(float)scale;

    Swift

    init!(geoPackage: GPKGGeoPackage!, andFeatureDao featureDao: GPKGFeatureDao!, andScale scale: Float)

    Parameters

    geoPackage

    GeoPackage

    featureDao

    feature dao

    scale

    scale factor

    Return Value

    new feature tiles

  • Initialize, auto creates the index manager for indexed tables and feature styles for styled tables

    Declaration

    Objective-C

    - (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage
                         andFeatureDao:(GPKGFeatureDao *)featureDao
                              andScale:(float)scale
                           andGeodesic:(BOOL)geodesic;

    Swift

    init!(geoPackage: GPKGGeoPackage!, andFeatureDao featureDao: GPKGFeatureDao!, andScale scale: Float, andGeodesic geodesic: Bool)

    Parameters

    geoPackage

    GeoPackage

    featureDao

    feature dao

    scale

    scale factor

    geodesic

    draw geometries using geodesic lines

    Return Value

    new feature tiles

  • Initialize, auto creates the index manager for indexed tables and feature styles for styled tables

    Declaration

    Objective-C

    - (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage
                         andFeatureDao:(GPKGFeatureDao *)featureDao
                              andWidth:(int)width
                             andHeight:(int)height;

    Swift

    init!(geoPackage: GPKGGeoPackage!, andFeatureDao featureDao: GPKGFeatureDao!, andWidth width: Int32, andHeight height: Int32)

    Parameters

    geoPackage

    GeoPackage

    featureDao

    feature dao

    width

    drawn tile width

    height

    drawn tile height

    Return Value

    new feature tiles

  • Initialize, auto creates the index manager for indexed tables and feature styles for styled tables

    Declaration

    Objective-C

    - (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage
                         andFeatureDao:(GPKGFeatureDao *)featureDao
                              andWidth:(int)width
                             andHeight:(int)height
                           andGeodesic:(BOOL)geodesic;

    Swift

    init!(geoPackage: GPKGGeoPackage!, andFeatureDao featureDao: GPKGFeatureDao!, andWidth width: Int32, andHeight height: Int32, andGeodesic geodesic: Bool)

    Parameters

    geoPackage

    GeoPackage

    featureDao

    feature dao

    width

    drawn tile width

    height

    drawn tile height

    geodesic

    draw geometries using geodesic lines

    Return Value

    new feature tiles

  • Initialize, auto creates the index manager for indexed tables and feature styles for styled tables

    Declaration

    Objective-C

    - (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage
                         andFeatureDao:(GPKGFeatureDao *)featureDao
                              andScale:(float)scale
                              andWidth:(int)width
                             andHeight:(int)height;

    Swift

    init!(geoPackage: GPKGGeoPackage!, andFeatureDao featureDao: GPKGFeatureDao!, andScale scale: Float, andWidth width: Int32, andHeight height: Int32)

    Parameters

    geoPackage

    GeoPackage

    featureDao

    feature dao

    scale

    scale factor

    width

    drawn tile width

    height

    drawn tile height

    Return Value

    new feature tiles

  • Initialize, auto creates the index manager for indexed tables and feature styles for styled tables

    Declaration

    Objective-C

    - (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage
                         andFeatureDao:(GPKGFeatureDao *)featureDao
                              andScale:(float)scale
                              andWidth:(int)width
                             andHeight:(int)height
                           andGeodesic:(BOOL)geodesic;

    Swift

    init!(geoPackage: GPKGGeoPackage!, andFeatureDao featureDao: GPKGFeatureDao!, andScale scale: Float, andWidth width: Int32, andHeight height: Int32, andGeodesic geodesic: Bool)

    Parameters

    geoPackage

    GeoPackage

    featureDao

    feature dao

    scale

    scale factor

    width

    drawn tile width

    height

    drawn tile height

    geodesic

    draw geometries using geodesic lines

    Return Value

    new feature tiles

  • Get the feature dao

    Declaration

    Objective-C

    - (GPKGFeatureDao *)featureDao;

    Swift

    func featureDao() -> GPKGFeatureDao!

    Return Value

    feature dao

  • Close the feature tiles connection

    Declaration

    Objective-C

    - (void)close;

    Swift

    func close()
  • Call after making changes to the point icon, point radius, or paint stroke widths. Determines the pixel overlap between tiles

    Declaration

    Objective-C

    - (void)calculateDrawOverlap;

    Swift

    func calculateDrawOverlap()
  • Manually set the width and height draw overlap

    Declaration

    Objective-C

    - (void)setDrawOverlapsWithPixels:(double)pixels;

    Swift

    func setDrawOverlapsWithPixels(_ pixels: Double)

    Parameters

    pixels

    pixels

  • Is index query

    Declaration

    Objective-C

    - (BOOL)isIndexQuery;

    Swift

    func isIndexQuery() -> Bool

    Return Value

    true if an index query

  • Ignore the feature table styles within the GeoPackage

    Declaration

    Objective-C

    - (void)ignoreFeatureTableStyles;

    Swift

    func ignoreFeatureTableStyles()
  • Clear all caches

    Declaration

    Objective-C

    - (void)clearCache;

    Swift

    func clearCache()
  • Clear the icon cache

    Declaration

    Objective-C

    - (void)clearIconCache;

    Swift

    func clearIconCache()
  • Set / resize the icon cache size

    Declaration

    Objective-C

    - (void)setIconCacheSize:(int)size;

    Swift

    func setIconCacheSize(_ size: Int32)

    Parameters

    size

    new size

  • Clear the bounding box cache

    Declaration

    Objective-C

    - (void)clearBoundingBoxCache;

    Swift

    func clearBoundingBoxCache()
  • Set / resize the bounding box cache size

    Declaration

    Objective-C

    - (void)setBoundingBoxCacheSize:(int)size;

    Swift

    func setBoundingBoxCacheSize(_ size: Int32)

    Parameters

    size

    new size

  • Clear the map shape cache

    Declaration

    Objective-C

    - (void)clearMapShapeCache;

    Swift

    func clearMapShapeCache()
  • Set / resize the map shape cache size

    Declaration

    Objective-C

    - (void)setMapShapeCacheSize:(int)size;

    Swift

    func setMapShapeCacheSize(_ size: Int32)

    Parameters

    size

    new size

  • Draw the tile and get the tile data from the x, y, and zoom level

    Declaration

    Objective-C

    - (NSData *)drawTileDataWithX:(int)x andY:(int)y andZoom:(int)zoom;

    Swift

    func drawTileDataWith(x: Int32, andY y: Int32, andZoom zoom: Int32) -> Data!

    Parameters

    x

    x

    y

    y

    zoom

    zoom level

    Return Value

    tile data, or nil

  • Draw a tile image from the x, y, and zoom level

    Declaration

    Objective-C

    - (id)drawTileWithX:(int)x andY:(int)y andZoom:(int)zoom;

    Swift

    func drawTileWith(x: Int32, andY y: Int32, andZoom zoom: Int32) -> Any!

    Parameters

    x

    x

    y

    y

    zoom

    zoom level

    Return Value

    tile image, or nil

  • Draw a tile bitmap from the x, y, and zoom level by querying features in the tile location

    Declaration

    Objective-C

    - (id)drawTileQueryIndexWithX:(int)x andY:(int)y andZoom:(int)zoom;

    Swift

    func drawTileQueryIndexWith(x: Int32, andY y: Int32, andZoom zoom: Int32) -> Any!

    Parameters

    x

    x

    y

    y

    zoom

    zoom level

    Return Value

    tile image, or nil

  • Query for feature result count in the x, y, and zoom

    Declaration

    Objective-C

    - (int)queryIndexedFeaturesCountWithX:(int)x andY:(int)y andZoom:(int)zoom;

    Swift

    func queryIndexedFeaturesCountWith(x: Int32, andY y: Int32, andZoom zoom: Int32) -> Int32

    Parameters

    x

    x

    y

    y

    zoom

    zoom level

    Return Value

    feature count

  • Query for feature result count in the bounding box

    Declaration

    Objective-C

    - (int)queryIndexedFeaturesCountWithWebMercatorBoundingBox:
        (GPKGBoundingBox *)webMercatorBoundingBox;

    Swift

    func queryIndexedFeaturesCount(withWebMercatorBoundingBox webMercatorBoundingBox: GPKGBoundingBox!) -> Int32

    Parameters

    webMercatorBoundingBox

    web mercator bounding box

    Return Value

    feature count

  • Query for feature results in the x, y, and zoom level by querying features in the tile location

    Declaration

    Objective-C

    - (GPKGFeatureIndexResults *)queryIndexedFeaturesWithX:(int)x
                                                      andY:(int)y
                                                   andZoom:(int)zoom;

    Swift

    func queryIndexedFeaturesWith(x: Int32, andY y: Int32, andZoom zoom: Int32) -> GPKGFeatureIndexResults!

    Parameters

    x

    x coordinate

    y

    y coordinate

    zoom

    zoom level

    Return Value

    feature index results

  • Query for feature results in the x, y, and zoom level by querying features in the tile location

    Declaration

    Objective-C

    - (GPKGFeatureIndexResults *)queryIndexedFeaturesWithWebMercatorBoundingBox:
        (GPKGBoundingBox *)webMercatorBoundingBox;

    Swift

    func queryIndexedFeatures(withWebMercatorBoundingBox webMercatorBoundingBox: GPKGBoundingBox!) -> GPKGFeatureIndexResults!

    Parameters

    webMercatorBoundingBox

    web mercator bounding box

    Return Value

    feature index results

  • Create an expanded bounding box to handle features outside the tile that overlap

    Declaration

    Objective-C

    - (GPKGBoundingBox *)expandBoundingBox:(GPKGBoundingBox *)boundingBox
                              inProjection:(PROJProjection *)projection;

    Swift

    func expand(_ boundingBox: GPKGBoundingBox!, in projection: PROJProjection!) -> GPKGBoundingBox!

    Parameters

    boundingBox

    bounding box

    projection

    bounding box projection

    Return Value

    bounding box

  • Create an expanded bounding box to handle features outside the tile that overlap

    Declaration

    Objective-C

    - (GPKGBoundingBox *)expandBoundingBox:
        (GPKGBoundingBox *)webMercatorBoundingBox;

    Swift

    func expand(_ webMercatorBoundingBox: GPKGBoundingBox!) -> GPKGBoundingBox!

    Parameters

    webMercatorBoundingBox

    web mercator bounding box

    Return Value

    bounding box

  • Create an expanded bounding box to handle features outside the tile that overlap

    Declaration

    Objective-C

    - (GPKGBoundingBox *)expandBoundingBox:(GPKGBoundingBox *)webMercatorBoundingBox
                       withTileBoundingBox:
                           (GPKGBoundingBox *)tileWebMercatorBoundingBox;

    Swift

    func expand(_ webMercatorBoundingBox: GPKGBoundingBox!, withTileBoundingBox tileWebMercatorBoundingBox: GPKGBoundingBox!) -> GPKGBoundingBox!

    Parameters

    webMercatorBoundingBox

    web mercator bounding box

    tileWebMercatorBoundingBox

    tile web mercator bounding box

    Return Value

    bounding box

  • Draw a tile image from the x, y, and zoom level by querying all features. This could be very slow if there are a lot of features

    Declaration

    Objective-C

    - (id)drawTileQueryAllWithX:(int)x andY:(int)y andZoom:(int)zoom;

    Swift

    func drawTileQueryAllWith(x: Int32, andY y: Int32, andZoom zoom: Int32) -> Any!

    Parameters

    x

    x

    y

    y

    zoom

    zoom level

    Return Value

    tile image, or nil

  • Calculate style pixel bounds

    Declaration

    Objective-C

    - (GPKGPixelBounds *)calculateStylePixelBounds;

    Swift

    func calculateStylePixelBounds() -> GPKGPixelBounds!

    Return Value

    pixel bounds

  • Calculate style pixel bounds

    Declaration

    Objective-C

    - (GPKGPixelBounds *)calculateStylePixelBoundsWithScale:(float)scale;

    Swift

    func calculateStylePixelBounds(withScale scale: Float) -> GPKGPixelBounds!

    Parameters

    scale

    scale factor

    Return Value

    pixel bounds

  • Draw a tile image from feature index results

    Declaration

    Objective-C

    - (id)drawTileWithZoom:(int)zoom
            andBoundingBox:(GPKGBoundingBox *)webMercatorBoundingBox
           andIndexResults:(GPKGFeatureIndexResults *)results;

    Swift

    func drawTile(withZoom zoom: Int32, andBoundingBox webMercatorBoundingBox: GPKGBoundingBox!, andIndexResults results: GPKGFeatureIndexResults!) -> Any!

    Parameters

    zoom

    zoom level

    webMercatorBoundingBox

    web mercator bounding box

    results

    feature index results

    Return Value

    tile image

  • Draw a tile image from feature geometries in the provided result set

    Declaration

    Objective-C

    - (id)drawTileWithZoom:(int)zoom
            andBoundingBox:(GPKGBoundingBox *)webMercatorBoundingBox
                andResults:(GPKGResultSet *)results;

    Swift

    func drawTile(withZoom zoom: Int32, andBoundingBox webMercatorBoundingBox: GPKGBoundingBox!, andResults results: GPKGResultSet!) -> Any!

    Parameters

    zoom

    zoom level

    webMercatorBoundingBox

    web mercator bounding box

    results

    result set

    Return Value

    tile image

  • Draw a tile image from the feature rows

    Declaration

    Objective-C

    - (id)drawTileWithZoom:(int)zoom
            andBoundingBox:(GPKGBoundingBox *)webMercatorBoundingBox
            andFeatureRows:(NSArray *)featureRows;

    Swift

    func drawTile(withZoom zoom: Int32, andBoundingBox webMercatorBoundingBox: GPKGBoundingBox!, andFeatureRows featureRows: [Any]!) -> Any!

    Parameters

    zoom

    zoom level

    webMercatorBoundingBox

    web mercator bounding box

    featureRows

    feature rows

    Return Value

    tile image