-
Notifications
You must be signed in to change notification settings - Fork 40
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
Ingested grid point as a polygon in BigQuery. #337
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far!
weather_mv/loader_pipeline/bq.py
Outdated
for i, _ in enumerate(lat_lon_bound): | ||
if lat_lon_bound[i][1] >= 180: | ||
lat_lon_bound[i][1] = lat_lon_bound[i][1] - 360 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for i, _ in enumerate(lat_lon_bound): | |
if lat_lon_bound[i][1] >= 180: | |
lat_lon_bound[i][1] = lat_lon_bound[i][1] - 360 | |
for i in range(len(lat_lon_bound)): | |
if lat_lon_bound[i][1] >= 180: | |
lat_lon_bound[i][1] = lat_lon_bound[i][1] - 360 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a question for @wundersooner: Should we be cautious here? Is this specific to one coordinate system?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be cautious here. Some coordinate systems use x,y coordinates in meters instead of degree-based lon, lat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review part 1...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review part 2. (Splitting up the review b/c I have intermittent internet).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits. Otherwise, this looks ready to merge!
Hi @alxmrs, as per our earlier conversation in discussion #266, I have implemented the code to ingest grid points as
polygons
in BigQuery. Currently, the code creates a polygon by considering the givenlatitude
andlongitude
as thecenter
of the polygon.Note: This implementation only works for a regular_ll grid.