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

Refactor/migrate createasset to importexternalimage #496

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

shail-parekh
Copy link
Contributor

  • Migrate usage of createAsset to ImportExternalImage.

weather_mv/loader_pipeline/ee.py Outdated Show resolved Hide resolved
weather_mv/loader_pipeline/ee.py Outdated Show resolved Hide resolved
weather_mv/loader_pipeline/ee.py Outdated Show resolved Hide resolved
…st instead of 2, and also change the API url path to earthengine-highvolume-googleapis.com in the COG based image
Copy link
Contributor

@Piyush-Ingale Piyush-Ingale left a comment

Choose a reason for hiding this comment

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

LGTM!


return asset_name
data = json.dumps({'imageManifest': image_manifest, 'overwrite': True})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can keep the overwrite as upto the user (depending on the force flag).

f'image:importExternal'
)
# Send API request
response = session.post(url=url, data=data, headers=headers)
Copy link
Collaborator

Choose a reason for hiding this comment

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

  • What's the time taken by this call?
  • Have you verified the assets? Are they looking similar to before?

raise ee.EEException(response.text)
headers = {
'Content-Type': 'application/json',
'x-goog-user-project': self.get_project_id(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

self.project_id() can be moved in a constant.

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.

3 participants