-
Notifications
You must be signed in to change notification settings - Fork 43
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
base: main
Are you sure you want to change the base?
Refactor/migrate createasset to importexternalimage #496
Conversation
shail-parekh
commented
Feb 4, 2025
- Migrate usage of createAsset to ImportExternalImage.
…st instead of 2, and also change the API url path to earthengine-highvolume-googleapis.com in the COG based image
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.
LGTM!
|
||
return asset_name | ||
data = json.dumps({'imageManifest': image_manifest, 'overwrite': True}) |
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.
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) |
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.
- 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(), |
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.
self.project_id()
can be moved in a constant.