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

Ingested grid point as a polygon in BigQuery. #337

Merged
merged 21 commits into from
Jul 11, 2023
Merged

Conversation

dabhicusp
Copy link
Collaborator

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 given latitude and longitude as the center of the polygon.

Note: This implementation only works for a regular_ll grid.

@mahrsee1997 mahrsee1997 requested a review from alxmrs May 30, 2023 07:02
Copy link
Collaborator

@alxmrs alxmrs left a 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 Show resolved Hide resolved
Comment on lines 279 to 281
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Collaborator

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?

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.

weather_mv/loader_pipeline/bq.py Outdated Show resolved Hide resolved
weather_mv/loader_pipeline/bq.py Outdated Show resolved Hide resolved
@dabhicusp dabhicusp requested a review from alxmrs June 27, 2023 17:17
Copy link
Collaborator

@alxmrs alxmrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review part 1...

weather_mv/loader_pipeline/bq.py Outdated Show resolved Hide resolved
weather_mv/loader_pipeline/bq.py Outdated Show resolved Hide resolved
weather_mv/loader_pipeline/bq.py Outdated Show resolved Hide resolved
weather_mv/loader_pipeline/bq.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@alxmrs alxmrs left a 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).

weather_mv/loader_pipeline/bq.py Outdated Show resolved Hide resolved
weather_mv/loader_pipeline/bq.py Outdated Show resolved Hide resolved
weather_mv/loader_pipeline/bq.py Outdated Show resolved Hide resolved
@dabhicusp dabhicusp requested a review from alxmrs July 7, 2023 08:35
Copy link
Collaborator

@alxmrs alxmrs left a 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!

@mahrsee1997 mahrsee1997 merged commit 952631d into google:main Jul 11, 2023
5 checks passed
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

Successfully merging this pull request may close these issues.

4 participants