Checks for presence of required tables, valid values and other constraints.
gpkg_validate(x, diagnostics = FALSE)
logical. TRUE
if valid. FALSE
if one or more problems are found. For full diagnostics run with diagnostics = TRUE
to return a list containing results for each test run on the input GeoPackage.
Several tests are run on the input GeoPackage, including:
required_tables
: logical. TRUE
if gpkg_contents
and gpkg_spatial_ref_sys
tables exist
has_contents
: logical. TRUE
if the number of rows in gpkg_contents
table is greater than 0
and all tables listed in gpkg_contents
are in the database
has_spatial_tables
: logical. TRUE
if the number of tables in gpkg_contents
with data_type
"features"
or "2d-gridded-coverage"
is greater than 0