GPKGTileBoundingBoxUtils
Objective-C
@interface GPKGTileBoundingBoxUtils : NSObject
Swift
class GPKGTileBoundingBoxUtils : NSObject
Tile Bounding Box utility methods
-
Get the overlapping bounding box between the two bounding boxes
Declaration
Objective-C
+ (GPKGBoundingBox *)overlapWithBoundingBox:(GPKGBoundingBox *)boundingBox andBoundingBox:(GPKGBoundingBox *)boundingBox2;Swift
class func overlap(with boundingBox: GPKGBoundingBox!, andBoundingBox boundingBox2: GPKGBoundingBox!) -> GPKGBoundingBox!Parameters
boundingBoxbounding box
boundingBox2bounding box 2
Return Value
bounding box
-
Get the overlapping bounding box between the two bounding boxes
Declaration
Objective-C
+ (GPKGBoundingBox *)overlapWithBoundingBox:(GPKGBoundingBox *)boundingBox andBoundingBox:(GPKGBoundingBox *)boundingBox2 andAllowEmpty:(BOOL)allowEmpty;Swift
class func overlap(with boundingBox: GPKGBoundingBox!, andBoundingBox boundingBox2: GPKGBoundingBox!, andAllowEmpty allowEmpty: Bool) -> GPKGBoundingBox!Parameters
boundingBoxbounding box
boundingBox2bounding box 2
allowEmptyallow empty latitude and/or longitude ranges when determining overlap
Return Value
bounding box
-
Get the overlapping bounding box between the two bounding boxes adjusting the second box to an Anti-Meridian complementary version based upon the max longitude
Declaration
Objective-C
+ (GPKGBoundingBox *)overlapWithBoundingBox:(GPKGBoundingBox *)boundingBox andBoundingBox:(GPKGBoundingBox *)boundingBox2 withMaxLongitude:(double)maxLongitude;Swift
class func overlap(with boundingBox: GPKGBoundingBox!, andBoundingBox boundingBox2: GPKGBoundingBox!, withMaxLongitude maxLongitude: Double) -> GPKGBoundingBox!Parameters
boundingBoxbounding box
boundingBox2bounding box 2
maxLongitudemax longitude of the world for the current bounding box units
Return Value
bounding box
-
Get the overlapping bounding box between the two bounding boxes adjusting the second box to an Anti-Meridian complementary version based upon the max longitude
Declaration
Objective-C
+ (GPKGBoundingBox *)overlapWithBoundingBox:(GPKGBoundingBox *)boundingBox andBoundingBox:(GPKGBoundingBox *)boundingBox2 withMaxLongitude:(double)maxLongitude andAllowEmpty:(BOOL)allowEmpty;Swift
class func overlap(with boundingBox: GPKGBoundingBox!, andBoundingBox boundingBox2: GPKGBoundingBox!, withMaxLongitude maxLongitude: Double, andAllowEmpty allowEmpty: Bool) -> GPKGBoundingBox!Parameters
boundingBoxbounding box
boundingBox2bounding box 2
maxLongitudemax longitude of the world for the current bounding box units
allowEmptyallow empty latitude and/or longitude ranges when determining overlap
Return Value
bounding box
-
Determine if the point is within the bounding box
Declaration
Objective-C
+ (BOOL)isPoint:(SFPoint *)point inBoundingBox:(GPKGBoundingBox *)boundingBox;Swift
class func isPoint(_ point: SFPoint!, in boundingBox: GPKGBoundingBox!) -> BoolParameters
pointbounding box
boundingBoxbounding box
Return Value
YES if within the bounding box
-
Determine if the point is within the bounding box
Declaration
Objective-C
+ (BOOL)isPoint:(SFPoint *)point inBoundingBox:(GPKGBoundingBox *)boundingBox withMaxLongitude:(double)maxLongitude;Swift
class func isPoint(_ point: SFPoint!, in boundingBox: GPKGBoundingBox!, withMaxLongitude maxLongitude: Double) -> BoolParameters
pointbounding box
boundingBoxbounding box
maxLongitudemax longitude of the world for the current bounding box units
Return Value
YES if within the bounding box
-
Get the union bounding box combining the two bounding boxes
Declaration
Objective-C
+ (GPKGBoundingBox *)unionWithBoundingBox:(GPKGBoundingBox *)boundingBox andBoundingBox:(GPKGBoundingBox *)boundingBox2;Swift
class func union(with boundingBox: GPKGBoundingBox!, andBoundingBox boundingBox2: GPKGBoundingBox!) -> GPKGBoundingBox!Parameters
boundingBoxbounding box
boundingBox2bounding box 2
Return Value
bounding box
-
Get the X pixel for where the longitude fits into the bounding box
Declaration
Objective-C
+ (double)xPixelWithWidth:(int)width andBoundingBox:(GPKGBoundingBox *)boundingBox andLongitude:(double)longitude;Swift
class func xPixel(withWidth width: Int32, andBoundingBox boundingBox: GPKGBoundingBox!, andLongitude longitude: Double) -> DoubleParameters
widthwidth
boundingBoxbounding box
longitudelongitude
Return Value
x pixel
-
Get the longitude from the pixel location, bounding box, and image width
Declaration
Objective-C
+ (double)longitudeFromPixelWithWidth:(int)width andBoundingBox:(GPKGBoundingBox *)boundingBox andPixel:(double)pixel;Swift
class func longitudeFromPixel(withWidth width: Int32, andBoundingBox boundingBox: GPKGBoundingBox!, andPixel pixel: Double) -> DoubleParameters
widthwidth
boundingBoxbounding box
pixelx pixel
Return Value
longitude
-
Get the longitude from the pixel location, bounding box, tile bounding box (when different from bounding box), and image width
Declaration
Objective-C
+ (double)longitudeFromPixelWithWidth:(int)width andBoundingBox:(GPKGBoundingBox *)boundingBox andTileBoundingBox:(GPKGBoundingBox *)tileBoundingBox andPixel:(double)pixel;Swift
class func longitudeFromPixel(withWidth width: Int32, andBoundingBox boundingBox: GPKGBoundingBox!, andTileBoundingBox tileBoundingBox: GPKGBoundingBox!, andPixel pixel: Double) -> DoubleParameters
widthwidth
boundingBoxbounding box
tileBoundingBoxtile bounding box
pixelx pixel
Return Value
longitude
-
Get the Y pixel for where the latitude fits into the bounding box
Declaration
Objective-C
+ (double)yPixelWithHeight:(int)height andBoundingBox:(GPKGBoundingBox *)boundingBox andLatitude:(double)latitude;Swift
class func yPixel(withHeight height: Int32, andBoundingBox boundingBox: GPKGBoundingBox!, andLatitude latitude: Double) -> DoubleParameters
heightheight
boundingBoxbounding box
latitudelatitude
Return Value
y pixel
-
Get the latitude from the pixel location, bounding box, and image height
Declaration
Objective-C
+ (double)latitudeFromPixelWithHeight:(int)height andBoundingBox:(GPKGBoundingBox *)boundingBox andPixel:(double)pixel;Swift
class func latitudeFromPixel(withHeight height: Int32, andBoundingBox boundingBox: GPKGBoundingBox!, andPixel pixel: Double) -> DoubleParameters
heightheight
boundingBoxbounding box
pixely pixel
Return Value
latitude
-
Get the latitude from the pixel location, bounding box, tile bounding box (when different from bounding box), and image height
Declaration
Objective-C
+ (double)latitudeFromPixelWithHeight:(int)height andBoundingBox:(GPKGBoundingBox *)boundingBox andTileBoundingBox:(GPKGBoundingBox *)tileBoundingBox andPixel:(double)pixel;Swift
class func latitudeFromPixel(withHeight height: Int32, andBoundingBox boundingBox: GPKGBoundingBox!, andTileBoundingBox tileBoundingBox: GPKGBoundingBox!, andPixel pixel: Double) -> DoubleParameters
heightheight
boundingBoxbounding box
tileBoundingBoxtile bounding box
pixely pixel
Return Value
latitude
-
Get the tile bounding box from the XYZ tile coordinates and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)boundingBoxWithX:(int)x andY:(int)y andZoom:(int)zoom;Swift
class func boundingBoxWith(x: Int32, andY y: Int32, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
xx
yy
zoomzoom level
Return Value
bounding box
-
Get the Web Mercator tile bounding box from the XYZ tile coordinates and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)webMercatorBoundingBoxWithX:(int)x andY:(int)y andZoom:(int)zoom;Swift
class func webMercatorBoundingBoxWith(x: Int32, andY y: Int32, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
xx
yy
zoomzoom level
Return Value
web mercator bounding box
-
Get the Web Mercator tile bounding box from the XYZ tile grid and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)webMercatorBoundingBoxWithTileGrid:(GPKGTileGrid *)tileGrid andZoom:(int)zoom;Swift
class func webMercatorBoundingBox(with tileGrid: GPKGTileGrid!, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
tileGridtile grid
zoomzoom
Return Value
web mercator bounding box
-
Get the Projected tile bounding box from the XYZ tile coordinates and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)projectedBoundingBoxWithEpsg:(NSNumber *)epsg andX:(int)x andY:(int)y andZoom:(int)zoom;Swift
class func projectedBoundingBox(withEpsg epsg: NSNumber!, andX x: Int32, andY y: Int32, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
epsgepsg code
xx
yy
zoomzoom level
Return Value
bounding box
-
Get the Projected tile bounding box from the XYZ tile coordinates and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)projectedBoundingBoxWithAuthority:(NSString *)authority andCode:(NSNumber *)code andX:(int)x andY:(int)y andZoom:(int)zoom;Swift
class func projectedBoundingBox(withAuthority authority: String!, andCode code: NSNumber!, andX x: Int32, andY y: Int32, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
authorityprojection authority
codeauthority code
xx
yy
zoomzoom level
Return Value
bounding box
-
Get the Projected tile bounding box from the XYZ tile coordinates and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)projectedBoundingBoxWithProjection: (PROJProjection *)projection andX:(int)x andY:(int)y andZoom:(int)zoom;Swift
class func projectedBoundingBox(with projection: PROJProjection!, andX x: Int32, andY y: Int32, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
projectionprojection
xx
yy
zoomzoom level
Return Value
bounding box
-
Get the Projected tile bounding box from the XYZ tile tileGrid and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)projectedBoundingBoxWithEpsg:(NSNumber *)epsg andTileGrid:(GPKGTileGrid *)tileGrid andZoom:(int)zoom;Swift
class func projectedBoundingBox(withEpsg epsg: NSNumber!, andTileGrid tileGrid: GPKGTileGrid!, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
epsgepsg code
tileGridtile grid
zoomzoom level
Return Value
bounding box
-
Get the Projected tile bounding box from the XYZ tile tileGrid and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)projectedBoundingBoxWithAuthority:(NSString *)authority andCode:(NSNumber *)code andTileGrid:(GPKGTileGrid *)tileGrid andZoom:(int)zoom;Swift
class func projectedBoundingBox(withAuthority authority: String!, andCode code: NSNumber!, andTileGrid tileGrid: GPKGTileGrid!, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
authorityprojection authority
codeauthority code
tileGridtile grid
zoomzoom level
Return Value
bounding box
-
Get the Projected tile bounding box from the XYZ tile tileGrid and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)projectedBoundingBoxWithProjection: (PROJProjection *)projection andTileGrid:(GPKGTileGrid *)tileGrid andZoom:(int)zoom;Swift
class func projectedBoundingBox(with projection: PROJProjection!, andTileGrid tileGrid: GPKGTileGrid!, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
projectionprojection
tileGridtile grid
zoomzoom level
Return Value
bounding box
-
Get the WGS84 tile bounding box from the XYZ tile tileGrid and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)boundingBoxAsWGS84WithTileGrid:(GPKGTileGrid *)tileGrid andZoom:(int)zoom;Swift
class func boundingBoxAsWGS84(with tileGrid: GPKGTileGrid!, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
tileGridtile grid
zoomzoom level
Return Value
bounding box
-
Get the Projected tile bounding box from the WGS84 XYZ tile coordinates and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)projectedBoundingBoxFromWGS84WithEpsg:(NSNumber *)epsg andX:(int)x andY:(int)y andZoom:(int)zoom;Swift
class func projectedBoundingBoxFromWGS84(withEpsg epsg: NSNumber!, andX x: Int32, andY y: Int32, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
epsgepsg code
xx
yy
zoomzoom level
Return Value
bounding box
-
Get the Projected tile bounding box from the WGS84 XYZ tile coordinates and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)projectedBoundingBoxFromWGS84WithAuthority: (NSString *)authority andCode:(NSNumber *)code andX:(int)x andY:(int)y andZoom:(int)zoom;Swift
class func projectedBoundingBoxFromWGS84(withAuthority authority: String!, andCode code: NSNumber!, andX x: Int32, andY y: Int32, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
authorityprojection authority
codeauthority code
xx
yy
zoomzoom level
Return Value
bounding box
-
Get the Projected tile bounding box from the WGS84 XYZ tile coordinates and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)projectedBoundingBoxFromWGS84WithProjection: (PROJProjection *)projection andX:(int)x andY:(int)y andZoom:(int)zoom;Swift
class func projectedBoundingBoxFromWGS84(with projection: PROJProjection!, andX x: Int32, andY y: Int32, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
projectionprojection
xx
yy
zoomzoom level
Return Value
bounding box
-
Get the Projected tile bounding box from the WGS84 XYZ tile tileGrid and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)projectedBoundingBoxFromWGS84WithEpsg:(NSNumber *)epsg andTileGrid: (GPKGTileGrid *)tileGrid andZoom:(int)zoom;Swift
class func projectedBoundingBoxFromWGS84(withEpsg epsg: NSNumber!, andTileGrid tileGrid: GPKGTileGrid!, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
epsgepsg code
tileGridtile grid
zoomzoom level
Return Value
bounding box
-
Get the Projected tile bounding box from the WGS84 XYZ tile tileGrid and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *) projectedBoundingBoxFromWGS84WithAuthority:(NSString *)authority andCode:(NSNumber *)code andTileGrid:(GPKGTileGrid *)tileGrid andZoom:(int)zoom;Swift
class func projectedBoundingBoxFromWGS84(withAuthority authority: String!, andCode code: NSNumber!, andTileGrid tileGrid: GPKGTileGrid!, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
authorityprojection authority
codeauthority code
tileGridtile grid
zoomzoom level
Return Value
bounding box
-
Get the Projected tile bounding box from the WGS84 XYZ tile tileGrid and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *) projectedBoundingBoxFromWGS84WithProjection:(PROJProjection *)projection andTileGrid:(GPKGTileGrid *)tileGrid andZoom:(int)zoom;Swift
class func projectedBoundingBoxFromWGS84(with projection: PROJProjection!, andTileGrid tileGrid: GPKGTileGrid!, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
projectionprojection
tileGridtile grid
zoomzoom level
Return Value
bounding box
-
Get the tile grid for the location specified as WGS84
Declaration
Objective-C
+ (GPKGTileGrid *)tileGridFromWGS84Point:(SFPoint *)point andZoom:(int)zoom;Swift
class func tileGrid(fromWGS84Point point: SFPoint!, andZoom zoom: Int32) -> GPKGTileGrid!Parameters
pointWGS84 point
zoomzoom level
Return Value
tile grid
-
Get the tile grid for the location specified as the projection
Declaration
Objective-C
+ (GPKGTileGrid *)tileGridFromPoint:(SFPoint *)point andZoom:(int)zoom andProjection:(PROJProjection *)projection;Swift
class func tileGrid(from point: SFPoint!, andZoom zoom: Int32, andProjection projection: PROJProjection!) -> GPKGTileGrid!Parameters
pointpoint
zoomzoom level
projectionpoint projection
Return Value
tile grid
-
Get the tile grid for the location specified as web mercator
Declaration
Objective-C
+ (GPKGTileGrid *)tileGridFromWebMercatorPoint:(SFPoint *)point andZoom:(int)zoom;Swift
class func tileGrid(fromWebMercatorPoint point: SFPoint!, andZoom zoom: Int32) -> GPKGTileGrid!Parameters
pointpoint
zoomzoom level
Return Value
tile grid
-
Get the tile grid that includes the entire tile bounding box
Declaration
Objective-C
+ (GPKGTileGrid *)tileGridWithWebMercatorBoundingBox: (GPKGBoundingBox *)webMercatorBoundingBox andZoom:(int)zoom;Swift
class func tileGrid(withWebMercatorBoundingBox webMercatorBoundingBox: GPKGBoundingBox!, andZoom zoom: Int32) -> GPKGTileGrid!Parameters
webMercatorBoundingBoxweb mercator bounding box
zoomzoom level
Return Value
tile grid
-
Get the bounds of the XYZ tile at the point and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)tileBoundsInProjection:(PROJProjection *)projection andPoint:(SFPoint *)point andZoom:(int)zoom;Swift
class func tileBounds(in projection: PROJProjection!, andPoint point: SFPoint!, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
projectionpoint and bounding box projection
pointpoint location
zoomzoom level
Return Value
bounding box
-
Get the WGS84 bounds of the XYZ tile at the WGS84 point and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)tileBoundsForWGS84Point:(SFPoint *)point andZoom:(int)zoom;Swift
class func tileBounds(forWGS84Point point: SFPoint!, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
pointWGS84 point
zoomzoom level
Return Value
WGS84 bounding box
-
Get the web mercator bounds of the XYZ tile at the web mercator point and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)tileBoundsForWebMercatorPoint:(SFPoint *)point andZoom:(int)zoom;Swift
class func tileBounds(forWebMercatorPoint point: SFPoint!, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
pointweb mercator point
zoomzoom level
Return Value
web mercator bounding box
-
Get the bounds of the WGS84 tile at the point and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)wgs84TileBoundsInProjection:(PROJProjection *)projection andPoint:(SFPoint *)point andZoom:(int)zoom;Swift
class func wgs84TileBounds(in projection: PROJProjection!, andPoint point: SFPoint!, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
projectionpoint and bounding box projection
pointpoint location
zoomzoom level
Return Value
bounding box
-
Get the WGS84 bounds of the WGS84 tile at the WGS84 point and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)wgs84TileBoundsForWGS84Point:(SFPoint *)point andZoom:(int)zoom;Swift
class func wgs84TileBounds(forWGS84Point point: SFPoint!, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
pointWGS84 point
zoomzoom level
Return Value
WGS84 bounding box
-
Get the web mercator bounds of the WGS84 tile at the web mercator point and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)wgs84TileBoundsForWebMercatorPoint:(SFPoint *)point andZoom:(int)zoom;Swift
class func wgs84TileBounds(forWebMercatorPoint point: SFPoint!, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
pointweb mercator point
zoomzoom level
Return Value
web mercator bounding box
-
Convert the bounding box coordinates to a new web mercator bounding box
Declaration
Objective-C
+ (GPKGBoundingBox *)toWebMercatorWithBoundingBox: (GPKGBoundingBox *)boundingBox;Swift
class func toWebMercator(with boundingBox: GPKGBoundingBox!) -> GPKGBoundingBox!Parameters
boundingBoxbounding box
Return Value
web mercator bounding box
-
Get the tile size in meters
Declaration
Objective-C
+ (double)tileSizeWithTilesPerSide:(int)tilesPerSide;Swift
class func tileSize(withTilesPerSide tilesPerSide: Int32) -> DoubleParameters
tilesPerSidetiles per side
Return Value
meters
-
Get the zoom level from the tile size in meters
Declaration
Objective-C
+ (double)zoomLevelOfTileSize:(double)tileSize;Swift
class func zoomLevel(ofTileSize tileSize: Double) -> DoubleParameters
tileSizetile size in meters
Return Value
zoom level
-
Get the tile size in length units
Declaration
Objective-C
+ (double)tileSizeWithTilesPerSide:(int)tilesPerSide andTotalLength:(double)totalLength;Swift
class func tileSize(withTilesPerSide tilesPerSide: Int32, andTotalLength totalLength: Double) -> DoubleParameters
tilesPerSidetiles per side
totalLengthtotal length
Return Value
tile size
-
Get the zoom level from the tile size in length units
Declaration
Objective-C
+ (double)zoomLevelOfTileSize:(double)tileSize andTotalLength:(double)totalLength;Swift
class func zoomLevel(ofTileSize tileSize: Double, andTotalLength totalLength: Double) -> DoubleParameters
tileSizetile size in units
totalLengthtotal length
Return Value
zoom level
-
Get the tile size in length units at the zoom level
Declaration
Objective-C
+ (double)tileSizeWithZoom:(int)zoom andTotalLength:(double)totalLength;Swift
class func tileSize(withZoom zoom: Int32, andTotalLength totalLength: Double) -> DoubleParameters
zoomzoom level
totalLengthtotal length
Return Value
tile size in units
-
Get the tile width in degrees
Declaration
Objective-C
+ (double)tileWidthDegreesWithTilesPerSide:(int)tilesPerSide;Swift
class func tileWidthDegrees(withTilesPerSide tilesPerSide: Int32) -> DoubleParameters
tilesPerSidetiles per side
Return Value
degrees
-
Get the tile height in degrees
Declaration
Objective-C
+ (double)tileHeightDegreesWithTilesPerSide:(int)tilesPerSide;Swift
class func tileHeightDegrees(withTilesPerSide tilesPerSide: Int32) -> DoubleParameters
tilesPerSidetiles per side
Return Value
degrees
-
Get the tiles per side, width and height, at the zoom level
Declaration
Objective-C
+ (int)tilesPerSideWithZoom:(int)zoom;Swift
class func tilesPerSide(withZoom zoom: Int32) -> Int32Parameters
zoomzoom level
Return Value
tiles per side
-
Get the tile size in meters at the zoom level
Declaration
Objective-C
+ (double)tileSizeWithZoom:(int)zoom;Swift
class func tileSize(withZoom zoom: Int32) -> DoubleParameters
zoomzoom level
Return Value
tile size in meters
-
Get the tolerance distance in meters for the zoom level and pixels length
Declaration
Objective-C
+ (double)toleranceDistanceWithZoom:(int)zoom andPixels:(int)pixels;Swift
class func toleranceDistance(withZoom zoom: Int32, andPixels pixels: Int32) -> DoubleParameters
zoomzoom level
pixelspixel length
Return Value
tolerance distance in meters
-
Get the tolerance distance in meters for the zoom level and pixels length
Declaration
Objective-C
+ (double)toleranceDistanceWithZoom:(int)zoom andPixelWidth:(int)pixelWidth andPixelHeight:(int)pixelHeight;Swift
class func toleranceDistance(withZoom zoom: Int32, andPixelWidth pixelWidth: Int32, andPixelHeight pixelHeight: Int32) -> DoubleParameters
zoomzoom level
pixelWidthpixel width
pixelHeightpixel height
Return Value
tolerance distance in meters
-
Get the standard y tile location as TMS or a TMS y location as standard
Declaration
Objective-C
+ (int)yAsOppositeTileFormatWithZoom:(int)zoom andY:(int)y;Swift
class func yAsOppositeTileFormat(withZoom zoom: Int32, andY y: Int32) -> Int32Parameters
zoomzoom
yy
Return Value
opposite y format
-
Get the zoom level from the tiles per side
Declaration
Objective-C
+ (int)zoomFromTilesPerSide:(int)tilesPerSide;Swift
class func zoom(fromTilesPerSide tilesPerSide: Int32) -> Int32Parameters
tilesPerSidetiles per side
Return Value
zoom level
-
Get the tile grid
Declaration
Objective-C
+ (GPKGTileGrid *)tileGridWithTotalBoundingBox:(GPKGBoundingBox *)totalBox andMatrixWidth:(int)matrixWidth andMatrixHeight:(int)matrixHeight andBoundingBox:(GPKGBoundingBox *)boundingBox;Swift
class func tileGrid(withTotalBoundingBox totalBox: GPKGBoundingBox!, andMatrixWidth matrixWidth: Int32, andMatrixHeight matrixHeight: Int32, andBoundingBox boundingBox: GPKGBoundingBox!) -> GPKGTileGrid!Parameters
totalBoxtotal bounding box
matrixWidthmatrix width
matrixHeightmatrix height
boundingBoxbounding box
Return Value
tile grid
-
Get the tile column of the longitude in constant units
Declaration
Objective-C
+ (int)tileColumnWithTotalBoundingBox:(GPKGBoundingBox *)totalBox andMatrixWidth:(int)matrixWidth andLongitude:(double)longitude;Swift
class func tileColumn(withTotalBoundingBox totalBox: GPKGBoundingBox!, andMatrixWidth matrixWidth: Int32, andLongitude longitude: Double) -> Int32Parameters
totalBoxtotal bounding box
matrixWidthmatrix width
longitudelongitude in constant units
Return Value
tile column
-
Get the tile row of the latitude in constant units
Declaration
Objective-C
+ (int)tileRowWithTotalBoundingBox:(GPKGBoundingBox *)totalBox andMatrixHeight:(int)matrixHeight andLatitude:(double)latitude;Swift
class func tileRow(withTotalBoundingBox totalBox: GPKGBoundingBox!, andMatrixHeight matrixHeight: Int32, andLatitude latitude: Double) -> Int32Parameters
totalBoxtotal bounding box
matrixHeightmatrix height
latitudelatitude in constant units
Return Value
tile row
-
Get the bounding box of the tile column and row in the tile matrix using the total bounding box
Declaration
Objective-C
+ (GPKGBoundingBox *)boundingBoxWithTotalBoundingBox:(GPKGBoundingBox *)totalBox andTileMatrix: (GPKGTileMatrix *)tileMatrix andTileColumn:(int)tileColumn andTileRow:(int)tileRow;Swift
class func boundingBox(withTotalBoundingBox totalBox: GPKGBoundingBox!, andTileMatrix tileMatrix: GPKGTileMatrix!, andTileColumn tileColumn: Int32, andTileRow tileRow: Int32) -> GPKGBoundingBox!Parameters
totalBoxtotal bounding box
tileMatrixtile matrix
tileColumntile column
tileRowtile row
Return Value
bounding box
-
Get the bounding box of the tile column and row in the tile width and height bounds using the total bounding box
Declaration
Objective-C
+ (GPKGBoundingBox *)boundingBoxWithTotalBoundingBox:(GPKGBoundingBox *)totalBox andTileMatrixWidth:(int)tileMatrixWidth andTileMatrixHeight:(int)tileMatrixHeight andTileColumn:(int)tileColumn andTileRow:(int)tileRow;Swift
class func boundingBox(withTotalBoundingBox totalBox: GPKGBoundingBox!, andTileMatrixWidth tileMatrixWidth: Int32, andTileMatrixHeight tileMatrixHeight: Int32, andTileColumn tileColumn: Int32, andTileRow tileRow: Int32) -> GPKGBoundingBox!Parameters
totalBoxtotal bounding box
tileMatrixWidthmatrix width
tileMatrixHeightmatrix height
tileColumntile column
tileRowtile row
Return Value
bounding box
-
Get the bounding box of the tile grid in the tile matrix using the total bounding box
Declaration
Objective-C
+ (GPKGBoundingBox *)boundingBoxWithTotalBoundingBox:(GPKGBoundingBox *)totalBox andTileMatrix: (GPKGTileMatrix *)tileMatrix andTileGrid:(GPKGTileGrid *)tileGrid;Swift
class func boundingBox(withTotalBoundingBox totalBox: GPKGBoundingBox!, andTileMatrix tileMatrix: GPKGTileMatrix!, andTileGrid tileGrid: GPKGTileGrid!) -> GPKGBoundingBox!Parameters
totalBoxtotal bounding box
tileMatrixtile matrix
tileGridtile grid
Return Value
bounding box
-
Get the bounding box of the tile grid in the tile width and height bounds using the total bounding box
Declaration
Objective-C
+ (GPKGBoundingBox *)boundingBoxWithTotalBoundingBox:(GPKGBoundingBox *)totalBox andTileMatrixWidth:(int)tileMatrixWidth andTileMatrixHeight:(int)tileMatrixHeight andTileGrid:(GPKGTileGrid *)tileGrid;Swift
class func boundingBox(withTotalBoundingBox totalBox: GPKGBoundingBox!, andTileMatrixWidth tileMatrixWidth: Int32, andTileMatrixHeight tileMatrixHeight: Int32, andTileGrid tileGrid: GPKGTileGrid!) -> GPKGBoundingBox!Parameters
totalBoxtotal bounding box
tileMatrixWidthmatrix width
tileMatrixHeightmatrix height
tileGridtile grid
Return Value
bounding box
-
Get the zoom level of where the web mercator bounding box fits into the complete world
Declaration
Objective-C
+ (int)zoomLevelWithWebMercatorBoundingBox: (GPKGBoundingBox *)webMercatorBoundingBox;Swift
class func zoomLevel(withWebMercatorBoundingBox webMercatorBoundingBox: GPKGBoundingBox!) -> Int32Parameters
webMercatorBoundingBoxweb mercator bounding box
Return Value
zoom level
-
Get the location bearing a distance from a current location
Declaration
Objective-C
+ (CLLocationCoordinate2D)locationWithBearing:(double)bearing andDistance:(double)meters fromLocation:(CLLocationCoordinate2D)location;Swift
class func location(withBearing bearing: Double, andDistance meters: Double, fromLocation location: CLLocationCoordinate2D) -> CLLocationCoordinate2DParameters
bearingbearing
metersmeters
locationfrom location
Return Value
to location
-
Get the bearing from a location to a location
Declaration
Objective-C
+ (double)bearingFromLocation:(CLLocationCoordinate2D)from andToLocation:(CLLocationCoordinate2D)to;Swift
class func bearing(fromLocation from: CLLocationCoordinate2D, andToLocation to: CLLocationCoordinate2D) -> DoubleParameters
fromfrom location
toto location
Return Value
bearing
-
Get the distance between two locations
Declaration
Objective-C
+ (double)distanceBetweenLocation:(CLLocationCoordinate2D)location1 andLocation:(CLLocationCoordinate2D)location2;Swift
class func distanceBetweenLocation(_ location1: CLLocationCoordinate2D, andLocation location2: CLLocationCoordinate2D) -> DoubleParameters
location1location 1
location2location 2
Return Value
distance in meters
-
Get the location point between two locations
Declaration
Objective-C
+ (CLLocationCoordinate2D)pointBetweenFromLocation:(CLLocationCoordinate2D)from andToLocation:(CLLocationCoordinate2D)to;Swift
class func pointBetween(fromLocation from: CLLocationCoordinate2D, andToLocation to: CLLocationCoordinate2D) -> CLLocationCoordinate2DParameters
fromfrom location
toto location
Return Value
between point
-
Bound the web mercator bounding box within the limits
Declaration
Objective-C
+ (GPKGBoundingBox *)boundWebMercatorBoundingBox:(GPKGBoundingBox *)boundingBox;Swift
class func boundWebMercatorBoundingBox(_ boundingBox: GPKGBoundingBox!) -> GPKGBoundingBox!Parameters
boundingBoxweb mercator bounding box
Return Value
bounding box
-
Bound the upper and lower bounds of the WGS84 bounding box with web mercator limits
Declaration
Objective-C
+ (GPKGBoundingBox *)boundWgs84BoundingBoxWithWebMercatorLimits: (GPKGBoundingBox *)boundingBox;Swift
class func boundWgs84BoundingBox(withWebMercatorLimits boundingBox: GPKGBoundingBox!) -> GPKGBoundingBox!Parameters
boundingBoxwgs84 bounding box
Return Value
bounding box
-
Bound the upper and lower bounds of the degrees bounding box with web mercator limits
Declaration
Objective-C
+ (GPKGBoundingBox *)boundDegreesBoundingBoxWithWebMercatorLimits: (GPKGBoundingBox *)boundingBox;Swift
class func boundDegreesBoundingBox(withWebMercatorLimits boundingBox: GPKGBoundingBox!) -> GPKGBoundingBox!Parameters
boundingBoxdegrees bounding box
Return Value
bounding box
-
Get a rectangle using the tile width, height, bounding box, and the bounding box section within the outer box to build the rectangle from
Declaration
Objective-C
+ (CGRect)rectangleWithWidth:(int)width andHeight:(int)height andBoundingBox:(GPKGBoundingBox *)boundingBox andSection:(GPKGBoundingBox *)boundingBoxSection;Swift
class func rectangle(withWidth width: Int32, andHeight height: Int32, andBoundingBox boundingBox: GPKGBoundingBox!, andSection boundingBoxSection: GPKGBoundingBox!) -> CGRectParameters
widthwidth
heightheight
boundingBoxfull bounding box
boundingBoxSectionrectangle bounding box section
Return Value
rectangle
-
Get a rectangle with rounded point boundaries using the tile width, height, bounding box, and the bounding box section within the outer box to build the rectangle from
Declaration
Objective-C
+ (CGRect)roundedRectangleWithWidth:(int)width andHeight:(int)height andBoundingBox:(GPKGBoundingBox *)boundingBox andSection:(GPKGBoundingBox *)boundingBoxSection;Swift
class func roundedRectangle(withWidth width: Int32, andHeight height: Int32, andBoundingBox boundingBox: GPKGBoundingBox!, andSection boundingBoxSection: GPKGBoundingBox!) -> CGRectParameters
widthwidth
heightheight
boundingBoxfull bounding box
boundingBoxSectionrectangle bounding box section
Return Value
rectangle
-
Get the WGS84 tile grid for the point specified as WGS84
Declaration
Objective-C
+ (GPKGTileGrid *)tileGridWGS84FromWGS84Point:(SFPoint *)point andZoom:(int)zoom;Swift
class func tileGridWGS84(fromWGS84Point point: SFPoint!, andZoom zoom: Int32) -> GPKGTileGrid!Parameters
pointpoint
zoomzoom level
Return Value
tile grid
-
Get the WGS84 tile grid for the point specified as the projection
Declaration
Objective-C
+ (GPKGTileGrid *)tileGridWGS84FromPoint:(SFPoint *)point andZoom:(int)zoom andProjection:(PROJProjection *)projection;Swift
class func tileGridWGS84(from point: SFPoint!, andZoom zoom: Int32, andProjection projection: PROJProjection!) -> GPKGTileGrid!Parameters
pointpoint
zoomzoom level
projectionprojection
Return Value
tile grid
-
Get the WGS84 tile grid for the point specified as web mercator
Declaration
Objective-C
+ (GPKGTileGrid *)tileGridWGS84FromWebMercatorPoint:(SFPoint *)point andZoom:(int)zoom;Swift
class func tileGridWGS84(fromWebMercatorPoint point: SFPoint!, andZoom zoom: Int32) -> GPKGTileGrid!Parameters
pointpoint
zoomzoom level
Return Value
tile grid
-
Get the WGS84 tile grid that includes the entire tile bounding box
Declaration
Objective-C
+ (GPKGTileGrid *)tileGridWithWgs84BoundingBox: (GPKGBoundingBox *)wgs84BoundingBox andZoom:(int)zoom;Swift
class func tileGrid(withWgs84BoundingBox wgs84BoundingBox: GPKGBoundingBox!, andZoom zoom: Int32) -> GPKGTileGrid!Parameters
wgs84BoundingBoxwgs84 bounding box
zoomzoom level
Return Value
tile grid
-
Get the WGS84 tile bounding box from the WGS84 XYZ tile coordinates and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)wgs84BoundingBoxWithX:(int)x andY:(int)y andZoom:(int)zoom;Swift
class func wgs84BoundingBoxWith(x: Int32, andY y: Int32, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
xx
yy
zoomzoom level
Return Value
web mercator bounding box
-
Get the WGS84 tile bounding box from the WGS84 tile grid and zoom level
Declaration
Objective-C
+ (GPKGBoundingBox *)wgs84BoundingBoxWithTileGrid:(GPKGTileGrid *)tileGrid andZoom:(int)zoom;Swift
class func wgs84BoundingBox(with tileGrid: GPKGTileGrid!, andZoom zoom: Int32) -> GPKGBoundingBox!Parameters
tileGridtile grid
zoomzoom
Return Value
wgs84 bounding box
-
Get the tiles per latitude side at the zoom level
Declaration
Objective-C
+ (int)tilesPerWgs84LatSideWithZoom:(int)zoom;Swift
class func tilesPerWgs84LatSide(withZoom zoom: Int32) -> Int32Parameters
zoomzoom level
Return Value
tiles per latitude side
-
Get the tiles per longitude side at the zoom level
Declaration
Objective-C
+ (int)tilesPerWgs84LonSideWithZoom:(int)zoom;Swift
class func tilesPerWgs84LonSide(withZoom zoom: Int32) -> Int32Parameters
zoomzoom level
Return Value
tiles per longitude side
-
Get the tile height in degrees latitude
Declaration
Objective-C
+ (double)tileSizeLatWithWgs84TilesPerSide:(int)tilesPerLat;Swift
class func tileSizeLat(withWgs84TilesPerSide tilesPerLat: Int32) -> DoubleParameters
tilesPerLattiles per latitude side
Return Value
degrees
-
Get the tile height in degrees longitude
Declaration
Objective-C
+ (double)tileSizeLonWithWgs84TilesPerSide:(int)tilesPerLon;Swift
class func tileSizeLon(withWgs84TilesPerSide tilesPerLon: Int32) -> DoubleParameters
tilesPerLontiles per longitude side
Return Value
degrees
-
Get the tile grid starting from the tile grid and current zoom to the new zoom level
Declaration
Objective-C
+ (GPKGTileGrid *)tileGrid:(GPKGTileGrid *)tileGrid zoomFrom:(int)fromZoom to:(int)toZoom;Swift
class func tileGrid(_ tileGrid: GPKGTileGrid!, zoomFrom fromZoom: Int32, to toZoom: Int32) -> GPKGTileGrid!Parameters
tileGridcurrent tile grid
fromZoomcurrent zoom level
toZoomnew zoom level
Return Value
tile grid at new zoom level
-
Get the tile grid starting from the tile grid and zooming in / increasing the number of levels
Declaration
Objective-C
+ (GPKGTileGrid *)tileGrid:(GPKGTileGrid *)tileGrid zoomIncrease:(int)zoomLevels;Swift
class func tileGrid(_ tileGrid: GPKGTileGrid!, zoomIncrease zoomLevels: Int32) -> GPKGTileGrid!Parameters
tileGridcurrent tile grid
zoomLevelsnumber of zoom levels to increase by
Return Value
tile grid at new zoom level
-
Get the tile grid starting from the tile grid and zooming out / decreasing the number of levels
Declaration
Objective-C
+ (GPKGTileGrid *)tileGrid:(GPKGTileGrid *)tileGrid zoomDecrease:(int)zoomLevels;Swift
class func tileGrid(_ tileGrid: GPKGTileGrid!, zoomDecrease zoomLevels: Int32) -> GPKGTileGrid!Parameters
tileGridcurrent tile grid
zoomLevelsnumber of zoom levels to decrease by
Return Value
tile grid at new zoom level
-
Get the new tile grid min value starting from the tile grid min and zooming in / increasing the number of levels
Declaration
Objective-C
+ (int)tileGridMin:(int)min zoomIncrease:(int)zoomLevels;Swift
class func tileGridMin(_ min: Int32, zoomIncrease zoomLevels: Int32) -> Int32Parameters
mintile grid min value
zoomLevelsnumber of zoom levels to increase by
Return Value
tile grid min value at new zoom level
-
Get the new tile grid max value starting from the tile grid max and zooming in / increasing the number of levels
Declaration
Objective-C
+ (int)tileGridMax:(int)max zoomIncrease:(int)zoomLevels;Swift
class func tileGridMax(_ max: Int32, zoomIncrease zoomLevels: Int32) -> Int32Parameters
maxtile grid max value
zoomLevelsnumber of zoom levels to increase by
Return Value
tile grid max value at new zoom level
-
Get the new tile grid min value starting from the tile grid min and zooming out / decreasing the number of levels
Declaration
Objective-C
+ (int)tileGridMin:(int)min zoomDecrease:(int)zoomLevels;Swift
class func tileGridMin(_ min: Int32, zoomDecrease zoomLevels: Int32) -> Int32Parameters
mintile grid min value
zoomLevelsnumber of zoom levels to decrease by
Return Value
tile grid min value at new zoom level
-
Get the new tile grid max value starting from the tile grid max and zooming out / decreasing the number of levels
Declaration
Objective-C
+ (int)tileGridMax:(int)max zoomDecrease:(int)zoomLevels;Swift
class func tileGridMax(_ max: Int32, zoomDecrease zoomLevels: Int32) -> Int32Parameters
maxtile grid max value
zoomLevelsnumber of zoom levels to decrease by
Return Value
tile grid max value at new zoom level
View on GitHub
GPKGTileBoundingBoxUtils Class Reference