bird-house / flyingpigeon

WPS processes for climate model data, indices and extreme events
http://flyingpigeon.readthedocs.io/en/latest/
Apache License 2.0
19 stars 15 forks source link

ESA SNAP integration #213

Closed nilshempelmann closed 5 years ago

nilshempelmann commented 6 years ago

SNAP toolboxes to process Sentinel images provided with an installer: http://step.esa.int/downloads/6.0/installers/

Can be installed manually with:

wget http://step.esa.int/downloads/6.0/installers/esa-snap_sentinel_unix_6_0.sh

sudo chmod +x esa-snap_sentinel_unix_6_0.sh source activate flyingpigeon ./esa-snap_sentinel_unix_6_0.sh

cp -r ~/.snap/snap-python/snappy ~/.conda/envs/flyingpigeon/lib/python2.7/site-packages/

tomLandry commented 6 years ago

+1. Great idea.

nilshempelmann commented 6 years ago

configuration for python: https://senbox.atlassian.net/wiki/spaces/SNAP/pages/50855941/Configure+Python+to+use+the+SNAP-Python+snappy+interface

cehbrecht commented 6 years ago

Not sure if we can have it as conda package. Maybe we need to install it in an extra step.

nilshempelmann commented 6 years ago

@cehbrecht Here is the snappy-install.sh https://github.com/bird-house/flyingpigeon/blob/satdev/snappy-install.sh To be checked, optimized and integrated :-)

tomLandry commented 6 years ago

Come on' guys, leave some for us :-)

cehbrecht commented 6 years ago

@nilshempelmann you are installing snappy into your conda env ... assuming you have a default installation. But conda paths can be customized.

If possible I would prefer to install snappy into the system. You need to run with sudo. If it works we could then just call it via make sysinstall. sysinstall target is called before a conda environment exists. Otherwise we would need something like post-install.

nilshempelmann commented 6 years ago

Sudo is not necessary. Just passing through the customized conda pathes might be enough.

nilshempelmann commented 6 years ago

The makefile now calles the snappy installation. CONDA_ENV is passed throug by argument. SNAP will be installed next to flyingpigeon. No root required Check if this is a way to go ...

cehbrecht commented 6 years ago

There is an ESA snappy conda package: https://anaconda.org/terradue/snappy

Probably it only contains the python wrapper.

nilshempelmann commented 6 years ago

Done snappy-install.sh in integrated into makefile. and merged into next @tomLandry : Don't worry there is still work left to do ;-)

cehbrecht commented 6 years ago

More work :)

One can use the python sys-path instead of coping snappy python to conda:

When using SNAP from Python, either do: 
sys.path.append('/BIRDS_HOME/flyingpigeon/parts/snap/snap-python')
or copy the 'snappy' module into your Python's 'site-packages' directory.

Needs to be handled in the buildout or configs ...

We also need a common post-install target in the Makefile. The Makefile is the same for every bird.

nilshempelmann commented 5 years ago

@tomLandry @cehbrecht EO processes were disabled for the last release. I am working on enabling them again. Let me know about progess, experience and needs on your side

cehbrecht commented 5 years ago

... should snappy go into the new bird Kingfischer?

nilshempelmann commented 5 years ago

snappy is on the way to move to kingfisher https://github.com/bird-house/kingfisher/issues/1