1

I want to download a JPEG from this service:

https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/export?bbox=25.158691,43.381098,30.267334,48.421910&size=1024,1024&format=jpg&imageSR=4326&bboxSR=4326&f=image

the download works perfectly, it downloads exactly the BBOX area I was looking for, but the resolution is very high and you can't really see anything.

Does anyone know how I could reduce the resolution of the download from SENTINEL-2 WMTS or another source where these images can be downloaded for free?

I tried like this:

gdal_translate -of JPEG -outsize 1024 1024 "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/export?bbox=25.158691,43.381098,30.267334,48.421910&size=1024,1024&format=jpg&imageSR=4326&bboxSR=4326&f=image" /var/www/html/test/out2.jpeg
2
  • 1
    In WMS you know the resolution that you will get beforehand because it is exactly defined by the bbox, width, and height parameters. Decreasing bbox or increasing width and height will give better resolution. The server may have been configured to block such requests, though.
    – user30184
    Feb 13 at 8:21
  • The Export tool for World_Imagery isn't a WMS.
    – nmtoken
    Feb 13 at 15:21

2 Answers 2

0

You can try to use the "resampling" option in gdal_translate to reduce the resolution. For example, to reduce the resolution to 50% of the original size, you can use the following command:

gdal_translate -of JPEG -outsize 512 512 -r bilinear "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/export?bbox=25.158691,43.381098,30.267334,48.421910&size=1024,1024&format=jpg&imageSR=4326&bboxSR=4326&f=image" /var/www/html/test/out2.jpeg

Note that different resampling methods can produce different results, so you may want to experiment with different methods to see which one works best for your needs. Some commonly used resampling methods include nearest neighbor, bilinear, and cubic convolution.

0

Increasing the size=1024,1024 seems to return a higher resolution image. However, the max size seems to be limited to 4096. Your example link with size=4096,4096

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.