Compare commits
2 Commits
release/r2
...
support/if
| Author | SHA1 | Date | |
|---|---|---|---|
| b7e13d7649 | |||
| a3138ae638 |
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -1,8 +1,8 @@
|
||||
* text=auto !eol
|
||||
scripts/mkEvents.csh -text
|
||||
wsgi/showEnv.py -text
|
||||
www/.htaccess -text
|
||||
www/copyright.inc.de -text
|
||||
www/eventsXML.js -text
|
||||
www/external/TileLayer.Grayscale.js -text
|
||||
www/external/css/dvf.css -text
|
||||
www/external/css/leaflet.label.css -text
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,5 +1,3 @@
|
||||
scripts/events.xml
|
||||
scripts/geolocation.js
|
||||
wsgi/.idea
|
||||
www/dlsv
|
||||
www/event.xml
|
||||
@@ -7,5 +5,3 @@ www/events.xml
|
||||
www/geolocation.js
|
||||
www/geolocationTable.js
|
||||
www/stations.xml
|
||||
|
||||
.vscode/settings.json
|
||||
|
||||
@@ -1,4 +1 @@
|
||||
#!/bin/bash
|
||||
|
||||
STIME=$1
|
||||
curl -o events.xml "https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/event/1/query?starttime=${STIME}&orderby=time&minlat=50.92&maxlat=52.76&minlon=4.26&maxlon=9.74&minmag=1.1"
|
||||
curl -o events.xml "https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/event/1/query?starttime=2014-08-01&orderby=time&minlat=50.92&maxlat=52.76&minlon=4.26&maxlon=9.74&minmag=1.1"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
curl -s "https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/event/1/query?minlat=50&maxlat=54&minlon=3&maxlon=10&minmag=1" | mkGeolocationTable.py > geolocationTable.js
|
||||
|
||||
License
|
||||
Copyright 2020 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
Copyright 2014 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
@@ -39,8 +39,6 @@ def mkGeolocationTable(file=''):
|
||||
import xml.etree.ElementTree as ET
|
||||
from sys import stdin
|
||||
import warnings
|
||||
from time import sleep
|
||||
from geopy.geocoders import Photon
|
||||
import urllib2 as URL
|
||||
import json as JSON
|
||||
|
||||
@@ -53,7 +51,6 @@ def mkGeolocationTable(file=''):
|
||||
warnings.formatwarning = simple_warning
|
||||
|
||||
# try loading the file
|
||||
geolocationTable = {}
|
||||
if file :
|
||||
try:
|
||||
jsonfile = open(file)
|
||||
@@ -65,7 +62,6 @@ def mkGeolocationTable(file=''):
|
||||
|
||||
# parse event.xml
|
||||
DOM = ET.parse(stdin).getroot()
|
||||
geolocator = Photon()
|
||||
|
||||
# iterate over all events
|
||||
for event in DOM.iterfind('qml:eventParameters/qml:event', namespaces):
|
||||
@@ -79,30 +75,37 @@ def mkGeolocationTable(file=''):
|
||||
elif evaluationMode == 'automatic':
|
||||
warnings.warn('Skipping automatic event %s' %(publicID))
|
||||
else:
|
||||
try:
|
||||
location = geolocator.reverse("{lat}, {lng}".format(lat=lat, lng=lng))
|
||||
except:
|
||||
warnings.warn('Reverse Geolocation failed. Skipping event.')
|
||||
sleep(1.1)
|
||||
continue
|
||||
place = []
|
||||
try:
|
||||
place = location.raw['properties']['city']
|
||||
except KeyError:
|
||||
#warnings.warn('Processing event %s' %publicID)
|
||||
# send and evaluate nominatim request
|
||||
url = 'https://open.mapquestapi.com/nominatim/v1/reverse.php?lat={0}&lon={1}&zoom=10&format=json'.format(lat, lng)
|
||||
response = URL.urlopen(url)
|
||||
if ( response.msg == 'OK' ):
|
||||
data = JSON.loads(response.read())
|
||||
city = []
|
||||
try:
|
||||
place = location.raw['properties']['town']
|
||||
except KeyError:
|
||||
try:
|
||||
place = location.raw['properties']['village']
|
||||
except KeyError:
|
||||
city = data['address']['city']
|
||||
except:
|
||||
warnings.warn('Request {3} for event {0} at {1} N / {2} E did not provide city attribute\n\t(Response: {4})'.format(publicID, lat, lng, url, data))
|
||||
try:
|
||||
place = location.raw['properties']['county']
|
||||
except KeyError:
|
||||
warnings.warn('Could not extract city for event {0} at {1} N / {2} E (URL: {3})'.format(publicID, lat, lng, url))
|
||||
warnings.warn('Sucessfully looked up location for event {0}.'.format(publicID))
|
||||
geolocationTable[publicID] = place
|
||||
sleep(1.1)
|
||||
|
||||
city = data['address']['town']
|
||||
warnings.warn('Using attribute town ({1}) for event {0}'.format(publicID, city))
|
||||
except:
|
||||
try:
|
||||
city = data['address']['county']
|
||||
warnings.warn('Using attribute county ({1}) for event {0}'.format(publicID, city))
|
||||
except:
|
||||
warnings.warn('Skipping event')
|
||||
continue
|
||||
countryCode = data['address']['country_code'].upper()
|
||||
if ( countryCode == 'DE' ):
|
||||
geolocationTable[publicID] = city.encode('utf-8')
|
||||
else:
|
||||
geolocationTable[publicID] = '{0} ({1})'.format(city.encode('utf-8'), countryCode)
|
||||
except:
|
||||
warnings.warn('Could not extract city for event {0} at {1} N / {2} E (URL: {3})'.format(publicID, lat, lng, url))
|
||||
else:
|
||||
warnings.warn('Request {0} failed'.format(url))
|
||||
# dump json
|
||||
print 'var geolocationTable = '+JSON.dumps(geolocationTable, sort_keys=True)+';'
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
$Id$
|
||||
|
||||
:license
|
||||
Copyright 2020 Kasper Fischer <kasper.fischer@ruhr-uni-bochum.de>
|
||||
Copyright 2015 Kasper Fischer <kasper.fischer@ruhr-uni-bochum.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -133,7 +133,7 @@ def fancy_plot(st, wsgi=False, img_format='png', color=True):
|
||||
|
||||
|
||||
def trace_dayplot(st, deltat = None,
|
||||
ftype='none', fmin=1.0, fmax=7.0,
|
||||
ftype='bandpass', fmin=1.0, fmax=7.0,
|
||||
col=('b', 'r', 'g'), interval=20, outpattern='',
|
||||
wsgi=False):
|
||||
"""
|
||||
@@ -260,24 +260,18 @@ def main(backend=None, args=None, wsgi=False):
|
||||
if args['stime']:
|
||||
otime = UTCDateTime(args['stime'])
|
||||
else:
|
||||
otime = UTCDateTime() - 3600. - deltat
|
||||
otime = UTCDateTime() - 3600 - deltat
|
||||
network = args['station'].split('.')[0]
|
||||
station = args['station'].split('.')[1]
|
||||
if args['type'] == 'dayplot':
|
||||
if network == 'Z3':
|
||||
channel = 'HHZ'
|
||||
else:
|
||||
channel = 'BHZ'
|
||||
channel = 'BHZ'
|
||||
else:
|
||||
if args['length'] < 3600.:
|
||||
if args['length'] < 3600:
|
||||
channel = 'HH?'
|
||||
else:
|
||||
if network == 'Z3':
|
||||
channel = 'HH?'
|
||||
else:
|
||||
channel = 'BH?'
|
||||
channel = 'BH?'
|
||||
else:
|
||||
otime = UTCDateTime() - 3600.
|
||||
otime = UTCDateTime('2014-11-15T11:35:25Z')
|
||||
deltat = 30
|
||||
network = 'GR'
|
||||
station = 'BUG'
|
||||
@@ -404,4 +398,4 @@ if __name__ == "__main__":
|
||||
if os.getenv('DISPLAY'):
|
||||
main(args=cla)
|
||||
else:
|
||||
main('Agg', cla)
|
||||
main('Agg', cla)
|
||||
@@ -1,17 +0,0 @@
|
||||
def application(environ, start_response):
|
||||
"""
|
||||
Function application - Wrapper to process wsgi request
|
||||
:param environ: contains information on the wsgi environment
|
||||
:type environ: dict
|
||||
:param start_response: function to process response header by the wsgi server
|
||||
:type start_response: function
|
||||
:return: response to be sent to the client by the wsgi server
|
||||
:rtype: list
|
||||
"""
|
||||
|
||||
from cgi import FieldStorage
|
||||
|
||||
form = FieldStorage(fp=environ['wsgi.input'], environ=environ)
|
||||
|
||||
start_response('200 OK', [('Content-Type', 'text/html')])
|
||||
return [form]
|
||||
@@ -7,7 +7,7 @@ Subversion information:
|
||||
$Id$
|
||||
|
||||
license: gpl3
|
||||
Copyright 2012-2020 Seismological Observatory, Ruhr-University Bochum
|
||||
Copyright 2012-2015 Seismological Observatory, Ruhr-University Bochum
|
||||
http://www.gmg.ruhr-uni-bochum.de/geophysik/seisobs
|
||||
Contributors:
|
||||
Martina Rische <martina.rische@rub.de>
|
||||
|
||||
@@ -1,7 +1 @@
|
||||
Allow from all
|
||||
Header always set Access-Control-Allow-Origin "https://fdsnws.geophysik.ruhr-uni-bochum.de"
|
||||
Header always append Access-Control-Allow-Origin "https://photon.komoot.de"
|
||||
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
|
||||
Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
|
||||
Header always set Access-Control-Expose-Headers "Content-Security-Policy, Location"
|
||||
Header always set Access-Control-Max-Age "600"
|
||||
|
||||
210
www/events.js
210
www/events.js
@@ -4,7 +4,7 @@
|
||||
**********************************************************************/
|
||||
|
||||
/* License
|
||||
Copyright 2020 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
Copyright 2014 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
@@ -22,6 +22,68 @@
|
||||
$Id$
|
||||
*/
|
||||
|
||||
/* process loaded events */
|
||||
function processEvents(xml, target) {
|
||||
$(xml).find('event').each(function () {
|
||||
var id = $(this).attr('publicID').split('/')[2];
|
||||
var mag = $(this).find('magnitude > mag > value').text();
|
||||
var otime = $(this).find('origin > time > value').text();
|
||||
var lng = $(this).find('origin > longitude > value').text();
|
||||
var lat = $(this).find('origin > latitude > value').text();
|
||||
var depth = $(this).find('origin > depth > value').text();
|
||||
var evaluationMode = $(this).find('origin > evaluationMode').text();
|
||||
var evaluationStatus = $(this).find('origin > evaluationStatus').text();
|
||||
var type = $(this).find('type').last().text();
|
||||
var location
|
||||
// get location, try this in order:
|
||||
// regional map name, given value, cached value, or nominatim lookup
|
||||
geolocationTable[id] ? null : getGeolocation(id, lat, lng); // do AJAX lookup if not cached, location will be updated later
|
||||
location = ( geolocationTable[id] || getLocation(lat, lng)[0] || $(this).find('description > text').text() );
|
||||
// create table row: Date, Time, Mag, Location
|
||||
if ( !eventTable[id] && $.inArray(type, config['event']['typeWhitelist'] )+1 && $.inArray(evaluationStatus, config['event']['evaluationBlacklist'])<0 && Number(mag)+0.05 >= config['event']['minMag'] ) {
|
||||
// general event info (1st line)
|
||||
var row = '<tr class="tablesorter-hasChildRow">'
|
||||
+ '<td class="utctime-date">'+otime.split('.')[0]+'Z</td>'
|
||||
+ '<td class="utctime-time">'+otime.split('.')[0]+'Z</td>'
|
||||
+ sprintf('<td class="ar">%.1f</td>', Number(mag))
|
||||
+ '<td><a href="#" class="toggle" eventid="'+id+'">'+location+'</a> <a class="map-link" href="#" eventid="'+id+'">Karte</a></td>'
|
||||
+ '</tr>';
|
||||
// setting up event details (2nd line)
|
||||
row += '<tr class="tablesorter-childRow event-details">'
|
||||
+ '<td colspan="4" eventid="'+id+'">Daten werden geladen ...</td></tr>';
|
||||
// setting up download links (3nd line)
|
||||
var xmlurl = sprintf('%s?formatted=true&includearrivals=true&eventid=%s', config['ajax']['eventURL'], id);
|
||||
var oTime = new Date(otime);
|
||||
var sTime = new Date(oTime.getTime()-10*1000.-oTime.getMilliseconds());
|
||||
var eTime = new Date(oTime.getTime()+50*1000.-oTime.getMilliseconds());
|
||||
var mseedurl = sprintf('%s?net=GE,GR,RN&cha=EH?,HH?&start=%04d-%02d-%02dT%02d:%02d:%02d&end=%04d-%02d-%02dT%02d:%02d:%02d', config['ajax']['mseedURL'], Number(sTime.getUTCFullYear()), Number(sTime.getUTCMonth())+1, Number(sTime.getUTCDate()), Number(sTime.getUTCHours()), Number(sTime.getUTCMinutes()), Number(sTime.getUTCSeconds()), Number(eTime.getUTCFullYear()), Number(eTime.getUTCMonth())+1, Number(eTime.getUTCDate()), Number(eTime.getUTCHours()), Number(eTime.getUTCMinutes()), Number(eTime.getUTCSeconds()));
|
||||
row += '<tr class="tablesorter-childRow event-download">'
|
||||
+ '<td colspan="4" eventid="'+id+'">'
|
||||
+ sprintf('Download <a class="xml-link" target="_blank" download="%s.xml" href="%s">QuakeML</a> or <a class="mseed-link" target="_blank" download="%s.mseed" href="%s">miniSEED</a>', id, xmlurl, id, mseedurl)
|
||||
+ '</td></tr>';
|
||||
// add row to table
|
||||
if ( sTime <= oTime && eTime >= oTime ) {
|
||||
addTableRow(row, 'eventstable');
|
||||
};
|
||||
if ( target ) {
|
||||
addTableRow(row, target);
|
||||
}
|
||||
// create marker
|
||||
if ((sTime <= oTime && eTime >= oTime ) || ( id == eventid )) {
|
||||
var marker = addEventMarker(id, Number(lat), Number(lng), Number(mag), type);
|
||||
var text = sprintf('<h3 eventid="%s">%s</h3>', id, location)
|
||||
+ sprintf('<p>Ereignis: %s</br>', id)
|
||||
+ sprintf('Type: %s</br>', type)
|
||||
+ sprintf('Magnitude: %3.1f</br>', Number(mag))
|
||||
+ sprintf('Ort: %.4f °N, %.4f °O </br>', Number(lat), Number(lng))
|
||||
+ sprintf('Tiefe: %.1f km</br>', Number(depth)/1000.)
|
||||
+ sprintf('Zeit: <span class="utctime">%sZ</span></p>', otime.split('.')[0], otime.split('.')[0]);
|
||||
marker.bindPopup(text);
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
/* adding row(s) to a table and format date strings afterwards */
|
||||
function addTableRow(row, table) {
|
||||
var added = $('#'+table+' tbody').append(row);
|
||||
@@ -40,23 +102,20 @@ function addTableRow(row, table) {
|
||||
|
||||
/* do reverse geolocation lookup */
|
||||
function getGeolocation(id, lat, lng) {
|
||||
if ( $.inArray(id, geolocationTable) == -1 ) {
|
||||
$.getJSON( config['ajax']['nominatimURL'], { lat: lat, lon: lng } )
|
||||
if ( !geolocationTable[id] ) {
|
||||
$.getJSON( config['ajax']['nominatimURL'], { lat: lat, lon: lng, zoom: 10, format: "json" } )
|
||||
.done(function( json ) {
|
||||
if ( json.features[0] ) {
|
||||
var city = json.features[0].properties.city;
|
||||
var countryCode = json.features[0].properties.country;
|
||||
geolocationTable[id] = city;
|
||||
( countryCode != "Germany" ) ? geolocationTable[id] = geolocationTable[id] + " ("+countryCode+")" : null;
|
||||
if ( city ) {
|
||||
$("#eventstable a.toggle[eventid="+id+"]").text(geolocationTable[id]);
|
||||
var sort = [[0,1],[1,1],[2,1]];
|
||||
$("#eventstable").trigger("update", [true]);
|
||||
$("#eventstable").trigger("updateCache");
|
||||
$("#eventstable").trigger("sorton", [sort]);
|
||||
} else {
|
||||
// console.log("Nominatim did not provide a city tag for "+lat+" / "+lng);
|
||||
};
|
||||
var city = json.address["city"];
|
||||
var country = json.address["country"];
|
||||
var countryCode = json.address["country_code"].toUpperCase();
|
||||
geolocationTable[id] = city;
|
||||
( country != "Deutschland" ) ? geolocationTable[id] = geolocationTable[id] + " ("+countryCode+")" : null;
|
||||
if ( city ) {
|
||||
$("#eventstable a.toggle[eventid="+id+"]").text(geolocationTable[id]);
|
||||
var sort = [[0,1],[1,1],[2,1]];
|
||||
$("#eventstable").trigger("update", [true]);
|
||||
$("#eventstable").trigger("updateCache");
|
||||
$("#eventstable").trigger("sorton", [sort]);
|
||||
};
|
||||
})
|
||||
.fail(function( jqxhr, textStatus, error ) {
|
||||
@@ -67,7 +126,7 @@ function getGeolocation(id, lat, lng) {
|
||||
};
|
||||
|
||||
/* Load events using ajax */
|
||||
function ajaxLoadEvents(stime, etime, eventid, url, target) {
|
||||
function ajaxLoadEvents(startup, stime, etime, eventid, url, target) {
|
||||
var mapBounds = map.getBounds();
|
||||
var request_data = {};
|
||||
var rtime;
|
||||
@@ -89,7 +148,7 @@ function ajaxLoadEvents(stime, etime, eventid, url, target) {
|
||||
} else {
|
||||
request_data = {
|
||||
starttime: sprintf("%d-%02d-%02d", rtime.getFullYear(), rtime.getMonth()+1, rtime.getDate()),
|
||||
orderby: 'time-asc',
|
||||
orderby: 'time',
|
||||
minlat: sprintf('%.2f', mapBounds.getSouth()-config['map']['latlngDelta']),
|
||||
maxlat: sprintf('%.2f', mapBounds.getNorth()+config['map']['latlngDelta']),
|
||||
minlon: sprintf('%.2f', mapBounds.getWest()-config['map']['latlngDelta']),
|
||||
@@ -102,86 +161,30 @@ function ajaxLoadEvents(stime, etime, eventid, url, target) {
|
||||
};
|
||||
};
|
||||
if ( etime == '' || !etime ) { etime = new Date(); };
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
data: request_data,
|
||||
dataType: "xml",
|
||||
success: function (xml) {
|
||||
$(xml).find('event').each(function () {
|
||||
var id = $(this).attr('publicID').split('/')[2];
|
||||
var mag = $(this).find('magnitude > mag > value').text();
|
||||
var otime = $(this).find('origin > time > value').text();
|
||||
var lng = $(this).find('origin > longitude > value').text();
|
||||
var lat = $(this).find('origin > latitude > value').text();
|
||||
var depth = $(this).find('origin > depth > value').text();
|
||||
var evaluationMode = $(this).find('origin > evaluationMode').text();
|
||||
var evaluationStatus = $(this).find('origin > evaluationStatus').text();
|
||||
var type = $(this).find('type').last().text();
|
||||
var location
|
||||
// create table row: Date, Time, Mag, Location
|
||||
if ( !eventTable[id] && $.inArray(type, config['event']['typeWhitelist'] ) >= 0 && $.inArray(evaluationStatus, config['event']['evaluationBlacklist'])<0 && Number(mag)+0.05 >= config['event']['minMag'] ) {
|
||||
geolocationTable[id] ? null : getGeolocation(id, lat, lng); // do AJAX lookup if not cached, location will be updated later
|
||||
location = ( geolocationTable[id] || getLocation(lat, lng)[0] || $(this).find('description > text').text() );
|
||||
// general event info (1st line)
|
||||
var row = '<tr class="tablesorter-hasChildRow">'
|
||||
+ '<td class="utctime-date">'+otime.split('.')[0]+'Z</td>'
|
||||
+ '<td class="utctime-time">'+otime.split('.')[0]+'Z</td>'
|
||||
+ sprintf('<td class="ar">%.1f</td>', Number(mag))
|
||||
+ '<td><a href="#" class="toggle" eventid="'+id+'">'+location+'</a> <a class="map-link" href="#" eventid="'+id+'">Karte</a></td>'
|
||||
+ '</tr>';
|
||||
// setting up event details (2nd line)
|
||||
row += '<tr class="tablesorter-childRow event-details">'
|
||||
+ '<td colspan="4" eventid="'+id+'">Daten werden geladen ...</td></tr>';
|
||||
// setting up download links (3nd line)
|
||||
var xmlurl = sprintf('%s?formatted=true&includearrivals=true&eventid=%s', config['ajax']['eventURL'], id);
|
||||
var oTime = new Date(otime);
|
||||
if ( ~oTime ) {
|
||||
oTime = new Date(otime.split('.')[0]);
|
||||
};
|
||||
var sTime = new Date(oTime.getTime()-10*1000.-oTime.getMilliseconds());
|
||||
var eTime = new Date(oTime.getTime()+50*1000.-oTime.getMilliseconds());
|
||||
var mseedurl = sprintf('%s?net=GE,GR,RN&cha=EH?,HH?&start=%04d-%02d-%02dT%02d:%02d:%02d&end=%04d-%02d-%02dT%02d:%02d:%02d', config['ajax']['mseedURL'], Number(sTime.getUTCFullYear()), Number(sTime.getUTCMonth())+1, Number(sTime.getUTCDate()), Number(sTime.getUTCHours()), Number(sTime.getUTCMinutes()), Number(sTime.getUTCSeconds()), Number(eTime.getUTCFullYear()), Number(eTime.getUTCMonth())+1, Number(eTime.getUTCDate()), Number(eTime.getUTCHours()), Number(eTime.getUTCMinutes()), Number(eTime.getUTCSeconds()));
|
||||
row += '<tr class="tablesorter-childRow event-download">'
|
||||
+ '<td colspan="4" eventid="'+id+'">'
|
||||
+ sprintf('Download <a class="xml-link" target="_blank" download="%s.xml" href="%s">QuakeML</a> or <a class="mseed-link" target="_blank" download="%s.mseed" href="%s">miniSEED</a>', id, xmlurl, id, mseedurl)
|
||||
+ '</td></tr>';
|
||||
// add row to table
|
||||
if ( stime <= oTime && etime >= oTime ) {
|
||||
addTableRow(row, 'eventstable');
|
||||
};
|
||||
if ( target ) {
|
||||
addTableRow(row, target);
|
||||
}
|
||||
// create marker
|
||||
if ((stime <= oTime && etime >= oTime ) || ( id == eventid )) {
|
||||
var marker = addEventMarker(id, Number(lat), Number(lng), Number(mag), type);
|
||||
var text = sprintf('<h3 eventid="%s">%s</h3>', id, location)
|
||||
+ sprintf('<p>Ereignis: %s<br />', id)
|
||||
+ sprintf('Type: %s<br />', type)
|
||||
+ sprintf('Magnitude: %3.1f<br />', Number(mag))
|
||||
+ sprintf('Ort: %.4f °N, %.4f °O <br />', Number(lat), Number(lng))
|
||||
+ sprintf('Tiefe: %.1f km<br />', Number(depth)/1000.)
|
||||
+ sprintf('Zeit: <span class="utctime">%sZ</span></p>', otime.split('.')[0], otime.split('.')[0]);
|
||||
marker.bindPopup(text);
|
||||
};
|
||||
};
|
||||
});
|
||||
},
|
||||
complete: function () {
|
||||
var sort = [[0,1],[1,1],[2,1]];
|
||||
$("#eventstable").trigger("update", [true]);
|
||||
$("#eventstable").trigger("updateCache");
|
||||
$("#eventstable").trigger("sorton", [sort]);
|
||||
initMapLink();
|
||||
eventLayer.bringToBack();
|
||||
highlightFirstEvent();
|
||||
},
|
||||
error: function( jqxhr, textStatus, error ) {
|
||||
var err = textStatus + ", " + error;
|
||||
console.log( "Request Failed: " + err );
|
||||
}
|
||||
});
|
||||
if ( startup ) {
|
||||
processEvents(eventsXML, false);
|
||||
} else {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
data: request_data,
|
||||
dataType: "xml",
|
||||
success: function ( xml ) { processEvents(xml, target) },
|
||||
complete: function () {
|
||||
var sort = [[0,1],[1,1],[2,1]];
|
||||
$("#eventstable").trigger("update", [true]);
|
||||
$("#eventstable").trigger("updateCache");
|
||||
$("#eventstable").trigger("sorton", [sort]);
|
||||
initMapLink();
|
||||
eventLayer.bringToBack();
|
||||
highlightFirstEvent();
|
||||
},
|
||||
error: function( jqxhr, textStatus, error ) {
|
||||
var err = textStatus + ", " + error;
|
||||
console.log( "Request Failed: " + err );
|
||||
}
|
||||
});
|
||||
};
|
||||
// create events csv download link
|
||||
request_data['format'] = 'text';
|
||||
if ( eventid == '' || !eventid ) { $('#events-csv-link').attr('href', config['ajax']['eventURL']+'?'+$.param(request_data)) };
|
||||
@@ -283,6 +286,7 @@ function toggleFilteredMarkers() {
|
||||
/* Highlight the first event of the event list on the map if no
|
||||
* other event is selected */
|
||||
function highlightFirstEvent() {
|
||||
$('div.info').show()
|
||||
var highlightStyle = {
|
||||
color: config['event']['markerColorH'],
|
||||
fillColor: config['event']['markerColorH'],
|
||||
@@ -308,6 +312,7 @@ function highlightFirstEvent() {
|
||||
$(this).text('Karte (rot)');
|
||||
};
|
||||
});
|
||||
$('div.info').hide()
|
||||
};
|
||||
|
||||
function highlightEvent( id ) {
|
||||
@@ -428,12 +433,7 @@ $(document).ready(function() {
|
||||
typetext += '(bergbau-)induziertes Ereignis (Kreis)';
|
||||
break;
|
||||
case 'quarry blast':
|
||||
case 'controlled explosion':
|
||||
case 'explosion':
|
||||
typetext += 'Sprengung (Rad)';
|
||||
break;
|
||||
case 'nuclear explosion':
|
||||
typetext += 'Atomwaffentest (Viereck)';
|
||||
typetext += 'Steinbruchsprengung (Rad)';
|
||||
break;
|
||||
};
|
||||
$("#events-type").append(typetext);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
**********************************************************************/
|
||||
|
||||
/* License
|
||||
Copyright 2020 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
Copyright 2014 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
@@ -40,23 +40,22 @@ function addTableRow(row, table) {
|
||||
|
||||
/* do reverse geolocation lookup */
|
||||
function getGeolocation(id, lat, lng) {
|
||||
if ( $.inArray(id, geolocationTable) == -1 ) {
|
||||
$.getJSON( config['ajax']['nominatimURL'], { lat: lat, lon: lng } )
|
||||
if ( !geolocationTable[id] ) {
|
||||
$.getJSON( config['ajax']['nominatimURL'], { lat: lat, lon: lng, zoom: 10, format: "json" } )
|
||||
.done(function( json ) {
|
||||
if ( json.features[0] ) {
|
||||
var city = json.features[0].properties.city;
|
||||
var countryCode = json.features[0].properties.country;
|
||||
geolocationTable[id] = city;
|
||||
( countryCode != "Germany" ) ? geolocationTable[id] = geolocationTable[id] + " ("+countryCode+")" : null;
|
||||
if ( city ) {
|
||||
$("#eventstable a.toggle[eventid="+id+"]").text(geolocationTable[id]);
|
||||
var sort = [[0,1],[1,1],[2,1]];
|
||||
$("#eventstable").trigger("update", [true]);
|
||||
$("#eventstable").trigger("updateCache");
|
||||
$("#eventstable").trigger("sorton", [sort]);
|
||||
} else {
|
||||
// console.log("Nominatim did not provide a city tag for "+lat+" / "+lng);
|
||||
};
|
||||
var city = json.address["city"];
|
||||
var country = json.address["country"];
|
||||
var countryCode = json.address["country_code"].toUpperCase();
|
||||
geolocationTable[id] = city;
|
||||
( country != "Deutschland" ) ? geolocationTable[id] = geolocationTable[id] + " ("+countryCode+")" : null;
|
||||
if ( city ) {
|
||||
$("#eventstable a.toggle[eventid="+id+"]").text(geolocationTable[id]);
|
||||
var sort = [[0,1],[1,1],[2,1]];
|
||||
$("#eventstable").trigger("update", [true]);
|
||||
$("#eventstable").trigger("updateCache");
|
||||
$("#eventstable").trigger("sorton", [sort]);
|
||||
} else {
|
||||
console.log("Nominatim did not provide a city tag for "+lat+" / "+lng);
|
||||
};
|
||||
})
|
||||
.fail(function( jqxhr, textStatus, error ) {
|
||||
@@ -89,7 +88,7 @@ function ajaxLoadEvents(stime, etime, eventid, url, target) {
|
||||
} else {
|
||||
request_data = {
|
||||
starttime: sprintf("%d-%02d-%02d", rtime.getFullYear(), rtime.getMonth()+1, rtime.getDate()),
|
||||
orderby: 'time-asc',
|
||||
orderby: 'time',
|
||||
minlat: sprintf('%.2f', mapBounds.getSouth()-config['map']['latlngDelta']),
|
||||
maxlat: sprintf('%.2f', mapBounds.getNorth()+config['map']['latlngDelta']),
|
||||
minlon: sprintf('%.2f', mapBounds.getWest()-config['map']['latlngDelta']),
|
||||
@@ -119,10 +118,12 @@ function ajaxLoadEvents(stime, etime, eventid, url, target) {
|
||||
var evaluationStatus = $(this).find('origin > evaluationStatus').text();
|
||||
var type = $(this).find('type').last().text();
|
||||
var location
|
||||
// get location, try this in order:
|
||||
// regional map name, given value, cached value, or nominatim lookup
|
||||
geolocationTable[id] ? null : getGeolocation(id, lat, lng); // do AJAX lookup if not cached, location will be updated later
|
||||
location = ( geolocationTable[id] || getLocation(lat, lng)[0] || $(this).find('description > text').text() );
|
||||
// create table row: Date, Time, Mag, Location
|
||||
if ( !eventTable[id] && $.inArray(type, config['event']['typeWhitelist'] ) >= 0 && $.inArray(evaluationStatus, config['event']['evaluationBlacklist'])<0 && Number(mag)+0.05 >= config['event']['minMag'] ) {
|
||||
geolocationTable[id] ? null : getGeolocation(id, lat, lng); // do AJAX lookup if not cached, location will be updated later
|
||||
location = ( geolocationTable[id] || getLocation(lat, lng)[0] || $(this).find('description > text').text() );
|
||||
if ( !eventTable[id] && $.inArray(type, config['event']['typeWhitelist'] )+1 && $.inArray(evaluationStatus, config['event']['evaluationBlacklist'])<0 && Number(mag)+0.05 >= config['event']['minMag'] ) {
|
||||
// general event info (1st line)
|
||||
var row = '<tr class="tablesorter-hasChildRow">'
|
||||
+ '<td class="utctime-date">'+otime.split('.')[0]+'Z</td>'
|
||||
@@ -136,9 +137,6 @@ function ajaxLoadEvents(stime, etime, eventid, url, target) {
|
||||
// setting up download links (3nd line)
|
||||
var xmlurl = sprintf('%s?formatted=true&includearrivals=true&eventid=%s', config['ajax']['eventURL'], id);
|
||||
var oTime = new Date(otime);
|
||||
if ( ~oTime ) {
|
||||
oTime = new Date(otime.split('.')[0]);
|
||||
};
|
||||
var sTime = new Date(oTime.getTime()-10*1000.-oTime.getMilliseconds());
|
||||
var eTime = new Date(oTime.getTime()+50*1000.-oTime.getMilliseconds());
|
||||
var mseedurl = sprintf('%s?net=GE,GR,RN&cha=EH?,HH?&start=%04d-%02d-%02dT%02d:%02d:%02d&end=%04d-%02d-%02dT%02d:%02d:%02d', config['ajax']['mseedURL'], Number(sTime.getUTCFullYear()), Number(sTime.getUTCMonth())+1, Number(sTime.getUTCDate()), Number(sTime.getUTCHours()), Number(sTime.getUTCMinutes()), Number(sTime.getUTCSeconds()), Number(eTime.getUTCFullYear()), Number(eTime.getUTCMonth())+1, Number(eTime.getUTCDate()), Number(eTime.getUTCHours()), Number(eTime.getUTCMinutes()), Number(eTime.getUTCSeconds()));
|
||||
@@ -157,11 +155,11 @@ function ajaxLoadEvents(stime, etime, eventid, url, target) {
|
||||
if ((stime <= oTime && etime >= oTime ) || ( id == eventid )) {
|
||||
var marker = addEventMarker(id, Number(lat), Number(lng), Number(mag), type);
|
||||
var text = sprintf('<h3 eventid="%s">%s</h3>', id, location)
|
||||
+ sprintf('<p>Ereignis: %s<br />', id)
|
||||
+ sprintf('Type: %s<br />', type)
|
||||
+ sprintf('Magnitude: %3.1f<br />', Number(mag))
|
||||
+ sprintf('Ort: %.4f °N, %.4f °O <br />', Number(lat), Number(lng))
|
||||
+ sprintf('Tiefe: %.1f km<br />', Number(depth)/1000.)
|
||||
+ sprintf('<p>Ereignis: %s</br>', id)
|
||||
+ sprintf('Type: %s</br>', type)
|
||||
+ sprintf('Magnitude: %3.1f</br>', Number(mag))
|
||||
+ sprintf('Ort: %.4f °N, %.4f °O </br>', Number(lat), Number(lng))
|
||||
+ sprintf('Tiefe: %.1f km</br>', Number(depth)/1000.)
|
||||
+ sprintf('Zeit: <span class="utctime">%sZ</span></p>', otime.split('.')[0], otime.split('.')[0]);
|
||||
marker.bindPopup(text);
|
||||
};
|
||||
@@ -428,13 +426,8 @@ $(document).ready(function() {
|
||||
typetext += '(mining-)induced event (circle)';
|
||||
break;
|
||||
case 'quarry blast':
|
||||
case 'controlled explosion':
|
||||
case 'explosion':
|
||||
typetext += 'quarry blast (wheel)';
|
||||
break;
|
||||
case 'nuclear explosion':
|
||||
typetext += 'nuclear weapon test (square)';
|
||||
break;
|
||||
};
|
||||
$("#events-type").append(typetext);
|
||||
});
|
||||
|
||||
1
www/eventsXML.js
Normal file
1
www/eventsXML.js
Normal file
File diff suppressed because one or more lines are too long
@@ -1,23 +1,23 @@
|
||||
<div class="accordioncontent">
|
||||
<h4>Anschrift</h4>
|
||||
Seismologisches Observatorium der<br />
|
||||
Ruhr-Universität Bochum<br />
|
||||
NA 3/174<br />
|
||||
44780 Bochum<br />
|
||||
Tel.: 0234 32-27574<br />
|
||||
Fax: 0234 32-07574<br />
|
||||
Seismologisches Observatorium der</br>
|
||||
Ruhr-Universität Bochum</br>
|
||||
NA 3/174</br>
|
||||
44780 Bochum</br>
|
||||
Tel.: 0234 32-27574</br>
|
||||
Fax: 0234 32-07574</br>
|
||||
|
||||
<p>Die Ruhr-Universität ist eine Körperschaft des Öffentlichen Rechts. Sie wird durch ihren Rektor Herrn Prof. Dr. Elmar W. Weiler gesetzlich vertreten.</p>
|
||||
<p>Zuständige Aufsichtsbehörde ist das Ministerium für Innovation, Wissenschaft und Forschung des Landes Nordrhein-Westfalen, Völklinger Straße 49, 40221 Düsseldorf.</p>
|
||||
<p>Umsatzsteuer-Identifikationsnummer: DE 127 056 261</p>
|
||||
|
||||
<h4>Inhaltliche und technische Verantwortung für die Seiten des Seismologischen Observatoriums der Ruhr-Universität Bochum</h4>
|
||||
Herr Dr. Kasper D. Fischer<br />
|
||||
Ruhr-Universität Bochum<br />
|
||||
44780 Bochum<br />
|
||||
Tel.: 0234 32-27574<br />
|
||||
Fax: 0234 32-07574<br />
|
||||
E-Mail: kasper.fischer@ruhr-uni-bochum.de<br />
|
||||
Herr Dr. Kasper D. Fischer</br>
|
||||
Ruhr-Universität Bochum</br>
|
||||
44780 Bochum</br>
|
||||
Tel.: 0234 32-27574</br>
|
||||
Fax: 0234 32-07574</br>
|
||||
E-Mail: kasper.fischer@ruhr-uni-bochum.de</br>
|
||||
|
||||
<p>Meldungen über missbräuchliche Nutzungen, die von Stationen aus dem IP-Namensbereich ruhr-uni-bochum.de ausgehen, senden Sie bitte an die Email-Adresse
|
||||
abuse@ruhr-uni-bochum.de. Gleichfalls bittet die Ruhr-Universität um Mitteilung an dieselbe Email-Adresse, wenn rechtswidrige Inhalte durch Links auf Seiten der Ruhr-Universität zu
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
<link rel="stylesheet" href="external/leaflet.css" />
|
||||
<!-- link rel="stylesheet" href="external/css/dvf.css" type="text/css" media="screen" / -->
|
||||
<link rel="stylesheet" href="external/css/leaflet.label.css" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" href="external/easyPrint.css"/>
|
||||
|
||||
<!-- jQuery & jQueryUI -->
|
||||
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
|
||||
@@ -38,10 +37,7 @@
|
||||
<script type="text/javascript" src="external/leaflet-dvf.markers.min.js"></script>
|
||||
<script type="text/javascript" src="external/leaflet.label.js"></script>
|
||||
<script src="external/jQuery.print.js"></script>
|
||||
<script src="external/leaflet.easyPrint.js"></script>
|
||||
<script src="https://open.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=RPOPuz3lA2GGBtVpEU0ugxtVoGba53Dt"></script>
|
||||
<!-- <script src="https://www.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=RPOPuz3lA2GGBtVpEU0ugxtVoGba53Dt"></script> -->
|
||||
|
||||
|
||||
<!-- Map, Events & Stations -->
|
||||
<script type="text/javascript" src="misc.js"></script>
|
||||
<script type="text/javascript" src="geolocation.js"></script>
|
||||
@@ -49,6 +45,7 @@
|
||||
<script type="text/javascript" src="map.js"></script>
|
||||
<script type="text/javascript" src="events.js"></script>
|
||||
<script type="text/javascript" src="stations.js"></script>
|
||||
<script type="text/javascript" src="eventsXML.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -117,7 +114,7 @@
|
||||
<span id="events-type">Symbole:</span>
|
||||
</p>
|
||||
<p class="table-caption">
|
||||
Reverse Geolocation courtesy of <a href="http://photon.komoot.de/" target="_blank">Photon by Komoot</a>
|
||||
Nominatim Search Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img alt="Mapquest Logo" src="//developer.mapquest.com/content/osm/mq_logo.png" />
|
||||
</p>
|
||||
</div>
|
||||
<!-- Stations -->
|
||||
@@ -180,6 +177,6 @@
|
||||
<div class="rublogo"><a href="http://www.gmg.ruhr-uni-bochum.de/geophysik/seisobs"><img class="rublogo" src="logo_RUB_155x30.png" alt="Ruhr-Universität Bochum" title="Ruhr-Universität Bochum" border="0"/></a></div>
|
||||
<!-- Map -->
|
||||
<div id="map" class="map"></div>
|
||||
<div id="spinner" class="spinner" style="display:none;"><img id="img-spinner" src="spinner.gif" alt="Loading"/><br />Loading ...</div>
|
||||
<div id="spinner" class="spinner" style="display:none;"><img id="img-spinner" src="spinner.gif" alt="Loading"/></br>Loading ...</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<link rel="stylesheet" href="external/leaflet.css" />
|
||||
<!-- link rel="stylesheet" href="external/css/dvf.css" type="text/css" media="screen" / -->
|
||||
<link rel="stylesheet" href="external/css/leaflet.label.css" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" href="external/easyPrint.css"/>
|
||||
<!-- <link rel="stylesheet" href="external/easyPrint.css"/> -->
|
||||
|
||||
<!-- jQuery & jQueryUI -->
|
||||
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
|
||||
@@ -37,12 +37,9 @@
|
||||
<script type="text/javascript" src="external/TileLayer.Grayscale.js"></script>
|
||||
<script type="text/javascript" src="external/leaflet-dvf.markers.min.js"></script>
|
||||
<script type="text/javascript" src="external/leaflet.label.js"></script>
|
||||
<script src="external/jQuery.print.js"></script>
|
||||
<script src="external/leaflet.easyPrint.js"></script>
|
||||
<!-- <script src="external/jQuery.print.js"></script> -->
|
||||
<!-- <script src="external/leaflet.easyPrint.js"></script> -->
|
||||
|
||||
<script src="https://open.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=RPOPuz3lA2GGBtVpEU0ugxtVoGba53Dt"></script>
|
||||
<!-- <script src="https://www.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=RPOPuz3lA2GGBtVpEU0ugxtVoGba53Dt"></script> -->
|
||||
|
||||
<!-- Map, Events & Stations -->
|
||||
<script type="text/javascript" src="misc.js"></script>
|
||||
<script type="text/javascript" src="geolocation.js"></script>
|
||||
@@ -99,6 +96,7 @@
|
||||
<col width="50" />
|
||||
<col width="50" />
|
||||
<col />
|
||||
<col width="30" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -118,7 +116,7 @@
|
||||
<span id="events-type">Symbols:</span>
|
||||
</p>
|
||||
<p class="table-caption">
|
||||
Reverse Geolocation courtesy of <a href="http://photon.komoot.de/" target="_blank">Photon by Komoot</a>
|
||||
Nominatim Search Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img alt="Mapquest Logo" src="//developer.mapquest.com/content/osm/mq_logo.png" />
|
||||
</p>
|
||||
</div>
|
||||
<!-- Stations -->
|
||||
@@ -181,6 +179,6 @@
|
||||
<div class="rublogo"><a href="http://www.gmg.ruhr-uni-bochum.de/geophysik/seisobs"><img class="rublogo" src="logo_RUB_155x30.png" alt="Ruhr-University Bochum" title="Ruhr-University Bochum" border="0"/></a></div>
|
||||
<!-- Map -->
|
||||
<div id="map" class="map"></div>
|
||||
<div id="spinner" class="spinner" style="display:none;"><img id="img-spinner" src="spinner.gif" alt="Loading"/><br />Loading ...</div>
|
||||
<div id="spinner" class="spinner" style="display:none;"><img id="img-spinner" src="spinner.gif" alt="Loading"/></br>Loading ...</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="accordioncontent">
|
||||
<h4>Navigation zu den Internetseiten</h4>
|
||||
<ul>
|
||||
<li>des <a class="intern" href="http://www.gmg.ruhr-uni-bochum.de/geophysik/seisobs">Seismologisches Observatorium</a><br /> der Ruhr-Universität Bochum</li>
|
||||
<li>des <a class="intern" href="http://www.gmg.ruhr-uni-bochum.de/geophysik/seisobs">Seismologisches Observatorium</a></br> der Ruhr-Universität Bochum</li>
|
||||
<li>der <a class="intern" href="http://www.gmg.ruhr-uni-bochum.de/geophysik/seismology">Arbeitsgruppe Seismologie</a></li>
|
||||
<li>des <a class="intern" href="http://www.gmg.ruhr-uni-bochum.de">Instituts für Geologie, Mineralogie und Geophysik</a></li>
|
||||
<li>der <a class="intern" href="http://www.rub.de">Ruhr-Universität Bochum</a></li>
|
||||
|
||||
81
www/map.js
81
www/map.js
@@ -4,7 +4,7 @@
|
||||
**********************************************************************/
|
||||
|
||||
/* License
|
||||
Copyright 2020 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
Copyright 2014 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
@@ -17,7 +17,7 @@
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program. If not, see https://www.gnu.org/licenses/.
|
||||
with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
$Id$
|
||||
*/
|
||||
@@ -32,7 +32,7 @@ function addStationMarker(id, lat, lng, station) {
|
||||
color: config['station']['markerColor'],
|
||||
weight: 1,
|
||||
opacity: 1,
|
||||
radius: config['station']['markerSize'][id] || config['station']['markerSize']['defaultSize'],
|
||||
radius: config['station']['markerSize'][id] || config['station']['markerSize']['default'],
|
||||
className: id+' stationMarker',
|
||||
});
|
||||
marker.bindLabel('Station '+station);
|
||||
@@ -61,12 +61,6 @@ function addEventMarker(id, lat, lng, mag, type) {
|
||||
case 'earthquake':
|
||||
marker = L.starMarker(L.latLng(lat, lng), markerOptions);
|
||||
break;
|
||||
case 'nuclear explosion':
|
||||
markerOptions['numberOfSides'] = 4;
|
||||
markerOptions['radius'] = 2.0*markerOptions['radius'];
|
||||
markerOptions['innerRadius'] = 0.3*markerOptions['radius'];
|
||||
marker = L.regularPolygonMarker(L.latLng(lat, lng), markerOptions);
|
||||
break;
|
||||
case 'explosion':
|
||||
markerOptions['numberOfSides'] = 6;
|
||||
markerOptions['radius'] = 2.0*markerOptions['radius'];
|
||||
@@ -74,7 +68,6 @@ function addEventMarker(id, lat, lng, mag, type) {
|
||||
marker = L.regularPolygonMarker(L.latLng(lat, lng), markerOptions);
|
||||
break;
|
||||
case 'quarry blast':
|
||||
case 'controlled explosion':
|
||||
markerOptions['numberOfPoints'] = 7;
|
||||
markerOptions['innerRadius'] = 0.3*markerOptions['radius'];
|
||||
marker = L.starMarker(L.latLng(lat, lng), markerOptions);
|
||||
@@ -140,18 +133,19 @@ function initMapLink() {
|
||||
$(document).ready(function() {
|
||||
|
||||
// create a map in the "map" div, set the view to a given place and zoom
|
||||
|
||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
new L.Control.Zoom({ position: 'topright' }).addTo(map);
|
||||
new L.control.scale({position: 'bottomright', imperial: false}).addTo(map);
|
||||
|
||||
// create baselayer
|
||||
switch ( config['map']['baselayer'] ) {
|
||||
case 'osmde': // add OpenStreetMap.DE tile layer
|
||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
||||
L.tileLayer('http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
||||
{
|
||||
attribution: '© <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
|
||||
attribution: '© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
|
||||
}).addTo(map);
|
||||
break;
|
||||
case 'esrigray': // add ESRI Grayscale World Map (neither city nor road names)
|
||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
L.tileLayer('//server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}',
|
||||
{
|
||||
attribution: 'Tiles © Esri — Esri, DeLorme, NAVTEQ',
|
||||
@@ -159,61 +153,42 @@ $(document).ready(function() {
|
||||
}).addTo(map);
|
||||
break;
|
||||
case 'aerial': // add ESRI WordImagery tile layer
|
||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
|
||||
L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
|
||||
{
|
||||
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
|
||||
}).addTo(map);
|
||||
break;
|
||||
case 'komoot': // add OpenStreetMap.DE tile layer
|
||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
L.tileLayer('//www.komoot.de/tiles/{s}/{z}/{x}/{y}.png',
|
||||
case 'mapquestgray': // add MapQuestOSM tile layer
|
||||
L.tileLayer.grayscale('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
||||
{
|
||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.komoot.de/">Komoot</a>',
|
||||
subdomains: '1234',
|
||||
detectRetina: true,
|
||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
||||
}).addTo(map);
|
||||
break;
|
||||
case 'mapquestgray': // add MapQuestOSM tile layer
|
||||
null;
|
||||
// map = L.map('map', { zoomControl: false, worldCopyJump: true, layers: mapLayer }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
// L.tileLayer.grayscale('https://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
||||
// {
|
||||
// subdomains: '1234',
|
||||
// detectRetina: true,
|
||||
// attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
||||
//}).addTo(map);
|
||||
//break;
|
||||
case 'mapquest': // add MapQuestOSM tile layer
|
||||
null;
|
||||
default:
|
||||
var mapLayer = MQ.mapLayer();
|
||||
map = L.map('map', {
|
||||
zoomControl: false,
|
||||
worldCopyJump: true,
|
||||
layers: mapLayer,
|
||||
}).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
//L.tileLayer('https://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
||||
//{
|
||||
//subdomains: '1234',
|
||||
//detectRetina: true,
|
||||
//attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
||||
//}).addTo(map);
|
||||
L.tileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
||||
{
|
||||
subdomains: '1234',
|
||||
detectRetina: true,
|
||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
||||
}).addTo(map);
|
||||
};
|
||||
|
||||
// add controls
|
||||
new L.Control.Zoom({ position: 'topright' }).addTo(map);
|
||||
new L.control.scale({position: 'bottomright', imperial: false}).addTo(map);
|
||||
|
||||
// create station and event layer
|
||||
// stationLayer = L.geoJson().addTo(map);
|
||||
stationLayer = new L.MarkerGroup().addTo(map);
|
||||
eventLayer = new L.MarkerGroup().addTo(map);
|
||||
|
||||
// load events
|
||||
ajaxLoadEvents('', '', '', 'events.xml');
|
||||
ajaxLoadEvents();
|
||||
specialEvents.map(function(id) {
|
||||
ajaxLoadEvents('', '', id)
|
||||
});
|
||||
ajaxLoadEvents(true);
|
||||
// ajaxLoadEvents(false, '', '', '', 'events.xml');
|
||||
ajaxLoadEvents(false);
|
||||
// specialEvents.map(function(id) {
|
||||
// ajaxLoadEvents(false, '', '', id)
|
||||
//});
|
||||
toggleFilteredMarkers();
|
||||
|
||||
// bind popupopen event
|
||||
@@ -242,5 +217,5 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
// print icon
|
||||
L.easyPrint().addTo(map);
|
||||
// L.easyPrint().addTo(map);
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
**********************************************************************/
|
||||
|
||||
/* License
|
||||
Copyright 2020 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
Copyright 2014 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
@@ -17,7 +17,7 @@
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program. If not, see https://www.gnu.org/licenses/.
|
||||
with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
$Id$
|
||||
*/
|
||||
@@ -32,7 +32,7 @@ function addStationMarker(id, lat, lng, station) {
|
||||
color: config['station']['markerColor'],
|
||||
weight: 1,
|
||||
opacity: 1,
|
||||
radius: config['station']['markerSize'][id] || config['station']['markerSize']['defaultSize'],
|
||||
radius: config['station']['markerSize'][id] || config['station']['markerSize']['default'],
|
||||
className: id+' stationMarker',
|
||||
});
|
||||
marker.bindLabel('Station '+station);
|
||||
@@ -61,12 +61,6 @@ function addEventMarker(id, lat, lng, mag, type) {
|
||||
case 'earthquake':
|
||||
marker = L.starMarker(L.latLng(lat, lng), markerOptions);
|
||||
break;
|
||||
case 'nuclear explosion':
|
||||
markerOptions['numberOfSides'] = 4;
|
||||
markerOptions['radius'] = 2.0*markerOptions['radius'];
|
||||
markerOptions['innerRadius'] = 0.3*markerOptions['radius'];
|
||||
marker = L.regularPolygonMarker(L.latLng(lat, lng), markerOptions);
|
||||
break;
|
||||
case 'explosion':
|
||||
markerOptions['numberOfSides'] = 6;
|
||||
markerOptions['radius'] = 2.0*markerOptions['radius'];
|
||||
@@ -74,7 +68,6 @@ function addEventMarker(id, lat, lng, mag, type) {
|
||||
marker = L.regularPolygonMarker(L.latLng(lat, lng), markerOptions);
|
||||
break;
|
||||
case 'quarry blast':
|
||||
case 'controlled explosion':
|
||||
markerOptions['numberOfPoints'] = 7;
|
||||
markerOptions['innerRadius'] = 0.3*markerOptions['radius'];
|
||||
marker = L.starMarker(L.latLng(lat, lng), markerOptions);
|
||||
@@ -140,19 +133,19 @@ function initMapLink() {
|
||||
$(document).ready(function() {
|
||||
|
||||
// create a map in the "map" div, set the view to a given place and zoom
|
||||
|
||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
new L.Control.Zoom({ position: 'topright' }).addTo(map);
|
||||
new L.control.scale({position: 'bottomright', imperial: false}).addTo(map);
|
||||
|
||||
// create baselayer
|
||||
switch ( config['map']['baselayer'] ) {
|
||||
case 'osmde': // add OpenStreetMap.DE tile layer
|
||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
||||
L.tileLayer('http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
||||
{
|
||||
attribution: '© <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
|
||||
attribution: '© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
|
||||
}).addTo(map);
|
||||
break;
|
||||
case 'esrigray': // add ESRI Grayscale World Map (neither city nor road names)
|
||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
L.tileLayer('//server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}',
|
||||
{
|
||||
attribution: 'Tiles © Esri — Esri, DeLorme, NAVTEQ',
|
||||
@@ -160,48 +153,29 @@ $(document).ready(function() {
|
||||
}).addTo(map);
|
||||
break;
|
||||
case 'aerial': // add ESRI WordImagery tile layer
|
||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
|
||||
L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
|
||||
{
|
||||
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
|
||||
}).addTo(map);
|
||||
break;
|
||||
case 'komoot': // add OpenStreetMap.DE tile layer
|
||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
L.tileLayer('//www.komoot.de/tiles/{s}/{z}/{x}/{y}.png',
|
||||
case 'mapquestgray': // add MapQuestOSM tile layer
|
||||
L.tileLayer.grayscale('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
||||
{
|
||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.komoot.de/">Komoot</a>',
|
||||
subdomains: '1234',
|
||||
detectRetina: true,
|
||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
||||
}).addTo(map);
|
||||
break;
|
||||
case 'mapquestgray': // add MapQuestOSM tile layer
|
||||
null;
|
||||
// map = L.map('map', { zoomControl: false, worldCopyJump: true, layers: mapLayer }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
// L.tileLayer.grayscale('https://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
||||
// {
|
||||
// subdomains: '1234',
|
||||
// detectRetina: true,
|
||||
// attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
||||
//}).addTo(map);
|
||||
//break;
|
||||
case 'mapquest': // add MapQuestOSM tile layer
|
||||
null;
|
||||
default:
|
||||
var mapLayer = MQ.mapLayer();
|
||||
map = L.map('map', {
|
||||
zoomControl: false,
|
||||
worldCopyJump: true,
|
||||
layers: mapLayer,
|
||||
}).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
//L.tileLayer('https://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
||||
//{
|
||||
//subdomains: '1234',
|
||||
//detectRetina: true,
|
||||
//attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="https://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
||||
//}).addTo(map);
|
||||
L.tileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
||||
{
|
||||
subdomains: '1234',
|
||||
detectRetina: true,
|
||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">',
|
||||
}).addTo(map);
|
||||
};
|
||||
// add controls
|
||||
new L.Control.Zoom({ position: 'topright' }).addTo(map);
|
||||
new L.control.scale({position: 'bottomright', imperial: false}).addTo(map);
|
||||
|
||||
// create station and event layer
|
||||
// stationLayer = L.geoJson().addTo(map);
|
||||
@@ -242,5 +216,6 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
// print icon
|
||||
L.easyPrint().addTo(map);
|
||||
// L.easyPrint().addTo(map);
|
||||
|
||||
});
|
||||
|
||||
43
www/misc.js
43
www/misc.js
@@ -4,7 +4,7 @@
|
||||
**********************************************************************/
|
||||
|
||||
/* License
|
||||
Copyright 2020 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
Copyright 2014 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
@@ -90,13 +90,14 @@ var eventDetails = {};
|
||||
var stationTable = {};
|
||||
var config = {
|
||||
ajax: {
|
||||
timeout: 20000, // 20 seconds
|
||||
eventURL: 'https://fdsnws.geophysik.ruhr-uni-bochum.de/fdsnws/event/1/query',
|
||||
timeout: 10000, // 10 seconds
|
||||
eventURL: '/fdsnws/event/1/query',
|
||||
dlsvURL: 'dlsv',
|
||||
mseedURL: 'https://fdsnws.geophysik.ruhr-uni-bochum.de/fdsnws/dataselect/1/query',
|
||||
stationURL: 'https://fdsnws.geophysik.ruhr-uni-bochum.de/fdsnws/station/1/query',
|
||||
nominatimURL: 'https://photon.komoot.de/reverse',
|
||||
timespan: 180,
|
||||
mseedURL: '/fdsnws/dataselect/1/query',
|
||||
stationURL: '/fdsnws/station/1/query',
|
||||
nominatimURL: '//open.mapquestapi.com/nominatim/v1/reverse.php',
|
||||
// nominatimURL: '//nominatim.openstreetmap.org/reverse',
|
||||
timespan: 60,
|
||||
},
|
||||
event: {
|
||||
evaluationBlacklist: ['automatic', 'preliminary', 'rejected'],
|
||||
@@ -105,14 +106,12 @@ var config = {
|
||||
markerColorH: 'red',
|
||||
minMag: 1.2,
|
||||
minMagDelta: 0.1,
|
||||
typeWhitelist: ['earthquake', 'induced or triggered event', 'controlled explosion'],
|
||||
// typeWhitelist: ['earthquake', 'induced or triggered event', 'controlled explosion', 'nuclear explosion'],
|
||||
// typeWhitelist: ['earthquake', 'induced or triggered event'],
|
||||
typeWhitelist: ['earthquake', 'induced or triggered event'],
|
||||
},
|
||||
map: {
|
||||
zoomDefault: 9,
|
||||
zoomFocus: 12,
|
||||
centerDefault: [51.85, 7.0],
|
||||
centerDefault: [51.65, 7.2],
|
||||
timespan: 180,
|
||||
latlngDelta: 0.1,
|
||||
},
|
||||
@@ -120,7 +119,7 @@ var config = {
|
||||
markerColor: 'darkgreen',
|
||||
markerOpacity: 1,
|
||||
markerSize: {
|
||||
defaultSize: 8,
|
||||
default: 8,
|
||||
GE_IBBN: 10,
|
||||
GR_BUG: 10,
|
||||
GR_KAST: 10,
|
||||
@@ -130,11 +129,7 @@ var config = {
|
||||
NL_WIT: 3,
|
||||
NL_WTSB: 3,
|
||||
},
|
||||
networkBlacklist: ['NL', 'X5', '1A', 'AM'],
|
||||
stationBlacklist: ['RN_WEA2', 'RN_ACN', 'RN_BHE', 'RN_ENT', 'RN_GSH', 'RN_HES', 'RN_JCKS', 'RN_LOH',
|
||||
'RN_OLF', 'RN_PLH', 'RN_RWB', 'RN_SOR', 'RN_TDN', 'RN_WBS',
|
||||
'RN_HAM1', 'RN_HAM2', 'RN_HAM3', 'RN_HAM4', 'RN_HAM5', 'RN_HAM6', 'RN_HAM7', 'RN_HAM8', 'RN_HAM9',
|
||||
'RN_HAM10', 'RN_HAM11', 'RN_HAM12', 'RN_HAM13', 'RN_HAM14', 'RN_HAM15', 'RN_HAM16', 'RN_HAM17'],
|
||||
networkBlacklist: ['NL', 'X5', '1A'],
|
||||
},
|
||||
tab: {
|
||||
active: 0,
|
||||
@@ -145,18 +140,13 @@ var config = {
|
||||
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',
|
||||
NH: 'http://www.gd.nrw.de/gg_le.htm',
|
||||
NL: 'http://www.knmi.nl/seismologie/seismisch_network_knmi3.html',
|
||||
RN: 'https://doi.org/10.7914/SN/RN',
|
||||
YD: 'https://doi.org/10.7914/SN/YD_2020',
|
||||
};
|
||||
var networkText = {
|
||||
GE: '<a href="'+networkURL['GE']+'" target="_blank">GEOFON Seismic Network</a> - Deutsches GeoForschungsZentrum GFZ',
|
||||
GE: '<a href="'+networkURL['GE']+'" target="_blank">GEOFON</a> Program, GFZ Potsdam',
|
||||
GR: '<a href="'+networkURL['GR']+'" target="_blank">German Regional Seismic Network</a>, BGR Hannover',
|
||||
NH: '<a href="'+networkURL['NH']+'" target="_blank">Geologischer Dienst NRW</a>, Krefeld',
|
||||
NL: '<a href="'+networkURL['NL']+'" target="_blank">Netherlands Seismic Network</a>, The Netherlands',
|
||||
RN: '<a href="'+networkURL['RN']+'" target="_blank">RuhrNet - Ruhr-University Bochum, Germany</a>',
|
||||
YD: '<a href="'+networkURL['YD']+'" target="_blank">FloodRisk Seismic Network</a>',
|
||||
RN: 'RuhrNet - Ruhr-University Bochum, Germany',
|
||||
};
|
||||
var bochumStation = ['BUG', 'IBBN', 'KERA', 'KARP'];
|
||||
|
||||
@@ -221,4 +211,7 @@ $(document).ready(function() {
|
||||
}).bind("ajaxStop", function() {
|
||||
$("#spinner").hide();
|
||||
});
|
||||
});
|
||||
|
||||
// hide info container
|
||||
$('div.info').hide()
|
||||
});
|
||||
@@ -9,29 +9,6 @@ var specialEvents = [
|
||||
//'bug2014ilxd', // Bassum
|
||||
//'bug2014gfzw', // Darmstadt
|
||||
//'bug2014datb', // Groningen
|
||||
// 'bug2013yvko', // Haltern 3.4
|
||||
// 'bug2015fdpy', // Darmstadt 3.0
|
||||
// 'bug2016ajgm', // CTBT violation North Korea
|
||||
// 'bug2016cqkd', // Taunusstein 2.5
|
||||
// 'bug2016hdae', // Aldenhoven 2.6
|
||||
// 'bug2016hdaj', // Aldenhoven 2.4
|
||||
// 'bug2016kkrq', // Bottrop 3.3
|
||||
// 'bug2016qphy', // Central Italy 6.1
|
||||
// 'bug2016rslt', // CTBT violation North Korea
|
||||
// 'bug2016ueqo', // Darmstadt 2.4
|
||||
// 'bug2016ufpi', // Darmstadt 3.0
|
||||
// 'bug2016vico', // Central Italy 6.5
|
||||
// 'bug2016vrnc', // Nörvenich 3.2
|
||||
// 'bug2016zawb', // St Goar 3.2
|
||||
// 'bug2017iyhl', // Hürtgenwald 2.1
|
||||
// 'bug2017omwg', // Brühl 2.3
|
||||
// 'bug2017rfxe', // CTBT violation North Korea 6.1
|
||||
// 'bug2017rjvq', // Dreieich / Hessen 2.6
|
||||
// 'bug2017vxmm', // Brühl / Hürth 3.1
|
||||
// 'bug2018nyax' // Ochtendung 2.7
|
||||
// 'bug2019cxga', // Ochtendung 3.0
|
||||
// 'bug2019czbt', // Ochtendung 2.9
|
||||
// 'bug2019fura', // Sprengung Duisburg-Hochheide (Weißer Riese) 2.0
|
||||
// 'bug2019yeij', // Tektonisch, Hambach 2.2
|
||||
'bug2020fqxf' // Meckenheim, 2.5
|
||||
'bug2013yvko', // Haltern 3.4
|
||||
'bug2015fdpy', // Darmstadt 3.0
|
||||
];
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
**********************************************************************/
|
||||
|
||||
/* License
|
||||
Copyright 2020 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
Copyright 2014 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/* Load the stations using ajax */
|
||||
function loadStations(station, stime, etime) {
|
||||
function loadStations(stime, etime) {
|
||||
var mapBounds = map.getBounds();
|
||||
var N = mapBounds.getNorth();
|
||||
var E = mapBounds.getEast();
|
||||
@@ -37,23 +37,14 @@ function loadStations(station, stime, etime) {
|
||||
var etime = new Date();
|
||||
etime.setDate(etime.getDate()+1);
|
||||
};
|
||||
if ( !station ) {
|
||||
var request_data = {
|
||||
endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()),
|
||||
startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()),
|
||||
level: 'station',
|
||||
minlat: S-config['map']['latlngDelta'],
|
||||
maxlat: N+config['map']['latlngDelta'],
|
||||
minlon: W-config['map']['latlngDelta'],
|
||||
maxlon: E+config['map']['latlngDelta'],
|
||||
};
|
||||
} else {
|
||||
var request_data = {
|
||||
endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()),
|
||||
startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()),
|
||||
level: 'channel',
|
||||
station: station,
|
||||
};
|
||||
var request_data = {
|
||||
endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()),
|
||||
startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()),
|
||||
level: 'channel',
|
||||
minlat: S-config['map']['latlngDelta'],
|
||||
maxlat: N+config['map']['latlngDelta'],
|
||||
minlon: W-config['map']['latlngDelta'],
|
||||
maxlon: E+config['map']['latlngDelta'],
|
||||
};
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
@@ -70,13 +61,13 @@ function loadStations(station, stime, etime) {
|
||||
lng = $(this).find('Longitude:first').text(),
|
||||
stationID = network+'_'+station,
|
||||
stationText = network+'.'+station;
|
||||
if ( !stationTable[stationID] && $.inArray(stationID, config['station']['stationBlacklist']) <0 ) {
|
||||
if ( !stationTable[stationID] ) {
|
||||
// general station info (1st line)
|
||||
var row = sprintf('<tr><td><a href="#" class="toggle">%s</a></td><td><a href="#" class="toggle">%s</a></td><td class="ar">%7.4f</td><td class="ar">%7.4f</td></tr>' , network, station, Number(lat), Number(lng));
|
||||
// setting up network details (2nd line)
|
||||
row += sprintf('<tr class="tablesorter-childRow station-details"><td colspan="4">%s', networkText[network] || '');
|
||||
row += ( $.inArray(station, bochumStation)+1 ) ? '<br /><em>Betreiber:</em> Ruhr-Universität Bochum</td></tr>' : '</td></tr>' ;
|
||||
if ( network == 'RN' || network == 'Z3' || network == '1A' || network == 'YD' || $.inArray(station, bochumStation)+1 ) {
|
||||
row += ( $.inArray(station, bochumStation)+1 ) ? '</br><em>Betreiber:</em> Ruhr-Universität Bochum</td></tr>' : '</td></tr>' ;
|
||||
if ( network == 'RN' || network == 'X5' || $.inArray(station, bochumStation)+1 ) {
|
||||
// setting up station details (3rd line)
|
||||
row += '<tr class="tablesorter-childRow station-details"><td colspan="4">';
|
||||
row += stationDetails(station, network, lat, lng, stationID, stationText, $(this));
|
||||
@@ -90,7 +81,7 @@ function loadStations(station, stime, etime) {
|
||||
sc3mlRespURL = URL + '&level=response&format=sc3ml';
|
||||
dlsvFile = sprintf('%s_%s.dlsv', network.toUpperCase(), station.toUpperCase());
|
||||
row += '<tr class="tablesorter-childRow station-download"><td colspan="4">'
|
||||
+ sprintf('Download details: <a download="%s.xml" href="%s" target="_blank">FDSNxml</a> or <a download="%s.sc3" href="%s" target="_blank">SC3ml</a><br /> ', stationID, fdsnxmlURL, stationID, sc3mlURL)
|
||||
+ sprintf('Download details: <a download="%s.xml" href="%s" target="_blank">FDSNxml</a> or <a download="%s.sc3" href="%s" target="_blank">SC3ml</a></br> ', stationID, fdsnxmlURL, stationID, sc3mlURL)
|
||||
+ sprintf('Response files: <a download="%s_response.xml" href="%s" target="_blank">FDSNxml</a>, <a download="%s_response.sc3" href="%s" target="_blank">SC3ml</a> ', stationID, fdsnxmlRespURL, stationID, sc3mlRespURL)
|
||||
+ sprintf('or <a href="%s" download="%s" type="application/octet-stream">datalessSEED</a>', config['ajax']['dlsvURL'] + '/' + dlsvFile, dlsvFile.toLowerCase())
|
||||
+ '</td></tr>';
|
||||
@@ -123,16 +114,7 @@ function loadStations(station, stime, etime) {
|
||||
}
|
||||
});
|
||||
// create stations csv download link
|
||||
var request_data = {
|
||||
endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()),
|
||||
startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()),
|
||||
level: 'station',
|
||||
minlat: S-config['map']['latlngDelta'],
|
||||
maxlat: N+config['map']['latlngDelta'],
|
||||
minlon: W-config['map']['latlngDelta'],
|
||||
maxlon: E+config['map']['latlngDelta'],
|
||||
format: 'text',
|
||||
};
|
||||
request_data['format'] = 'text';
|
||||
$('#stations-csv-link').attr('href', config['ajax']['stationURL']+'?'+$.param(request_data));
|
||||
};
|
||||
|
||||
@@ -142,13 +124,13 @@ function stationDetails(station, network, lat, lng, stationId, stationText, stat
|
||||
var elevation = stationObject.find('Elevation:first').text();
|
||||
var name = stationObject.find('Site > Name').text();
|
||||
output = '<pre>'
|
||||
+ name + '<br />'
|
||||
+ 'Position: ' + lat + '°N ' + lng + '°E, Höhe: ' + elevation + ' m NN<br />';
|
||||
+ name + '</br>'
|
||||
+ 'Position: ' + lat + '°N ' + lng + '°E, Höhe: ' + elevation + ' m NN</br>';
|
||||
stationObject.find('Channel').each(function() {
|
||||
var code = $(this).attr('code');
|
||||
var sensor = $(this).find('Sensor > Type').text().split(',')[0];
|
||||
var sampleRate = $(this).find('SampleRate').text();
|
||||
output += '<br />Kanal ' + code + ', Abtastrate ' + sampleRate + ' Hz, Sensor ' + sensor;
|
||||
output += '</br>Kanal ' + code + ', Abtastrate ' + sampleRate + ' Hz, Sensor ' + sensor;
|
||||
});
|
||||
output += '</pre>';
|
||||
return output;
|
||||
@@ -223,20 +205,6 @@ function initStationTable() {
|
||||
**********************************************************************/
|
||||
$(document).ready(function() {
|
||||
loadStations();
|
||||
loadStations('A100A');
|
||||
loadStations('A101B');
|
||||
loadStations('A102A');
|
||||
loadStations('A103A');
|
||||
loadStations('A103B');
|
||||
loadStations('A104A');
|
||||
loadStations('A104B');
|
||||
loadStations('A105A');
|
||||
loadStations('A106B');
|
||||
loadStations('A107C');
|
||||
loadStations('A108A');
|
||||
loadStations('A109A');
|
||||
// loadStations('KERA');
|
||||
// loadStations('KARP');
|
||||
// show / hide station info
|
||||
$('#stationstable').delegate('.toggle', 'click' , function(){
|
||||
// toggle visibility of selected row
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
**********************************************************************/
|
||||
|
||||
/* License
|
||||
Copyright 2020 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
Copyright 2014 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/* Load the stations using ajax */
|
||||
function loadStations(station, stime, etime) {
|
||||
function loadStations(stime, etime) {
|
||||
var mapBounds = map.getBounds();
|
||||
var N = mapBounds.getNorth();
|
||||
var E = mapBounds.getEast();
|
||||
@@ -37,23 +37,14 @@ function loadStations(station, stime, etime) {
|
||||
var etime = new Date();
|
||||
etime.setDate(etime.getDate()+1);
|
||||
};
|
||||
if ( !station ) {
|
||||
var request_data = {
|
||||
endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()),
|
||||
startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()),
|
||||
level: 'station',
|
||||
minlat: S-config['map']['latlngDelta'],
|
||||
maxlat: N+config['map']['latlngDelta'],
|
||||
minlon: W-config['map']['latlngDelta'],
|
||||
maxlon: E+config['map']['latlngDelta'],
|
||||
};
|
||||
} else {
|
||||
var request_data = {
|
||||
endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()),
|
||||
startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()),
|
||||
level: 'channel',
|
||||
station: station,
|
||||
};
|
||||
var request_data = {
|
||||
endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()),
|
||||
startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()),
|
||||
level: 'channel',
|
||||
minlat: S-config['map']['latlngDelta'],
|
||||
maxlat: N+config['map']['latlngDelta'],
|
||||
minlon: W-config['map']['latlngDelta'],
|
||||
maxlon: E+config['map']['latlngDelta'],
|
||||
};
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
@@ -70,13 +61,13 @@ function loadStations(station, stime, etime) {
|
||||
lng = $(this).find('Longitude:first').text(),
|
||||
stationID = network+'_'+station,
|
||||
stationText = network+'.'+station;
|
||||
if ( !stationTable[stationID] && $.inArray(stationID, config['station']['stationBlacklist']) <0 ) {
|
||||
if ( !stationTable[stationID] ) {
|
||||
// general station info (1st line)
|
||||
var row = sprintf('<tr><td><a href="#" class="toggle">%s</a></td><td><a href="#" class="toggle">%s</a></td><td class="ar">%7.4f</td><td class="ar">%7.4f</td></tr>' , network, station, Number(lat), Number(lng));
|
||||
// setting up network details (2nd line)
|
||||
row += sprintf('<tr class="tablesorter-childRow station-details"><td colspan="4">%s', networkText[network] || '');
|
||||
row += ( $.inArray(station, bochumStation)+1 ) ? '<br /><em>Operator:</em> Ruhr-University Bochum, Germany</td></tr>' : '</td></tr>' ;
|
||||
if ( network == 'RN' || network == 'Z3' || network == '1A' || network == 'YD' || $.inArray(station, bochumStation)+1 ) {
|
||||
row += ( $.inArray(station, bochumStation)+1 ) ? '</br><em>Operator:</em> Ruhr-University Bochum</td></tr>' : '</td></tr>' ;
|
||||
if ( network == 'RN' || network == 'X5' || $.inArray(station, bochumStation)+1 ) {
|
||||
// setting up station details (3rd line)
|
||||
row += '<tr class="tablesorter-childRow station-details"><td colspan="4">';
|
||||
row += stationDetails(station, network, lat, lng, stationID, stationText, $(this));
|
||||
@@ -90,7 +81,7 @@ function loadStations(station, stime, etime) {
|
||||
sc3mlRespURL = URL + '&level=response&format=sc3ml';
|
||||
dlsvFile = sprintf('%s_%s.dlsv', network.toUpperCase(), station.toUpperCase());
|
||||
row += '<tr class="tablesorter-childRow station-download"><td colspan="4">'
|
||||
+ sprintf('Download details: <a download="%s.xml" href="%s" target="_blank">FDSNxml</a> or <a download="%s.sc3" href="%s" target="_blank">SC3ml</a><br /> ', stationID, fdsnxmlURL, stationID, sc3mlURL)
|
||||
+ sprintf('Download details: <a download="%s.xml" href="%s" target="_blank">FDSNxml</a> or <a download="%s.sc3" href="%s" target="_blank">SC3ml</a></br> ', stationID, fdsnxmlURL, stationID, sc3mlURL)
|
||||
+ sprintf('Response files: <a download="%s_response.xml" href="%s" target="_blank">FDSNxml</a>, <a download="%s_response.sc3" href="%s" target="_blank">SC3ml</a> ', stationID, fdsnxmlRespURL, stationID, sc3mlRespURL)
|
||||
+ sprintf('or <a href="%s" download="%s" type="application/octet-stream">datalessSEED</a>', config['ajax']['dlsvURL'] + '/' + dlsvFile, dlsvFile.toLowerCase())
|
||||
+ '</td></tr>';
|
||||
@@ -123,16 +114,7 @@ function loadStations(station, stime, etime) {
|
||||
}
|
||||
});
|
||||
// create stations csv download link
|
||||
var request_data = {
|
||||
endafter: sprintf("%d-%02d-%02d", stime.getFullYear(), stime.getMonth()+1, stime.getDate()),
|
||||
startbefore: sprintf("%d-%02d-%02d", etime.getFullYear(), etime.getMonth()+1, etime.getDate()),
|
||||
level: 'station',
|
||||
minlat: S-config['map']['latlngDelta'],
|
||||
maxlat: N+config['map']['latlngDelta'],
|
||||
minlon: W-config['map']['latlngDelta'],
|
||||
maxlon: E+config['map']['latlngDelta'],
|
||||
format: 'text',
|
||||
};
|
||||
request_data['format'] = 'text';
|
||||
$('#stations-csv-link').attr('href', config['ajax']['stationURL']+'?'+$.param(request_data));
|
||||
};
|
||||
|
||||
@@ -142,13 +124,13 @@ function stationDetails(station, network, lat, lng, stationId, stationText, stat
|
||||
var elevation = stationObject.find('Elevation:first').text();
|
||||
var name = stationObject.find('Site > Name').text();
|
||||
output = '<pre>'
|
||||
+ name + '<br />'
|
||||
+ 'Position: ' + lat + '°N ' + lng + '°E, height: ' + elevation + ' m a.s.l.<br />';
|
||||
+ name + '</br>'
|
||||
+ 'Position: ' + lat + '°N ' + lng + '°E, height: ' + elevation + ' m a.s.l.</br>';
|
||||
stationObject.find('Channel').each(function() {
|
||||
var code = $(this).attr('code');
|
||||
var sensor = $(this).find('Sensor > Type').text().split(',')[0];
|
||||
var sampleRate = $(this).find('SampleRate').text();
|
||||
output += '<br />Channel ' + code + ', Samplingrate ' + sampleRate + ' Hz, Sensor ' + sensor;
|
||||
output += '</br>Chanel ' + code + ', Samplingrate ' + sampleRate + ' Hz, Sensor ' + sensor;
|
||||
});
|
||||
output += '</pre>';
|
||||
return output;
|
||||
@@ -223,20 +205,6 @@ function initStationTable() {
|
||||
**********************************************************************/
|
||||
$(document).ready(function() {
|
||||
loadStations();
|
||||
loadStations('A100A');
|
||||
loadStations('A101B');
|
||||
loadStations('A102A');
|
||||
loadStations('A103A');
|
||||
loadStations('A103B');
|
||||
loadStations('A104A');
|
||||
loadStations('A104B');
|
||||
loadStations('A105A');
|
||||
loadStations('A106B');
|
||||
loadStations('A107C');
|
||||
loadStations('A108A');
|
||||
loadStations('A109A');
|
||||
// loadStations('KERA');
|
||||
// loadStations('KARP');
|
||||
// show / hide station info
|
||||
$('#stationstable').delegate('.toggle', 'click' , function(){
|
||||
// toggle visibility of selected row
|
||||
|
||||
Reference in New Issue
Block a user