Skip to content

Instantly share code, notes, and snippets.

@stevendlander
Last active August 29, 2015 14:19
Show Gist options
  • Save stevendlander/4afa88cb2f0f3dc1acf8 to your computer and use it in GitHub Desktop.
Save stevendlander/4afa88cb2f0f3dc1acf8 to your computer and use it in GitHub Desktop.
Select statement for swagd verifier
SELECT
zoom_level as zl,
matrix_height as height
FROM
gpkg_tile_matrix
WHERE
table_name = '%s'
AND
(
zoom_level in
(
SELECT
zoom_level
FROM
%s
WHERE
tile_row < 0
)
OR
EXISTS
(
SELECT
NULL
FROM
%s
WHERE
zoom_level = zl
AND
tile_row > height - 1
)
)
@stevendlander
Copy link
Author

Query that will provide every zoom level in a geopackage user data table %s that has invalid tile entries for the row. An invalid tile entry for the row field is any row entry that has a value less than 0 or greater than (matrix_height for that level - 1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment