Skip to content

Commit

Permalink
Added:
Browse files Browse the repository at this point in the history
featureSRSconsistency - Test extending 13 which is currently only looking at table definitions, but if one inspects the standard, there are additional tests such as inconsistencies between srs_id that need to be examined.  The feature portion of this test has been added to check for inconsistencies between the geopackage contents, the geopackage geometry columns, and the set of srs_id and feature tables.

getFeaturesWithGeometryInfo - Iterator for processing feature geometry tests. This iterator performs the baseline query needed for all feature geometry tests, gathering the gpkg_geometry_columns values that will be checked for consistency against the geometry blob content in each feature.  By processing these tests with the iterator, we can check for errors in each feature table and not just quit at the very first error found.

featureGeometryEncodingTesting – Called by the iterator for each feature table, this test function performs all testing against the geometry blob for each row of the feature table. In order to maintain some processing performance, all of these tests have to be done here rather than re-process the blob for each test separately. The tests do attempt to re-use previously identified data. Each test performed within this group provides a detailed response if an issue is found. Reviewing the tests in here:
19 i   Looks for the correct magic number
19 ii  Looks for the correct version number
19 iii Verifies the binary type
19 iv  Verifies the correct envelope flag values
33     Verifies the srs_id. This test also will check for byte swap errors within the srs_id, hence by putting the test before 19 v, it will catch potential byte swap errors that may affect retrieval of the envelope.
19 v   If the geometry is empty but the envelope is not empty, triggers an error
20     Verifies the geometry type from within the WKB. This test also will check for possible byte swap errors within the WKB.
32	Checks if the WKB geometry type (subtype) is allowed based on the geometry type provided by gpkg_geometry_columns.
66	Partial – included only a check on the WKB item count value (when applicable) at this time. WKB processing is going to suck down a huge amount of processing time!
67	Check for gpkg_extensions for gpkg_geom_<feature> for the feature (when there are extensions).
NSG 19B Ensure the geopackage extents from gpkg_geometry_columns contains the feature envelope.
78	Verify that the rtree trigger accurately contains the feature envelope when there are rtree extensions

featureGeometryColumnsDataValuesTableNameNEW – Added because it does not appear that the existing tests for 23 and 26 are compliant with OGC 12-128r14.


Also:
Clean up of escaped single quotes in SQL statements.
  • Loading branch information
ajanett committed May 31, 2018
1 parent 2c4339b commit acbf3c5
Show file tree
Hide file tree
Showing 4 changed files with 1,532 additions and 86 deletions.
21 changes: 21 additions & 0 deletions src/main/java/org/opengis/cite/gpkg12/ErrorMessageKeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,25 @@ public class ErrorMessageKeys {
public static final String COVERAGE_ANCILLARY_DATATYPE_INVALID = "CoverageAncillaryDatatypeInvalid";
public static final String TILE_ANCILLARY_REFERENCES = "TileAncillaryReferences";
public static final String TILE_ANCILLARY_TABLE_REF_INVALID = "TileAncillaryTableRefInvalid";
public static final String FEATURE_TABLE_NAMES_MISSING = "FeatureTableNamesMissing";
public static final String FEATURE_GEOMETRY_INVALID_MAGIC_NUMBER = "FeatureGeometryColumnInvalidMagicNumber";
public static final String FEATURE_GEOMETRY_INVALID_VERSION = "FeatureGeometryColumnInvalidVersion";
public static final String FEATURE_GEOMETRY_INVALID_BINARY_CODE = "FeatureGeometryColumnInvalidBinaryCode";
public static final String FEATURE_GEOMETRY_INVALID_ENVELOPE_CODE = "FeatureGeometryColumnInvalidEnvelopeCode";
public static final String FEATURE_GEOMETRY_INVALID_DETECTED_EMPTY_GEOMETRY_FLAG_BUT_ENVELOPE_HAS_CONTENT = "FeatureGeometryColumnDetectedEmptyGeometryFlagButEnvelopeHasContent";
public static final String FEATURE_GEOMETRY_SRS_NOT_IN_GPKG_CONTENTS = "FeatureGeometryColumnSRSNotInGpkgContents";
public static final String FEATURE_GEOMETRY_POSSIBLE_BYTE_SWAP_ERROR_SRS_MATCH = "FeatureGeometryColumnSRSMatchWhenBytesSwapped";
public static final String FEATURE_GEOMETRY_SRS_MISMATCH = "FeatureGeometryColumnSRSDoesNotMatchSpecifiedSRSForFeature";
public static final String FEATURE_GEOMETRY_TYPE_INVALID = "FeatureGeometryColumnGeometryTypeNotValid";
public static final String FEATURE_GEOMETRY_TYPE_INVALID_POSSIBLE_BYTE_SWAP = "FeatureGeometryColumnGeometryTypeNotValidButByteSwapErrorPossible";
public static final String FEATURE_GEOMETRY_NOT_ASSIGNABLE_TO_SUPERTYPE = "Feature_GeometryColumnGeometryNotAssignableToSupertype";
public static final String FEATURE_GEOMETRY_TYPE_NOT_PRESENT_AS_EXTENSION = "FeatureGeometryColumnGeometryTypeNotPresentAsExtension";
public static final String FEATURE_GEOMETRY_ENVELOPE_OUTSIDE_BOUNDS_OF_GEOPACKAGE = "FeatureGeometryColumnEnvelopeOutsideExtentsOfGeoPackage";
public static final String FEATURE_GEOMETRY_ENVELOPE_OUTSIDE_TOLERANCE_OF_RTREE_TRIGGER_MIN_MAX = "FeatureGeometryColumnEnvelopeOutsideToleranceOfRTreeTriggerMinMax";
public static final String FEATURE_FOREIGN_KEY_NOT_SPECIFIED_CORRECTLY = "FeatureForeignKeyNotSpecifiedCorrectly";
public static final String FEATURE_GEOMETRY_ENVELOPE_RTREE_TABLE_MISSING_OR_IN_ERROR = "FeatureGeometryColumnRtreeTableMissingOrInError";
public static final String FEATURE_GEOMETRY_BLOB_PROCESSING_TEST_FAILURE = "FeatureGeometryColumnBLOBProcessingTestFailure";
public static final String FEATURE_GEOMETRY_WKB_ITEM_COUNT_ILLEGAL = "FeatureGeometryWKBItemCountIllegal";
public static final String FEATURE_GEOMETRY_COLUMNS_DOES_NOT_MATCH_CONTENTS_COUNT = "FeatureGeometryColumnsDoeNotMatchContents";
public static final String FEATURE_GEOMETRY_COLUMNS_SRS_ID_NOT_CONSISTENT_WITH_CONTENTS = "FeatureGeometryColumnsSRSIDNotConsistentWithContents";
}
Loading

0 comments on commit acbf3c5

Please sign in to comment.