olivierhagolle / peps_download

Tool to download Sentinel images from PEPS sentinel mirror site : https://peps.cnes.fr
95 stars 48 forks source link

Bound box of lat/lon-min not working as expected #3

Closed NicWayand closed 7 years ago

NicWayand commented 7 years ago

I am calling the download function as:

python ./peps_download.py -c S2 --latmin 50.366051 --latmax 51.801397 --lonmin -116.934815 --lonmax -114.331055 -a peps.txt -d 2015-10-01 -f 2016-12-22 -w /home/.....

But the resulting tiles that are downloaded do not match the extent of lat/long. See image below (green dots are the corners of the extent I requested). Any idea what may be going wrong? Is my syntax correct?

Alternatively, if I know the tiles (i.e. UPS) that I want, is it possible to just download those tiles?

Thank you.

image

NicWayand commented 7 years ago

Hi @olivierhagolle, any thoughts on this issue, or suggestions on where to start looking?

olivierhagolle commented 7 years ago

Hi Nick, I lack some information. I have run the command on my side (with the -n option, I have no time to download the tiles), and it seems consistent, until Sentinel-2 changed the format of the data (on the 4th of December).

After the 4th of December 2016, I have weird results, due to the fact that there are some bugs in peps with the new data set. They are working at it, and expect a corrected and qualified version by the end of the month.

Did you also account for the fact that Sentinel-2 products became distributed by tiles in November 2016, so you get a larger number of products covering only one tile ?

Best regards, Olivier

NicWayand commented 7 years ago

Hi @olivierhagolle, thank you for your reply.

I have just pulled the most recent version and trying your test command: python ./peps_download.py -c S2ST -l 'Toulouse' -a peps.txt -d 2017-01-01 -f 2017-02-01

Throws and error:

curl -k -o search.json https://peps.cnes.fr/resto/api/collections/S2ST/search.json?q=Toulouse\&startDate=2017-01-01\&completionDa
te=2017-02-01\&maxRecords=500
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    60  100    60    0     0     62      0 --:--:-- --:--:-- --:--:--    62
Traceback (most recent call last):
  File "./peps_download.py", line 165, in <module>
    for i in range(len(data["features"])):
KeyError: 'features'

Looking in search.json only has: {"ErrorMessage":"Database connection error","ErrorCode":500}

Any idea what may be going wrong? Is the Peps server working? I can log into https://peps.cnes.fr without issue.

NicWayand commented 7 years ago

Oh, maybe it is related to this? https://sentinel.esa.int/web/sentinel/news/-/article/planned-sentinel-2-ground-segment-maintenance-on-14-15-february-2017

olivierhagolle commented 7 years ago

Probably, as it seems to be working now. I close the issue, please reopen it if necessary.

NicWayand commented 7 years ago

Yes it is working now so must have been that issue.