1e51ef7def
- Konzept/, didaktik_geografie/, didaktik_simulation/, v2-modules/, v2-platform/ - 12 code-workspace-Files - STATUS-*.md - viele M/D/R-Änderungen an bereits getrackten Files - .gitignore verstärkt: **/.humaninput/, **/secret_keys.txt Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
36 lines
1.3 KiB
PHP
36 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* Koordinaten-Korrekturen aus dem Audit vom 2026-04-19.
|
|
* Quelle: OSM/Nominatim, manuell gegengeprüft.
|
|
*/
|
|
require_once __DIR__ . '/config/app.php';
|
|
require_once __DIR__ . '/config/db.php';
|
|
|
|
$corrections = [
|
|
['zwischenwasser', 47.28160, 9.66390, 'Zwischenwasser (Laternsertal, Bez. Feldkirch)'],
|
|
['soelden', 46.96660, 11.00730, 'Sölden (Ötztal, Bez. Imst)'],
|
|
['hintertux', 47.11500, 11.68250, 'Hintertux (Tux, Bez. Schwaz)'],
|
|
['laterns', 47.27040, 9.76590, 'Laterns (Bez. Feldkirch)'],
|
|
['fontanella', 47.24750, 9.90880, 'Fontanella (Großes Walsertal, Bez. Bludenz)'],
|
|
];
|
|
|
|
$db = getDB();
|
|
$stmt = $db->prepare("UPDATE geo_waypoints SET lat=?, lon=? WHERE wp_key=?");
|
|
$log = [];
|
|
foreach ($corrections as [$key, $lat, $lon, $note]) {
|
|
$before = $db->prepare("SELECT lat, lon FROM geo_waypoints WHERE wp_key=?");
|
|
$before->execute([$key]);
|
|
$old = $before->fetch();
|
|
$stmt->execute([$lat, $lon, $key]);
|
|
$log[] = [
|
|
'wp_key' => $key,
|
|
'note' => $note,
|
|
'old' => $old ? [(float)$old['lat'], (float)$old['lon']] : null,
|
|
'new' => [$lat, $lon],
|
|
'rows_updated' => $stmt->rowCount(),
|
|
];
|
|
}
|
|
|
|
header('Content-Type: application/json; charset=utf-8');
|
|
echo json_encode(['ok' => true, 'applied' => count($log), 'log' => $log], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
|