Tile Scaling
This extension defines tile scaling behaviors for tile tables. When tiles at a requested zoom level are not present, alternate zoom level tiles may be scaled in place. The extension configures the allowable zoom directions and distance from the requested tile.
National Geospatial-Intelligence Agency, author_name nga
nga_tile_scaling
New Requirement
This extension applies to the table names of tile user tables (2.2.8).
Read-write
The Tile Scaling extension is registered into the gpkg_extensions
table as follows:
table_name | column_name | extension_name | definition | scope |
---|---|---|---|---|
user tile table name |
null |
|
URL to this extension description |
read-write |
The Tile Scaling Table contains tile table names and the desired scaling behavior configurations.
Column Name | Type | Description | Null | Default | Key |
---|---|---|---|---|---|
|
TEXT |
Tile Table name, foreign key to |
no |
PK, FK |
|
|
TEXT |
The scaling behavior type: ('in','out','in_out','out_in','closest_in_out','closest_out_in') |
no |
||
|
INTEGER |
Max zoom levels in (higher zoom level) to search from a requested zoom level, null for no limit, ignored when |
yes |
||
|
INTEGER |
Max zoom levels out (lower zoom level) to search from a requested zoom level, null for no limit, ignored when |
yes |
CREATE TABLE nga_tile_scaling (
table_name TEXT PRIMARY KEY NOT NULL,
scaling_type TEXT NOT NULL,
zoom_in INTEGER,
zoom_out INTEGER,
CONSTRAINT fk_nts_gtms_tn FOREIGN KEY('table_name') REFERENCES gpkg_tile_matrix_set('table_name')
CHECK (scaling_type in ('in','out','in_out','out_in','closest_in_out','closest_out_in'))
);
The Tile Scaling Type defines the zoom search directions and order from a requested tile.
Name | Description |
---|---|
in |
Search for tiles by zooming in |
out |
Search for tiles by zooming out |
in_out |
Search for tiles by zooming in first, and then zooming out |
out_in |
Search for tiles by zooming out first, and then zooming in |
closest_in_out |
Search for tiles in closest zoom level order, equal zoom level distance prefers zoom in before zoom out |
closest_out_in |
Search for tiles in closest zoom level order, equal zoom level distance prefers zoom out before zoom in |
None
None
The rivers GeoPackage has a rivers_tiles
tile table that is configured for tile scaling.
The example GeoPackage has tile tables configured for tile scaling.