poblabs / weewx-belchertown

A clean and modern weewx skin with real time streaming updates, forecast data and interactive charts. View it in action at BelchertownWeather.com
https://belchertownweather.com
GNU General Public License v3.0
208 stars 111 forks source link

Add the INGV sever for earthquakes #840

Closed fvirgola80 closed 1 year ago

fvirgola80 commented 1 year ago

The idea is to be able to add the website https://www.ingv.it/ in the choices of skin.conf to be able to get the results of the Italian earthquakes Is there anyone interested in this? skin version 1.3b2 weewx 4.9.1

www.meteocivitavecchia.it

uroh commented 1 year ago

ti fornisce le stesse informazioni di usgs, perchè cambiare?

fra202088 commented 1 year ago

The idea is to be able to add the website https://www.ingv.it/ in the choices of skin.conf to be able to get the results of the Italian earthquakes Is there anyone interested in this? skin version 1.3b2 weewx 4.9.1

www.meteocivitavecchia.it

Se serve ho trovato il modo di recuperare i dati dei terremoti da INGV (hanno un servizio web pressoché identico a quello di USGS)

fvirgola80 commented 1 year ago

optimal I'll forward you my email so we can talk fvirgola80@gmail.com

fra202088 commented 1 year ago

optimal I'll forward you my email so we can talk fvirgola80@gmail.com

You have mail

schematt commented 1 year ago

The idea is to be able to add the website https://www.ingv.it/ in the choices of skin.conf to be able to get the results of the Italian earthquakes Is there anyone interested in this? skin version 1.3b2 weewx 4.9.1 www.meteocivitavecchia.it

Se serve ho trovato il modo di recuperare i dati dei terremoti da INGV (hanno un servizio web pressoché identico a quello di USGS)

Ciao, puoi postare la soluzione qui? grazie

fra202088 commented 1 year ago

The idea is to be able to add the website https://www.ingv.it/ in the choices of skin.conf to be able to get the results of the Italian earthquakes Is there anyone interested in this? skin version 1.3b2 weewx 4.9.1 www.meteocivitavecchia.it

Se serve ho trovato il modo di recuperare i dati dei terremoti da INGV (hanno un servizio web pressoché identico a quello di USGS)

Ciao, puoi postare la soluzione qui? grazie

Si, considera che sto usando attualmente la versione 1.2, comunque INGV mette a disposizione questo: http://webservices.ingv.it/fdsnws/event/1/query?limit=1&lat=%s&lon=%s&maxradiuskm=%s&minmag=%s&format=geojson&nodata=204 per cui basta passare latitudine, longitudine, raggio max dal punto e magnitudo minima da considerare (tutti dati già a disposizione); nel mio funzionante ho aggiunto questo blocco subito sotto " # Earthquake Data,":

            elif self.generator.skin_dict["Extras"]["earthquake_server"] == "INGV":
                earthquake_url = ("http://webservices.ingv.it/fdsnws/event/1/query?limit=1&lat=%s&lon=%s&maxradiuskm=%s&minmag=%s&format=geojson&nodata=204" % (latitude, longitude, earthquake_maxradiuskm, self.generator.skin_dict["Extras"]["geonet_mmi"] ))

e questo altro blocco (link che porta all'evento su INGV)

                elif self.generator.skin_dict["Extras"]["earthquake_server"] == "INGV":
                    eqtime = eqdata["features"][0]["properties"]["time"]
                    eqtime = eqtime.replace("Z","")
                    eqtime = datetime.datetime.fromisoformat(eqtime)
                    eqtime = int(eqtime.replace(tzinfo=datetime.timezone.utc).timestamp())
                    equrl = "%s%s" % ("http://terremoti.ingv.it/event/", eqdata["features"][0]["properties"]["eventId"])
                    eqplace = eqdata["features"][0]["properties"]["place"]
                    eqmag = locale.format("%g", float(eqdata["features"][0]["properties"]["mag"]))

in coda alla parte sotto "# Process the earthquake file" (in allegato comunque ho messo il mio file, ver 1.2, non dovrebbero esserci problemi ad adattarlo all'ultima) A questo punto basta modificare skin.conf: earthquake_server = INGV geonet_mmi = 3 #esempio terremoti con mag >3 Probabilmente si può migliorare, comunque funziona belchertown1_2.txt

schematt commented 1 year ago

Si, considera che sto usando attualmente la versione 1.2, comunque INGV mette a disposizione questo: http://webservices.ingv.it/fdsnws/event/1/query?limit=1&lat=%s&lon=%s&maxradiuskm=%s&minmag=%s&format=geojson&nodata=204 per cui basta passare latitudine, longitudine, raggio max dal punto e magnitudo minima da considerare (tutti dati già a disposizione); nel mio funzionante ho aggiunto questo blocco subito sotto " # Earthquake Data,":

            elif self.generator.skin_dict["Extras"]["earthquake_server"] == "INGV":
                earthquake_url = ("http://webservices.ingv.it/fdsnws/event/1/query?limit=1&lat=%s&lon=%s&maxradiuskm=%s&minmag=%s&format=geojson&nodata=204" % (latitude, longitude, earthquake_maxradiuskm, self.generator.skin_dict["Extras"]["geonet_mmi"] ))

e questo altro blocco (link che porta all'evento su INGV)

                elif self.generator.skin_dict["Extras"]["earthquake_server"] == "INGV":
                    eqtime = eqdata["features"][0]["properties"]["time"]
                    eqtime = eqtime.replace("Z","")
                    eqtime = datetime.datetime.fromisoformat(eqtime)
                    eqtime = int(eqtime.replace(tzinfo=datetime.timezone.utc).timestamp())
                    equrl = "%s%s" % ("http://terremoti.ingv.it/event/", eqdata["features"][0]["properties"]["eventId"])
                    eqplace = eqdata["features"][0]["properties"]["place"]
                    eqmag = locale.format("%g", float(eqdata["features"][0]["properties"]["mag"]))

in coda alla parte sotto "# Process the earthquake file" (in allegato comunque ho messo il mio file, ver 1.2, non dovrebbero esserci problemi ad adattarlo all'ultima) A questo punto basta modificare skin.conf: earthquake_server = INGV geonet_mmi = 3 #esempio terremoti con mag >3 Probabilmente si può migliorare, comunque funziona belchertown1_2.txt

Grazie 1000, sei stato molto cortese, vedo però che stai usando la ver 1.3.1 con il server USGS, è perché sulla 1.3.1 non funziona?

fra202088 commented 1 year ago

Si, considera che sto usando attualmente la versione 1.2, comunque INGV mette a disposizione questo: http://webservices.ingv.it/fdsnws/event/1/query?limit=1&lat=%s&lon=%s&maxradiuskm=%s&minmag=%s&format=geojson&nodata=204 per cui basta passare latitudine, longitudine, raggio max dal punto e magnitudo minima da considerare (tutti dati già a disposizione); nel mio funzionante ho aggiunto questo blocco subito sotto " # Earthquake Data,":

            elif self.generator.skin_dict["Extras"]["earthquake_server"] == "INGV":
                earthquake_url = ("http://webservices.ingv.it/fdsnws/event/1/query?limit=1&lat=%s&lon=%s&maxradiuskm=%s&minmag=%s&format=geojson&nodata=204" % (latitude, longitude, earthquake_maxradiuskm, self.generator.skin_dict["Extras"]["geonet_mmi"] ))

e questo altro blocco (link che porta all'evento su INGV)

                elif self.generator.skin_dict["Extras"]["earthquake_server"] == "INGV":
                    eqtime = eqdata["features"][0]["properties"]["time"]
                    eqtime = eqtime.replace("Z","")
                    eqtime = datetime.datetime.fromisoformat(eqtime)
                    eqtime = int(eqtime.replace(tzinfo=datetime.timezone.utc).timestamp())
                    equrl = "%s%s" % ("http://terremoti.ingv.it/event/", eqdata["features"][0]["properties"]["eventId"])
                    eqplace = eqdata["features"][0]["properties"]["place"]
                    eqmag = locale.format("%g", float(eqdata["features"][0]["properties"]["mag"]))

in coda alla parte sotto "# Process the earthquake file" (in allegato comunque ho messo il mio file, ver 1.2, non dovrebbero esserci problemi ad adattarlo all'ultima) A questo punto basta modificare skin.conf: earthquake_server = INGV geonet_mmi = 3 #esempio terremoti con mag >3 Probabilmente si può migliorare, comunque funziona belchertown1_2.txt

Grazie 1000, sei stato molto cortese, vedo però che stai usando la ver 1.3.1 con il server USGS, è perché sulla 1.3.1 non funziona?

Ah già, ora che ci ripenso in realtà avevo inizialmente provato ad aggiungere Renass prendendo il pezzo dalla 1.3 /ma renass ha qualche problema, per cui ero passato ad INGV. In realtà comunque anche la 1.2 funziona

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.