Package org.opengis.cite.gpkg10.tiles
Class TileTests
java.lang.Object
org.opengis.cite.gpkg10.CommonFixture
org.opengis.cite.gpkg10.tiles.TileTests
Defines test methods that apply to descriptive information about a GeoPackage's content
as it pertains to tiles.
Sources
- GeoPackage Encoding Standard - 2.2. Tiles (OGC 12-128r12)
- Author:
- Luke Lambert
-
Field Summary
Fields inherited from class org.opengis.cite.gpkg10.CommonFixture
databaseConnection, dataSource, gpkgFile, ROOT_PKG_PATH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
In a GeoPackage that contains a tile pyramid user data table that contains tile data that is not MIME type image/jpeg, by default SHALL store that tile data in MIME type image/png.void
In a GeoPackage that contains a tile pyramid user data table that contains tile data that is not MIME type image/png, by default SHALL store that tile data in MIME type image/jpeg.void
matrix_height
column value in agpkg_tile_matrix
table row SHALL be greater than 0.void
Thegpkg_tile_matrix_set
table or view SHALL contain one row record for each tile pyramid user data table.void
Values of thegpkg_tile_matrix_set
table_name
column SHALL reference values in the gpkg_contents table_name column for rows with a data type of "tiles".void
Values of thegpkg_tile_matrix_set
srs_id
column SHALL reference values in thegpkg_spatial_ref_sys
srs_id
void
matrix_width
column value in agpkg_tile_matrix
table row SHALL be greater than 0.void
pixel_x_size
column value in agpkg_tile_matrix
table row SHALL be greater than 0.void
pixel_y_size
column value in agpkg_tile_matrix
table row SHALL be greater than 0.void
setUp()
Sets up variables used across methodsvoid
Thepixel_x_size
andpixel_y_size
column values forzoom_level
column values in agpkg_tile_matrix
table sorted in ascending order SHALL be sorted in descending order.void
For each distincttable_name
from thegpkg_tile_matrix
(tm) table, the tile pyramid (tp) user data tabletile_column
column value in a GeoPackage SHALL be in the range<= tp.tile_column <= tm.matrix_width - 1
where the tm and tpzoom_level
column values are equal.void
tile_height
column value in agpkg_tile_matrix
table row SHALL be greater than 0.void
The width of a tile matrix (the difference betweenmin_x
andmax_x
ingpkg_tile_matrix_set
) SHALL equal the product ofmatrix_width
,tile_width
, andpixel_x_size
for that zoom level.void
Thegpkg_tile_matrix
table or view SHALL contain one row record for each zoom level that contains one or more tiles in each tile pyramid user data table or view.void
A GeoPackage that contains a tile pyramid user data table SHALL containgpkg_tile_matrix_set
table or view per Table Definition, Tile Matrix Set Table or View Definition and gpkg_tile_matrix_set Table Creation SQL.void
Values of thegpkg_tile_matrix
table_name
column SHALL reference values in thegpkg_contents
table_name
column for rows with adata_type
of 'tiles'.void
A GeoPackage that contains a tile pyramid user data table SHALL contain agpkg_tile_matrix
table or view per clause 2.2.7.1.1 Table Definition, Table Tile Matrix Metadata Table or View Definition and Table gpkg_tile_matrix Table Creation SQL.void
For each distincttable_name
from thegpkg_tile_matrix
(tm) table, the tile pyramid (tp) user data tabletile_row
column value in a GeoPackage SHALL be in the range0 <= tp.tile_row <= tm.matrix_height - 1
where the tm and tpzoom_level
column values are equal.void
Each tile matrix set in a GeoPackage SHALL be stored in a different tile pyramid user data table or updateable view with a unique name that SHALL have a column named "id" with column type INTEGER and PRIMARY KEY AUTOINCREMENT column constraints per Clause 2.2.8.1.1 Table Definition, Tiles Table or View Definition and EXAMPLE: tiles table Insert Statement (Informative).void
Thegpkg_contents
table SHALL contain a row with adata_type
column value of "tiles" for each tile pyramid user data table or view.void
tile_width
column value in agpkg_tile_matrix
table row SHALL be greater than 0.void
validateTileLevelEnabled
(org.testng.ITestContext testContext) validateTileLevelEnabled.void
Thezoom_level
column value in agpkg_tile_matrix
table row SHALL not be negative.void
For each distincttable_name
from thegpkg_tile_matrix
(tm) table, the tile pyramid (tp) user data tablezoom_level
column value in a GeoPackage SHALL be in the rangemin(tm.zoom_level) <= tp.zoom_level <= max(tm.zoom_level)
.void
In a GeoPackage that contains a tile pyramid user data table that contains tile data, by default, zoom level pixel sizes for that table SHALL vary by a factor of 2 between adjacent zoom levels in the tile matrix metadata table.Methods inherited from class org.opengis.cite.gpkg10.CommonFixture
close, initCommonFixture
-
Constructor Details
-
TileTests
public TileTests()
-
-
Method Details
-
setUp
Sets up variables used across methods- Throws:
SQLException
- if there is a database error
-
validateTileLevelEnabled
@BeforeTest public void validateTileLevelEnabled(org.testng.ITestContext testContext) throws IOException validateTileLevelEnabled.
- Parameters:
testContext
- aITestContext
object- Throws:
IOException
- if any.
-
tilesTablesAreReferenced
Thegpkg_contents
table SHALL contain a row with adata_type
column value of "tiles" for each tile pyramid user data table or view.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
zoomTimesTwo
In a GeoPackage that contains a tile pyramid user data table that contains tile data, by default, zoom level pixel sizes for that table SHALL vary by a factor of 2 between adjacent zoom levels in the tile matrix metadata table.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
imageFormat
In a GeoPackage that contains a tile pyramid user data table that contains tile data that is not MIME type image/jpeg, by default SHALL store that tile data in MIME type image/png.- Throws:
SQLException
- If an SQL query causes an errorIOException
- If the bytes of an image cause an error when read- See Also:
-
imageFormatJpg
public void imageFormatJpg()In a GeoPackage that contains a tile pyramid user data table that contains tile data that is not MIME type image/png, by default SHALL store that tile data in MIME type image/jpeg.- See Also:
-
tileMatrixSetTable
A GeoPackage that contains a tile pyramid user data table SHALL containgpkg_tile_matrix_set
table or view per Table Definition, Tile Matrix Set Table or View Definition and gpkg_tile_matrix_set Table Creation SQL.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
matrixSetNamesReferenceTiles
Values of thegpkg_tile_matrix_set
table_name
column SHALL reference values in the gpkg_contents table_name column for rows with a data type of "tiles".- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
matrixSetNameForEachTilesTable
Thegpkg_tile_matrix_set
table or view SHALL contain one row record for each tile pyramid user data table.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
matrixSetSrsIdReferencesGoodId
Values of thegpkg_tile_matrix_set
srs_id
column SHALL reference values in thegpkg_spatial_ref_sys
srs_id
- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
tileMatrixTableDefinition
A GeoPackage that contains a tile pyramid user data table SHALL contain agpkg_tile_matrix
table or view per clause 2.2.7.1.1 Table Definition, Table Tile Matrix Metadata Table or View Definition and Table gpkg_tile_matrix Table Creation SQL.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
tileMatrixTableContentsReferences
Values of thegpkg_tile_matrix
table_name
column SHALL reference values in thegpkg_contents
table_name
column for rows with adata_type
of 'tiles'.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
tileMatrixPerZoomLevel
Thegpkg_tile_matrix
table or view SHALL contain one row record for each zoom level that contains one or more tiles in each tile pyramid user data table or view.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
tileMatrixDimensionAgreement
The width of a tile matrix (the difference betweenmin_x
andmax_x
ingpkg_tile_matrix_set
) SHALL equal the product ofmatrix_width
,tile_width
, andpixel_x_size
for that zoom level. Similarly, height of a tile matrix (the difference betweenmin_y
andmax_y
ingpkg_tile_matrix_set
) SHALL equal the product ofmatrix_height
,tile_height
, andpixel_y_size
for that zoom level.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
zoomLevelNotNegative
Thezoom_level
column value in agpkg_tile_matrix
table row SHALL not be negative.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
matrixWidthGreaterThanZero
matrix_width
column value in agpkg_tile_matrix
table row SHALL be greater than 0.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
matrixHeightGreaterThanZero
matrix_height
column value in agpkg_tile_matrix
table row SHALL be greater than 0.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
tileWidthGreaterThanZero
tile_width
column value in agpkg_tile_matrix
table row SHALL be greater than 0.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
tileHeightGreaterThanZero
tile_height
column value in agpkg_tile_matrix
table row SHALL be greater than 0.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
pixelXSizeGreaterThanZero
pixel_x_size
column value in agpkg_tile_matrix
table row SHALL be greater than 0.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
pixelYSizeGreaterThanZero
pixel_y_size
column value in agpkg_tile_matrix
table row SHALL be greater than 0.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
sortedPixelSizes
Thepixel_x_size
andpixel_y_size
column values forzoom_level
column values in agpkg_tile_matrix
table sorted in ascending order SHALL be sorted in descending order.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
tilesTableDefinitions
Each tile matrix set in a GeoPackage SHALL be stored in a different tile pyramid user data table or updateable view with a unique name that SHALL have a column named "id" with column type INTEGER and PRIMARY KEY AUTOINCREMENT column constraints per Clause 2.2.8.1.1 Table Definition, Tiles Table or View Definition and EXAMPLE: tiles table Insert Statement (Informative).- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
zoomLevelRange
For each distincttable_name
from thegpkg_tile_matrix
(tm) table, the tile pyramid (tp) user data tablezoom_level
column value in a GeoPackage SHALL be in the rangemin(tm.zoom_level) <= tp.zoom_level <= max(tm.zoom_level)
.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
tileColumnRange
For each distincttable_name
from thegpkg_tile_matrix
(tm) table, the tile pyramid (tp) user data tabletile_column
column value in a GeoPackage SHALL be in the range<= tp.tile_column <= tm.matrix_width - 1
where the tm and tpzoom_level
column values are equal.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
tileRowRange
For each distincttable_name
from thegpkg_tile_matrix
(tm) table, the tile pyramid (tp) user data tabletile_row
column value in a GeoPackage SHALL be in the range0 <= tp.tile_row <= tm.matrix_height - 1
where the tm and tpzoom_level
column values are equal.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-