Git Product home page Git Product logo

Comments (3)

kaestli avatar kaestli commented on June 21, 2024

This is a bug happening when caching or storing the available route epochs in stationlite; already the content of the routing DB is wrong:

[stationlite db query triggered by request:]
SELECT DISTINCT channelepoch.code AS channelepoch_code, channelepoch.locationcode AS channelepoch_locationcode, station.code AS station_code, network.code AS network_code, epoch.starttime AS epoch_starttime, epoch.endtime AS epoch_endtime, routing.starttime AS routing_starttime, routing.endtime AS routing_endtime, endpoint.url AS endpoint_url
FROM channelepoch JOIN epoch ON channelepoch.epoch_ref = epoch.id
JOIN epochtype ON epoch.epochtype_ref = epochtype.id
JOIN routing ON routing.epoch_ref = epoch.id
JOIN network ON channelepoch.network_ref = network.id JOIN station ON channelepoch.station_ref = station.id
JOIN stationepoch ON stationepoch.station_ref = station.id JOIN endpoint ON routing.endpoint_ref = endpoint.id JOIN service ON endpoint.service_ref = service.id
WHERE network.code LIKE '%'
AND station.code LIKE '%'
AND channelepoch.code LIKE '%'
AND channelepoch.locationcode LIKE '%'
AND service.name = 'station' AND epochtype.type = 'CHANNEL' AND
stationepoch.latitude >= 38.41301 AND stationepoch.latitude <= 38.41401 AND stationepoch.longitude >= 21.94 AND stationepoch.longitude <= 21.95
AND (epoch.endtime > '2022-06-03T00:00:00'::timestamp OR epoch.endtime IS NULL)
AND epoch.starttime < '2022-06-12T00:00:00'::timestamp;

[response]
channelepoch_code | channelepoch_locationcode | station_code | network_code | epoch_starttime | epoch_endtime | routing_starttime | routing_endtime | endpoint_url
-------------------+---------------------------+--------------+--------------+---------------------+---------------------+---------------------+---------------------+-----------------------------------------------------
HHE | 00 | EF02 | 2D | 2021-10-07 00:00:00 | 2032-12-31 00:00:00 | 2021-01-01 00:00:00 | 2032-12-31 00:00:00 | http://geofon.gfz-potsdam.de/fdsnws/station/1/query
HHN | 00 | EF02 | 2D | 2021-10-07 00:00:00 | 2032-12-31 00:00:00 | 2021-01-01 00:00:00 | 2032-12-31 00:00:00 | http://geofon.gfz-potsdam.de/fdsnws/station/1/query
HHZ | 00 | EF02 | 2D | 2021-10-07 00:00:00 | 2032-12-31 00:00:00 | 2021-01-01 00:00:00 | 2032-12-31 00:00:00 | http://geofon.gfz-potsdam.de/fdsnws/station/1/query
(3 rows)

from eidaws.

kaestli avatar kaestli commented on June 21, 2024

Note this issue is fundamental to the data model of stationlite; stationlite assumes stationcodes to be unique.

As a result, for non-unique station codes in case of data/metadata selection based on station properties (location, epoch in case no stream epochs are defined), response may refer to the wrong station.

This requires major refactoring.

from eidaws.

kaestli avatar kaestli commented on June 21, 2024

The problem affects 4884 of roughly 21000 stations, of which 527 in permanent networks. Stations like "A02", "A03" show up in up to 8 (mostly temporary) networks.

from eidaws.

Related Issues (16)

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.