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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MatchGeo Annotation Protocol
|
| 2 |
+
# Local Feature Matching Keypoint Annotation on Digital Elevation Models
|
| 3 |
+
|
| 4 |
+
> **Version**: 1.1
|
| 5 |
+
> **Date**: 2026-07-24
|
| 6 |
+
> **Authors**: Sabrina Correa (UFV)
|
| 7 |
+
> **Dataset**: MatchGeo DEM v1.1 (DOI: 10.5281/zenodo.21229785)
|
| 8 |
+
> **Standard**: Aligned with OGC TrainingDML-AI (23-008r3 / 24-006r1)
|
| 9 |
+
> **License**: CC BY 4.0
|
| 10 |
+
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
## Table of Contents
|
| 14 |
+
|
| 15 |
+
1. [Purpose and Scope](#1-purpose-and-scope)
|
| 16 |
+
2. [Prerequisites](#2-prerequisites)
|
| 17 |
+
3. [Annotation Class](#3-annotation-class)
|
| 18 |
+
4. [Annotation Workflow](#4-annotation-workflow)
|
| 19 |
+
5. [Annotation Rules](#5-annotation-rules)
|
| 20 |
+
6. [Quality Control](#6-quality-control)
|
| 21 |
+
7. [File Format and Metadata](#7-file-format-and-metadata)
|
| 22 |
+
8. [Common Pitfalls and Edge Cases](#8-common-pitfalls-and-edge-cases)
|
| 23 |
+
9. [Appendix A: Visual Example](#appendix-a-visual-example)
|
| 24 |
+
10. [Appendix B: Glossary](#appendix-b-glossary)
|
| 25 |
+
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
## 1. Purpose and Scope
|
| 29 |
+
|
| 30 |
+
### 1.1 Objective
|
| 31 |
+
|
| 32 |
+
This protocol defines the procedure for annotating salient elevation keypoints on 333Γ333 pixel Digital Elevation Model (DEM) tiles. The annotated keypoints serve as ground truth for training and evaluating **local feature matching algorithms** β computer vision methods that detect and describe distinctive points in images (or elevation surfaces) to establish correspondences across different views, scales, or domains.
|
| 33 |
+
|
| 34 |
+
### 1.2 What to Annotate
|
| 35 |
+
|
| 36 |
+
Annotators must identify **morphologically salient points** on the DEM surface that would be reliably detected by feature descriptors such as SIFT, SURF, ORB, or learned descriptors (e.g., SuperPoint, R2D2). These points must be:
|
| 37 |
+
|
| 38 |
+
- **Locally distinctive**: The point must stand out from its immediate neighborhood.
|
| 39 |
+
- **Geometrically stable**: The point must remain detectable under moderate changes in resolution, noise, or viewing angle.
|
| 40 |
+
- **Repeatable**: The point should be identifiable by another annotator (or the same annotator on a different day) with high spatial consistency.
|
| 41 |
+
|
| 42 |
+
In **urban areas** (e.g., SΓ£o Paulo, Bonn), the primary salient features are **building corners** β the intersection points of building roof edges where elevation changes abruptly.
|
| 43 |
+
|
| 44 |
+
### 1.3 What NOT to Annotate
|
| 45 |
+
|
| 46 |
+
Do **not** annotate:
|
| 47 |
+
|
| 48 |
+
- Points in flat or uniformly sloped areas with no local distinctiveness.
|
| 49 |
+
- Points at tile boundaries (within 5 pixels of the edge).
|
| 50 |
+
- Points in areas with obvious data artifacts (striping, voids, interpolation errors).
|
| 51 |
+
- Points in water bodies (lakes, rivers) unless the shoreline intersection is clearly salient.
|
| 52 |
+
- Points on roads, sidewalks, or other flat man-made surfaces unless they form a clear corner or edge intersection.
|
| 53 |
+
- Points where the annotator is not fully confident about the salience.
|
| 54 |
+
|
| 55 |
+
### 1.4 Scope of Application
|
| 56 |
+
|
| 57 |
+
This protocol applies to:
|
| 58 |
+
|
| 59 |
+
- **GER_BN** (Bonn, Germany) β primary annotated city
|
| 60 |
+
- **BRA_SP** (SΓ£o Paulo, Brazil) β secondary annotated city
|
| 61 |
+
- Any future cities added to the MatchGeo dataset with manual annotations
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
## 2. Prerequisites
|
| 66 |
+
|
| 67 |
+
### 2.1 Required Software
|
| 68 |
+
|
| 69 |
+
- **QGIS** β₯ 3.28 (Long Term Release)
|
| 70 |
+
- **Python** β₯ 3.9 with `geopandas`, `rasterio`, `shapely`
|
| 71 |
+
- Optional: **CloudCompare** for 3D point cloud cross-reference (when source LiDAR is available)
|
| 72 |
+
|
| 73 |
+
### 2.2 Required Data
|
| 74 |
+
|
| 75 |
+
For each tile to annotate:
|
| 76 |
+
|
| 77 |
+
| File | Purpose |
|
| 78 |
+
|---|---|
|
| 79 |
+
| `{CITY_CODE}_{row}_{col}.tif` | 333Γ333 pixel DEM tile (Float32, NoData=-9999) |
|
| 80 |
+
| `{CITY_CODE}_{row}_{col}_hillshade.tif` | Hillshade visualization (optional but recommended) |
|
| 81 |
+
|
| 82 |
+
### 2.3 Annotator Qualifications
|
| 83 |
+
|
| 84 |
+
Annotators should have:
|
| 85 |
+
|
| 86 |
+
- Basic familiarity with DEM visualization techniques (hillshade, slope).
|
| 87 |
+
- Experience with QGIS or equivalent GIS software.
|
| 88 |
+
- Understanding of what makes a point "salient" for computer vision feature detectors.
|
| 89 |
+
|
| 90 |
+
---
|
| 91 |
+
|
| 92 |
+
## 3. Annotation Class
|
| 93 |
+
|
| 94 |
+
All annotated keypoints belong to a **single class**:
|
| 95 |
+
|
| 96 |
+
### `general_interest_point` β Salient Elevation Keypoint
|
| 97 |
+
|
| 98 |
+
> **Definition**: A point on the DEM surface that is locally distinctive and suitable for local feature matching. In urban areas, this is typically a **building corner** (the intersection of roof edges). In natural terrain, this is any point with high local curvature or distinctiveness that would produce a strong response from a feature detector.
|
| 99 |
+
|
| 100 |
+
**Rationale for single class**: The MatchGeo dataset is designed for **local feature matching**, not semantic segmentation or landform classification. The task requires correspondences between geometrically similar points, not semantic labels. A single class simplifies annotation while preserving the geometric information needed for feature matching research.
|
| 101 |
+
|
| 102 |
+
---
|
| 103 |
+
|
| 104 |
+
## 4. Annotation Workflow
|
| 105 |
+
|
| 106 |
+
### 4.1 Pre-Annotation Setup
|
| 107 |
+
|
| 108 |
+
1. **Load the tile** in QGIS.
|
| 109 |
+
2. **Verify CRS**: Ensure the project CRS matches the tile CRS (e.g., `EPSG:25832` for Bonn, `EPSG:31983` for SΓ£o Paulo).
|
| 110 |
+
3. **Load hillshade layer** as a visual reference (optional but strongly recommended).
|
| 111 |
+
4. **Set zoom level**: Work at a scale where individual pixels are visible but the full tile context is retained.
|
| 112 |
+
5. **Check for artifacts**: Scan the tile for data quality issues (voids, striping, noise). Skip tiles with >20% artifact coverage.
|
| 113 |
+
|
| 114 |
+
### 4.2 Annotation Procedure
|
| 115 |
+
|
| 116 |
+
For each tile, follow this sequence:
|
| 117 |
+
|
| 118 |
+
#### Step 1: Global Scan (30 seconds)
|
| 119 |
+
- Pan across the entire tile at moderate zoom.
|
| 120 |
+
- Identify the dominant features: buildings, vegetation, roads, natural terrain.
|
| 121 |
+
- Note any artifact regions to avoid.
|
| 122 |
+
|
| 123 |
+
#### Step 2: Systematic Pass (2β5 minutes)
|
| 124 |
+
- Scan the tile in a systematic pattern (left-to-right, top-to-bottom).
|
| 125 |
+
- For each candidate point, ask: **"Would a feature detector (SIFT, Harris, SuperPoint) reliably find this point?"**
|
| 126 |
+
- Place the keypoint at the **precise pixel** of maximum distinctiveness.
|
| 127 |
+
- **Only annotate if you are fully confident** in the point's salience. When in doubt, skip.
|
| 128 |
+
|
| 129 |
+
#### Step 3: Verification Pass (1β2 minutes)
|
| 130 |
+
- Toggle hillshade on/off to verify distinctiveness.
|
| 131 |
+
- Check that no keypoints are within **5 pixels** of the tile edge.
|
| 132 |
+
- Verify that keypoints are not clustered β minimum spacing of **5 pixels** between any two keypoints.
|
| 133 |
+
- Review each point: **"If I saw this tile again tomorrow, would I place the point at the same pixel?"**
|
| 134 |
+
|
| 135 |
+
#### Step 4: Save
|
| 136 |
+
- Save the QGIS project with the annotation layer.
|
| 137 |
+
- Export the annotation layer as a **shapefile** or **GeoPackage**.
|
| 138 |
+
|
| 139 |
+
### 4.3 Post-Processing
|
| 140 |
+
|
| 141 |
+
After annotation, run the MatchGeo conversion script to transform the shapefile into the standardized JSON annotation format:
|
| 142 |
+
|
| 143 |
+
```bash
|
| 144 |
+
python scripts/convert_shapefile_to_json.py --input annotations/GER_BN_001_012.shp --tile data/GER_BN/tiles/GER_BN_001_012.tif --output data/GER_BN/annotations/GER_BN_001_012_annotation.json
|
| 145 |
+
```
|
| 146 |
+
|
| 147 |
+
The script will:
|
| 148 |
+
1. Read the shapefile points.
|
| 149 |
+
2. Convert geographic coordinates to pixel coordinates (0β332).
|
| 150 |
+
3. Extract elevation values from the DEM tile.
|
| 151 |
+
4. Generate the TDML-compliant JSON file.
|
| 152 |
+
|
| 153 |
+
---
|
| 154 |
+
|
| 155 |
+
## 5. Annotation Rules
|
| 156 |
+
|
| 157 |
+
### 5.1 Minimum Feature Distinctiveness
|
| 158 |
+
|
| 159 |
+
All annotated features must be resolvable at the tile resolution. The point must have:
|
| 160 |
+
|
| 161 |
+
- **Local curvature**: The point must be a local extremum (maximum or minimum) in at least one direction, OR a point of high curvature (corner, junction).
|
| 162 |
+
- **Minimum neighborhood**: The distinctiveness must be visible in a 5Γ5 pixel neighborhood.
|
| 163 |
+
- **No ambiguity**: The point must have a single, clear location. If the "best" pixel is ambiguous across a 3Γ3 region, do not annotate.
|
| 164 |
+
|
| 165 |
+
### 5.2 Edge Proximity
|
| 166 |
+
|
| 167 |
+
- **Default**: No keypoints within 5 pixels of the tile boundary.
|
| 168 |
+
- **Hard limit**: Never annotate within 2 pixels of the boundary.
|
| 169 |
+
- **Rationale**: Points near boundaries may be truncated or padded differently during model training, leading to inconsistent feature descriptors.
|
| 170 |
+
|
| 171 |
+
### 5.3 Spacing
|
| 172 |
+
|
| 173 |
+
- Minimum distance between any two keypoints: **5 pixels**.
|
| 174 |
+
- **Rationale**: Feature descriptors typically operate on patches of 8Γ8 to 32Γ32 pixels. Points closer than 5 pixels would have overlapping descriptor windows, reducing independence.
|
| 175 |
+
|
| 176 |
+
### 5.4 Urban Areas: Building Corners
|
| 177 |
+
|
| 178 |
+
In urban DEMs (Bonn, SΓ£o Paulo), the vast majority of salient points are **building corners**:
|
| 179 |
+
|
| 180 |
+
- **What is a building corner?** The intersection of two roof edges, where the elevation surface changes direction abruptly.
|
| 181 |
+
- **How to identify**: On hillshade, building corners appear as sharp, dark-light transitions at the intersection of two edges.
|
| 182 |
+
- **Placement**: Place the point at the **intersection pixel** β the exact corner where the two edges meet.
|
| 183 |
+
- **Avoid**: Points along straight roof edges (not corners), points on flat roof surfaces, points on building shadows (unless the shadow edge coincides with a real corner).
|
| 184 |
+
|
| 185 |
+
### 5.5 Natural Terrain
|
| 186 |
+
|
| 187 |
+
In natural terrain (if annotated in future cities), salient points include:
|
| 188 |
+
|
| 189 |
+
- **Peaks and summits**: Local maxima with clear prominence.
|
| 190 |
+
- **Saddles and cols**: Local minima along ridge lines.
|
| 191 |
+
- **Ridge/valley junctions**: Confluences of multiple ridge or valley lines.
|
| 192 |
+
- **Cliff corners**: Abrupt changes in slope direction.
|
| 193 |
+
|
| 194 |
+
When in doubt, apply the **feature detector test**: *"Would SIFT or Harris detect this point with a high response?"*
|
| 195 |
+
|
| 196 |
+
### 5.6 Multi-Scale Considerations
|
| 197 |
+
|
| 198 |
+
Annotators should consider how the feature would appear at different resolutions:
|
| 199 |
+
|
| 200 |
+
- A feature visible at 1.0 m resolution should still be detectable (though blurred) at 2.0 m.
|
| 201 |
+
- Do not annotate features that are **resolution-dependent artifacts** (e.g., single-pixel noise spikes).
|
| 202 |
+
- When in doubt, check the source data quality or hillshade at multiple sun angles.
|
| 203 |
+
|
| 204 |
+
---
|
| 205 |
+
|
| 206 |
+
## 6. Quality Control
|
| 207 |
+
|
| 208 |
+
### 6.1 Self-Review Checklist
|
| 209 |
+
|
| 210 |
+
Before submitting annotations, the annotator must complete this checklist:
|
| 211 |
+
|
| 212 |
+
- [ ] All keypoints are within the valid tile area (β₯5 px from edge).
|
| 213 |
+
- [ ] No two keypoints are within 5 pixels of each other.
|
| 214 |
+
- [ ] All keypoints are on clearly salient features (building corners or natural morphological features).
|
| 215 |
+
- [ ] No keypoints are in obvious artifact areas (voids, striping).
|
| 216 |
+
- [ ] All keypoints would be repeatable by the same annotator on a different day.
|
| 217 |
+
- [ ] The annotation shapefile has been exported and converted to JSON.
|
| 218 |
+
- [ ] The JSON file validates against the MatchGeo Annotation Schema.
|
| 219 |
+
|
| 220 |
+
### 6.2 Automated Validation
|
| 221 |
+
|
| 222 |
+
After conversion to JSON, run the validation script:
|
| 223 |
+
|
| 224 |
+
```bash
|
| 225 |
+
python scripts/validate_annotations.py --input data/GER_BN/annotations/GER_BN_001_012_annotation.json --tile data/GER_BN/tiles/GER_BN_001_012.tif
|
| 226 |
+
```
|
| 227 |
+
|
| 228 |
+
The script checks:
|
| 229 |
+
- All keypoints are within the tile bounds.
|
| 230 |
+
- No two keypoints are within 5 pixels.
|
| 231 |
+
- All keypoints are β₯5 pixels from the edge.
|
| 232 |
+
- Elevation values are valid (not NoData).
|
| 233 |
+
- JSON structure conforms to the schema.
|
| 234 |
+
|
| 235 |
+
### 6.3 Confidence Policy
|
| 236 |
+
|
| 237 |
+
All annotated keypoints are assumed to have **high confidence** (β₯0.8). The annotator is instructed to:
|
| 238 |
+
|
| 239 |
+
- **Only annotate points they are fully confident about.**
|
| 240 |
+
- **Skip ambiguous points.** It is better to have fewer, high-quality annotations than many uncertain ones.
|
| 241 |
+
- **Do not guess.** If a point might be salient but the annotator is not sure, skip it.
|
| 242 |
+
|
| 243 |
+
For retroactive application to existing annotations (GER_BN, BRA_SP), all keypoints are assigned a default confidence of **0.8**.
|
| 244 |
+
|
| 245 |
+
---
|
| 246 |
+
|
| 247 |
+
## 7. File Format and Metadata
|
| 248 |
+
|
| 249 |
+
### 7.1 QGIS Annotation Layer
|
| 250 |
+
|
| 251 |
+
During annotation, points are stored in a QGIS vector layer (shapefile or GeoPackage):
|
| 252 |
+
|
| 253 |
+
| Field | Type | Description |
|
| 254 |
+
|---|---|---|
|
| 255 |
+
| `id` | Integer | Unique keypoint ID within the tile |
|
| 256 |
+
| `class` | String | Fixed `"general_interest_point"` |
|
| 257 |
+
| `confidence` | Float | Annotator confidence (0.0β1.0); default 0.8 |
|
| 258 |
+
|
| 259 |
+
### 7.2 Annotation File Naming
|
| 260 |
+
|
| 261 |
+
```
|
| 262 |
+
{CITY_CODE}_{row}_{col}_annotation.json
|
| 263 |
+
|
| 264 |
+
Example: GER_BN_001_012_annotation.json
|
| 265 |
+
```
|
| 266 |
+
|
| 267 |
+
### 7.3 JSON Structure
|
| 268 |
+
|
| 269 |
+
Each annotation file conforms to the MatchGeo Keypoint Annotation Schema:
|
| 270 |
+
|
| 271 |
+
```json
|
| 272 |
+
{
|
| 273 |
+
"type": "AI_ObjectLabel",
|
| 274 |
+
"id": "GER_BN_001_012_annotation",
|
| 275 |
+
"tileId": "GER_BN_001_012",
|
| 276 |
+
"cityCode": "GER_BN",
|
| 277 |
+
"crs": "EPSG:25832",
|
| 278 |
+
"resolution": 1.0,
|
| 279 |
+
"tileExtent": {
|
| 280 |
+
"westBound": 369500.0,
|
| 281 |
+
"eastBound": 369833.0,
|
| 282 |
+
"southBound": 5621500.0,
|
| 283 |
+
"northBound": 5621833.0
|
| 284 |
+
},
|
| 285 |
+
"keypoints": [
|
| 286 |
+
{
|
| 287 |
+
"id": "kp_001",
|
| 288 |
+
"pixelX": 312,
|
| 289 |
+
"pixelY": 282,
|
| 290 |
+
"geoX": 369812.0,
|
| 291 |
+
"geoY": 5621782.0,
|
| 292 |
+
"class": "general_interest_point",
|
| 293 |
+
"elevation": 158.4,
|
| 294 |
+
"confidence": 0.8
|
| 295 |
+
}
|
| 296 |
+
],
|
| 297 |
+
"labeling": {
|
| 298 |
+
"labelingMethod": "manual",
|
| 299 |
+
"annotatorId": "annotator_ufv_01",
|
| 300 |
+
"annotationTime": "2025-11-14T14:32:00Z",
|
| 301 |
+
"toolVersion": "qgis-shapefile-conversion",
|
| 302 |
+
"labelingProtocol": "https://github.com/paeslemesa/matchgeodem/blob/main/docs/annotation_protocol.md"
|
| 303 |
+
},
|
| 304 |
+
"quality": {
|
| 305 |
+
"sourceDataQuality": "Airborne LiDAR, ground classified, vertical accuracy <0.15m RMSE"
|
| 306 |
+
}
|
| 307 |
+
}
|
| 308 |
+
```
|
| 309 |
+
|
| 310 |
+
### 7.4 Required vs. Optional Fields
|
| 311 |
+
|
| 312 |
+
| Field | Required | Description |
|
| 313 |
+
|---|---|---|
|
| 314 |
+
| `type` | β
| Fixed `"AI_ObjectLabel"` |
|
| 315 |
+
| `id` | β
| Unique annotation file ID |
|
| 316 |
+
| `tileId` | β
| Corresponding DEM tile ID |
|
| 317 |
+
| `cityCode` | β
| City code (e.g., `"GER_BN"`, `"BRA_SP"`) |
|
| 318 |
+
| `crs` | β
| EPSG code |
|
| 319 |
+
| `resolution` | β
| GSD in meters |
|
| 320 |
+
| `tileExtent` | β | Bounding box in projected coords |
|
| 321 |
+
| `keypoints` | β
| Array of keypoint objects |
|
| 322 |
+
| `keypoints[].id` | β
| Unique keypoint ID |
|
| 323 |
+
| `keypoints[].pixelX` | β
| X in pixel space (0β332) |
|
| 324 |
+
| `keypoints[].pixelY` | β
| Y in pixel space (0β332) |
|
| 325 |
+
| `keypoints[].geoX` | β | X in projected CRS |
|
| 326 |
+
| `keypoints[].geoY` | β | Y in projected CRS |
|
| 327 |
+
| `keypoints[].class` | β
| Fixed `"general_interest_point"` |
|
| 328 |
+
| `keypoints[].elevation` | β
| Elevation at keypoint (m) |
|
| 329 |
+
| `keypoints[].confidence` | β | Annotator confidence (0β1); default 0.8 |
|
| 330 |
+
| `labeling` | β
| Provenance object |
|
| 331 |
+
| `labeling.labelingMethod` | β
| Fixed `"manual"` |
|
| 332 |
+
| `labeling.annotatorId` | β
| Anonymous annotator ID |
|
| 333 |
+
| `labeling.annotationTime` | β
| ISO 8601 timestamp |
|
| 334 |
+
| `labeling.toolVersion` | β | `"qgis-shapefile-conversion"` |
|
| 335 |
+
| `labeling.labelingProtocol` | β | URL to this protocol |
|
| 336 |
+
| `quality` | β | Quality metrics object |
|
| 337 |
+
|
| 338 |
+
---
|
| 339 |
+
|
| 340 |
+
## 8. Common Pitfalls and Edge Cases
|
| 341 |
+
|
| 342 |
+
### 8.1 Building Corners vs. Roof Edges
|
| 343 |
+
|
| 344 |
+
**Problem**: A long, straight roof edge has many points that look somewhat distinctive.
|
| 345 |
+
|
| 346 |
+
**Solution**: Only annotate **corners** β points where two edges intersect. A point along a straight edge is not locally distinctive in all directions and would not produce a strong corner detector response.
|
| 347 |
+
|
| 348 |
+
### 8.2 Flat Roofs
|
| 349 |
+
|
| 350 |
+
**Problem**: Large flat-roofed buildings have no corners visible in the DEM.
|
| 351 |
+
|
| 352 |
+
**Solution**: Do not annotate flat roof surfaces. If the building has a parapet or edge wall that creates a corner, annotate that corner.
|
| 353 |
+
|
| 354 |
+
### 8.3 Vegetation
|
| 355 |
+
|
| 356 |
+
**Problem**: Trees and vegetation create noisy, irregular elevation surfaces.
|
| 357 |
+
|
| 358 |
+
**Solution**: In urban areas, focus on building corners. In natural terrain, avoid annotating on dense vegetation unless a clear morphological feature (e.g., a forest clearing corner) is visible.
|
| 359 |
+
|
| 360 |
+
### 8.4 Data Artifacts
|
| 361 |
+
|
| 362 |
+
**Problem**: Striping, voids, or interpolation artifacts create spurious elevation features.
|
| 363 |
+
|
| 364 |
+
**Solution**:
|
| 365 |
+
- Learn to recognize common artifacts:
|
| 366 |
+
- **Striping**: Parallel lines of alternating high/low elevation (common in satellite DEMs).
|
| 367 |
+
- **Voids**: Areas with NoData (-9999) or interpolated fill values.
|
| 368 |
+
- **Noise**: Single-pixel spikes or pits with no surrounding morphological context.
|
| 369 |
+
- Cross-reference with hillshade.
|
| 370 |
+
- Skip artifact-affected tiles if >20% of the tile is affected.
|
| 371 |
+
|
| 372 |
+
### 8.5 Partial Tiles
|
| 373 |
+
|
| 374 |
+
**Problem**: Tiles at the city boundary may be partially empty (NoData).
|
| 375 |
+
|
| 376 |
+
**Solution**: Annotate only the valid data region. Ensure all keypoints are on valid elevation pixels (not NoData).
|
| 377 |
+
|
| 378 |
+
### 8.6 Multi-Story Buildings
|
| 379 |
+
|
| 380 |
+
**Problem**: Buildings of different heights create complex roof patterns.
|
| 381 |
+
|
| 382 |
+
**Solution**: Annotate the corners of the **roof footprint** β the outermost edges visible in the DEM. Internal roof structures (skylights, HVAC units) are typically too small to be reliable at 1.0 m resolution.
|
| 383 |
+
|
| 384 |
+
---
|
| 385 |
+
|
| 386 |
+
## Appendix A: Visual Example
|
| 387 |
+
|
| 388 |
+
### GER_BN_001_012 β Urban Building Corners
|
| 389 |
+
|
| 390 |
+
This example from Bonn, Germany, demonstrates the annotation of building corners on a 1.0 m resolution airborne LiDAR DEM.
|
| 391 |
+
|
| 392 |
+
| Panel | Description |
|
| 393 |
+
|---|---|
|
| 394 |
+
| **A. DEM (Grayscale Elevation)** | Raw elevation values. Brighter = higher. Building roofs appear as bright rectangles; shadows and lower areas appear darker. |
|
| 395 |
+
| **B. Hillshade (Relief Visualization)** | Simulated illumination from the northwest. Building edges and corners are clearly visible as sharp light-dark transitions. |
|
| 396 |
+
| **C. DEM Zoom (Data Region)** | Close-up of the right half of the tile. Seven keypoints (kp_0βkp_6) are annotated on building corners. |
|
| 397 |
+
| **D. Hillshade Zoom (Data Region)** | Hillshade close-up confirms that all keypoints are on sharp, salient corners. |
|
| 398 |
+
|
| 399 |
+

|
| 400 |
+
|
| 401 |
+
**Keypoint Analysis**:
|
| 402 |
+
|
| 403 |
+
| ID | pixelX | pixelY | Description |
|
| 404 |
+
|---|---|---|---|
|
| 405 |
+
| kp_0 | 376 | 282 | Corner of rectangular building roof β sharp intersection of two edges |
|
| 406 |
+
| kp_1 | 368 | 292 | Adjacent corner of same building complex β distinct from kp_0 by β₯5 px |
|
| 407 |
+
| kp_2 | 362 | 287 | Corner of smaller structure β clear edge intersection |
|
| 408 |
+
| kp_3 | 384 | 259 | Corner of large rectangular building β prominent, high-contrast corner |
|
| 409 |
+
| kp_4 | 384 | 29 | Corner near top edge of tile β still β₯5 px from boundary |
|
| 410 |
+
| kp_5 | 371 | 41 | Corner of building near tile top β distinct from kp_4 |
|
| 411 |
+
| kp_6 | 398 | 63 | Corner at right edge of tile β placed at the last valid pixel before boundary |
|
| 412 |
+
|
| 413 |
+
**Observations**:
|
| 414 |
+
- All 7 keypoints are on **building corners** β intersections of roof edges.
|
| 415 |
+
- Minimum spacing between any two keypoints: ~8 pixels (kp_0βkp_1), satisfying the β₯5 px rule.
|
| 416 |
+
- All keypoints are β₯5 pixels from the tile boundary, except kp_6 which is at the right edge. In production, this point should be verified to be β₯5 px from the actual data boundary (the image shows a black/gray padding region on the left).
|
| 417 |
+
- The hillshade confirms that each point is at a sharp, salient corner with high local contrast.
|
| 418 |
+
|
| 419 |
+
---
|
| 420 |
+
|
| 421 |
+
## Appendix B: Glossary
|
| 422 |
+
|
| 423 |
+
| Term | Definition |
|
| 424 |
+
|---|---|
|
| 425 |
+
| **DEM** | Digital Elevation Model β a raster representation of terrain surface elevation. |
|
| 426 |
+
| **DSM** | Digital Surface Model β a DEM that includes surface features (buildings, vegetation). MatchGeo uses DSMs. |
|
| 427 |
+
| **Feature descriptor** | A mathematical representation of a local image (or elevation) patch, used for matching. Examples: SIFT, SURF, ORB, SuperPoint. |
|
| 428 |
+
| **Feature matching** | The process of finding correspondences between feature descriptors in two or more images (or DEM patches). |
|
| 429 |
+
| **GSD** | Ground Sample Distance β the physical distance on the ground represented by one pixel. |
|
| 430 |
+
| **Hillshade** | A grayscale visualization of a DEM simulating illumination from a light source, emphasizing terrain relief. |
|
| 431 |
+
| **Keypoint** | A salient, locally distinctive point in an image or elevation surface. Also called "interest point" or "feature point." |
|
| 432 |
+
| **NoData** | A special value (-9999.0 in MatchGeo) indicating missing or invalid data. |
|
| 433 |
+
| **Salient** | Visually or geometrically distinctive; standing out from the immediate surroundings. |
|
| 434 |
+
| **W3C PROV-O** | The W3C Provenance Ontology β a standard for representing provenance information. |
|
| 435 |
+
|
| 436 |
+
---
|
| 437 |
+
|
| 438 |
+
*Protocol version 1.1 β MatchGeo DEM Annotation. For questions, contact sabrina.correa@ufv.br*
|