public class TileTests extends CommonFixture
Sources
CommonFixture.GeoPackageVersion| Modifier and Type | Field and Description |
|---|---|
protected static Collection<ImageReader> |
jpegImageReaders |
protected static Collection<ImageReader> |
pngImageReaders |
protected Collection<String> |
tileTableNames |
databaseConnection, dataSource, gpkgFile, ROOT_PKG_PATH| Constructor and Description |
|---|
TileTests() |
| Modifier and Type | Method and Description |
|---|---|
protected static boolean |
canReadImage(Iterable<ImageReader> imageReaders,
ImageInputStream image) |
String |
getDataType() |
void |
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.
|
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.
|
protected boolean |
isAcceptedImageFormat(byte[] image) |
void |
matrixHeightGreaterThanZero()
matrix_height column value in a gpkg_tile_matrix table
row SHALL be greater than 0. |
void |
matrixSetNameForEachTilesTable()
The
gpkg_tile_matrix_set table or view SHALL contain one row
record for each tile pyramid user data table. |
void |
matrixSetNamesReferenceTiles()
Values of the
gpkg_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 |
matrixSetSrsIdReferencesGoodId()
Values of the
gpkg_tile_matrix_set srs_id column SHALL
reference values in the gpkg_spatial_ref_sys srs_id |
void |
matrixWidthGreaterThanZero()
matrix_width column value in a gpkg_tile_matrix table
row SHALL be greater than 0. |
void |
pixelXSizeGreaterThanZero()
pixel_x_size column value in a gpkg_tile_matrix table row
SHALL be greater than 0. |
void |
pixelYSizeGreaterThanZero()
pixel_y_size column value in a gpkg_tile_matrix table row
SHALL be greater than 0. |
void |
setDataType(String dataType) |
void |
setUp()
Sets up variables used across methods
|
void |
sortedPixelSizes()
The
pixel_x_size and pixel_y_size column values for
zoom_level column values in a gpkg_tile_matrix table
sorted in ascending order SHALL be sorted in descending order. |
void |
tileColumnRange()
For each distinct
table_name from the gpkg_tile_matrix
(tm) table, the tile pyramid (tp) user data table tile_column
column value in a GeoPackage SHALL be in the range <= tp.tile_column
<= tm.matrix_width - 1 where the tm and tp zoom_level column
values are equal. |
void |
tileHeightGreaterThanZero()
tile_height column value in a gpkg_tile_matrix table row
SHALL be greater than 0. |
void |
tileMatrixDimensionAgreement()
The width of a tile matrix (the difference between
min_x and
max_x in gpkg_tile_matrix_set) SHALL equal the product
of matrix_width, tile_width, and pixel_x_size
for that zoom level. |
void |
tileMatrixPerZoomLevel()
The
gpkg_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 |
tileMatrixSetTable()
A GeoPackage that contains a tile pyramid user data table SHALL contain
gpkg_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 |
tileMatrixTableContentsReferences()
Values of the
gpkg_tile_matrix table_name
column SHALL reference values in the gpkg_contents table_name column for rows with a data_type of
'tiles'. |
void |
tileMatrixTableDefinition()
A GeoPackage that contains a tile pyramid user data table SHALL contain
a
gpkg_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 |
tileRowRange()
For each distinct
table_name from the gpkg_tile_matrix
(tm) table, the tile pyramid (tp) user data table tile_row
column value in a GeoPackage SHALL be in the range 0 <= tp.tile_row <=
tm.matrix_height - 1 where the tm and tp zoom_level column
values are equal. |
void |
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).
|
void |
tileWidthGreaterThanZero()
tile_width column value in a gpkg_tile_matrix table row
SHALL be greater than 0. |
void |
zoomLevelNotNegative()
The
zoom_level column value in a gpkg_tile_matrix table
row SHALL not be negative. |
void |
zoomLevelRange()
For each distinct
table_name from the gpkg_tile_matrix
(tm) table, the tile pyramid (tp) user data table zoom_level
column value in a GeoPackage SHALL be in the range min(tm.zoom_level) <=
tp.zoom_level <= max(tm.zoom_level). |
void |
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.
|
checkPrimaryKey, close, getAllowedVersions, getGeopackageVersion, getPrimaryKeyColumn, getTestName, initCommonFixture, isExtendedType, setTestName, validateClassEnabledprotected final Collection<String> tileTableNames
protected static final Collection<ImageReader> jpegImageReaders
protected static final Collection<ImageReader> pngImageReaders
public void setUp()
throws SQLException
SQLException - if there is a database errorpublic void zoomTimesTwo()
throws SQLException
SQLException - If an SQL query causes an errorpublic void imageFormat()
throws SQLException,
IOException
SQLException - If an SQL query causes an errorIOException - If the bytes of an image cause an error when readpublic void imageFormatJpg()
public void tileMatrixSetTable()
throws SQLException
gpkg_tile_matrix_set table or view per
Table Definition, Tile
Matrix Set Table or View Definition and
gpkg_tile_matrix_set Table Creation SQL.SQLException - If an SQL query causes an errorpublic void matrixSetNamesReferenceTiles()
throws SQLException
gpkg_tile_matrix_set table_name column
SHALL reference values in the gpkg_contents table_name column for rows
with a data type of "tiles".SQLException - If an SQL query causes an errorpublic void matrixSetNameForEachTilesTable()
throws SQLException
gpkg_tile_matrix_set table or view SHALL contain one row
record for each tile pyramid user data table.SQLException - If an SQL query causes an errorpublic void matrixSetSrsIdReferencesGoodId()
throws SQLException
gpkg_tile_matrix_set srs_id column SHALL
reference values in the gpkg_spatial_ref_sys srs_idSQLException - If an SQL query causes an errorpublic void tileMatrixTableDefinition()
throws SQLException
gpkg_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.SQLException - If an SQL query causes an errorpublic void tileMatrixTableContentsReferences()
throws SQLException
gpkg_tile_matrix table_name
column SHALL reference values in the gpkg_contents table_name column for rows with a data_type of
'tiles'.SQLException - If an SQL query causes an errorpublic void tileMatrixPerZoomLevel()
throws SQLException
gpkg_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.SQLException - If an SQL query causes an errorpublic void tileMatrixDimensionAgreement()
throws SQLException
min_x and
max_x in gpkg_tile_matrix_set) SHALL equal the product
of matrix_width, tile_width, and pixel_x_size
for that zoom level. Similarly, height of a tile matrix (the difference
between min_y and max_y in gpkg_tile_matrix_set)
SHALL equal the product of matrix_height, tile_height,
and pixel_y_size for that zoom level.SQLException - If an SQL query causes an errorpublic void zoomLevelNotNegative()
throws SQLException
zoom_level column value in a gpkg_tile_matrix table
row SHALL not be negative.SQLException - If an SQL query causes an errorpublic void matrixWidthGreaterThanZero()
throws SQLException
matrix_width column value in a gpkg_tile_matrix table
row SHALL be greater than 0.SQLException - If an SQL query causes an errorpublic void matrixHeightGreaterThanZero()
throws SQLException
matrix_height column value in a gpkg_tile_matrix table
row SHALL be greater than 0.SQLException - If an SQL query causes an errorpublic void tileWidthGreaterThanZero()
throws SQLException
tile_width column value in a gpkg_tile_matrix table row
SHALL be greater than 0.SQLException - If an SQL query causes an errorpublic void tileHeightGreaterThanZero()
throws SQLException
tile_height column value in a gpkg_tile_matrix table row
SHALL be greater than 0.SQLException - If an SQL query causes an errorpublic void pixelXSizeGreaterThanZero()
throws SQLException
pixel_x_size column value in a gpkg_tile_matrix table row
SHALL be greater than 0.SQLException - If an SQL query causes an errorpublic void pixelYSizeGreaterThanZero()
throws SQLException
pixel_y_size column value in a gpkg_tile_matrix table row
SHALL be greater than 0.SQLException - If an SQL query causes an errorpublic void sortedPixelSizes()
throws SQLException
pixel_x_size and pixel_y_size column values for
zoom_level column values in a gpkg_tile_matrix table
sorted in ascending order SHALL be sorted in descending order.SQLException - If an SQL query causes an errorpublic void tilesTableDefinitions()
throws SQLException
SQLException - If an SQL query causes an errorpublic void zoomLevelRange()
throws SQLException
table_name from the gpkg_tile_matrix
(tm) table, the tile pyramid (tp) user data table zoom_level
column value in a GeoPackage SHALL be in the range min(tm.zoom_level) <=
tp.zoom_level <= max(tm.zoom_level).SQLException - If an SQL query causes an errorpublic void tileColumnRange()
throws SQLException
table_name from the gpkg_tile_matrix
(tm) table, the tile pyramid (tp) user data table tile_column
column value in a GeoPackage SHALL be in the range <= tp.tile_column
<= tm.matrix_width - 1 where the tm and tp zoom_level column
values are equal.SQLException - If an SQL query causes an errorpublic void tileRowRange()
throws SQLException
table_name from the gpkg_tile_matrix
(tm) table, the tile pyramid (tp) user data table tile_row
column value in a GeoPackage SHALL be in the range 0 <= tp.tile_row <=
tm.matrix_height - 1 where the tm and tp zoom_level column
values are equal.SQLException - If an SQL query causes an errorprotected boolean isAcceptedImageFormat(byte[] image)
throws IOException
IOExceptionprotected static boolean canReadImage(Iterable<ImageReader> imageReaders, ImageInputStream image) throws IOException
IOExceptionpublic String getDataType()
public void setDataType(String dataType)
Copyright © 2018 Open Geospatial Consortium. All rights reserved.