Time Lapse Notebook

Dear community,

I’d love to test this timelapse notebook
https://github.com/sentinel-hub/time-lapse/blob/master/SentinelHubTimelapseExamples.ipynb

but I’m stuck at the following cell because it fails to install the libraries

from sentinelhub.common import BBox, CRS
from time_lapse import SentinelHubTimelapse

how can I install the same libraries using !pip command?
I’ve tried writing just something like

!pip sentinelhub
!pip BBox
etc…

but it doesn’t work.

Thank you!

Hi @vivierem ,

Have you tried pip install sentinelhub in the documentation page?

Btw BBox and CRS need to be imported as follow:

from sentinelhub import BBox, CRS

I forgot to say I’m using it on Google Colab, maybe it’s related to my error.

of course, I’m using a single cell like this:

!pip install sentinelhub
!pip install sentinelhub[AWS]

from sentinelhub.common import BBox, CRS
from time_lapse import SentinelHubTimelapse

and I receive this error:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-6-7126cb8fda65> in <module>
      2 get_ipython().system('pip install sentinelhub[AWS]')
      3 
----> 4 from sentinelhub.common import BBox, CRS
      5 from time_lapse import SentinelHubTimelapse

ModuleNotFoundError: No module named 'sentinelhub.common'

Thank you

Hi, the notebook is slightly updated w.r.t. the current version of sentinelhub-py. For this particular line try from sentinelhub import BBox, CRS (without the common submodule).

You can find the list of package version here
If you wish to install an older version you can use pip install sentinelhub==2.3.0 however we cannot guarantee that the old versions still work with the current SentinelHub service

thanks @ziga.luksic

I’ve tried using this command and removing .common

from sentinelhub import BBox, CRS
from time_lapse import SentinelHubTimelapse

still receiving errors

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-15-38a0b29db850> in <module>
      1 from sentinelhub import BBox, CRS
----> 2 from time_lapse import SentinelHubTimelapse

ModuleNotFoundError: No module named 'time_lapse'

Do you think that the problem can be related to Google Colab environment?
Is that notebook coded to work within Google Colab environment?

Thanks

This line tries to import from the time_lapse.py file, which is located next to the notebook in the repository. If your setup doesn’t detect it as an importable module (it doesn’t detect the file while searching for modules) then it cannot import it.

We don’t usually test our notebooks for Google Colab

In general the repository hasn’t been updated for 4 years, so you are sure to encounter further issues. Is this notebook of particular interest to you?

Hi Ziga,

I’m trying to setup an automated workflow to do time-lapse image sequences bypassing the EO Browser web tool which is limiting for some of my reasearches.

Basically I just need to extract hires image sequences of time-series with specific custom scripts.
Working within Colab environment is pretty handy for me so I was looking at notebooks.

Do you think that there’s another process/method or resources I can dig to achieve this?

Thanks

Perhaps take a look at the process API example on the sentinelhub-py repository. Example 8 (the last one) shows how to download and display multi-time images of an area. That one has no additional requirements aside from the sentinelhub package, so I have high hopes that it works in Colab as well.

Thanks so much @ziga.luksic I’ll study it, it seems very interesting even if a bit complicated.

I also tried to follow this guide the link to the notebook is broken even if I guess it’s the same I pointed out before

https://medium.com/sentinel-hub/how-to-make-the-perfect-time-lapse-of-the-earth-351f214527f6

After all I’d only need some kind of “batch image downloader” for time series processed with custom scripts. Is there anything like that?

Thanks

I think it’s easiest if you go through the example of the process API, and if it’s not sufficient we can help you further. If you’d like some ‘helpers’ for the process you could also use eo-learn (here is the example for downloading SentinelHub data), but I guess that adds another layer of complexity.

The notebook link is indeed broken, as the file was moved here, I’ll get it corrected.

If you’re after images of very large areas then the batch processing approach is indeed the right one for you, but it is not explained in the above notebook. The best example of Batch Process API would be the one on the sentinelhub-py repository, but batch processing is a bit more complex.

thank you @ziga.luksic ,
I’m slowly understanding, it is very new and complex for me, hope to get with some results very soon!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.