diff --git a/www/index.html.de b/www/index.html.de index 3c72833..078bd3b 100644 --- a/www/index.html.de +++ b/www/index.html.de @@ -115,8 +115,8 @@ - - + + @@ -129,6 +129,7 @@ +

Download als CSV

diff --git a/www/misc.js b/www/misc.js index 5123e25..04ac8e4 100644 --- a/www/misc.js +++ b/www/misc.js @@ -92,6 +92,7 @@ var config = { ajax: { timeout: 10000, // 10 seconds eventURL: 'https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/event/1/query', + dlsvURL: 'dlsv', mseedURL: 'https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/dataselect/1/query', stationURL: 'https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/station/1/query', nominatimURL: '//open.mapquestapi.com/nominatim/v1/reverse.php', @@ -130,12 +131,18 @@ var config = { networkBlacklist: ['NL', 'X5'], }, }; +var networkURL = { + GE: 'http://dx.doi.org/10.14470/TR560404', + GR: 'http://www.bgr.bund.de/DE/Themen/Erdbeben-Gefaehrdungsanalysen/Seismologie/Seismologie/Seismometer_Stationen/Stationsnetze/d_stationsnetz_node.html', + NL: 'http://www.knmi.nl/seismologie/seismisch_network_knmi3.html', +}; var networkText = { - GE: 'GEOFON Program, GFZ Potsdam, Germany', - GR: 'German Regional Seismic Network, BGR Hannover, Germany', - NL: 'Netherlands Seismic Network, The Netherlands', + GE: 'GEOFON Program, GFZ Potsdam', + GR: 'German Regional Seismic Network, BGR Hannover', + NL: 'Netherlands Seismic Network, The Netherlands', RN: 'RuhrNet - Ruhr-University Bochum, Germany', }; +var bochumStation = ['BUG', 'IBBN', 'KERA', 'KARP']; /********************************************************************** * document ready * @@ -173,7 +180,7 @@ $(document).ready(function() { // create tabs var tabOptions = { - active: 0, + active: 1, disabled: [2, 3], activate: function( event, ui ) { ui['newPanel'].find('table').trigger("update", [true]); }, }; diff --git a/www/stations.js b/www/stations.js index eb826ca..f9d5d36 100644 --- a/www/stations.js +++ b/www/stations.js @@ -65,11 +65,30 @@ function loadStations(stime, etime) { // general station info (1st line) var row = sprintf('%s%s%7.4f%7.4f' , network, station, Number(lat), Number(lng)); // setting up network details (2nd line) - row += sprintf('%s', networkText[network] || ''); - // setting up station details (3rd line) - row += 'not implemented'; - // setting up download links (4th line) - row += 'not implemented'; + row += sprintf('%s', networkText[network] || ''); + row += ( $.inArray(station, bochumStation)+1 ) ? '
Betreiber: Ruhr-Universität Bochum' : '' ; + if ( network == 'RN' || network == 'X5' || $.inArray(station, bochumStation)+1 ) { + // setting up station details (3rd line) + row += 'not implemented'; + // setting up download links (4th line) + var URL, fdsnxmlURL, fdsnxmlRespURL, sc3mlURL, sc3mlRespURL, dlsvURL; + URL = sprintf('%s?network=%s&station=%s', config['ajax']['stationURL'], network, station); + fdsnxmlURL = URL + '&level=station&format=xml'; + fdsnxmlRespURL = URL + '&level=response&format=xml'; + sc3mlURL = URL + '&level=station&format=sc3ml'; + sc3mlRespURL = URL + '&level=response&format=sc3ml'; + dlsvFile = sprintf('%s_%s.dlsv', network.toUpperCase(), station.toUpperCase()); + row += '' + + sprintf('Download details: FDSNxml or SC3ml
', fdsnxmlURL, sc3mlURL) + + sprintf('Response files: FDSNxml, SC3ml ', fdsnxmlRespURL, sc3mlRespURL) + + sprintf('or datalessSEED', config['ajax']['dlsvURL'] + '/' + dlsvFile, dlsvFile.toLowerCase()) + + ''; + } + else { + row += 'Kontaktieren Sie den '; + row += ( networkURL[network.toUpperCase()] ) ? 'Netzwerkkoordinator' : 'Netzwerkkoordinator'; + row += ' für weitere Details.'; + }; $('#stationstable tbody').append(row); addStationMarker(stationID, Number(lat), Number(lng), stationText.toUpperCase()); }; @@ -88,6 +107,9 @@ function loadStations(stime, etime) { stationLayer.bringToFront(); } }); + // create stations csv download link + request_data['format'] = 'text'; + $('#stations-csv-link').attr('href', config['ajax']['stationURL']+'?'+$.param(request_data)); }; /* initStationTable */