QC tests can call validation functions. The following table lists these functions along with a brief description of each one. Many of the functions are designed to evaluate tests in IHO S-58 ENC Validation Checks Edition 5. If a function is based on an S-58 test, the test number is included in the description.
Function | Description |
GeneralSoundingTests.xml | |
| Function to determine if depth or dredged areas contain one or more soundings. Grouped soundings are taken into account by examining each sounding spatial. The following message is written to the error log if no soundings are located: "Error determining if DEPARE or DRGARE object contains a SOUNDG feature." |
| Function to determine if selected sounding fall within a depth or dredged area. Grouped soundings are taken into account by examining each sounding spatial. The following message is written to the error log if soundings are not located in a depth or dredged area: "Error determining if SOUNDG is inside a DEPARE or DRGARE area feature." |
S58_Level1_Features.xml | |
| Test 508 function that checks if the COLPAT attribute is encoded for every object with more than one COLOUR (except LIGHTS); or, checks for no COLPAT value for objects with only one COLOUR. The following message is written to the error log if a problem is located: "Error determining if COLPAT attribute is valid." |
| Test 1515 function that checks if attributes DATEND, DATSTA, PEREND, PERSTA, SORDAT, CPDATE, SUREND or SURSTA formats conform to ISO 8601:1988. Valid formats are CCMMDD, CCYYMM, CCYY, MMDD, MM. The following message is written to the error log if invalid formats are located: "Error determining if date attribute value is formatted correctly." |
| Test 1517 function that checks if formats for TIMSTA and TIMEND values are correct. Valid date/time format is CCYYMMDDThhmmss The following message is written to the error log if invalid formats are located: "Error determining if date/time attribute value is formatted correctly." |
| Test 1766 function that checks if attributes PICREP, TXTDSC and NTXTDS contain only one file and checks for invalid semi-colons (;) in the file name. The following message is written to the error log if a problem is located: "Error determining if external file is formatted correctly." |
| Test 1760 function to check that if NATSUR is encoded, the associated value for NATQUA (if encoded) is correct according to the table for Test 1760 in S-58 ENC Validation Checks. NATSUR and NATQUA attributes that are set UNDEFINED or UNKNOW are passed. The following message is written to the error log if the test fails: "Error determining if the NATSUR and NATQUA attributes relationship is correct." |
| Test 1673 function that checks the following formatting rules for attributes NATSUR and NATQUA: • each NATSUR value is separated by a slash or comma without a space • NATSUR does not begin or finish with a comma or space • NATSUR does not have more than one consecutive comma or space • NATSUR and NATQUA values have the same number of commas or slashes. NATSUR and NATQUA attributes that are set UNDEFINED or UNKNOW are passed. The following message is written to the error log if a formatting error is located: "Error determining if the value of NATSUR and NATQUA attributes are formatted correctly." |
| Test 1778 function to check that no LIGHTS object has CATLIT=1 [directional function] with the angle defined by SECTR1 and SECTR2 being greater than 10º. If CATLIT, SECTR1 or SECTR2 are set to UNDFINED or UNKNOWN, the test is passed. The following message is written to the error log if attribute values do not match: "Error determining if the sector angle is valid." |
| Test 542 function that checks if SIGGRP attribute values starts and finishes with a bracket (). The following message is written to the error log if brackets cannot be located: "Error determining if SIGGRP attribute value begins and ends with brackets." |
| Test 541 function that checks if the SIGGRP attribute format is correct for all lights (except fixed lights). The function does not check brackets and will skip values set to UNDEFINED or UNKNOWN. The following message is written to the error log if a problem is located: "Error determining if SIGGRP attribute value is formatted correctly." |
| Test 558 function that checks if both SIGSEQ and SIGPER attributes are encoded then the SIGPER value must be equal to the sum of both intervals of light and intervals of eclipse for SIGSEQ. SIGSEQ or SIGPER values (or both) set to UNDEFINED or UNKNOWN are passed. The following message is written to the error log if a discrepancy is found between the two values: "Error determining if SIGPER is equal to the sum of intervals of light and intervals of eclipse described by SIGSEQ." |
| Test 557 function that checks if SIGEQ values conform to the S-58 specification for string formatting. Values set to UNDEFINED or UNKNOWN are passed. The following message is written to the error log if incorrect formatting is found: "Error determining if SIGSEQ attribute value is formatted correctly." |
| Test 551 function that checks if text attribute values use invalid C0 characters. The following message is written to the error log if invalid characters are located: "Error determining if textual attribute value uses only non format effecting characters." |
| Test 543 function that checks if TS_TSP attribute values are separated by commas. The following message is written to the error log if commas cannot be located: "Error determining if TS_TSP attribute value is formatted correctly." |
S58_Level3_SpatialRelations.xml | |
| Test 1686 function to check if a TSELNE object separates either • two traffic lanes • traffic lane and inshore traffic zone The following message is written to the error log if the test fails: "Error executing function CheckTSELNE_1686" |
| Test 1687 function to check if a TSEZNE object separates either • two traffic lanes • traffic lane and inshore traffic zone • centre of a roundabout The test will pass if at least one edge of the TSEZNE is shared with either • two or more TSSLPT features • one TSSLPT feature and one ITSZNE feature • a TSSRON feature’s inner ring edges (the ring must equal the island of a TSSRON feature) The following message is written to the error log if the test fails: "Error executing function CheckTSEZNE_1687." |
| Test 1688 function to check if any TSSCRS object encodes a crossing between at least four traffic lanes. The test will pass if the edges of the TSSCRS feature is shared with at least four separate TSSLPT features. The following message is added to the error log if the test fails: "Error executing function CheckTSSCRS_1688." |
| Test 1685 function that checks any TSSBND is the outer limit of a traffic lane/separation scheme roundabout. The test will pass if each edge of the TSSBND feature is shared with only one of the following features: • TSSPLT • TSSRON • TWRTPT • DWRTPT The following message is added to the error log if the test fails: "Error executing function CheckTSSBND_1685." |