Cross-validation and quality control
Before we begin
Section titled “Before we begin”What we want to achieve
Section titled “What we want to achieve”- Confirm that the technical description closes.
- Confirm that the area agrees across the polygon, the technical description, the attribute table, and the map.
- Confirm that the corner coordinates agree across the shapefile, the computed coordinates, and the technical description.
- Check the attributes and file names against the guide’s rules.
- Check the application area against reference layers.
What we have
Section titled “What we have”- The complete outputs of the sample application from the previous modules
- The returned application: returned_boundary, returned_corners, returned_td, and returned_tie_point
- ref_forestland and ref_existing_tenure - fictional reference layers for the overlap checks
Relevant QGIS knowledge/skills
Section titled “Relevant QGIS knowledge/skills”Why cross-validate?
Section titled “Why cross-validate?”The four outputs are four views of the same area. Reviewers compare them against each other, so every value that appears in more than one output must agree:
| Value | Appears in |
|---|---|
| Corner coordinates | Point shapefile (geometry and NORTHINGS/EASTINGS), computed coordinates file, technical description (through the traverse) |
| Bearings and distances | Technical description, map table, polygon geometry |
| Area | Polygon geometry, AREA attribute, map title block, technical description (through the traverse) |
| Location and applicant | Attributes of both shapefiles, map title block, file names |
Some differences are expected: bearings rounded to the second and distances rounded to the centimeter do not reproduce a polygon to the millimeter. For the sample application, rounding moves the plotted corners by up to 7 millimeters and changes the area by 4.6 m² (0.0005 ha). The checks below separate rounding from errors.
Closure of the technical description
Section titled “Closure of the technical description”5.1. Checking that the technical description closes
Section titled “5.1. Checking that the technical description closes”What we want to achieve
Section titled “What we want to achieve”- The linear misclosure of a technical description and its relative precision, computed from the bearings and distances as written.
- With the Field Calculator (
), add an AZIMUTH field (Decimal number) to returned_td that reads the bearing text back into an azimuth:
with_variable('p', regexp_matches("bearing", '([NS])\\s*(\\d+)\\D+(\\d+)\\D+(\\d+(?:\\.\\d+)?)\\D*([EW])'),with_variable('q', to_real(@p[1]) + to_real(@p[2]) / 60 + to_real(@p[3]) / 3600,CASE WHEN @p[0] = 'N' AND @p[4] = 'E' THEN @q WHEN @p[0] = 'S' AND @p[4] = 'E' THEN 180 - @q WHEN @p[0] = 'S' AND @p[4] = 'W' THEN 180 + @q ELSE 360 - @q END))
- Add the DEPARTURE (east-west component) and LATITUDE (north-south component) of each line:
"distance" * sin(radians("AZIMUTH"))"distance" * cos(radians("AZIMUTH"))
- For a closed figure, the departures and the latitudes each add up to zero. The linear misclosure is how far they miss; preview it in the Field Calculator:
sqrt(sum("DEPARTURE") ^ 2 + sum("LATITUDE") ^ 2)
- Express it as a relative precision, the perimeter divided by the misclosure:
'1:' || format_number(sum("distance") / sqrt(sum("DEPARTURE") ^ 2 + sum("LATITUDE") ^ 2), 0)| Technical description | Misclosure | Relative precision |
|---|---|---|
| sample_td | 0.005 m | 1:369,491 |
| returned_td | 447.92 m | 1:3 |
Area agreement
Section titled “Area agreement”5.2. Checking that the area agrees everywhere
Section titled “5.2. Checking that the area agrees everywhere”- Compute the area of the polygon in the national grid with
area($geometry)(not$area; see Computing the area and location attributes). - Compare it with the AREA attribute and with the area printed on the map. Because the map’s area is read from the attribute, the map and the attribute always agree; the attribute and the polygon must be compared.
- For a polygon plotted from the technical description (as in Exercise 2.2), the polygon is the technical description’s area.
| Application | AREA attribute | Polygon, area($geometry) |
|---|---|---|
| Sample | 23.7585 ha | 23.7585 ha |
| Returned | 15.1427 ha | 14.7927 ha |
The returned application’s AREA is 0.35 ha larger than its polygon.
Coordinate agreement
Section titled “Coordinate agreement”5.3. Checking that the corners agree everywhere
Section titled “5.3. Checking that the corners agree everywhere”- Select by Expression (
) the corners whose NORTHINGS or EASTINGS differ from the point by more than a millimeter:
abs("EASTINGS" - x($geometry)) > 0.001 OR abs("NORTHINGS" - y($geometry)) > 0.001
- Select the corners that are not on the boundary:
distance($geometry, boundary(aggregate('area_boundary', 'collect', $geometry))) > 0.001- Check that the number of corners equals the number of lines in the technical description.
- Compare the computed coordinates file with the shapefile, corner by corner.
In the returned application, corner 5 has its easting and northing swapped, and corner 3 lies 2.5 m off the boundary (so its coordinates do not match its position either).
Attribute and file checks
Section titled “Attribute and file checks”5.4. Checking attributes against the guide’s rules
Section titled “5.4. Checking attributes against the guide’s rules”Use Select by Expression (
) to find features that break a rule.
X or Y not blank (on the corners):
"X" IS NOT NULL OR "Y" IS NOT NULLREGION not in Roman numerals:
NOT regexp_match("REGION", '^(I|II|III|IV-A|IV-B|V|VI|VII|VIII|IX|X|XI|XII|XIII|NCR|CAR|BARMM|NIR)$')Possible abbreviations (a period in a name, such as Gen. or Sto.; check each one by hand):
regexp_match(concat("NAME", ' ', "PROVINCE", ' ', "MUNI_CTY", ' ', "BARANGAY"), '\\.')Municipalities or barangays not alphabetized, or separated by anything but a comma:
"BARANGAY" <> array_to_string(array_sort(string_to_array("BARANGAY", ',')), ',')OR "MUNI_CTY" <> array_to_string(array_sort(string_to_array("MUNI_CTY", ',')), ',')OR "BARANGAY" LIKE '%, %' OR "MUNI_CTY" LIKE '%, %'Shared attributes that differ between the corners and the boundary (on the corners):
"NAME" <> aggregate('area_boundary', 'max', "NAME")OR "TENURE" <> aggregate('area_boundary', 'max', "TENURE")OR "REGION" <> aggregate('area_boundary', 'max', "REGION")OR "PROVINCE" <> aggregate('area_boundary', 'max', "PROVINCE")OR "MUNI_CTY" <> aggregate('area_boundary', 'max', "MUNI_CTY")OR "BARANGAY" <> aggregate('area_boundary', 'max', "BARANGAY")In the returned application, these find: X filled in on corner 2; REGION written as Region IV-A; Gen. Nakar; Pisa, Batangan; and every corner disagreeing with the boundary on REGION, MUNI_CTY, and BARANGAY.
Then check the file names against the prescribed naming formats.
Checking against reference layers
Section titled “Checking against reference layers”5.5. Checking the application area against reference layers
Section titled “5.5. Checking the application area against reference layers”- Use Select by Location (
) to select the application area where it intersects ref_existing_tenure.
- Run Processing Toolbox ‣ Difference with the application area as the input and ref_forestland as the overlay. Any output is the part of the area outside forestland.
- Recompute the barangays the polygon overlaps with the BARANGAY expression and compare them with the attribute.
In the returned application, the area overlaps an existing tenure, 5.20 ha of it lies outside the forestland, and it overlaps only Batangan, although its BARANGAY attribute says Pisa, Batangan.
Final quality control
Section titled “Final quality control”5.6. Final QC checklist
Section titled “5.6. Final QC checklist”Run through this list for every application before submission:
Coordinate reference system
- Shapefiles, technical description, and tie point are in the same datum and national grid zone
- No layer was converted between Luzon 1911 and PRS 1992
- The projection printed on the map matches the shapefiles
- The map grid is in latitude and longitude on the map’s datum (EPSG:4683 for PRS 1992, EPSG:4253 for Luzon 1911), not WGS 84
Shapefiles
- One point shapefile per parcel and one polygon shapefile for all parcels
- All prescribed fields are present, with text fields of 254 characters (50 for REGION) and coordinates with 3 decimals
- Geometries are valid, fixed by hand rather than with Fix geometries
- AREA is computed with
area($geometry) - Attributes follow the guide’s rules; X and Y are blank
Technical description and coordinates
- Lines are numbered consistently with the corners
- The technical description closes within rounding
- The tie point’s coordinates and the tie line are complete
- NORTHINGS and EASTINGS match the geometry and the coordinates file
Map
- Title, location, area, scale, projection, and legend are present and agree with the attributes
- Technical description and original coordinate tables match the exported files
- Certification and signatories are complete
Files
- All files follow the prescribed naming formats
Capstone: one application from plot to final
Section titled “Capstone: one application from plot to final”General instructions
Section titled “General instructions”Using a technical description provided by the instructor, prepare a complete application from start to finish, without referring back to the sample outputs.
Objectives
Section titled “Objectives”Produce the four required outputs for a new application, and show that they agree.
Instructions
Section titled “Instructions”- Set up the project in the datum and zone of the technical description (Module 1).
- Plot the area, create the shapefiles, and fill in the attributes (Module 2).
- Generate the corners, coordinates, and tie line, and export the technical description and coordinates (Module 3).
- Produce the map from the layout template (Module 4).
- Run every check in this module and complete the final QC checklist.
- Present your outputs and your QC results to the group.
Certification and support
Join an upcoming training to take this as an instructor-led course, or contact us to arrange one for your team or organization.
