Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@7yl4r
Last active February 27, 2020 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 7yl4r/3850886b88645bd465b4b72ef07660f1 to your computer and use it in GitHub Desktop.
Save 7yl4r/3850886b88645bd465b4b72ef07660f1 to your computer and use it in GitHub Desktop.
# set up gdal
# NOTE: could maybe use https://github.com/PolarGeospatialCenter/gdal-full ?
sudo apt install -y gdal-bin libgdal-dev python3-pip
pip3 install "pygdal==$(gdal-config --version).*"
# TODO: more here probably...

# install code from github
git clone https://github.com/7yl4r/imagery_utils

# add testdata
# download from google drive and save it in 
# the imagery_utils/tests/testdata directory
# https://drive.google.com/file/d/1vZQZ5kFxH1193ute6sgo2nqrR85xlBMg/view?usp=sharing
#
# email tylarmurray@mail.usf.edu to request permissions

# run a test (starting at imagery_utils repo root dir
cd imagery_utils
mkdir tests/output
python pgc_ortho.py -p 4326 -c ns -t UInt16 -f GTiff \
./tests/testdata/ortho/WV02_20131005052802_10300100278D8500_13OCT05052802-P1BS-500099283010_01_P004.NTF \
./tests/output
git clone https://github.com/usf-imars/wv2-processing
cd wv2-processing
pip3 install -r requirements.txt

# add testdata (same testdata as pgc_ortho) to wv2-processing/tests/testdata
# you can just symlink it:
mkdir tests
ln -s ~/imagery_utils/tests/testdata ./tests/testdata
pip3 install pytest

# run tests from wv2-processing root dir
python3 -m pytest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment