diff --git a/README.md b/README.md index dc07b9b..13ad403 100644 --- a/README.md +++ b/README.md @@ -84,34 +84,34 @@ geopackage-validator generate-definitions --gpkg-path "/gpkg/${gpkg_path}" > "$s The Geopackage validator can validate .gkpg files to see if they conform to a set of standards. The current checks are (see also the 'show-validations' command): -| Validation code** | Description | -|:-----------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| UNKNOWN_ERROR | No unexpected (GDAL) errors must occur. | -| RQ0 | _LEGACY:_ * Geopackage must conform to table names in the given JSON or YAML definitions. | -| RQ1 | Layer names must start with a letter, and valid characters are lowercase a-z, numbers or underscores. | -| RQ2 | Layers must have at least one feature. | -| RQ3 | _LEGACY:_ * Layer features should have an allowed geometry_type (one of POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, or MULTIPOLYGON). | -| RQ4 | The geopackage should have no views defined. | -| RQ5 | _LEGACY:_ * Geometry should be valid. | -| RQ6 | Column names must start with a letter, and valid characters are lowercase a-z, numbers or underscores. | -| RQ7 | Tables should have a feature id column with unique index. | -| RQ8 | Geopackage must conform to given JSON or YAML definitions. | -| RQ9 | All geometry tables must have an rtree index. | -| RQ10 | All geometry table rtree indexes must be valid. | -| RQ11 | OGR indexed feature counts must be up to date. | -| RQ12 | _LEGACY:_ * Only the following EPSG spatial reference systems are allowed: 28992, 3034, 3035, 3038, 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 3050, 3051, 4258, 4936, 4937, 5730, 7409. | -| RQ13 | It is required to give all GEOMETRY features the same default spatial reference system. | -| RQ14 | The geometry_type_name from the gpkg_geometry_columns table must be one of POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, or MULTIPOLYGON. | -| RQ15 | All table geometries must match the geometry_type_name from the gpkg_geometry_columns table. | -| RQ16 | _LEGACY:_ * All layer and column names shall not be longer than 53 characters. | -| RQ21 | All layer and column names shall not be longer than 57 characters. | -| RQ22 | Only the following EPSG spatial reference systems are allowed: 28992, 3034, 3035, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 3857, 4258, 4326, 4936, 4937, 5730, 7409. | -| RQ23 | Geometry should be valid and simple. | -| RC17 | It is recommended to name all GEOMETRY type columns 'geom'. | -| RC18 | It is recommended to give all GEOMETRY type columns the same name. | -| RC19 | It is recommended to only use multidimensional geometry coordinates (elevation and measurement) when necessary. | -| RC20 | It is recommended that all (MULTI)POLYGON geometries have a counter-clockwise orientation for their exterior ring, and a clockwise direction for all interior rings. | -| UNKNOWN_WARNINGS | It is recommended that the unexpected (GDAL) warnings are looked into. | +| Validation code** | Description | +|:-----------------:|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| UNKNOWN_ERROR | No unexpected (GDAL) errors must occur. | +| RQ0 | _LEGACY:_ use RQ8 * Geopackage must conform to table names in the given JSON or YAML definitions. | +| RQ1 | Layer names must start with a letter, and valid characters are lowercase a-z, numbers or underscores. | +| RQ2 | Layers must have at least one feature. | +| RQ3 | _LEGACY:_ use RQ14 * Layer features should have an allowed geometry_type (one of POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, or MULTIPOLYGON). | +| RQ4 | The geopackage should have no views defined. | +| RQ5 | _LEGACY:_ use RQ23 * Geometry should be valid. | +| RQ6 | Column names must start with a letter, and valid characters are lowercase a-z, numbers or underscores. | +| RQ7 | Tables should have a feature id column with unique index. | +| RQ8 | Geopackage must conform to given JSON or YAML definitions. | +| RQ9 | All geometry tables must have an rtree index. | +| RQ10 | All geometry table rtree indexes must be valid. | +| RQ11 | OGR indexed feature counts must be up to date. | +| RQ12 | _LEGACY:_ use RQ22 * Only the following EPSG spatial reference systems are allowed: 28992, 3034, 3035, 3038, 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 3050, 3051, 4258, 4936, 4937, 5730, 7409. | +| RQ13 | It is required to give all GEOMETRY features the same default spatial reference system. | +| RQ14 | The geometry_type_name from the gpkg_geometry_columns table must be one of POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, or MULTIPOLYGON. | +| RQ15 | All table geometries must match the geometry_type_name from the gpkg_geometry_columns table. | +| RQ16 | _LEGACY:_ use RQ21 * All layer and column names shall not be longer than 53 characters. | +| RQ21 | All layer and column names shall not be longer than 57 characters. | +| RQ22 | Only the following EPSG spatial reference systems are allowed: 28992, 3034, 3035, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 3857, 4258, 4326, 4936, 4937, 5730, 7409. | +| RQ23 | Geometry should be valid and simple. | +| RC17 | It is recommended to name all GEOMETRY type columns 'geom'. | +| RC18 | It is recommended to give all GEOMETRY type columns the same name. | +| RC19 | It is recommended to only use multidimensional geometry coordinates (elevation and measurement) when necessary. | +| RC20 | It is recommended that all (MULTI)POLYGON geometries have a counter-clockwise orientation for their exterior ring, and a clockwise direction for all interior rings. | +| UNKNOWN_WARNINGS | It is recommended that the unexpected (GDAL) warnings are looked into. | \* Legacy requirements are only executed with the validate command when explicitly requested in the validation set. \** Since version 0.8.0 the recommendations are part of the same sequence as the requirements. From now on a check will always maintain the integer part of the code. Even if at a later time the validation type can shift between requirement and recommendation. diff --git a/geopackage_validator/validations/geometry_type_check.py b/geopackage_validator/validations/geometry_type_check.py index ea0b638..1098fe2 100644 --- a/geopackage_validator/validations/geometry_type_check.py +++ b/geopackage_validator/validations/geometry_type_check.py @@ -84,7 +84,7 @@ def aggregate(results): class GeometryTypeValidator(validator.Validator): - """LEGACY: * Layer features should have an allowed geometry_type (one of POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, or MULTIPOLYGON).""" + """LEGACY: use RQ14 * Layer features should have an allowed geometry_type (one of POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, or MULTIPOLYGON).""" code = 3 level = validator.ValidationLevel.ERROR diff --git a/geopackage_validator/validations/geometry_valid_check.py b/geopackage_validator/validations/geometry_valid_check.py index 2904e46..087889b 100644 --- a/geopackage_validator/validations/geometry_valid_check.py +++ b/geopackage_validator/validations/geometry_valid_check.py @@ -51,7 +51,7 @@ def query_geometry_valid(dataset, sql_template) -> Iterable[Tuple[str, str, str, class ValidGeometryValidatorV0(validator.Validator): - """Legacy: * Geometries should be valid.""" + """Legacy: use RQ23 * Geometries should be valid.""" code = 5 level = validator.ValidationLevel.ERROR diff --git a/geopackage_validator/validations/name_length_check.py b/geopackage_validator/validations/name_length_check.py index 7ee839f..9900125 100644 --- a/geopackage_validator/validations/name_length_check.py +++ b/geopackage_validator/validations/name_length_check.py @@ -21,7 +21,7 @@ def query_names(dataset) -> Iterable[Tuple[str, str, int]]: class NameLengthValidatorV0(validator.Validator): - """LEGACY: * All names must be maximally 53 characters long.""" + """LEGACY: use RQ21 * All names must be maximally 53 characters long.""" code = 16 level = validator.ValidationLevel.ERROR diff --git a/geopackage_validator/validations/srs_check.py b/geopackage_validator/validations/srs_check.py index 7a348ee..5f70b5d 100644 --- a/geopackage_validator/validations/srs_check.py +++ b/geopackage_validator/validations/srs_check.py @@ -32,7 +32,7 @@ def srs_equal_check_query(dataset) -> Iterable[str]: class SrsValidatorV0(validator.Validator): - """LEGACY: * Only the following EPSG spatial reference systems are allowed: 28992, 3034, 3035, 3038, 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 3050, 3051, 4258, 4936, 4937, 5730, 7409.""" + """LEGACY: use RQ22 * Only the following EPSG spatial reference systems are allowed: 28992, 3034, 3035, 3038, 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 3050, 3051, 4258, 4936, 4937, 5730, 7409.""" code = 12 level = validator.ValidationLevel.ERROR diff --git a/geopackage_validator/validations/table_definitions_check.py b/geopackage_validator/validations/table_definitions_check.py index f3d047b..2bf6212 100644 --- a/geopackage_validator/validations/table_definitions_check.py +++ b/geopackage_validator/validations/table_definitions_check.py @@ -116,7 +116,7 @@ def check_table_definitions(self, definitions_current: TableDefinition): class TableDefinitionValidatorV0(validator.Validator): - """LEGACY: * Geopackage must conform to table names in the given JSON definitions.""" + """LEGACY: use RQ8 * Geopackage must conform to table names in the given JSON definitions.""" code = 0 level = validator.ValidationLevel.ERROR