Package org.opengis.cite.gpkg12.tiles
Class TileTests
java.lang.Object
org.opengis.cite.gpkg12.CommonFixture
org.opengis.cite.gpkg12.TileFixture
org.opengis.cite.gpkg12.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, Jeff Yutzler
-
Field Summary
Fields inherited from class org.opengis.cite.gpkg12.TileFixture
jpegImageReaders, pngImageReaders, TileTableExpectedColumns, tileTableNamesFields inherited from class org.opengis.cite.gpkg12.CommonFixture
databaseConnection, dataSource, geopackageVersion, gpkgFile, ROOT_PKG_PATH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidIn 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.voidIn 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.voidmatrix_heightcolumn value in agpkg_tile_matrixtable row SHALL be greater than 0.voidThegpkg_tile_matrix_settable or view SHALL contain one row record for each tile pyramid user data table.voidValues of thegpkg_tile_matrix_settable_namecolumn SHALL reference values in the gpkg_contents table_name column for rows with a data type of "tiles".voidValues of thegpkg_tile_matrix_setsrs_idcolumn SHALL reference values in thegpkg_spatial_ref_syssrs_idvoidmatrix_widthcolumn value in agpkg_tile_matrixtable row SHALL be greater than 0.voidpixel_x_sizecolumn value in agpkg_tile_matrixtable row SHALL be greater than 0.voidpixel_y_sizecolumn value in agpkg_tile_matrixtable row SHALL be greater than 0.voidThepixel_x_sizeandpixel_y_sizecolumn values forzoom_levelcolumn values in agpkg_tile_matrixtable sorted in ascending order SHALL be sorted in descending order.voidFor each distincttable_namefrom thegpkg_tile_matrix(tm) table, the tile pyramid (tp) user data tabletile_columncolumn value in a GeoPackage SHALL be in the range<= tp.tile_column <= tm.matrix_width - 1where the tm and tpzoom_levelcolumn values are equal.voidtile_heightcolumn value in agpkg_tile_matrixtable row SHALL be greater than 0.voidThe width of a tile matrix (the difference betweenmin_xandmax_xingpkg_tile_matrix_set) SHALL equal the product ofmatrix_width,tile_width, andpixel_x_sizefor that zoom level.voidThegpkg_tile_matrixtable 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.voidTest case/opt/tiles/gpkg_tile_matrix_set/data/data_values_srs_id_matchvoidA GeoPackage that contains a tile pyramid user data table SHALL containgpkg_tile_matrix_settable or view per Table Definition, Tile Matrix Set Table or View Definition and gpkg_tile_matrix_set Table Creation SQL.voidValues of thegpkg_tile_matrixtable_namecolumn SHALL reference values in thegpkg_contentstable_namecolumn for rows with adata_typeof 'tiles'.voidA GeoPackage that contains a tile pyramid user data table SHALL contain agpkg_tile_matrixtable 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.voidFor each distincttable_namefrom thegpkg_tile_matrix(tm) table, the tile pyramid (tp) user data tabletile_rowcolumn value in a GeoPackage SHALL be in the range0 <= tp.tile_row <= tm.matrix_height - 1where the tm and tpzoom_levelcolumn values are equal.voidEach 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).voidtile_widthcolumn value in agpkg_tile_matrixtable row SHALL be greater than 0.voidThezoom_levelcolumn value in agpkg_tile_matrixtable row SHALL not be negative.voidFor each distincttable_namefrom thegpkg_tile_matrix(tm) table, the tile pyramid (tp) user data tablezoom_levelcolumn value in a GeoPackage SHALL be in the rangemin(tm.zoom_level) <= tp.zoom_level <= max(tm.zoom_level).voidIn 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.gpkg12.TileFixture
canReadImage, isAcceptedImageFormat, isEqual, setDataType, setUpMethods inherited from class org.opengis.cite.gpkg12.CommonFixture
checkPrimaryKey, close, getGeopackageVersion, getPrimaryKeyColumn, getTestName, initCommonFixture, isExtendedType, setTestName, validateClassEnabled
-
Constructor Details
-
TileTests
public TileTests()
-
-
Method Details
-
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_settable 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_settable_namecolumn 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_settable 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_setsrs_idcolumn SHALL reference values in thegpkg_spatial_ref_syssrs_id- Throws:
SQLException- If an SQL query causes an error- See Also:
-
tileMatrixSetDataValuesSrsId
Test case/opt/tiles/gpkg_tile_matrix_set/data/data_values_srs_id_match- 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_matrixtable 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_matrixtable_namecolumn SHALL reference values in thegpkg_contentstable_namecolumn for rows with adata_typeof 'tiles'.- Throws:
SQLException- If an SQL query causes an error- See Also:
-
tileMatrixPerZoomLevel
Thegpkg_tile_matrixtable 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_xandmax_xingpkg_tile_matrix_set) SHALL equal the product ofmatrix_width,tile_width, andpixel_x_sizefor that zoom level. Similarly, height of a tile matrix (the difference betweenmin_yandmax_yingpkg_tile_matrix_set) SHALL equal the product ofmatrix_height,tile_height, andpixel_y_sizefor that zoom level.- Throws:
SQLException- If an SQL query causes an error- See Also:
-
zoomLevelNotNegative
Thezoom_levelcolumn value in agpkg_tile_matrixtable row SHALL not be negative.- Throws:
SQLException- If an SQL query causes an error- See Also:
-
matrixWidthGreaterThanZero
matrix_widthcolumn value in agpkg_tile_matrixtable row SHALL be greater than 0.- Throws:
SQLException- If an SQL query causes an error- See Also:
-
matrixHeightGreaterThanZero
matrix_heightcolumn value in agpkg_tile_matrixtable row SHALL be greater than 0.- Throws:
SQLException- If an SQL query causes an error- See Also:
-
tileWidthGreaterThanZero
tile_widthcolumn value in agpkg_tile_matrixtable row SHALL be greater than 0.- Throws:
SQLException- If an SQL query causes an error- See Also:
-
tileHeightGreaterThanZero
tile_heightcolumn value in agpkg_tile_matrixtable row SHALL be greater than 0.- Throws:
SQLException- If an SQL query causes an error- See Also:
-
pixelXSizeGreaterThanZero
pixel_x_sizecolumn value in agpkg_tile_matrixtable row SHALL be greater than 0.- Throws:
SQLException- If an SQL query causes an error- See Also:
-
pixelYSizeGreaterThanZero
pixel_y_sizecolumn value in agpkg_tile_matrixtable row SHALL be greater than 0.- Throws:
SQLException- If an SQL query causes an error- See Also:
-
sortedPixelSizes
Thepixel_x_sizeandpixel_y_sizecolumn values forzoom_levelcolumn values in agpkg_tile_matrixtable 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_namefrom thegpkg_tile_matrix(tm) table, the tile pyramid (tp) user data tablezoom_levelcolumn 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_namefrom thegpkg_tile_matrix(tm) table, the tile pyramid (tp) user data tabletile_columncolumn value in a GeoPackage SHALL be in the range<= tp.tile_column <= tm.matrix_width - 1where the tm and tpzoom_levelcolumn values are equal.- Throws:
SQLException- If an SQL query causes an error- See Also:
-
tileRowRange
For each distincttable_namefrom thegpkg_tile_matrix(tm) table, the tile pyramid (tp) user data tabletile_rowcolumn value in a GeoPackage SHALL be in the range0 <= tp.tile_row <= tm.matrix_height - 1where the tm and tpzoom_levelcolumn values are equal.- Throws:
SQLException- If an SQL query causes an error- See Also:
-