0

I'm trying to download sentinel satellite images directly using python. the idea is to use sentinelsat API and a geojson polygon to download it. however it downloads the entire image and not only the polygone. is there a way to make it download only the polygon or to automatically crop the wanted area? thank you in advance

1 Answers1

0

There are a few ways you can go about it, but, based on the documentation, sentinelsat doesn't support such an operation. The easier would be to use gdal and a geojson or shapefile. The way how you can do that is answered here.

The much more complicated way, which also gives you immensely more control on what data you can download is with the Sentinel-2 AWS S3 Buckets and the GDAL python api. Specifically, GDAL has a driver called S3 that allows you to load a raster into memory without downloading it locally. Then, you can use the ReadAsArray function to load specific parts of the image. You can look these bits up from the GDAL docs.

Nikos
  • 198
  • 1
  • 9