GithubHelp home page GithubHelp logo

ingv / qquake Goto Github PK

View Code? Open in Web Editor NEW
7.0 5.0 3.0 1.04 MB

A plugin for QGIS 3.x that relies on web services for loading seismological data

Home Page: https://www.emidius.eu/qquake/

License: GNU General Public License v3.0

Makefile 1.49% Batchfile 0.58% Python 97.35% Shell 0.36% QML 0.22%
qgis fdsn quakeml ogc

qquake's Introduction

QQuake, a plugin for loading seismological data in QGIS

QQuake plugin is a plugin that facilitates the download of seismological data from different sources and loads them directly in QGIS.

More information at the QQuake homepage at
https://www.emidius.eu/qquake/

The following is a scientific paper describing the plugin and the context that lead to its development

Locati M., Vallone R., Ghetta M. and Dawson N. (2021). QQuake, a QGIS Plugin for Loading Seismological Data From Web Services. Front. Earth Sci. 9:614663. https://doi.org/10.3389/feart.2021.614663

qquake's People

Contributors

ghtmtt avatar giorgiomariadesantis avatar mariolocati avatar mercurioblu avatar nyalldawson avatar robertovallone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

qquake's Issues

Changes to the CQL filtering window

The label of the tab containing the query editor should be changed to "Advanced Query (CQL editor)" as to clarify to the user which kind of query are supported (there are multiple standards for filtering data depending and they depend on the backend software).

In addition, please, add a button in the CQL editor tab with the label "Help on how to write a CQL query" should be added linking to
https://docs.geoserver.org/stable/en/user/tutorials/cql/cql_tutorial.html

image

Additional parameters that can be extracted from the WADL

I did a double check on eventually missing useful parameters that could be extracted from the WADL.

Sorry, I did miss the following parameters that should be included in the WADL parsing:

  • enable the flag "Filter by OriginID" when the query parameter "originid"
  • enable the flag "Filter by MagnitudeID" when the query parameter "magnitudeid"
  • enable the flag "Filter data updated after" when the query parameter "updatedafter" is present
  • enable the flag "Filter by Catalog" when the query parameter "catalog" is present
  • enable the flag "Filter by ContributorID" when the query parameter "contributorid" is present
  • enable the flag "Filter by event type" when the query parameter "eventtype" is present
  • enable the flag "Can include arrivals" when the query parameter "includearrivals" is present
  • enable the flag "Can filter using a circular area" when the query parameters "minradius" and "maxradius" are present
  • enable the flag "Radius of circular area can be specified in km" when the query parameters "minradiuskm" and "maxradiuskm" are present
  • enable the flag "Can output GeoJSON" when the option "geojson" is present in the query parameter "format"
  • enable the flag "Can output JSON" when the option "json" is present in the query parameter "format"
  • enable the flag "Can output KML" when the option "kml" is present in the query parameter "format"

Stretched GUI elements in the tab "Search by identifier"

@nyalldawson In both sub-tabs "Search by identifier" of the tabs "Earthquake parameters" and "Macroseismic data" the groups "Output table" and "Style" are streched vertically when the window is resized vertically leading to an unreadable content, see below.

This should not happen, when the content of the window cannot be show entirely because of a too small window, a vertical scrollbar should appear letting the user scroll all of its content visually well preserved.

image

Remove the "bbox" parameter when sending a CQL filter to a OGC WFS

The parameter "bbox" should not be incuded when sending a CQL filter to a WFS service.
The "bbox" parameter should stay when sending a CQL filter to a WMS service.

I tried sending a CQL filter request (Year > 1800) to the WFS "AHEAD-EPICA" and I get the following error

Layer europe:EPICA_1000_1899: Download of features for layer europe:EPICA_1000_1899 failed or partially failed: WFS exception report (code=OperationProcessingFailed text=bbox and cql_filter both specified but are mutually exclusive). You may attempt reloading the layer with F5

Errors while trying to add WCS support

I have tried to update the code base to add support to OGC WCS (Web Coverage Services).

I nearly did it, the GUI is pretty much OK, but the is still something preventing the correct loading of the layer.
I think the problem lies in the following file
https://github.com/INGV/qquake/blob/master/qquake/gui/ogc_service_options_widget.py#L169

This is the WCS endpoint of the layer I am trying to load
http://193.204.89.26:8080/geoserver/TINItaly/wcs?service=WCS&request=getCapabilities

This il the list of files I have changed for supporting WCS

@nyalldawson @GiorgioMariaDeSantis Can you please help me out in this?

Bug while checking/unchecking layers for OGC using buttons

I have introduced a button for checking and another ont to uncheck all layers for OGC services

These buttons seems to work fine with WMS and WMTS services, but do not work with WFS and WCS services and cannot track down why.

To implement these two buttons I have changed two files:

  • gui/ogc_service_options_widget.py with 254ea8c
  • ui/ogc_service_widget.ui with cca269f

@GiorgioMariaDeSantis and @robertovallone can you please help me out with this one?

It may be related to another related to the selection of which of the listed layers should be loaded in the WFS services #65

image

Visual issue when resizing the GUI

If the user vertically resize the recently introduced tab "By URL" in the FDSN-event and the macroseismic web service tabs, the drop-down buttons for "Units" and for "Values" end up squeezed, and become unreadable.

image

@nyalldawson could you please have a look at this?

Python error when the service return http error 204

When a fdsn (event, macroseismic o station) service returns an https error code 204 "no content", qquake generate a python error.

To reproduce the issue:

  • select "earthquake parameters"
  • select "INGV ISIDe"
  • enter 6 as the minimum magnitude
  • do not enter any time coverage filter
  • selecte "Italy" as the predefined geographical coverage filter
  • select "basic" as the output table format

Below the stack trace of the generated by the Python error

IndexError: list index out of range 
Traceback (most recent call last):
  File "/home/mario/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qquake/gui/qquake_dialog.py", line 966, in _fetcher_finished
    layer = self.fetcher.create_event_layer()
  File "/home/mario/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qquake/fetcher.py", line 774, in create_event_layer
    return self.events_to_layer(self.result, self.preferred_origins_only, self.preferred_magnitudes_only)
  File "/home/mario/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qquake/fetcher.py", line 618, in events_to_layer
    vl = self._create_empty_event_layer()
  File "/home/mario/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qquake/fetcher.py", line 569, in _create_empty_event_layer
    vl.dataProvider().addAttributes(self.result.to_event_fields(self.output_fields))
  File "/home/mario/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qquake/basic_text/basic_text_parser.py", line 186, in to_event_fields
    fields.append(QgsField(self.headers[0], QVariant.String))
IndexError: list index out of range

See the screenshot below
image

Python error while retrievgin macroseismic data

@nyalldawson I discovered a problem while using the latest QQuake v1.3 with macroseismic data web services.

I get the Python error UnboundLocalError: local variable 'style' referenced before assignment whenever trying to download macroseismic data, either from AHEAD or ASMI webservices, it doesn't matter if with a "basic" or an "extended" output table.

QQuake v1.3, QGIS v3.10.4 on Ubuntu 20.04

An error has occurred while executing Python code: 

UnboundLocalError: local variable 'style' referenced before assignment 
Traceback (most recent call last):
  File "/home/mario/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qquake/gui/qquake_dialog.py", line 968, in _fetcher_finished
    layer = self.fetcher.create_mdp_layer()
  File "/home/mario/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qquake/fetcher.py", line 783, in create_mdp_layer
    return self.mdpset_to_layer(self.result)
  File "/home/mario/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qquake/fetcher.py", line 711, in mdpset_to_layer
    style_attr = style.get('classified_attribute_text')
UnboundLocalError: local variable 'style' referenced before assignment


Python version: 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0] 
QGIS version: 3.10.4-A Coruña A Coruña, exported 

Python Path:
/usr/share/qgis/python
/home/mario/.local/share/QGIS/QGIS3/profiles/default/python
/home/mario/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python38.zip
/usr/lib/python3.8
/usr/lib/python3.8/lib-dynload
/usr/local/lib/python3.8/dist-packages
/usr/lib/python3/dist-packages
/home/mario/.local/share/QGIS/QGIS3/profiles/default/python

QQuake v1.3, QGIS v3.16.11 on Windows 10

An error has occurred while executing Python code: 

UnboundLocalError: local variable 'style' referenced before assignment 
Traceback (most recent call last):
  File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\gui\qquake_dialog.py", line 968, in _fetcher_finished
    layer = self.fetcher.create_mdp_layer()
  File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\fetcher.py", line 783, in create_mdp_layer
    return self.mdpset_to_layer(self.result)
  File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\fetcher.py", line 711, in mdpset_to_layer
    style_attr = style.get('classified_attribute_text')
UnboundLocalError: local variable 'style' referenced before assignment


Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] 
QGIS version: 3.16.11-Hannover Hannover, 26cc1c76 

Python Path:
C:/PROGRA~1/QGIS31~1.11/apps/qgis-ltr/./python
C:/Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS31~1.11/apps/qgis-ltr/./python/plugins
C:\Program Files\QGIS 3.16.11\bin\python39.zip
C:\PROGRA~1\QGIS31~1.11\apps\Python39\DLLs
C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib
C:\Program Files\QGIS 3.16.11\bin
C:\PROGRA~1\QGIS31~1.11\apps\Python39
C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages
C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\win32
C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\Pythonwin
C:/Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python

Python errors when loading earthquakes or MDPs using multiple identifiers

Entering multiple event identifiers in the tab "Search by Identifiers" for both earthquakes and macroseismic data lead to Python errors when selecting "Basic" output.

Case 1) service type "earthquakes", service "INGV ASMI-CPTI", list using commas
20121025_2305_000,20130621_1033_000,20131229_1708_000,20160824_0136_000
On both Windows and Linux this case works when "Extended" output is selected, whereas lead to Python error when "Basic" output is selected.

Case 1) service type "earthquakes", service "INGV ASMI-CPTI", list using new lines (on Windows 10)
20121025_2305_000
20130621_1033_000
20131229_1708_000
20160824_0136_000
This case lead to a Python error when "Basic" output is selected.

Can't select events with magnitudes smaller 1.0

When loading events using the tab "search by parameters" the minimum magnitude can not be set to values smaller than 1.0. I'm working with mining induced events and many of the events in my database are even smaller than 0.0!

List all service capabilities available in the config.json

For FDSN-event, macroseismic and FDSN-station web services, all capabilities contained in "settings" of the config.json file should be listed at the bottom of the "Service Information" tab as showed in the picture

image

Below an example for the FDSN-event "AHEAD-SHEEC"

Parameter in "config.json" Text showed in the "Service Information" tab
"datestart": "1000-01-01T00:00:00+00:00" Earliest date: 1000-01-01T00:00:00+00:00
"dateend": "1899-12-31T23:59:59+00:00" Latest date: 1899-12-31T23:59:59+00:00
"boundingbox": [-23.5,35,32,69] Geographical coverage: Lon min -23.5, Lon max 35, Lat min 32, Lat max 69
querylimitmaxentries: 5000 Allowed maximum number of returned entries: : 5000
queryeventid: true Support requests using event identifier: YES
queryoriginid: false Support requests using origin identifier”: NO
querymagnitudeid: false Support requests using magnitude identifier: NO
queryfocalmechanismid: false Support requests using forcal mechanism identifier: NO
queryupdatedafter: false Support requests of data published after a certain date: NO
querycatalog: true Support requests using source catalog identifier: YES
querycontributorid: true Support requests using source contributor identifier: YES
queryeventtype: false Support requests by event type: NO
querymagnitudetype: false Support requests by magnitude type: NO
queryincludeallorigins: true Support retrieval of all origin estimates: YES
queryincludeallmagnitudes: true Support retrieval of all magnitude estimates: YES
queryincludearrivals: false Support retrieval of arrival times: NO
queryincludeallstationsmagnitudes: false Support retrieval of all station magnitude estimates: NO
querylimit: true Support query limit: YES
querycircular: true Support filter using circular search: YES
querycircularradiuskm: true Support search radius in kilometers: YES
querydepth: false Support filter by hypocentral depth: NO
outputtext: true Support text output: YES
outputxml: true Support QuakeML output: YES
outputgeojson: true Support GeoJSON output: YES
outputjson: true Support JSON output: NO
outputkml: false Support KML output: NO
outputxlsx: false Support XLSX output: NO
httpcodenodata: "204" HTTP error code: 204

@nyalldawson could you please take care of this?

Fix the "Draw the circular area on the map"

For FDSN-event and macroseismic services, when a user click the button labelled "Draw the circular area on the map", the user expect to draw a circle on the map. Instead, the button allow the user to set the coordinates of the center of the circle only.

There two solution to fix this, the easiest one is to change the label to reflect what the button actually does, so something like "Set the center on the map" or something like that.

Alternatively, it should be implemented properly, and once clicked it should allow the user to draw a circle on the map, either clicking first the center, then a second click for setting the radius, or draw the circle by drawing its bounding box (first click create a first corner of the box, then a second click for the opposite corner).

image

@nyalldawson another one for you

Exception when fetching events

I get the following bug on Lubuntu 20.04 and QGIS 3.10 when selecting the “ISIDe” web service in the fdsn-event, time window 2020-01-02 up to 2020-12-31, magnitude range between 3.5 and 7.5, “Italy” as the geographical area, and “Basic” as output. We tried to reproduce the error on similar configurations, but we couldn’t reproduce it.
An error has occurred while executing Python code:

TypeError: QgsField(): arguments did not match any overloaded call:   overload 1: argument 2 has unexpected type 'NoneType'   overload 2: argument 1 has unexpected type 'str' 
Traceback (most recent call last):
  File "/home/mario/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qquake/gui/qquake_dialog.py", line 791, in _fetcher_finished
    layers.append(self.fetcher.create_event_layer())
  File "/home/mario/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qquake/fetcher.py", line 558, in create_event_layer
    return self.events_to_layer(self.result, self.preferred_origins_only, self.preferred_magnitudes_only)
  File "/home/mario/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qquake/fetcher.py", line 449, in events_to_layer
    vl = self._create_empty_event_layer()
  File "/home/mario/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qquake/fetcher.py", line 392, in _create_empty_event_layer
    vl.dataProvider().addAttributes(self.result.to_event_fields(self.output_fields))
  File "/home/mario/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qquake/basic_text_parser.py", line 152, in to_event_fields
    fields.append(QgsField(f, self.get_field_type(f)))
TypeError: QgsField(): arguments did not match any overloaded call:
  overload 1: argument 2 has unexpected type 'NoneType'
  overload 2: argument 1 has unexpected type 'str'

Python version: 3.8.10 (default, Jun 2 2021, 10:49:15) [GCC 9.4.0]
QGIS version: 3.10.4-A Coruña A Coruña, exported

Python Path:
/usr/share/qgis/python
/home/mario/.local/share/QGIS/QGIS3/profiles/default/python
/home/mario/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python38.zip
/usr/lib/python3.8
/usr/lib/python3.8/lib-dynload
/usr/local/lib/python3.8/dist-packages
/usr/lib/python3/dist-packages
/home/mario/.local/share/QGIS/QGIS3/profiles/default/python

Using the same filter settings as above, I get a Python error also on Windows 10 using QGIS 3.20. We tried to reproduce the error on similar configurations, but we couldn’t reproduce it.

TypeError: QgsField(): arguments did not match any overloaded call:   overload 1: argument 2 has unexpected type 'NoneType'   overload 2: argument 1 has unexpected type 'str'
Traceback (most recent call last):
  File "C:\Users/Rovida/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\gui\qquake_dialog.py", line 745, in _fetcher_finished
    layers.append(self.fetcher.create_event_layer())
  File "C:\Users/Rovida/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\fetcher.py", line 540, in create_event_layer
    return self.events_to_layer(self.result, self.preferred_origins_only, self.preferred_magnitudes_only)
  File "C:\Users/Rovida/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\fetcher.py", line 432, in events_to_layer
    vl = self._create_empty_event_layer()
  File "C:\Users/Rovida/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\fetcher.py", line 375, in _create_empty_event_layer
    vl.dataProvider().addAttributes(self.result.to_event_fields(self.output_fields))
  File "C:\Users/Rovida/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\basic_text_parser.py", line 146, in to_event_fields
    fields.append(QgsField(f, self.get_field_type(f)))
TypeError: QgsField(): arguments did not match any overloaded call:
  overload 1: argument 2 has unexpected type 'NoneType'
  overload 2: argument 1 has unexpected type 'str'

Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
QGIS version: 3.20.2-Odense Odense, 9f59a156

Python Path:
C:\Users/Rovida/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\contour
C:/PROGRA1/QGIS 3.20.2/apps/qgis/./python
C:/Users/Rovida/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/Rovida/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA
1/QGIS 3.20.2/apps/qgis/./python/plugins
C:\Program Files\QGIS 3.20.2\bin\python39.zip
C:\PROGRA1\QGIS 3.20.2\apps\Python39\DLLs
C:\PROGRA
1\QGIS 3.20.2\apps\Python39\lib
C:\Program Files\QGIS 3.20.2\bin
C:\PROGRA1\QGIS 3.20.2\apps\Python39
C:\PROGRA
1\QGIS 3.20.2\apps\Python39\lib\site-packages
C:\PROGRA1\QGIS 3.20.2\apps\Python39\lib\site-packages\win32
C:\PROGRA
1\QGIS 3.20.2\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS 3.20.2\apps\Python39\lib\site-packages\Pythonwin
C:/Users/Rovida/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users\Rovida\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\kmltools\libs
C:/Users/Rovida/Documents/ASMI/CPTI/aggiornamento_2020

"Load web service capabilities" lead to a Python error

I tested the new feature allowing the user to retrieve FDSN-event capabilities from the application.wadl when creating a new service.

As a first attempt I have used the endpoint "http://earthquake.usgs.gov/fdsnws/event/1/" and after pressing the button "Load web service capabilities" I get the following Python error

WARNING Traceback (most recent call last):
File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\x/python/plugins\qquake\gui\service_configuration_widget.py", line 390, in response_finished
self._set_state_from_wadl(WadlServiceParser.parse_wadl(content, self.service_type, url))
File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\x/python/plugins\qquake\services\wadl.py", line 55, in parse_wadl
assert resources_elements.length() == 1
AssertionError

Using the endpoint "https://www.emidius.mi.ingv.it/fdsnws/event/1/" lead to the very same Python error.

I then tried using the endopoint "https://www.seismicportal.eu/fdsnws/event/1/" and after pressing the button "Load web service capabilities" I did not get any error but strangely it lead to a changed "Web service URL" to "http://www.seismicportal.eu/fdsnws/event/1/counts?" leaving me quite puzzled.

Different list of OGC layers in the filter windows

The list of layers that appears in the pop-down menu in the CQL filtering window must list the very same layers showed in the main windows.
Currently, it seems to me that the pop-down menu list all layers published by the OGC endpoint instead.

image

image

Check the CQL flag to enable or disable the CQL filter button

I recently discovered that not all OGC WFS and WMS backends supports the CQL filtering as it very much depends on the software used by the data provider, see a comparison table among different softwares at
https://docs.qgis.org/3.16/en/docs/server_manual/faq.html

I have added the flag settings->queryCQL to each WFS and WMS services in the general configuration file (config.json) to decide whether the button "Set filter..." should be switched ON or OFF, see
7993af0#diff-6794ba707eb92a34c8db15ffba50dc630af67db9e41bec8aab715a6f93ed77e4

Can you please add a check to such a flag and correspondigly switch the filtering button ON or OFF?

Missing symbology when loading extended (XML) output from fdsnws-event

When in the "earthquakes parameters tabs" the symbology is not correctly assigned to epicentres leading to an apparently empty layer.

The problem occurs when the user select the "extended" output table format in conjunction with short field names.

The problem lies in the different label assigned to the field used for the magnitude, which is named:

  • "Magnitude" when the users select either the text output or the extended output with long field names;
  • "mag" when the user select the extended output and short field names.

As the field name for styling the layer is hardcoded in the loaded qml ("Magnitude"), as QGIS cannot fint such a label it cannot correctly style the epicentres leaving them transparent leaving the user puzzled because no epicentres are shown on the map even if the table contains all layers.

image

Preserve the last opened tab when reopening the QQuake window

When you close the QQuake window and then you reopen it, the window forget the service that you last used.
This is quite annoying as the user expect that reopening QQuake should lead to the exact same service that was last used.
Would it be possible to preserve it?

Various changes to the tab for loading QuakeML

Various changes are required for the recently introduced "By URL" for the FDSN-event and for the macroseismic tabs.

  1. It should be tab in its own, because it is not relying on any service

  2. It should be renamed as "Load QuakeML".

  3. It should be introduced the possibility for the user to load a local QuakeML as alternative method to the existing load of remote files.

  4. Only the extended output should be supported, because this tab is meant to allow the user loading a QuakeML file only, nothing else

Below an possible mockup of the final result after these changes
image

Please, ensure that the plugin will work with the QuakeML files contained in the zip files that can be downloaded from
http://terremoti.ingv.it/en/bsi

@nyalldawson Could you please take care of this?

Earthquake depth

Here the mockup before the explanation:

image

If the data are downloaded as plain txŧ the depth values are in km so if the user choose meters in the UI we should multiply and change the label accordingly.

More tricky is the Values choice. If the earthquake is below the sea level then the values should remain positive while if the earthquake is above the sea level they should remain negative.

cc @MarioLocati (for a more detailed and human friendly explanation)

cc @nyalldawson

Simplify the content of preferred fields when retrieving all estimates

Issue related to FDS-event and macroseismic web services, extended output, when retrieving all origins and all magnitudes.

The plugin should let the user more clearly identify which is the preferred solution among the available ones.

The two recently introduced fields "PrefOriginID" and "PreMagID" should be only filled for the preferred record with the word "preferred". They should not report the ID, and should simply be labelled respectively "PrefOrigin" and "PrefMag".

Below an example from the FDSN-event from "INGV ASMI-CPTI" for the EventID 20160824_0136_000.

Below the current solution

image
Below is what should appear

image

@nyalldawson Could please take care of this?

Campi Flegrei differenza tra GOSSIP e ISIDE

Usando i dati Gossip (sul sito ingv e filtrando il csv) e i dati Iside (in QGIS), la posizione dei terremoti non corrisponde. ho caricato i dati degli ultimi 2 anni con Magnitudo maggiore di 1.8. lat e lon sono diverse; è un errore o è normale. Usare il wgs84 non è una buona idea meglio un sistema metrico UTM 33.

1

Search by Identifiers - Macroseismic Service

The epicenter of the selected event does not show up in the map using the "Extended output table" selecting "Search by Identifiers" in the "Macroseismic data" service.
The problem is related to the simbology because the corresponding value used to plot the epicenter is not the same to the header of the coloumn.

"Close" button

The only ways to close the QQuake window are through the "x" button of the window manager or the "cancel" button at the bottom.
A "close" button might be more straightforward for the user.

Error using wildcards to import stations

When I import station data using special characters ("" "," ) there appears to be an error in the map, but the link to the EIDA service is correct.
For example, if I want to import the data of all the stations with initials starting with A and those with B for the IV network, I get the string:
http://webservices.ingv.it/fdsnws/station/1/query?station=A*, B*&network=IV&format=xml
which is correct.
If I import the data into my project I get the stations only of the stations entered first in the query, then the A
.
The Layer created correctly shows the data table, but only for stations A*, while stations B* do not exist.

Split config.json

config.json should be split into several JSON files: i.e., different files for different kinds of services or service providers

Python error when loading intensity data of an earthquake w/o magnitude or epicentre

When trying to load the extended output (QuakeML 2.0) from a macroseismic service and the magnitude (or epicentre) is missing the plugin throw the following Python error:

KeyError: None Traceback (most recent call last): File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\gui\qquake_dialog.py", line 970, in _fetcher_finished layer = self.fetcher.create_mdp_layer() File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\fetcher.py", line 783, in create_mdp_layer return self.mdpset_to_layer(self.result) File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\fetcher.py", line 678, in mdpset_to_layer for f in parser.create_mdp_features(self.output_fields, self.preferred_mdp_only): File "C:\Users/mario/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qquake\quakeml\parser.py", line 387, in create_mdp_features source_obj = self.magnitudes[event.preferredMagnitudeID]

The code involved is
https://github.com/INGV/qquake/blob/master/qquake/quakeml/parser.py#L387

The error can be reproduced using the "INGV ASMI-DBMI" macroseismic service using the folowing Event IDs:

  • 17030116_1330_000
  • 17830206_0020_000
  • 17830301_0140_000
  • 18330119_0000_000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.