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.
2 Answers
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.
-
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
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: