GPKGCoverageDataTiff

Objective-C

@interface GPKGCoverageDataTiff : GPKGCoverageData

Swift

class GPKGCoverageDataTiff : GPKGCoverageData

Tiled Gridded Coverage Data, TIFF Encoding, Extension

  • 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

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage
                            andTileDao:(GPKGTileDao *)tileDao;

    Swift

    init!(geoPackage: GPKGGeoPackage!, andTileDao tileDao: GPKGTileDao!)

    Parameters

    geoPackage

    GeoPackage

    tileDao

    tile dao

    Return Value

    new instance

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithGeoPackage:(GPKGGeoPackage *)geoPackage
                            andTileDao:(GPKGTileDao *)tileDao
                         andProjection:(PROJProjection *)requestProjection;

    Swift

    init!(geoPackage: GPKGGeoPackage!, andTileDao tileDao: GPKGTileDao!, andProjection requestProjection: PROJProjection!)

    Parameters

    geoPackage

    GeoPackage

    tileDao

    tile dao

    requestProjection

    request projection

    Return Value

    new instance

  • Get the pixel value as a float

    Declaration

    Objective-C

    - (float)pixelValueWithData:(NSData *)imageData andX:(int)x andY:(int)y;

    Swift

    func pixelValue(with imageData: Data!, andX x: Int32, andY y: Int32) -> Float

    Parameters

    imageData

    image data

    x

    x coordinate

    y

    y coordinate

    Return Value

    float pixel value

  • Get the pixel values of the image data as an array of decimal numbers

    Declaration

    Objective-C

    - (NSArray *)pixelArrayValuesWithData:(NSData *)imageData;

    Swift

    func pixelArrayValues(with imageData: Data!) -> [Any]!

    Parameters

    imageData

    image data

    Return Value

    pixel values array

  • Get the pixel values of the image data as floats

    Declaration

    Objective-C

    - (float *)pixelValuesWithData:(NSData *)imageData;

    Swift

    func pixelValues(with imageData: Data!) -> UnsafeMutablePointer<Float>!

    Parameters

    imageData

    image data

    Return Value

    float pixel values

  • Validate the image type

    Declaration

    Objective-C

    + (void)validateImageType:(TIFFFileDirectory *)directory;

    Swift

    class func validateImageType(_ directory: TIFFFileDirectory!)

    Parameters

    directory

    file directory

  • Get the coverage data value

    Declaration

    Objective-C

    - (NSDecimalNumber *)valueWithGriddedTile:(GPKGGriddedTile *)griddedTile
                                     andImage:(GPKGCoverageDataTiffImage *)image
                                         andX:(int)x
                                         andY:(int)y;

    Swift

    func value(with griddedTile: GPKGGriddedTile!, andImage image: GPKGCoverageDataTiffImage!, andX x: Int32, andY y: Int32) -> NSDecimalNumber!

    Parameters

    griddedTile

    gridded tile

    image

    tile image

    x

    x coordinate

    y

    y coordinate

    Return Value

    coverage data value

  • Draw a coverage data image tile from the flat array of float pixel values of length tileWidth * tileHeight where each pixel is at: (y * tileWidth) + x

    Declaration

    Objective-C

    - (GPKGCoverageDataTiffImage *)drawTileWithFloatPixelValues:(float *)pixelValues
                                                   andTileWidth:(int)tileWidth
                                                  andTileHeight:(int)tileHeight;

    Swift

    func drawTile(withFloatPixelValues pixelValues: UnsafeMutablePointer<Float>!, andTileWidth tileWidth: Int32, andTileHeight tileHeight: Int32) -> GPKGCoverageDataTiffImage!

    Parameters

    pixelValues

    float pixel values of length tileWidth * tileHeight

    tileWidth

    tile width

    tileHeight

    tile height

    Return Value

    coverage data image tile

  • Draw a coverage data image tile from the flat array of float pixel values of length tileWidth * tileHeight where each pixel is at: (y * tileWidth) + x

    Declaration

    Objective-C

    - (GPKGCoverageDataTiffImage *)drawTileWithPixelValues:(NSArray *)pixelValues
                                              andTileWidth:(int)tileWidth
                                             andTileHeight:(int)tileHeight;

    Swift

    func drawTile(withPixelValues pixelValues: [Any]!, andTileWidth tileWidth: Int32, andTileHeight tileHeight: Int32) -> GPKGCoverageDataTiffImage!

    Parameters

    pixelValues

    float pixel values of length tileWidth * tileHeight

    tileWidth

    tile width

    tileHeight

    tile height

    Return Value

    coverage data image tile

  • Draw a coverage data image tile and format as TIFF bytes from the flat array of float pixel values of length tileWidth * tileHeight where each pixel is at: (y * tileWidth) + x

    Declaration

    Objective-C

    - (NSData *)drawTileDataWithPixelValues:(NSArray *)pixelValues
                               andTileWidth:(int)tileWidth
                              andTileHeight:(int)tileHeight;

    Swift

    func drawTileData(withPixelValues pixelValues: [Any]!, andTileWidth tileWidth: Int32, andTileHeight tileHeight: Int32) -> Data!

    Parameters

    pixelValues

    float pixel values of length tileWidth * tileHeight

    tileWidth

    tile width

    tileHeight

    tile height

    Return Value

    coverage data image tile bytes

  • Draw a coverage data tile from the double array of float pixel values formatted as float[row][width]

    Declaration

    Objective-C

    - (GPKGCoverageDataTiffImage *)drawTileWithDoubleArrayPixelValues:
        (NSArray *)pixelValues;

    Swift

    func drawTile(withDoubleArrayPixelValues pixelValues: [Any]!) -> GPKGCoverageDataTiffImage!

    Parameters

    pixelValues

    float pixel values as [row][width]

    Return Value

    coverage data image tile

  • Draw a coverage data tile and format as TIFF bytes from the double array of float pixel values formatted as float[row][width]

    Declaration

    Objective-C

    - (NSData *)drawTileDataWithDoubleArrayPixelValues:(NSArray *)pixelValues;

    Swift

    func drawTileData(withDoubleArrayPixelValues pixelValues: [Any]!) -> Data!

    Parameters

    pixelValues

    float pixel values as [row][width]

    Return Value

    coverage data image tile bytes

  • Draw a coverage data image tile from the flat array of coverage data values of length tileWidth * tileHeight where each value is at: (y * tileWidth) + x

    Declaration

    Objective-C

    - (GPKGCoverageDataTiffImage *)drawTileWithGriddedTile:
                                       (GPKGGriddedTile *)griddedTile
                                                 andValues:(NSArray *)values
                                              andTileWidth:(int)tileWidth
                                             andTileHeight:(int)tileHeight;

    Swift

    func drawTile(with griddedTile: GPKGGriddedTile!, andValues values: [Any]!, andTileWidth tileWidth: Int32, andTileHeight tileHeight: Int32) -> GPKGCoverageDataTiffImage!

    Parameters

    griddedTile

    gridded tile

    values

    coverage data values of length tileWidth * tileHeight

    tileWidth

    tile width

    tileHeight

    tile height

    Return Value

    coverage data image tile

  • Draw a coverage data image tile from the double array of coverage data values formatted as Double[row][width]

    Declaration

    Objective-C

    - (GPKGCoverageDataTiffImage *)drawTileWithGriddedTile:
                                       (GPKGGriddedTile *)griddedTile
                                      andDoubleArrayValues:(NSArray *)values;

    Swift

    func drawTile(with griddedTile: GPKGGriddedTile!, andDoubleArrayValues values: [Any]!) -> GPKGCoverageDataTiffImage!

    Parameters

    griddedTile

    gridded tile

    values

    coverage data values as [row][width]

    Return Value

    coverage data image tile

  • Create a new image

    Declaration

    Objective-C

    - (GPKGCoverageDataTiffImage *)createImageWithTileWidth:(int)tileWidth
                                              andTileHeight:(int)tileHeight;

    Swift

    func createImage(withTileWidth tileWidth: Int32, andTileHeight tileHeight: Int32) -> GPKGCoverageDataTiffImage!

    Parameters

    tileWidth

    tile width

    tileHeight

    tile height

    Return Value

    image

  • Set the pixel value into the image

    Declaration

    Objective-C

    - (void)setPixelValueWithImage:(GPKGCoverageDataTiffImage *)image
                              andX:(int)x
                              andY:(int)y
                     andPixelValue:(float)pixelValue;

    Swift

    func setPixelValueWith(_ image: GPKGCoverageDataTiffImage!, andX x: Int32, andY y: Int32, andPixelValue pixelValue: Float)

    Parameters

    image

    image

    x

    x coordinate

    y

    y coordinate

    pixelValue

    pixel value

  • Get the pixel at the provided x and y with the image width

    Declaration

    Objective-C

    - (float)pixelIn:(float *)pixels withWidth:(int)width atX:(int)x andY:(int)y;

    Swift

    func pixel(in pixels: UnsafeMutablePointer<Float>!, withWidth width: Int32, atX x: Int32, andY y: Int32) -> Float

    Parameters

    pixels

    pixels array

    width

    image width

    x

    x coordinate

    y

    y coordintate

    Return Value

    pixel value

  • Convert the float pixel array to a NSArray of numbers

    Declaration

    Objective-C

    - (NSArray *)pixelValuesFloatToArray:(float *)pixelValues withCount:(int)count;

    Swift

    func pixelValuesFloat(toArray pixelValues: UnsafeMutablePointer<Float>!, withCount count: Int32) -> [Any]!

    Parameters

    pixelValues

    pixels values

    count

    pixel count

    Return Value

    pixel array

  • Convert the pixel array to a float pixel array

    Declaration

    Objective-C

    - (float *)pixelValuesArrayToFloat:(NSArray *)pixelValues;

    Swift

    func pixelValuesArray(toFloat pixelValues: [Any]!) -> UnsafeMutablePointer<Float>!

    Parameters

    pixelValues

    pixels values

    Return Value

    float pixel array

  • Convert the pixel double array to a float pixel array

    Declaration

    Objective-C

    - (float *)pixelValuesDoubleArrayToFloat:(NSArray *)pixelValues;

    Swift

    func pixelValuesDoubleArray(toFloat pixelValues: [Any]!) -> UnsafeMutablePointer<Float>!

    Parameters

    pixelValues

    pixels values

    Return Value

    float pixel array

  • Convert the coverage data array to a float pixel array

    Declaration

    Objective-C

    - (float *)pixelValuesOfValues:(NSArray *)values
                   withGriddedTile:(GPKGGriddedTile *)griddedTile;

    Swift

    func pixelValues(ofValues values: [Any]!, with griddedTile: GPKGGriddedTile!) -> UnsafeMutablePointer<Float>!

    Parameters

    values

    coverage data values

    griddedTile

    gridded tile

    Return Value

    float pixel array

  • Convert the coverage data values double array to a float pixel array

    Declaration

    Objective-C

    - (float *)pixelValuesOfDoubleArrayValues:(NSArray *)values
                              withGriddedTile:(GPKGGriddedTile *)griddedTile;

    Swift

    func pixelValues(ofDoubleArrayValues values: [Any]!, with griddedTile: GPKGGriddedTile!) -> UnsafeMutablePointer<Float>!

    Parameters

    values

    coverage data values

    griddedTile

    gridded tile

    Return Value

    float pixel array

  • Create the coverage data tile table with metadata and extension

    Declaration

    Objective-C

    + (GPKGCoverageDataTiff *)
        createTileTableWithGeoPackage:(GPKGGeoPackage *)geoPackage
                          andMetadata:(GPKGTileTableMetadata *)metadata;

    Swift

    class func createTileTable(with geoPackage: GPKGGeoPackage!, andMetadata metadata: GPKGTileTableMetadata!) -> GPKGCoverageDataTiff!

    Parameters

    geoPackage

    GeoPackage

    metadata

    tile table metadata

    Return Value

    coverage data tiles