GPKGCoverageData
Objective-C
@interface GPKGCoverageData : GPKGBaseExtension
Swift
class GPKGCoverageData : GPKGBaseExtension
Tiled Gridded Coverage Data, Common Encoding, Extension
-
Get a Tiled Gridded Coverage Data
Declaration
Objective-C
+ (GPKGCoverageData *)coverageDataWithGeoPackage:(GPKGGeoPackage *)geoPackage andTileDao:(GPKGTileDao *)tileDao andWidth:(NSNumber *)width andHeight:(NSNumber *)height andProjection: (PROJProjection *)requestProjection;
Parameters
geoPackage
GeoPackage
tileDao
tile dao
width
coverage data response width
height
coverage data response height
requestProjection
request projection
-
Get a Tiled Gridded Coverage Data, use the coverage data pixel tile size as the request size width and height
Declaration
Objective-C
+ (GPKGCoverageData *)coverageDataWithGeoPackage:(GPKGGeoPackage *)geoPackage andTileDao:(GPKGTileDao *)tileDao;
Swift
/*not inherited*/ init!(geoPackage: GPKGGeoPackage!, andTileDao tileDao: GPKGTileDao!)
Parameters
geoPackage
GeoPackage
tileDao
tile dao
-
Get a Tiled Gridded Coverage Data, use the coverage data pixel tile size as the request size width and height, request as the specified projection
Declaration
Objective-C
+ (GPKGCoverageData *)coverageDataWithGeoPackage:(GPKGGeoPackage *)geoPackage andTileDao:(GPKGTileDao *)tileDao andProjection: (PROJProjection *)requestProjection;
Swift
/*not inherited*/ init!(geoPackage: GPKGGeoPackage!, andTileDao tileDao: GPKGTileDao!, andProjection requestProjection: PROJProjection!)
Parameters
geoPackage
GeoPackage
tileDao
tile dao
requestProjection
request projection
-
Create the coverage data tile table with metadata and extension
Declaration
Objective-C
+ (GPKGCoverageData *) createTileTableWithGeoPackage:(GPKGGeoPackage *)geoPackage andMetadata:(GPKGTileTableMetadata *)metadata andDataType:(enum GPKGGriddedCoverageDataType)dataType;
Swift
class func createTileTable(with geoPackage: GPKGGeoPackage!, andMetadata metadata: GPKGTileTableMetadata!, andDataType dataType: GPKGGriddedCoverageDataType) -> GPKGCoverageData!
Parameters
geoPackage
GeoPackage
metadata
tile table metadata
dataType
gridded coverage data type
Return Value
coverage data
-
Extension name
Declaration
Objective-C
@property (nonatomic, strong) NSString *extensionName;
Swift
var extensionName: String! { get set }
-
Extension definition URL
Declaration
Objective-C
@property (nonatomic, strong) NSString *definition;
Swift
var definition: String! { get set }
-
Coverage Data results width
Declaration
Objective-C
@property (nonatomic, strong) NSNumber *width;
Swift
var width: NSNumber! { get set }
-
Coverage Data results height
Declaration
Objective-C
@property (nonatomic, strong) NSNumber *height;
Swift
var height: NSNumber! { get set }
-
True if zooming in should be performed to find a tile matrix with coverage data values
Declaration
Objective-C
@property (nonatomic) BOOL zoomIn;
Swift
var zoomIn: Bool { get set }
-
True if zooming out should be performed to find a tile matrix with coverage data values
Declaration
Objective-C
@property (nonatomic) BOOL zoomOut;
Swift
var zoomOut: Bool { get set }
-
True if zoom in in before zooming out, false to zoom out first
Declaration
Objective-C
@property (nonatomic) BOOL zoomInBeforeOut;
Swift
var zoomInBeforeOut: Bool { get set }
-
Tile Gridded Coverage Data Algorithm interpolation enumeration types
Declaration
Objective-C
enum GPKGCoverageDataAlgorithm {}
-
Interpolation algorithm
Declaration
Objective-C
@property (nonatomic) enum GPKGCoverageDataAlgorithm algorithm;
-
Value pixel encoding type
Declaration
Objective-C
@property (nonatomic) enum GPKGGriddedCoverageEncodingType encoding;
Swift
var encoding: GPKGGriddedCoverageEncodingType { get set }
-
Tile DAO
Declaration
Objective-C
@property (nonatomic, strong) GPKGTileDao *tileDao;
Swift
var tileDao: GPKGTileDao! { get set }
-
Initialize
Declaration
Objective-C
- (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage andTileDao:(GPKGTileDao *)tileDao andWidth:(NSNumber *)width andHeight:(NSNumber *)height andProjection:(PROJProjection *)requestProjection;
Swift
init!(geoPackage: GPKGGeoPackage!, andTileDao tileDao: GPKGTileDao!, andWidth width: NSNumber!, andHeight height: NSNumber!, andProjection requestProjection: PROJProjection!)
Parameters
geoPackage
GeoPackage
tileDao
tile dao
width
specified results width
height
specified results height
requestProjection
request projection
Return Value
new instance
-
Get the tile matrix set
Declaration
Objective-C
- (GPKGTileMatrixSet *)tileMatrixSet;
Swift
func tileMatrixSet() -> GPKGTileMatrixSet!
Return Value
tile matrix set
-
Get the gridded coverage dao
Declaration
Objective-C
- (GPKGGriddedCoverageDao *)griddedCoverageDao;
Swift
func griddedCoverageDao() -> GPKGGriddedCoverageDao!
Return Value
gridded coverage dao
-
Get the gridded tile dao
Declaration
Objective-C
- (GPKGGriddedTileDao *)griddedTileDao;
Swift
func griddedTileDao() -> GPKGGriddedTileDao!
Return Value
gridded tile dao
-
Get the request projection
Declaration
Objective-C
- (PROJProjection *)requestProjection;
Swift
func requestProjection() -> PROJProjection!
Return Value
request projection
-
Get the coverage data projection
Declaration
Objective-C
- (PROJProjection *)coverageProjection;
Swift
func coverageProjection() -> PROJProjection!
Return Value
coverage data projection
-
Get the coverage data bounding box
Declaration
Objective-C
- (GPKGBoundingBox *)coverageBoundingBox;
Swift
func coverageBoundingBox() -> GPKGBoundingBox!
Return Value
coverage data bounding box
-
Is the request and coverage data projection the same
Declaration
Objective-C
- (BOOL)isSameProjection;
Swift
func isSameProjection() -> Bool
Return Value
true if the same
-
Get or create the extension
Declaration
Objective-C
- (NSArray *)extensionCreate;
Swift
func extensionCreate() -> [Any]!
Return Value
extensions array
-
Determine if the Tile Matrix Set has the extension
Declaration
Objective-C
- (BOOL)has;
Swift
func has() -> Bool
Return Value
true if has extension
-
Get a 2D Gridded Coverage DAO
Declaration
Objective-C
+ (GPKGGriddedCoverageDao *)griddedCoverageDaoWithGeoPackage: (GPKGGeoPackage *)geoPackage;
Swift
class func griddedCoverageDao(with geoPackage: GPKGGeoPackage!) -> GPKGGriddedCoverageDao!
Parameters
geoPackage
GeoPackage
Return Value
2d gridded coverage dao
-
Get a 2D Gridded Coverage DAO
Declaration
Objective-C
+ (GPKGGriddedCoverageDao *)griddedCoverageDaoWithDatabase: (GPKGConnection *)database;
Swift
class func griddedCoverageDao(withDatabase database: GPKGConnection!) -> GPKGGriddedCoverageDao!
Parameters
database
database connection
Return Value
2d gridded coverage dao
-
Create the 2D Gridded Coverage Table if it does not exist
Declaration
Objective-C
- (BOOL)createGriddedCoverageTable;
Swift
func createGriddedCoverageTable() -> Bool
Return Value
true if created
-
Get a 2D Gridded Tile DAO
Declaration
Objective-C
+ (GPKGGriddedTileDao *)griddedTileDaoWithGeoPackage: (GPKGGeoPackage *)geoPackage;
Swift
class func griddedTileDao(with geoPackage: GPKGGeoPackage!) -> GPKGGriddedTileDao!
Parameters
geoPackage
GeoPackage
Return Value
2d gridded tile dao
-
Get a 2D Gridded Tile DAO
Declaration
Objective-C
+ (GPKGGriddedTileDao *)griddedTileDaoWithDatabase:(GPKGConnection *)database;
Swift
class func griddedTileDao(withDatabase database: GPKGConnection!) -> GPKGGriddedTileDao!
Parameters
database
database connection
Return Value
2d gridded tile dao
-
Create the 2D Gridded Tile Table if it does not exist
Declaration
Objective-C
- (BOOL)createGriddedTileTable;
Swift
func createGriddedTileTable() -> Bool
Return Value
true if created
-
Get the gridded coverage
Declaration
Objective-C
- (GPKGGriddedCoverage *)griddedCoverage;
Swift
func griddedCoverage() -> GPKGGriddedCoverage!
Return Value
gridded coverage
-
Query and update the gridded coverage
Declaration
Objective-C
- (GPKGGriddedCoverage *)queryGriddedCoverage;
Swift
func queryGriddedCoverage() -> GPKGGriddedCoverage!
Return Value
gridded coverage
-
Get the gridded tile
Return Value
gridded tile result set
-
Get the current gridded tile in the result set
Declaration
Objective-C
- (GPKGGriddedTile *)griddedTileWithResultSet:(GPKGResultSet *)resultSet;
Swift
func griddedTile(with resultSet: GPKGResultSet!) -> GPKGGriddedTile!
Parameters
resultSet
gridded tile result set
Return Value
gridded tile
-
Get the gridded tile by id
Declaration
Objective-C
- (GPKGGriddedTile *)griddedTileWithTileId:(int)tileId;
Swift
func griddedTile(withTileId tileId: Int32) -> GPKGGriddedTile!
Parameters
tileId
tile id
Return Value
gridded tile
-
Get the data null value
Declaration
Objective-C
- (NSDecimalNumber *)dataNull;
Swift
func dataNull() -> NSDecimalNumber!
Return Value
data null value or null
-
Check the pixel value to see if it is the null equivalent
Declaration
Objective-C
- (BOOL)isDataNull:(double)value;
Swift
func isDataNull(_ value: Double) -> Bool
Parameters
value
pixel value
Return Value
true if equivalent to data null
-
Get the coverage data tile tables
Declaration
Objective-C
+ (NSArray *)tablesForGeoPackage:(GPKGGeoPackage *)geoPackage;
Swift
class func tables(for geoPackage: GPKGGeoPackage!) -> [Any]!
Parameters
geoPackage
GeoPackage
Return Value
table names
-
Get the pixel value as an unsigned short at the coordinate from the unsigned short pixel values
Declaration
Objective-C
- (unsigned short)pixelValueWithValues:(NSArray *)pixelValues andWidth:(int)width andX:(int)x andY:(int)y;
Swift
func pixelValue(withValues pixelValues: [Any]!, andWidth width: Int32, andX x: Int32, andY y: Int32) -> UInt16
Parameters
pixelValues
unsigned short pixel values
width
image width
x
x coordinate
y
y coordinate
Return Value
unsigned short pixel value
-
Get the pixel value as an unsigned short at the coordinate from the unsigned short pixel values
Declaration
Objective-C
- (unsigned short)pixelValueWithUnsignedShortValues: (unsigned short *)pixelValues andWidth:(int)width andX:(int)x andY:(int)y;
Swift
func pixelValue(withUnsignedShortValues pixelValues: UnsafeMutablePointer<UInt16>!, andWidth width: Int32, andX x: Int32, andY y: Int32) -> UInt16
Parameters
pixelValues
unsigned short pixel values
width
image width
x
x coordinate
y
y coordinate
Return Value
unsigned short pixel value
-
Get the coverage data value for the unsigned short pixel value
Declaration
Objective-C
- (NSDecimalNumber *)valueWithGriddedTile:(GPKGGriddedTile *)griddedTile andPixelValue:(unsigned short)pixelValue;
Swift
func value(with griddedTile: GPKGGriddedTile!, andPixelValue pixelValue: UInt16) -> NSDecimalNumber!
Parameters
griddedTile
gridded tile
pixelValue
pixel value as an unsigned short
Return Value
coverage data value
-
Get the coverage data values from the unsigned short pixel values
Declaration
Objective-C
- (NSArray *)valuesWithGriddedTile:(GPKGGriddedTile *)griddedTile andPixelValues:(NSArray *)pixelValues;
Swift
func values(with griddedTile: GPKGGriddedTile!, andPixelValues pixelValues: [Any]!) -> [Any]!
Parameters
griddedTile
gridded tile
pixelValues
pixel values as “unsigned shorts”
Return Value
coverage data values
-
Get the coverage data values from the unsigned short pixel values
Declaration
Objective-C
- (NSArray *)valuesWithGriddedTile:(GPKGGriddedTile *)griddedTile andPixelValues:(unsigned short *)pixelValues andCount:(int)count;
Swift
func values(with griddedTile: GPKGGriddedTile!, andPixelValues pixelValues: UnsafeMutablePointer<UInt16>!, andCount count: Int32) -> [Any]!
Parameters
griddedTile
gridded tile
pixelValues
pixel values as unsigned shorts
count
pixel count
Return Value
coverage data values
-
Create the coverage data tile table
Declaration
Objective-C
+ (GPKGTileTable *)createTileTableWithGeoPackage:(GPKGGeoPackage *)geoPackage andMetadata: (GPKGTileTableMetadata *)metadata;
Swift
class func createTileTable(with geoPackage: GPKGGeoPackage!, andMetadata metadata: GPKGTileTableMetadata!) -> GPKGTileTable!
Parameters
geoPackage
GeoPackage
metadata
tile table metadata
Return Value
tile table
-
Get the unsigned short pixel value of the coverage data value
Declaration
Objective-C
- (unsigned short)pixelValueWithGriddedTile:(GPKGGriddedTile *)griddedTile andValue:(NSDecimalNumber *)value;
Swift
func pixelValue(with griddedTile: GPKGGriddedTile!, andValue value: NSDecimalNumber!) -> UInt16
Parameters
griddedTile
gridded tile
value
coverage data value
Return Value
unsigned short pixel value
-
Get the pixel value at the coordinate from the pixel values
Declaration
Objective-C
- (float)pixelValueWithFloatValues:(NSArray *)pixelValues andWidth:(int)width andX:(int)x andY:(int)y;
Swift
func pixelValue(withFloatValues pixelValues: [Any]!, andWidth width: Int32, andX x: Int32, andY y: Int32) -> Float
Parameters
pixelValues
pixel values
width
image width
x
x coordinate
y
y coordinate
Return Value
pixel value
-
Get the pixel value at the coordinate from the pixel values
Declaration
Objective-C
- (float)pixelValueWithRawFloatValues:(float *)pixelValues andWidth:(int)width andX:(int)x andY:(int)y;
Swift
func pixelValue(withRawFloatValues pixelValues: UnsafeMutablePointer<Float>!, andWidth width: Int32, andX x: Int32, andY y: Int32) -> Float
Parameters
pixelValues
pixel values
width
image width
x
x coordinate
y
y coordinate
Return Value
pixel value
-
Get the coverage data value for the pixel value
Declaration
Objective-C
- (NSDecimalNumber *)valueWithGriddedTile:(GPKGGriddedTile *)griddedTile andPixelFloatValue:(float)pixelValue;
Swift
func value(with griddedTile: GPKGGriddedTile!, andPixelFloatValue pixelValue: Float) -> NSDecimalNumber!
Parameters
griddedTile
gridded tile
pixelValue
pixel value
Return Value
coverage data value
-
Get the coverage data values from the pixel values
Declaration
Objective-C
- (NSArray *)valuesWithGriddedTile:(GPKGGriddedTile *)griddedTile andPixelFloatValues:(NSArray *)pixelValues;
Swift
func values(with griddedTile: GPKGGriddedTile!, andPixelFloatValues pixelValues: [Any]!) -> [Any]!
Parameters
griddedTile
gridded tile
pixelValues
pixel values
Return Value
coverage data values
-
Get the coverage data values from the pixel values
Declaration
Objective-C
- (NSArray *)valuesWithGriddedTile:(GPKGGriddedTile *)griddedTile andPixelFloatValues:(float *)pixelValues andCount:(int)count;
Swift
func values(with griddedTile: GPKGGriddedTile!, andPixelFloatValues pixelValues: UnsafeMutablePointer<Float>!, andCount count: Int32) -> [Any]!
Parameters
griddedTile
gridded tile
pixelValues
pixel values as floats
count
pixel count
Return Value
coverage data values
-
Get the pixel value of the coverage data value
Declaration
Objective-C
- (float)floatPixelValueWithGriddedTile:(GPKGGriddedTile *)griddedTile andValue:(NSDecimalNumber *)value;
Swift
func floatPixelValue(with griddedTile: GPKGGriddedTile!, andValue value: NSDecimalNumber!) -> Float
Parameters
griddedTile
gridded tile
value
coverage data value
Return Value
pixel value
-
Create a coverage data image
Declaration
Objective-C
- (NSObject<GPKGCoverageDataImage> *)createImageWithTileRow: (GPKGTileRow *)tileRow;
Swift
func createImage(with tileRow: GPKGTileRow!) -> (any GPKGCoverageDataImage)!
Parameters
tileRow
tile row
Return Value
coverage data image
-
Get the coverage data value of the pixel in the tile row image
Declaration
Objective-C
- (double)valueWithGriddedTile:(GPKGGriddedTile *)griddedTile andTileRow:(GPKGTileRow *)tileRow andX:(int)x andY:(int)y;
Swift
func value(with griddedTile: GPKGGriddedTile!, andTileRow tileRow: GPKGTileRow!, andX x: Int32, andY y: Int32) -> Double
Parameters
griddedTile
gridded tile
tileRow
tile row
x
x coordinate
y
y coordinate
Return Value
coverage data value
-
Get the coverage data value
Declaration
Objective-C
- (NSDecimalNumber *)valueWithGriddedTile:(GPKGGriddedTile *)griddedTile andData:(NSData *)imageData andX:(int)x andY:(int)y;
Swift
func value(with griddedTile: GPKGGriddedTile!, andData imageData: Data!, andX x: Int32, andY y: Int32) -> NSDecimalNumber!
Parameters
griddedTile
gridded tile
imageData
image data
x
x coordinate
y
y coordinate
Return Value
coverage data value
-
Get the coverage data values
Declaration
Objective-C
- (NSArray *)valuesWithGriddedTile:(GPKGGriddedTile *)griddedTile andData:(NSData *)imageData;
Swift
func values(with griddedTile: GPKGGriddedTile!, andData imageData: Data!) -> [Any]!
Parameters
griddedTile
gridded tile
imageData
image data
Return Value
coverage data values
-
Draw a coverage data image tile and format as PNG bytes from the flat array of coverage data values of length tileWidth * tileHeight where each coverage data value is at: (y * tileWidth) + x
Declaration
Objective-C
- (NSData *)drawTileDataWithGriddedTile:(GPKGGriddedTile *)griddedTile andValues:(NSArray *)values andTileWidth:(int)tileWidth andTileHeight:(int)tileHeight;
Swift
func drawTileData(with griddedTile: GPKGGriddedTile!, andValues values: [Any]!, andTileWidth tileWidth: Int32, andTileHeight tileHeight: Int32) -> Data!
Parameters
griddedTile
gridded tile
values
coverage data values of length tileWidth * tileHeight
tileWidth
tile width
tileHeight
tile height
Return Value
coverage data image tile data
-
Draw a coverage data image tile and format as bytes from the double array of unsigned coverage data values formatted as Double[row][width]
Declaration
Objective-C
- (NSData *)drawTileDataWithGriddedTile:(GPKGGriddedTile *)griddedTile andDoubleArrayValues:(NSArray *)values;
Swift
func drawTileData(with griddedTile: GPKGGriddedTile!, andDoubleArrayValues values: [Any]!) -> Data!
Parameters
griddedTile
gridded tile
values
coverage data values as [row][width]
Return Value
coverage data image tile data
-
Get the coverage data value from the image at the coordinate
Declaration
Objective-C
- (NSDecimalNumber *)valueWithGriddedTile:(GPKGGriddedTile *)griddedTile andCoverageDataImage: (NSObject<GPKGCoverageDataImage> *)image andX:(int)x andY:(int)y;
Swift
func value(with griddedTile: GPKGGriddedTile!, andCoverageDataImage image: (any GPKGCoverageDataImage)!, andX x: Int32, andY y: Int32) -> NSDecimalNumber!
Parameters
griddedTile
gridded tile
image
coverage data image
x
x coordinate
y
y coordinate
Return Value
coverage data value
-
Get the coverage data value at the coordinate
Declaration
Objective-C
- (NSDecimalNumber *)valueWithLatitude:(double)latitude andLongitude:(double)longitude;
Swift
func value(withLatitude latitude: Double, andLongitude longitude: Double) -> NSDecimalNumber!
Parameters
latitude
latitude
longitude
longitude
Return Value
coverage data value
-
Get the coverage data values within the bounding box
Declaration
Objective-C
- (GPKGCoverageDataResults *)valuesWithBoundingBox: (GPKGBoundingBox *)requestBoundingBox;
Swift
func values(with requestBoundingBox: GPKGBoundingBox!) -> GPKGCoverageDataResults!
Parameters
requestBoundingBox
request bounding box
Return Value
coverage data results
-
Get the coverage data values within the bounding box with the requested width and height result size
Declaration
Objective-C
- (GPKGCoverageDataResults *)valuesWithBoundingBox: (GPKGBoundingBox *)requestBoundingBox andWidth:(NSNumber *)width andHeight:(NSNumber *)height;
Swift
func values(with requestBoundingBox: GPKGBoundingBox!, andWidth width: NSNumber!, andHeight height: NSNumber!) -> GPKGCoverageDataResults!
Parameters
requestBoundingBox
request bounding box
width
coverage data request width
height
coverage data request height
Return Value
coverage data results
-
Get the requested coverage data values
Declaration
Objective-C
- (GPKGCoverageDataResults *)valuesWithCoverageDataRequest: (GPKGCoverageDataRequest *)request;
Swift
func values(with request: GPKGCoverageDataRequest!) -> GPKGCoverageDataResults!
Parameters
request
coverage data request
Return Value
coverage data results
-
Get the requested coverage data values with the requested width and height
Declaration
Objective-C
- (GPKGCoverageDataResults *)valuesWithCoverageDataRequest: (GPKGCoverageDataRequest *)request andWidth:(NSNumber *)width andHeight:(NSNumber *)height;
Swift
func values(with request: GPKGCoverageDataRequest!, andWidth width: NSNumber!, andHeight height: NSNumber!) -> GPKGCoverageDataResults!
Parameters
request
coverage data request
width
coverage data request width
height
coverage data request height
Return Value
coverage data results
-
Get the unbounded coverage data values within the bounding box. Unbounded results retrieves and returns each coverage data pixel. The results size equals the width and height of all matching pixels.
Declaration
Objective-C
- (GPKGCoverageDataResults *)valuesUnboundedWithBoundingBox: (GPKGBoundingBox *)requestBoundingBox;
Swift
func valuesUnbounded(with requestBoundingBox: GPKGBoundingBox!) -> GPKGCoverageDataResults!
Parameters
requestBoundingBox
request bounding box
Return Value
coverage data results
-
Get the requested unbounded coverage data values. Unbounded results retrieves and returns each coverage data pixel. The results size equals the width and height of all matching pixels.
Declaration
Objective-C
- (GPKGCoverageDataResults *)valuesUnboundedWithCoverageDataRequest: (GPKGCoverageDataRequest *)request;
Swift
func valuesUnbounded(with request: GPKGCoverageDataRequest!) -> GPKGCoverageDataResults!
Parameters
request
coverage data request
Return Value
coverage data results
-
Get the coverage data value of the pixel in the tile row image
Declaration
Objective-C
- (double)valueWithTileRow:(GPKGTileRow *)tileRow andX:(int)x andY:(int)y;
Swift
func value(with tileRow: GPKGTileRow!, andX x: Int32, andY y: Int32) -> Double
Parameters
tileRow
tile row
x
x coordinate
y
y coordinate
Return Value
coverage data value