2

I want run the sen2cor process, with the L2A_Process executable, for transform the Sentinel-2 L1C product in L2A but I need this on the earth engine platform. I'm using the Earth Engine Python API on Datalab but I don't understand how I can run the sen2cor executable on this platform.

1
  • Where did you get data? Because Sen2cor needs a lot of metadata to apply correction and uploaded scenes on GGE contains only layers plus a few metadata
    – aldo_tapia
    Commented Jan 12, 2018 at 20:04

2 Answers 2

3

Google Cloud Datalab is available as a Docker container, and you can add libraries to this container by following instructions in the Datalab documentation Adding Python libraries to a Cloud Datalab instance page. Using this approach you can install the Sen2Cor libraries, as described in Section 4.4 of the Sen2Cor Software Release Note.

If you are not familiar with customizing Docker containers, see Docker's Best practices for writing Dockerfiles.

2
  • I try the instruction in the Datalab documentatio fo adding python libraries but when I try the command "!pip install sen2cor" I obtain an error "Could not find a version that satisfies the requirement sen2cor (from versions: ) No matching distribution found for sen2cor. Commented Dec 19, 2017 at 9:36
  • I try create a container with the .tar file for install sen2cor (standalone) inside, then in datalab I install it with the command: "%%bash python /folder_sen2cor/setup.py install" and it seems work. Now if I use "!pip install sen2cor" the output is "Requirement already satisfied: sen2cor in /usr/local/lib/python2.7/dist-packages/sen2cor-2.4.0-py2.7.egg" so I think it work. The problem now is that if i start the L2A_Process I obtain an error "No module named lxml.etree" but if I try "!pip install lxml.etree" the output is "Could not find a version that satisfies the requirement lxml.etree..." Commented Dec 19, 2017 at 10:01
1

Finally I can start the L2A_Process but it need other packages like tables, lxml... I was able to install these packages with the !pip command but when I try it for the gdal package I obtain this error:

enter image description here

Your Answer

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

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