Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Realtime source data cannot ever be colocated #2

Open
caparker opened this issue Sep 27, 2022 · 2 comments
Open

Realtime source data cannot ever be colocated #2

caparker opened this issue Sep 27, 2022 · 2 comments

Comments

@caparker
Copy link
Collaborator

We are using only the location to match a sensor node

UPDATE tempfetchdata_nodes t
SET sensor_nodes_id = sn.sensor_nodes_id
, added = FALSE
FROM sensor_nodes sn
WHERE t.geom IS NOT NULL
AND st_dwithin(sn.geom, t.geom, .0001)
AND origin='OPENAQ';

UPDATE tempfetchdata_nodes t
SET sensor_nodes_id = sn.sensor_nodes_id
, added = FALSE
FROM sensor_nodes sn
WHERE t.sensor_nodes_id is null
AND t.site_name is not null
AND t.source_name is not null
AND t.site_name = sn.site_name
AND t.source_name=sn.source_name
AND origin='OPENAQ';

Which could lead to issues if two sensors are co-located.

@russbiggs
Copy link
Member

I wonder if there is every lat,lng drift, which would also cause some weirdness here. @caparker do you have a recommended alternative to lat,lng?

@caparker
Copy link
Collaborator Author

I think we should use some sort of namespace idea that includes the node/system/sensor to match directly to the sensor, much like they are doing in the second update. But we do have to decide what to do if the names all match but lat/long has changed. I would assume at that point its a new deployment of the same set of instruments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants