Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 3.8 KB

constraints.md

File metadata and controls

48 lines (31 loc) · 3.8 KB

Constraints

Version: 1

Purpose: Verify that the features provided in the dataset adhere to the constraints specified in the INSPIRE application schema.

Prerequisites

Test method

Verify that the OCL constraints listed below that are specified in the UML model of the application schema are met, i.e. validate features against the constraints. For unmet constraints report constraintViolation.

For constraints that require retrieving a referenced resource and the resource cannot be retrieved, report brokenLink. The test accepts the following two types of content in @xlink:href attributes: Either a "#" followed by a @gml:id in the same document or a HTTP URI.

Automated tests:

  • Value of areaValue shall be given in square meters; OCL: "inv: self.areaValue.uom.uomSymbol='m2'". Verify that BasicPropertyUnit.areaValue.uom and CadastralParcel.areaValue.uom are given in 'm2'.
  • Value of estimatedAccuracy shall be given in meters; OCL: "inv: self.estimatedAccuracy.uom.uomSymbol='m'". Verify that CadastralBoundary.estimatedAccuracy.uom and CadastralZoning.estimatedAccuracy.uom are given in 'm'.
  • Type of geometry shall be GM_Surface or GM_MultiSurface; OCL "inv: geometry.oclIsKindOf(GM_Surface) or geometry.oclIsKindOf(GM_MultiSurface)". Verify that CadastralParcel.geometryType is a gml:Surface or gml:MutiSurface.
  • A lower level cadastral zoning shall be part of an upper level zoning. OCL: "inv: self.nationalLevel <> '1stOrder' implies self.level < self.upperLevelUnit.level". Verify that for a CadastralZoning not of the nationalLevel 1st Order, its own level is lower than the level of the CadastralZoning referenced in upperLevelUnit

Reference(s):

Test type: Automated

Messages

Identifier Message text (parameters start with '$')
constraintViolation XML document '$filename', $featureType '$gmlid': The constraint '$constraint' is violated.
brokenLink XML document '$filename', $featureType '$gmlid': The property '$propertyName' has a value '$value' that cannot be retrieved using HTTP.

Contextual XPath references

The namespace prefixes used as described in README.md.

Abbreviation XPath expression
areaValue.uom //schema-element(cp:BasicPropertyUnit)/cp:areaValue/@uom/text() or //schema-element(cp:CadastralParcel)/cp:areaValue/@uom/text()
estimatedAccuracy.uom //schema-element(cp:CadastralBoundary)/cp:estimatedAccuracy/@uom/text() or //schema-element(cp:CadastralZoning)/cp:estimatedAccuracy/@uom/text()
geometryType //schema-element(cp:CadastralParcel)/cp:geometry/*
CadastralZoning //schema-element(cp:CadastralZoning)
nationalLevel //schema-element(cp:CadastralZoning)/cp:level/@xlink:href or //schema-element(cp3:CadastralZoning)/cp3:level/text()
upperLevelUnit //schema-element(cp:CadastralZoning)/cp:upperLevelUnit