Skip to content

Commit

Permalink
Merge pull request #195 from jyutzler/p193
Browse files Browse the repository at this point in the history
Adding ATS for REQ 89, 92
  • Loading branch information
jyutzler committed Feb 15, 2016
2 parents d9d0062 + 55a72f7 commit 8284971
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 31 deletions.
7 changes: 4 additions & 3 deletions spec/2b_tiles.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ See Web Map Tile Service (WMTS) <<16>> Annex E for additional examples of both c

====== Zoom Times Two

:zoom_times_two_foot1: footnote:[See clause 3.2.1.1.1 for use of other zoom levels as a registered extensions.]
:zoom_times_two_foot1: footnote:[See <<extension_zoom_other_intervals>> for use of other zoom levels as a registered extensions.]
[[req_zoom_times_two]]
[requirement]
In a GeoPackage that contains a tile pyramid user data table that contains tile data, by default {zoom_times_two_foot1}, zoom level pixel sizes for that table SHALL vary by a factor of 2 between adjacent zoom levels in the tile matrix metadata table.

Expand All @@ -53,7 +54,7 @@ In a GeoPackage that contains a tile pyramid user data table that contains tile

====== MIME Type PNG

:png_req_foot1: footnote:[See Clause 3.2.2 regarding use of the WebP alternative tile MIME type as a registered extension.]
:png_req_foot1: footnote:[See <<extension_tiles_webp>> regarding use of the WebP alternative tile MIME type as a registered extension.]
[requirement]
In a GeoPackage that contains a tile pyramid user data table that contains tile data that is not http://www.ietf.org/rfc/rfc2046.txt[MIME type] http://www.jpeg.org/public/jfif.pdf[image/jpeg] <<17>><<18>><<19>>, by default SHALL store that tile data in http://www.iana.org/assignments/media-types/index.html[MIME type] http://libpng.org/pub/png/[image/png] <<20>><<21>>. {png_req_foot1}

Expand All @@ -64,7 +65,7 @@ In a GeoPackage that contains a tile pyramid user data table that contains tile

====== MIME Type JPEG

:jpg_req_foot1: footnote:[See Clause 3.2.2 regarding use of the WebP alternative tile MIME type as a registered extension.]
:jpg_req_foot1: footnote:[See <<extension_tiles_webp>> regarding use of the WebP alternative tile MIME type as a registered extension.]
[requirement]
In a GeoPackage that contains a tile pyramid user data table that contains tile data that is not http://www.iana.org/assignments/media-types/index.html[MIME type] http://libpng.org/pub/png/[image/png] <<20>><<21>>, by default SHALL store that tile data in http://www.ietf.org/rfc/rfc2046.txt[MIME type] http://www.jpeg.org/public/jfif.pdf[image/jpeg] <<17>><<18>><<19>>. {jpg_req_foot1}

Expand Down
43 changes: 16 additions & 27 deletions spec/annexes/ats.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -589,14 +589,9 @@ WHERE type = 'table' AND name = ‘{selected table_ name}’
[cols="1,5a"]
|========================================
|*Test Case ID* |+/opt/tiles/zoom_levels/data/zoom_times_two+
|*Test Purpose* |Verify that by default zoom level pixel sizes for tile matrix user data tables vary by factors of 2 between adjacent zoom levels in the tile matrix metadata table.
|*Test Purpose* |Verify that zoom level pixel sizes for tile matrix user data tables vary by factors of 2 between adjacent zoom levels in the tile matrix metadata table.
|*Test Method* |
. SELECT CASE
WHEN (SELECT tbl_name FROM sqlite_master WHERE tbl_name = 'gpkg_extensions') = 'gpkg_extensions' THEN
(SELECT table_name FROM gpkg_contents WHERE data_type = 'tiles' AND table_name NOT IN
(SELECT table_name from gpkg_extensions WHERE extension_name = 'gpkg_zoom_other'))
ELSE (SELECT table_name FROM gpkg_contents WHERE data_type = 'tiles')
END;
. SELECT table_name FROM gpkg_contents WHERE data_type = 'tiles'
. Not testable if returns empty result set
. For each row table_name from step 1
.. SELECT zoom_level, pixel_x_size, pixel_y_size FROM gpkg_tile_matrix WHERE table_name = selected table name ORDER BY zoom_level ASC
Expand All @@ -617,45 +612,39 @@ END;
|*Test Case ID* |+/opt/tiles/tiles_encoding/data/mime_type_png+
|*Test Purpose* |Verify that a tile matrix user data table that contains tile data that is not MIME type image/jpeg by default contains tile data in MIME type image/png.
|*Test Method* |
. SELECT CASE
WHEN (SELECT tbl_name FROM sqlite_master WHERE tbl_name = \'gpkg_extensions') = \'gpkg_extensions' THEN
(SELECT table_name FROM gpkg_contents WHERE data_type = \'tiles' AND table_name NOT IN
(SELECT table_name from gpkg_extensions WHERE extension_name IN (\'gpkg_webp')))
ELSE (SELECT table_name FROM gpkg_contents WHERE data_type = \'tiles')
END;
. Not testable if returns empty result set
. SELECT table_name AS tn FROM gpkg_contents WHERE data_type = \'tiles'
. For each row tbl_name from step 1
.. SELECT tile_data FROM tbl_name
.. WHEN (SELECT tbl_name FROM sqlite_master WHERE tbl_name = \'gpkg_extensions') = \'gpkg_extensions' THEN (SELECT extension_name FROM gpkg_extensions WHERE table_name = \'tn' AND column_name = \'tile_data')
END;
... Not testable unless it returns empty result set
.. SELECT tile_data FROM tn
.. For each row tile_data from step a
... Pass if tile data in MIME type image/jpeg
... Pass if tile data in MIME type image/png
. Fail if no passes
... Fail if no passes
|*Reference* |Clause 2.2.4.1.1 Req 36:
|*Test Type* |Capability
|========================================

===== Tile Encoding JPEG

====== Data

*MIME Type JPEG*

[cols="1,5a"]
|========================================
|*Test Case ID* |+/opt/tiles/tiles_encoding/data/mime_type_jpeg+
|*Test Purpose* |Verify that a tile matrix user data table that contains tile data that is not MIME type image/png by default contains tile data in MIME type image/jpeg.
|*Test Method* |
. SELECT CASE
WHEN (SELECT tbl_name FROM sqlite_master WHERE tbl_name = \'gpkg_extensions') = \'gpkg_extensions' THEN
(SELECT table_name FROM gpkg_contents WHERE data_type = \'tiles' AND table_name NOT IN
(SELECT table_name from gpkg_extensions WHERE extension_name IN (\'gpkg_webp')))
ELSE (SELECT table_name FROM gpkg_contents WHERE data_type = \'tiles')
END;
. Not testable if returns empty result set
. SELECT table_name AS tn FROM gpkg_contents WHERE data_type = \'tiles'
. For each row tbl_name from step 1
.. SELECT tile_data FROM tbl_name
.. WHEN (SELECT tbl_name FROM sqlite_master WHERE tbl_name = \'gpkg_extensions') = \'gpkg_extensions' THEN (SELECT extension_name FROM gpkg_extensions WHERE table_name = \'tn' AND column_name = \'tile_data')
END;
... Not testable unless it returns empty result set
.. SELECT tile_data FROM tn
.. For each row tile_data from step a
... Pass if tile data in MIME type image/jpeg
. Fail if no passes
... Pass if tile data in MIME type image/png
... Fail if no passes
|*Reference* |Clause 2.2.5.1.1 Req 37:
|*Test Type* |Capability
|========================================
Expand Down
22 changes: 22 additions & 0 deletions spec/annexes/extension_tiles_webp.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,25 @@ None
|*Reference:* |Annex F.7 Req 91
|*Test Type* |Capability
|========================================

[float]
=====
[cols="1,5a"]
|========================================
|*Test Case ID* |+/reg_ext/tiles/tiles_encoding_webp/data/mime_type_webp+
|*Test Purpose* |Verify that a tile matrix user data table that conforms to this extension contains tile data of MIME type image/x-webp.
|*Test Method* |
. SELECT table_name AS tn FROM gpkg_contents WHERE data_type = \'tiles'
. For each row tn from step 2
.. WHEN (SELECT tbl_name FROM sqlite_master WHERE tbl_name = \'gpkg_extensions') = \'gpkg_extensions' THEN (SELECT extension_name FROM gpkg_extensions WHERE table_name = \'tn')
END;
.. For each row extension_name from step a
... Not testable if extension_name is not 'gpkg_webp'
... SELECT tile_data from tn
.... Pass if tile data in MIME type image/x-webp
.... Fail if no passes
|*Reference* |Annex F.7 Req 92
|*Test Type* |Capability
|========================================
21 changes: 20 additions & 1 deletion spec/annexes/extension_zoom_other_intervals.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The “gpkg_zoom_other” extension name SHALL be used as a gpkg_extensions tabl
A GeoPackage that implements other zoom intervals SHALL have a gpkg_extensions table that contains a row for each tile pyramid user data table with other zoom intervals with extension_name “gpkg_zoom_other”, the table_name of the table with other zoom intervals, and the “tile_data” column_name.

[requirement]
Tile pyramid user data tables MAY have pixel sizes that vary by irregular intervals or by regular intervals other than a factor of two (the default) between adjacent zoom levels.
Tile pyramid user data tables MAY have pixel sizes that vary by irregular intervals or by regular intervals other than a factor of two (the default) between adjacent zoom levels. Extends <<req_zoom_times_two>>.

The `pixel_x_size` and / or `pixel_y_size` column values in the `gpkg_tile_matrix` table vary by irregular intervals or by regular intervals other than a factor of two (the default) between adjacent zoom levels for a particular tile matrix set pyramid table.

Expand Down Expand Up @@ -107,3 +107,22 @@ None
|*Reference* |Annex F.6 Req 88
|*Test Type:* |Capability
|========================================

[float]
===== Zoom Interval

[cols="1,5a"]
|========================================
|*Test Case ID* |+/reg_ext/tiles/zoom_levels/data/zoom_intervals+
|*Test Purpose* |Verify that zoom level pixel sizes for tile matrix user data tables vary by factors of 2 between adjacent zoom levels in the tile matrix metadata table only for tile matrix sets that this extension does not apply to.
|*Test Method* |
. Override test +/opt/tiles/zoom_levels/data/zoom_times_two+
. SELECT table_name AS tn FROM gpkg_contents WHERE data_type = \'tiles'
. For each row tn from step 2
.. WHEN (SELECT tbl_name FROM sqlite_master WHERE tbl_name = \'gpkg_extensions') = \'gpkg_extensions' THEN (SELECT table_name from gpkg_extensions WHERE extension_name = \'gpkg_zoom_other' AND table_name = \'tn')
END;
.. If returns empty result set, execute test +/opt/tiles/zoom_levels/data/zoom_times_two+
. Pass if no fails
|*Reference* |Annex F.6 Req 89
|*Test Type* |Capability
|========================================

0 comments on commit 8284971

Please sign in to comment.