MaplyElevationDatabase
@interface MaplyElevationDatabase : NSObject <MaplyElevationSourceDelegate>
An elevation source corresponding to a custom sqlite database.
The Maply Elevation Database object interfaces to a custom sqlite database that contains elevation tiles. This is the output of the elev_tile_pyramid command line tool. See that for details. Suffice it to say that each tile is separate, contains one extra cell on the northern and eastern sides and is made up for shorts (16 bit).
See
MaplyElevationSourceDelegate-
Left side of the extents in the local coordinate system
Declaration
Objective-C
@property (assign, readwrite, nonatomic) double minX;
Swift
var minX: Double { get set }
-
Bottom side of the extents in the local coordinate system
Declaration
Objective-C
@property (assign, readwrite, nonatomic) double minY;
Swift
var minY: Double { get set }
-
Right side of the extents in the local coordinate system
Declaration
Objective-C
@property (assign, readwrite, nonatomic) double maxX;
Swift
var maxX: Double { get set }
-
Top side of the extents in the local coordinate system
Declaration
Objective-C
@property (assign, readwrite, nonatomic) double maxY;
Swift
var maxY: Double { get set }
-
Number of samples in the X direction for each tile
Declaration
Objective-C
@property (assign, readwrite, nonatomic) unsigned int tileSizeX;
Swift
var tileSizeX: UInt32 { get set }
-
Number of samples in the Y direction for each tile
Declaration
Objective-C
@property (assign, readwrite, nonatomic) unsigned int tileSizeY;
Swift
var tileSizeY: UInt32 { get set }
-
Initialize with the full path or name of the sqlite file.
It looks for the full path first and then will try to find the name in the bundle with an extension of @
sqlite
if that failes.Declaration
Objective-C
- (nullable instancetype)initWithName:(NSString *_Nonnull)name;
Swift
init?(name: String)
Return Value
Returns a valid elevation database object or nil on failure.
-
Minimum zoom level (e.g. 0) as read from the file
Declaration
Objective-C
- (int)minZoom;
Swift
func minZoom() -> Int32
-
Maximum zoom level (e.g. 17) as read from the file
Declaration
Objective-C
- (int)maxZoom;
Swift
func maxZoom() -> Int32
-
Returns elevaton data for the given tile.
This will return elevation samples for the given tile in meters. The size of the tile is determined by the file (and static). Data will come from the file in 16 bit signed values, but then converted into 32 bit floating point values.
Declaration
Objective-C
- (nullable MaplyElevationChunk *)elevForTile:(MaplyTileID)tileID;
Swift
func elev(forTile tileID: MaplyTileID) -> MaplyElevationChunk?
Return Value
Returns the elevation chunk corresonding to the given tile.