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

Can not to upload the translated files to public S3 bucket #1036

Closed
zaviazhou opened this issue Oct 20, 2018 · 2 comments
Closed

Can not to upload the translated files to public S3 bucket #1036

zaviazhou opened this issue Oct 20, 2018 · 2 comments

Comments

@zaviazhou
Copy link

zaviazhou commented Oct 20, 2018

Expected behavior and actual behavior.

I expected to ues "gdal_translate" to read file small_world_pct.tif form s3 bucket and crete the output file in to the same bucket .

Steps to reproduce the problem.

gdal_translate /vsicurl/https://obs-zhouyuanyuan.obs.cn-north-1.myhwclouds.com/ea
rth_data/small_world_pct.tif /vsicurl/https://obs-zhouyuanyuan.obs.cn-north-1.myhwclouds.com/earth_date/small_world
_rgb.tif -b 1 -co COMPRESS=DEFLATE -co PHOTOMETRIC=RGB
Input file size is 400, 200
0ERROR 1: Only read-only mode is supported for /vsicurl
ERROR 1: TIFFOpen:/vsicurl/https://obs-zhouyuanyuan.obs.cn-north-1.myhwclouds.com/earth_date/small_world_rgb.tif: N
o such file or directory

Operating system

cent OS

GDAL version and provenance

@rouault
Copy link
Member

rouault commented Oct 20, 2018

You can't. /vsicurl/ is read-only. You can use /vsis3/ for write support, but that won't work with TIFF files since you need random-write access for that and /vsis3/ only supports sequential write. You can use the https://github.com/OSGeo/gdal/blob/master/gdal/swig/python/samples/gdal_cp.py script to copy a local file to /vsis3/

@rouault rouault closed this as completed Oct 20, 2018
@zaviazhou
Copy link
Author

zaviazhou commented Oct 20, 2018

thank you so much. My purpose is to use the gdal command to get a fileA in s3 bukct and after some translate ,make the output fileB to the same bucket .
It does not matter whether the file is TIFF or dem...
clould you please help me ?

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

No branches or pull requests

2 participants