Unit OSM.TileStorage

Description

OSM tile images cache. Stores tile images for the map, could read/save them from/to local files but doesn't request them from network.

(c) Fr0sT-Brutal https://github.com/Fr0sT-Brutal/Delphi_OSMMap

See also
OSM.NetworkRequest
Generic (no real network implementation) classes and declarations for requesting OSM tile images from network.

Overview

Classes, Interfaces, Objects and Records

Name Description
Class TTileObjectCache Abstract object cache class indexed by tiles with fixed capacity organised as queue.
Record TCacheLimits Limits of tile cache in memory
Class TTileStorage Class that encapsulates memory and file cache of tile images.

Types

TTileStorageOption = (...);
TTileStorageOptions = set of TTileStorageOption;

Constants

TILE_BITMAP_SIZE = 4*TILE_IMAGE_WIDTH*TILE_IMAGE_HEIGHT;
DefaultTilePathPatt = '%d'+PathDelim+'%d'+PathDelim+'%d.png';
GDI_HANDLES_LIMIT = 3000;
GDI_PER_BMP = 1;
GDI_PER_PNG = 3;

Description

Types

TTileStorageOption = (...);

Flags for TTileStorage

Values
  • tsoNoFileCache: disable all file cache operations
  • tsoReadOnlyFileCache: disable write file cache operations
TTileStorageOptions = set of TTileStorageOption;

This item has no description.

Constants

TILE_BITMAP_SIZE = 4*TILE_IMAGE_WIDTH*TILE_IMAGE_HEIGHT;

Amount of bytes that a single tile bitmap occupies in memory. Bitmap consumes ~4 bytes per pixel. This constant could be used to determine acceptable cache size knowing acceptable memory usage.

DefaultTilePathPatt = '%d'+PathDelim+'%d'+PathDelim+'%d.png';

Default pattern of tile file path. Placeholders are for: Zoom, X, Y. Define custom patt in TTileStorage.Create to modify tiles disposition (f.ex., place them all in a single folder with names like tile_%zoom%%x%%y%.png)

GDI_HANDLES_LIMIT = 3000;

Default overall limit is 10k per process, choose reasonable number below this limit

GDI_PER_BMP = 1;

Number of GDI handles per TBitmap

GDI_PER_PNG = 3;

Number of GDI handles per TPngImage

Author


Generated by PasDoc 0.16.0.