CREATE TABLE IF NOT EXISTS geo_waypoints (
  id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  wp_key VARCHAR(32) NOT NULL UNIQUE,
  name VARCHAR(100) NOT NULL,
  lat DECIMAL(8,5) NOT NULL,
  lon DECIMAL(8,5) NOT NULL,
  region VARCHAR(32) DEFAULT 'vorarlberg',
  wp_type ENUM('base','city','village','peak','target','pass') DEFAULT 'village',
  info VARCHAR(255),
  updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB;

DELETE FROM geo_waypoints;

INSERT INTO geo_waypoints (wp_key, name, lat, lon, region, wp_type, info) VALUES
('innsbruck','C1 Innsbruck (ÖAMTC)',47.25970,11.34190,'tirol','base','Klinik Innsbruck'),
('kitzbuehel_c4','C4 Kitzbühel (ÖAMTC)',47.48870,12.36480,'tirol','base','Reith bei Kitzbühel'),
('zams_c5','C5 Zams (ÖAMTC)',47.15972,10.59333,'tirol','base','KH Zams'),
('lienz_c7','C7 Lienz (ÖAMTC)',46.83505,12.76460,'tirol','base','Osttirol'),
('hall','Hall in Tirol',47.28166,11.50753,'tirol','city','Münzstadt'),
('imst','Imst',47.23815,10.74070,'tirol','city','Schemenlaufen'),
('jenbach','Jenbach',47.39222,11.77500,'tirol','city','Dampfzahnradbahn'),
('kitzbuehel_ort','Kitzbühel',47.44639,12.39222,'tirol','city','Hahnenkamm'),
('kufstein','Kufstein',47.58333,12.16667,'tirol','city','Festungsstadt'),
('landeck','Landeck',47.14241,10.57046,'tirol','city','Inn und Sanna'),
('mayrhofen','Mayrhofen',47.16722,11.86387,'tirol','city','Zillertal'),
('reutte','Reutte',47.48911,10.71880,'tirol','city','Außerfern'),
('schwaz','Schwaz',47.34495,11.70843,'tirol','city','Silberstadt'),
('st_johann','St. Johann in Tirol',47.52241,12.42868,'tirol','city','Kaisergebirge'),
('telfs','Telfs',47.30465,11.07152,'tirol','city','Fasnacht'),
('woergl','Wörgl',47.48889,12.06389,'tirol','city','Freigeld-Experiment'),
('zell_ziller','Zell am Ziller',47.23360,11.88199,'tirol','city','Gauder Fest'),
('fulpmes','Fulpmes',47.15310,11.34906,'tirol','village','Stubaital'),
('hintertux','Hintertux',47.11500,11.68250,'tirol','village','Gletscher 3250m'),
('kals','Kals am Großglockner',47.00238,12.64585,'tirol','village','Glockner-Zugang'),
('matrei','Matrei in Osttirol',47.00000,12.53333,'tirol','village','Iseltal'),
('neustift','Neustift im Stubaital',47.11064,11.30758,'tirol','village','Stubaital'),
('obergurgl','Obergurgl',46.87000,11.03000,'tirol','village','1930m Höhe'),
('oetz','Ötz',47.19860,10.90310,'tirol','village','Ötztal'),
('scharnitz','Scharnitz',47.38889,11.26472,'tirol','village','Karwendel-Tor'),
('seefeld','Seefeld',47.33000,11.19000,'tirol','village','Olympia-Ort'),
('sillian','Sillian',46.74729,12.41803,'tirol','village','Grenze Italien'),
('soelden','Sölden',46.96660,11.00730,'tirol','village','Gletscherskigebiet'),
('st_anton','St. Anton am Arlberg',47.12861,10.26528,'tirol','village','Wiege des Skilaufs'),
('steinach','Steinach am Brenner',47.08861,11.46722,'tirol','village','Wipptal'),
('skiunfall_soelden','Skiunfall Sölden',46.97564,10.97486,'tirol','target','Skigebiet'),
('brenner','Brenner',47.00740,11.50670,'tirol','pass','Alpenpass nach Italien'),
('nenzing','C8 Nenzing (ÖAMTC)',47.20900,9.66000,'vorarlberg','base','ÖAMTC Stützpunkt'),
('hohenems','Hohenems (Flugplatz)',47.38440,9.69930,'vorarlberg','base','Flugplatz LOIH'),
('bezau','Bezau',47.38611,9.90000,'vorarlberg','city','Käsetradition'),
('bludenz','Bludenz',47.15444,9.82167,'vorarlberg','city','Tor zu 3 Tälern'),
('bregenz','Bregenz',47.50278,9.74722,'vorarlberg','city','Landeshauptstadt'),
('dornbirn','Dornbirn',47.41250,9.74167,'vorarlberg','city','Größte Stadt Vlbg'),
('egg','Egg',47.43167,9.89444,'vorarlberg','city','Bregenzerwald'),
('feldkirch','Feldkirch',47.23528,9.59806,'vorarlberg','city','Grenzstadt CH/FL'),
('goetzis','Götzis',47.33513,9.64401,'vorarlberg','city','Hypomeeting'),
('lustenau','Lustenau',47.42765,9.65994,'vorarlberg','city','Grenzgemeinde CH'),
('rankweil','Rankweil',47.27222,9.64444,'vorarlberg','city','Wallfahrtsort'),
('schruns','Schruns',47.07972,9.91667,'vorarlberg','city','Montafon Hauptort'),
('au','Au',47.32246,9.97748,'vorarlberg','village','Bregenzerwald'),
('brand','Brand',47.10425,9.73788,'vorarlberg','village','Brandnertal'),
('buers','Bürs',47.15139,9.80000,'vorarlberg','village',NULL),
('damuels','Damüls',47.28045,9.89096,'vorarlberg','village','Schneereichstes Dorf'),
('fontanella','Fontanella',47.24750,9.90880,'vorarlberg','village','Großes Walsertal'),
('gaschurn','Gaschurn',46.98333,10.03333,'vorarlberg','village','Hinteres Montafon'),
('innerbraz','Innerbraz',47.14443,9.91579,'vorarlberg','village','Klostertal'),
('kloesterle','Klösterle',47.13128,10.09213,'vorarlberg','village','Klostertal'),
('langen','Langen am Arlberg',47.13211,10.12073,'vorarlberg','village','Arlbergtunnel'),
('laterns','Laterns',47.27040,9.76590,'vorarlberg','village','Laternsertal'),
('mellau','Mellau',47.35000,9.88056,'vorarlberg','village','Canyoning'),
('mittelberg','Mittelberg',47.32410,10.15445,'vorarlberg','village','Kleinwalsertal'),
('nueziders','Nüziders',47.17083,9.80000,'vorarlberg','village',NULL),
('partenen','Partenen',46.96889,10.06389,'vorarlberg','village','Silvretta-Zugang'),
('riezlern','Riezlern',47.35833,10.19167,'vorarlberg','village','Kleinwalsertal'),
('schoppernau','Schoppernau',47.31336,10.01509,'vorarlberg','village','Bregenzerwald'),
('schroecken','Schröcken',47.25833,10.09167,'vorarlberg','village','Hochtannberg'),
('sonntag','Sonntag',47.23779,9.89587,'vorarlberg','village','Großes Walsertal'),
('stgallenk','St. Gallenkirch',47.02222,9.97222,'vorarlberg','village','Montafon'),
('stuben','Stuben am Arlberg',47.13775,10.17627,'vorarlberg','village','Arlberg'),
('thueringen','Thüringen',47.20000,9.76667,'vorarlberg','village','Walgau'),
('tschagguns','Tschagguns',47.07778,9.90000,'vorarlberg','village','Montafon'),
('warth','Warth',47.25817,10.18335,'vorarlberg','village','Ski Arlberg'),
('zwischenwasser','Zwischenwasser',47.28160,9.66390,'vorarlberg','village','Walgau'),
('bergrettung_muels','Skiunfall Damüls-Mellau',47.29325,9.88957,'vorarlberg','target','Skigebiet'),
('verkehr_a14','Unfall A14 Rankweil',47.27063,9.62238,'vorarlberg','target','Autobahnabfahrt');
