-
Notifications
You must be signed in to change notification settings - Fork 20
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
Issue with Zip format files #117
Comments
@budprat please see this comment on similar issue:
Can you link to or provide a copy of the STAC Item document you are using. Given the rate at which linked zip file is downloading for me right now, I strongly doubt that loading that data directly from a remote would be a pleasant experience, and |
@Kirill888 Thanks for your reply, Using stackstac also I was not able download datacubes but I think GDAL allows to get data from zip files, STAC document I used is here, https://geoservice.dlr.de/eoc/ogc/stac/v1/collections/S2_L2A_MAJA/items?f=application%2Fgeo%2Bjson |
@budprat ok, so data urls look like this:
|
Thanks for work around, I found the correct rasteri/gdal url but When Pass it as a str to patch_url it doesnt accept it, says 'str' object is not callable, can you provide an example of using patch_url ? |
@budprat you don't provide URL you computed for that exact input, you provide name of the python function that you have written yourself that computes new url from existing url. For example in the code below we replace all https: urls with http: equivalents. In your case url transformation logic will be more involved. def https_to_http(url):
if url.startswith("https:"): return url.replace("https:", "http:")
return url
odc.stac.load(..., patch_url=https_to_http) |
I tried using odc_stac to access files in zip format using STAC catalogue, but looks like its unable to open zip files, below is the error calls, python code used is
od = stac_load(items, bands=('CLM_R1', 'CLM_R2'), crs='32632', resolution=10)
The text was updated successfully, but these errors were encountered: