Skip to content
This repository was archived by the owner on May 10, 2023. It is now read-only.

Commit 51fcc24

Browse files
committed
Merge branch 'release/jakarta' into build/jakarta/2017.334
2 parents 9cfb442 + 0266000 commit 51fcc24

File tree

32 files changed

+922
-99
lines changed

32 files changed

+922
-99
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,37 @@
11
# Jakarta
22

3+
## Release 2017.334 patch2
4+
5+
```SC_API_VERSION 11.1.0```
6+
7+
* doc
8+
9+
* Add amplitude units expected by each magnitude implementation to glossary
10+
* Add to data model API documentation for Origin::latitude and Origin::longitude
11+
that uncertainties are given in kilometers
12+
13+
* trunk
14+
15+
* Fix memory leak and type mapping of QuakeML exporter used with sccnv
16+
* Ship xsd and xsl files in ```share/xml```
17+
18+
* scwfparam
19+
20+
* Add Rupture::strike attribute to strong motion data model extension
21+
22+
* GUI
23+
24+
* Add StandardLegend class to create map legends in an easy way
25+
* Add support for map legend descriptions in map layer configuration
26+
327
## Release 2017.334 patch1
428

529
* trunk
630

731
* Fix crash in FDSNWS recordstream if server cannot be reached
832
* Updated sc3ml_0.10.xsd
933
* Use correct name in connection info for Python scripts
34+
* Fix SQL character escape bug for strings starting with a single quote
1035

1136
* scamp
1237

doc/base/api-python.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9116,7 +9116,8 @@ Reference
91169116

91179117
Hypocenter longitude, with respect to the World Geodetic System 1984
91189118
\(WGS84\) reference system
9119-
\(National Imagery and Mapping Agency 2000\) in degrees.
9119+
\(National Imagery and Mapping Agency 2000\) in degrees. The uncertainties
9120+
are given in kilometers.
91209121

91219122
.. py:method:: latitude()
91229123

@@ -9127,6 +9128,7 @@ Reference
91279128
:param longitude: :ref:`RealQuantity <api-python-datamodel-realquantity>`
91289129

91299130
Hypocenter latitude, with respect to the WGS84 reference system in degrees.
9131+
The uncertainties are given in kilometers.
91309132

91319133
.. py:method:: longitude()
91329134

doc/base/glossary.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@ is taken from Modern Global Seismology.
330330
In SeisComP3 a modified local magnitude Mlv is determined by simulation of a Wood-Anderson instrument and then measuring
331331
the amplitude in a 150 s time window on the vertical component of station with distances smaller than 8°.
332332

333+
The amplitude unit in SeisComP3 is **millimeter** (mm).
334+
333335
magnitude, body-wave (mb)
334336
Magnitude developed for teleseismic body waves. mb is defined on the amplitude of the first few cycles of the P-wave,
335337
typically a time window of 20 s - 30 s. Only the first few cycles are used to minimize the effects of radiation pattern
@@ -352,6 +354,8 @@ is taken from Modern Global Seismology.
352354
In SeisComP3 mb is determined by simulation of a WWSSN short-period seismometer and then measuring the amplitudes in
353355
a 30 s time window at stations in the distance range of 5° to 105°.
354356

357+
The amplitude unit in SeisComP3 is **nanometer** (nm).
358+
355359
magnitude, broadband body-wave (mB)
356360
mB is a magnitude based on body waves like mb, but the amplitude is measured in a broad
357361
frequency range and longer time windows. Instead of amplitude measurements on displacement
@@ -370,7 +374,9 @@ is taken from Modern Global Seismology.
370374
371375
l = min(11.5 \Delta, 60)
372376
373-
magnitude, surface wave (Ms)
377+
The amplitude unit in SeisComP3 is **nanometer per second** (nm/s).
378+
379+
magnitude, surface wave (Ms)
374380
Ms is a magnitude scale based on teleseismic surface waves. Ms is based on measurements of
375381
the maximum horizontal true ground motion displacement amplitudes
376382

@@ -391,6 +397,8 @@ is taken from Modern Global Seismology.
391397
allow a broader spectrum of dominant periods. This formula is valid for distances of
392398
2° to 160° and source depth smaller than 50 km.
393399

400+
The amplitude unit in SeisComP3 is **meter per second** (m/s).
401+
394402
magnitude, JMA (M_JMA)
395403
M(JMA) is a magnitude similar to the Ms, but the formula is calibrated for instruments
396404
with 5 s period at local distances. The data set for the calibration was gained by the
@@ -403,6 +411,8 @@ is taken from Modern Global Seismology.
403411
This equation is valid for local (< 2000 km) and shallow (< 80 km) earthquakes. For
404412
deeper earthquakes additional correction functions have to be applied (Katsumata, 1996).
405413

414+
The amplitude unit in SeisComP3 is **micrometer** (um).
415+
406416
magnitude, moment (Mw)
407417
The moment magnitude is a magnitude scale related to the seismic moment M\ :sub:`0` and
408418
thus to the released seismic energy.
@@ -423,6 +433,8 @@ is taken from Modern Global Seismology.
423433
of multiple records results in an estimation of the moment magnitude without correction
424434
for the source mechanism (Tsuboi et al., 1995).
425435

436+
The amplitude unit in SeisComP3 is **nanometer times second** (nm*s).
437+
426438
mainshock
427439
The largest earthquake in a sequence, sometimes preceded by one or more foreshocks,
428440
and almost always followed by many aftershocks.

src/gui-qt4/libs/seiscomp3/gui/core/scheme.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ Scheme::Colors::Map::Map() :
326326
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
327327
Scheme::Colors::Legend::Legend() :
328328
background(255, 255, 255, 224),
329-
border(0, 0, 0),
330-
text(0, 0, 0),
329+
border(160, 160, 160),
330+
text(64, 64, 64),
331331
headerText(0, 0, 0)
332332
{}
333333
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

src/gui-qt4/libs/seiscomp3/gui/map/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
SET(GUI_MAP_SOURCES
22
layer.cpp
33
legend.cpp
4+
standardlegend.cpp
45
mapsymbol.cpp
56
mapsymbolcollection.cpp
67
maptree.cpp
@@ -26,6 +27,7 @@ SET(GUI_MAP_HEADERS
2627

2728
SET(GUI_MAP_MOC_HEADERS
2829
legend.h
30+
standardlegend.h
2931
layer.h
3032
imagetree.h
3133
canvas.h

src/gui-qt4/libs/seiscomp3/gui/map/canvas.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,10 @@ void Canvas::init() {
407407
connect(_maptree.get(), SIGNAL(tilesUpdated()), this, SLOT(updatedTiles()));
408408
}
409409

410-
_citiesLayer._canvas = this;
410+
setupLayer(&_citiesLayer);
411411
_citiesLayer.setVisible(SCScheme.map.showCities);
412412

413-
_gridLayer._canvas = this;
413+
setupLayer(&_gridLayer);
414414
_gridLayer.setGridDistance(QPointF(15.0, 15.0));
415415
_gridLayer.setVisible(SCScheme.map.showGrid);
416416

@@ -1415,6 +1415,7 @@ void Canvas::drawLegends(QPainter& painter) {
14151415
painter.setBrush(SCScheme.colors.legend.background);
14161416
painter.drawRect(contentRect);
14171417

1418+
painter.setPen(SCScheme.colors.legend.text);
14181419
legend->draw(contentRect, painter);
14191420
}
14201421
else {

src/gui-qt4/libs/seiscomp3/gui/map/canvas.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ DEFINE_SMARTPOINTER(TextureCache);
4949
struct SC_GUI_API LayerProperties {
5050
const LayerProperties *parent;
5151
std::string name;
52+
std::string title;
53+
Qt::Orientation orientation;
54+
Qt::Alignment legendArea;
55+
std::string label;
56+
int index;
5257
bool visible;
5358
QPen pen;
5459
QBrush brush;
@@ -60,14 +65,16 @@ struct SC_GUI_API LayerProperties {
6065
bool filled;
6166

6267
LayerProperties(const std::string &name)
63-
: parent(NULL), name(name)
64-
, visible(true), drawName(false)
68+
: parent(NULL), name(name), orientation(Qt::Vertical)
69+
, legendArea(Qt::AlignTop | Qt::AlignLeft)
70+
, index(0), visible(true), drawName(false)
6571
, debug(false), rank(-1), roughness(3)
6672
, filled(false) {}
6773

68-
LayerProperties(const std::string &name, const LayerProperties* parent)
69-
: parent(parent), name(name)
70-
, visible(parent->visible), pen(parent->pen)
74+
LayerProperties(const std::string &name, const LayerProperties *parent)
75+
: parent(parent), name(name), orientation(Qt::Vertical)
76+
, legendArea(Qt::AlignTop | Qt::AlignLeft)
77+
, index(0), visible(parent->visible), pen(parent->pen)
7178
, brush(parent->brush), font(parent->font)
7279
, drawName(parent->drawName), debug(parent->debug)
7380
, rank(-1), roughness(parent->roughness)

src/gui-qt4/libs/seiscomp3/gui/map/layers/citieslayer.cpp

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/***************************************************************************
2-
* Copyright (C) by GFZ Potsdam *
2+
* Copyright (C) by GFZ Potsdam, gempa GmbH *
33
* *
44
* You can redistribute and/or modify this program under the *
55
* terms of the SeisComP Public License. *
@@ -10,23 +10,57 @@
1010
* SeisComP Public License for more details. *
1111
***************************************************************************/
1212

13+
1314
#include <seiscomp3/gui/map/layers/citieslayer.h>
1415

1516
#include <seiscomp3/gui/core/application.h>
1617
#include <seiscomp3/gui/map/canvas.h>
1718
#include <seiscomp3/gui/map/projection.h>
19+
#include <seiscomp3/gui/map/standardlegend.h>
20+
1821

1922
namespace Seiscomp {
2023
namespace Gui {
2124
namespace Map {
2225

26+
#define CITY_NORMAL_SYMBOL_SIZE 4
27+
#define CITY_BIG_SYMBOL_SIZE 6
28+
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
29+
30+
31+
32+
33+
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2334
CitiesLayer::CitiesLayer(QObject* parent) : Layer(parent), _selectedCity(NULL) {
2435
setName("cities");
25-
}
2636

27-
CitiesLayer::~CitiesLayer() {
37+
StandardLegend *legend = new StandardLegend(this);
38+
legend->setTitle(tr("Cities"));
39+
legend->setArea(Qt::Alignment(Qt::AlignTop | Qt::AlignRight));
40+
legend->addItem(new StandardLegendItem(SCScheme.colors.map.cityOutlines,
41+
SCScheme.colors.map.cityNormal, tr("1Mio- inhabitants"),
42+
CITY_NORMAL_SYMBOL_SIZE));
43+
legend->addItem(new StandardLegendItem(SCScheme.colors.map.cityOutlines,
44+
SCScheme.colors.map.cityNormal, tr("1Mio+ inhabitants"),
45+
CITY_BIG_SYMBOL_SIZE));
46+
legend->addItem(new StandardLegendItem(SCScheme.colors.map.cityOutlines,
47+
SCScheme.colors.map.cityCapital, tr("Capital"),
48+
CITY_BIG_SYMBOL_SIZE));
49+
addLegend(legend);
2850
}
51+
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
52+
53+
54+
55+
56+
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
57+
CitiesLayer::~CitiesLayer() {}
58+
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
59+
60+
2961

62+
63+
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
3064
void CitiesLayer::draw(const Seiscomp::Gui::Map::Canvas* canvas,
3165
QPainter& painter) {
3266
if ( !isVisible() ) return;
@@ -71,7 +105,12 @@ void CitiesLayer::draw(const Seiscomp::Gui::Map::Canvas* canvas,
71105

72106
painter.restore();
73107
}
108+
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
109+
110+
111+
74112

113+
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
75114
void CitiesLayer::drawCity(QPainter& painter, Grid &grid, QFont &font,
76115
bool &lastUnderline, bool &lastBold,
77116
const Projection* projection,
@@ -165,15 +204,30 @@ void CitiesLayer::drawCity(QPainter& painter, Grid &grid, QFont &font,
165204
painter.drawText(labelRect, Qt::AlignLeft | Qt::AlignTop |
166205
Qt::TextSingleLine, city.name().c_str());
167206
}
207+
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
208+
209+
210+
168211

212+
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
169213
void CitiesLayer::setSelectedCity(const Math::Geo::CityD* c) {
170214
_selectedCity = c;
171215
}
216+
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
172217

218+
219+
220+
221+
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
173222
const Math::Geo::CityD* CitiesLayer::selectedCity() const {
174223
return _selectedCity;
175224
}
225+
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
226+
227+
228+
176229

230+
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
177231
} // namespace Map
178232
} // namespce Gui
179233
} // namespace Seiscomp

src/gui-qt4/libs/seiscomp3/gui/map/layers/citieslayer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/***************************************************************************
2-
* Copyright (C) by GFZ Potsdam *
2+
* Copyright (C) by GFZ Potsdam, gempa GmbH *
33
* *
44
* You can redistribute and/or modify this program under the *
55
* terms of the SeisComP Public License. *

0 commit comments

Comments
 (0)