Datasets:
Updated statcs/ splis/ and scrips/
Browse files- scripts/cleanup_aux_xml.py +30 -0
- scripts/convert_shp2anno.py +74 -0
- scripts/create_splits.py +150 -0
- scripts/create_tiny_dataset.py +282 -0
- scripts/crop_tiles.py +118 -0
- scripts/find_nodata.py +66 -0
- scripts/fix_nodata.py +109 -0
- scripts/generate_checksums.py +55 -0
- scripts/generate_pdf_metadata.py +338 -0
- scripts/generate_stac.py +304 -0
- scripts/get_data_metadata.py +36 -0
- scripts/get_dataset_sizes.py +84 -0
- scripts/metadata_update_createcsv.py +90 -0
- scripts/metadata_update_info.py +254 -0
- scripts/process_las.py +165 -0
- scripts/write_qgis_metadata.py +325 -0
- splits/split_manifest.json +19 -0
- splits/test.csv +0 -0
- splits/train.csv +0 -0
- splits/validation.csv +0 -0
- stac/collection.json +165 -0
- stac/items/ATA_MV.json +120 -0
- stac/items/BRA_SP.json +120 -0
- stac/items/CHN_WS.json +120 -0
- stac/items/ESP_EH.json +120 -0
- stac/items/FIN_LM.json +120 -0
- stac/items/GER_BN.json +128 -0
- stac/items/IDN_SV.json +120 -0
- stac/items/KAZ_AC.json +120 -0
- stac/items/KSA_WA.json +120 -0
- stac/items/NAM_HF.json +120 -0
- stac/items/NZL_KP.json +120 -0
- stac/items/PHL_TA.json +120 -0
- stac/items/USA_GC.json +120 -0
scripts/cleanup_aux_xml.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
|
| 4 |
+
def remove_aux_xml_files(dataset_path):
|
| 5 |
+
"""Remove all QGIS-generated .aux.xml files from the dataset."""
|
| 6 |
+
|
| 7 |
+
dataset_path = Path(dataset_path)
|
| 8 |
+
removed_count = 0
|
| 9 |
+
|
| 10 |
+
print("=" * 70)
|
| 11 |
+
print("MatchGeo-DEM .aux.xml Cleanup")
|
| 12 |
+
print("=" * 70)
|
| 13 |
+
|
| 14 |
+
# Walk through all directories
|
| 15 |
+
for root, dirs, files in os.walk(dataset_path):
|
| 16 |
+
for file in files:
|
| 17 |
+
if file.endswith('.aux.xml'):
|
| 18 |
+
filepath = Path(root) / file
|
| 19 |
+
print(f"🗑️ Removing: {filepath}")
|
| 20 |
+
filepath.unlink()
|
| 21 |
+
removed_count += 1
|
| 22 |
+
|
| 23 |
+
print(f"\n✅ Removed {removed_count} .aux.xml files")
|
| 24 |
+
print("=" * 70)
|
| 25 |
+
|
| 26 |
+
return removed_count
|
| 27 |
+
|
| 28 |
+
if __name__ == "__main__":
|
| 29 |
+
dataset_path = "/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/data"
|
| 30 |
+
remove_aux_xml_files(dataset_path)
|
scripts/convert_shp2anno.py
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''
|
| 2 |
+
Convert shapefile annotations to a format suitable for training a deep learning model.
|
| 3 |
+
|
| 4 |
+
'''
|
| 5 |
+
|
| 6 |
+
#==============================================================================
|
| 7 |
+
#%% IMPORTS
|
| 8 |
+
#==============================================================================
|
| 9 |
+
from pathlib import Path
|
| 10 |
+
import geopandas as gpd
|
| 11 |
+
from shapely.geometry import Point
|
| 12 |
+
from shapely.geometry import box
|
| 13 |
+
import rasterio
|
| 14 |
+
import json
|
| 15 |
+
import numpy as np
|
| 16 |
+
import cv2
|
| 17 |
+
from tqdm.auto import tqdm
|
| 18 |
+
#==============================================================================
|
| 19 |
+
#%% CONFIGURATION
|
| 20 |
+
#==============================================================================
|
| 21 |
+
|
| 22 |
+
KEY_ID = "BRA_SP"
|
| 23 |
+
SHAPEFILE_PATH = Path('/home/sabrina/Documents/Tese/00_Dados/01_Keypoints_SHP/pontos_liberdadefinal.shp')
|
| 24 |
+
IMG_DIR = Path(f'/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/data/{KEY_ID}/tiles')
|
| 25 |
+
ANNO_DIR = Path(f'/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/data/{KEY_ID}/annotation')
|
| 26 |
+
|
| 27 |
+
ANNO_DIR.mkdir(exist_ok=True)
|
| 28 |
+
|
| 29 |
+
#==============================================================================
|
| 30 |
+
#%% CONVERT SHAPEFILE TO JSON ANNOTATIONS
|
| 31 |
+
#==============================================================================
|
| 32 |
+
gdf = gpd.read_file(SHAPEFILE_PATH)
|
| 33 |
+
|
| 34 |
+
img_files = sorted(IMG_DIR.glob('*.tif'))
|
| 35 |
+
print(f"Found {len(img_files)} images to process.")
|
| 36 |
+
|
| 37 |
+
for img_file in tqdm(img_files, desc="Processing images"):
|
| 38 |
+
|
| 39 |
+
with rasterio.open(img_file) as src:
|
| 40 |
+
profile = src.profile
|
| 41 |
+
transform = src.transform
|
| 42 |
+
|
| 43 |
+
# Check if there are point inf the gdf inside the image bounds
|
| 44 |
+
img_bounds = rasterio.transform.array_bounds(profile['height'], profile['width'], transform)
|
| 45 |
+
img_poly = box(*img_bounds)
|
| 46 |
+
if not gdf.intersects(img_poly).any():
|
| 47 |
+
print(f"No keypoints found in {img_file.stem}, skipping.")
|
| 48 |
+
continue
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
# Intersect the GeoDataFrame with the image bounds to get only relevant keypoints
|
| 52 |
+
gdf_img = gdf[gdf.intersects(img_poly)]
|
| 53 |
+
# Convert to pixel coordinates
|
| 54 |
+
keypoints = []
|
| 55 |
+
for idx, row in gdf_img.iterrows():
|
| 56 |
+
geom = row.geometry
|
| 57 |
+
if isinstance(geom, Point):
|
| 58 |
+
x, y = geom.x, geom.y
|
| 59 |
+
# Convert to pixel coordinates
|
| 60 |
+
col, row = ~transform * (x, y)
|
| 61 |
+
keypoints.append((int(col)/profile['width'], int(row)/profile['height'])) # Normalize to [0, 1]
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
# Create annotation dictionary
|
| 65 |
+
anno = {
|
| 66 |
+
"image": img_file.name,
|
| 67 |
+
"keypoints": keypoints
|
| 68 |
+
}
|
| 69 |
+
# Save annotation as JSON
|
| 70 |
+
anno_file = ANNO_DIR / f"{img_file.stem}.json"
|
| 71 |
+
with open(anno_file, 'w') as f:
|
| 72 |
+
json.dump(anno, f, indent=4)
|
| 73 |
+
|
| 74 |
+
# %%
|
scripts/create_splits.py
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
import json
|
| 4 |
+
import random
|
| 5 |
+
import csv
|
| 6 |
+
from collections import defaultdict
|
| 7 |
+
|
| 8 |
+
areas = {'ATA_MV', 'BRA_SP', 'CHN_WS', 'ESP_EH', 'FIN_LM', 'GER_BN', 'IDN_SV',
|
| 9 |
+
'KAZ_AC', 'KSA_WA', 'NAM_HF', 'NZL_KP', 'PHL_TA', 'USA_GC'}
|
| 10 |
+
|
| 11 |
+
data_path = Path("/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/data/")
|
| 12 |
+
output_path = Path("/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/splits/")
|
| 13 |
+
output_path.mkdir(parents=True, exist_ok=True)
|
| 14 |
+
|
| 15 |
+
# Configuration
|
| 16 |
+
SEED = 42
|
| 17 |
+
TRAIN_RATIO = 0.8
|
| 18 |
+
VAL_RATIO = 0.1
|
| 19 |
+
TEST_RATIO = 0.1
|
| 20 |
+
|
| 21 |
+
assert abs(TRAIN_RATIO + VAL_RATIO + TEST_RATIO - 1.0) < 1e-6, "Ratios must sum to 1.0"
|
| 22 |
+
|
| 23 |
+
random.seed(SEED)
|
| 24 |
+
|
| 25 |
+
print("=" * 80)
|
| 26 |
+
print("MatchGeo-DEM Stratified Split Generator")
|
| 27 |
+
print(f"Train: {TRAIN_RATIO:.0%} | Val: {VAL_RATIO:.0%} | Test: {TEST_RATIO:.0%}")
|
| 28 |
+
print(f"Random seed: {SEED}")
|
| 29 |
+
print("=" * 80)
|
| 30 |
+
|
| 31 |
+
all_tiles = []
|
| 32 |
+
|
| 33 |
+
# Collect all tiles per city
|
| 34 |
+
for location in sorted(areas):
|
| 35 |
+
tiles_dir = data_path / location / "tiles"
|
| 36 |
+
|
| 37 |
+
if not tiles_dir.exists():
|
| 38 |
+
print(f"⚠️ {location}: No tiles directory found")
|
| 39 |
+
continue
|
| 40 |
+
|
| 41 |
+
city_tiles = []
|
| 42 |
+
for tile_file in sorted(tiles_dir.iterdir()):
|
| 43 |
+
if tile_file.suffix == '.tif':
|
| 44 |
+
tile_id = tile_file.stem
|
| 45 |
+
city_tiles.append({
|
| 46 |
+
"tile_id": tile_id,
|
| 47 |
+
"city": location,
|
| 48 |
+
"file": str(tile_file.relative_to(data_path.parent))
|
| 49 |
+
})
|
| 50 |
+
|
| 51 |
+
print(f"📁 {location}: {len(city_tiles)} tiles collected")
|
| 52 |
+
all_tiles.extend(city_tiles)
|
| 53 |
+
|
| 54 |
+
print(f"\n📊 Total tiles: {len(all_tiles)}")
|
| 55 |
+
|
| 56 |
+
# Group by city
|
| 57 |
+
city_groups = defaultdict(list)
|
| 58 |
+
for tile in all_tiles:
|
| 59 |
+
city_groups[tile["city"]].append(tile)
|
| 60 |
+
|
| 61 |
+
# Stratified split: ensure each city is represented in each split
|
| 62 |
+
train_tiles = []
|
| 63 |
+
val_tiles = []
|
| 64 |
+
test_tiles = []
|
| 65 |
+
|
| 66 |
+
for city, tiles in sorted(city_groups.items()):
|
| 67 |
+
n = len(tiles)
|
| 68 |
+
random.shuffle(tiles)
|
| 69 |
+
|
| 70 |
+
n_train = max(1, int(n * TRAIN_RATIO))
|
| 71 |
+
n_val = max(1, int(n * VAL_RATIO))
|
| 72 |
+
# Test gets the remainder
|
| 73 |
+
n_test = n - n_train - n_val
|
| 74 |
+
|
| 75 |
+
# Adjust if test is too small
|
| 76 |
+
if n_test < 1 and n > 2:
|
| 77 |
+
n_train -= 1
|
| 78 |
+
n_test = 1
|
| 79 |
+
|
| 80 |
+
city_train = tiles[:n_train]
|
| 81 |
+
city_val = tiles[n_train:n_train + n_val]
|
| 82 |
+
city_test = tiles[n_train + n_val:]
|
| 83 |
+
|
| 84 |
+
train_tiles.extend(city_train)
|
| 85 |
+
val_tiles.extend(city_val)
|
| 86 |
+
test_tiles.extend(city_test)
|
| 87 |
+
|
| 88 |
+
print(f"\n📁 {city}:")
|
| 89 |
+
print(f" Total: {n} | Train: {len(city_train)} | Val: {len(city_val)} | Test: {len(city_test)}")
|
| 90 |
+
|
| 91 |
+
# Shuffle again within each split
|
| 92 |
+
random.shuffle(train_tiles)
|
| 93 |
+
random.shuffle(val_tiles)
|
| 94 |
+
random.shuffle(test_tiles)
|
| 95 |
+
|
| 96 |
+
print(f"\n{'='*80}")
|
| 97 |
+
print(f"📊 FINAL SPLIT SIZES:")
|
| 98 |
+
print(f" Train: {len(train_tiles)} tiles ({len(train_tiles)/len(all_tiles):.1%})")
|
| 99 |
+
print(f" Val: {len(val_tiles)} tiles ({len(val_tiles)/len(all_tiles):.1%})")
|
| 100 |
+
print(f" Test: {len(test_tiles)} tiles ({len(test_tiles)/len(all_tiles):.1%})")
|
| 101 |
+
print(f"{'='*80}")
|
| 102 |
+
|
| 103 |
+
# City distribution per split
|
| 104 |
+
print(f"\n📊 CITY DISTRIBUTION PER SPLIT:")
|
| 105 |
+
for split_name, split_tiles in [("Train", train_tiles), ("Val", val_tiles), ("Test", test_tiles)]:
|
| 106 |
+
city_counts = defaultdict(int)
|
| 107 |
+
for tile in split_tiles:
|
| 108 |
+
city_counts[tile["city"]] += 1
|
| 109 |
+
print(f"\n{split_name}:")
|
| 110 |
+
for city in sorted(city_counts.keys()):
|
| 111 |
+
print(f" {city}: {city_counts[city]} tiles")
|
| 112 |
+
|
| 113 |
+
# Write CSV files
|
| 114 |
+
def write_split_csv(tiles, filepath):
|
| 115 |
+
with open(filepath, 'w', newline='') as f:
|
| 116 |
+
writer = csv.DictWriter(f, fieldnames=["tile_id", "city", "file"])
|
| 117 |
+
writer.writeheader()
|
| 118 |
+
for tile in tiles:
|
| 119 |
+
writer.writerow(tile)
|
| 120 |
+
|
| 121 |
+
write_split_csv(train_tiles, output_path / "train.csv")
|
| 122 |
+
write_split_csv(val_tiles, output_path / "validation.csv")
|
| 123 |
+
write_split_csv(test_tiles, output_path / "test.csv")
|
| 124 |
+
|
| 125 |
+
print(f"\n✅ Splits saved to:")
|
| 126 |
+
print(f" {output_path / 'train.csv'}")
|
| 127 |
+
print(f" {output_path / 'validation.csv'}")
|
| 128 |
+
print(f" {output_path / 'test.csv'}")
|
| 129 |
+
|
| 130 |
+
# Save JSON manifest
|
| 131 |
+
split_manifest = {
|
| 132 |
+
"seed": SEED,
|
| 133 |
+
"ratios": {"train": TRAIN_RATIO, "validation": VAL_RATIO, "test": TEST_RATIO},
|
| 134 |
+
"total_tiles": len(all_tiles),
|
| 135 |
+
"splits": {
|
| 136 |
+
"train": len(train_tiles),
|
| 137 |
+
"validation": len(val_tiles),
|
| 138 |
+
"test": len(test_tiles)
|
| 139 |
+
},
|
| 140 |
+
"files": {
|
| 141 |
+
"train": str(output_path / "train.csv"),
|
| 142 |
+
"validation": str(output_path / "validation.csv"),
|
| 143 |
+
"test": str(output_path / "test.csv")
|
| 144 |
+
}
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
with open(output_path / "split_manifest.json", 'w') as f:
|
| 148 |
+
json.dump(split_manifest, f, indent=2)
|
| 149 |
+
|
| 150 |
+
print(f"\n✅ Split manifest saved to: {output_path / 'split_manifest.json'}")
|
scripts/create_tiny_dataset.py
ADDED
|
@@ -0,0 +1,282 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
import shutil
|
| 4 |
+
import random
|
| 5 |
+
from datetime import datetime
|
| 6 |
+
|
| 7 |
+
try:
|
| 8 |
+
import rasterio
|
| 9 |
+
from rasterio.windows import from_bounds
|
| 10 |
+
except ImportError:
|
| 11 |
+
raise ImportError("This script requires rasterio. Install it with: pip install rasterio")
|
| 12 |
+
|
| 13 |
+
areas = {'ATA_MV', 'BRA_SP', 'CHN_WS', 'ESP_EH', 'FIN_LM', 'GER_BN', 'IDN_SV',
|
| 14 |
+
'KAZ_AC', 'KSA_WA', 'NAM_HF', 'NZL_KP', 'PHL_TA', 'USA_GC'}
|
| 15 |
+
|
| 16 |
+
data_path = Path("/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/data/")
|
| 17 |
+
tiny_path = Path("/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1-tiny/data/")
|
| 18 |
+
|
| 19 |
+
# Configuration
|
| 20 |
+
SEED = 42
|
| 21 |
+
N = 5 # <-- n x n tiles contiguous subset
|
| 22 |
+
TILE_SIZE = 333 # Expected tile dimension in pixels
|
| 23 |
+
INCLUDE_ANNOTATIONS = True
|
| 24 |
+
|
| 25 |
+
random.seed(SEED)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def build_tile_grid(tiles_src):
|
| 29 |
+
"""
|
| 30 |
+
Reads all tiles and builds a 2D grid based on their top-left geographic corners.
|
| 31 |
+
Returns (grid, n_rows, n_cols) where grid[r][c] is a Path or None.
|
| 32 |
+
"""
|
| 33 |
+
tile_info = []
|
| 34 |
+
for tile_path in tiles_src.iterdir():
|
| 35 |
+
if tile_path.suffix != '.tif':
|
| 36 |
+
continue
|
| 37 |
+
try:
|
| 38 |
+
with rasterio.open(tile_path) as src:
|
| 39 |
+
if src.width != TILE_SIZE or src.height != TILE_SIZE:
|
| 40 |
+
print(f" ⚠️ {tile_path.name} is {src.width}x{src.height}, "
|
| 41 |
+
f"expected {TILE_SIZE}x{TILE_SIZE}")
|
| 42 |
+
# Top-left corner in geo coordinates
|
| 43 |
+
x, y = src.transform * (0, 0)
|
| 44 |
+
tile_info.append((y, x, tile_path))
|
| 45 |
+
except Exception as e:
|
| 46 |
+
print(f" ⚠️ Error reading {tile_path.name}: {e}")
|
| 47 |
+
continue
|
| 48 |
+
|
| 49 |
+
if not tile_info:
|
| 50 |
+
return None, 0, 0
|
| 51 |
+
|
| 52 |
+
# Pixel size from first tile to set clustering tolerance
|
| 53 |
+
with rasterio.open(tile_info[0][2]) as src:
|
| 54 |
+
pixel_size = max(abs(src.transform.a), abs(src.transform.e))
|
| 55 |
+
|
| 56 |
+
# Tolerance: half the expected geo-distance between adjacent tile origins
|
| 57 |
+
tol = TILE_SIZE * pixel_size * 0.5
|
| 58 |
+
|
| 59 |
+
ys = [t[0] for t in tile_info]
|
| 60 |
+
xs = [t[1] for t in tile_info]
|
| 61 |
+
|
| 62 |
+
# Unique Y coordinates = rows (top to bottom, descending)
|
| 63 |
+
unique_ys = []
|
| 64 |
+
for y in sorted(ys, reverse=True):
|
| 65 |
+
if not unique_ys or abs(y - unique_ys[-1]) > tol:
|
| 66 |
+
unique_ys.append(y)
|
| 67 |
+
|
| 68 |
+
# Unique X coordinates = columns (left to right, ascending)
|
| 69 |
+
unique_xs = []
|
| 70 |
+
for x in sorted(xs):
|
| 71 |
+
if not unique_xs or abs(x - unique_xs[-1]) > tol:
|
| 72 |
+
unique_xs.append(x)
|
| 73 |
+
|
| 74 |
+
n_rows = len(unique_ys)
|
| 75 |
+
n_cols = len(unique_xs)
|
| 76 |
+
|
| 77 |
+
# Place each tile in the grid
|
| 78 |
+
grid = [[None for _ in range(n_cols)] for _ in range(n_rows)]
|
| 79 |
+
for y, x, path in tile_info:
|
| 80 |
+
row_idx = min(range(n_rows), key=lambda i: abs(y - unique_ys[i]))
|
| 81 |
+
col_idx = min(range(n_cols), key=lambda i: abs(x - unique_xs[i]))
|
| 82 |
+
grid[row_idx][col_idx] = path
|
| 83 |
+
|
| 84 |
+
return grid, n_rows, n_cols
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
# ------------------------------------------------------------------
|
| 88 |
+
print("=" * 80)
|
| 89 |
+
print("MatchGeo-DEM Tiny Dataset Generator — n×n Tile Subset")
|
| 90 |
+
print(f"Subset size: {N}x{N} tiles ({N*TILE_SIZE}x{N*TILE_SIZE} pixels)")
|
| 91 |
+
print(f"Output: {tiny_path}")
|
| 92 |
+
print("=" * 80)
|
| 93 |
+
|
| 94 |
+
total_copied = 0
|
| 95 |
+
total_size = 0
|
| 96 |
+
|
| 97 |
+
for location in sorted(areas):
|
| 98 |
+
src_dir = data_path / location
|
| 99 |
+
dst_dir = tiny_path / location
|
| 100 |
+
|
| 101 |
+
if not src_dir.exists():
|
| 102 |
+
print(f"\n⚠️ {location}: Source not found, skipping")
|
| 103 |
+
continue
|
| 104 |
+
|
| 105 |
+
dst_dir.mkdir(parents=True, exist_ok=True)
|
| 106 |
+
print(f"\n📁 {location}:")
|
| 107 |
+
|
| 108 |
+
# ------------------------------------------------------------------
|
| 109 |
+
# 1. Build tile grid and select random n×n window
|
| 110 |
+
# ------------------------------------------------------------------
|
| 111 |
+
tiles_src = src_dir / "tiles"
|
| 112 |
+
if not tiles_src.exists():
|
| 113 |
+
print(f" ⚠️ Tiles directory not found, skipping")
|
| 114 |
+
continue
|
| 115 |
+
|
| 116 |
+
grid, n_rows, n_cols = build_tile_grid(tiles_src)
|
| 117 |
+
if grid is None:
|
| 118 |
+
print(f" ⚠️ No valid tiles found, skipping")
|
| 119 |
+
continue
|
| 120 |
+
|
| 121 |
+
print(f" 📐 Grid: {n_rows} rows × {n_cols} cols")
|
| 122 |
+
|
| 123 |
+
# Clamp window to actual grid size
|
| 124 |
+
win_h = min(N, n_rows)
|
| 125 |
+
win_w = min(N, n_cols)
|
| 126 |
+
max_row = n_rows - win_h
|
| 127 |
+
max_col = n_cols - win_w
|
| 128 |
+
|
| 129 |
+
start_row = random.randint(0, max_row) if max_row > 0 else 0
|
| 130 |
+
start_col = random.randint(0, max_col) if max_col > 0 else 0
|
| 131 |
+
end_row = start_row + win_h
|
| 132 |
+
end_col = start_col + win_w
|
| 133 |
+
|
| 134 |
+
if win_h < N or win_w < N:
|
| 135 |
+
print(f" ℹ️ Grid smaller than {N}x{N}; using {win_h}x{win_w} window")
|
| 136 |
+
else:
|
| 137 |
+
print(f" 🎯 Window: rows {start_row}-{end_row-1}, cols {start_col}-{end_col-1}")
|
| 138 |
+
|
| 139 |
+
# Collect selected tiles
|
| 140 |
+
selected_tiles = []
|
| 141 |
+
for r in range(start_row, end_row):
|
| 142 |
+
for c in range(start_col, end_col):
|
| 143 |
+
if grid[r][c] is not None:
|
| 144 |
+
selected_tiles.append(grid[r][c])
|
| 145 |
+
|
| 146 |
+
if not selected_tiles:
|
| 147 |
+
print(f" ⚠️ No tiles in selected window, skipping")
|
| 148 |
+
continue
|
| 149 |
+
|
| 150 |
+
# ------------------------------------------------------------------
|
| 151 |
+
# 2. Copy selected tiles
|
| 152 |
+
# ------------------------------------------------------------------
|
| 153 |
+
tiles_dst = dst_dir / "tiles"
|
| 154 |
+
tiles_dst.mkdir(parents=True, exist_ok=True)
|
| 155 |
+
selected_names = set()
|
| 156 |
+
|
| 157 |
+
for tile_path in selected_tiles:
|
| 158 |
+
dst = tiles_dst / tile_path.name
|
| 159 |
+
shutil.copy2(tile_path, dst)
|
| 160 |
+
total_size += tile_path.stat().st_size
|
| 161 |
+
selected_names.add(tile_path.stem)
|
| 162 |
+
|
| 163 |
+
total_copied += len(selected_tiles)
|
| 164 |
+
expected = win_h * win_w
|
| 165 |
+
if len(selected_tiles) < expected:
|
| 166 |
+
print(f" ✅ Tiles: {len(selected_tiles)}/{expected} copied (incomplete grid)")
|
| 167 |
+
else:
|
| 168 |
+
print(f" ✅ Tiles: {len(selected_tiles)}/{expected} copied")
|
| 169 |
+
|
| 170 |
+
# ------------------------------------------------------------------
|
| 171 |
+
# 3. Crop merged DEM to the exact bounds of selected tiles
|
| 172 |
+
# ------------------------------------------------------------------
|
| 173 |
+
merged_src = src_dir / f"{location}.tif"
|
| 174 |
+
merged_dst = dst_dir / f"{location}.tif"
|
| 175 |
+
|
| 176 |
+
if merged_src.exists():
|
| 177 |
+
# Union of selected tile bounds
|
| 178 |
+
left = float('inf')
|
| 179 |
+
bottom = float('inf')
|
| 180 |
+
right = float('-inf')
|
| 181 |
+
top = float('-inf')
|
| 182 |
+
|
| 183 |
+
for tile_path in selected_tiles:
|
| 184 |
+
with rasterio.open(tile_path) as src:
|
| 185 |
+
b = src.bounds
|
| 186 |
+
left = min(left, b.left)
|
| 187 |
+
bottom = min(bottom, b.bottom)
|
| 188 |
+
right = max(right, b.right)
|
| 189 |
+
top = max(top, b.top)
|
| 190 |
+
|
| 191 |
+
with rasterio.open(merged_src) as src:
|
| 192 |
+
window = from_bounds(left, bottom, right, top, src.transform)
|
| 193 |
+
window = window.round_lengths().round_offsets()
|
| 194 |
+
|
| 195 |
+
profile = src.profile.copy()
|
| 196 |
+
profile.update({
|
| 197 |
+
'height': int(window.height),
|
| 198 |
+
'width': int(window.width),
|
| 199 |
+
'transform': src.window_transform(window)
|
| 200 |
+
})
|
| 201 |
+
|
| 202 |
+
with rasterio.open(merged_dst, 'w', **profile) as dst:
|
| 203 |
+
dst.write(src.read(window=window))
|
| 204 |
+
|
| 205 |
+
size = merged_dst.stat().st_size
|
| 206 |
+
total_size += size
|
| 207 |
+
print(f" ✅ Cropped DEM: {size/1024/1024:.1f} MB "
|
| 208 |
+
f"({int(window.width)}x{int(window.height)} px)")
|
| 209 |
+
else:
|
| 210 |
+
print(f" ⚠️ Merged DEM not found")
|
| 211 |
+
|
| 212 |
+
# ------------------------------------------------------------------
|
| 213 |
+
# 4. Copy metadata (omit geojsons that no longer describe the subset)
|
| 214 |
+
# ------------------------------------------------------------------
|
| 215 |
+
for meta_file in [f"{location}_metadata.json", f"{location}.qmd"]:
|
| 216 |
+
src = src_dir / meta_file
|
| 217 |
+
dst = dst_dir / meta_file
|
| 218 |
+
if src.exists():
|
| 219 |
+
shutil.copy2(src, dst)
|
| 220 |
+
print(f" ✅ Metadata copied (extent/tiles geojsons omitted)")
|
| 221 |
+
|
| 222 |
+
# ------------------------------------------------------------------
|
| 223 |
+
# 5. Copy annotations for selected tiles only
|
| 224 |
+
# ------------------------------------------------------------------
|
| 225 |
+
anno_src = src_dir / "annotations"
|
| 226 |
+
anno_dst = dst_dir / "annotations"
|
| 227 |
+
|
| 228 |
+
if INCLUDE_ANNOTATIONS and anno_src.exists():
|
| 229 |
+
anno_dst.mkdir(parents=True, exist_ok=True)
|
| 230 |
+
copied_anno = 0
|
| 231 |
+
|
| 232 |
+
for anno_file in anno_src.iterdir():
|
| 233 |
+
if anno_file.suffix == '.json' and anno_file.stem in selected_names:
|
| 234 |
+
dst = anno_dst / anno_file.name
|
| 235 |
+
shutil.copy2(anno_file, dst)
|
| 236 |
+
copied_anno += 1
|
| 237 |
+
|
| 238 |
+
print(f" ✅ Annotations: {copied_anno} copied")
|
| 239 |
+
|
| 240 |
+
# ------------------------------------------------------------------
|
| 241 |
+
# Summary
|
| 242 |
+
# ------------------------------------------------------------------
|
| 243 |
+
total_mb = total_size / (1024 * 1024)
|
| 244 |
+
total_gb = total_size / (1024 * 1024 * 1024)
|
| 245 |
+
|
| 246 |
+
print(f"\n{'='*80}")
|
| 247 |
+
print(f"📊 TINY DATASET SUMMARY:")
|
| 248 |
+
print(f" Subset size: up to {N}x{N} tiles ({N*TILE_SIZE}x{N*TILE_SIZE} pixels)")
|
| 249 |
+
print(f" Total tiles copied: {total_copied}")
|
| 250 |
+
print(f" Total size: {total_mb:.1f} MB ({total_gb:.2f} GB)")
|
| 251 |
+
print(f" Output path: {tiny_path}")
|
| 252 |
+
print(f"{'='*80}")
|
| 253 |
+
|
| 254 |
+
# Create README
|
| 255 |
+
tiny_readme = tiny_path.parent / "README.txt"
|
| 256 |
+
with open(tiny_readme, 'w') as f:
|
| 257 |
+
f.write(f"""MatchGeo-DEM Tiny Dataset
|
| 258 |
+
=========================
|
| 259 |
+
|
| 260 |
+
This is a SPATIAL SUBSET of the full MatchGeo-DEM dataset.
|
| 261 |
+
Each city was cropped to a random contiguous {N}x{N} tile window.
|
| 262 |
+
Each tile is {TILE_SIZE}x{TILE_SIZE} pixels.
|
| 263 |
+
Total subset size per city: up to {N*TILE_SIZE}x{N*TILE_SIZE} pixels.
|
| 264 |
+
|
| 265 |
+
Configuration:
|
| 266 |
+
- Tiles per city: up to {N}x{N} = {N*N} tiles
|
| 267 |
+
- Tile size: {TILE_SIZE}x{TILE_SIZE} pixels
|
| 268 |
+
- Random seed: {SEED}
|
| 269 |
+
- Total tiles: {total_copied}
|
| 270 |
+
- Total size: {total_mb:.1f} MB
|
| 271 |
+
|
| 272 |
+
NOTE: The original _extent.geojson and _tiles.geojson files were omitted
|
| 273 |
+
because they no longer describe the cropped subset. Regenerate them from
|
| 274 |
+
the cropped DEM if your pipeline requires them.
|
| 275 |
+
|
| 276 |
+
For the full dataset, see:
|
| 277 |
+
https://doi.org/10.5281/zenodo.19339008
|
| 278 |
+
|
| 279 |
+
Last generated: {datetime.now().strftime('%Y-%m-%d')}
|
| 280 |
+
""")
|
| 281 |
+
|
| 282 |
+
print(f"\n✅ Tiny README saved to: {tiny_readme}")
|
scripts/crop_tiles.py
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''
|
| 2 |
+
Crop Dataset to 333x333 pixels for faster processing and testing.
|
| 3 |
+
This script reads the original DEM images, crops them to the specified size, and saves the cropped versions in a new directory.
|
| 4 |
+
|
| 5 |
+
The annotations are also updated accordingly to reflect the new image dimensions.
|
| 6 |
+
'''
|
| 7 |
+
#------------------------------------------------------------------------
|
| 8 |
+
#%% IMPORTS
|
| 9 |
+
from pathlib import Path
|
| 10 |
+
import math
|
| 11 |
+
import rasterio
|
| 12 |
+
from rasterio.windows import Window
|
| 13 |
+
from shapely.geometry import box
|
| 14 |
+
import geopandas as gpd
|
| 15 |
+
import numpy as np
|
| 16 |
+
from tqdm.auto import tqdm
|
| 17 |
+
#------------------------------------------------------------------------
|
| 18 |
+
#%% CONFIGURATION
|
| 19 |
+
|
| 20 |
+
AREAS = {'ATA_MV', 'BRA_SP', 'CHN_WS', 'ESP_EH', 'FIN_LM', 'GER_BN', 'IDN_SV', 'KAZ_AC', 'KSA_WA', 'NAM_HF', 'NZL_KP', 'PHL_TA', 'USA_GC'}
|
| 21 |
+
|
| 22 |
+
#AREAS = {'ATA_MV'}
|
| 23 |
+
|
| 24 |
+
WIDTH = 256
|
| 25 |
+
HEIGHT = 256
|
| 26 |
+
|
| 27 |
+
#------------------------------------------------------------------------
|
| 28 |
+
for KEY_ID in tqdm(AREAS):
|
| 29 |
+
|
| 30 |
+
IMG_DIR = Path(f'/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/data/{KEY_ID}')
|
| 31 |
+
CROPPED_IMG_DIR = Path(IMG_DIR, 'tiles')
|
| 32 |
+
CROPPED_IMG_DIR.mkdir(exist_ok=True)
|
| 33 |
+
# CROP IMAGES
|
| 34 |
+
img_files = sorted(IMG_DIR.glob(f'{KEY_ID}.tif'), key=lambda x: x.stem)
|
| 35 |
+
dicto_records = {
|
| 36 |
+
'tile_id' : [],
|
| 37 |
+
'row_idx' : [],
|
| 38 |
+
'col_idx' : [],
|
| 39 |
+
'geometry': []
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
for img_file in tqdm(img_files, desc="Cropping images"):
|
| 43 |
+
|
| 44 |
+
# Create a folder for each City in the cropped directory
|
| 45 |
+
city = img_file.parent.name
|
| 46 |
+
with rasterio.open(img_file) as src:
|
| 47 |
+
crs = src.crs
|
| 48 |
+
img = src.read(1)
|
| 49 |
+
|
| 50 |
+
nodata = src.nodata if src.nodata is not None else -9999
|
| 51 |
+
|
| 52 |
+
n_rows = math.ceil(src.height / HEIGHT)
|
| 53 |
+
n_cols = math.ceil(src.width / WIDTH)
|
| 54 |
+
|
| 55 |
+
padded_w = n_cols * WIDTH
|
| 56 |
+
padded_h = n_rows * HEIGHT
|
| 57 |
+
pad_right = padded_w - src.width
|
| 58 |
+
pad_bottom = padded_h - src.height
|
| 59 |
+
|
| 60 |
+
if pad_right > 0 or pad_bottom > 0:
|
| 61 |
+
img = np.pad(
|
| 62 |
+
img,
|
| 63 |
+
((0, pad_bottom), (0, pad_right)),
|
| 64 |
+
mode='constant',
|
| 65 |
+
constant_values=nodata
|
| 66 |
+
)
|
| 67 |
+
|
| 68 |
+
#----------------------------------------------
|
| 69 |
+
for row in range(n_rows):
|
| 70 |
+
for col in range(n_cols):
|
| 71 |
+
row_off = row * HEIGHT
|
| 72 |
+
col_off = col * WIDTH
|
| 73 |
+
|
| 74 |
+
tile = img[row_off:row_off + HEIGHT, col_off:col_off + WIDTH]
|
| 75 |
+
|
| 76 |
+
# Skip completely uniform (null) tiles
|
| 77 |
+
if np.unique(tile).size == 1:
|
| 78 |
+
print("Skipping null tile")
|
| 79 |
+
continue
|
| 80 |
+
|
| 81 |
+
window = Window(
|
| 82 |
+
col_off=col_off,
|
| 83 |
+
row_off=row_off,
|
| 84 |
+
width=WIDTH,
|
| 85 |
+
height=HEIGHT
|
| 86 |
+
)
|
| 87 |
+
|
| 88 |
+
transform = src.window_transform(window)
|
| 89 |
+
cropped_image = src.read(1, window=window)
|
| 90 |
+
left, bottom, right, top = src.window_bounds(window)
|
| 91 |
+
|
| 92 |
+
profile = src.profile.copy()
|
| 93 |
+
profile.update({
|
| 94 |
+
"height": HEIGHT,
|
| 95 |
+
"width": WIDTH,
|
| 96 |
+
"transform": transform,
|
| 97 |
+
"nodata": nodata # ensure nodata is set correctly
|
| 98 |
+
})
|
| 99 |
+
|
| 100 |
+
out_file = Path(CROPPED_IMG_DIR, KEY_ID + f'_{row+1:03d}_{col+1:03d}.tif')
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
with rasterio.open(out_file, 'w', **profile) as dst:
|
| 104 |
+
dst.write(cropped_image, 1)
|
| 105 |
+
|
| 106 |
+
dicto_records['tile_id'].append(f"{img_file.stem}_{row+1:03d}_{col+1:03d}")
|
| 107 |
+
dicto_records['row_idx'].append(row+1)
|
| 108 |
+
dicto_records['col_idx'].append(col+1)
|
| 109 |
+
dicto_records['geometry'].append(box(left, bottom, right, top))
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
print('Saving vector..')
|
| 114 |
+
TILES_FILE = Path(IMG_DIR, KEY_ID + '_tiles.geojson')
|
| 115 |
+
gdf = gpd.GeoDataFrame(dicto_records, crs = crs, geometry='geometry')
|
| 116 |
+
|
| 117 |
+
gdf.to_file(TILES_FILE, driver='GEOJSON', mode='a')
|
| 118 |
+
print(f"Saved files to {CROPPED_IMG_DIR}")
|
scripts/find_nodata.py
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import rasterio
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
import numpy as np
|
| 4 |
+
|
| 5 |
+
#areas = {'ATA_MV', 'BRA_SP', 'CHN_WS', 'ESP_EH', 'FIN_LM', 'GER_BN', 'IDN_SV',
|
| 6 |
+
# 'KAZ_AC', 'KSA_WA', 'NAM_HF', 'NZL_KP', 'PHL_TA', 'USA_GC'}
|
| 7 |
+
|
| 8 |
+
areas = {'ATA_MV'}
|
| 9 |
+
|
| 10 |
+
path = Path("/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/data")
|
| 11 |
+
|
| 12 |
+
print("=" * 70)
|
| 13 |
+
print("MatchGeo-DEM NoData Checker")
|
| 14 |
+
print("=" * 70)
|
| 15 |
+
|
| 16 |
+
for location in sorted(areas):
|
| 17 |
+
loc_path = Path(path, f"{location}/{location}.tif")
|
| 18 |
+
|
| 19 |
+
if not loc_path.exists():
|
| 20 |
+
print(f"\n⚠️ {location}: File not found at {loc_path}")
|
| 21 |
+
continue
|
| 22 |
+
|
| 23 |
+
with rasterio.open(loc_path) as src:
|
| 24 |
+
nodata = src.nodata
|
| 25 |
+
dtype = src.dtypes[0]
|
| 26 |
+
width = src.width
|
| 27 |
+
height = src.height
|
| 28 |
+
is_bigtiff = src.profile.get('bigtiff', 'NO')
|
| 29 |
+
is_tiled = src.profile.get('tiled', False)
|
| 30 |
+
compress = src.profile.get('compress', 'NONE')
|
| 31 |
+
|
| 32 |
+
print(f"\n📁 {location}")
|
| 33 |
+
print(f" File: {loc_path}")
|
| 34 |
+
print(f" Size: {width} x {height} pixels")
|
| 35 |
+
print(f" Data type: {dtype}")
|
| 36 |
+
print(f" Compression: {compress}")
|
| 37 |
+
print(f" BigTIFF: {is_bigtiff}")
|
| 38 |
+
print(f" Tiled: {is_tiled}")
|
| 39 |
+
print(f" Current NoData: {nodata}")
|
| 40 |
+
|
| 41 |
+
if nodata == -9999.0:
|
| 42 |
+
print(f" ✅ NoData already set to -9999.0 — no action needed")
|
| 43 |
+
continue
|
| 44 |
+
|
| 45 |
+
if nodata is None:
|
| 46 |
+
print(f" ⚠️ NoData is NOT SET")
|
| 47 |
+
else:
|
| 48 |
+
print(f" ⚠️ NoData is {nodata} — needs to be changed to -9999.0")
|
| 49 |
+
|
| 50 |
+
# Check actual data range
|
| 51 |
+
band = src.read(1)
|
| 52 |
+
actual_min = np.min(band)
|
| 53 |
+
actual_max = np.max(band)
|
| 54 |
+
print(f" Data range: {actual_min:.2f} to {actual_max:.2f}")
|
| 55 |
+
|
| 56 |
+
# Check for existing -9999 values
|
| 57 |
+
has_neg9999 = np.any(band == -9999)
|
| 58 |
+
print(f" Contains -9999 values: {has_neg9999}")
|
| 59 |
+
|
| 60 |
+
# Check for NaN values
|
| 61 |
+
has_nan = np.isnan(band).any()
|
| 62 |
+
print(f" Contains NaN values: {has_nan}")
|
| 63 |
+
|
| 64 |
+
print("\n" + "=" * 70)
|
| 65 |
+
print("Run 'fix_nodata.py' to fix any issues found above.")
|
| 66 |
+
print("=" * 70)
|
scripts/fix_nodata.py
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import rasterio
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
import numpy as np
|
| 4 |
+
|
| 5 |
+
#areas = {'ATA_MV', 'BRA_SP', 'CHN_WS', 'ESP_EH', 'FIN_LM', 'GER_BN', 'IDN_SV',
|
| 6 |
+
# 'KAZ_AC', 'KSA_WA', 'NAM_HF', 'NZL_KP', 'PHL_TA', 'USA_GC'}
|
| 7 |
+
|
| 8 |
+
areas = {'ATA_MV'}
|
| 9 |
+
|
| 10 |
+
path = Path("/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/data")
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
print("=" * 70)
|
| 15 |
+
print("MatchGeo-DEM NoData Fixer (Fixed)")
|
| 16 |
+
print("=" * 70)
|
| 17 |
+
|
| 18 |
+
for location in sorted(areas):
|
| 19 |
+
loc_path = Path(path, f"{location}/{location}.tif")
|
| 20 |
+
|
| 21 |
+
if not loc_path.exists():
|
| 22 |
+
print(f"\n⚠️ {location}: File not found — skipping")
|
| 23 |
+
continue
|
| 24 |
+
|
| 25 |
+
with rasterio.open(loc_path) as src:
|
| 26 |
+
nodata = src.nodata
|
| 27 |
+
|
| 28 |
+
# Check current state
|
| 29 |
+
profile = src.profile
|
| 30 |
+
is_bigtiff = profile.get('bigtiff', 'NO')
|
| 31 |
+
is_tiled = profile.get('tiled', False)
|
| 32 |
+
compress = profile.get('compress', 'NONE')
|
| 33 |
+
block_x = profile.get('blockxsize', 0)
|
| 34 |
+
block_y = profile.get('blockysize', 0)
|
| 35 |
+
|
| 36 |
+
needs_fix = (nodata != -9999.0 or is_bigtiff != 'YES' or
|
| 37 |
+
not is_tiled or compress != 'deflate')
|
| 38 |
+
|
| 39 |
+
if not needs_fix:
|
| 40 |
+
print(f"\n✅ {location}: Already perfect (NoData={nodata}, BigTIFF={is_bigtiff}, Tiled={is_tiled}, Deflate={compress})")
|
| 41 |
+
continue
|
| 42 |
+
|
| 43 |
+
print(f"\n🔧 {location}: Fixing...")
|
| 44 |
+
print(f" Current: NoData={nodata}, BigTIFF={is_bigtiff}, Tiled={is_tiled}, Compress={compress}")
|
| 45 |
+
|
| 46 |
+
# Read the data
|
| 47 |
+
band = src.read(1)
|
| 48 |
+
|
| 49 |
+
# Handle existing NoData values
|
| 50 |
+
if nodata is not None and nodata != -9999.0:
|
| 51 |
+
band[band == nodata] = -9999
|
| 52 |
+
print(f" Replaced old NoData ({nodata}) with -9999")
|
| 53 |
+
|
| 54 |
+
# Handle NaN values if present
|
| 55 |
+
if np.isnan(band).any():
|
| 56 |
+
nan_count = np.isnan(band).sum()
|
| 57 |
+
band = np.nan_to_num(band, nan=-9999)
|
| 58 |
+
print(f" Replaced {nan_count} NaN values with -9999")
|
| 59 |
+
|
| 60 |
+
# Build profile from scratch to avoid conflicts
|
| 61 |
+
# Use GTiff driver with explicit options
|
| 62 |
+
kwargs = {
|
| 63 |
+
'driver': 'GTiff',
|
| 64 |
+
'height': band.shape[0],
|
| 65 |
+
'width': band.shape[1],
|
| 66 |
+
'count': 1,
|
| 67 |
+
'dtype': 'float32',
|
| 68 |
+
'crs': src.crs,
|
| 69 |
+
'transform': src.transform,
|
| 70 |
+
'nodata': -9999.0,
|
| 71 |
+
'tiled': True,
|
| 72 |
+
'blockxsize': 256,
|
| 73 |
+
'blockysize': 256,
|
| 74 |
+
'compress': 'deflate',
|
| 75 |
+
'predictor': 2,
|
| 76 |
+
'zlevel': 6,
|
| 77 |
+
'bigtiff': 'YES',
|
| 78 |
+
'interleave': 'band',
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
# Write the corrected file
|
| 82 |
+
output_path = loc_path.with_suffix('.fixed.tif')
|
| 83 |
+
|
| 84 |
+
try:
|
| 85 |
+
with rasterio.open(output_path, 'w', **kwargs) as dst:
|
| 86 |
+
dst.write(band, 1)
|
| 87 |
+
|
| 88 |
+
# Verify
|
| 89 |
+
with rasterio.open(output_path) as dst:
|
| 90 |
+
v_nodata = dst.nodata
|
| 91 |
+
v_bigtiff = dst.profile.get('bigtiff', 'NO')
|
| 92 |
+
v_tiled = dst.profile.get('tiled', False)
|
| 93 |
+
v_compress = dst.profile.get('compress', 'NONE')
|
| 94 |
+
|
| 95 |
+
print(f" ✅ Fixed file: {output_path}")
|
| 96 |
+
print(f" ✅ NoData: {v_nodata}")
|
| 97 |
+
print(f" ✅ BigTIFF: {v_bigtiff}")
|
| 98 |
+
print(f" ✅ Tiled: {v_tiled}")
|
| 99 |
+
print(f" ✅ Compression: {v_compress}")
|
| 100 |
+
|
| 101 |
+
except Exception as e:
|
| 102 |
+
print(f" ❌ ERROR writing {location}: {e}")
|
| 103 |
+
print(f" 💡 Try deleting {output_path} if it exists and re-run")
|
| 104 |
+
if output_path.exists():
|
| 105 |
+
output_path.unlink()
|
| 106 |
+
|
| 107 |
+
print("\n" + "=" * 70)
|
| 108 |
+
print("Done! Check .fixed.tif files.")
|
| 109 |
+
print("=" * 70)
|
scripts/generate_checksums.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""
|
| 3 |
+
generate_checksums.py
|
| 4 |
+
=====================
|
| 5 |
+
Generates SHA-256 checksums for all data files in the MatchGeo dataset.
|
| 6 |
+
|
| 7 |
+
Usage:
|
| 8 |
+
python generate_checksums.py --data-root /path/to/MatchGeo-DEM-v1 --output checksums.sha256
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
import hashlib
|
| 12 |
+
import argparse
|
| 13 |
+
from pathlib import Path
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
def sha256_file(filepath):
|
| 17 |
+
"""Return SHA-256 hex digest of a file."""
|
| 18 |
+
h = hashlib.sha256()
|
| 19 |
+
with open(filepath, "rb") as f:
|
| 20 |
+
for chunk in iter(lambda: f.read(8192 * 1024), b""):
|
| 21 |
+
h.update(chunk)
|
| 22 |
+
return h.hexdigest()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
def main():
|
| 26 |
+
|
| 27 |
+
data_root = "/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1"
|
| 28 |
+
output = "checksums.sha256"
|
| 29 |
+
include = [".tif", ".json", ".geojson", ".csv", ".qmd", ".cff", ".md"]
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
data_root = Path(data_root)
|
| 33 |
+
output_path = Path(output)
|
| 34 |
+
|
| 35 |
+
print("=" * 60)
|
| 36 |
+
print("MatchGeo-DEM Checksum Generator")
|
| 37 |
+
print("=" * 60)
|
| 38 |
+
|
| 39 |
+
entries = []
|
| 40 |
+
for ext in include:
|
| 41 |
+
for filepath in sorted(data_root.rglob(f"*{ext}")):
|
| 42 |
+
if ".git" in str(filepath):
|
| 43 |
+
continue
|
| 44 |
+
rel = filepath.relative_to(data_root)
|
| 45 |
+
digest = sha256_file(filepath)
|
| 46 |
+
entries.append(f"{digest} {rel}")
|
| 47 |
+
print(f" {rel}")
|
| 48 |
+
|
| 49 |
+
output_path.write_text("\n".join(entries) + "\n", encoding="utf-8")
|
| 50 |
+
print(f"\n✅ {len(entries)} files hashed → {output_path}")
|
| 51 |
+
print("=" * 60)
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
if __name__ == "__main__":
|
| 55 |
+
main()
|
scripts/generate_pdf_metadata.py
ADDED
|
@@ -0,0 +1,338 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""
|
| 3 |
+
generate_pdf_metadata.py
|
| 4 |
+
========================
|
| 5 |
+
Generates a human-readable PDF metadata report for MatchGeo-DEM.
|
| 6 |
+
|
| 7 |
+
Requires: fpdf2
|
| 8 |
+
Install: pip install fpdf2
|
| 9 |
+
|
| 10 |
+
Usage:
|
| 11 |
+
python generate_pdf_metadata.py --output MatchGeo-DEM_Metadata_Report.pdf
|
| 12 |
+
"""
|
| 13 |
+
|
| 14 |
+
import argparse
|
| 15 |
+
from pathlib import Path
|
| 16 |
+
from datetime import datetime
|
| 17 |
+
|
| 18 |
+
try:
|
| 19 |
+
from fpdf import FPDF
|
| 20 |
+
HAS_FPDF = True
|
| 21 |
+
except ImportError:
|
| 22 |
+
HAS_FPDF = False
|
| 23 |
+
raise ImportError("fpdf2 is required. Install: pip install fpdf2")
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
CITIES = [
|
| 27 |
+
{"id": "ATA_MV", "name": "Mount Athos, Greece", "epsg": 3031, "resolution": 2.0, "method": "Satellite InSAR", "n_tiles": 5625, "labelled": False, "year": "2011–2015", "provider": "Copernicus DEM (ESA)"},
|
| 28 |
+
{"id": "BRA_SP", "name": "São Paulo, Brazil", "epsg": 31983, "resolution": 0.5, "method": "Airborne LiDAR", "n_tiles": 558, "labelled": True, "year": "2020", "provider": "GeoSampa (PMSP)"},
|
| 29 |
+
{"id": "CHN_WS", "name": "Wutai Shan, China", "epsg": 32649, "resolution": 1.0, "method": "UAV SfM", "n_tiles": 1076, "labelled": False, "year": "2021", "provider": "OpenTopography (Zhou, C.)"},
|
| 30 |
+
{"id": "ESP_EH", "name": "El Hierro, Spain", "epsg": 3040, "resolution": 1.0, "method": "Airborne LiDAR", "n_tiles": 2460, "labelled": False, "year": "2022–2025", "provider": "PNOA-LiDAR (CNIG)"},
|
| 31 |
+
{"id": "FIN_LM", "name": "Lahti, Finland", "epsg": 3067, "resolution": 2.0, "method": "LiDAR + Photogrammetry", "n_tiles": 248, "labelled": False, "year": "2020–2026", "provider": "National Land Survey of Finland"},
|
| 32 |
+
{"id": "GER_BN", "name": "Bonn, Germany", "epsg": 25832, "resolution": 1.0, "method": "Airborne LiDAR", "n_tiles": 1759, "labelled": True, "year": "2016–2018", "provider": "Geobasis NRW"},
|
| 33 |
+
{"id": "IDN_SV", "name": "Sinabung Volcano, Indonesia", "epsg": 32647, "resolution": 0.87, "method": "UAS SfM", "n_tiles": 181, "labelled": False, "year": "2018", "provider": "OpenTopography (Carr, B.)"},
|
| 34 |
+
{"id": "KAZ_AC", "name": "Almaty City, Kazakhstan", "epsg": 32643, "resolution": 1.0, "method": "Pleiades Tristereo", "n_tiles": 887, "labelled": False, "year": "2017", "provider": "OpenTopography (Amey et al.)"},
|
| 35 |
+
{"id": "KSA_WA", "name": "Wadi Al-Akhdar, Saudi Arabia", "epsg": 32637, "resolution": 1.6, "method": "SPOT 6 Stereo", "n_tiles": 3880, "labelled": False, "year": "2016", "provider": "OpenTopography (Matthieu et al.)"},
|
| 36 |
+
{"id": "NAM_HF", "name": "Hebron Fault, Namibia", "epsg": 32733, "resolution": 0.53, "method": "WorldView-3 Stereo", "n_tiles": 1457, "labelled": False, "year": "2017", "provider": "OpenTopography (Salomon et al.)"},
|
| 37 |
+
{"id": "NZL_KP", "name": "Kapiti Coast, New Zealand", "epsg": 2193, "resolution": 1.0, "method": "Airborne LiDAR", "n_tiles": 1776, "labelled": False, "year": "2010–2025", "provider": "LINZ"},
|
| 38 |
+
{"id": "PHL_TA", "name": "Tarlac, Philippines", "epsg": 32651, "resolution": 1.0, "method": "Airborne LiDAR", "n_tiles": 286, "labelled": False, "year": "2014–2017", "provider": "LiPAD (UP Diliman)"},
|
| 39 |
+
{"id": "USA_GC", "name": "Grand Canyon, United States", "epsg": 6341, "resolution": 10.0, "method": "LiDAR + IfSAR", "n_tiles": 600, "labelled": False, "year": "2020–2026", "provider": "USGS 3DEP"},
|
| 40 |
+
]
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
class PDF(FPDF):
|
| 44 |
+
def header(self):
|
| 45 |
+
if self.page_no() == 1:
|
| 46 |
+
return
|
| 47 |
+
self.set_font("Helvetica", "B", 10)
|
| 48 |
+
self.set_text_color(40, 40, 40)
|
| 49 |
+
self.cell(0, 8, "MatchGeo-DEM Dataset Metadata Report", border=0, align="L")
|
| 50 |
+
self.cell(0, 8, f"Page {self.page_no()}", border=0, align="R")
|
| 51 |
+
self.ln(10)
|
| 52 |
+
self.set_draw_color(180, 180, 180)
|
| 53 |
+
self.line(10, self.get_y(), 200, self.get_y())
|
| 54 |
+
self.ln(5)
|
| 55 |
+
|
| 56 |
+
def footer(self):
|
| 57 |
+
self.set_y(-15)
|
| 58 |
+
self.set_font("Helvetica", "I", 8)
|
| 59 |
+
self.set_text_color(128, 128, 128)
|
| 60 |
+
self.cell(0, 10, f"Generated: {datetime.now().strftime('%Y-%m-%d %H:%M')} | DOI: 10.5281/zenodo.19339008", align="C")
|
| 61 |
+
|
| 62 |
+
def chapter_title(self, title, level=1):
|
| 63 |
+
if level == 1:
|
| 64 |
+
self.set_font("Helvetica", "B", 16)
|
| 65 |
+
self.set_text_color(0, 51, 102)
|
| 66 |
+
self.ln(8)
|
| 67 |
+
self.cell(0, 10, title, ln=True)
|
| 68 |
+
self.set_draw_color(0, 51, 102)
|
| 69 |
+
self.line(10, self.get_y(), 200, self.get_y())
|
| 70 |
+
self.ln(6)
|
| 71 |
+
else:
|
| 72 |
+
self.set_font("Helvetica", "B", 12)
|
| 73 |
+
self.set_text_color(0, 51, 102)
|
| 74 |
+
self.ln(6)
|
| 75 |
+
self.cell(0, 8, title, ln=True)
|
| 76 |
+
self.ln(2)
|
| 77 |
+
|
| 78 |
+
def body_text(self, text, bold=False):
|
| 79 |
+
self.set_font("Helvetica", "B" if bold else "", 10)
|
| 80 |
+
self.set_text_color(40, 40, 40)
|
| 81 |
+
self.multi_cell(0, 5, text)
|
| 82 |
+
self.ln(2)
|
| 83 |
+
|
| 84 |
+
def info_row(self, label, value):
|
| 85 |
+
self.set_font("Helvetica", "B", 10)
|
| 86 |
+
self.set_text_color(60, 60, 60)
|
| 87 |
+
self.cell(50, 6, label + ":", align="L")
|
| 88 |
+
self.set_font("Helvetica", "", 10)
|
| 89 |
+
self.set_text_color(40, 40, 40)
|
| 90 |
+
self.cell(0, 6, str(value), align="L")
|
| 91 |
+
self.ln()
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def generate_pdf(output_path):
|
| 95 |
+
pdf = PDF()
|
| 96 |
+
pdf.set_auto_page_break(auto=True, margin=15)
|
| 97 |
+
pdf.add_page()
|
| 98 |
+
|
| 99 |
+
# ===== COVER PAGE =====
|
| 100 |
+
pdf.set_font("Helvetica", "B", 24)
|
| 101 |
+
pdf.set_text_color(0, 51, 102)
|
| 102 |
+
pdf.ln(40)
|
| 103 |
+
pdf.cell(0, 15, "MatchGeo-DEM", ln=True, align="C")
|
| 104 |
+
pdf.set_font("Helvetica", "", 14)
|
| 105 |
+
pdf.cell(0, 10, "Multi-City Digital Elevation Model Dataset", ln=True, align="C")
|
| 106 |
+
pdf.cell(0, 10, "for Local Feature Matching", ln=True, align="C")
|
| 107 |
+
pdf.ln(20)
|
| 108 |
+
|
| 109 |
+
pdf.set_font("Helvetica", "", 11)
|
| 110 |
+
pdf.set_text_color(80, 80, 80)
|
| 111 |
+
pdf.multi_cell(0, 6,
|
| 112 |
+
"This report provides a human-readable summary of the MatchGeo-DEM dataset "
|
| 113 |
+
"(Version 1.1), including its structure, provenance, licensing, and per-city coverage. "
|
| 114 |
+
"It is intended for data managers, reviewers, and users who need a quick reference "
|
| 115 |
+
"without opening machine-readable metadata files.",
|
| 116 |
+
align="C"
|
| 117 |
+
)
|
| 118 |
+
pdf.ln(30)
|
| 119 |
+
|
| 120 |
+
pdf.set_font("Helvetica", "B", 11)
|
| 121 |
+
pdf.set_text_color(40, 40, 40)
|
| 122 |
+
pdf.cell(0, 8, "Dataset DOI: 10.5281/zenodo.19339008", ln=True, align="C")
|
| 123 |
+
pdf.cell(0, 8, "License: CC BY 4.0", ln=True, align="C")
|
| 124 |
+
pdf.cell(0, 8, f"Report Date: {datetime.now().strftime('%Y-%m-%d')}", ln=True, align="C")
|
| 125 |
+
pdf.cell(0, 8, "Contact: sabrina.correa@ufv.br", ln=True, align="C")
|
| 126 |
+
|
| 127 |
+
# ===== OVERVIEW =====
|
| 128 |
+
pdf.add_page()
|
| 129 |
+
pdf.chapter_title("1. Dataset Overview")
|
| 130 |
+
pdf.body_text(
|
| 131 |
+
"MatchGeo is a curated, multi-city Digital Elevation Model (DEM) dataset designed for "
|
| 132 |
+
"training and benchmarking local feature matching algorithms in urban and natural terrain analysis. "
|
| 133 |
+
"It aggregates high-resolution elevation data from 13 distinct environments across 6 continents, "
|
| 134 |
+
"supporting cross-domain generalization studies under varying acquisition methods, climates, and terrain types."
|
| 135 |
+
)
|
| 136 |
+
|
| 137 |
+
pdf.info_row("Title", "MatchGeo: Multi-City DEM Dataset for Local Feature Matching")
|
| 138 |
+
pdf.info_row("Version", "1.1")
|
| 139 |
+
pdf.info_row("Release Date", "2026-05-11")
|
| 140 |
+
pdf.info_row("Total Cities", "13")
|
| 141 |
+
pdf.info_row("Total Tiles", "20,793")
|
| 142 |
+
pdf.info_row("Labelled Tiles", "213 (Bonn, Germany)")
|
| 143 |
+
pdf.info_row("Total Annotations", "27,000+ (handcrafted keypoints)")
|
| 144 |
+
pdf.info_row("Tile Size", "333 × 333 pixels")
|
| 145 |
+
pdf.info_row("Pixel Depth", "Float32")
|
| 146 |
+
pdf.info_row("NoData Value", "-9999")
|
| 147 |
+
pdf.info_row("Compression", "DEFLATE")
|
| 148 |
+
pdf.info_row("Format", "GeoTIFF (BigTIFF, tiled, OGC 23-008r3 compliant)")
|
| 149 |
+
pdf.ln(5)
|
| 150 |
+
|
| 151 |
+
pdf.chapter_title("2. Authors & Contact", level=2)
|
| 152 |
+
pdf.info_row("Authors", "Correa, S. P. L. P.; Santos, A. de Paula; Oliveira, H. N.; Beltons, D.")
|
| 153 |
+
pdf.info_row("Institution", "Universidade Federal de Viçosa (UFV)")
|
| 154 |
+
pdf.info_row("Contact", "sabrina.correa@ufv.br")
|
| 155 |
+
pdf.info_row("Repository", "https://doi.org/10.5281/zenodo.19339008")
|
| 156 |
+
pdf.ln(5)
|
| 157 |
+
|
| 158 |
+
# ===== LICENSE =====
|
| 159 |
+
pdf.chapter_title("3. License & Attribution", level=2)
|
| 160 |
+
pdf.body_text(
|
| 161 |
+
"This dataset is released under the Creative Commons Attribution 4.0 International License (CC BY 4.0). "
|
| 162 |
+
"You are free to share and adapt the material for any purpose, even commercially, provided you give "
|
| 163 |
+
"appropriate credit, provide a link to the license, and indicate if changes were made."
|
| 164 |
+
)
|
| 165 |
+
pdf.body_text(
|
| 166 |
+
"When using this dataset, you must cite the dataset DOI and acknowledge the original data providers "
|
| 167 |
+
"for each city used in your study. Full attribution statements are provided in the DATASET_DESCRIPTION.md file."
|
| 168 |
+
)
|
| 169 |
+
pdf.ln(5)
|
| 170 |
+
|
| 171 |
+
# ===== TECHNICAL SPECIFICATIONS =====
|
| 172 |
+
pdf.chapter_title("4. Technical Specifications", level=2)
|
| 173 |
+
pdf.info_row("Raster Format", "GeoTIFF (BigTIFF variant)")
|
| 174 |
+
pdf.info_row("Internal Tiling", "256 × 256 pixels")
|
| 175 |
+
pdf.info_row("Patch Dimensions", "333 × 333 pixels")
|
| 176 |
+
pdf.info_row("Data Type", "Float32")
|
| 177 |
+
pdf.info_row("Coordinate Systems", "City-specific UTM / local CRS (EPSG)")
|
| 178 |
+
pdf.info_row("Metadata Standard", "ISO 19115-2 + OGC 23-008r3")
|
| 179 |
+
pdf.info_row("Machine Catalog", "JSON-LD manifest.json + STAC 1.0.0 collection")
|
| 180 |
+
pdf.ln(5)
|
| 181 |
+
|
| 182 |
+
# ===== PROCESSING PIPELINE =====
|
| 183 |
+
pdf.chapter_title("5. Processing Pipeline", level=2)
|
| 184 |
+
pdf.body_text(
|
| 185 |
+
"All cities were processed through a standardized PDAL 2.6.0 pipeline with city-specific adaptations:"
|
| 186 |
+
)
|
| 187 |
+
steps = [
|
| 188 |
+
"1. Acquisition — Raw data retrieved from source portals in native CRS and resolution.",
|
| 189 |
+
"2. Preprocessing — City-specific filtering (ground classification, outlier removal, noise filtering).",
|
| 190 |
+
"3. Rasterization — PDAL writers.gdal with output_type=max (DSM), float32, nodata=-9999.",
|
| 191 |
+
"4. Standardization — BigTIFF, TILED=YES, COMPRESS=DEFLATE.",
|
| 192 |
+
"5. Patch Extraction — Non-overlapping 333×333 pixel grid (no resampling).",
|
| 193 |
+
"6. Annotation — Handcrafted keypoints in normalized coordinates (Bonn, São Paulo).",
|
| 194 |
+
"7. Metadata — Per-city ISO 19115-2 JSON; central JSON-LD manifest.",
|
| 195 |
+
]
|
| 196 |
+
for step in steps:
|
| 197 |
+
pdf.body_text(step)
|
| 198 |
+
pdf.ln(5)
|
| 199 |
+
|
| 200 |
+
# ===== PER-CITY TABLE =====
|
| 201 |
+
pdf.add_page()
|
| 202 |
+
pdf.chapter_title("6. Per-City Coverage")
|
| 203 |
+
pdf.body_text(
|
| 204 |
+
"The following table summarizes each city's geographic coverage, acquisition method, resolution, "
|
| 205 |
+
"and annotation status. All tiles are 333×333 pixel GeoTIFF patches."
|
| 206 |
+
)
|
| 207 |
+
pdf.ln(3)
|
| 208 |
+
|
| 209 |
+
# Table header
|
| 210 |
+
pdf.set_fill_color(0, 51, 102)
|
| 211 |
+
pdf.set_text_color(255, 255, 255)
|
| 212 |
+
pdf.set_font("Helvetica", "B", 9)
|
| 213 |
+
pdf.cell(22, 7, "City", fill=True)
|
| 214 |
+
pdf.cell(45, 7, "Location", fill=True)
|
| 215 |
+
pdf.cell(30, 7, "Method", fill=True)
|
| 216 |
+
pdf.cell(18, 7, "Res (m)", fill=True)
|
| 217 |
+
pdf.cell(18, 7, "Tiles", fill=True)
|
| 218 |
+
pdf.cell(20, 7, "Labelled", fill=True)
|
| 219 |
+
pdf.cell(25, 7, "Year", fill=True)
|
| 220 |
+
pdf.ln()
|
| 221 |
+
|
| 222 |
+
# Table rows
|
| 223 |
+
pdf.set_text_color(40, 40, 40)
|
| 224 |
+
pdf.set_font("Helvetica", "", 8)
|
| 225 |
+
fill = False
|
| 226 |
+
for city in CITIES:
|
| 227 |
+
if pdf.get_y() > 260:
|
| 228 |
+
pdf.add_page()
|
| 229 |
+
pdf.set_fill_color(0, 51, 102)
|
| 230 |
+
pdf.set_text_color(255, 255, 255)
|
| 231 |
+
pdf.set_font("Helvetica", "B", 9)
|
| 232 |
+
pdf.cell(22, 7, "City", fill=True)
|
| 233 |
+
pdf.cell(45, 7, "Location", fill=True)
|
| 234 |
+
pdf.cell(30, 7, "Method", fill=True)
|
| 235 |
+
pdf.cell(18, 7, "Res (m)", fill=True)
|
| 236 |
+
pdf.cell(18, 7, "Tiles", fill=True)
|
| 237 |
+
pdf.cell(20, 7, "Labelled", fill=True)
|
| 238 |
+
pdf.cell(25, 7, "Year", fill=True)
|
| 239 |
+
pdf.ln()
|
| 240 |
+
pdf.set_text_color(40, 40, 40)
|
| 241 |
+
pdf.set_font("Helvetica", "", 8)
|
| 242 |
+
fill = False
|
| 243 |
+
|
| 244 |
+
pdf.set_fill_color(240, 240, 240) if fill else pdf.set_fill_color(255, 255, 255)
|
| 245 |
+
pdf.cell(22, 6, city["id"], fill=True)
|
| 246 |
+
pdf.cell(45, 6, city["name"], fill=True)
|
| 247 |
+
pdf.cell(30, 6, city["method"], fill=True)
|
| 248 |
+
pdf.cell(18, 6, str(city["resolution"]), fill=True)
|
| 249 |
+
pdf.cell(18, 6, str(city["n_tiles"]), fill=True)
|
| 250 |
+
pdf.cell(20, 6, "Yes" if city["labelled"] else "No", fill=True)
|
| 251 |
+
pdf.cell(25, 6, city["year"], fill=True)
|
| 252 |
+
pdf.ln()
|
| 253 |
+
fill = not fill
|
| 254 |
+
|
| 255 |
+
pdf.ln(5)
|
| 256 |
+
pdf.set_font("Helvetica", "I", 8)
|
| 257 |
+
pdf.set_text_color(100, 100, 100)
|
| 258 |
+
pdf.multi_cell(0, 4,
|
| 259 |
+
"Note: BRA_SP is marked as labelled in the dataset schema but currently has zero annotation files "
|
| 260 |
+
"(annotations pending). GER_BN contains 27,000+ handcrafted keypoint annotations.")
|
| 261 |
+
|
| 262 |
+
# ===== DATA SPLITS =====
|
| 263 |
+
pdf.add_page()
|
| 264 |
+
pdf.chapter_title("7. Data Splits")
|
| 265 |
+
pdf.body_text(
|
| 266 |
+
"The dataset is partitioned into train / validation / test splits stratified by city and difficulty. "
|
| 267 |
+
"Split manifests are provided as CSV files in the splits/ directory."
|
| 268 |
+
)
|
| 269 |
+
pdf.info_row("Train", "80%")
|
| 270 |
+
pdf.info_row("Validation", "10%")
|
| 271 |
+
pdf.info_row("Test", "10%")
|
| 272 |
+
pdf.info_row("Stratification", "By city and difficulty (flat, medium, steep, urban_density)")
|
| 273 |
+
pdf.ln(5)
|
| 274 |
+
|
| 275 |
+
# ===== KNOWN LIMITATIONS =====
|
| 276 |
+
pdf.chapter_title("8. Known Limitations", level=2)
|
| 277 |
+
limitations = [
|
| 278 |
+
"• Geographic bias: Dense annotations are currently available only for GER_BN. BRA_SP annotations are pending.",
|
| 279 |
+
"• Temporal mismatch: Data spans 2011–2026 across cities; users should account for temporal drift.",
|
| 280 |
+
"• Sensor heterogeneity: LiDAR, photogrammetry, SfM, and satellite stereo have different noise characteristics.",
|
| 281 |
+
"• Resolution heterogeneity: Native resolutions range from 0.5 m to 10 m; all tiles are 333×333 pixels.",
|
| 282 |
+
"• Missing data: Water bodies and ocean areas are excluded (NoData = -9999).",
|
| 283 |
+
]
|
| 284 |
+
for lim in limitations:
|
| 285 |
+
pdf.body_text(lim)
|
| 286 |
+
pdf.ln(5)
|
| 287 |
+
|
| 288 |
+
# ===== CITATION =====
|
| 289 |
+
pdf.chapter_title("9. How to Cite", level=2)
|
| 290 |
+
pdf.body_text("Dataset citation (BibTeX):", bold=True)
|
| 291 |
+
pdf.set_font("Courier", "", 8)
|
| 292 |
+
pdf.set_text_color(40, 40, 40)
|
| 293 |
+
bibtex = """@dataset{correa_2026_matchgeo,
|
| 294 |
+
author = {Correa, S. P. L. P. and Santos, A. de Paula and Oliveira, H. N. and Beltons, D.},
|
| 295 |
+
title = {MatchGeo: Multi-City Digital Elevation Model Dataset for Local Feature Matching},
|
| 296 |
+
year = 2026,
|
| 297 |
+
publisher = {Zenodo},
|
| 298 |
+
version = {1.1},
|
| 299 |
+
doi = {10.5281/zenodo.19339008},
|
| 300 |
+
url = {https://doi.org/10.5281/zenodo.19339008}
|
| 301 |
+
}"""
|
| 302 |
+
pdf.multi_cell(0, 4, bibtex)
|
| 303 |
+
pdf.ln(5)
|
| 304 |
+
|
| 305 |
+
pdf.set_font("Helvetica", "", 10)
|
| 306 |
+
pdf.body_text("Plain text citation:", bold=True)
|
| 307 |
+
pdf.body_text(
|
| 308 |
+
"Correa, S. P. L. P., Santos, A. de Paula, Oliveira, H. N., & Beltons, D. (2026). "
|
| 309 |
+
"MatchGeo: Multi-City Digital Elevation Model Dataset for Local Feature Matching (Version 1.1) [Data set]. "
|
| 310 |
+
"Zenodo. https://doi.org/10.5281/zenodo.19339008"
|
| 311 |
+
)
|
| 312 |
+
|
| 313 |
+
# ===== BACK PAGE =====
|
| 314 |
+
pdf.add_page()
|
| 315 |
+
pdf.set_font("Helvetica", "B", 14)
|
| 316 |
+
pdf.set_text_color(0, 51, 102)
|
| 317 |
+
pdf.ln(80)
|
| 318 |
+
pdf.cell(0, 10, "End of Report", ln=True, align="C")
|
| 319 |
+
pdf.set_font("Helvetica", "", 10)
|
| 320 |
+
pdf.set_text_color(100, 100, 100)
|
| 321 |
+
pdf.cell(0, 8, "For questions or bug reports, contact: sabrina.correa@ufv.br", ln=True, align="C")
|
| 322 |
+
pdf.cell(0, 8, "Zenodo: https://doi.org/10.5281/zenodo.19339008", ln=True, align="C")
|
| 323 |
+
pdf.cell(0, 8, "Hugging Face: https://huggingface.co/datasets/paeslemesa/matchgeo", ln=True, align="C")
|
| 324 |
+
|
| 325 |
+
# Save
|
| 326 |
+
pdf.output(output_path)
|
| 327 |
+
print(f"✅ PDF report saved: {output_path}")
|
| 328 |
+
|
| 329 |
+
|
| 330 |
+
def main():
|
| 331 |
+
parser = argparse.ArgumentParser(description="Generate MatchGeo-DEM PDF metadata report")
|
| 332 |
+
parser.add_argument("--output", default="MatchGeo-DEM_Metadata_Report.pdf", help="Output PDF path")
|
| 333 |
+
args = parser.parse_args()
|
| 334 |
+
generate_pdf(args.output)
|
| 335 |
+
|
| 336 |
+
|
| 337 |
+
if __name__ == "__main__":
|
| 338 |
+
main()
|
scripts/generate_stac.py
ADDED
|
@@ -0,0 +1,304 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""
|
| 3 |
+
generate_stac.py
|
| 4 |
+
================
|
| 5 |
+
Creates STAC 1.0.0 metadata for the MatchGeo-DEM dataset.
|
| 6 |
+
|
| 7 |
+
Outputs:
|
| 8 |
+
- stac/collection.json — STAC Collection for the whole dataset
|
| 9 |
+
- stac/items/{city_id}.json — STAC Item per city (merged DEM + tile assets)
|
| 10 |
+
|
| 11 |
+
Requires: rasterio, shapely (optional but recommended)
|
| 12 |
+
Install: pip install rasterio shapely
|
| 13 |
+
|
| 14 |
+
Usage:
|
| 15 |
+
python generate_stac.py --data-root /path/to/MatchGeo-DEM-v1/data
|
| 16 |
+
"""
|
| 17 |
+
|
| 18 |
+
import json
|
| 19 |
+
import argparse
|
| 20 |
+
from pathlib import Path
|
| 21 |
+
from datetime import datetime
|
| 22 |
+
from collections import OrderedDict
|
| 23 |
+
|
| 24 |
+
try:
|
| 25 |
+
import rasterio
|
| 26 |
+
from rasterio.crs import CRS
|
| 27 |
+
HAS_RASTERIO = True
|
| 28 |
+
except ImportError:
|
| 29 |
+
HAS_RASTERIO = False
|
| 30 |
+
|
| 31 |
+
try:
|
| 32 |
+
from shapely.geometry import box, mapping
|
| 33 |
+
HAS_SHAPELY = True
|
| 34 |
+
except ImportError:
|
| 35 |
+
HAS_SHAPELY = False
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
# ------------------------------------------------------------------
|
| 39 |
+
# Static dataset catalog (synchronized with manifest.json)
|
| 40 |
+
# ------------------------------------------------------------------
|
| 41 |
+
CITIES = [
|
| 42 |
+
{"id": "ATA_MV", "name": "Mount Athos, Greece", "epsg": 3031, "resolution": 2.0, "method": "satellite_insar", "n_tiles": 5625, "labelled": False, "year_start": 2011, "year_end": 2015, "provider": "Copernicus DEM"},
|
| 43 |
+
{"id": "BRA_SP", "name": "São Paulo, Brazil", "epsg": 31983, "resolution": 0.5, "method": "airborne_lidar", "n_tiles": 558, "labelled": True, "year_start": 2020, "year_end": 2020, "provider": "GeoSampa"},
|
| 44 |
+
{"id": "CHN_WS", "name": "Wutai Shan, China", "epsg": 32649, "resolution": 1.0, "method": "uav_sfm", "n_tiles": 1076, "labelled": False, "year_start": 2021, "year_end": 2021, "provider": "OpenTopography"},
|
| 45 |
+
{"id": "ESP_EH", "name": "El Hierro, Spain", "epsg": 3040, "resolution": 1.0, "method": "airborne_lidar", "n_tiles": 2460, "labelled": False, "year_start": 2022, "year_end": 2025, "provider": "PNOA-LiDAR"},
|
| 46 |
+
{"id": "FIN_LM", "name": "Lahti, Finland", "epsg": 3067, "resolution": 2.0, "method": "airborne_lidar_photogrammetry", "n_tiles": 248, "labelled": False, "year_start": 2020, "year_end": 2026, "provider": "National Land Survey of Finland"},
|
| 47 |
+
{"id": "GER_BN", "name": "Bonn, Germany", "epsg": 25832, "resolution": 1.0, "method": "airborne_lidar", "n_tiles": 1759, "labelled": True, "year_start": 2016, "year_end": 2018, "provider": "Geobasis NRW"},
|
| 48 |
+
{"id": "IDN_SV", "name": "Sinabung Volcano, Indonesia", "epsg": 32647, "resolution": 0.87, "method": "uas_sfm", "n_tiles": 181, "labelled": False, "year_start": 2018, "year_end": 2018, "provider": "OpenTopography"},
|
| 49 |
+
{"id": "KAZ_AC", "name": "Almaty City, Kazakhstan", "epsg": 32643, "resolution": 1.0, "method": "satellite_stereophotogrammetry", "n_tiles": 887, "labelled": False, "year_start": 2017, "year_end": 2017, "provider": "OpenTopography"},
|
| 50 |
+
{"id": "KSA_WA", "name": "Wadi Al-Akhdar, Saudi Arabia", "epsg": 32637, "resolution": 1.6, "method": "satellite_stereophotogrammetry", "n_tiles": 3880, "labelled": False, "year_start": 2016, "year_end": 2016, "provider": "OpenTopography"},
|
| 51 |
+
{"id": "NAM_HF", "name": "Hebron Fault, Namibia", "epsg": 32733, "resolution": 0.53, "method": "satellite_stereophotogrammetry", "n_tiles": 1457, "labelled": False, "year_start": 2017, "year_end": 2017, "provider": "OpenTopography"},
|
| 52 |
+
{"id": "NZL_KP", "name": "Kapiti Coast, New Zealand", "epsg": 2193, "resolution": 1.0, "method": "airborne_lidar", "n_tiles": 1776, "labelled": False, "year_start": 2010, "year_end": 2025, "provider": "LINZ"},
|
| 53 |
+
{"id": "PHL_TA", "name": "Tarlac, Philippines", "epsg": 32651, "resolution": 1.0, "method": "airborne_lidar", "n_tiles": 286, "labelled": False, "year_start": 2014, "year_end": 2017, "provider": "LiPAD"},
|
| 54 |
+
{"id": "USA_GC", "name": "Grand Canyon, United States", "epsg": 6341, "resolution": 10.0, "method": "lidar_ifsar", "n_tiles": 600, "labelled": False, "year_start": 2020, "year_end": 2026, "provider": "USGS 3DEP"},
|
| 55 |
+
]
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
# ------------------------------------------------------------------
|
| 59 |
+
# Helpers
|
| 60 |
+
# ------------------------------------------------------------------
|
| 61 |
+
def read_raster_bounds(tif_path):
|
| 62 |
+
"""Return (bbox, crs_wkt, width, height) from a GeoTIFF."""
|
| 63 |
+
if not HAS_RASTERIO:
|
| 64 |
+
return None, None, None, None
|
| 65 |
+
try:
|
| 66 |
+
with rasterio.open(tif_path) as src:
|
| 67 |
+
bounds = src.bounds
|
| 68 |
+
bbox = [bounds.left, bounds.bottom, bounds.right, bounds.top]
|
| 69 |
+
return bbox, src.crs.to_wkt(), src.width, src.height
|
| 70 |
+
except Exception as e:
|
| 71 |
+
print(f" ⚠️ Could not read {tif_path}: {e}")
|
| 72 |
+
return None, None, None, None
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
def bbox_to_geometry(bbox):
|
| 76 |
+
"""Convert [minx, miny, maxx, maxy] to GeoJSON Polygon dict."""
|
| 77 |
+
if HAS_SHAPELY and bbox:
|
| 78 |
+
return mapping(box(*bbox))
|
| 79 |
+
# Fallback manual geometry
|
| 80 |
+
if bbox:
|
| 81 |
+
return {
|
| 82 |
+
"type": "Polygon",
|
| 83 |
+
"coordinates": [[
|
| 84 |
+
[bbox[0], bbox[1]], [bbox[2], bbox[1]],
|
| 85 |
+
[bbox[2], bbox[3]], [bbox[0], bbox[3]],
|
| 86 |
+
[bbox[0], bbox[1]]
|
| 87 |
+
]]
|
| 88 |
+
}
|
| 89 |
+
return None
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
def build_collection(data_root, output_dir):
|
| 93 |
+
"""Build the STAC Collection JSON."""
|
| 94 |
+
collection = OrderedDict()
|
| 95 |
+
collection["type"] = "Collection"
|
| 96 |
+
collection["stac_version"] = "1.0.0"
|
| 97 |
+
collection["id"] = "matchgeo-dem-v1"
|
| 98 |
+
collection["title"] = "MatchGeo: Multi-City DEM Dataset for Local Feature Matching"
|
| 99 |
+
collection["description"] = (
|
| 100 |
+
"MatchGeo is a curated, multi-city Digital Elevation Model (DEM) dataset "
|
| 101 |
+
"designed for training and benchmarking local feature matching algorithms "
|
| 102 |
+
"in urban and natural terrain analysis. It aggregates high-resolution elevation "
|
| 103 |
+
"data from 13 distinct environments across 6 continents."
|
| 104 |
+
)
|
| 105 |
+
collection["license"] = "CC-BY-4.0"
|
| 106 |
+
collection["keywords"] = [
|
| 107 |
+
"DEM", "DSM", "elevation", "local feature matching",
|
| 108 |
+
"computer vision", "geospatial", "LiDAR", "photogrammetry"
|
| 109 |
+
]
|
| 110 |
+
collection["providers"] = [
|
| 111 |
+
{
|
| 112 |
+
"name": "Correa, S. P. L. P.; Santos, A. de Paula; Oliveira, H. N.; Beltons, D.",
|
| 113 |
+
"roles": ["producer", "licensor"],
|
| 114 |
+
"url": "https://doi.org/10.5281/zenodo.19339008"
|
| 115 |
+
}
|
| 116 |
+
]
|
| 117 |
+
collection["extent"] = {
|
| 118 |
+
"spatial": {"bbox": [[-180, -90, 180, 90]]},
|
| 119 |
+
"temporal": {
|
| 120 |
+
"interval": [["2011-01-01T00:00:00Z", "2026-12-31T23:59:59Z"]]
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
collection["links"] = [
|
| 124 |
+
{"rel": "self", "href": "./collection.json", "type": "application/json"},
|
| 125 |
+
{"rel": "root", "href": "./collection.json", "type": "application/json"},
|
| 126 |
+
{"rel": "license", "href": "../LICENSE", "type": "text/plain"},
|
| 127 |
+
{"rel": "cite-as", "href": "https://doi.org/10.5281/zenodo.19339008", "type": "text/html"}
|
| 128 |
+
]
|
| 129 |
+
# Summaries
|
| 130 |
+
collection["summaries"] = {
|
| 131 |
+
"gsd": [0.5, 0.53, 0.87, 1.0, 1.6, 2.0, 10.0],
|
| 132 |
+
"eo:bands": [{"name": "elevation", "common_name": "elevation", "unit": "meter"}]
|
| 133 |
+
}
|
| 134 |
+
# Assets
|
| 135 |
+
collection["assets"] = {
|
| 136 |
+
"manifest": {
|
| 137 |
+
"href": "../manifest.json",
|
| 138 |
+
"type": "application/json",
|
| 139 |
+
"title": "Central dataset manifest (JSON-LD)"
|
| 140 |
+
},
|
| 141 |
+
"dataset_description": {
|
| 142 |
+
"href": "../DATASET_DESCRIPTION.md",
|
| 143 |
+
"type": "text/markdown",
|
| 144 |
+
"title": "FAIR-compliant dataset description"
|
| 145 |
+
}
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
out_path = output_dir / "collection.json"
|
| 149 |
+
out_path.write_text(json.dumps(collection, indent=2), encoding="utf-8")
|
| 150 |
+
print(f"✅ Collection written: {out_path}")
|
| 151 |
+
return collection
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
def build_item(city, data_root, output_dir):
|
| 155 |
+
"""Build a STAC Item for one city."""
|
| 156 |
+
city_id = city["id"]
|
| 157 |
+
city_dir = Path(data_root) / city_id
|
| 158 |
+
merged_tif = city_dir / f"{city_id}.tif"
|
| 159 |
+
tiles_dir = city_dir / "tiles"
|
| 160 |
+
anno_dir = city_dir / "annotations"
|
| 161 |
+
has_annotations = anno_dir.exists() and any(anno_dir.iterdir())
|
| 162 |
+
|
| 163 |
+
# Read merged DEM bounds
|
| 164 |
+
bbox, crs_wkt, width, height = read_raster_bounds(merged_tif)
|
| 165 |
+
geometry = bbox_to_geometry(bbox)
|
| 166 |
+
|
| 167 |
+
# Date handling
|
| 168 |
+
year_start = city.get("year_start", 2020)
|
| 169 |
+
year_end = city.get("year_end", 2020)
|
| 170 |
+
dt_start = f"{year_start}-01-01T00:00:00Z"
|
| 171 |
+
dt_end = f"{year_end}-12-31T23:59:59Z"
|
| 172 |
+
|
| 173 |
+
item = OrderedDict()
|
| 174 |
+
item["type"] = "Feature"
|
| 175 |
+
item["stac_version"] = "1.0.0"
|
| 176 |
+
item["id"] = city_id
|
| 177 |
+
item["collection"] = "matchgeo-dem-v1"
|
| 178 |
+
item["bbox"] = bbox if bbox else [-180, -90, 180, 90]
|
| 179 |
+
item["geometry"] = geometry if geometry else {"type": "Polygon", "coordinates": [[]]}
|
| 180 |
+
item["properties"] = {
|
| 181 |
+
"title": city["name"],
|
| 182 |
+
"description": f"{city['name']} — {city['method']} at {city['resolution']} m resolution",
|
| 183 |
+
"datetime": dt_start,
|
| 184 |
+
"start_datetime": dt_start,
|
| 185 |
+
"end_datetime": dt_end,
|
| 186 |
+
"providers": [{"name": city["provider"], "roles": ["producer"]}],
|
| 187 |
+
"gsd": city["resolution"],
|
| 188 |
+
"proj:epsg": city["epsg"],
|
| 189 |
+
"matchgeo:method": city["method"],
|
| 190 |
+
"matchgeo:n_tiles": city["n_tiles"],
|
| 191 |
+
"matchgeo:labelled": city["labelled"],
|
| 192 |
+
"matchgeo:has_annotations": has_annotations,
|
| 193 |
+
}
|
| 194 |
+
if crs_wkt:
|
| 195 |
+
item["properties"]["proj:wkt2"] = crs_wkt
|
| 196 |
+
|
| 197 |
+
# Assets
|
| 198 |
+
item["assets"] = {}
|
| 199 |
+
if merged_tif.exists():
|
| 200 |
+
item["assets"]["dem"] = {
|
| 201 |
+
"href": str(merged_tif.relative_to(Path(data_root).parent)),
|
| 202 |
+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
|
| 203 |
+
"title": f"Merged DEM — {city_id}",
|
| 204 |
+
"roles": ["data"],
|
| 205 |
+
"eo:bands": [{"name": "elevation", "common_name": "elevation", "unit": "meter"}]
|
| 206 |
+
}
|
| 207 |
+
if tiles_dir.exists():
|
| 208 |
+
item["assets"]["tiles"] = {
|
| 209 |
+
"href": str(tiles_dir.relative_to(Path(data_root).parent)) + "/",
|
| 210 |
+
"type": "application/x-geotiff-tiles",
|
| 211 |
+
"title": f"333×333 pixel tiles — {city_id}",
|
| 212 |
+
"roles": ["data"],
|
| 213 |
+
"x-asset-count": city["n_tiles"]
|
| 214 |
+
}
|
| 215 |
+
extent_geojson = city_dir / f"{city_id}_extent.geojson"
|
| 216 |
+
if extent_geojson.exists():
|
| 217 |
+
item["assets"]["extent"] = {
|
| 218 |
+
"href": str(extent_geojson.relative_to(Path(data_root).parent)),
|
| 219 |
+
"type": "application/geo+json",
|
| 220 |
+
"title": "Coverage extent polygon",
|
| 221 |
+
"roles": ["metadata"]
|
| 222 |
+
}
|
| 223 |
+
tiles_geojson = city_dir / f"{city_id}_tiles.geojson"
|
| 224 |
+
if tiles_geojson.exists():
|
| 225 |
+
item["assets"]["tile_index"] = {
|
| 226 |
+
"href": str(tiles_geojson.relative_to(Path(data_root).parent)),
|
| 227 |
+
"type": "application/geo+json",
|
| 228 |
+
"title": "Tile index (grid)",
|
| 229 |
+
"roles": ["metadata"]
|
| 230 |
+
}
|
| 231 |
+
meta_json = city_dir / f"{city_id}_metadata.json"
|
| 232 |
+
if meta_json.exists():
|
| 233 |
+
item["assets"]["metadata"] = {
|
| 234 |
+
"href": str(meta_json.relative_to(Path(data_root).parent)),
|
| 235 |
+
"type": "application/json",
|
| 236 |
+
"title": "ISO 19115-2 + OGC 23-008r3 metadata",
|
| 237 |
+
"roles": ["metadata"]
|
| 238 |
+
}
|
| 239 |
+
if has_annotations:
|
| 240 |
+
item["assets"]["annotations"] = {
|
| 241 |
+
"href": str(anno_dir.relative_to(Path(data_root).parent)) + "/",
|
| 242 |
+
"type": "application/json",
|
| 243 |
+
"title": "Keypoint annotations",
|
| 244 |
+
"roles": ["metadata"]
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
item["links"] = [
|
| 248 |
+
{"rel": "self", "href": f"./{city_id}.json", "type": "application/json"},
|
| 249 |
+
{"rel": "collection", "href": "../collection.json", "type": "application/json"},
|
| 250 |
+
{"rel": "root", "href": "../collection.json", "type": "application/json"}
|
| 251 |
+
]
|
| 252 |
+
|
| 253 |
+
out_path = output_dir / "items" / f"{city_id}.json"
|
| 254 |
+
out_path.parent.mkdir(parents=True, exist_ok=True)
|
| 255 |
+
out_path.write_text(json.dumps(item, indent=2), encoding="utf-8")
|
| 256 |
+
print(f" ✅ Item written: {out_path}")
|
| 257 |
+
return item
|
| 258 |
+
|
| 259 |
+
|
| 260 |
+
def main():
|
| 261 |
+
parser = argparse.ArgumentParser(description="Generate STAC metadata for MatchGeo-DEM")
|
| 262 |
+
parser.add_argument("--data-root", required=True, help="Path to MatchGeo-DEM-v1/data/")
|
| 263 |
+
parser.add_argument("--output", default="stac", help="Output directory for STAC files")
|
| 264 |
+
args = parser.parse_args()
|
| 265 |
+
|
| 266 |
+
data_root = Path(args.data_root)
|
| 267 |
+
output_dir = Path(args.output)
|
| 268 |
+
output_dir.mkdir(parents=True, exist_ok=True)
|
| 269 |
+
|
| 270 |
+
print("=" * 60)
|
| 271 |
+
print("MatchGeo-DEM STAC Generator v1.0")
|
| 272 |
+
print("=" * 60)
|
| 273 |
+
|
| 274 |
+
# Build collection
|
| 275 |
+
print("\n📦 Building Collection...")
|
| 276 |
+
collection = build_collection(data_root, output_dir)
|
| 277 |
+
|
| 278 |
+
# Build items
|
| 279 |
+
print("\n🗺️ Building Items...")
|
| 280 |
+
for city in CITIES:
|
| 281 |
+
build_item(city, data_root, output_dir)
|
| 282 |
+
|
| 283 |
+
# Update collection links with item references
|
| 284 |
+
for city in CITIES:
|
| 285 |
+
collection["links"].append({
|
| 286 |
+
"rel": "item",
|
| 287 |
+
"href": f"./items/{city['id']}.json",
|
| 288 |
+
"type": "application/json"
|
| 289 |
+
})
|
| 290 |
+
|
| 291 |
+
# Rewrite collection with item links
|
| 292 |
+
(output_dir / "collection.json").write_text(
|
| 293 |
+
json.dumps(collection, indent=2), encoding="utf-8"
|
| 294 |
+
)
|
| 295 |
+
|
| 296 |
+
print("\n" + "=" * 60)
|
| 297 |
+
print("✅ STAC metadata complete!")
|
| 298 |
+
print(f" Collection: {output_dir / 'collection.json'}")
|
| 299 |
+
print(f" Items: {output_dir / 'items/'}")
|
| 300 |
+
print("=" * 60)
|
| 301 |
+
|
| 302 |
+
|
| 303 |
+
if __name__ == "__main__":
|
| 304 |
+
main()
|
scripts/get_data_metadata.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#%%
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
import rasterio
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
path = Path("/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1")
|
| 7 |
+
cities = {'ATA_MV', 'BRA_SP', 'CHN_WS', 'ESP_EH' ,'FIN_LM', 'GER_BN' ,'IDN_SV', 'KAZ_AC', 'KSA_WA' ,'NAM_HF' ,'NZL_KP' ,'PHL_TA', 'USA_GC'}
|
| 8 |
+
|
| 9 |
+
print("===============================================\nEPSG")
|
| 10 |
+
# 1. Get EPSG and WKT for all cities
|
| 11 |
+
for city in {'ATA_MV', 'BRA_SP', 'CHN_WS', 'ESP_EH' ,'FIN_LM', 'GER_BN' ,'IDN_SV', 'KAZ_AC', 'KSA_WA' ,'NAM_HF' ,'NZL_KP' ,'PHL_TA', 'USA_GC'}:
|
| 12 |
+
with rasterio.open(str(path) + f"/{city}/{city}.tif") as src:
|
| 13 |
+
print( f"{city}: {src.crs}")
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
#%%
|
| 17 |
+
print("===============================================\nNumber of Tiles")
|
| 18 |
+
# 2. Count tiles per city
|
| 19 |
+
for city in cities:
|
| 20 |
+
tile_path = Path(path, f"{city}/tiles")
|
| 21 |
+
ntiles = list(tile_path.glob("*.tif"))
|
| 22 |
+
print(f"{city} : {len(ntiles)}")
|
| 23 |
+
|
| 24 |
+
#%%
|
| 25 |
+
print("===============================================\nBounding Box")
|
| 26 |
+
# 3. Get bounding box from GeoJSON
|
| 27 |
+
for city in cities:
|
| 28 |
+
with rasterio.open(Path(path, f"{city}/{city}.tif")) as src:
|
| 29 |
+
profile = src.profile
|
| 30 |
+
bounds = src.bounds
|
| 31 |
+
print(f"{city} : {bounds}")
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
# %%
|
scripts/get_dataset_sizes.py
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
import json
|
| 4 |
+
|
| 5 |
+
areas = {'ATA_MV', 'BRA_SP', 'CHN_WS', 'ESP_EH', 'FIN_LM', 'GER_BN', 'IDN_SV',
|
| 6 |
+
'KAZ_AC', 'KSA_WA', 'NAM_HF', 'NZL_KP', 'PHL_TA', 'USA_GC'}
|
| 7 |
+
|
| 8 |
+
data_path = Path("/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/data/")
|
| 9 |
+
|
| 10 |
+
print("=" * 80)
|
| 11 |
+
print("MatchGeo-DEM Directory Size Report")
|
| 12 |
+
print("=" * 80)
|
| 13 |
+
print(f"{'City':<12} {'Tiles':>8} {'Merged (MB)':>12} {'Tiles (MB)':>12} {'Total (MB)':>12} {'Total (GB)':>10}")
|
| 14 |
+
print("-" * 80)
|
| 15 |
+
|
| 16 |
+
total_size = 0
|
| 17 |
+
total_tiles = 0
|
| 18 |
+
results = {}
|
| 19 |
+
|
| 20 |
+
for location in sorted(areas):
|
| 21 |
+
loc_path = data_path / location
|
| 22 |
+
|
| 23 |
+
if not loc_path.exists():
|
| 24 |
+
print(f"{location:<12} {'N/A':>8} {'N/A':>12} {'N/A':>12} {'N/A':>12} {'N/A':>10}")
|
| 25 |
+
continue
|
| 26 |
+
|
| 27 |
+
# Count tiles
|
| 28 |
+
tiles_dir = loc_path / "tiles"
|
| 29 |
+
n_tiles = 0
|
| 30 |
+
tiles_size = 0
|
| 31 |
+
if tiles_dir.exists():
|
| 32 |
+
for f in tiles_dir.iterdir():
|
| 33 |
+
if f.suffix == '.tif':
|
| 34 |
+
n_tiles += 1
|
| 35 |
+
tiles_size += f.stat().st_size
|
| 36 |
+
|
| 37 |
+
# Merged file size
|
| 38 |
+
merged_file = loc_path / f"{location}.tif"
|
| 39 |
+
merged_size = merged_file.stat().st_size if merged_file.exists() else 0
|
| 40 |
+
|
| 41 |
+
# Also check fixed file
|
| 42 |
+
fixed_file = loc_path / f"{location}.fixed.tif"
|
| 43 |
+
if fixed_file.exists():
|
| 44 |
+
merged_size = max(merged_size, fixed_file.stat().st_size)
|
| 45 |
+
|
| 46 |
+
# Total size
|
| 47 |
+
city_total = merged_size + tiles_size
|
| 48 |
+
|
| 49 |
+
# Convert to MB/GB
|
| 50 |
+
merged_mb = merged_size / (1024 * 1024)
|
| 51 |
+
tiles_mb = tiles_size / (1024 * 1024)
|
| 52 |
+
total_mb = city_total / (1024 * 1024)
|
| 53 |
+
total_gb = city_total / (1024 * 1024 * 1024)
|
| 54 |
+
|
| 55 |
+
print(f"{location:<12} {n_tiles:>8} {merged_mb:>12.1f} {tiles_mb:>12.1f} {total_mb:>12.1f} {total_gb:>10.2f}")
|
| 56 |
+
|
| 57 |
+
total_size += city_total
|
| 58 |
+
total_tiles += n_tiles
|
| 59 |
+
|
| 60 |
+
results[location] = {
|
| 61 |
+
"n_tiles": n_tiles,
|
| 62 |
+
"merged_mb": round(merged_mb, 2),
|
| 63 |
+
"tiles_mb": round(tiles_mb, 2),
|
| 64 |
+
"total_mb": round(total_mb, 2),
|
| 65 |
+
"total_gb": round(total_gb, 2)
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
print("-" * 80)
|
| 69 |
+
total_mb = total_size / (1024 * 1024)
|
| 70 |
+
total_gb = total_size / (1024 * 1024 * 1024)
|
| 71 |
+
print(f"{'TOTAL':<12} {total_tiles:>8} {'---':>12} {'---':>12} {total_mb:>12.1f} {total_gb:>10.2f}")
|
| 72 |
+
print("=" * 80)
|
| 73 |
+
|
| 74 |
+
# Save to JSON
|
| 75 |
+
output_path = data_path.parent / "size_report.json"
|
| 76 |
+
with open(output_path, 'w') as f:
|
| 77 |
+
json.dump({
|
| 78 |
+
"per_city": results,
|
| 79 |
+
"total_tiles": total_tiles,
|
| 80 |
+
"total_mb": round(total_mb, 2),
|
| 81 |
+
"total_gb": round(total_gb, 2)
|
| 82 |
+
}, f, indent=2)
|
| 83 |
+
|
| 84 |
+
print(f"\n✅ Size report saved to: {output_path}")
|
scripts/metadata_update_createcsv.py
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#%%
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
import pandas as pd
|
| 4 |
+
import rasterio
|
| 5 |
+
from rasterio.warp import transform_bounds
|
| 6 |
+
|
| 7 |
+
#%%
|
| 8 |
+
# IMPORTS
|
| 9 |
+
DATA_FOLDER = Path("/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/data")
|
| 10 |
+
|
| 11 |
+
REGIONS = {'ATA_MV', 'BRA_SP', 'CHN_WS', 'ESP_EH', 'FIN_LM', 'GER_BN', 'IDN_SV', 'KAZ_AC', 'KSA_WA', 'NAM_HF', 'NZL_KP', 'PHL_TA', 'USA_GC'}
|
| 12 |
+
|
| 13 |
+
#%%
|
| 14 |
+
|
| 15 |
+
dict_profile = {
|
| 16 |
+
"region": [],
|
| 17 |
+
"file_size_mb": [],
|
| 18 |
+
"nodata": [],
|
| 19 |
+
"crs": [],
|
| 20 |
+
"dtype": [],
|
| 21 |
+
"resolution":[],
|
| 22 |
+
"width": [],
|
| 23 |
+
"heigth": [],
|
| 24 |
+
"n_tiles": [],
|
| 25 |
+
"tile_size": [],
|
| 26 |
+
"x_min": [],
|
| 27 |
+
"x_max": [],
|
| 28 |
+
"y_min": [],
|
| 29 |
+
"y_max": [],
|
| 30 |
+
"long_min": [],
|
| 31 |
+
"long_max": [],
|
| 32 |
+
"lat_min": [],
|
| 33 |
+
"lat_max": [],
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
#%%
|
| 37 |
+
for region in REGIONS:
|
| 38 |
+
|
| 39 |
+
# Get merged file size
|
| 40 |
+
tif_path = Path(DATA_FOLDER, f"{region}/{region}.tif")
|
| 41 |
+
file_size = tif_path.stat().st_size / (10**6)
|
| 42 |
+
|
| 43 |
+
# Get raster profile and bounds
|
| 44 |
+
with rasterio.open(tif_path) as src:
|
| 45 |
+
profile = src.profile
|
| 46 |
+
bounds = src.bounds
|
| 47 |
+
try:
|
| 48 |
+
lonlat_bounds = transform_bounds(src.crs, "EPSG:4326", *bounds)
|
| 49 |
+
except:
|
| 50 |
+
lonlat_bounds = transform_bounds("EPSG:25832", "EPSG:4326", *bounds)
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
# Get number of tiles
|
| 54 |
+
tile_path = Path(DATA_FOLDER, f"{region}/tiles")
|
| 55 |
+
n_tiles = len(list(tile_path.glob("*.tif")))
|
| 56 |
+
|
| 57 |
+
# Get tile size
|
| 58 |
+
tile0 = list(tile_path.glob("*.tif"))[0]
|
| 59 |
+
with rasterio.open(tile0) as src:
|
| 60 |
+
tile_size = src.width
|
| 61 |
+
|
| 62 |
+
# Update dictionary
|
| 63 |
+
dict_profile['region'].append(region)
|
| 64 |
+
dict_profile['file_size_mb'].append(file_size)
|
| 65 |
+
dict_profile['nodata'].append(profile.get('nodata'))
|
| 66 |
+
dict_profile['crs'].append(str(profile['crs']))
|
| 67 |
+
dict_profile['dtype'].append(profile['dtype'])
|
| 68 |
+
dict_profile['resolution'].append(profile['transform'][0])
|
| 69 |
+
dict_profile['width'].append(profile['width'])
|
| 70 |
+
dict_profile['heigth'].append(profile['height'])
|
| 71 |
+
dict_profile['n_tiles'].append(n_tiles)
|
| 72 |
+
dict_profile['tile_size'].append(tile_size)
|
| 73 |
+
dict_profile['x_min'].append(bounds.left)
|
| 74 |
+
dict_profile['x_max'].append(bounds.right)
|
| 75 |
+
dict_profile['y_min'].append(bounds.bottom)
|
| 76 |
+
dict_profile['y_max'].append(bounds.top)
|
| 77 |
+
dict_profile['long_min'].append(lonlat_bounds[0])
|
| 78 |
+
dict_profile['long_max'].append(lonlat_bounds[2])
|
| 79 |
+
dict_profile['lat_min'].append(lonlat_bounds[1])
|
| 80 |
+
dict_profile['lat_max'].append(lonlat_bounds[3])
|
| 81 |
+
|
| 82 |
+
#%%
|
| 83 |
+
# Create DataFrame
|
| 84 |
+
df = pd.DataFrame(dict_profile)
|
| 85 |
+
print(df)
|
| 86 |
+
# %%
|
| 87 |
+
|
| 88 |
+
df.to_csv(Path(DATA_FOLDER, "metadadata.csv"))
|
| 89 |
+
|
| 90 |
+
# %%
|
scripts/metadata_update_info.py
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""
|
| 3 |
+
Update GeoMatch-DEM metadata JSON files from a CSV summary.
|
| 4 |
+
|
| 5 |
+
Usage:
|
| 6 |
+
python update_metadata_from_csv.py <csv_file> <metadata_dir> [--fix-ata-mv]
|
| 7 |
+
|
| 8 |
+
The script reads a CSV with raster-derived statistics and updates the
|
| 9 |
+
corresponding *_metadata.json files in-place (with backup).
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import argparse
|
| 13 |
+
import csv
|
| 14 |
+
import json
|
| 15 |
+
import shutil
|
| 16 |
+
from pathlib import Path
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def fix_ata_mv_processing(json_data: dict) -> dict:
|
| 20 |
+
"""
|
| 21 |
+
ATA_MV_metadata.json has a syntax error: the 'processing' section is
|
| 22 |
+
missing its opening key and 'pipeline' array. This reconstructs it
|
| 23 |
+
from the trailing fields that are present in the file.
|
| 24 |
+
"""
|
| 25 |
+
if "processing" in json_data:
|
| 26 |
+
return json_data
|
| 27 |
+
|
| 28 |
+
# Reconstruct processing section based on file notes and sibling files
|
| 29 |
+
json_data["processing"] = {
|
| 30 |
+
"software": "PDAL",
|
| 31 |
+
"software_version": "2.6.0",
|
| 32 |
+
"python_version": "3.10.20",
|
| 33 |
+
"pipeline": [
|
| 34 |
+
{
|
| 35 |
+
"stage": "readers.las",
|
| 36 |
+
"description": "Read LAZ point cloud"
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"stage": "writers.gdal",
|
| 40 |
+
"description": "Rasterize to DSM (max height per cell)",
|
| 41 |
+
"parameters": {
|
| 42 |
+
"resolution": json_data["raster"]["resolution_meters"],
|
| 43 |
+
"output_type": "max",
|
| 44 |
+
"data_type": "float32",
|
| 45 |
+
"nodata": -9999,
|
| 46 |
+
"gdalopts": "COMPRESS=DEFLATE|TILED=YES|BIGTIFF=YES|BLOCKXSIZE=256|BLOCKYSIZE=256",
|
| 47 |
+
"override_srs": json_data["spatial"]["crs"]["name"]
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
],
|
| 51 |
+
"output_type": "max",
|
| 52 |
+
"gdal_options": "COMPRESS=DEFLATE|TILED=YES|BIGTIFF=YES|BLOCKXSIZE=256|BLOCKYSIZE=256",
|
| 53 |
+
"resampling": "none",
|
| 54 |
+
"patch_extraction": {
|
| 55 |
+
"method": "grid_split",
|
| 56 |
+
"patch_size": [256, 256],
|
| 57 |
+
"overlap": 0,
|
| 58 |
+
"resampling": "none"
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
return json_data
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
def parse_csv(csv_path: Path) -> dict[str, dict]:
|
| 65 |
+
"""Read CSV and return dict keyed by region code."""
|
| 66 |
+
rows = {}
|
| 67 |
+
with open(csv_path, "r", encoding="utf-8", newline="") as f:
|
| 68 |
+
reader = csv.DictReader(f)
|
| 69 |
+
for row in reader:
|
| 70 |
+
region = row["region"]
|
| 71 |
+
rows[region] = row
|
| 72 |
+
return rows
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
def update_json_from_csv(json_data: dict, csv_row: dict) -> dict:
|
| 76 |
+
"""
|
| 77 |
+
Update JSON metadata with values derived from the actual raster file.
|
| 78 |
+
|
| 79 |
+
Mapping:
|
| 80 |
+
CSV field -> JSON path
|
| 81 |
+
---------------- --------------------------------------------
|
| 82 |
+
file_size_mb -> (new top-level field, not in schema)
|
| 83 |
+
nodata -> raster.nodata_value
|
| 84 |
+
crs -> spatial.crs (parsed for EPSG code)
|
| 85 |
+
dtype -> raster.data_type
|
| 86 |
+
resolution -> raster.resolution_meters
|
| 87 |
+
width -> spatial.tile_index.tile_size_pixels[0] (or new field)
|
| 88 |
+
heigth -> spatial.tile_index.tile_size_pixels[1] (or new field)
|
| 89 |
+
n_tiles -> spatial.tile_index.n_tiles
|
| 90 |
+
tile_size -> spatial.tile_index.tile_size_pixels
|
| 91 |
+
x_min, x_max -> spatial.extent.bbox[0], bbox[2]
|
| 92 |
+
y_min, y_max -> spatial.extent.bbox[1], bbox[3]
|
| 93 |
+
long_min, long_max -> spatial.extent.bbox_min_x/max_x (in degrees)
|
| 94 |
+
lat_min, lat_max -> spatial.extent.bbox_min_y/max_y (in degrees)
|
| 95 |
+
"""
|
| 96 |
+
|
| 97 |
+
# --- spatial.extent ---
|
| 98 |
+
extent = json_data.setdefault("spatial", {}).setdefault("extent", {})
|
| 99 |
+
|
| 100 |
+
# UTM bounds from CSV (projected coordinates)
|
| 101 |
+
x_min = float(csv_row["x_min"])
|
| 102 |
+
x_max = float(csv_row["x_max"])
|
| 103 |
+
y_min = float(csv_row["y_min"])
|
| 104 |
+
y_max = float(csv_row["y_max"])
|
| 105 |
+
|
| 106 |
+
extent["bbox"] = [x_min, y_min, x_max, y_max]
|
| 107 |
+
#extent["bbox_min_x"] = x_min
|
| 108 |
+
#extent["bbox_min_y"] = y_min
|
| 109 |
+
#extent["bbox_max_x"] = x_max
|
| 110 |
+
#extent["bbox_max_y"] = y_max
|
| 111 |
+
|
| 112 |
+
# Geographic bounds (lat/lon) - stored alongside projected bounds
|
| 113 |
+
# Note: The JSON schema doesn't have dedicated lat/lon bbox fields,
|
| 114 |
+
# so we add them as new fields in extent
|
| 115 |
+
extent["bbox_lonlat"] = [
|
| 116 |
+
float(csv_row["long_min"]),
|
| 117 |
+
float(csv_row["lat_min"]),
|
| 118 |
+
float(csv_row["long_max"]),
|
| 119 |
+
float(csv_row["lat_max"])
|
| 120 |
+
]
|
| 121 |
+
#extent["lon_min"] = float(csv_row["long_min"])
|
| 122 |
+
#extent["lon_max"] = float(csv_row["long_max"])
|
| 123 |
+
#extent["lat_min"] = float(csv_row["lat_min"])
|
| 124 |
+
#extent["lat_max"] = float(csv_row["lat_max"])
|
| 125 |
+
|
| 126 |
+
# --- spatial.tile_index ---
|
| 127 |
+
tile_index = json_data.setdefault("spatial", {}).setdefault("tile_index", {})
|
| 128 |
+
tile_index["n_tiles"] = int(csv_row["n_tiles"])
|
| 129 |
+
|
| 130 |
+
# Tile size in pixels from CSV
|
| 131 |
+
tile_size_px = int(csv_row["tile_size"])
|
| 132 |
+
tile_index["tile_size_pixels"] = [tile_size_px, tile_size_px]
|
| 133 |
+
|
| 134 |
+
# Tile size in meters: resolution * tile_size_pixels
|
| 135 |
+
resolution = float(csv_row["resolution"])
|
| 136 |
+
tile_size_m = resolution * tile_size_px
|
| 137 |
+
tile_index["tile_size_meters"] = [tile_size_m, tile_size_m]
|
| 138 |
+
|
| 139 |
+
# --- raster ---
|
| 140 |
+
raster = json_data.setdefault("raster", {})
|
| 141 |
+
raster["data_type"] = csv_row["dtype"]
|
| 142 |
+
raster["nodata_value"] = float(csv_row["nodata"])
|
| 143 |
+
raster["resolution_meters"] = resolution
|
| 144 |
+
|
| 145 |
+
# Internal tile dimensions (GeoTIFF block size)
|
| 146 |
+
raster["tile_dimensions"] = [tile_size_px, tile_size_px]
|
| 147 |
+
|
| 148 |
+
# --- spatial.crs ---
|
| 149 |
+
# Parse EPSG from the CRS WKT string in CSV
|
| 150 |
+
crs_str = csv_row["crs"]
|
| 151 |
+
epsg_code = extract_epsg_from_crs(crs_str)
|
| 152 |
+
if epsg_code:
|
| 153 |
+
json_data["spatial"]["crs"]["epsg"] = epsg_code
|
| 154 |
+
json_data["spatial"]["crs"]["name"] = f"EPSG:{epsg_code}"
|
| 155 |
+
|
| 156 |
+
# --- Add file_size_mb as a new top-level convenience field ---
|
| 157 |
+
json_data["file_size_mb"] = float(csv_row["file_size_mb"])
|
| 158 |
+
|
| 159 |
+
return json_data
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
def extract_epsg_from_crs(crs_str: str) -> int | None:
|
| 163 |
+
"""Extract EPSG code from WKT or EPSG:xxxx string."""
|
| 164 |
+
if crs_str.startswith("EPSG:"):
|
| 165 |
+
try:
|
| 166 |
+
return int(crs_str.split(":")[1])
|
| 167 |
+
except (IndexError, ValueError):
|
| 168 |
+
pass
|
| 169 |
+
|
| 170 |
+
# Try to find AUTHORITY["EPSG","xxxx"] pattern in WKT
|
| 171 |
+
import re
|
| 172 |
+
matches = re.findall(r'AUTHORITY\["EPSG","(\d+)"\]', crs_str)
|
| 173 |
+
if matches:
|
| 174 |
+
# Return the last match (usually the projection CRS, not datum/spheroid)
|
| 175 |
+
return int(matches[-1])
|
| 176 |
+
|
| 177 |
+
# Try COMPD_CS or PROJCS with EPSG in name
|
| 178 |
+
match = re.search(r'EPSG[:\s]*(\d+)', crs_str)
|
| 179 |
+
if match:
|
| 180 |
+
return int(match.group(1))
|
| 181 |
+
|
| 182 |
+
return None
|
| 183 |
+
|
| 184 |
+
|
| 185 |
+
def load_json_robust(path: Path, fix_ata_mv: bool = False) -> dict:
|
| 186 |
+
"""Load JSON, with optional repair for known-broken ATA_MV file."""
|
| 187 |
+
with open(path, "r", encoding="utf-8") as f:
|
| 188 |
+
content = f.read()
|
| 189 |
+
|
| 190 |
+
try:
|
| 191 |
+
data = json.loads(content)
|
| 192 |
+
except json.JSONDecodeError as e:
|
| 193 |
+
raise
|
| 194 |
+
|
| 195 |
+
if fix_ata_mv and "ATA_MV" in path.name:
|
| 196 |
+
data = fix_ata_mv_processing(data)
|
| 197 |
+
|
| 198 |
+
return data
|
| 199 |
+
|
| 200 |
+
|
| 201 |
+
|
| 202 |
+
def main():
|
| 203 |
+
REGIONS = {'ATA_MV', 'BRA_SP', 'CHN_WS', 'ESP_EH', 'FIN_LM', 'GER_BN', 'IDN_SV', 'KAZ_AC', 'KSA_WA', 'NAM_HF', 'NZL_KP', 'PHL_TA', 'USA_GC'}
|
| 204 |
+
|
| 205 |
+
csv_file = '/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/data/metadadata.csv'
|
| 206 |
+
dry_run = False
|
| 207 |
+
fix_ata_mv = False
|
| 208 |
+
for region in REGIONS:
|
| 209 |
+
metadata_dir = Path(f"/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/data/{region}/metadata")
|
| 210 |
+
|
| 211 |
+
csv_rows = parse_csv(csv_file)
|
| 212 |
+
print(f"Loaded {len(csv_rows)} rows from CSV")
|
| 213 |
+
|
| 214 |
+
json_files = sorted(metadata_dir.glob("*_metadata.json"))
|
| 215 |
+
print(f"Found {len(json_files)} metadata JSON files")
|
| 216 |
+
|
| 217 |
+
for json_path in json_files:
|
| 218 |
+
region = json_path.stem.replace("_metadata", "")
|
| 219 |
+
if region not in csv_rows:
|
| 220 |
+
print(f" ⚠ No CSV row for {region}, skipping")
|
| 221 |
+
|
| 222 |
+
continue
|
| 223 |
+
|
| 224 |
+
print(f" Processing {region}...")
|
| 225 |
+
|
| 226 |
+
# Load JSON (with repair if needed)
|
| 227 |
+
json_data = load_json_robust(json_path, fix_ata_mv=fix_ata_mv)
|
| 228 |
+
|
| 229 |
+
# Apply CSV updates
|
| 230 |
+
updated = update_json_from_csv(json_data, csv_rows[region])
|
| 231 |
+
|
| 232 |
+
# Write back
|
| 233 |
+
if not dry_run:
|
| 234 |
+
backup_path = json_path.with_suffix(".json.bak")
|
| 235 |
+
shutil.copy2(json_path, backup_path)
|
| 236 |
+
|
| 237 |
+
with open(json_path, "w", encoding="utf-8") as f:
|
| 238 |
+
json.dump(updated, f, indent=2, ensure_ascii=False)
|
| 239 |
+
f.write("\n")
|
| 240 |
+
|
| 241 |
+
print(f" ✓ Updated {json_path.name}")
|
| 242 |
+
else:
|
| 243 |
+
print(f" [dry-run] Would update {json_path.name}")
|
| 244 |
+
# Print key changes for verification
|
| 245 |
+
print(f" file_size_mb: {updated.get('file_size_mb')}")
|
| 246 |
+
print(f" n_tiles: {updated['spatial']['tile_index']['n_tiles']}")
|
| 247 |
+
print(f" resolution: {updated['raster']['resolution_meters']}")
|
| 248 |
+
print(f" extent bbox: {updated['spatial']['extent']['bbox']}")
|
| 249 |
+
|
| 250 |
+
print("Done!")
|
| 251 |
+
|
| 252 |
+
|
| 253 |
+
if __name__ == "__main__":
|
| 254 |
+
main()
|
scripts/process_las.py
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from pathlib import Path
|
| 2 |
+
import zipfile
|
| 3 |
+
from tqdm import tqdm
|
| 4 |
+
import json
|
| 5 |
+
import pdal
|
| 6 |
+
import time
|
| 7 |
+
|
| 8 |
+
#======================================================
|
| 9 |
+
#%%
|
| 10 |
+
|
| 11 |
+
KEY_ID = "IRN_JJ"
|
| 12 |
+
dirlaz = Path("/home/sabrina/Documents/Datasets/IRN_JJ")
|
| 13 |
+
OUT_RESOLUTION = 1.5
|
| 14 |
+
|
| 15 |
+
#======================================================
|
| 16 |
+
#%%
|
| 17 |
+
dirdem = Path(dirlaz, "dem")
|
| 18 |
+
dirdem.mkdir(exist_ok=True, parents=True)
|
| 19 |
+
|
| 20 |
+
filelaz = list(dirlaz.glob("*.laz"))
|
| 21 |
+
print(f"Found {len(filelaz)} LAZ files.")
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
#======================================================
|
| 25 |
+
def laz_to_dem(key_id, input_laz: Path, output_tif: Path, resolution=1.0):
|
| 26 |
+
"""
|
| 27 |
+
Convert a single LAZ file to DEM using PDAL.
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
if key_id == "KAZ-AC" :
|
| 31 |
+
pipeline = [ # PLEIADES DATA DO NOT USE SIMPLE MORPHOLOGICAL FILTER (SMRF)
|
| 32 |
+
{
|
| 33 |
+
"type": "readers.las",
|
| 34 |
+
"filename": str(input_laz),
|
| 35 |
+
"spatialreference": "EPSG:32643"
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "writers.gdal",
|
| 39 |
+
"filename": str(output_tif),
|
| 40 |
+
"resolution": resolution,
|
| 41 |
+
"output_type": "max",
|
| 42 |
+
"data_type": "float32",
|
| 43 |
+
"nodata": -9999,
|
| 44 |
+
"gdalopts": "COMPRESS=DEFLATE|TILED=YES"
|
| 45 |
+
}
|
| 46 |
+
]
|
| 47 |
+
elif key_id == 'BRA-SP':
|
| 48 |
+
pipeline = [ # AIRBORNE DATA USE SMRF
|
| 49 |
+
{
|
| 50 |
+
"type": "readers.las",
|
| 51 |
+
"filename": str(input_laz)
|
| 52 |
+
},
|
| 53 |
+
{
|
| 54 |
+
"type": "filters.smrf",
|
| 55 |
+
"scalar": 1.25,
|
| 56 |
+
"slope": 0.15,
|
| 57 |
+
"threshold": 0.5,
|
| 58 |
+
"window": 16.0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "writers.gdal",
|
| 62 |
+
"filename": str(output_tif),
|
| 63 |
+
"resolution": resolution,
|
| 64 |
+
"output_type": "max", # highest surface elevation per pixel
|
| 65 |
+
"data_type": "float32",
|
| 66 |
+
"nodata": -9999
|
| 67 |
+
}
|
| 68 |
+
]
|
| 69 |
+
|
| 70 |
+
elif key_id == 'CHN-YG':
|
| 71 |
+
pipeline = [
|
| 72 |
+
{
|
| 73 |
+
"type": "readers.las",
|
| 74 |
+
"filename": str(input_laz),
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"type": "filters.range",
|
| 78 |
+
"limits": "Classification![7:7]"
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"type": "filters.outlier",
|
| 82 |
+
# Optional: SfM point clouds often contain isolated spurious points
|
| 83 |
+
# above/below the surface that are not flagged as Class 7.
|
| 84 |
+
# This applies a statistical filter (radius 1.0 m, 6 neighbours).
|
| 85 |
+
"method": "statistical",
|
| 86 |
+
"mean_k": 6,
|
| 87 |
+
"multiplier": 2.0
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"type": "writers.gdal",
|
| 91 |
+
"filename": str(output_tif),
|
| 92 |
+
"resolution": resolution,
|
| 93 |
+
"output_type": "max", # DSM: highest point per cell
|
| 94 |
+
"data_type": "float32",
|
| 95 |
+
"nodata": -9999,
|
| 96 |
+
"gdalopts": "COMPRESS=DEFLATE|TILED=YES|BIGTIFF=YES",
|
| 97 |
+
"override_srs": "EPSG:32648"
|
| 98 |
+
}
|
| 99 |
+
]
|
| 100 |
+
elif key_id == 'IRN_JJ':
|
| 101 |
+
pipeline = [
|
| 102 |
+
{
|
| 103 |
+
"type": "readers.las",
|
| 104 |
+
"filename": str(input_laz),
|
| 105 |
+
},
|
| 106 |
+
{
|
| 107 |
+
"type": "filters.assign",
|
| 108 |
+
# The metadata shows Class 0 only (Created, never classified).
|
| 109 |
+
# No noise class exists, so we skip filters.range.
|
| 110 |
+
# This filter is a no-op placeholder for clarity.
|
| 111 |
+
"assignment": "Classification[:]=0"
|
| 112 |
+
},
|
| 113 |
+
{
|
| 114 |
+
"type": "filters.outlier",
|
| 115 |
+
"method": "statistical",
|
| 116 |
+
"mean_k": 6,
|
| 117 |
+
"multiplier": 2.0
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "writers.gdal",
|
| 121 |
+
"filename": str(output_tif),
|
| 122 |
+
"resolution": resolution,
|
| 123 |
+
"output_type": "max", # DSM: highest point per cell
|
| 124 |
+
"data_type": "float32",
|
| 125 |
+
"nodata": -9999,
|
| 126 |
+
"gdalopts": "COMPRESS=DEFLATE|TILED=YES|BIGTIFF=YES",
|
| 127 |
+
}
|
| 128 |
+
]
|
| 129 |
+
else:
|
| 130 |
+
print("Worng key id")
|
| 131 |
+
quit
|
| 132 |
+
|
| 133 |
+
p = pdal.Pipeline(json.dumps(pipeline))
|
| 134 |
+
p.execute()
|
| 135 |
+
|
| 136 |
+
#======================================================
|
| 137 |
+
def batch_laz_to_dem(input_dir, output_dir, key_id, resolution=1.0):
|
| 138 |
+
input_dir = Path(input_dir)
|
| 139 |
+
output_dir = Path(output_dir)
|
| 140 |
+
output_dir.mkdir(parents=True, exist_ok=True)
|
| 141 |
+
|
| 142 |
+
laz_files = list(input_dir.glob("*.laz")) + list(input_dir.glob("*.las"))
|
| 143 |
+
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
for laz in tqdm(laz_files):
|
| 147 |
+
out_tif = output_dir / f"{laz.stem}.tif"
|
| 148 |
+
|
| 149 |
+
if Path(out_tif).exists == True:
|
| 150 |
+
print("File exists")
|
| 151 |
+
continue
|
| 152 |
+
|
| 153 |
+
else:
|
| 154 |
+
print(f"Processing: {laz.name}")
|
| 155 |
+
try:
|
| 156 |
+
laz_to_dem(input_laz=laz, output_tif= out_tif, resolution=resolution, key_id= key_id)
|
| 157 |
+
except Exception as e:
|
| 158 |
+
print(f"Error processing {laz.name}: {e}")
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
#======================================================
|
| 162 |
+
batch_laz_to_dem(input_dir = dirlaz,
|
| 163 |
+
output_dir = dirdem,
|
| 164 |
+
key_id = KEY_ID,
|
| 165 |
+
resolution = OUT_RESOLUTION)
|
scripts/write_qgis_metadata.py
ADDED
|
@@ -0,0 +1,325 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import xml.etree.ElementTree as ET
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
import json
|
| 4 |
+
|
| 5 |
+
areas = {'ATA_MV', 'BRA_SP', 'CHN_WS', 'ESP_EH', 'FIN_LM', 'GER_BN', 'IDN_SV',
|
| 6 |
+
'KAZ_AC', 'KSA_WA', 'NAM_HF', 'NZL_KP', 'PHL_TA', 'USA_GC'}
|
| 7 |
+
|
| 8 |
+
data_path = Path("/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/")
|
| 9 |
+
metadata_path = Path("/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/city_metadata/")
|
| 10 |
+
|
| 11 |
+
# Load all metadata
|
| 12 |
+
all_metadata = {}
|
| 13 |
+
for location in areas:
|
| 14 |
+
meta_file = metadata_path / f"{location}_metadata.json"
|
| 15 |
+
if meta_file.exists():
|
| 16 |
+
with open(meta_file, 'r') as f:
|
| 17 |
+
all_metadata[location] = json.load(f)
|
| 18 |
+
|
| 19 |
+
print("=" * 70)
|
| 20 |
+
print("MatchGeo-DEM Complete QGIS .qmd Metadata Writer")
|
| 21 |
+
print("=" * 70)
|
| 22 |
+
|
| 23 |
+
for location in sorted(areas):
|
| 24 |
+
if location not in all_metadata:
|
| 25 |
+
print(f"\n⚠️ {location}: Metadata JSON not found — skipping")
|
| 26 |
+
continue
|
| 27 |
+
|
| 28 |
+
meta = all_metadata[location]
|
| 29 |
+
|
| 30 |
+
# Create QGIS metadata XML
|
| 31 |
+
root = ET.Element("qgis")
|
| 32 |
+
root.set("version", "3.40")
|
| 33 |
+
|
| 34 |
+
# IDENTIFICATION
|
| 35 |
+
ident = ET.SubElement(root, "identifier")
|
| 36 |
+
ident.text = meta["identification"]["tile_id"]
|
| 37 |
+
|
| 38 |
+
parent_ident = ET.SubElement(root, "parentidentifier")
|
| 39 |
+
parent_ident.text = "10.5281/zenodo.21229785"
|
| 40 |
+
|
| 41 |
+
lang = ET.SubElement(root, "language")
|
| 42 |
+
lang.text = "en-US"
|
| 43 |
+
|
| 44 |
+
type_el = ET.SubElement(root, "type")
|
| 45 |
+
type_el.text = "dataset"
|
| 46 |
+
|
| 47 |
+
title = ET.SubElement(root, "title")
|
| 48 |
+
title.text = f"MatchGeo-DEM: {meta['identification']['full_name']}"
|
| 49 |
+
|
| 50 |
+
abstract = ET.SubElement(root, "abstract")
|
| 51 |
+
abstract_text = (
|
| 52 |
+
f"Digital Surface Model (DSM) from {meta['acquisition']['source']}. "
|
| 53 |
+
f"Resolution: {meta['raster']['resolution_meters']}m. "
|
| 54 |
+
f"Method: {meta['acquisition']['method']}. "
|
| 55 |
+
f"Year: {meta['acquisition']['date_start'][:4]}-{meta['acquisition']['date_end'][:4]}. "
|
| 56 |
+
f"CRS: {meta['spatial']['crs']['name']}. "
|
| 57 |
+
f"NoData: {meta['raster']['nodata_value']}. "
|
| 58 |
+
f"Format: {meta['raster']['tiff_variant']}, {meta['raster']['compression']} compressed. "
|
| 59 |
+
f"Tiles: {meta['spatial']['tile_index']['n_tiles']} patches of 333x333 pixels. "
|
| 60 |
+
f"{meta.get('notes', '')}"
|
| 61 |
+
)
|
| 62 |
+
abstract.text = abstract_text
|
| 63 |
+
|
| 64 |
+
# CONTACTS
|
| 65 |
+
contacts = ET.SubElement(root, "contacts")
|
| 66 |
+
contact = ET.SubElement(contacts, "contact")
|
| 67 |
+
|
| 68 |
+
c_name = ET.SubElement(contact, "name")
|
| 69 |
+
c_name.text = "Sabrina Correa"
|
| 70 |
+
|
| 71 |
+
c_org = ET.SubElement(contact, "organization")
|
| 72 |
+
c_org.text = "Universidade Federal de Vicosa"
|
| 73 |
+
|
| 74 |
+
c_pos = ET.SubElement(contact, "position")
|
| 75 |
+
c_pos.text = "Dataset Maintainer"
|
| 76 |
+
|
| 77 |
+
c_voice = ET.SubElement(contact, "voice")
|
| 78 |
+
c_voice.text = ""
|
| 79 |
+
|
| 80 |
+
c_fax = ET.SubElement(contact, "fax")
|
| 81 |
+
c_fax.text = ""
|
| 82 |
+
|
| 83 |
+
c_email = ET.SubElement(contact, "email")
|
| 84 |
+
c_email.text = "sabrina.correa@ufv.br"
|
| 85 |
+
|
| 86 |
+
c_role = ET.SubElement(contact, "role")
|
| 87 |
+
c_role.text = "distributor"
|
| 88 |
+
|
| 89 |
+
# Also add original data provider as second contact
|
| 90 |
+
contact2 = ET.SubElement(contacts, "contact")
|
| 91 |
+
c2_name = ET.SubElement(contact2, "name")
|
| 92 |
+
c2_name.text = meta["acquisition"]["provider"]
|
| 93 |
+
c2_org = ET.SubElement(contact2, "organization")
|
| 94 |
+
c2_org.text = meta["acquisition"]["source"]
|
| 95 |
+
c2_pos = ET.SubElement(contact2, "position")
|
| 96 |
+
c2_pos.text = "Original Data Provider"
|
| 97 |
+
c2_voice = ET.SubElement(contact2, "voice")
|
| 98 |
+
c2_voice.text = ""
|
| 99 |
+
c2_fax = ET.SubElement(contact2, "fax")
|
| 100 |
+
c2_fax.text = ""
|
| 101 |
+
c2_email = ET.SubElement(contact2, "email")
|
| 102 |
+
c2_email.text = ""
|
| 103 |
+
c2_role = ET.SubElement(contact2, "role")
|
| 104 |
+
c2_role.text = "owner"
|
| 105 |
+
|
| 106 |
+
# LINKS
|
| 107 |
+
links = ET.SubElement(root, "links")
|
| 108 |
+
|
| 109 |
+
# Source link
|
| 110 |
+
link1 = ET.SubElement(links, "link")
|
| 111 |
+
l1_name = ET.SubElement(link1, "name")
|
| 112 |
+
l1_name.text = "Original Data Source"
|
| 113 |
+
l1_type = ET.SubElement(link1, "type")
|
| 114 |
+
l1_type.text = "WWW:LINK-1.0-http--link"
|
| 115 |
+
l1_url = ET.SubElement(link1, "url")
|
| 116 |
+
l1_url.text = meta["acquisition"]["url"]
|
| 117 |
+
l1_desc = ET.SubElement(link1, "description")
|
| 118 |
+
l1_desc.text = f"Official portal for {meta['acquisition']['source']}"
|
| 119 |
+
l1_format = ET.SubElement(link1, "format")
|
| 120 |
+
l1_format.text = "HTML"
|
| 121 |
+
l1_mime = ET.SubElement(link1, "mimeType")
|
| 122 |
+
l1_mime.text = "text/html"
|
| 123 |
+
l1_size = ET.SubElement(link1, "size")
|
| 124 |
+
l1_size.text = ""
|
| 125 |
+
|
| 126 |
+
# DOI link
|
| 127 |
+
doi = meta["acquisition"].get("doi", "10.5281/zenodo.19339008")
|
| 128 |
+
link2 = ET.SubElement(links, "link")
|
| 129 |
+
l2_name = ET.SubElement(link2, "name")
|
| 130 |
+
l2_name.text = "Dataset DOI"
|
| 131 |
+
l2_type = ET.SubElement(link2, "type")
|
| 132 |
+
l2_type.text = "DOI"
|
| 133 |
+
l2_url = ET.SubElement(link2, "url")
|
| 134 |
+
l2_url.text = f"https://doi.org/{doi}"
|
| 135 |
+
l2_desc = ET.SubElement(link2, "description")
|
| 136 |
+
l2_desc.text = "MatchGeo-DEM dataset DOI"
|
| 137 |
+
l2_format = ET.SubElement(link2, "format")
|
| 138 |
+
l2_format.text = "HTML"
|
| 139 |
+
l2_mime = ET.SubElement(link2, "mimeType")
|
| 140 |
+
l2_mime.text = "text/html"
|
| 141 |
+
l2_size = ET.SubElement(link2, "size")
|
| 142 |
+
l2_size.text = ""
|
| 143 |
+
|
| 144 |
+
# License link
|
| 145 |
+
link3 = ET.SubElement(links, "link")
|
| 146 |
+
l3_name = ET.SubElement(link3, "name")
|
| 147 |
+
l3_name.text = "License (CC BY 4.0)"
|
| 148 |
+
l3_type = ET.SubElement(link3, "type")
|
| 149 |
+
l3_type.text = "WWW:LINK-1.0-http--link"
|
| 150 |
+
l3_url = ET.SubElement(link3, "url")
|
| 151 |
+
l3_url.text = "https://creativecommons.org/licenses/by/4.0/"
|
| 152 |
+
l3_desc = ET.SubElement(link3, "description")
|
| 153 |
+
l3_desc.text = "Creative Commons Attribution 4.0 International"
|
| 154 |
+
l3_format = ET.SubElement(link3, "format")
|
| 155 |
+
l3_format.text = "HTML"
|
| 156 |
+
l3_mime = ET.SubElement(link3, "mimeType")
|
| 157 |
+
l3_mime.text = "text/html"
|
| 158 |
+
l3_size = ET.SubElement(link3, "size")
|
| 159 |
+
l3_size.text = ""
|
| 160 |
+
|
| 161 |
+
# REMA documentation link (for ATA_MV)
|
| 162 |
+
if location == "ATA_MV":
|
| 163 |
+
link4 = ET.SubElement(links, "link")
|
| 164 |
+
l4_name = ET.SubElement(link4, "name")
|
| 165 |
+
l4_name.text = "REMA Documentation"
|
| 166 |
+
l4_type = ET.SubElement(link4, "type")
|
| 167 |
+
l4_type.text = "WWW:LINK-1.0-http--link"
|
| 168 |
+
l4_url = ET.SubElement(link4, "url")
|
| 169 |
+
l4_url.text = "https://www.pgc.umn.edu/data/rema/"
|
| 170 |
+
l4_desc = ET.SubElement(link4, "description")
|
| 171 |
+
l4_desc.text = "Reference Elevation Model of Antarctica documentation"
|
| 172 |
+
l4_format = ET.SubElement(link4, "format")
|
| 173 |
+
l4_format.text = "HTML"
|
| 174 |
+
l4_mime = ET.SubElement(link4, "mimeType")
|
| 175 |
+
l4_mime.text = "text/html"
|
| 176 |
+
l4_size = ET.SubElement(link4, "size")
|
| 177 |
+
l4_size.text = ""
|
| 178 |
+
|
| 179 |
+
# DATES
|
| 180 |
+
dates = ET.SubElement(root, "dates")
|
| 181 |
+
|
| 182 |
+
date_created = ET.SubElement(dates, "date")
|
| 183 |
+
date_created.set("type", "Created")
|
| 184 |
+
date_created.text = meta["acquisition"]["date_start"]
|
| 185 |
+
|
| 186 |
+
date_published = ET.SubElement(dates, "date")
|
| 187 |
+
date_published.set("type", "Published")
|
| 188 |
+
date_published.text = "2026-05-11"
|
| 189 |
+
|
| 190 |
+
date_revised = ET.SubElement(dates, "date")
|
| 191 |
+
date_revised.set("type", "Revised")
|
| 192 |
+
date_revised.text = "2026-05-11"
|
| 193 |
+
|
| 194 |
+
# FEES
|
| 195 |
+
fees = ET.SubElement(root, "fees")
|
| 196 |
+
fees.text = "None. This dataset is open access under CC BY 4.0."
|
| 197 |
+
|
| 198 |
+
# ENCODING
|
| 199 |
+
encoding = ET.SubElement(root, "encoding")
|
| 200 |
+
encoding.text = "UTF-8"
|
| 201 |
+
|
| 202 |
+
# CRS
|
| 203 |
+
crs = ET.SubElement(root, "crs")
|
| 204 |
+
spatialrefsys = ET.SubElement(crs, "spatialrefsys")
|
| 205 |
+
|
| 206 |
+
crs_native = ET.SubElement(spatialrefsys, "nativeFormat")
|
| 207 |
+
crs_native.text = "Wkt"
|
| 208 |
+
|
| 209 |
+
crs_wkt = ET.SubElement(spatialrefsys, "wkt")
|
| 210 |
+
crs_wkt.text = meta["spatial"]["crs"].get("wkt", "")
|
| 211 |
+
|
| 212 |
+
crs_desc = ET.SubElement(spatialrefsys, "description")
|
| 213 |
+
crs_desc.text = meta["spatial"]["crs"]["name"]
|
| 214 |
+
|
| 215 |
+
crs_type = ET.SubElement(spatialrefsys, "type")
|
| 216 |
+
crs_type.text = "crs"
|
| 217 |
+
|
| 218 |
+
# EXTENT
|
| 219 |
+
extent = ET.SubElement(root, "extent")
|
| 220 |
+
|
| 221 |
+
# Spatial extent
|
| 222 |
+
spatial = ET.SubElement(extent, "spatial")
|
| 223 |
+
spatial.set("crs", meta["spatial"]["crs"]["name"])
|
| 224 |
+
|
| 225 |
+
bbox = meta["spatial"]["extent"]["bbox"]
|
| 226 |
+
if bbox and None not in bbox:
|
| 227 |
+
spatial.set("dimensions", "2")
|
| 228 |
+
spatial.set("minx", str(bbox[0]))
|
| 229 |
+
spatial.set("miny", str(bbox[1]))
|
| 230 |
+
spatial.set("maxx", str(bbox[2]))
|
| 231 |
+
spatial.set("maxy", str(bbox[3]))
|
| 232 |
+
|
| 233 |
+
# Temporal extent
|
| 234 |
+
temporal = ET.SubElement(extent, "temporal")
|
| 235 |
+
temp_start = ET.SubElement(temporal, "start")
|
| 236 |
+
temp_start.text = meta["acquisition"]["date_start"]
|
| 237 |
+
temp_end = ET.SubElement(temporal, "end")
|
| 238 |
+
temp_end.text = meta["acquisition"]["date_end"]
|
| 239 |
+
|
| 240 |
+
# Vertical extent (Z min/max)
|
| 241 |
+
vertical = ET.SubElement(extent, "vertical")
|
| 242 |
+
# We don't have actual Z min/max per city, but we can leave it empty or estimate
|
| 243 |
+
vert_min = ET.SubElement(vertical, "minimum")
|
| 244 |
+
vert_min.text = "0"
|
| 245 |
+
vert_max = ET.SubElement(vertical, "maximum")
|
| 246 |
+
vert_max.text = "0"
|
| 247 |
+
vert_unit = ET.SubElement(vertical, "unit")
|
| 248 |
+
vert_unit.text = "meters"
|
| 249 |
+
|
| 250 |
+
# CATEGORIES
|
| 251 |
+
categories = ET.SubElement(root, "categories")
|
| 252 |
+
cat = ET.SubElement(categories, "category")
|
| 253 |
+
cat.text = "Elevation"
|
| 254 |
+
cat2 = ET.SubElement(categories, "category")
|
| 255 |
+
cat2.text = "Geoscientific Information"
|
| 256 |
+
|
| 257 |
+
# KEYWORDS
|
| 258 |
+
keywords = ET.SubElement(root, "keywords")
|
| 259 |
+
|
| 260 |
+
# Add vocabulary attribute for GCMD
|
| 261 |
+
vocab = ET.SubElement(keywords, "vocabulary")
|
| 262 |
+
vocab.set("name", "GCMD")
|
| 263 |
+
vocab.text = "EARTH SCIENCE > LAND SURFACE > TOPOGRAPHY > TERRAIN ELEVATION > DIGITAL ELEVATION/TERRAIN MODEL (DEM)"
|
| 264 |
+
|
| 265 |
+
for kw in meta["fair"]["findable"]["keywords"]:
|
| 266 |
+
kw_el = ET.SubElement(keywords, "keyword")
|
| 267 |
+
kw_el.text = kw
|
| 268 |
+
|
| 269 |
+
# Add extra keywords
|
| 270 |
+
extra_kws = ["DSM", "local feature matching", "computer vision", "urban terrain"]
|
| 271 |
+
for kw in extra_kws:
|
| 272 |
+
kw_el = ET.SubElement(keywords, "keyword")
|
| 273 |
+
kw_el.text = kw
|
| 274 |
+
|
| 275 |
+
# RIGHTS
|
| 276 |
+
rights = ET.SubElement(root, "rights")
|
| 277 |
+
rights.text = f"{meta['fair']['reusable']['license']}. You are free to share and adapt under attribution terms."
|
| 278 |
+
|
| 279 |
+
# LICENSE
|
| 280 |
+
license_el = ET.SubElement(root, "license")
|
| 281 |
+
license_el.text = "Creative Commons Attribution 4.0 International (CC BY 4.0)"
|
| 282 |
+
|
| 283 |
+
# HISTORY
|
| 284 |
+
history = ET.SubElement(root, "history")
|
| 285 |
+
hist_entry = ET.SubElement(history, "history")
|
| 286 |
+
hist_entry.text = (
|
| 287 |
+
f"Dataset created from {meta['acquisition']['source']} data. "
|
| 288 |
+
f"Processed with PDAL {meta['processing']['software_version']}. "
|
| 289 |
+
f"Patch extraction: 333x333 pixels. "
|
| 290 |
+
f"Released as MatchGeo-DEM v1.1 on 2026-05-11."
|
| 291 |
+
)
|
| 292 |
+
|
| 293 |
+
# CONSTRAINTS
|
| 294 |
+
constraints = ET.SubElement(root, "constraints")
|
| 295 |
+
|
| 296 |
+
# Use constraints
|
| 297 |
+
use_constraints = ET.SubElement(constraints, "constraint")
|
| 298 |
+
use_constraints.set("type", "Use")
|
| 299 |
+
use_constraints.text = "Attribution required. See LICENSE file or https://creativecommons.org/licenses/by/4.0/"
|
| 300 |
+
|
| 301 |
+
# Access constraints
|
| 302 |
+
access_constraints = ET.SubElement(constraints, "constraint")
|
| 303 |
+
access_constraints.set("type", "Access")
|
| 304 |
+
access_constraints.text = "Open access. No registration required."
|
| 305 |
+
|
| 306 |
+
# Write QMD file
|
| 307 |
+
qmd_path = data_path / f"{location}/{location}.qmd"
|
| 308 |
+
|
| 309 |
+
# Pretty print XML
|
| 310 |
+
ET.indent(root, space=" ")
|
| 311 |
+
tree = ET.ElementTree(root)
|
| 312 |
+
tree.write(qmd_path, encoding="utf-8", xml_declaration=True)
|
| 313 |
+
|
| 314 |
+
print(f"\n✅ {location}: Written {qmd_path}")
|
| 315 |
+
print(f" Title: {title.text[:50]}...")
|
| 316 |
+
print(f" Contacts: 2 (Maintainer + Data Provider)")
|
| 317 |
+
print(f" Links: 3+ (Source + DOI + License)")
|
| 318 |
+
print(f" Dates: Created, Published, Revised")
|
| 319 |
+
print(f" Categories: Elevation, Geoscientific Information")
|
| 320 |
+
print(f" Keywords: {len(meta['fair']['findable']['keywords']) + 4} total")
|
| 321 |
+
|
| 322 |
+
print("\n" + "=" * 70)
|
| 323 |
+
print("Done! Each .tif now has a matching .qmd with COMPLETE metadata.")
|
| 324 |
+
print("QGIS will auto-load the .qmd when you add the layer.")
|
| 325 |
+
print("=" * 70)
|
splits/split_manifest.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"seed": 42,
|
| 3 |
+
"ratios": {
|
| 4 |
+
"train": 0.8,
|
| 5 |
+
"validation": 0.1,
|
| 6 |
+
"test": 0.1
|
| 7 |
+
},
|
| 8 |
+
"total_tiles": 27268,
|
| 9 |
+
"splits": {
|
| 10 |
+
"train": 21810,
|
| 11 |
+
"validation": 2722,
|
| 12 |
+
"test": 2736
|
| 13 |
+
},
|
| 14 |
+
"files": {
|
| 15 |
+
"train": "/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/splits/train.csv",
|
| 16 |
+
"validation": "/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/splits/validation.csv",
|
| 17 |
+
"test": "/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/splits/test.csv"
|
| 18 |
+
}
|
| 19 |
+
}
|
splits/test.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
splits/train.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
splits/validation.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
stac/collection.json
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "Collection",
|
| 3 |
+
"stac_version": "1.0.0",
|
| 4 |
+
"id": "matchgeo-dem-v1",
|
| 5 |
+
"title": "MatchGeo: Multi-region DEM Dataset for Local Feature Matching",
|
| 6 |
+
"description": "MatchGeo is a curated, multi-region Digital Elevation Model (DEM) dataset designed for training and benchmarking local feature matching algorithms in urban and natural terrain analysis. It aggregates high-resolution elevation data from 13 distinct environments across 6 continents.",
|
| 7 |
+
"license": "CC-BY-4.0",
|
| 8 |
+
"keywords": [
|
| 9 |
+
"DEM",
|
| 10 |
+
"DSM",
|
| 11 |
+
"elevation",
|
| 12 |
+
"local feature matching",
|
| 13 |
+
"computer vision",
|
| 14 |
+
"geospatial",
|
| 15 |
+
"LiDAR",
|
| 16 |
+
"photogrammetry"
|
| 17 |
+
],
|
| 18 |
+
"providers": [
|
| 19 |
+
{
|
| 20 |
+
"name": "Correa, S. P. L. P.; Santos, A. de Paula; Oliveira, H. N.; Beltons, D.",
|
| 21 |
+
"roles": [
|
| 22 |
+
"producer",
|
| 23 |
+
"licensor"
|
| 24 |
+
],
|
| 25 |
+
"url": "https://doi.org/10.5281/zenodo.21229785"
|
| 26 |
+
}
|
| 27 |
+
],
|
| 28 |
+
"extent": {
|
| 29 |
+
"spatial": {
|
| 30 |
+
"bbox": [
|
| 31 |
+
[
|
| 32 |
+
-180,
|
| 33 |
+
-90,
|
| 34 |
+
180,
|
| 35 |
+
90
|
| 36 |
+
]
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"temporal": {
|
| 40 |
+
"interval": [
|
| 41 |
+
[
|
| 42 |
+
"2011-01-01T00:00:00Z",
|
| 43 |
+
"2026-12-31T23:59:59Z"
|
| 44 |
+
]
|
| 45 |
+
]
|
| 46 |
+
}
|
| 47 |
+
},
|
| 48 |
+
"links": [
|
| 49 |
+
{
|
| 50 |
+
"rel": "self",
|
| 51 |
+
"href": "./collection.json",
|
| 52 |
+
"type": "application/json"
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"rel": "root",
|
| 56 |
+
"href": "./collection.json",
|
| 57 |
+
"type": "application/json"
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"rel": "license",
|
| 61 |
+
"href": "../LICENSE",
|
| 62 |
+
"type": "text/plain"
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"rel": "cite-as",
|
| 66 |
+
"href": "https://doi.org/10.5281/zenodo.19339008",
|
| 67 |
+
"type": "text/html"
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"rel": "item",
|
| 71 |
+
"href": "./items/ATA_MV.json",
|
| 72 |
+
"type": "application/json"
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"rel": "item",
|
| 76 |
+
"href": "./items/BRA_SP.json",
|
| 77 |
+
"type": "application/json"
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"rel": "item",
|
| 81 |
+
"href": "./items/CHN_WS.json",
|
| 82 |
+
"type": "application/json"
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"rel": "item",
|
| 86 |
+
"href": "./items/ESP_EH.json",
|
| 87 |
+
"type": "application/json"
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"rel": "item",
|
| 91 |
+
"href": "./items/FIN_LM.json",
|
| 92 |
+
"type": "application/json"
|
| 93 |
+
},
|
| 94 |
+
{
|
| 95 |
+
"rel": "item",
|
| 96 |
+
"href": "./items/GER_BN.json",
|
| 97 |
+
"type": "application/json"
|
| 98 |
+
},
|
| 99 |
+
{
|
| 100 |
+
"rel": "item",
|
| 101 |
+
"href": "./items/IDN_SV.json",
|
| 102 |
+
"type": "application/json"
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"rel": "item",
|
| 106 |
+
"href": "./items/KAZ_AC.json",
|
| 107 |
+
"type": "application/json"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"rel": "item",
|
| 111 |
+
"href": "./items/KSA_WA.json",
|
| 112 |
+
"type": "application/json"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"rel": "item",
|
| 116 |
+
"href": "./items/NAM_HF.json",
|
| 117 |
+
"type": "application/json"
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"rel": "item",
|
| 121 |
+
"href": "./items/NZL_KP.json",
|
| 122 |
+
"type": "application/json"
|
| 123 |
+
},
|
| 124 |
+
{
|
| 125 |
+
"rel": "item",
|
| 126 |
+
"href": "./items/PHL_TA.json",
|
| 127 |
+
"type": "application/json"
|
| 128 |
+
},
|
| 129 |
+
{
|
| 130 |
+
"rel": "item",
|
| 131 |
+
"href": "./items/USA_GC.json",
|
| 132 |
+
"type": "application/json"
|
| 133 |
+
}
|
| 134 |
+
],
|
| 135 |
+
"summaries": {
|
| 136 |
+
"gsd": [
|
| 137 |
+
0.5,
|
| 138 |
+
0.53,
|
| 139 |
+
0.87,
|
| 140 |
+
1.0,
|
| 141 |
+
1.6,
|
| 142 |
+
2.0,
|
| 143 |
+
10.0
|
| 144 |
+
],
|
| 145 |
+
"eo:bands": [
|
| 146 |
+
{
|
| 147 |
+
"name": "elevation",
|
| 148 |
+
"common_name": "elevation",
|
| 149 |
+
"unit": "meter"
|
| 150 |
+
}
|
| 151 |
+
]
|
| 152 |
+
},
|
| 153 |
+
"assets": {
|
| 154 |
+
"manifest": {
|
| 155 |
+
"href": "../manifest.json",
|
| 156 |
+
"type": "application/json",
|
| 157 |
+
"title": "Central dataset manifest (JSON-LD)"
|
| 158 |
+
},
|
| 159 |
+
"dataset_description": {
|
| 160 |
+
"href": "../DATASET_DESCRIPTION.md",
|
| 161 |
+
"type": "text/markdown",
|
| 162 |
+
"title": "FAIR-compliant dataset description"
|
| 163 |
+
}
|
| 164 |
+
}
|
| 165 |
+
}
|
stac/items/ATA_MV.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "Feature",
|
| 3 |
+
"stac_version": "1.0.0",
|
| 4 |
+
"id": "ATA_MV",
|
| 5 |
+
"collection": "matchgeo-dem-v1",
|
| 6 |
+
"bbox": [
|
| 7 |
+
-750100.0,
|
| 8 |
+
-1250100.0,
|
| 9 |
+
-699900.0,
|
| 10 |
+
-1199900.0
|
| 11 |
+
],
|
| 12 |
+
"geometry": {
|
| 13 |
+
"type": "Polygon",
|
| 14 |
+
"coordinates": [
|
| 15 |
+
[
|
| 16 |
+
[
|
| 17 |
+
-699900.0,
|
| 18 |
+
-1250100.0
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
-699900.0,
|
| 22 |
+
-1199900.0
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
-750100.0,
|
| 26 |
+
-1199900.0
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
-750100.0,
|
| 30 |
+
-1250100.0
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
-699900.0,
|
| 34 |
+
-1250100.0
|
| 35 |
+
]
|
| 36 |
+
]
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"properties": {
|
| 40 |
+
"title": "Mount Athos, Greece",
|
| 41 |
+
"description": "Mount Athos, Greece \u2014 satellite_insar at 1.0 m resolution",
|
| 42 |
+
"datetime": "2011-01-01T00:00:00Z",
|
| 43 |
+
"start_datetime": "2011-01-01T00:00:00Z",
|
| 44 |
+
"end_datetime": "2015-12-31T23:59:59Z",
|
| 45 |
+
"providers": [
|
| 46 |
+
{
|
| 47 |
+
"name": "Copernicus DEM",
|
| 48 |
+
"roles": [
|
| 49 |
+
"producer"
|
| 50 |
+
]
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"gsd": 1.0,
|
| 54 |
+
"proj:epsg": 3031,
|
| 55 |
+
"matchgeo:method": "satellite_insar",
|
| 56 |
+
"matchgeo:n_tiles": 5625,
|
| 57 |
+
"matchgeo:labelled": false,
|
| 58 |
+
"matchgeo:has_annotations": false,
|
| 59 |
+
"proj:wkt2": "PROJCS[\"WGS 84 / Antarctic Polar Stereographic\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Polar_Stereographic\"],PARAMETER[\"latitude_of_origin\",-71],PARAMETER[\"central_meridian\",0],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",NORTH],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3031\"]]"
|
| 60 |
+
},
|
| 61 |
+
"assets": {
|
| 62 |
+
"dem": {
|
| 63 |
+
"href": "data/ATA_MV/ATA_MV.tif",
|
| 64 |
+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
|
| 65 |
+
"title": "Merged DEM \u2014 ATA_MV",
|
| 66 |
+
"roles": [
|
| 67 |
+
"data"
|
| 68 |
+
],
|
| 69 |
+
"eo:bands": [
|
| 70 |
+
{
|
| 71 |
+
"name": "elevation",
|
| 72 |
+
"common_name": "elevation",
|
| 73 |
+
"unit": "meter"
|
| 74 |
+
}
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
"tiles": {
|
| 78 |
+
"href": "data/ATA_MV/tiles/",
|
| 79 |
+
"type": "application/x-geotiff-tiles",
|
| 80 |
+
"title": "333\u00d7333 pixel tiles \u2014 ATA_MV",
|
| 81 |
+
"roles": [
|
| 82 |
+
"data"
|
| 83 |
+
],
|
| 84 |
+
"x-asset-count": 5625
|
| 85 |
+
},
|
| 86 |
+
"extent": {
|
| 87 |
+
"href": "data/ATA_MV/ATA_MV_extent.geojson",
|
| 88 |
+
"type": "application/geo+json",
|
| 89 |
+
"title": "Coverage extent polygon",
|
| 90 |
+
"roles": [
|
| 91 |
+
"metadata"
|
| 92 |
+
]
|
| 93 |
+
},
|
| 94 |
+
"tile_index": {
|
| 95 |
+
"href": "data/ATA_MV/ATA_MV_tiles.geojson",
|
| 96 |
+
"type": "application/geo+json",
|
| 97 |
+
"title": "Tile index (grid)",
|
| 98 |
+
"roles": [
|
| 99 |
+
"metadata"
|
| 100 |
+
]
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"links": [
|
| 104 |
+
{
|
| 105 |
+
"rel": "self",
|
| 106 |
+
"href": "./ATA_MV.json",
|
| 107 |
+
"type": "application/json"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"rel": "collection",
|
| 111 |
+
"href": "../collection.json",
|
| 112 |
+
"type": "application/json"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"rel": "root",
|
| 116 |
+
"href": "../collection.json",
|
| 117 |
+
"type": "application/json"
|
| 118 |
+
}
|
| 119 |
+
]
|
| 120 |
+
}
|
stac/items/BRA_SP.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "Feature",
|
| 3 |
+
"stac_version": "1.0.0",
|
| 4 |
+
"id": "BRA_SP",
|
| 5 |
+
"collection": "matchgeo-dem-v1",
|
| 6 |
+
"bbox": [
|
| 7 |
+
331461.943,
|
| 8 |
+
7390840.954,
|
| 9 |
+
335291.443,
|
| 10 |
+
7395003.454
|
| 11 |
+
],
|
| 12 |
+
"geometry": {
|
| 13 |
+
"type": "Polygon",
|
| 14 |
+
"coordinates": [
|
| 15 |
+
[
|
| 16 |
+
[
|
| 17 |
+
335291.443,
|
| 18 |
+
7390840.954
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
335291.443,
|
| 22 |
+
7395003.454
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
331461.943,
|
| 26 |
+
7395003.454
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
331461.943,
|
| 30 |
+
7390840.954
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
335291.443,
|
| 34 |
+
7390840.954
|
| 35 |
+
]
|
| 36 |
+
]
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"properties": {
|
| 40 |
+
"title": "S\u00e3o Paulo, Brazil",
|
| 41 |
+
"description": "S\u00e3o Paulo, Brazil \u2014 airborne_lidar at 0.5 m resolution",
|
| 42 |
+
"datetime": "2020-01-01T00:00:00Z",
|
| 43 |
+
"start_datetime": "2020-01-01T00:00:00Z",
|
| 44 |
+
"end_datetime": "2020-12-31T23:59:59Z",
|
| 45 |
+
"providers": [
|
| 46 |
+
{
|
| 47 |
+
"name": "GeoSampa",
|
| 48 |
+
"roles": [
|
| 49 |
+
"producer"
|
| 50 |
+
]
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"gsd": 0.5,
|
| 54 |
+
"proj:epsg": 31983,
|
| 55 |
+
"matchgeo:method": "airborne_lidar",
|
| 56 |
+
"matchgeo:n_tiles": 558,
|
| 57 |
+
"matchgeo:labelled": true,
|
| 58 |
+
"matchgeo:has_annotations": false,
|
| 59 |
+
"proj:wkt2": "PROJCS[\"SIRGAS 2000 / UTM zone 23S\",GEOGCS[\"SIRGAS 2000\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4674\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",-45],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"31983\"]]"
|
| 60 |
+
},
|
| 61 |
+
"assets": {
|
| 62 |
+
"dem": {
|
| 63 |
+
"href": "data/BRA_SP/BRA_SP.tif",
|
| 64 |
+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
|
| 65 |
+
"title": "Merged DEM \u2014 BRA_SP",
|
| 66 |
+
"roles": [
|
| 67 |
+
"data"
|
| 68 |
+
],
|
| 69 |
+
"eo:bands": [
|
| 70 |
+
{
|
| 71 |
+
"name": "elevation",
|
| 72 |
+
"common_name": "elevation",
|
| 73 |
+
"unit": "meter"
|
| 74 |
+
}
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
"tiles": {
|
| 78 |
+
"href": "data/BRA_SP/tiles/",
|
| 79 |
+
"type": "application/x-geotiff-tiles",
|
| 80 |
+
"title": "333\u00d7333 pixel tiles \u2014 BRA_SP",
|
| 81 |
+
"roles": [
|
| 82 |
+
"data"
|
| 83 |
+
],
|
| 84 |
+
"x-asset-count": 558
|
| 85 |
+
},
|
| 86 |
+
"extent": {
|
| 87 |
+
"href": "data/BRA_SP/BRA_SP_extent.geojson",
|
| 88 |
+
"type": "application/geo+json",
|
| 89 |
+
"title": "Coverage extent polygon",
|
| 90 |
+
"roles": [
|
| 91 |
+
"metadata"
|
| 92 |
+
]
|
| 93 |
+
},
|
| 94 |
+
"tile_index": {
|
| 95 |
+
"href": "data/BRA_SP/BRA_SP_tiles.geojson",
|
| 96 |
+
"type": "application/geo+json",
|
| 97 |
+
"title": "Tile index (grid)",
|
| 98 |
+
"roles": [
|
| 99 |
+
"metadata"
|
| 100 |
+
]
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"links": [
|
| 104 |
+
{
|
| 105 |
+
"rel": "self",
|
| 106 |
+
"href": "./BRA_SP.json",
|
| 107 |
+
"type": "application/json"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"rel": "collection",
|
| 111 |
+
"href": "../collection.json",
|
| 112 |
+
"type": "application/json"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"rel": "root",
|
| 116 |
+
"href": "../collection.json",
|
| 117 |
+
"type": "application/json"
|
| 118 |
+
}
|
| 119 |
+
]
|
| 120 |
+
}
|
stac/items/CHN_WS.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "Feature",
|
| 3 |
+
"stac_version": "1.0.0",
|
| 4 |
+
"id": "CHN_WS",
|
| 5 |
+
"collection": "matchgeo-dem-v1",
|
| 6 |
+
"bbox": [
|
| 7 |
+
682352.9987419512,
|
| 8 |
+
4299757.372692683,
|
| 9 |
+
693209.5152152042,
|
| 10 |
+
4309501.813966408
|
| 11 |
+
],
|
| 12 |
+
"geometry": {
|
| 13 |
+
"type": "Polygon",
|
| 14 |
+
"coordinates": [
|
| 15 |
+
[
|
| 16 |
+
[
|
| 17 |
+
693209.5152152042,
|
| 18 |
+
4299757.372692683
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
693209.5152152042,
|
| 22 |
+
4309501.813966408
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
682352.9987419512,
|
| 26 |
+
4309501.813966408
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
682352.9987419512,
|
| 30 |
+
4299757.372692683
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
693209.5152152042,
|
| 34 |
+
4299757.372692683
|
| 35 |
+
]
|
| 36 |
+
]
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"properties": {
|
| 40 |
+
"title": "Wutai Shan, China",
|
| 41 |
+
"description": "Wutai Shan, China \u2014 uav_sfm at 1.0 m resolution",
|
| 42 |
+
"datetime": "2021-01-01T00:00:00Z",
|
| 43 |
+
"start_datetime": "2021-01-01T00:00:00Z",
|
| 44 |
+
"end_datetime": "2021-12-31T23:59:59Z",
|
| 45 |
+
"providers": [
|
| 46 |
+
{
|
| 47 |
+
"name": "OpenTopography",
|
| 48 |
+
"roles": [
|
| 49 |
+
"producer"
|
| 50 |
+
]
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"gsd": 1.0,
|
| 54 |
+
"proj:epsg": 32649,
|
| 55 |
+
"matchgeo:method": "uav_sfm",
|
| 56 |
+
"matchgeo:n_tiles": 1076,
|
| 57 |
+
"matchgeo:labelled": false,
|
| 58 |
+
"matchgeo:has_annotations": false,
|
| 59 |
+
"proj:wkt2": "PROJCS[\"WGS 84 / UTM zone 49N\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",111],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32649\"]]"
|
| 60 |
+
},
|
| 61 |
+
"assets": {
|
| 62 |
+
"dem": {
|
| 63 |
+
"href": "data/CHN_WS/CHN_WS.tif",
|
| 64 |
+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
|
| 65 |
+
"title": "Merged DEM \u2014 CHN_WS",
|
| 66 |
+
"roles": [
|
| 67 |
+
"data"
|
| 68 |
+
],
|
| 69 |
+
"eo:bands": [
|
| 70 |
+
{
|
| 71 |
+
"name": "elevation",
|
| 72 |
+
"common_name": "elevation",
|
| 73 |
+
"unit": "meter"
|
| 74 |
+
}
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
"tiles": {
|
| 78 |
+
"href": "data/CHN_WS/tiles/",
|
| 79 |
+
"type": "application/x-geotiff-tiles",
|
| 80 |
+
"title": "333\u00d7333 pixel tiles \u2014 CHN_WS",
|
| 81 |
+
"roles": [
|
| 82 |
+
"data"
|
| 83 |
+
],
|
| 84 |
+
"x-asset-count": 1076
|
| 85 |
+
},
|
| 86 |
+
"extent": {
|
| 87 |
+
"href": "data/CHN_WS/CHN_WS_extent.geojson",
|
| 88 |
+
"type": "application/geo+json",
|
| 89 |
+
"title": "Coverage extent polygon",
|
| 90 |
+
"roles": [
|
| 91 |
+
"metadata"
|
| 92 |
+
]
|
| 93 |
+
},
|
| 94 |
+
"tile_index": {
|
| 95 |
+
"href": "data/CHN_WS/CHN_WS_tiles.geojson",
|
| 96 |
+
"type": "application/geo+json",
|
| 97 |
+
"title": "Tile index (grid)",
|
| 98 |
+
"roles": [
|
| 99 |
+
"metadata"
|
| 100 |
+
]
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"links": [
|
| 104 |
+
{
|
| 105 |
+
"rel": "self",
|
| 106 |
+
"href": "./CHN_WS.json",
|
| 107 |
+
"type": "application/json"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"rel": "collection",
|
| 111 |
+
"href": "../collection.json",
|
| 112 |
+
"type": "application/json"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"rel": "root",
|
| 116 |
+
"href": "../collection.json",
|
| 117 |
+
"type": "application/json"
|
| 118 |
+
}
|
| 119 |
+
]
|
| 120 |
+
}
|
stac/items/ESP_EH.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "Feature",
|
| 3 |
+
"stac_version": "1.0.0",
|
| 4 |
+
"id": "ESP_EH",
|
| 5 |
+
"collection": "matchgeo-dem-v1",
|
| 6 |
+
"bbox": [
|
| 7 |
+
200180.0,
|
| 8 |
+
3075630.0,
|
| 9 |
+
216940.0,
|
| 10 |
+
3085180.0
|
| 11 |
+
],
|
| 12 |
+
"geometry": {
|
| 13 |
+
"type": "Polygon",
|
| 14 |
+
"coordinates": [
|
| 15 |
+
[
|
| 16 |
+
[
|
| 17 |
+
216940.0,
|
| 18 |
+
3075630.0
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
216940.0,
|
| 22 |
+
3085180.0
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
200180.0,
|
| 26 |
+
3085180.0
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
200180.0,
|
| 30 |
+
3075630.0
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
216940.0,
|
| 34 |
+
3075630.0
|
| 35 |
+
]
|
| 36 |
+
]
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"properties": {
|
| 40 |
+
"title": "El Hierro, Spain",
|
| 41 |
+
"description": "El Hierro, Spain \u2014 airborne_lidar at 1.0 m resolution",
|
| 42 |
+
"datetime": "2022-01-01T00:00:00Z",
|
| 43 |
+
"start_datetime": "2022-01-01T00:00:00Z",
|
| 44 |
+
"end_datetime": "2025-12-31T23:59:59Z",
|
| 45 |
+
"providers": [
|
| 46 |
+
{
|
| 47 |
+
"name": "PNOA-LiDAR",
|
| 48 |
+
"roles": [
|
| 49 |
+
"producer"
|
| 50 |
+
]
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"gsd": 1.0,
|
| 54 |
+
"proj:epsg": 3040,
|
| 55 |
+
"matchgeo:method": "airborne_lidar",
|
| 56 |
+
"matchgeo:n_tiles": 2460,
|
| 57 |
+
"matchgeo:labelled": false,
|
| 58 |
+
"matchgeo:has_annotations": false,
|
| 59 |
+
"proj:wkt2": "PROJCS[\"ETRS89 / UTM zone 28N (N-E)\",GEOGCS[\"ETRS89\",DATUM[\"European_Terrestrial_Reference_System_1989\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",-15],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"3040\"]]"
|
| 60 |
+
},
|
| 61 |
+
"assets": {
|
| 62 |
+
"dem": {
|
| 63 |
+
"href": "data/ESP_EH/ESP_EH.tif",
|
| 64 |
+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
|
| 65 |
+
"title": "Merged DEM \u2014 ESP_EH",
|
| 66 |
+
"roles": [
|
| 67 |
+
"data"
|
| 68 |
+
],
|
| 69 |
+
"eo:bands": [
|
| 70 |
+
{
|
| 71 |
+
"name": "elevation",
|
| 72 |
+
"common_name": "elevation",
|
| 73 |
+
"unit": "meter"
|
| 74 |
+
}
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
"tiles": {
|
| 78 |
+
"href": "data/ESP_EH/tiles/",
|
| 79 |
+
"type": "application/x-geotiff-tiles",
|
| 80 |
+
"title": "333\u00d7333 pixel tiles \u2014 ESP_EH",
|
| 81 |
+
"roles": [
|
| 82 |
+
"data"
|
| 83 |
+
],
|
| 84 |
+
"x-asset-count": 2460
|
| 85 |
+
},
|
| 86 |
+
"extent": {
|
| 87 |
+
"href": "data/ESP_EH/ESP_EH_extent.geojson",
|
| 88 |
+
"type": "application/geo+json",
|
| 89 |
+
"title": "Coverage extent polygon",
|
| 90 |
+
"roles": [
|
| 91 |
+
"metadata"
|
| 92 |
+
]
|
| 93 |
+
},
|
| 94 |
+
"tile_index": {
|
| 95 |
+
"href": "data/ESP_EH/ESP_EH_tiles.geojson",
|
| 96 |
+
"type": "application/geo+json",
|
| 97 |
+
"title": "Tile index (grid)",
|
| 98 |
+
"roles": [
|
| 99 |
+
"metadata"
|
| 100 |
+
]
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"links": [
|
| 104 |
+
{
|
| 105 |
+
"rel": "self",
|
| 106 |
+
"href": "./ESP_EH.json",
|
| 107 |
+
"type": "application/json"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"rel": "collection",
|
| 111 |
+
"href": "../collection.json",
|
| 112 |
+
"type": "application/json"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"rel": "root",
|
| 116 |
+
"href": "../collection.json",
|
| 117 |
+
"type": "application/json"
|
| 118 |
+
}
|
| 119 |
+
]
|
| 120 |
+
}
|
stac/items/FIN_LM.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "Feature",
|
| 3 |
+
"stac_version": "1.0.0",
|
| 4 |
+
"id": "FIN_LM",
|
| 5 |
+
"collection": "matchgeo-dem-v1",
|
| 6 |
+
"bbox": [
|
| 7 |
+
498760.0,
|
| 8 |
+
7735520.0,
|
| 9 |
+
503624.0,
|
| 10 |
+
7755680.0
|
| 11 |
+
],
|
| 12 |
+
"geometry": {
|
| 13 |
+
"type": "Polygon",
|
| 14 |
+
"coordinates": [
|
| 15 |
+
[
|
| 16 |
+
[
|
| 17 |
+
503624.0,
|
| 18 |
+
7735520.0
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
503624.0,
|
| 22 |
+
7755680.0
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
498760.0,
|
| 26 |
+
7755680.0
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
498760.0,
|
| 30 |
+
7735520.0
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
503624.0,
|
| 34 |
+
7735520.0
|
| 35 |
+
]
|
| 36 |
+
]
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"properties": {
|
| 40 |
+
"title": "Lahti, Finland",
|
| 41 |
+
"description": "Lahti, Finland \u2014 airborne_lidar_photogrammetry at 2.0 m resolution",
|
| 42 |
+
"datetime": "2020-01-01T00:00:00Z",
|
| 43 |
+
"start_datetime": "2020-01-01T00:00:00Z",
|
| 44 |
+
"end_datetime": "2026-12-31T23:59:59Z",
|
| 45 |
+
"providers": [
|
| 46 |
+
{
|
| 47 |
+
"name": "National Land Survey of Finland",
|
| 48 |
+
"roles": [
|
| 49 |
+
"producer"
|
| 50 |
+
]
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"gsd": 2.0,
|
| 54 |
+
"proj:epsg": 3067,
|
| 55 |
+
"matchgeo:method": "airborne_lidar_photogrammetry",
|
| 56 |
+
"matchgeo:n_tiles": 248,
|
| 57 |
+
"matchgeo:labelled": false,
|
| 58 |
+
"matchgeo:has_annotations": false,
|
| 59 |
+
"proj:wkt2": "PROJCS[\"EUREF-FIN / TM35FIN(E,N)\",GEOGCS[\"EUREF-FIN\",DATUM[\"EUREF-FIN\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1391\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"10690\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",27],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3067\"]]"
|
| 60 |
+
},
|
| 61 |
+
"assets": {
|
| 62 |
+
"dem": {
|
| 63 |
+
"href": "data/FIN_LM/FIN_LM.tif",
|
| 64 |
+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
|
| 65 |
+
"title": "Merged DEM \u2014 FIN_LM",
|
| 66 |
+
"roles": [
|
| 67 |
+
"data"
|
| 68 |
+
],
|
| 69 |
+
"eo:bands": [
|
| 70 |
+
{
|
| 71 |
+
"name": "elevation",
|
| 72 |
+
"common_name": "elevation",
|
| 73 |
+
"unit": "meter"
|
| 74 |
+
}
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
"tiles": {
|
| 78 |
+
"href": "data/FIN_LM/tiles/",
|
| 79 |
+
"type": "application/x-geotiff-tiles",
|
| 80 |
+
"title": "333\u00d7333 pixel tiles \u2014 FIN_LM",
|
| 81 |
+
"roles": [
|
| 82 |
+
"data"
|
| 83 |
+
],
|
| 84 |
+
"x-asset-count": 248
|
| 85 |
+
},
|
| 86 |
+
"extent": {
|
| 87 |
+
"href": "data/FIN_LM/FIN_LM_extent.geojson",
|
| 88 |
+
"type": "application/geo+json",
|
| 89 |
+
"title": "Coverage extent polygon",
|
| 90 |
+
"roles": [
|
| 91 |
+
"metadata"
|
| 92 |
+
]
|
| 93 |
+
},
|
| 94 |
+
"tile_index": {
|
| 95 |
+
"href": "data/FIN_LM/FIN_LM_tiles.geojson",
|
| 96 |
+
"type": "application/geo+json",
|
| 97 |
+
"title": "Tile index (grid)",
|
| 98 |
+
"roles": [
|
| 99 |
+
"metadata"
|
| 100 |
+
]
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"links": [
|
| 104 |
+
{
|
| 105 |
+
"rel": "self",
|
| 106 |
+
"href": "./FIN_LM.json",
|
| 107 |
+
"type": "application/json"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"rel": "collection",
|
| 111 |
+
"href": "../collection.json",
|
| 112 |
+
"type": "application/json"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"rel": "root",
|
| 116 |
+
"href": "../collection.json",
|
| 117 |
+
"type": "application/json"
|
| 118 |
+
}
|
| 119 |
+
]
|
| 120 |
+
}
|
stac/items/GER_BN.json
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "Feature",
|
| 3 |
+
"stac_version": "1.0.0",
|
| 4 |
+
"id": "GER_BN",
|
| 5 |
+
"collection": "matchgeo-dem-v1",
|
| 6 |
+
"bbox": [
|
| 7 |
+
360004.0,
|
| 8 |
+
5610033.0,
|
| 9 |
+
367996.0,
|
| 10 |
+
5626998.0
|
| 11 |
+
],
|
| 12 |
+
"geometry": {
|
| 13 |
+
"type": "Polygon",
|
| 14 |
+
"coordinates": [
|
| 15 |
+
[
|
| 16 |
+
[
|
| 17 |
+
367996.0,
|
| 18 |
+
5610033.0
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
367996.0,
|
| 22 |
+
5626998.0
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
360004.0,
|
| 26 |
+
5626998.0
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
360004.0,
|
| 30 |
+
5610033.0
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
367996.0,
|
| 34 |
+
5610033.0
|
| 35 |
+
]
|
| 36 |
+
]
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"properties": {
|
| 40 |
+
"title": "Bonn, Germany",
|
| 41 |
+
"description": "Bonn, Germany \u2014 airborne_lidar at 1.0 m resolution",
|
| 42 |
+
"datetime": "2016-01-01T00:00:00Z",
|
| 43 |
+
"start_datetime": "2016-01-01T00:00:00Z",
|
| 44 |
+
"end_datetime": "2018-12-31T23:59:59Z",
|
| 45 |
+
"providers": [
|
| 46 |
+
{
|
| 47 |
+
"name": "Geobasis NRW",
|
| 48 |
+
"roles": [
|
| 49 |
+
"producer"
|
| 50 |
+
]
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"gsd": 1.0,
|
| 54 |
+
"proj:epsg": 25832,
|
| 55 |
+
"matchgeo:method": "airborne_lidar",
|
| 56 |
+
"matchgeo:n_tiles": 1759,
|
| 57 |
+
"matchgeo:labelled": true,
|
| 58 |
+
"matchgeo:has_annotations": true,
|
| 59 |
+
"proj:wkt2": "LOCAL_CS[\"ETRS89 / UTM zone 32N + DHHN92 height\",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]]"
|
| 60 |
+
},
|
| 61 |
+
"assets": {
|
| 62 |
+
"dem": {
|
| 63 |
+
"href": "data/GER_BN/GER_BN.tif",
|
| 64 |
+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
|
| 65 |
+
"title": "Merged DEM \u2014 GER_BN",
|
| 66 |
+
"roles": [
|
| 67 |
+
"data"
|
| 68 |
+
],
|
| 69 |
+
"eo:bands": [
|
| 70 |
+
{
|
| 71 |
+
"name": "elevation",
|
| 72 |
+
"common_name": "elevation",
|
| 73 |
+
"unit": "meter"
|
| 74 |
+
}
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
"tiles": {
|
| 78 |
+
"href": "data/GER_BN/tiles/",
|
| 79 |
+
"type": "application/x-geotiff-tiles",
|
| 80 |
+
"title": "333\u00d7333 pixel tiles \u2014 GER_BN",
|
| 81 |
+
"roles": [
|
| 82 |
+
"data"
|
| 83 |
+
],
|
| 84 |
+
"x-asset-count": 1759
|
| 85 |
+
},
|
| 86 |
+
"extent": {
|
| 87 |
+
"href": "data/GER_BN/GER_BN_extent.geojson",
|
| 88 |
+
"type": "application/geo+json",
|
| 89 |
+
"title": "Coverage extent polygon",
|
| 90 |
+
"roles": [
|
| 91 |
+
"metadata"
|
| 92 |
+
]
|
| 93 |
+
},
|
| 94 |
+
"tile_index": {
|
| 95 |
+
"href": "data/GER_BN/GER_BN_tiles.geojson",
|
| 96 |
+
"type": "application/geo+json",
|
| 97 |
+
"title": "Tile index (grid)",
|
| 98 |
+
"roles": [
|
| 99 |
+
"metadata"
|
| 100 |
+
]
|
| 101 |
+
},
|
| 102 |
+
"annotations": {
|
| 103 |
+
"href": "data/GER_BN/annotations/",
|
| 104 |
+
"type": "application/json",
|
| 105 |
+
"title": "Keypoint annotations",
|
| 106 |
+
"roles": [
|
| 107 |
+
"metadata"
|
| 108 |
+
]
|
| 109 |
+
}
|
| 110 |
+
},
|
| 111 |
+
"links": [
|
| 112 |
+
{
|
| 113 |
+
"rel": "self",
|
| 114 |
+
"href": "./GER_BN.json",
|
| 115 |
+
"type": "application/json"
|
| 116 |
+
},
|
| 117 |
+
{
|
| 118 |
+
"rel": "collection",
|
| 119 |
+
"href": "../collection.json",
|
| 120 |
+
"type": "application/json"
|
| 121 |
+
},
|
| 122 |
+
{
|
| 123 |
+
"rel": "root",
|
| 124 |
+
"href": "../collection.json",
|
| 125 |
+
"type": "application/json"
|
| 126 |
+
}
|
| 127 |
+
]
|
| 128 |
+
}
|
stac/items/IDN_SV.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "Feature",
|
| 3 |
+
"stac_version": "1.0.0",
|
| 4 |
+
"id": "IDN_SV",
|
| 5 |
+
"collection": "matchgeo-dem-v1",
|
| 6 |
+
"bbox": [
|
| 7 |
+
432288.2209851263,
|
| 8 |
+
347430.19815381255,
|
| 9 |
+
436376.7231951263,
|
| 10 |
+
351748.91844681255
|
| 11 |
+
],
|
| 12 |
+
"geometry": {
|
| 13 |
+
"type": "Polygon",
|
| 14 |
+
"coordinates": [
|
| 15 |
+
[
|
| 16 |
+
[
|
| 17 |
+
436376.7231951263,
|
| 18 |
+
347430.19815381255
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
436376.7231951263,
|
| 22 |
+
351748.91844681255
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
432288.2209851263,
|
| 26 |
+
351748.91844681255
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
432288.2209851263,
|
| 30 |
+
347430.19815381255
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
436376.7231951263,
|
| 34 |
+
347430.19815381255
|
| 35 |
+
]
|
| 36 |
+
]
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"properties": {
|
| 40 |
+
"title": "Sinabung Volcano, Indonesia",
|
| 41 |
+
"description": "Sinabung Volcano, Indonesia \u2014 uas_sfm at 0.87 m resolution",
|
| 42 |
+
"datetime": "2018-01-01T00:00:00Z",
|
| 43 |
+
"start_datetime": "2018-01-01T00:00:00Z",
|
| 44 |
+
"end_datetime": "2018-12-31T23:59:59Z",
|
| 45 |
+
"providers": [
|
| 46 |
+
{
|
| 47 |
+
"name": "OpenTopography",
|
| 48 |
+
"roles": [
|
| 49 |
+
"producer"
|
| 50 |
+
]
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"gsd": 0.87,
|
| 54 |
+
"proj:epsg": 32647,
|
| 55 |
+
"matchgeo:method": "uas_sfm",
|
| 56 |
+
"matchgeo:n_tiles": 181,
|
| 57 |
+
"matchgeo:labelled": false,
|
| 58 |
+
"matchgeo:has_annotations": false,
|
| 59 |
+
"proj:wkt2": "PROJCS[\"WGS 84 / UTM zone 47N\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",99],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32647\"]]"
|
| 60 |
+
},
|
| 61 |
+
"assets": {
|
| 62 |
+
"dem": {
|
| 63 |
+
"href": "data/IDN_SV/IDN_SV.tif",
|
| 64 |
+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
|
| 65 |
+
"title": "Merged DEM \u2014 IDN_SV",
|
| 66 |
+
"roles": [
|
| 67 |
+
"data"
|
| 68 |
+
],
|
| 69 |
+
"eo:bands": [
|
| 70 |
+
{
|
| 71 |
+
"name": "elevation",
|
| 72 |
+
"common_name": "elevation",
|
| 73 |
+
"unit": "meter"
|
| 74 |
+
}
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
"tiles": {
|
| 78 |
+
"href": "data/IDN_SV/tiles/",
|
| 79 |
+
"type": "application/x-geotiff-tiles",
|
| 80 |
+
"title": "333\u00d7333 pixel tiles \u2014 IDN_SV",
|
| 81 |
+
"roles": [
|
| 82 |
+
"data"
|
| 83 |
+
],
|
| 84 |
+
"x-asset-count": 181
|
| 85 |
+
},
|
| 86 |
+
"extent": {
|
| 87 |
+
"href": "data/IDN_SV/IDN_SV_extent.geojson",
|
| 88 |
+
"type": "application/geo+json",
|
| 89 |
+
"title": "Coverage extent polygon",
|
| 90 |
+
"roles": [
|
| 91 |
+
"metadata"
|
| 92 |
+
]
|
| 93 |
+
},
|
| 94 |
+
"tile_index": {
|
| 95 |
+
"href": "data/IDN_SV/IDN_SV_tiles.geojson",
|
| 96 |
+
"type": "application/geo+json",
|
| 97 |
+
"title": "Tile index (grid)",
|
| 98 |
+
"roles": [
|
| 99 |
+
"metadata"
|
| 100 |
+
]
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"links": [
|
| 104 |
+
{
|
| 105 |
+
"rel": "self",
|
| 106 |
+
"href": "./IDN_SV.json",
|
| 107 |
+
"type": "application/json"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"rel": "collection",
|
| 111 |
+
"href": "../collection.json",
|
| 112 |
+
"type": "application/json"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"rel": "root",
|
| 116 |
+
"href": "../collection.json",
|
| 117 |
+
"type": "application/json"
|
| 118 |
+
}
|
| 119 |
+
]
|
| 120 |
+
}
|
stac/items/KAZ_AC.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "Feature",
|
| 3 |
+
"stac_version": "1.0.0",
|
| 4 |
+
"id": "KAZ_AC",
|
| 5 |
+
"collection": "matchgeo-dem-v1",
|
| 6 |
+
"bbox": [
|
| 7 |
+
648000.0,
|
| 8 |
+
4781815.5,
|
| 9 |
+
665137.5,
|
| 10 |
+
4796253.0
|
| 11 |
+
],
|
| 12 |
+
"geometry": {
|
| 13 |
+
"type": "Polygon",
|
| 14 |
+
"coordinates": [
|
| 15 |
+
[
|
| 16 |
+
[
|
| 17 |
+
665137.5,
|
| 18 |
+
4781815.5
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
665137.5,
|
| 22 |
+
4796253.0
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
648000.0,
|
| 26 |
+
4796253.0
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
648000.0,
|
| 30 |
+
4781815.5
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
665137.5,
|
| 34 |
+
4781815.5
|
| 35 |
+
]
|
| 36 |
+
]
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"properties": {
|
| 40 |
+
"title": "Almaty City, Kazakhstan",
|
| 41 |
+
"description": "Almaty City, Kazakhstan \u2014 satellite_stereophotogrammetry at 1.0 m resolution",
|
| 42 |
+
"datetime": "2017-01-01T00:00:00Z",
|
| 43 |
+
"start_datetime": "2017-01-01T00:00:00Z",
|
| 44 |
+
"end_datetime": "2017-12-31T23:59:59Z",
|
| 45 |
+
"providers": [
|
| 46 |
+
{
|
| 47 |
+
"name": "OpenTopography",
|
| 48 |
+
"roles": [
|
| 49 |
+
"producer"
|
| 50 |
+
]
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"gsd": 1.0,
|
| 54 |
+
"proj:epsg": 32643,
|
| 55 |
+
"matchgeo:method": "satellite_stereophotogrammetry",
|
| 56 |
+
"matchgeo:n_tiles": 887,
|
| 57 |
+
"matchgeo:labelled": false,
|
| 58 |
+
"matchgeo:has_annotations": false,
|
| 59 |
+
"proj:wkt2": "PROJCS[\"WGS 84 / UTM zone 43N\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",75],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32643\"]]"
|
| 60 |
+
},
|
| 61 |
+
"assets": {
|
| 62 |
+
"dem": {
|
| 63 |
+
"href": "data/KAZ_AC/KAZ_AC.tif",
|
| 64 |
+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
|
| 65 |
+
"title": "Merged DEM \u2014 KAZ_AC",
|
| 66 |
+
"roles": [
|
| 67 |
+
"data"
|
| 68 |
+
],
|
| 69 |
+
"eo:bands": [
|
| 70 |
+
{
|
| 71 |
+
"name": "elevation",
|
| 72 |
+
"common_name": "elevation",
|
| 73 |
+
"unit": "meter"
|
| 74 |
+
}
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
"tiles": {
|
| 78 |
+
"href": "data/KAZ_AC/tiles/",
|
| 79 |
+
"type": "application/x-geotiff-tiles",
|
| 80 |
+
"title": "333\u00d7333 pixel tiles \u2014 KAZ_AC",
|
| 81 |
+
"roles": [
|
| 82 |
+
"data"
|
| 83 |
+
],
|
| 84 |
+
"x-asset-count": 887
|
| 85 |
+
},
|
| 86 |
+
"extent": {
|
| 87 |
+
"href": "data/KAZ_AC/KAZ_AC_extent.geojson",
|
| 88 |
+
"type": "application/geo+json",
|
| 89 |
+
"title": "Coverage extent polygon",
|
| 90 |
+
"roles": [
|
| 91 |
+
"metadata"
|
| 92 |
+
]
|
| 93 |
+
},
|
| 94 |
+
"tile_index": {
|
| 95 |
+
"href": "data/KAZ_AC/KAZ_AC_tiles.geojson",
|
| 96 |
+
"type": "application/geo+json",
|
| 97 |
+
"title": "Tile index (grid)",
|
| 98 |
+
"roles": [
|
| 99 |
+
"metadata"
|
| 100 |
+
]
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"links": [
|
| 104 |
+
{
|
| 105 |
+
"rel": "self",
|
| 106 |
+
"href": "./KAZ_AC.json",
|
| 107 |
+
"type": "application/json"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"rel": "collection",
|
| 111 |
+
"href": "../collection.json",
|
| 112 |
+
"type": "application/json"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"rel": "root",
|
| 116 |
+
"href": "../collection.json",
|
| 117 |
+
"type": "application/json"
|
| 118 |
+
}
|
| 119 |
+
]
|
| 120 |
+
}
|
stac/items/KSA_WA.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "Feature",
|
| 3 |
+
"stac_version": "1.0.0",
|
| 4 |
+
"id": "KSA_WA",
|
| 5 |
+
"collection": "matchgeo-dem-v1",
|
| 6 |
+
"bbox": [
|
| 7 |
+
262997.6,
|
| 8 |
+
3069687.2,
|
| 9 |
+
291007.2,
|
| 10 |
+
3114711.2
|
| 11 |
+
],
|
| 12 |
+
"geometry": {
|
| 13 |
+
"type": "Polygon",
|
| 14 |
+
"coordinates": [
|
| 15 |
+
[
|
| 16 |
+
[
|
| 17 |
+
291007.2,
|
| 18 |
+
3069687.2
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
291007.2,
|
| 22 |
+
3114711.2
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
262997.6,
|
| 26 |
+
3114711.2
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
262997.6,
|
| 30 |
+
3069687.2
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
291007.2,
|
| 34 |
+
3069687.2
|
| 35 |
+
]
|
| 36 |
+
]
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"properties": {
|
| 40 |
+
"title": "Wadi Al-Akhdar, Saudi Arabia",
|
| 41 |
+
"description": "Wadi Al-Akhdar, Saudi Arabia \u2014 satellite_stereophotogrammetry at 1.6 m resolution",
|
| 42 |
+
"datetime": "2016-01-01T00:00:00Z",
|
| 43 |
+
"start_datetime": "2016-01-01T00:00:00Z",
|
| 44 |
+
"end_datetime": "2016-12-31T23:59:59Z",
|
| 45 |
+
"providers": [
|
| 46 |
+
{
|
| 47 |
+
"name": "OpenTopography",
|
| 48 |
+
"roles": [
|
| 49 |
+
"producer"
|
| 50 |
+
]
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"gsd": 1.6,
|
| 54 |
+
"proj:epsg": 32637,
|
| 55 |
+
"matchgeo:method": "satellite_stereophotogrammetry",
|
| 56 |
+
"matchgeo:n_tiles": 3880,
|
| 57 |
+
"matchgeo:labelled": false,
|
| 58 |
+
"matchgeo:has_annotations": false,
|
| 59 |
+
"proj:wkt2": "PROJCS[\"WGS 84 / UTM zone 37N\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",39],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32637\"]]"
|
| 60 |
+
},
|
| 61 |
+
"assets": {
|
| 62 |
+
"dem": {
|
| 63 |
+
"href": "data/KSA_WA/KSA_WA.tif",
|
| 64 |
+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
|
| 65 |
+
"title": "Merged DEM \u2014 KSA_WA",
|
| 66 |
+
"roles": [
|
| 67 |
+
"data"
|
| 68 |
+
],
|
| 69 |
+
"eo:bands": [
|
| 70 |
+
{
|
| 71 |
+
"name": "elevation",
|
| 72 |
+
"common_name": "elevation",
|
| 73 |
+
"unit": "meter"
|
| 74 |
+
}
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
"tiles": {
|
| 78 |
+
"href": "data/KSA_WA/tiles/",
|
| 79 |
+
"type": "application/x-geotiff-tiles",
|
| 80 |
+
"title": "333\u00d7333 pixel tiles \u2014 KSA_WA",
|
| 81 |
+
"roles": [
|
| 82 |
+
"data"
|
| 83 |
+
],
|
| 84 |
+
"x-asset-count": 3880
|
| 85 |
+
},
|
| 86 |
+
"extent": {
|
| 87 |
+
"href": "data/KSA_WA/KSA_WA_extent.geojson",
|
| 88 |
+
"type": "application/geo+json",
|
| 89 |
+
"title": "Coverage extent polygon",
|
| 90 |
+
"roles": [
|
| 91 |
+
"metadata"
|
| 92 |
+
]
|
| 93 |
+
},
|
| 94 |
+
"tile_index": {
|
| 95 |
+
"href": "data/KSA_WA/KSA_WA_tiles.geojson",
|
| 96 |
+
"type": "application/geo+json",
|
| 97 |
+
"title": "Tile index (grid)",
|
| 98 |
+
"roles": [
|
| 99 |
+
"metadata"
|
| 100 |
+
]
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"links": [
|
| 104 |
+
{
|
| 105 |
+
"rel": "self",
|
| 106 |
+
"href": "./KSA_WA.json",
|
| 107 |
+
"type": "application/json"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"rel": "collection",
|
| 111 |
+
"href": "../collection.json",
|
| 112 |
+
"type": "application/json"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"rel": "root",
|
| 116 |
+
"href": "../collection.json",
|
| 117 |
+
"type": "application/json"
|
| 118 |
+
}
|
| 119 |
+
]
|
| 120 |
+
}
|
stac/items/NAM_HF.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "Feature",
|
| 3 |
+
"stac_version": "1.0.0",
|
| 4 |
+
"id": "NAM_HF",
|
| 5 |
+
"collection": "matchgeo-dem-v1",
|
| 6 |
+
"bbox": [
|
| 7 |
+
589837.6021,
|
| 8 |
+
7278647.9482,
|
| 9 |
+
601054.1875,
|
| 10 |
+
7285555.4766
|
| 11 |
+
],
|
| 12 |
+
"geometry": {
|
| 13 |
+
"type": "Polygon",
|
| 14 |
+
"coordinates": [
|
| 15 |
+
[
|
| 16 |
+
[
|
| 17 |
+
601054.1875,
|
| 18 |
+
7278647.9482
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
601054.1875,
|
| 22 |
+
7285555.4766
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
589837.6021,
|
| 26 |
+
7285555.4766
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
589837.6021,
|
| 30 |
+
7278647.9482
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
601054.1875,
|
| 34 |
+
7278647.9482
|
| 35 |
+
]
|
| 36 |
+
]
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"properties": {
|
| 40 |
+
"title": "Hebron Fault, Namibia",
|
| 41 |
+
"description": "Hebron Fault, Namibia \u2014 satellite_stereophotogrammetry at 0.53 m resolution",
|
| 42 |
+
"datetime": "2017-01-01T00:00:00Z",
|
| 43 |
+
"start_datetime": "2017-01-01T00:00:00Z",
|
| 44 |
+
"end_datetime": "2017-12-31T23:59:59Z",
|
| 45 |
+
"providers": [
|
| 46 |
+
{
|
| 47 |
+
"name": "OpenTopography",
|
| 48 |
+
"roles": [
|
| 49 |
+
"producer"
|
| 50 |
+
]
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"gsd": 0.53,
|
| 54 |
+
"proj:epsg": 32733,
|
| 55 |
+
"matchgeo:method": "satellite_stereophotogrammetry",
|
| 56 |
+
"matchgeo:n_tiles": 1457,
|
| 57 |
+
"matchgeo:labelled": false,
|
| 58 |
+
"matchgeo:has_annotations": false,
|
| 59 |
+
"proj:wkt2": "PROJCS[\"WGS 84 / UTM zone 33S\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",15],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32733\"]]"
|
| 60 |
+
},
|
| 61 |
+
"assets": {
|
| 62 |
+
"dem": {
|
| 63 |
+
"href": "data/NAM_HF/NAM_HF.tif",
|
| 64 |
+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
|
| 65 |
+
"title": "Merged DEM \u2014 NAM_HF",
|
| 66 |
+
"roles": [
|
| 67 |
+
"data"
|
| 68 |
+
],
|
| 69 |
+
"eo:bands": [
|
| 70 |
+
{
|
| 71 |
+
"name": "elevation",
|
| 72 |
+
"common_name": "elevation",
|
| 73 |
+
"unit": "meter"
|
| 74 |
+
}
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
"tiles": {
|
| 78 |
+
"href": "data/NAM_HF/tiles/",
|
| 79 |
+
"type": "application/x-geotiff-tiles",
|
| 80 |
+
"title": "333\u00d7333 pixel tiles \u2014 NAM_HF",
|
| 81 |
+
"roles": [
|
| 82 |
+
"data"
|
| 83 |
+
],
|
| 84 |
+
"x-asset-count": 1457
|
| 85 |
+
},
|
| 86 |
+
"extent": {
|
| 87 |
+
"href": "data/NAM_HF/NAM_HF_extent.geojson",
|
| 88 |
+
"type": "application/geo+json",
|
| 89 |
+
"title": "Coverage extent polygon",
|
| 90 |
+
"roles": [
|
| 91 |
+
"metadata"
|
| 92 |
+
]
|
| 93 |
+
},
|
| 94 |
+
"tile_index": {
|
| 95 |
+
"href": "data/NAM_HF/NAM_HF_tiles.geojson",
|
| 96 |
+
"type": "application/geo+json",
|
| 97 |
+
"title": "Tile index (grid)",
|
| 98 |
+
"roles": [
|
| 99 |
+
"metadata"
|
| 100 |
+
]
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"links": [
|
| 104 |
+
{
|
| 105 |
+
"rel": "self",
|
| 106 |
+
"href": "./NAM_HF.json",
|
| 107 |
+
"type": "application/json"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"rel": "collection",
|
| 111 |
+
"href": "../collection.json",
|
| 112 |
+
"type": "application/json"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"rel": "root",
|
| 116 |
+
"href": "../collection.json",
|
| 117 |
+
"type": "application/json"
|
| 118 |
+
}
|
| 119 |
+
]
|
| 120 |
+
}
|
stac/items/NZL_KP.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "Feature",
|
| 3 |
+
"stac_version": "1.0.0",
|
| 4 |
+
"id": "NZL_KP",
|
| 5 |
+
"collection": "matchgeo-dem-v1",
|
| 6 |
+
"bbox": [
|
| 7 |
+
1547434.000000006,
|
| 8 |
+
5467239.00000001,
|
| 9 |
+
1563324.0000000063,
|
| 10 |
+
5479544.00000001
|
| 11 |
+
],
|
| 12 |
+
"geometry": {
|
| 13 |
+
"type": "Polygon",
|
| 14 |
+
"coordinates": [
|
| 15 |
+
[
|
| 16 |
+
[
|
| 17 |
+
1563324.0000000063,
|
| 18 |
+
5467239.00000001
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
1563324.0000000063,
|
| 22 |
+
5479544.00000001
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
1547434.000000006,
|
| 26 |
+
5479544.00000001
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
1547434.000000006,
|
| 30 |
+
5467239.00000001
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
1563324.0000000063,
|
| 34 |
+
5467239.00000001
|
| 35 |
+
]
|
| 36 |
+
]
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"properties": {
|
| 40 |
+
"title": "Kapiti Coast, New Zealand",
|
| 41 |
+
"description": "Kapiti Coast, New Zealand \u2014 airborne_lidar at 1.0 m resolution",
|
| 42 |
+
"datetime": "2010-01-01T00:00:00Z",
|
| 43 |
+
"start_datetime": "2010-01-01T00:00:00Z",
|
| 44 |
+
"end_datetime": "2025-12-31T23:59:59Z",
|
| 45 |
+
"providers": [
|
| 46 |
+
{
|
| 47 |
+
"name": "LINZ",
|
| 48 |
+
"roles": [
|
| 49 |
+
"producer"
|
| 50 |
+
]
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"gsd": 1.0,
|
| 54 |
+
"proj:epsg": 2193,
|
| 55 |
+
"matchgeo:method": "airborne_lidar",
|
| 56 |
+
"matchgeo:n_tiles": 1776,
|
| 57 |
+
"matchgeo:labelled": false,
|
| 58 |
+
"matchgeo:has_annotations": false,
|
| 59 |
+
"proj:wkt2": "PROJCS[\"NZGD2000 / New Zealand Transverse Mercator 2000\",GEOGCS[\"NZGD2000\",DATUM[\"New_Zealand_Geodetic_Datum_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6167\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4167\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",173],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",1600000],PARAMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"2193\"]]"
|
| 60 |
+
},
|
| 61 |
+
"assets": {
|
| 62 |
+
"dem": {
|
| 63 |
+
"href": "data/NZL_KP/NZL_KP.tif",
|
| 64 |
+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
|
| 65 |
+
"title": "Merged DEM \u2014 NZL_KP",
|
| 66 |
+
"roles": [
|
| 67 |
+
"data"
|
| 68 |
+
],
|
| 69 |
+
"eo:bands": [
|
| 70 |
+
{
|
| 71 |
+
"name": "elevation",
|
| 72 |
+
"common_name": "elevation",
|
| 73 |
+
"unit": "meter"
|
| 74 |
+
}
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
"tiles": {
|
| 78 |
+
"href": "data/NZL_KP/tiles/",
|
| 79 |
+
"type": "application/x-geotiff-tiles",
|
| 80 |
+
"title": "333\u00d7333 pixel tiles \u2014 NZL_KP",
|
| 81 |
+
"roles": [
|
| 82 |
+
"data"
|
| 83 |
+
],
|
| 84 |
+
"x-asset-count": 1776
|
| 85 |
+
},
|
| 86 |
+
"extent": {
|
| 87 |
+
"href": "data/NZL_KP/NZL_KP_extent.geojson",
|
| 88 |
+
"type": "application/geo+json",
|
| 89 |
+
"title": "Coverage extent polygon",
|
| 90 |
+
"roles": [
|
| 91 |
+
"metadata"
|
| 92 |
+
]
|
| 93 |
+
},
|
| 94 |
+
"tile_index": {
|
| 95 |
+
"href": "data/NZL_KP/NZL_KP_tiles.geojson",
|
| 96 |
+
"type": "application/geo+json",
|
| 97 |
+
"title": "Tile index (grid)",
|
| 98 |
+
"roles": [
|
| 99 |
+
"metadata"
|
| 100 |
+
]
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"links": [
|
| 104 |
+
{
|
| 105 |
+
"rel": "self",
|
| 106 |
+
"href": "./NZL_KP.json",
|
| 107 |
+
"type": "application/json"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"rel": "collection",
|
| 111 |
+
"href": "../collection.json",
|
| 112 |
+
"type": "application/json"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"rel": "root",
|
| 116 |
+
"href": "../collection.json",
|
| 117 |
+
"type": "application/json"
|
| 118 |
+
}
|
| 119 |
+
]
|
| 120 |
+
}
|
stac/items/PHL_TA.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "Feature",
|
| 3 |
+
"stac_version": "1.0.0",
|
| 4 |
+
"id": "PHL_TA",
|
| 5 |
+
"collection": "matchgeo-dem-v1",
|
| 6 |
+
"bbox": [
|
| 7 |
+
273003.0,
|
| 8 |
+
1544128.0,
|
| 9 |
+
276571.0,
|
| 10 |
+
1552546.0
|
| 11 |
+
],
|
| 12 |
+
"geometry": {
|
| 13 |
+
"type": "Polygon",
|
| 14 |
+
"coordinates": [
|
| 15 |
+
[
|
| 16 |
+
[
|
| 17 |
+
276571.0,
|
| 18 |
+
1544128.0
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
276571.0,
|
| 22 |
+
1552546.0
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
273003.0,
|
| 26 |
+
1552546.0
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
273003.0,
|
| 30 |
+
1544128.0
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
276571.0,
|
| 34 |
+
1544128.0
|
| 35 |
+
]
|
| 36 |
+
]
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"properties": {
|
| 40 |
+
"title": "Tarlac, Philippines",
|
| 41 |
+
"description": "Tarlac, Philippines \u2014 airborne_lidar at 1.0 m resolution",
|
| 42 |
+
"datetime": "2014-01-01T00:00:00Z",
|
| 43 |
+
"start_datetime": "2014-01-01T00:00:00Z",
|
| 44 |
+
"end_datetime": "2017-12-31T23:59:59Z",
|
| 45 |
+
"providers": [
|
| 46 |
+
{
|
| 47 |
+
"name": "LiPAD",
|
| 48 |
+
"roles": [
|
| 49 |
+
"producer"
|
| 50 |
+
]
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"gsd": 1.0,
|
| 54 |
+
"proj:epsg": 32651,
|
| 55 |
+
"matchgeo:method": "airborne_lidar",
|
| 56 |
+
"matchgeo:n_tiles": 286,
|
| 57 |
+
"matchgeo:labelled": false,
|
| 58 |
+
"matchgeo:has_annotations": false,
|
| 59 |
+
"proj:wkt2": "PROJCS[\"WGS 84 / UTM zone 51N\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",123],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32651\"]]"
|
| 60 |
+
},
|
| 61 |
+
"assets": {
|
| 62 |
+
"dem": {
|
| 63 |
+
"href": "data/PHL_TA/PHL_TA.tif",
|
| 64 |
+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
|
| 65 |
+
"title": "Merged DEM \u2014 PHL_TA",
|
| 66 |
+
"roles": [
|
| 67 |
+
"data"
|
| 68 |
+
],
|
| 69 |
+
"eo:bands": [
|
| 70 |
+
{
|
| 71 |
+
"name": "elevation",
|
| 72 |
+
"common_name": "elevation",
|
| 73 |
+
"unit": "meter"
|
| 74 |
+
}
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
"tiles": {
|
| 78 |
+
"href": "data/PHL_TA/tiles/",
|
| 79 |
+
"type": "application/x-geotiff-tiles",
|
| 80 |
+
"title": "333\u00d7333 pixel tiles \u2014 PHL_TA",
|
| 81 |
+
"roles": [
|
| 82 |
+
"data"
|
| 83 |
+
],
|
| 84 |
+
"x-asset-count": 286
|
| 85 |
+
},
|
| 86 |
+
"extent": {
|
| 87 |
+
"href": "data/PHL_TA/PHL_TA_extent.geojson",
|
| 88 |
+
"type": "application/geo+json",
|
| 89 |
+
"title": "Coverage extent polygon",
|
| 90 |
+
"roles": [
|
| 91 |
+
"metadata"
|
| 92 |
+
]
|
| 93 |
+
},
|
| 94 |
+
"tile_index": {
|
| 95 |
+
"href": "data/PHL_TA/PHL_TA_tiles.geojson",
|
| 96 |
+
"type": "application/geo+json",
|
| 97 |
+
"title": "Tile index (grid)",
|
| 98 |
+
"roles": [
|
| 99 |
+
"metadata"
|
| 100 |
+
]
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"links": [
|
| 104 |
+
{
|
| 105 |
+
"rel": "self",
|
| 106 |
+
"href": "./PHL_TA.json",
|
| 107 |
+
"type": "application/json"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"rel": "collection",
|
| 111 |
+
"href": "../collection.json",
|
| 112 |
+
"type": "application/json"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"rel": "root",
|
| 116 |
+
"href": "../collection.json",
|
| 117 |
+
"type": "application/json"
|
| 118 |
+
}
|
| 119 |
+
]
|
| 120 |
+
}
|
stac/items/USA_GC.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "Feature",
|
| 3 |
+
"stac_version": "1.0.0",
|
| 4 |
+
"id": "USA_GC",
|
| 5 |
+
"collection": "matchgeo-dem-v1",
|
| 6 |
+
"bbox": [
|
| 7 |
+
285921.5,
|
| 8 |
+
3970034.5,
|
| 9 |
+
289976.5,
|
| 10 |
+
3974030.0
|
| 11 |
+
],
|
| 12 |
+
"geometry": {
|
| 13 |
+
"type": "Polygon",
|
| 14 |
+
"coordinates": [
|
| 15 |
+
[
|
| 16 |
+
[
|
| 17 |
+
289976.5,
|
| 18 |
+
3970034.5
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
289976.5,
|
| 22 |
+
3974030.0
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
285921.5,
|
| 26 |
+
3974030.0
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
285921.5,
|
| 30 |
+
3970034.5
|
| 31 |
+
],
|
| 32 |
+
[
|
| 33 |
+
289976.5,
|
| 34 |
+
3970034.5
|
| 35 |
+
]
|
| 36 |
+
]
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"properties": {
|
| 40 |
+
"title": "Grand Canyon, United States",
|
| 41 |
+
"description": "Grand Canyon, United States \u2014 lidar_ifsar at 10.0 m resolution",
|
| 42 |
+
"datetime": "2020-01-01T00:00:00Z",
|
| 43 |
+
"start_datetime": "2020-01-01T00:00:00Z",
|
| 44 |
+
"end_datetime": "2026-12-31T23:59:59Z",
|
| 45 |
+
"providers": [
|
| 46 |
+
{
|
| 47 |
+
"name": "USGS 3DEP",
|
| 48 |
+
"roles": [
|
| 49 |
+
"producer"
|
| 50 |
+
]
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"gsd": 10.0,
|
| 54 |
+
"proj:epsg": 6341,
|
| 55 |
+
"matchgeo:method": "lidar_ifsar",
|
| 56 |
+
"matchgeo:n_tiles": 600,
|
| 57 |
+
"matchgeo:labelled": false,
|
| 58 |
+
"matchgeo:has_annotations": false,
|
| 59 |
+
"proj:wkt2": "COMPD_CS[\"NAD83(2011) / UTM zone 12N + NAVD88 height\",PROJCS[\"NAD83(2011) / UTM zone 12N\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",-111],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"6341\"]],VERT_CS[\"NAVD88 height\",VERT_DATUM[\"North American Vertical Datum 1988\",2005,AUTHORITY[\"EPSG\",\"5103\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Gravity-related height\",UP],AUTHORITY[\"EPSG\",\"5703\"]]]"
|
| 60 |
+
},
|
| 61 |
+
"assets": {
|
| 62 |
+
"dem": {
|
| 63 |
+
"href": "data/USA_GC/USA_GC.tif",
|
| 64 |
+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
|
| 65 |
+
"title": "Merged DEM \u2014 USA_GC",
|
| 66 |
+
"roles": [
|
| 67 |
+
"data"
|
| 68 |
+
],
|
| 69 |
+
"eo:bands": [
|
| 70 |
+
{
|
| 71 |
+
"name": "elevation",
|
| 72 |
+
"common_name": "elevation",
|
| 73 |
+
"unit": "meter"
|
| 74 |
+
}
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
"tiles": {
|
| 78 |
+
"href": "data/USA_GC/tiles/",
|
| 79 |
+
"type": "application/x-geotiff-tiles",
|
| 80 |
+
"title": "333\u00d7333 pixel tiles \u2014 USA_GC",
|
| 81 |
+
"roles": [
|
| 82 |
+
"data"
|
| 83 |
+
],
|
| 84 |
+
"x-asset-count": 600
|
| 85 |
+
},
|
| 86 |
+
"extent": {
|
| 87 |
+
"href": "data/USA_GC/USA_GC_extent.geojson",
|
| 88 |
+
"type": "application/geo+json",
|
| 89 |
+
"title": "Coverage extent polygon",
|
| 90 |
+
"roles": [
|
| 91 |
+
"metadata"
|
| 92 |
+
]
|
| 93 |
+
},
|
| 94 |
+
"tile_index": {
|
| 95 |
+
"href": "data/USA_GC/USA_GC_tiles.geojson",
|
| 96 |
+
"type": "application/geo+json",
|
| 97 |
+
"title": "Tile index (grid)",
|
| 98 |
+
"roles": [
|
| 99 |
+
"metadata"
|
| 100 |
+
]
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"links": [
|
| 104 |
+
{
|
| 105 |
+
"rel": "self",
|
| 106 |
+
"href": "./USA_GC.json",
|
| 107 |
+
"type": "application/json"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"rel": "collection",
|
| 111 |
+
"href": "../collection.json",
|
| 112 |
+
"type": "application/json"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"rel": "root",
|
| 116 |
+
"href": "../collection.json",
|
| 117 |
+
"type": "application/json"
|
| 118 |
+
}
|
| 119 |
+
]
|
| 120 |
+
}
|