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
('nenzing','C8 Nenzing (ÖAMTC)',47.18528,9.70556,'vorarlberg','base','ÖAMTC Stützpunkt'),
('hohenems','Hohenems (Flugplatz)',47.33833,9.69972,'vorarlberg','base','Flugplatz LOIH'),
('feldkirch','Feldkirch',47.23528,9.59806,'vorarlberg','city','Grenzstadt CH/FL'),
('rankweil','Rankweil',47.27222,9.64444,'vorarlberg','city','Wallfahrtsort'),
('goetzis','Götzis',47.33167,9.63444,'vorarlberg','city','Hypomeeting'),
('dornbirn','Dornbirn',47.41250,9.74167,'vorarlberg','city','Größte Stadt Vlbg'),
('bregenz','Bregenz',47.50278,9.74722,'vorarlberg','city','Landeshauptstadt'),
('lustenau','Lustenau',47.42083,9.65833,'vorarlberg','city','Grenzgemeinde CH'),
('bludenz','Bludenz',47.15444,9.82167,'vorarlberg','city','Tor zu 3 Tälern'),
('buers','Bürs',47.15139,9.80000,'vorarlberg','village',NULL),
('nueziders','Nüziders',47.17083,9.80000,'vorarlberg','village',NULL),
('innerbraz','Innerbraz',47.14750,9.90000,'vorarlberg','village','Klostertal'),
('kloesterle','Klösterle',47.12917,10.08333,'vorarlberg','village','Klostertal'),
('stuben','Stuben am Arlberg',47.13000,10.18750,'vorarlberg','village','Arlberg'),
('langen','Langen am Arlberg',47.12833,10.11667,'vorarlberg','village','Arlbergtunnel'),
('schruns','Schruns',47.07972,9.91667,'vorarlberg','city','Montafon Hauptort'),
('tschagguns','Tschagguns',47.07778,9.90000,'vorarlberg','village','Montafon'),
('stgallenk','St. Gallenkirch',47.02222,9.97222,'vorarlberg','village','Montafon'),
('gaschurn','Gaschurn',46.98556,10.02278,'vorarlberg','village','Hinteres Montafon'),
('partenen','Partenen',46.96889,10.06389,'vorarlberg','village','Silvretta-Zugang'),
('thueringen','Thüringen',47.21667,9.76667,'vorarlberg','village','Walgau'),
('zwischenwasser','Zwischenwasser',47.23333,9.81667,'vorarlberg','village','Walgau'),
('laterns','Laterns',47.26111,9.72500,'vorarlberg','village','Laternsertal'),
('damuels','Damüls',47.28333,9.88611,'vorarlberg','village','Schneereichstes Dorf'),
('fontanella','Fontanella',47.26667,9.93889,'vorarlberg','village','Großes Walsertal'),
('sonntag','Sonntag',47.23333,9.91111,'vorarlberg','village','Großes Walsertal'),
('egg','Egg',47.43167,9.89444,'vorarlberg','city','Bregenzerwald'),
('bezau','Bezau',47.38611,9.90000,'vorarlberg','city','Käsetradition'),
('mellau','Mellau',47.35000,9.88056,'vorarlberg','village','Canyoning'),
('au','Au',47.32500,9.97500,'vorarlberg','village','Bregenzerwald'),
('schoppernau','Schoppernau',47.30833,10.01667,'vorarlberg','village','Bregenzerwald'),
('warth','Warth',47.25333,10.18833,'vorarlberg','village','Ski Arlberg'),
('schroecken','Schröcken',47.25833,10.09167,'vorarlberg','village','Hochtannberg'),
('brand','Brand',47.10028,9.73361,'vorarlberg','village','Brandnertal'),
('riezlern','Riezlern',47.35833,10.19167,'vorarlberg','village','Kleinwalsertal'),
('mittelberg','Mittelberg',47.33333,10.15000,'vorarlberg','village','Kleinwalsertal'),
('innsbruck','C1 Innsbruck (ÖAMTC)',47.26333,11.39444,'tirol','base','Klinik Innsbruck'),
('zams_c5','C5 Zams (ÖAMTC)',47.15972,10.59333,'tirol','base','KH Zams'),
('kitzbuehel_c4','C4 Kitzbühel (ÖAMTC)',47.38011,12.35800,'tirol','base','Reith bei Kitzbühel'),
('lienz_c7','C7 Lienz (ÖAMTC)',46.82970,12.76470,'tirol','base','Osttirol'),
('hall','Hall in Tirol',47.28944,11.50833,'tirol','city','Münzstadt'),
('schwaz','Schwaz',47.35222,11.71028,'tirol','city','Silberstadt'),
('woergl','Wörgl',47.48889,12.06389,'tirol','city','Freigeld-Experiment'),
('kufstein','Kufstein',47.58333,12.16667,'tirol','city','Festungsstadt'),
('telfs','Telfs',47.31278,11.06972,'tirol','city','Fasnacht'),
('imst','Imst',47.24500,10.73972,'tirol','city','Schemenlaufen'),
('landeck','Landeck',47.13944,10.56667,'tirol','city','Inn und Sanna'),
('reutte','Reutte',47.48583,10.71806,'tirol','city','Außerfern'),
('oetz','Ötz',47.20833,10.89333,'tirol','village','Ötztal'),
('soelden','Sölden',46.96667,10.87500,'tirol','village','Gletscherskigebiet'),
('obergurgl','Obergurgl',46.87000,11.03000,'tirol','village','1930m Höhe'),
('jenbach','Jenbach',47.39222,11.77500,'tirol','city','Dampfzahnradbahn'),
('zell_ziller','Zell am Ziller',47.22861,11.88222,'tirol','city','Gauder Fest'),
('mayrhofen','Mayrhofen',47.15944,11.86111,'tirol','city','Zillertal'),
('hintertux','Hintertux',47.08333,11.65000,'tirol','village','Gletscher 3250m'),
('steinach','Steinach am Brenner',47.08861,11.46722,'tirol','village','Wipptal'),
('brenner','Brenner',47.04222,11.50667,'tirol','pass','Alpenpass nach Italien'),
('matrei','Matrei in Osttirol',47.00000,12.53333,'tirol','village','Iseltal'),
('kals','Kals am Großglockner',47.00833,12.64167,'tirol','village','Glockner-Zugang'),
('sillian','Sillian',46.75194,12.42194,'tirol','village','Grenze Italien'),
('st_anton','St. Anton am Arlberg',47.12861,10.26528,'tirol','village','Wiege des Skilaufs'),
('kitzbuehel_ort','Kitzbühel',47.44639,12.39222,'tirol','city','Hahnenkamm'),
('st_johann','St. Johann in Tirol',47.52278,12.42472,'tirol','city','Kaisergebirge'),
('seefeld','Seefeld',47.33000,11.19000,'tirol','village','Olympia-Ort'),
('scharnitz','Scharnitz',47.38889,11.26472,'tirol','village','Karwendel-Tor'),
('fulpmes','Fulpmes',47.15583,11.35333,'tirol','village','Stubaital'),
('neustift','Neustift im Stubaital',47.11083,11.31167,'tirol','village','Stubaital'),
('bergrettung_muels','Skiunfall Damüls-Mellau',47.28000,9.88500,'vorarlberg','target','Skigebiet'),
('skiunfall_soelden','Skiunfall Sölden',46.97000,10.86000,'tirol','target','Skigebiet'),
('verkehr_a14','Unfall A14 Rankweil',47.26500,9.64750,'vorarlberg','target','Autobahnabfahrt');
