├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ └── bug_report.md └── workflows │ ├── docker-publish-debug.yml │ ├── docker-publish.yml │ └── unit-testing.yml ├── .gitignore ├── .readthedocs.yaml ├── ADD_INDEX.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── bash ├── force-cube.sh ├── force-datacube-size.sh ├── force-info.sh ├── force-init.sh ├── force-level1-csd.sh ├── force-level2-report.sh ├── force-level2.sh ├── force-magic-parameters.sh ├── force-mosaic.sh ├── force-procmask.sh ├── force-pyramid.sh ├── force-tile-extent.sh └── force-unit-testing.sh ├── bump-version.sh ├── debug.sh ├── docs.sh ├── docs ├── Makefile ├── requirements.txt └── source │ ├── _static │ ├── files │ │ └── tutorials │ │ │ └── lcf │ │ │ └── samples.txt │ ├── parameter-files │ │ ├── parameter_CFIMP.prm │ │ ├── parameter_CSO.prm │ │ ├── parameter_L2IMP.prm │ │ ├── parameter_LEVEL2.prm │ │ ├── parameter_LEVEL3.prm │ │ ├── parameter_LIB.prm │ │ ├── parameter_LSM.prm │ │ ├── parameter_ML.prm │ │ ├── parameter_SMP.prm │ │ ├── parameter_SYNTHMIX.prm │ │ ├── parameter_TRAIN.prm │ │ ├── parameter_TSA.prm │ │ ├── parameter_TXT.prm │ │ ├── parameter_UDF.prm │ │ └── tutorials │ │ │ └── lcf │ │ │ ├── 10_lcf_level_2.prm │ │ │ ├── 11_lcf_cso.prm │ │ │ ├── 20_lcf_stm_reflectance.prm │ │ │ ├── 20_lcf_stm_vegetation.prm │ │ │ ├── 30_lcf_sampling.prm │ │ │ ├── 40_lcf_synthmix.prm │ │ │ ├── 41_lcf_lib_complete.prm │ │ │ ├── 50_lcf_training.prm │ │ │ ├── 60_lcf_ml_predict.prm │ │ │ └── train │ │ │ ├── 50_lcf_training_00001.prm │ │ │ ├── 50_lcf_training_00002.prm │ │ │ ├── 50_lcf_training_00003.prm │ │ │ ├── 50_lcf_training_00004.prm │ │ │ ├── 50_lcf_training_00005.prm │ │ │ ├── 50_lcf_training_00006.prm │ │ │ ├── 50_lcf_training_00007.prm │ │ │ ├── 50_lcf_training_00008.prm │ │ │ ├── 50_lcf_training_00009.prm │ │ │ ├── 50_lcf_training_00010.prm │ │ │ ├── 50_lcf_training_00011.prm │ │ │ ├── 50_lcf_training_00012.prm │ │ │ ├── 50_lcf_training_00013.prm │ │ │ ├── 50_lcf_training_00014.prm │ │ │ └── 50_lcf_training_00015.prm │ └── theme_overrides.css │ ├── about.rst │ ├── components │ ├── auxilliary │ │ ├── cube-init.rst │ │ ├── cube.rst │ │ ├── datacube-size.rst │ │ ├── extent.rst │ │ ├── index.rst │ │ ├── init.rst │ │ ├── magic-parameters.rst │ │ ├── main.rst │ │ ├── mdcp.rst │ │ ├── mosaic.rst │ │ ├── parameter.rst │ │ ├── procmask.rst │ │ ├── pyramid.rst │ │ ├── qai-inflate.rst │ │ ├── stack.rst │ │ ├── synthmix-param.rst │ │ ├── synthmix.rst │ │ ├── tabulate-grid.rst │ │ ├── tile-extent.rst │ │ ├── tile-finder.rst │ │ ├── train-param.rst │ │ └── train.rst │ ├── comp_overview.rst │ ├── force-general-30.jpg │ ├── higher-level │ │ ├── cfi │ │ │ ├── cfi.jpg │ │ │ ├── format.rst │ │ │ ├── index.rst │ │ │ ├── param.rst │ │ │ └── process.rst │ │ ├── cso │ │ │ ├── cso-turkey.jpg │ │ │ ├── cso-workflow.jpg │ │ │ ├── format.rst │ │ │ ├── index.rst │ │ │ └── param.rst │ │ ├── hl-1.jpg │ │ ├── hl-2.jpg │ │ ├── hl-3.jpg │ │ ├── hl-4.jpg │ │ ├── hl-5.jpg │ │ ├── hl-aux.rst │ │ ├── hl-compute.rst │ │ ├── hl-input.rst │ │ ├── hl-submodules.rst │ │ ├── index.rst │ │ ├── l2i │ │ │ ├── format.rst │ │ │ ├── index.rst │ │ │ ├── l2i-workflow.jpg │ │ │ ├── l2i.jpg │ │ │ └── param.rst │ │ ├── l3 │ │ │ ├── format.rst │ │ │ ├── index.rst │ │ │ ├── level3.jpg │ │ │ ├── lsp.rst │ │ │ ├── pac.jpg │ │ │ └── param.rst │ │ ├── lsm │ │ │ ├── format.rst │ │ │ ├── index.rst │ │ │ └── param.rst │ │ ├── ml │ │ │ ├── buiding-height.jpg │ │ │ ├── format.rst │ │ │ ├── index.rst │ │ │ ├── ml-workflow.jpg │ │ │ └── param.rst │ │ ├── smp │ │ │ ├── format.rst │ │ │ ├── index.rst │ │ │ └── param.rst │ │ ├── tsa │ │ │ ├── endmember.rst │ │ │ ├── format.rst │ │ │ ├── index.rst │ │ │ ├── indices.rst │ │ │ ├── param.rst │ │ │ ├── tsa-workflow.jpg │ │ │ └── tsa.jpg │ │ └── txt │ │ │ ├── format.rst │ │ │ ├── index.rst │ │ │ ├── param.rst │ │ │ └── txt-workflow.jpg │ └── lower-level │ │ ├── index.rst │ │ ├── level1 │ │ ├── L1AS.jpg │ │ ├── index.rst │ │ ├── level1-csd.rst │ │ ├── level1-landsat.rst │ │ ├── level1-sentinel2.rst │ │ └── queue.rst │ │ ├── level2 │ │ ├── ARD-L2.jpg │ │ ├── L2PS.jpg │ │ ├── depend.rst │ │ ├── format.rst │ │ ├── index.rst │ │ ├── l2ps.rst │ │ ├── level2.rst │ │ └── param.rst │ │ └── wvdb │ │ ├── format.rst │ │ ├── index.rst │ │ ├── lut-modis.rst │ │ └── wvdb.gif │ ├── conf.py │ ├── contact.rst │ ├── faq.rst │ ├── force.png │ ├── history │ ├── index.rst │ ├── v1 │ │ ├── v-01-00-00.rst │ │ └── v-01-01-00.rst │ ├── v2 │ │ ├── v-02-00-00.rst │ │ └── v-02-01-00.rst │ ├── v3 │ │ ├── v-03-00-00.rst │ │ ├── v-03-00-01.rst │ │ ├── v-03-01-00.rst │ │ ├── v-03-01-01.rst │ │ ├── v-03-02-00.rst │ │ ├── v-03-02-01.rst │ │ ├── v-03-03-00.rst │ │ ├── v-03-04-00.rst │ │ ├── v-03-05-00.rst │ │ ├── v-03-05-01.rst │ │ ├── v-03-05-02.rst │ │ ├── v-03-06-00.rst │ │ ├── v-03-06-01.rst │ │ ├── v-03-06-02.rst │ │ ├── v-03-06-03.rst │ │ ├── v-03-06-04.rst │ │ ├── v-03-06-05.rst │ │ ├── v-03-07-00.rst │ │ ├── v-03-07-01.rst │ │ ├── v-03-07-02.rst │ │ ├── v-03-07-03.rst │ │ ├── v-03-07-04.rst │ │ ├── v-03-07-05.rst │ │ ├── v-03-07-06.rst │ │ ├── v-03-07-07.rst │ │ ├── v-03-07-08.rst │ │ ├── v-03-07-09.rst │ │ ├── v-03-07-10.rst │ │ ├── v-03-07-11.rst │ │ ├── v-03-07-12.rst │ │ ├── v-03-08-00.rst │ │ └── v-03-08-01.rst │ └── vdev.rst │ ├── howto │ ├── coreg.rst │ ├── datacube.rst │ ├── dem.rst │ ├── img │ │ ├── Thumbs.db │ │ ├── tutorial-coreg-animation.gif │ │ ├── tutorial-coreg-base.png │ │ ├── tutorial-coreg-shift.png │ │ ├── tutorial-coreg-ts.png │ │ ├── tutorial-datacube-google-grid.jpg │ │ ├── tutorial-datacube-mosaic.jpg │ │ ├── tutorial-datacube-scheme.jpg │ │ ├── tutorial-l1csd-s2grid-berlin.jpg │ │ ├── tutorial-l1csd-syntax.jpg │ │ ├── tutorial-l1sen2.png │ │ ├── tutorial-l2-ard-cpu-ram-l2-bad.jpg │ │ ├── tutorial-l2-ard-cpu-ram-l2-good.jpg │ │ ├── tutorial-l2-ard-l2ps.jpg │ │ ├── tutorial-l2-ard-results.jpg │ │ ├── tutorial-lcf-cso.jpg │ │ ├── tutorial-lcf-lib.jpg │ │ ├── tutorial-lcf-mix-s2.png │ │ ├── tutorial-lcf-mix-stm-complexity.png │ │ ├── tutorial-lcf-mix-stm.png │ │ ├── tutorial-lcf-ml.jpg │ │ ├── tutorial-lcf-smp.jpg │ │ ├── tutorial-lcf-stm.jpg │ │ ├── tutorial-lcf-workflow.png │ │ ├── tutorial-mask-raster.jpg │ │ ├── tutorial-mask-vector.jpg │ │ ├── tutorial-qai-avg.jpg │ │ ├── tutorial-qai-bfr.jpg │ │ ├── tutorial-qai-boa.jpg │ │ ├── tutorial-qai-cld.jpg │ │ ├── tutorial-qai-ovv.jpg │ │ ├── tutorial-stm-example.png │ │ ├── tutorial-stm-qgis.jpg │ │ ├── tutorial-tsi-rbf.jpg │ │ ├── tutorial-tsi-rdp.jpg │ │ ├── tutorial-tsi-rtm.gif │ │ ├── tutorial-udf-dhi-hobi.png │ │ ├── tutorial-udf-dhi.png │ │ ├── tutorial-udf-dhi_deu.png │ │ ├── tutorial-udf-harmonic-zhu.png │ │ ├── tutorial-udf-harmonic.png │ │ ├── tutorial-udf-medoid-flood.png │ │ ├── tutorial-udf-medoid.png │ │ └── tutorial-udf-repo.png │ ├── index.rst │ ├── l2-ard.rst │ ├── lcf.rst │ ├── level1-csd.rst │ ├── masks.rst │ ├── profile │ │ ├── Thumbs.db │ │ ├── arabe.jpg │ │ ├── dfrantz.jpg │ │ ├── fschug.jpg │ │ └── sernst.jpg │ ├── qai.rst │ ├── sentinel2-l1c.rst │ ├── stm.rst │ ├── tsi.rst │ ├── udf_py.rst │ ├── udf_r.rst │ └── wvdb.rst │ ├── html │ └── report_20211011020320.html │ ├── img │ ├── force-icon.svg │ ├── force-logo.png │ └── force-udf.png │ ├── index.rst │ ├── issues.rst │ ├── policy │ ├── citation.rst │ ├── development.rst │ └── license.rst │ ├── proj.rst │ ├── refs-applied.rst │ ├── refs.rst │ └── setup │ ├── depend.rst │ ├── docker.rst │ ├── install.rst │ └── requirements.rst ├── example └── tsi-plugin.py ├── images └── force.png ├── install.sh ├── misc ├── force-bash-library.sh ├── force-level2-report.Rmd ├── force-rstats-library.r └── force-version.txt ├── pre-commit ├── python └── force-synthmix.py ├── rstats ├── force-map-accuracy.r └── force-sample-size.r └── src ├── main ├── aux-level │ ├── force-hist.c │ ├── force-info.c │ ├── force-mdcp.c │ ├── force-parameter.c │ ├── force-stack.c │ ├── force-stratified-sample.c │ ├── force-tabulate-grid.c │ ├── force-tile-finder.c │ └── force-train.c ├── dummy.c ├── higher-level │ ├── force-higher-level.c │ └── force-qai-inflate.c └── lower-level │ ├── force-cube-init.c │ ├── force-import-modis.c │ ├── force-l2ps.c │ └── force-lut-modis.c ├── modules ├── aux-level │ ├── param-aux.c │ ├── param-aux.h │ ├── param-train-aux.c │ ├── param-train-aux.h │ ├── train-aux.c │ └── train-aux.h ├── cross-level │ ├── alloc-cl.c │ ├── alloc-cl.h │ ├── brick-cl.c │ ├── brick-cl.h │ ├── cite-cl.c │ ├── cite-cl.h │ ├── const-cl.h │ ├── cube-cl.c │ ├── cube-cl.h │ ├── date-cl.c │ ├── date-cl.h │ ├── datesys-cl.c │ ├── datesys-cl.h │ ├── dir-cl.c │ ├── dir-cl.h │ ├── download-cl.c │ ├── download-cl.h │ ├── enum-cl.c │ ├── enum-cl.h │ ├── gdalopt-cl.c │ ├── gdalopt-cl.h │ ├── imagefuns-cl.c │ ├── imagefuns-cl.h │ ├── konami-cl.c │ ├── konami-cl.h │ ├── lock-cl.c │ ├── lock-cl.h │ ├── param-cl.c │ ├── param-cl.h │ ├── pca-cl.c │ ├── pca-cl.h │ ├── quality-cl.c │ ├── quality-cl.h │ ├── queue-cl.c │ ├── queue-cl.h │ ├── read-cl.c │ ├── read-cl.h │ ├── stats-cl.c │ ├── stats-cl.h │ ├── string-cl.c │ ├── string-cl.h │ ├── sun-cl.c │ ├── sun-cl.h │ ├── sys-cl.c │ ├── sys-cl.h │ ├── table-cl.c │ ├── table-cl.h │ ├── tile-cl.c │ ├── tile-cl.h │ ├── utils-cl.c │ ├── utils-cl.h │ ├── vector-cl.c │ ├── vector-cl.h │ ├── warp-cl.c │ └── warp-cl.h ├── higher-level │ ├── bap-hl.c │ ├── bap-hl.h │ ├── cf-improphe-hl.c │ ├── cf-improphe-hl.h │ ├── cso-hl.c │ ├── cso-hl.h │ ├── fold-hl.c │ ├── fold-hl.h │ ├── improphe-hl.c │ ├── improphe-hl.h │ ├── index-hl.c │ ├── index-hl.h │ ├── interpolate-hl.c │ ├── interpolate-hl.h │ ├── l2-improphe-hl.c │ ├── l2-improphe-hl.h │ ├── level3-hl.c │ ├── level3-hl.h │ ├── lib-hl.c │ ├── lib-hl.h │ ├── lsm-hl.c │ ├── lsm-hl.h │ ├── ml-hl.c │ ├── ml-hl.h │ ├── param-hl.c │ ├── param-hl.h │ ├── polar-hl.c │ ├── polar-hl.h │ ├── progress-hl.c │ ├── progress-hl.h │ ├── py-udf-hl.c │ ├── py-udf-hl.h │ ├── quality-hl.c │ ├── quality-hl.h │ ├── r-udf-hl.c │ ├── r-udf-hl.h │ ├── read-ard-hl.c │ ├── read-ard-hl.h │ ├── read-aux-hl.c │ ├── read-aux-hl.h │ ├── sample-hl.c │ ├── sample-hl.h │ ├── spec-adjust-hl.c │ ├── spec-adjust-hl.h │ ├── standardize-hl.c │ ├── standardize-hl.h │ ├── stm-hl.c │ ├── stm-hl.h │ ├── tasks-hl.c │ ├── tasks-hl.h │ ├── texture-hl.c │ ├── texture-hl.h │ ├── trend-hl.c │ ├── trend-hl.h │ ├── tsa-hl.c │ ├── tsa-hl.h │ ├── udf-hl.c │ └── udf-hl.h └── lower-level │ ├── acix-ll.c │ ├── acix-ll.h │ ├── aod-ll.c │ ├── aod-ll.h │ ├── atc-ll.c │ ├── atc-ll.h │ ├── atmo-ll.c │ ├── atmo-ll.h │ ├── brdf-ll.c │ ├── brdf-ll.h │ ├── cloud-ll.c │ ├── cloud-ll.h │ ├── coreg-ll.c │ ├── coreg-ll.h │ ├── coregfuns-ll.c │ ├── coregfuns-ll.h │ ├── cube-ll.c │ ├── cube-ll.h │ ├── equi7-ll.c │ ├── equi7-ll.h │ ├── gas-ll.c │ ├── gas-ll.h │ ├── glance7-ll.c │ ├── glance7-ll.h │ ├── meta-ll.c │ ├── meta-ll.h │ ├── modwvp-ll.c │ ├── modwvp-ll.h │ ├── param-ll.c │ ├── param-ll.h │ ├── radtran-ll.c │ ├── radtran-ll.h │ ├── read-ll.c │ ├── read-ll.h │ ├── resmerge-ll.c │ ├── resmerge-ll.h │ ├── sunview-ll.c │ ├── sunview-ll.h │ ├── table-ll.c │ ├── table-ll.h │ ├── topo-ll.c │ └── topo-ll.h └── tests ├── test_alloc-cl.c ├── test_utils-cl.c └── unity ├── unity.c ├── unity.h ├── unity_internals.h └── version.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text=auto eol=lf 3 | 4 | # Explicitly declare text files you want to always be normalized and converted 5 | # to native line endings on checkout. 6 | *.c text 7 | *.cpp text 8 | *.h text 9 | *.sh text 10 | *.py text 11 | *.yml text 12 | 13 | # Denote all files that are truly binary and should not be modified. 14 | *.png binary 15 | *.jpg binary 16 | *.gif binary 17 | *.tif binary 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help improve the software 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is it a bug?** 11 | Please consider that the bug may be an error in usage, or may be related to wrong settings of your system, e.g. bad access rights. If you are sufficiently sure that it is a bug, please go ahead and file a bug report. If not, please post the question in our self-help [Google Group](https://groups.google.com/d/forum/force_eo) 12 | 13 | **Describe the bug** 14 | A clear and concise description of what the bug or error is, and what software component is affected. 15 | 16 | **Expected behavior** 17 | A clear and concise description of what you expected to happen. 18 | 19 | **Parameterization** 20 | Always add the full commandline that produced the error. 21 | If applicable, add the parameterfile, and other small files that may be related to the problem. 22 | 23 | **Setup** 24 | Always add information on your system, e.g. 25 | - FORCE version 26 | - OS and version 27 | - bare metal Linux server or virtual machine? 28 | - did you deviate from the installation instruction? 29 | - RAM and number of CPUs on your machine 30 | -------------------------------------------------------------------------------- /.github/workflows/docker-publish-debug.yml: -------------------------------------------------------------------------------- 1 | name: Docker-debug 2 | 3 | on: 4 | push: 5 | branches: [main, develop] 6 | release: 7 | types: [published] 8 | repository_dispatch: 9 | types: [udf-dispatch] 10 | 11 | env: 12 | DOCKER_USER: ${{secrets.DOCKER_USER}} 13 | DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} 14 | IMAGE_NAME: force 15 | 16 | jobs: 17 | push: 18 | name: Push debug image to Docker Hub 19 | if: github.repository == 'davidfrantz/force' 20 | runs-on: ubuntu-latest 21 | steps: 22 | - name: Check out the repo 23 | uses: actions/checkout@v4 24 | - name: Docker login 25 | run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD 26 | - name: Build image 27 | run: docker build . --file Dockerfile --tag $IMAGE_NAME --build-arg debug=enable 28 | - name: Push image 29 | run: | 30 | VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') 31 | [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') 32 | [ "$VERSION" == "main" ] && VERSION=latest 33 | [ "$VERSION" == "develop" ] && VERSION=dev 34 | echo VERSION=$VERSION 35 | echo DOCKER=$DOCKER_USER/$IMAGE_NAME:$VERSION-debug 36 | docker tag $IMAGE_NAME $DOCKER_USER/$IMAGE_NAME:$VERSION-debug 37 | docker push $DOCKER_USER/$IMAGE_NAME:$VERSION-debug 38 | -------------------------------------------------------------------------------- /.github/workflows/docker-publish.yml: -------------------------------------------------------------------------------- 1 | name: Docker 2 | 3 | on: 4 | push: 5 | branches: [main, develop] 6 | release: 7 | types: [published] 8 | repository_dispatch: 9 | types: [udf-dispatch,base-dispatch] 10 | 11 | env: 12 | DOCKER_USER: ${{secrets.DOCKER_USER}} 13 | DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} 14 | IMAGE_NAME: force 15 | 16 | jobs: 17 | push: 18 | name: Push image to Docker Hub 19 | if: github.repository == 'davidfrantz/force' 20 | runs-on: ubuntu-latest 21 | steps: 22 | - name: Check out the repo 23 | uses: actions/checkout@v4 24 | - name: Docker login 25 | run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD 26 | - name: Build image 27 | run: docker build . --file Dockerfile --tag $IMAGE_NAME 28 | - name: Push image 29 | run: | 30 | VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') 31 | [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') 32 | [ "$VERSION" == "main" ] && VERSION=latest 33 | [ "$VERSION" == "develop" ] && VERSION=dev 34 | echo VERSION=$VERSION 35 | echo DOCKER=$DOCKER_USER/$IMAGE_NAME:$VERSION 36 | docker tag $IMAGE_NAME $DOCKER_USER/$IMAGE_NAME:$VERSION 37 | docker push $DOCKER_USER/$IMAGE_NAME:$VERSION 38 | -------------------------------------------------------------------------------- /.github/workflows/unit-testing.yml: -------------------------------------------------------------------------------- 1 | name: unit-testing 2 | 3 | on: 4 | push: 5 | pull_request: 6 | release: 7 | types: [published] 8 | repository_dispatch: 9 | types: [udf-dispatch] 10 | 11 | env: 12 | IMAGE_NAME: force-unit-test 13 | 14 | jobs: 15 | testing: 16 | name: Compile in Docker container, and run unit tests 17 | runs-on: ubuntu-latest 18 | steps: 19 | - name: Check out the repo 20 | uses: actions/checkout@v4 21 | - name: Build image 22 | run: docker build . --file Dockerfile --tag $IMAGE_NAME 23 | - name: Run unit tests 24 | run: docker run --rm -t --user "$(id -u):$(id -g)" $IMAGE_NAME force-unit-testing 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | obj 3 | docs/build 4 | docs/source/_build 5 | .idea 6 | python/test* 7 | *.pyc 8 | .vscode 9 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # File: .readthedocs.yaml 2 | 3 | version: 2 4 | 5 | sphinx: 6 | configuration: docs/source/conf.py 7 | 8 | build: 9 | os: "ubuntu-22.04" 10 | tools: 11 | python: "3.11" 12 | 13 | python: 14 | install: 15 | - requirements: docs/requirements.txt 16 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # 3 | # This file is part of FORCE - Framework for Operational Radiometric 4 | # Correction for Environmental monitoring. 5 | # 6 | # Copyright (C) 2013-2022 David Frantz 7 | # 8 | # FORCE is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # FORCE is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with FORCE. If not, see . 20 | # 21 | ########################################################################## 22 | 23 | # Copyright (C) 2020-2022 Gergely Padányi-Gulyás (github user fegyi001), 24 | # David Frantz 25 | # Fabian Lehmann 26 | 27 | 28 | # base installation to speed up build process 29 | # https://github.com/davidfrantz/base_image 30 | FROM davidfrantz/base:latest as force_builder 31 | 32 | # Environment variables 33 | ENV SOURCE_DIR $HOME/src/force 34 | ENV INSTALL_DIR $HOME/bin 35 | 36 | # build args 37 | ARG debug=disable 38 | 39 | # Copy src to SOURCE_DIR 40 | RUN mkdir -p $SOURCE_DIR 41 | WORKDIR $SOURCE_DIR 42 | COPY --chown=docker:docker . . 43 | 44 | # Build, install, check FORCE 45 | RUN echo "building FORCE" && \ 46 | ./debug.sh $debug && \ 47 | sed -i "/^INSTALLDIR=/cINSTALLDIR=$INSTALL_DIR/" Makefile && \ 48 | make -j$(nproc) && \ 49 | make install && \ 50 | make clean && \ 51 | cd $HOME && \ 52 | rm -rf $SOURCE_DIR && \ 53 | force-info && \ 54 | # clone FORCE UDF 55 | git clone https://github.com/davidfrantz/force-udf.git 56 | 57 | FROM davidfrantz/base:latest as force 58 | 59 | COPY --chown=docker:docker --from=force_builder $HOME/bin $HOME/bin 60 | COPY --chown=docker:docker --from=force_builder $HOME/force-udf $HOME/udf 61 | 62 | WORKDIR /home/docker 63 | 64 | ENV R_HOME=/usr/lib/R 65 | ENV LD_LIBRARY_PATH=$R_HOME/lib 66 | 67 | CMD ["force-info"] 68 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FORCE 2 | 3 | **Framework for Operational Radiometric Correction for Environmental monitoring** 4 | 5 | ![FORCE Logo](/images/force.png) 6 | 7 | 8 | ## About 9 | 10 | **FORCE** is an all-in-one processing engine for medium-resolution Earth Observation image archives. FORCE uses the data cube concept to mass-generate Analysis Ready Data, and enables large area + time series applications. With FORCE, you can perform all essential tasks in a typical Earth Observation Analysis workflow, i.e. going from data to information. 11 | 12 | FORCE natively supports the integrated processing and analysis of 13 | 14 | * Landsat 4/5 TM, 15 | * Landsat 7 ETM+, 16 | * Landsat 8 OLI, 17 | * Landsat 9 OLI, and 18 | * Sentinel-2 A/B MSI. 19 | 20 | Non-native data sources can also be processed, e.g. Sentinel-1 SAR data or environmental variables. 21 | 22 | 23 | ## Related Links 24 | 25 | **The documentation** is available on [**Read***the***Docs**](https://force-eo.readthedocs.io/). 26 | 27 | **Learn how to use FORCE**. Have a look at the [Tutorials](https://force-eo.readthedocs.io/en/latest/howto/index.html). Check regularly for new content. 28 | 29 | **Get help**, and help others in the FORCE [discussion section](https://github.com/davidfrantz/force/discussions) 30 | 31 | **Follow** the FORCE project at [ResearchGate](https://www.researchgate.net/project/FORCE-Framework-for-Operational-Radiometric-Correction-for-Environmental-monitoring) 32 | 33 | **Stay updated**, and follow me on [Twitter](https://twitter.com/d__frantz) 34 | 35 | **You are using FORCE? Spread the word**, and use the [#FORCE_EO](https://twitter.com/search?q=%23FORCE_EO&src=recent_search_click) hashtag in your tweets! 36 | 37 | -------------------------------------------------------------------------------- /bump-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########################################################################## 4 | # 5 | # This file is part of FORCE - Framework for Operational Radiometric 6 | # Correction for Environmental monitoring. 7 | # 8 | # Copyright (C) 2013-2022 David Frantz 9 | # 10 | # FORCE is free software: you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation, either version 3 of the License, or 13 | # (at your option) any later version. 14 | # 15 | # FORCE is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | # 20 | # You should have received a copy of the GNU General Public License 21 | # along with FORCE. If not, see . 22 | # 23 | ########################################################################## 24 | 25 | # this script increases the version 26 | 27 | 28 | EXPECTED_ARGS=1 29 | 30 | # if wrong number of input args, stop 31 | if [ $# -ne $EXPECTED_ARGS ]; then 32 | echo "Usage: `basename $0` version" 33 | echo "" 34 | exit 1 35 | fi 36 | 37 | 38 | VERSION=$1 39 | 40 | VERSION_FILE=misc/force-version.txt 41 | 42 | OLD_VERSION=$(cat $VERSION_FILE) 43 | echo $VERSION > $VERSION_FILE 44 | NEW_VERSION=$(cat $VERSION_FILE) 45 | 46 | echo "Changed version from $OLD_VERSION to $NEW_VERSION" 47 | 48 | exit 0 49 | 50 | -------------------------------------------------------------------------------- /debug.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########################################################################## 4 | # 5 | # This file is part of FORCE - Framework for Operational Radiometric 6 | # Correction for Environmental monitoring. 7 | # 8 | # Copyright (C) 2013-2022 David Frantz 9 | # 10 | # FORCE is free software: you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation, either version 3 of the License, or 13 | # (at your option) any later version. 14 | # 15 | # FORCE is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | # 20 | # You should have received a copy of the GNU General Public License 21 | # along with FORCE. If not, see . 22 | # 23 | ########################################################################## 24 | 25 | # this script enables or disables debug mode in FORCE 26 | 27 | EXPECTED_ARGS=1 28 | 29 | # if wrong number of input args, stop 30 | if [ $# -ne $EXPECTED_ARGS ]; then 31 | echo "Usage: $(basename $0) enable/disable" 32 | echo "" 33 | exit 1 34 | fi 35 | 36 | if [ $1 == enable ]; then 37 | enable=1 38 | elif [ $1 == disable ]; then 39 | enable=0 40 | else 41 | echo "Usage: $(basename $0) enable/disable" 42 | echo "" 43 | exit 1 44 | fi 45 | 46 | CONST=src/modules/cross-level/const-cl.h 47 | 48 | if [ ! -r $CONST ]; then 49 | echo "$CONST is not existing/readable" 50 | exit 1 51 | fi 52 | 53 | if [ $enable -eq 1 ]; then 54 | sed -i -e 's%^[/]*\(#define FORCE_DEBUG\)%\1%' src/modules/cross-level/const-cl.h 55 | elif [ $enable -eq 0 ]; then 56 | sed -i -e 's%^[/]*\(#define FORCE_DEBUG\)%//\1%' src/modules/cross-level/const-cl.h 57 | fi 58 | 59 | exit 0 60 | -------------------------------------------------------------------------------- /docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | make -j aux 4 | 5 | MOD=$(bin/force-parameter -m | grep -v 'available modules' | sed 's/^ *//' | cut -d ':' -f 1) 6 | 7 | for m in $MOD; do 8 | bin/force-parameter docs/source/_static/parameter-files/parameter_$m.prm $m 9 | done 10 | 11 | make clean 12 | 13 | exit 14 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SOURCEDIR = source 8 | BUILDDIR = build 9 | 10 | # Put it first so that "make" without argument is like "make help". 11 | help: 12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 13 | 14 | .PHONY: help Makefile 15 | 16 | # Catch-all target: route all unknown targets to Sphinx using the new 17 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 18 | %: Makefile 19 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx==6.1.2 2 | sphinx_rtd_theme==1.3.0 3 | docutils==0.18.1 4 | -------------------------------------------------------------------------------- /docs/source/_static/theme_overrides.css: -------------------------------------------------------------------------------- 1 | /* override table width restrictions */ 2 | @media screen and (min-width: 767px) { 3 | 4 | .wy-table-responsive table td { 5 | /* !important prevents the common CSS stylesheets from overriding 6 | this as on RTD they are loaded after this stylesheet */ 7 | white-space: normal !important; 8 | } 9 | 10 | .wy-table-responsive { 11 | overflow: visible !important; 12 | } 13 | } 14 | 15 | /* reSt-documents don't allow for nested syntax out of the box */ 16 | .bolditalic { 17 | font-style: italic; 18 | font-weight: bold; 19 | } 20 | -------------------------------------------------------------------------------- /docs/source/components/auxilliary/cube-init.rst: -------------------------------------------------------------------------------- 1 | .. _aux-cube-init: 2 | 3 | force-cube-init 4 | =============== 5 | 6 | force-cube-init creates a datacube-definition of a certain projection. 7 | 8 | Usage 9 | ^^^^^ 10 | 11 | .. code-block:: bash 12 | 13 | force-cube-init [-h] [-v] [-i] [-d datacube-dir] [-o lon/lat] 14 | [-t tile-size] [-c chunk-size] projection 15 | 16 | -h = show this help 17 | -v = show version 18 | -i = show program's purpose 19 | 20 | -d datacube-dir = output directory for datacube definition 21 | default: current working directory 22 | 23 | -o lon,lat = origin coordinates of the grid 24 | use geographic coordinates! 25 | longitude is X! 26 | latitude is Y! 27 | default: -25,60, is ignored for pre-defined projections! 28 | 29 | -t tile-size 30 | default: 30km, is ignored for pre-defined projections! 31 | 32 | -c chunk-size 33 | default: 3km, is ignored for pre-defined projections! 34 | 35 | Positional arguments: 36 | - Projection (custom WKT string or built-in projection -------------------------------------------------------------------------------- /docs/source/components/auxilliary/cube.rst: -------------------------------------------------------------------------------- 1 | .. _aux-cube: 2 | 3 | force-cube 4 | ========== 5 | 6 | force-cube generates processing masks from **vector** data (e.g. shapefile or geopackage). 7 | 8 | Usage 9 | ^^^^^ 10 | 11 | .. code-block:: bash 12 | 13 | force-cube [-hvirsantobj] input-file(s) 14 | 15 | optional: 16 | -h = show this help 17 | -v = show version 18 | -i = show program's purpose 19 | -r = resampling method 20 | any GDAL resampling method for raster data, e.g. cubic (default) 21 | is ignored for vector data 22 | -s = pixel resolution of cubed data, defaults to 10 23 | -a = optional attribute name for vector data. force-cube will burn these values into the 24 | output raster. default: no attribute is used; 25 | a binary mask with geometry presence (1) or absence (0) is generated 26 | -l = layer name for vector data (default: basename of input, without extension) 27 | -n = output nodate value (defaults to 255) 28 | -t = output data type (defaults to Byte; see GDAL for datatypes; but note that FORCE HLPS 29 | only understands Int16 and Byte types correctly) 30 | -o = output directory: the directory where you want to store the cubes defaults to current 31 | directory 'datacube-definition.prj' needs to exist in there 32 | -b = basename of output file (without extension) defaults to the basename of the input-file 33 | cannot be used when multiple input files are given 34 | -j = number of jobs, defaults to 'as many as possible' 35 | 36 | mandatory: 37 | input-file(s) = the file(s) you want to cube 38 | -------------------------------------------------------------------------------- /docs/source/components/auxilliary/datacube-size.rst: -------------------------------------------------------------------------------- 1 | .. _aux-datacube-size: -------------------------------------------------------------------------------- /docs/source/components/auxilliary/extent.rst: -------------------------------------------------------------------------------- 1 | .. _aux-extent: 2 | 3 | 4 | force-extent 5 | ============ 6 | 7 | ... 8 | 9 | -------------------------------------------------------------------------------- /docs/source/components/auxilliary/init.rst: -------------------------------------------------------------------------------- 1 | .. _aux-init: -------------------------------------------------------------------------------- /docs/source/components/auxilliary/main.rst: -------------------------------------------------------------------------------- 1 | Print version 2 | ============= 3 | 4 | The version of your FORCE installation, as well as a short disclaimer can be displayed using the utility program force. 5 | 6 | Usage 7 | ^^^^^ 8 | 9 | .. code-block:: bash 10 | 11 | force 12 | -------------------------------------------------------------------------------- /docs/source/components/auxilliary/mdcp.rst: -------------------------------------------------------------------------------- 1 | .. _aux-mdcp: 2 | 3 | force-mdcp 4 | ========== 5 | 6 | force-mdcp creates a copy of metadata from a source-file to a certain destination. 7 | 8 | Usage 9 | ^^^^^ 10 | 11 | .. code-block:: bash 12 | 13 | force-mdcp [-h] [-v] [-i] src-file dst-file 14 | 15 | -h = show this help 16 | -v = show version 17 | -i = show program's purpose 18 | 19 | Positional arguments: 20 | - 'src-file': source of metadata 21 | - 'dst-file': destination of metadata 22 | -------------------------------------------------------------------------------- /docs/source/components/auxilliary/mosaic.rst: -------------------------------------------------------------------------------- 1 | .. _aux-mosaic: 2 | 3 | force-mosaic 4 | ============ 5 | 6 | force-mosaic creates a `GDAL virtual format `_-file for each FORCE product found in ``datacube-dir``. This function is agnostic to the processing level of the data found and identifies corresponding bands in different tiles by their base names. 7 | 8 | Using VRTs eases the visualization of large study areas by virtually linking the respective files in multiple tiles (i. e. directories) together. 9 | Additionally, the output can be :ref:`stacked ` and :ref:`overviews generated `. 10 | 11 | Usage 12 | ^^^^^ 13 | 14 | .. note:: 15 | In FORCE <= 3.6.5 only the ``datacube-dir`` could be specified as parameter. 16 | 17 | .. code-block:: bash 18 | 19 | force-mosaic [-h] [-v] [-i] [-j] [-m] datacube-dir 20 | 21 | -h = show this help 22 | -v = show version 23 | -i = show program's purpose 24 | 25 | -j = number of parallel processes (default: all) 26 | 27 | -m = mosaic directory (default: mosaic) 28 | This should be a directory relative to the tiles 29 | 30 | Positional arguments: 31 | - 'datacube-dir': directory of existing datacube 32 | 33 | -------------------------------------------------------------------------------- /docs/source/components/auxilliary/procmask.rst: -------------------------------------------------------------------------------- 1 | .. _aux-procmask: 2 | 3 | force-procmask 4 | ============== 5 | 6 | force-procmask generates processing masks from **raster** images with continuous values. 7 | 8 | Usage 9 | ^^^^^ 10 | 11 | .. code-block:: bash 12 | 13 | force-procmask [-s] [-l] [-d] [-o] [-b] [-j] input-basename calc-expr 14 | 15 | optional: 16 | -s = pixel resolution of cubed data, defaults to 10 17 | -l = input-layer: band number in case of multi-band input rasters, 18 | defaults to 1 19 | -d = input directory: the datacube directory 20 | defaults to current directory 21 | 'datacube-definition.prj' needs to exist in there 22 | -o = output directory: the directory where you want to store the cubes 23 | defaults to current directory 24 | -b = basename of output file (without extension) 25 | defaults to the basename of the input-file, 26 | appended by '_procmask' 27 | -j = number of jobs, defaults to 'as many as possible' 28 | 29 | Positional arguments: 30 | - input-basename: basename of input data 31 | - calc-expr: Calculation in gdalnumeric syntax, e.g. 'A>2500'" 32 | The input variable is 'A' 33 | For details about GDAL expressions, see 34 | https://gdal.org/programs/gdal_calc.html 35 | -------------------------------------------------------------------------------- /docs/source/components/auxilliary/pyramid.rst: -------------------------------------------------------------------------------- 1 | .. _aux-pyramid: 2 | 3 | 4 | force-pyramid 5 | ============= 6 | 7 | For faster visualization, pyramids can be generated by using force-pyramid for any cubed data, inclusively `GDAL virtual format `_-files. 8 | Pyramid layers are copies of the original data at reduced resolution. This significantly increases loading and response times for visualization. 9 | However, keep in mind that pyramids consume some disc space. 10 | 11 | Usage 12 | ^^^^^ 13 | 14 | .. code-block:: bash 15 | 16 | force-pyramid [-hjrl] image [image]* 17 | 18 | -h = show his help 19 | -j = number of jobs 20 | defaults to 'as many as possible' 21 | -r = resampling option 22 | default: nearest 23 | -l = levels, comma-separated 24 | default: 2 4 8 16 25 | -------------------------------------------------------------------------------- /docs/source/components/auxilliary/qai-inflate.rst: -------------------------------------------------------------------------------- 1 | .. _aux-qai-inflate: 2 | 3 | force-qai-inflate 4 | ================= 5 | 6 | Quality Assurance Information (QAI) is generated for Level 2 data (QAI product), and is included as layer in the Level 3 compositing information product (INF). The QAI layers are stored with bit-encoding (see Table 6), which makes it very useful to store much information with fairly low data volume. However, the QAI need to be parsed to extract all the useful information. The program force-qai-inflate can be used to inflate the QAI to individual masks. The 1st argument specifies the QAI dataset that should be inflated (QAI or INF products for Level 2 and Level 3, respectively). The 2nd argument is the directory where the masks should be stored. The 3rd argument gives the output format (ENVI or GTiff). The output is a multilayer image (bands = flags in Table 6) with product type QIM (Quality Inflated Masks). It is advised to not store these images in the same directory as the QAI image. It is also advised to not use this tool operationally, adjust your programs to use the QAI layer directly (saves disk space and time). 7 | 8 | Usage 9 | ^^^^^ 10 | 11 | .. code-block:: bash 12 | 13 | force-qai-inflate [-h] [-v] [-i] input-file output-dir 14 | 15 | -h = show this help 16 | -v = show version 17 | -i = show program's purpose 18 | 19 | Positional arguments: 20 | - 'input-file': QAI file 21 | - 'output-dir': Output directory for QIM files.' 22 | -------------------------------------------------------------------------------- /docs/source/components/auxilliary/stack.rst: -------------------------------------------------------------------------------- 1 | .. _aux-stack: 2 | 3 | force-stack 4 | =========== 5 | 6 | force-stack creates a `GDAL virtual format `_ layer-stack of several bands from different physical files. 7 | 8 | Usage 9 | ^^^^^ 10 | 11 | .. code-block:: bash 12 | 13 | force-stack [-h] [-v] [-i] {-o output-file} src-files 14 | 15 | -h = show this help 16 | -v = show version 17 | -i = show program's purpose 18 | 19 | -o output-file = stacked output file (.vrt) 20 | 21 | Positional arguments: 22 | - 'src-files': source files that will be stacked 23 | -------------------------------------------------------------------------------- /docs/source/components/auxilliary/synthmix-param.rst: -------------------------------------------------------------------------------- 1 | .. _synthmix-param: 2 | 3 | Parameterization 4 | ================ 5 | 6 | The file extension is ‘.prm’. 7 | All parameters must be given, even if they are not used. 8 | All parameters follow common tag-value notation. 9 | Rudimentary checks are performed by the software components using this file. 10 | 11 | The ``++PARAM_SYNTHMIX_START++`` and ``++PARAM_SYNTHMIX_END++`` keywords enclose the parameter file. 12 | 13 | The following parameter descriptions are a print-out of ``force-parameter``, which can generate an empty parameter file skeleton. 14 | 15 | .. include:: ../../_static/parameter-files/parameter_SYNTHMIX.prm 16 | :code: shell 17 | -------------------------------------------------------------------------------- /docs/source/components/auxilliary/synthmix.rst: -------------------------------------------------------------------------------- 1 | .. _aux-synthmix: 2 | 3 | force-synthmix 4 | ============== 5 | 6 | force-synthmix creates synthetically mixed data based on known spectral information that represent pure surface types. 7 | The output can be used as reference or training data. 8 | 9 | A :ref:`parameter-file ` is mandatory for the synthetic mixing. 10 | 11 | Usage 12 | ^^^^^ 13 | 14 | .. code-block:: bash 15 | 16 | force-synthmix parameter-file 17 | 18 | .. toctree:: 19 | :hidden: 20 | :maxdepth: 2 21 | 22 | synthmix-param.rst -------------------------------------------------------------------------------- /docs/source/components/auxilliary/tabulate-grid.rst: -------------------------------------------------------------------------------- 1 | .. _tabulate-grid: 2 | 3 | force-tabulate-grid 4 | =================== 5 | 6 | In case of the gridded data structure, force-tabulate-grid can be used to extract the processing grid as ESRI shapefile, e.g. for visualization purposes or to generate a tile allow-list. Any gridded data cube (containing a data cube definition file, see VII.M) can be given as 1st argument. The approximate bounding box of your study area needs to be given with coordinates in decimal degree (negative values for West/South). The shapefile ‘datacube-grid.shp’ is stored in the same directory as the data cube. 7 | 8 | Usage 9 | ^^^^^ 10 | 11 | .. code-block:: bash 12 | 13 | force-tabulate-grid [-h] [-v] [-i] [-b bottom,top,left,right] [-f format] datacube-dir 14 | 15 | -h = show this help 16 | -v = show version 17 | -i = show program's purpose 18 | 19 | -b bottom,top,left,right = bounding box 20 | use geographic coordinates! 4 comma-separated numbers 21 | 22 | -f format = output format: shp or kml (default) 23 | 24 | Positional arguments: 25 | - 'datacube-dir': directory of existing datacube 26 | -------------------------------------------------------------------------------- /docs/source/components/auxilliary/tile-extent.rst: -------------------------------------------------------------------------------- 1 | .. _aux-tile-extent: 2 | 3 | force-tile-extent 4 | ================= 5 | 6 | force-tile-extent creates a tile allow-list from a given area of interest (vector file). 7 | 8 | Usage 9 | ^^^^^ 10 | 11 | .. code-block:: bash 12 | 13 | force-tile-extent input-vector datacube-dir allow-list 14 | 15 | input-file: a polygon vector file 16 | datacube-dir: the directory of a datacube; 17 | datacube-definition.prj needs to exist in there 18 | allow-list: a tile allow-list to restrict the processing extent. 19 | This file will be written -------------------------------------------------------------------------------- /docs/source/components/auxilliary/tile-finder.rst: -------------------------------------------------------------------------------- 1 | .. _tile-finder: 2 | 3 | force-tile-finder 4 | ================= 5 | 6 | In case of the gridded data structure, a geographic coordinate can be converted to tile and pixel coordinates using force-tile-finder. This functionality is intended to spatially locate data. Any gridded data cube (containing a data cube definition file, see VII.M) can be given as 1st argument. Longitude and latitude must be given as 2nd and 3rd arguments with coordinates in decimal degree (negative values for West/South). The resolution needs to be given (4th argument) in order to relate coordinates to pixel positions. 7 | 8 | Usage 9 | ^^^^^ 10 | 11 | .. code-block:: bash 12 | 13 | force-tile-finder [-h] [-v] [-i] [-p lon,lat] [-r resolution] datacube-dir 14 | 15 | -h = show this help 16 | -v = show version 17 | -i = show program's purpose 18 | 19 | -p lon/lat = point of interest 20 | use geographic coordinates! 21 | longitude is X! 22 | latitude is Y! 23 | 24 | -r resolution = target resolution 25 | this is needed to compute the pixel number 26 | 27 | Positional arguments: 28 | - 'datacube-dir': directory of existing datacube 29 | -------------------------------------------------------------------------------- /docs/source/components/auxilliary/train-param.rst: -------------------------------------------------------------------------------- 1 | .. _train-param: 2 | 3 | Parameterization 4 | ================ 5 | 6 | The file extension is ‘.prm’. 7 | All parameters must be given, even if they are not used. 8 | All parameters follow common tag-value notation. 9 | Rudimentary checks are performed by the software components using this file. 10 | 11 | The ``++PARAM_TRAIN_START++`` and ``++PARAM_TRAIN_END++`` keywords enclose the parameter file. 12 | 13 | The following parameter descriptions are a print-out of ``force-parameter``, which can generate an empty parameter file skeleton. 14 | 15 | .. include:: ../../_static/parameter-files/parameter_TRAIN.prm 16 | :code: shell 17 | -------------------------------------------------------------------------------- /docs/source/components/auxilliary/train.rst: -------------------------------------------------------------------------------- 1 | .. _aux-train: 2 | 3 | 4 | force-train 5 | =========== 6 | 7 | :ref:`Machine Learning ` needs a modelset for each response variable, which can be generated as \*.xml file with force-train. 8 | A :ref:`parameter file ` is mandatory for the Machine Learning Trainer. 9 | 10 | Usage 11 | ^^^^^ 12 | 13 | .. code-block:: bash 14 | 15 | force-train [-h] [-v] [-i] parameter-file 16 | 17 | -h = show this help 18 | -v = show version 19 | -i = show program's purpose 20 | 21 | Positional arguments: 22 | - 'parameter-file': TRAIN parameter file 23 | 24 | .. toctree:: 25 | :hidden: 26 | :maxdepth: 2 27 | 28 | train-param.rst 29 | 30 | -------------------------------------------------------------------------------- /docs/source/components/comp_overview.rst: -------------------------------------------------------------------------------- 1 | .. _comp_overview: 2 | 3 | Overview 4 | ======== 5 | 6 | FORCE is a software framework and consists of several modules and executables, which are organized in components according to processing levels. 7 | 8 | * :ref:`lower-level` is defined as Levels 1-2, 9 | 10 | * :ref:`hlps` as Level 3 and above, 11 | 12 | * :ref:`aux-level` components are helper programs for specific purposes. 13 | 14 | 15 | A typical FORCE workflow consists of following main steps: 16 | 17 | 1) Level 1 images are acquired from the space agencies, and are 18 | 19 | 2) converted to Level 2 ARD, which are 20 | 21 | 3) aggregated and/or analyzed in Higher Level processing. 22 | 23 | 24 | .. image:: force-general-30.jpg 25 | 26 | **Figure.** Overview of the software components. 27 | 28 | -------------------------------------------------------------------------------- /docs/source/components/force-general-30.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/force-general-30.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/cfi/cfi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/cfi/cfi.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/cfi/index.rst: -------------------------------------------------------------------------------- 1 | .. _cfi: 2 | 3 | Continuous Field ImproPhe 4 | ========================= 5 | 6 | FORCE ImproPhe is intended to increase the spatial resolution of coarse continuous fields. It was originally developed to refine Land Surface Phenology metrics derived from MODIS, using sparse Landsat data as spectral and multi-temporal targets for data fusion. Regarding phenology, it can be used to obtain a Landsat-like phenology even in areas / during times when Landsat data alone is insufficient (in terms of temporal density). FORCE permits the use of Landsat and/or Sentinel-2 data as target datasets for the improPhement. ImproPhe can also be applied to other coarse resolution data (for best results, some link to spectral-temporal land surface processes should exist – e.g. increasing the spatial resolution of rainfall data won’t work). 7 | FORCE also features a tool to increase the spatial resolution of lower resolution ARD using higher resolution ARD using the ImproPhe algorithm (spectral + multi-temporal parameterization). The ImproPhe code is also implemented as resolution merge option in FORCE L2PS to increase the spatial resolution of Sentinel-2’s 20m bands to 10m (spectral + mono-temporal implementation). 8 | This section summarizes the usage of FORCE ImproPhe, its helper programs and the output format. 9 | FORCE ImproPhe can only be used with Level 2 ARD. 10 | 11 | 12 | 13 | **A glimpse of what you get:** 14 | 15 | .. image:: cfi.jpg 16 | 17 | **Figure** Coarse resolution (500m) and ImproPhed (30m) LSP metrics. 18 | Rate of Maximum Rise (R), Integral of Green Season (G), and Value of Early Minimum (B) phenometrics for a study site in Brandenburg, Germany. Using the ImproPhe algorithm, the LSP metrics were improved to 30m spatial resolution using Landsat and (degraded) Sentinel-2 targets. 19 | 20 | .. toctree:: 21 | :maxdepth: 2 22 | 23 | param.rst 24 | process.rst 25 | format.rst 26 | 27 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/cfi/param.rst: -------------------------------------------------------------------------------- 1 | .. _cfi-param: 2 | 3 | Parameterization 4 | ================ 5 | 6 | A parameter file is mandatory for the Continuous Fields ImproPhe submodule of FORCE HLPS. 7 | 8 | All parameters must be given, even if they are not used. 9 | All parameters follow common tag-value notation. 10 | Rudimentary checks are performed when using this file. 11 | 12 | The following parameter descriptions are a print-out of ``force-parameter``, which can generate an empty parameter file skeleton. 13 | 14 | .. include:: ../../../_static/parameter-files/parameter_CFIMP.prm 15 | :code: shell 16 | 17 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/cfi/process.rst: -------------------------------------------------------------------------------- 1 | Processing 2 | ========== 3 | 4 | FORCE ImproPhe is a submodule of ``force-higher-level``, which improves the spatial resolution of coarse continuous fields. The processed images are written to the output directory given in the ImproPhe :ref:`parameter file `. 5 | 6 | Usage 7 | ^^^^^ 8 | 9 | .. code-block:: bash 10 | 11 | force-higher-level parameter-file 12 | 13 | The parameter file needs to be given as sole argument. All options need to be specified in the :ref:`parameter file `. 14 | 15 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/cso/cso-turkey.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/cso/cso-turkey.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/cso/cso-workflow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/cso/cso-workflow.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/cso/index.rst: -------------------------------------------------------------------------------- 1 | .. _cso: 2 | 3 | Clear Sky Observations 4 | ====================== 5 | 6 | FORCE Clear Sky Observations (FORCE CSO) assists in data availability mining. 7 | 8 | 9 | .. image:: cso-workflow.jpg 10 | 11 | **Figure** Processing workflow of the Clear Sky Observations submodule. 12 | 13 | 14 | The most important setting are the temporal properties. 15 | A temporal range needs to be specified in terms of years, e.g. 2017–2018. 16 | Clear Sky Observation statistics are generated for each time step as defined by the ``MONTH_STEP`` parameter (e.g. 6 months). 17 | Within each interval, the number of Clear Sky Observations are counted. 18 | In addition, several statistics based on the temporal difference between the observations are calculated, e.g. the maximum time between two observations in each interval. 19 | Note that the beginning and end of the intervals act as boundaries for this assessment and are also considered. 20 | 21 | This processing scheme reflects the fact, that a single measure of data availability might not yield representative results – depending on the application. 22 | A combined look at different statistics, or at a more uncommon metric, may provide more insight into the applicability of a specific method – or might explain uncertainties associated with a specific method. 23 | As an example, the data availability for the first and second half of 2018 (as depicted below) is equal in terms of the number of observations, and the average time between observations. 24 | However, there are large differences in the maximum time between observations as the data are clumped in the first half. This may have important implications, e.g. for the detectability of harvesting events. 25 | Happy data mining! 26 | 27 | 28 | **A glimpse of what you get:** 29 | 30 | .. image:: cso-turkey.jpg 31 | 32 | **Figure** Quarterly Clear Sky Observation statistics. 33 | The CSO statistics were computed for the 2015 Landsat 7–8 acquisitions over Turkey. 34 | 35 | 36 | 37 | .. toctree:: 38 | :maxdepth: 2 39 | 40 | param.rst 41 | format.rst 42 | 43 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/cso/param.rst: -------------------------------------------------------------------------------- 1 | .. _cso-param: 2 | 3 | Parameterization 4 | ================ 5 | 6 | A parameter file is mandatory for the Clear Sky Observation submodule of FORCE HLPS. 7 | 8 | All parameters must be given, even if they are not used. 9 | All parameters follow common tag-value notation. 10 | Rudimentary checks are performed when using this file. 11 | 12 | The following parameter descriptions are a print-out of ``force-parameter``, which can generate an empty parameter file skeleton. 13 | 14 | .. include:: ../../../_static/parameter-files/parameter_CSO.prm 15 | :code: shell 16 | 17 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/hl-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/hl-1.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/hl-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/hl-2.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/hl-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/hl-3.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/hl-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/hl-4.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/hl-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/hl-5.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/index.rst: -------------------------------------------------------------------------------- 1 | .. _hlps: 2 | 3 | Higher Level 4 | ============ 5 | 6 | The FORCE Higher Level Processing System (HLPS) provides functionality for Higher Level Processing. 7 | 8 | HLPS consists of one executable only, i.e. ``force-higher-level``. 9 | Multiple :ref:`hl-submodules` are available, which either process ARD or feature datasets (see :ref:`hl-input`). 10 | 11 | 12 | **Table 1** Higher Level module. 13 | 14 | +--------+-------------------------+-------+-----------------------------------------------------------------------------------------------------+ 15 | + Module + Program + Level + Short description + 16 | +========+=========================+=======+=====================================================================================================+ 17 | + HLPS + The FORCE Higher Level Processing System (HLPS) provides functionality for Higher Level Processing of cubed ARD and feature datasets. + 18 | + +-------------------------+-------+-----------------------------------------------------------------------------------------------------+ 19 | + + :ref:`higher-level` + 3-4 + Higher Level processing + 20 | +--------+-------------------------+-------+-----------------------------------------------------------------------------------------------------+ 21 | 22 | 23 | .. higher-level: 24 | 25 | **Usage** 26 | 27 | .. code-block:: bash 28 | 29 | force-higher-level 30 | 31 | Usage: force-higher-level parameter-file 32 | 33 | * parameter-file 34 | 35 | | Any higher-level parameter file needs to be given as sole argument. 36 | | Depending on the parameter file, the program will figure out which submodule to execute, e.g. time series analysis or machine learning predictions. 37 | 38 | 39 | .. toctree:: 40 | :hidden: 41 | :maxdepth: 3 42 | 43 | hl-input.rst 44 | hl-compute.rst 45 | hl-aux.rst 46 | hl-submodules.rst 47 | 48 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/l2i/index.rst: -------------------------------------------------------------------------------- 1 | .. _l2i: 2 | 3 | Level 2 ImproPhe 4 | ================ 5 | 6 | The Level 2 ImproPhe (L2IMP) submodule increases the spatial resolution of lower resolution Level 2 ARD using higher resolution Level 2 ARD. 7 | As an example, the spatial resolution of 30m Landsat imagery can be "improPhed" to 10m using Sentinel-2 targets. 8 | This only works for years where both data sources exist. 9 | The data fusion is performed with the ImproPhe algorithm (`Frantz et al. `_) 10 | 11 | .. note:: 12 | 13 | This module is heavy on processing time and RAM. 14 | 15 | 16 | .. image:: l2i-workflow.jpg 17 | 18 | **Figure** Processing workflow of the Level 2 ImproPhe submodule. 19 | 20 | Add more detailed description about workflow here. Make workflow image. 21 | 22 | The higher-resolution ARD are condensed to seasonal windows, and the ImproPhe code is applied to each lower-resolution ARD dataset. 23 | 24 | 25 | **A glimpse of what you get:** 26 | 27 | .. image:: l2i.jpg 28 | 29 | **Figure** 30m Landsat ARD, and ImproPhed 10m Landsat ARD. 30 | The figure shows image subsets from North Rhine-Westphalia, Germany. Using the ImproPhe algorithm, the spatial resolution was improved to 10m using multi-temporal Sentinel-2 A/B high-res bands as prediction targets. 31 | 32 | 33 | .. toctree:: 34 | :maxdepth: 2 35 | 36 | param.rst 37 | format.rst 38 | 39 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/l2i/l2i-workflow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/l2i/l2i-workflow.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/l2i/l2i.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/l2i/l2i.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/l2i/param.rst: -------------------------------------------------------------------------------- 1 | .. _l2i-param: 2 | 3 | Parameterization 4 | ================ 5 | 6 | A parameter file is mandatory for the Level 2 ImproPhe submodule of FORCE HLPS. 7 | 8 | All parameters must be given, even if they are not used. 9 | All parameters follow common tag-value notation. 10 | Rudimentary checks are performed when using this file. 11 | 12 | The following parameter descriptions are a print-out of ``force-parameter``, which can generate an empty parameter file skeleton. 13 | 14 | .. include:: ../../../_static/parameter-files/parameter_L2IMP.prm 15 | :code: shell 16 | 17 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/l3/index.rst: -------------------------------------------------------------------------------- 1 | .. _level3: 2 | 3 | Level 3 Compositing 4 | =================== 5 | 6 | The Level 3 Compositing submodule generates temporal aggregations of Level 2 data to provide seamless, gap free, and highly Analysis Ready Data (hARD) over very large areas. 7 | hARD are excellent input for many machine learning algorithms, e.g. for land cover / change classification purposes. 8 | 9 | 10 | .. image:: level3.jpg 11 | 12 | **Figure** Processing workflow of the Level 3 Compositing submodule. 13 | 14 | 15 | The aggregation is performed using a parametric weighting scheme based selection algorithm based on `Griffiths et al. `_, commonly known as pixel-based compositing. 16 | The selection can either be performed using static target dates or using dynamic target dates as outlined in `Frantz et al. `_, known as phenology-adaptive compositing. 17 | In the latter case, a Land Surface Phenology (LSP) dataset is required. 18 | 19 | Only highest-quality pixels are considered, i.e. observations with very low cloud or haze score are discarded. 20 | Similarly, observations with very low seasonal score are discarded, which ensures that Level 3 products are representative of the season of interest (can be switched off). 21 | Over persistent water, the compositing algorithm is switched to minimum shortwave-infrared (SWIR2 band) compositing, as the parametric weighting selection is often noisy due to the high temporal variability of water reflectance. 22 | 23 | 24 | **A glimpse of what you get:** 25 | 26 | .. image:: pac.jpg 27 | 28 | **Figure** Phenology Adaptive Composite (PAC) using Landsat 5–7. 29 | The End of Season composite (2018) was computed for Angola, Zambia, Zimbabwe, Botswana and Namibia. 30 | 31 | 32 | .. toctree:: 33 | :maxdepth: 2 34 | 35 | param.rst 36 | lsp.rst 37 | format.rst 38 | 39 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/l3/level3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/l3/level3.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/l3/lsp.rst: -------------------------------------------------------------------------------- 1 | Land Surface Phenology 2 | ====================== 3 | 4 | A Land Surface Phenology (LSP) dataset may be input to generate phenology-adaptive composites – 5 | or sth. similar that is dependent on spatial variation of the target dates. 6 | This is optional and may be omitted if static composites or temporal statistics are used. 7 | The LSP dataset needs to be prepared in the same grid as the Level 2 data (i.e. in a mirrored data structure). 8 | Three (or more) images need to be prepared for each tile, i.e. 9 | seasonal parameters describing points in time (e.g. the timing of start of season, peak of season, end of season, ...). 10 | For compositing, a sequence of three images needs to be selected as temporal target, 11 | and the filenames must contain a unique ID (e.g. SOS, POS, EOS). 12 | The data are expected to be in ENVI standard or GeoTiff format. 13 | Each file is a multi-layer image with years as bands (the first year is specified in the Level 3 parameter file. 14 | Note that missing years are not allowed (use a fill band instead). 15 | The values should be in days relative to a custom starting point. 16 | Leap years are not taken into account and each year consists of 365 days. 17 | 18 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/l3/pac.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/l3/pac.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/l3/param.rst: -------------------------------------------------------------------------------- 1 | .. _l3-param: 2 | 3 | Parameterization 4 | ================ 5 | 6 | A parameter file is mandatory for the Level 3 Compositing submodule of FORCE HLPS. 7 | 8 | All parameters must be given, even if they are not used. 9 | All parameters follow common tag-value notation. 10 | Rudimentary checks are performed when using this file. 11 | 12 | The following parameter descriptions are a print-out of ``force-parameter``, which can generate an empty parameter file skeleton. 13 | 14 | .. include:: ../../../_static/parameter-files/parameter_LEVEL3.prm 15 | :code: shell 16 | 17 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/lsm/index.rst: -------------------------------------------------------------------------------- 1 | .. _lsm: 2 | 3 | Landscape Metrics 4 | ================= 5 | 6 | The Landscape Metrics submodule of HLPS computes area depending metrics or patches from several input features. This metrics characterize the structure of the landscape and can be used as training data for machine learning. 7 | Landscape metrics are computed for pixels covererd by the foreground class, no metrics are computed for the pixels covered by the background class. 8 | The foreground class is defined by the type of the threshold for each feature given in the parameter-file. All pixels that are greater than, lower than or equal to this threshold are interpreted as foreground class (in dependence of threshold type). 9 | The minimum size (in pixels) of an area to be considered as a patch will be defined in the parameter-file. Patches with fewer pixels will be omitted. 10 | 11 | # Workflow 12 | # A glimpse of what you get: 13 | 14 | 15 | .. toctree:: 16 | :maxdepth: 2 17 | 18 | param.rst 19 | format.rst 20 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/lsm/param.rst: -------------------------------------------------------------------------------- 1 | .. _lsm-param: 2 | 3 | Parameterization 4 | ================ 5 | 6 | A parameter file is mandatory for the Landscape Metrics submodule of FORCE HLPS. 7 | 8 | All parameters must be given, even if they are not used. 9 | All parameters follow common tag-value notation. 10 | Rudimentary checks are performed when using this file. 11 | 12 | The following parameter descriptions are a print-out of ``force-parameter``, which can generate an empty parameter file skeleton. 13 | 14 | .. include:: ../../../_static/parameter-files/parameter_LSM.prm 15 | :code: shell 16 | 17 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/ml/buiding-height.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/ml/buiding-height.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/ml/index.rst: -------------------------------------------------------------------------------- 1 | .. _ml: 2 | 3 | Machine Learning 4 | ================ 5 | 6 | 7 | The Machine Learning submodule generates maps from machine learning predictions. 8 | The response variable can either be quantitative or qualitative, i.e. regression or classification. 9 | The resulting maps are grouped as highly Analysis Ready Data plus (hARD+), which means they can be directly used to fuel your research questions without any further processing. 10 | Typically, this submodule is fed with hARD products, i.e. seamless and gap free aggregate products. 11 | hARD products can e.g. be generated by the :ref:`tsa`, :ref:`level3`, :ref:`txt`, and :ref:`lsm` submodules - or external hARD can be ingested using :ref:`aux-cube`. 12 | Machine learning models are trained using :ref:`aux-train`. 13 | 14 | .. image:: ml-workflow.jpg 15 | 16 | **Figure** Processing workflow of the Machine Learning submodule. 17 | In this case, different fractional cover types are the response variables. 18 | 19 | The same set of features need to be input, which was used to train the model (:ref:`aux-train`). 20 | The submodule permits to predict multiple response variables at once, i.e. with the same run. 21 | The only constraint is, that each prediction was trained with the same input features, and that the same Machine Learner is used for each model. 22 | Available learners are Support Vector Regression, Support Vector Classification, Random Forest Regression, and Random Forest Classification. 23 | 24 | A modelset needs to be given for each response variable. 25 | Within each modelset, one or multiple models may be input. 26 | The number of models may differ from modelset to modelset. 27 | A model is a \*.xml file generated with :ref:`aux-train`. 28 | 29 | Within each modelset, the final prediction is generated by aggregating the results of each prediction. 30 | For regression, this is the average of the individual model's predictions. 31 | For classification, this is the mode of the individual model's predictions. 32 | 33 | 34 | **A glimpse of what you get:** 35 | 36 | .. image:: buiding-height.jpg 37 | 38 | **Figure** Building Height prediction for Germany using Support Vector Regression. 39 | The model was trained with 3D building models and multi-temporal Sentinel-1+2 A/B time series. 40 | 41 | .. toctree:: 42 | :maxdepth: 2 43 | 44 | param.rst 45 | format.rst 46 | 47 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/ml/ml-workflow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/ml/ml-workflow.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/ml/param.rst: -------------------------------------------------------------------------------- 1 | .. _ml-param: 2 | 3 | Parameterization 4 | ================ 5 | 6 | A parameter file is mandatory for the Machine Learning submodule of FORCE HLPS. 7 | 8 | All parameters must be given, even if they are not used. 9 | All parameters follow common tag-value notation. 10 | Rudimentary checks are performed when using this file. 11 | 12 | The following parameter descriptions are a print-out of ``force-parameter``, which can generate an empty parameter file skeleton. 13 | 14 | .. include:: ../../../_static/parameter-files/parameter_ML.prm 15 | :code: shell 16 | 17 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/smp/index.rst: -------------------------------------------------------------------------------- 1 | .. _smp: 2 | 3 | Sampling 4 | ======== 5 | 6 | The Sampling submodule of HLPS collects samples from several input features and their corresponding response variables at predefined points. 7 | 8 | # Workflow 9 | # A glimpse of what you get: 10 | # Fig. 11 | 12 | .. toctree:: 13 | :maxdepth: 2 14 | 15 | param.rst 16 | format.rst 17 | 18 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/smp/param.rst: -------------------------------------------------------------------------------- 1 | .. _smp-param: 2 | 3 | Parameterization 4 | ================ 5 | 6 | A parameter file is mandatory for the Sampling submodule of FORCE HLPS. 7 | 8 | All parameters must be given, even if they are not used. 9 | All parameters follow common tag-value notation. 10 | Rudimentary checks are performed when using this file. 11 | 12 | The following parameter descriptions are a print-out of ``force-parameter``, which can generate an empty parameter file skeleton. 13 | 14 | .. include:: ../../../_static/parameter-files/parameter_SMP.prm 15 | :code: shell 16 | 17 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/tsa/endmember.rst: -------------------------------------------------------------------------------- 1 | .. _tsa-endmember: 2 | 3 | Endmember file 4 | ============== 5 | 6 | This file is needed for Spectral Mixture Analysis in the :ref:`tsa` submodule if ``INDEX`` includes ``SMA``. 7 | The file is specified with the ``FILE_ENDMEM`` parameter. 8 | 9 | The file defines the endmember spectra that should be used for the SMA. 10 | The values need to be given in scaled reflectance (scale factor 10,000), i.e. the need to match the Level 2 ARD (see :ref:`level2-format`). 11 | 12 | The files should be without header, ended with an empty line, columns separated by white-space. 13 | There should be one column for each endmember. 14 | 15 | If you want to apply shade normalization (``SMA_SHD_NORM = TRUE``), the shade spectrum (photogrammetric zero or measured shade) needs to be in the last column. 16 | 17 | Note that you do not need to add a row of ones to apply the sum-to-one constraint. 18 | This is handled internally, if ``SMA_SUM_TO_ONE = TRUE``. 19 | 20 | There should be as many lines as there are overlapping bands for the chosen set of sensors (see :ref:`tsa-sensor`). 21 | 22 | Examples: 23 | 24 | * Generating a fraction time series based on ``SENSOR = LND04 LND05 LND07 LND08`` requires 6-band endmembers (Landsat legacy bands). 25 | 26 | * Generating a fraction time series based on ``SENSOR = LND08 SEN2A SEN2B`` requires 6-band endmembers (Landsat legacy bands). 27 | 28 | * Generating a fraction time series based on ``SENSOR = SEN2A SEN2B`` requires 10-band endmembers (Sentinel-2 land surface bands). 29 | 30 | * Generating a fraction time series based on ``SENSOR = sen2a sen2b`` requires 4-band endmembers (Sentinel-2 high-res bands). 31 | 32 | 33 | Example file (Landsat legacy bands using vegetation, soil, rock and shade endmembers): 34 | 35 | .. code-block:: bash 36 | 37 | 320 730 2620 0 38 | 560 1450 3100 0 39 | 450 2240 3340 0 40 | 3670 2750 4700 0 41 | 1700 4020 7240 0 42 | 710 3220 5490 0 43 | 44 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/tsa/param.rst: -------------------------------------------------------------------------------- 1 | .. _tsa-param: 2 | 3 | Parameterization 4 | ================ 5 | 6 | A parameter file is mandatory for the Time Series Analysis submodule of FORCE HLPS. 7 | 8 | All parameters must be given, even if they are not used. 9 | All parameters follow common tag-value notation. 10 | Rudimentary checks are performed when using this file. 11 | 12 | The following parameter descriptions are a print-out of ``force-parameter``, which can generate an empty parameter file skeleton. 13 | 14 | .. include:: ../../../_static/parameter-files/parameter_TSA.prm 15 | :code: shell 16 | 17 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/tsa/tsa-workflow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/tsa/tsa-workflow.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/tsa/tsa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/tsa/tsa.jpg -------------------------------------------------------------------------------- /docs/source/components/higher-level/txt/index.rst: -------------------------------------------------------------------------------- 1 | .. _txt: 2 | 3 | Texture Metrics 4 | =============== 5 | 6 | # About 7 | # A glimpse of what you get: 8 | # Fig. 9 | 10 | 11 | .. image:: txt-workflow.jpg 12 | 13 | **Figure** Processing workflow of the Texture Metrics submodule. 14 | 15 | 16 | .. toctree:: 17 | :maxdepth: 2 18 | 19 | param.rst 20 | format.rst 21 | 22 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/txt/param.rst: -------------------------------------------------------------------------------- 1 | .. _txt-param: 2 | 3 | Parameterization 4 | ================ 5 | 6 | A parameter file is mandatory for the Texture submodule of FORCE HLPS. 7 | 8 | All parameters must be given, even if they are not used. 9 | All parameters follow common tag-value notation. 10 | Rudimentary checks are performed when using this file. 11 | 12 | The following parameter descriptions are a print-out of ``force-parameter``, which can generate an empty parameter file skeleton. 13 | 14 | .. include:: ../../../_static/parameter-files/parameter_TXT.prm 15 | :code: shell 16 | 17 | -------------------------------------------------------------------------------- /docs/source/components/higher-level/txt/txt-workflow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/higher-level/txt/txt-workflow.jpg -------------------------------------------------------------------------------- /docs/source/components/lower-level/level1/L1AS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/lower-level/level1/L1AS.jpg -------------------------------------------------------------------------------- /docs/source/components/lower-level/level1/index.rst: -------------------------------------------------------------------------------- 1 | .. _l1as: 2 | 3 | Level 1 Archiving Suite 4 | ======================= 5 | 6 | Add more about information. 7 | 8 | The FORCE Level 1 Archiving Suite (FORCE L1AS) assists in organizing and maintaining a clean and consistent Level 1 data pool, as well as downloading of Sentinel-2 data. 9 | It is attempted to reduce redundancy and supports versioning, e.g. by removing old data if new processing versions are available. 10 | In addition, FORCE L1AS assists in building and updating the file queues needed for :ref:`l2ps`: 11 | 12 | 13 | .. image:: L1AS.jpg 14 | 15 | **Figure.** FORCE Level 1 Archiving Suite (L1AS) workflow. 16 | 17 | .. note:: 18 | | We reccomend using :ref:`level1-csd` for fast downloads of Sentinel-2 data from Google Cloud Storage, and :ref:`level1-landsat` for downloading Landsat data from the USGS. 19 | | As of ``FORCE v. 3.5`` :ref:`level1-sentinel2` is deprecated and will be removed in a future FORCE version. 20 | 21 | On successful ingestion, the image is appended to a :ref:`queue`, which controls Level 2 processing. 22 | The file queue is a text file that holds the full path to the image, as well as a processing-state flag. 23 | This flag is either ``QUEUED`` or ``DONE``, which means that it is enqueued for Level 2 processing or was already processed and will be ignored next time. 24 | 25 | 26 | +-------------------+-----------------------+-------------------------+--------------+ 27 | + :ref:`level1-csd` + :ref:`level1-landsat` + :ref:`level1-sentinel2` + :ref:`queue` + 28 | +-------------------+-----------------------+-------------------------+--------------+ 29 | 30 | 31 | .. toctree:: 32 | :maxdepth: 1 33 | :hidden: 34 | 35 | level1-csd.rst 36 | level1-landsat.rst 37 | level1-sentinel2.rst 38 | queue.rst 39 | 40 | -------------------------------------------------------------------------------- /docs/source/components/lower-level/level2/ARD-L2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/lower-level/level2/ARD-L2.jpg -------------------------------------------------------------------------------- /docs/source/components/lower-level/level2/L2PS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/lower-level/level2/L2PS.jpg -------------------------------------------------------------------------------- /docs/source/components/lower-level/level2/index.rst: -------------------------------------------------------------------------------- 1 | .. _l2ps: 2 | 3 | Level 2 Processing System 4 | ========================= 5 | 6 | The FORCE Level 2 Processing System (FORCE L2PS) generates harmonized, standardized, geometrically and radiometrically consistent Level 2 products with per-pixel quality information, i.e. Analysis Ready Data (ARD). 7 | 8 | For a description of the method, please refer to the :ref:`refs`, especially 9 | 10 | * http://doi.org/10.3390/rs11091124 11 | * http://doi.org/10.1109/TGRS.2016.2530856 12 | * http://doi.org/10.1016/j.rse.2018.04.046 13 | * http://doi.org/10.3390/rs10020352 14 | * http://doi.org/10.3390/rs11030257 15 | 16 | 17 | L2PS pulls each enqueued Level 1 image and processes it to ARD specification. 18 | This includes cloud and cloud shadow detection, potentially co-registration, radiometric correction and data cubing. 19 | 20 | Each image (box in Figure 1) is processed independently using multiprocessing and optionally multithreading. 21 | The pipeline is memory resident to minimize input/output (I/O), i.e. input data are read once, and only the final, gridded data products are written to disc. 22 | The data generated with this module are the main input for the :ref:`hlps` component. 23 | 24 | 25 | .. image:: L2PS.jpg 26 | 27 | **Figure 1.** FORCE Level 2 Processing System (L2PS) workflow. 28 | 29 | 30 | FORCE L2PS consists of two main executables: 31 | 32 | - for the majority of users, it is recommended to use :ref:`level2-bulk`. 33 | - some expert users may want to use :ref:`force-core` directly. 34 | 35 | 36 | **A glimpse of what you get:** 37 | 38 | .. image:: ARD-L2.jpg 39 | 40 | **Figure 2.** Data Cube of Landsat 7/8 and Sentinel-2 A/B Level 2 ARD. A two-month period of atmospherically corrected imagery acquired over South-East Berlin, Germany, is shown here. 41 | 42 | .. toctree:: 43 | :hidden: 44 | :maxdepth: 2 45 | 46 | level2.rst 47 | l2ps.rst 48 | param.rst 49 | format.rst 50 | depend.rst 51 | 52 | -------------------------------------------------------------------------------- /docs/source/components/lower-level/level2/l2ps.rst: -------------------------------------------------------------------------------- 1 | .. _level2-core: 2 | 3 | force-l2ps 4 | ========== 5 | 6 | The hidden workhorse of FORCE L2PS is ``force-l2ps``, which is a lower-level routine called from within :ref:`level2-bulk`. 7 | 8 | It processes one single image. 9 | For the majority of users, it is recommended to use force-level2 instead of directly calling ``force-l2ps``. 10 | However, for specific purposes (e.g. testing/debugging or or if you need/want to implement your own job scheduler), the expert user may want to use this program directly. 11 | 12 | Usage 13 | ^^^^^ 14 | 15 | .. code-block:: bash 16 | 17 | force-l2ps 18 | 19 | Usage: force-l2ps image-dir parameter-file 20 | 21 | * image-dir 22 | 23 | | The 1st argument is the directory that contains the image data. 24 | | In case of Landsat, the ``*.tar.gz`` archive needs to be extracted before processing. 25 | | In case of Sentinel-2, the ``*.zip`` archive needs to extracted before processing and either the ``.SAFE`` directory or one tile (directory) within the ``GRANULE`` directory must be given as input. 26 | 27 | * parameter-file 28 | 29 | | The :ref:`l2-param` needs to be given as second argument 30 | 31 | 32 | The direct usage of force-l2ps is recommended for debugging or for detailed output. 33 | The debugging mode also features extensive output where images for many processing steps are saved. 34 | Note that these images are intended for software development and do not necessarily have intuitive file names; metadata or projections are also not appended. 35 | If debug output is required, the software needs to be re-compiled, which should only be done by expert users. 36 | If DEBUG is activated, :ref:`level2-bulk` does not allow you to process multiple images or to use parallel processing (your system will be unresponsive because too much data is simultaneously written to the disc, and parallel calls to force-l2ps would overwrite the debugging images). 37 | 38 | For debugging, follow the steps outlined in the :ref:`install` section. 39 | -------------------------------------------------------------------------------- /docs/source/components/lower-level/level2/param.rst: -------------------------------------------------------------------------------- 1 | .. _l2-param: 2 | 3 | Parameter file 4 | ============== 5 | 6 | A parameter file is mandatory for FORCE L2PS. 7 | 8 | All parameters must be given, even if they are not used. 9 | All parameters follow common tag-value notation. 10 | Rudimentary checks are performed when using this file. 11 | 12 | The following parameter descriptions are a print-out of ``force-parameter``, which can generate an empty parameter file skeleton. 13 | 14 | 15 | .. include:: ../../../_static/parameter-files/parameter_LEVEL2.prm 16 | :code: shell 17 | 18 | -------------------------------------------------------------------------------- /docs/source/components/lower-level/wvdb/index.rst: -------------------------------------------------------------------------------- 1 | .. _wvdb: 2 | 3 | Water Vapor Database 4 | ==================== 5 | 6 | The FORCE Water Vapor Database (FORCE WVDB) component can be used to generate and maintain a water vapor database used for atmospheric correction of **Landsat** data in :ref:`l2ps`. 7 | 8 | The water vapor database is *not necessary for Sentinel-2* because water vapor can be estimated from the images themselves. 9 | 10 | The database holds water vapor values for the central coordinates of each WRS-2 frame. If available, day-specific values are used. If not, a monthly climatology is used instead. 11 | 12 | The uncertainty of using the climatology was assessed in this paper: 13 | Frantz, D., Stellmes, M., & Hostert, P. (2019). A Global MODIS Water Vapor Database for the Operational Atmospheric Correction of Historic and Recent Landsat Imagery. Remote Sensing, 11, 257. https://doi.org/10.3390/rs11030257 14 | 15 | 16 | **A glimpse of what you get:** 17 | 18 | .. image:: wvdb.gif 19 | 20 | **Figure** Global, and monthly water vapor climatology for each land-intersecting Landsat WRS-2 scene. 21 | 22 | +------------------+--------------------+ 23 | + :ref:`lut-modis` + :ref:`wvdb-format` + 24 | +------------------+--------------------+ 25 | 26 | .. toctree:: 27 | :hidden: 28 | :maxdepth: 2 29 | 30 | lut-modis.rst 31 | format.rst 32 | -------------------------------------------------------------------------------- /docs/source/components/lower-level/wvdb/wvdb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/components/lower-level/wvdb/wvdb.gif -------------------------------------------------------------------------------- /docs/source/contact.rst: -------------------------------------------------------------------------------- 1 | .. _contact: 2 | 3 | Contact 4 | ======= 5 | 6 | **Dr. David Frantz** 7 | 8 | | **Postal address:** 9 | | Humboldt-Universität zu Berlin 10 | | Geography Department 11 | | Earth Observation Lab 12 | | 10099 Berlin, Germany 13 | 14 | | **Homepage:** 15 | | `davidfrantz.github.io `_ 16 | 17 | | **e-Mail:** 18 | | david.frantz@uni-trier.de 19 | -------------------------------------------------------------------------------- /docs/source/force.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/force.png -------------------------------------------------------------------------------- /docs/source/history/index.rst: -------------------------------------------------------------------------------- 1 | .. _history: 2 | 3 | Version History 4 | =============== 5 | 6 | This section displays the changelogs for each published FORCE version. 7 | 8 | FORCE uses a three-level versioning scheme, e.g. v. 3.0.1. 9 | It is highly recommended to update once a new release is available. 10 | 11 | 12 | - 1st level = major release: 13 | Disruptive changes will result in a new major release. 14 | 15 | - 2nd level = major release: 16 | Major changes like completely new features will result in a new major release. 17 | 18 | - 3rd level = patch level: 19 | Incremental patches, additions, and bugfixes will result in a new patch level release. 20 | 21 | 22 | .. toctree:: 23 | :maxdepth: 2 24 | :caption: Releases 25 | :glob: 26 | :reversed: 27 | 28 | v1/* 29 | v2/* 30 | v3/v* 31 | vdev.rst 32 | -------------------------------------------------------------------------------- /docs/source/history/v1/v-01-00-00.rst: -------------------------------------------------------------------------------- 1 | .. _v100: 2 | 3 | FORCE v. 1.0 beta 4 | ================= 5 | 6 | Release: 07.10.2017 7 | 8 | - **First public release** 9 | -------------------------------------------------------------------------------- /docs/source/history/v2/v-02-01-00.rst: -------------------------------------------------------------------------------- 1 | .. _v210: 2 | 3 | FORCE v. 2.1.0 4 | ============== 5 | 6 | Release: 04.12.2018 7 | 8 | - **FORCE L2PS** 9 | 10 | - Bugfix: One line was missing in the parameter file generated by force-parameter-level2. You can now ignore the red comment in the 2.0 User Guide on p. 21. 11 | - Bugfix: There was a bug in a bugfix introduced in v. 2.0.. When creating datacubes (DO_REPROJ = TRUE and DO_TILE = TRUE), data were consistently missing in some areas at the South-East border of Sentinel-2 MGRS tiles. The occurence of this effect was dependent on the relative location of the MGRS tiles to the upper-left tile in the custom grid system. Should be all OK now. 12 | - Bugfix: The cloud cover percentage (and similar) in the metadata was not correct for tiles that are located at the intersection of different MGRS/WRS-2 frames. Only the numbers provided in the QAI product were correct. Is now correct for all products. 13 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-00-01.rst: -------------------------------------------------------------------------------- 1 | .. _v301: 2 | 3 | FORCE v. 3.0.1 4 | ============== 5 | 6 | Release: 12.03.2020 7 | 8 | - **FORCE HIGHER LEVEL** 9 | 10 | - in force-higher-level: 11 | 12 | fixed GDAL PAM warning messages. 13 | 14 | - in force-higher-level: 15 | 16 | fixed nodata warning messages when no processing mask is available in block. 17 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-01-00.rst: -------------------------------------------------------------------------------- 1 | .. _v310: 2 | 3 | FORCE v. 3.1.0 4 | ============== 5 | 6 | Release: 19.03.2020 7 | 8 | - **General changes** 9 | 10 | - Added a small bash script to compile with/without SPLITS. 11 | 12 | - Added a small bash script to compile in debug/production mode. 13 | 14 | - Updated the Makefile with the standard CURL path for both Ubuntu 16.04 LTS and 18.04 LTS. 15 | 16 | - **Docker support** 17 | 18 | - Gergely Padányi-Gulyás has contributed a Docker image! 19 | See :ref:`docker` for details. 20 | 21 | - **FORCE L2PS** 22 | 23 | - Fixed a bug when reading Landsat 7 metadata. 24 | Thanks to Gergely Padányi-Gulyás for reporting this. 25 | 26 | - Fixed a cosmetic issue, where a mkdir warning was displayed for existing directories. 27 | 28 | - **FORCE HIGHER LEVEL** 29 | 30 | - in force-higher-level, TSA sub-module, phenometrics: 31 | 32 | Added safety checks for ``LSP_DOY_PREV_YEAR`` and ``LSP_DOY_NEXT_YEAR`` in relation to the interpolation step ``INT_DAY`` and the hemisphere switch ``LSP_HEMISPHERE ``. 33 | Before, a critical memory error was possible. 34 | 35 | - in force-higher-level, TSA sub-module, phenometrics: 36 | 37 | Fixed an incorrect index that could cause a memory error. 38 | 39 | - in force-higher-level, TSA sub-module, phenometrics: 40 | 41 | Allowed negative integrals, e.g. when ``INDEX`` is Tasseled Cap Wetness or radar backscatter. 42 | 43 | - in force-higher-level, TSA sub-module, phenometrics: 44 | 45 | Allowed negative ``LSP_MIN_VALUE``. e.g. when ``INDEX`` is Tasseled Cap Wetness or radar backscatter. 46 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-01-01.rst: -------------------------------------------------------------------------------- 1 | .. _v311: 2 | 3 | FORCE v. 3.1.1 4 | ============== 5 | 6 | Release: 26.03.2020 7 | 8 | - **General changes** 9 | 10 | - Added a small bash script to increase the version number. 11 | 12 | - **FORCE HIGHER LEVEL** 13 | 14 | - in force-higher-level: 15 | 16 | fixed a small issue that prevented outlier detection if we have a very low data availability. 17 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-02-00.rst: -------------------------------------------------------------------------------- 1 | .. _v320: 2 | 3 | FORCE v. 3.2.0 4 | ============== 5 | 6 | Release: 08.04.2020 7 | 8 | - **FORCE HIGHER LEVEL** 9 | 10 | - in force-higher-level, Continuous Field ImproPhe sub-module: 11 | 12 | included a safety check when attempting to predict a year outside of the DATE_RANGE. Before, this caused a memory error. 13 | 14 | - in force-higher-level, both ImproPhe sub-modules: 15 | 16 | fixed a critical bug when no valid high-res pixel was found in a processing block. 17 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-02-01.rst: -------------------------------------------------------------------------------- 1 | .. _v321: 2 | 3 | FORCE v. 3.2.1 4 | ============== 5 | 6 | Release: 14.04.2020 7 | 8 | - **FORCE HIGHER LEVEL** 9 | 10 | - in force-higher-level: 11 | 12 | fixed a small issue when the processing mask included nodata values. 13 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-03-00.rst: -------------------------------------------------------------------------------- 1 | .. _v330: 2 | 3 | FORCE v. 3.3.0 4 | ============== 5 | 6 | Release: 24.06.2020 7 | 8 | - **FORCE WVDB** 9 | 10 | - Fixed a critical bug in force-lut-modis. 11 | 12 | An incorrect array index was used causing a memory error. 13 | Thanks to Hailu Hu for the bugfix. 14 | 15 | - **FORCE AUX** 16 | 17 | - In force-train: 18 | 19 | added a small fix that enables compilation with OpenCV-3.4.1 under CentOS-8 as suggested by github user kemnitzs. 20 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-05-01.rst: -------------------------------------------------------------------------------- 1 | .. _v351: 2 | 3 | FORCE v. 3.5.1 4 | ============== 5 | 6 | Release: 17.09.2020 7 | 8 | - **Docker changes** 9 | 10 | - Fegyi fixed an issue: files generated through docker were owned by root before. 11 | 12 | - **FORCE LEVEL 1 ARCHIVING SYSTEM** 13 | 14 | - Stefan Ernst fixed a small issue with the force-csd progress bar, as well as an issue when the end data wasn't defined. 15 | 16 | - **FORCE HIGHER LEVEL** 17 | 18 | - in force-higher-level, TSA sub-module, CAT analysis: 19 | There is another change parameter: loss = change / offset * 1000. 20 | The offset is the regression intercept of the linear trend applied to the full time series. 21 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-05-02.rst: -------------------------------------------------------------------------------- 1 | .. _v352: 2 | 3 | FORCE v. 3.5.2 4 | ============== 5 | 6 | Release: 05.10.2020 7 | 8 | - **FORCE LEVEL 1 ARCHIVING SYSTEM** 9 | 10 | - Stefan Ernst fixed some issues in force-csd. 11 | Added check for S2 duplicate scenes. 12 | Only the scenes with highest processing baseline and latest processing date is downloaded. 13 | Check for already downloaded S2 scenes does not rely on scene name column anymore, as old GCS folder names don't represent old file naming convention. 14 | Scene name for check is extracted from URL now. 15 | Added check for length of date string. 16 | Fixed problem with converting filesize of scenes from bytes to megabytes. 17 | Fixed rounding of reported data volume (no more changing of locale). 18 | gsutil does not create log files, check for downloaded data is handled by the script only. 19 | Files are downloaded following chronological order based on acquisition time. 20 | -k now saves filtered metadata to level1-datapool folder. 21 | 22 | - **FORCE AUX** 23 | 24 | - force-parameter now writes the polar-based phenology parameters into the TSA sekeleton. 25 | 26 | - **FORCE L2PS** 27 | 28 | - fixed a "cannot copy" bug when using the water vapor database when correcting Landsat data. 29 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-06-01.rst: -------------------------------------------------------------------------------- 1 | .. _v361: 2 | 3 | FORCE v. 3.6.1 4 | ============== 5 | 6 | Release: 16.12.2020 7 | 8 | - **FORCE L2PS** 9 | 10 | * USGS has sligtly changed the file format of Collection 2 data. 11 | 12 | - Collection 1: *.tar.gz containers 13 | - Collection 2: *.tar containers 14 | 15 | force-level2 now works with containers in tar.gz, tar, and zip format. 16 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-06-02.rst: -------------------------------------------------------------------------------- 1 | .. _v362: 2 | 3 | FORCE v. 3.6.2 4 | ============== 5 | 6 | Release: 04.01.2021 7 | 8 | - **General changes** 9 | 10 | * Fixed a linking problem when using python3.8. 11 | Thanks to Vincent Schut for suggesting a fix. 12 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-06-03.rst: -------------------------------------------------------------------------------- 1 | .. _v363: 2 | 3 | FORCE v. 3.6.3 4 | ============== 5 | 6 | Release: 11.01.2021 7 | 8 | - **General changes** 9 | 10 | - Versioned Docker images are now available again. 11 | Thanks to Fegyi for the hint. 12 | 13 | - A github action was implemented to test whether pushed code compiles and installs successfully. 14 | 15 | - **FORCE WVDB** 16 | 17 | - Updated force-lut-modis to work with GDAL 3.2. 18 | Some subdatasets are not visible anymore since this GDAL version. 19 | Added some code to make this work again. 20 | Thanks to Vincent Schut for suggesting a fix. 21 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-06-04.rst: -------------------------------------------------------------------------------- 1 | .. _v364: 2 | 3 | FORCE v. 3.6.4 4 | ============== 5 | 6 | Release: 17.03.2021 7 | 8 | - **General changes** 9 | 10 | - Docker (1/2): 11 | FORCE is now built from a base image that contains all the installation (davidfrantz/base_image). 12 | This makes building and testing way faster. 13 | 14 | - Docker (2/2): 15 | Fabian Lehmann considerably reduced the size of the Docker image. 16 | 17 | 18 | - **FORCE HIGHER LEVEL** 19 | 20 | - in force-higher-level, LSM sub-module: 21 | Franz Schug added a new metric: ``ARE``, which yields the pixel area of the foreground class. 22 | Note: this value is capped at 32767. 23 | 24 | - in force-higher-level, TSA sub-module: 25 | A segmentation fault occured when using the SAVI Index. 26 | This is now fixed. 27 | Thanks for Janos Steiner for reporting this issue. 28 | 29 | - in force-higher-level, TSA sub-module: 30 | Implemented the new kNDVI following Camps-Valls et al. 2021. 31 | Use with ``INDEX = kNDVI``. 32 | Sigma is fixed to 0.5*(NIR+RED). 33 | 34 | - **FORCE WVDB** 35 | 36 | - We updated the ready-to-use, global water vapor database. 37 | The dataset is comprised of daily global water vapor data for February 2000 to December 2020 for each land-intersecting Worldwide Reference System 2 (WRS-2) scene, as well as a monthly climatology that can be used if no daily value is available. 38 | The dataset is freely available at ``_. 39 | This dataset may relieve you of the burden to generate the water vapor database on your own. 40 | 41 | - **FORCE L2PS** 42 | 43 | - $BINDIR is now dynamically evaluated on runtime. 44 | For users, this should not make a difference. 45 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-06-05.rst: -------------------------------------------------------------------------------- 1 | .. _v365: 2 | 3 | FORCE v. 3.6.5 4 | ============== 5 | 6 | Release: 19.03.2021 7 | 8 | - **General changes** 9 | 10 | - GitHub discussions 11 | GitHub discussions is the new place for discussing and asking for help from the FORCE community. 12 | The Google group is not used anymore. 13 | 14 | - **FORCE L2PS** 15 | 16 | - fixed bug introduced with 3.6.4 17 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-07-01.rst: -------------------------------------------------------------------------------- 1 | .. _v371: 2 | 3 | FORCE v. 3.7.1 4 | ============== 5 | 6 | Release: 11.10.2021 7 | 8 | - **General changes** 9 | 10 | - Added debug Docker image 11 | 12 | 13 | - **FORCE WVDB** 14 | 15 | - Added constraints to prevent download attempts of future data. 16 | Thanks to Florian Katerndahl for noticing and working on this issue. 17 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-07-02.rst: -------------------------------------------------------------------------------- 1 | .. _v372: 2 | 3 | FORCE v. 3.7.2 4 | ============== 5 | 6 | Release: 20.10.2021 7 | 8 | - **FORCE L2PS** 9 | 10 | - ESA made major changes in their Sentinel-2 products, which will become effective as of October 26, 2021. 11 | Specifically, ESA introduced additive scaling factors to convert the DNs to TOA reflectance. 12 | Older FORCE versions will fail! 13 | Update to FORCE >= 3.7.2! 14 | Thanks to Vincent Schut and Patrick Griffiths for the heads-up! 15 | 16 | - **General changes** 17 | 18 | - Docker containers will only be published to Docker Hub, if working in the original repository. 19 | This solves failed GitHub Actions for users that have forked the repository. 20 | Thanks to Florian Katerndahl for implementing a fix! 21 | 22 | - **New Program** 23 | 24 | - There is now a new program ``force-cube-init``, which can generate a ``datacube-definition.prj`` file without needing to process Level 2 data. 25 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-07-03.rst: -------------------------------------------------------------------------------- 1 | .. _v373: 2 | 3 | FORCE v. 3.7.3 4 | ============== 5 | 6 | Release: 01.11.2021 7 | 8 | - **FORCE L2PS** 9 | 10 | - The fix for ESA baseline 4.0 in v. 3.7.2 introduced an issue for old/current processsing baselines. 11 | This is fixed now, backwards compatibility is given again. 12 | Thanks to Vincent Schut for noticing. 13 | 14 | - The multi-parameter based resolution merge option caused segfaults in some images. 15 | This is fixed now, ``RES_MERGE = REGRESSION`` is now safe to use. 16 | Thanks to J. Antonio Guzmán Q. for reporting this issue. 17 | In addition, this method lacked multithreading, which is no implemented, too. 18 | 19 | - **FORCE HLPS** 20 | 21 | - in force-higher-level, all sub-modules: 22 | Implemented updates for enhancing the material-specific spectral adjustment. 23 | Thanks to Daniel Scheffler for discussion, testing and help on porting. 24 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-07-04.rst: -------------------------------------------------------------------------------- 1 | .. _v374: 2 | 3 | FORCE v. 3.7.4 4 | ============== 5 | 6 | Release: 12.11.2021 7 | 8 | - **FORCE L1AS** 9 | 10 | - Stefan Ernst fixed some issues in force-level1-csd regarding checks for coorindate ranges and quotes. 11 | 12 | - **FORCE HLPS** 13 | 14 | - in force-higher-level, all sub-modules: 15 | Implemented a fix to prevent a segfault when we have many good cluster in the 16 | spectral adjustment. 17 | 18 | - **FORCE AUX** 19 | 20 | - fixed an error in ``force-tile-extent``, which still used the *old* syntax of 21 | ``force-cube`` in its call. 22 | Thanks to Fabian Thiel for the notification. 23 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-07-05.rst: -------------------------------------------------------------------------------- 1 | .. _v375: 2 | 3 | FORCE v. 3.7.5 4 | ============== 5 | 6 | Release: 04.01.2022 7 | 8 | - **FORCE HLPS** 9 | 10 | - in force-higher-level, TSA sub-module: 11 | Added a fix to prevent truncation of the Chlorophyll Index red-edge (Clre) index. 12 | Thanks to Dirk Pflugmacher for the notification. 13 | 14 | - in force-higher-level, ML sub-module: 15 | Fixed a bug that resulted in a segfault when using RF classification, but 16 | not with RF probability output. 17 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-07-06.rst: -------------------------------------------------------------------------------- 1 | .. _v376: 2 | 3 | FORCE v. 3.7.6 4 | ============== 5 | 6 | Release: 14.02.2022 7 | 8 | - **General** 9 | 10 | - Landsat 9 support has been implemented for Level 2 and Higher Level Processing. 11 | 12 | - Level 2: processing a Landsat 9 image is the same as processing Landsat 8 13 | - Higher Level: a new sensor tag has been added: ``LND09`` 14 | 15 | - **FORCE HLPS** 16 | 17 | - in ``force-higher-level``, UDF sub-module: 18 | Fixed a bug that occured when using long time series. 19 | An integer overflow occured in the indexing variable when copying data from the 20 | C arrays to Python objects. 21 | 22 | - in ``force-higher-level``, feature-based sub-modules: 23 | Fixed a bug that occured when using many features of the same multiband image. 24 | Before, there was a 1024 character limitation for reading lines from the parameter file. 25 | This was now increased to 65536 characters. 26 | Thanks to Jan Hemmerling for reporting this issue. 27 | 28 | - in ``force-higher-level``, TSA sub-module: 29 | Daniel Scheffler fixed a bug in MSRre-like indices to prevent truncation. 30 | 31 | - **FORCE L2PS** 32 | 33 | - added some new plots to ``force-level2-report`` and fixed the issue of "empty" sensors. 34 | 35 | 36 | - **FORCE L1AS** 37 | 38 | - Stefan Ernst fixed an issue in ``force-level1-csd`` that coordinates were reversed when using vector geometries as AOI. 39 | Instead of WFS-querying a remote server, a local copy of the MGRS/WRS-2 grids will be downloaded now. 40 | 41 | - **FORCE AUX** 42 | 43 | - ``force-procmask`` was changed to Unix-Stype usage. 44 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-07-07.rst: -------------------------------------------------------------------------------- 1 | .. _v377: 2 | 3 | FORCE v. 3.7.7 4 | ============== 5 | 6 | Release: 03.03.2022 7 | 8 | - **FORCE L2PS** 9 | 10 | - Some smaller parts of S2 imagery on the left side of the swath were set to nodata. 11 | This version improves the angle parsing of the Sentinel-2 metadata. 12 | Thanks to Fabian Thiel for noting this issue. 13 | 14 | - **FORCE AUX** 15 | 16 | - ``force-procmask``: small fix when -d is given 17 | 18 | - ``force-synthmix`` in Docker stopped working at some point due to changes in the Docker base image. 19 | The python shebang was adapted to account for that. 20 | Thanks to Fabian Thiel for noting this issue. 21 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-07-10.rst: -------------------------------------------------------------------------------- 1 | .. _v3710: 2 | 3 | FORCE v. 3.7.10 4 | ============== 5 | 6 | Release: 16.11.2022 7 | 8 | 9 | - **General** 10 | 11 | - Added a new parameter to L2PS and HLPS to output provenance traces into a designated directory: 12 | ``DIR_PROVENANCE``. 13 | There is still one issue to solve in the future: 14 | in HLPS, the provenance table wont be generated if blocks are skipped at the top of the file, e.g. when masks are used. 15 | 16 | - **FORCE L1AS** 17 | 18 | - Stefan Ernst improved sanity checks in force-level1-csd. 19 | 20 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-07-11.rst: -------------------------------------------------------------------------------- 1 | .. _v3711: 2 | 3 | FORCE v. 3.7.11 4 | =============== 5 | 6 | Release: 01.07.2023 7 | 8 | 9 | - **FORCE HLPS** 10 | 11 | - in ``force-higher-level``, TSA sub-module: 12 | fixed a bug that resulted in incorrect quantiles (STM QXX metrics). 13 | This occured when duplicate values existed, which can happen when a kernel filtering method (interpolation) is 14 | used to extrapolate values in the off-season where no bracketing observations exist. 15 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-07-12.rst: -------------------------------------------------------------------------------- 1 | .. _v3712: 2 | 3 | FORCE v. 3.7.12 4 | =============== 5 | 6 | Release: 09.11.2023 7 | 8 | 9 | - **FORCE L2PS/HLPS** 10 | 11 | - Ongoing problems with the quantile function were hopefully fixed for good. 12 | The function still had problems when a large amount of singular values occured. 13 | Switched over to a GSL implementation, though memory might slightly increase. 14 | 15 | -------------------------------------------------------------------------------- /docs/source/history/v3/v-03-08-01.rst: -------------------------------------------------------------------------------- 1 | .. _v3800: 2 | 3 | FORCE v. 3.8.01 4 | =============== 5 | 6 | Release: 20.02.2025 7 | 8 | 9 | - **FORCE HLPS** 10 | 11 | - Fixed a bug when attempting to use Sentinel-2C/D due to some 12 | typos in the sensor enum definition. 13 | Thanks to Kasia Lewinska for pointing me in this direction. 14 | 15 | - **FORCE AUX** 16 | 17 | - Florian Katerndahl added a safety check to ``force-cube``, as well as 18 | ``force-tile-extent`` to throw a warning when no features are present 19 | in a vector layer. Thanks! 20 | 21 | -------------------------------------------------------------------------------- /docs/source/history/vdev.rst: -------------------------------------------------------------------------------- 1 | .. _vdev: 2 | 3 | Develop version 4 | =============== 5 | 6 | No further changes yet. 7 | -------------------------------------------------------------------------------- /docs/source/howto/img/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/Thumbs.db -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-coreg-animation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-coreg-animation.gif -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-coreg-base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-coreg-base.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-coreg-shift.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-coreg-shift.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-coreg-ts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-coreg-ts.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-datacube-google-grid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-datacube-google-grid.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-datacube-mosaic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-datacube-mosaic.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-datacube-scheme.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-datacube-scheme.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-l1csd-s2grid-berlin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-l1csd-s2grid-berlin.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-l1csd-syntax.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-l1csd-syntax.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-l1sen2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-l1sen2.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-l2-ard-cpu-ram-l2-bad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-l2-ard-cpu-ram-l2-bad.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-l2-ard-cpu-ram-l2-good.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-l2-ard-cpu-ram-l2-good.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-l2-ard-l2ps.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-l2-ard-l2ps.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-l2-ard-results.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-l2-ard-results.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-lcf-cso.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-lcf-cso.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-lcf-lib.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-lcf-lib.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-lcf-mix-s2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-lcf-mix-s2.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-lcf-mix-stm-complexity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-lcf-mix-stm-complexity.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-lcf-mix-stm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-lcf-mix-stm.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-lcf-ml.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-lcf-ml.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-lcf-smp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-lcf-smp.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-lcf-stm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-lcf-stm.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-lcf-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-lcf-workflow.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-mask-raster.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-mask-raster.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-mask-vector.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-mask-vector.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-qai-avg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-qai-avg.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-qai-bfr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-qai-bfr.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-qai-boa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-qai-boa.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-qai-cld.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-qai-cld.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-qai-ovv.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-qai-ovv.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-stm-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-stm-example.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-stm-qgis.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-stm-qgis.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-tsi-rbf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-tsi-rbf.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-tsi-rdp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-tsi-rdp.jpg -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-tsi-rtm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-tsi-rtm.gif -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-udf-dhi-hobi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-udf-dhi-hobi.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-udf-dhi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-udf-dhi.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-udf-dhi_deu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-udf-dhi_deu.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-udf-harmonic-zhu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-udf-harmonic-zhu.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-udf-harmonic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-udf-harmonic.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-udf-medoid-flood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-udf-medoid-flood.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-udf-medoid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-udf-medoid.png -------------------------------------------------------------------------------- /docs/source/howto/img/tutorial-udf-repo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/img/tutorial-udf-repo.png -------------------------------------------------------------------------------- /docs/source/howto/profile/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/profile/Thumbs.db -------------------------------------------------------------------------------- /docs/source/howto/profile/arabe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/profile/arabe.jpg -------------------------------------------------------------------------------- /docs/source/howto/profile/dfrantz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/profile/dfrantz.jpg -------------------------------------------------------------------------------- /docs/source/howto/profile/fschug.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/profile/fschug.jpg -------------------------------------------------------------------------------- /docs/source/howto/profile/sernst.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/howto/profile/sernst.jpg -------------------------------------------------------------------------------- /docs/source/img/force-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/img/force-logo.png -------------------------------------------------------------------------------- /docs/source/img/force-udf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/docs/source/img/force-udf.png -------------------------------------------------------------------------------- /docs/source/policy/citation.rst: -------------------------------------------------------------------------------- 1 | .. _citation: 2 | 3 | Citation and Acknowledgement 4 | ============================ 5 | 6 | Proper acknowledgement, and the citation of the scientific publications are kindly requested. 7 | Co-authorship of scientific articles should be offered in case I provide substantial help in setting up, modifying or running the software, or if the generated data are an integral part of your research. 8 | 9 | Please address questions to David Frantz, Humboldt-University Berlin (david.frantz@uni-trier.de). 10 | 11 | I will try my best to answer your query within a reasonable amount of time. 12 | However, please note that I cannot guarantee user support or an immediate answer, as this is not part of my full-time job. 13 | 14 | For inquiries about the installation, please refer to the :ref:`install` section first; and if unsuccessful ask your administrator to set up the software before making contact. 15 | Inquiries about porting the code to non-supported operating systems, requesting a GUI, or similar requests will be ignored. 16 | 17 | Please read this user guide, as well as the scientific publications thoroughly before making any inquiries. 18 | -------------------------------------------------------------------------------- /docs/source/policy/development.rst: -------------------------------------------------------------------------------- 1 | .. _development: 2 | 3 | Development and Funding 4 | ======================= 5 | 6 | FORCE is primarily developed by David Frantz (:ref:`contact`). 7 | The software has emerged from my PhD research at `Trier University `_, supervised by `Prof. Dr. Joachim Hill `_, `online available `_. 9 | 10 | Many people have contributed to FORCE in one way or the other. 11 | Most prominently, these people are all the co-authors on the :ref:`refs` that are related to FORCE. 12 | Less prominantly, but not less important, these are many of my previous and current colleagues at the `ERSG `_ and `EOL `_ labs that have shaped the development of FORCE through our collaborative work and many on- or off-topic discussion. 13 | Starting with version 3.0, other people have actively developed code. Thanks to Franz Schug for providing the Landscape Metrics module. 14 | 15 | The development has been supported by several research projects: 16 | 17 | * Southern African Science Service Centre for Climate Change and Adaptive Land Management Project (SASSCAL), funded by the Federal Ministry of Education and Research under grant number FKZ-01LG1201C 18 | * Sentinel4GRIPS, funded by the Federal Ministry of Transport and Digital Infrastructure under grant number FKZ-50EW1605 19 | * Near-Real Time Derivation of Land Surface Phenology using Sentinel Data: the FORCE-NRT approach, funded by the Geo.X Research Network for Geosciences in Berlin and Potsdam under grant number SO_087_GeoX 20 | * Understanding the Role of Material Stock Patterns for the Transformation to a Sustainable Society (MAT_STOCKS), funded by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme under grant number 741950 21 | -------------------------------------------------------------------------------- /docs/source/setup/requirements.rst: -------------------------------------------------------------------------------- 1 | .. _requirements: 2 | 3 | Requirements 4 | ============ 5 | 6 | Hardware 7 | -------- 8 | 9 | FORCE is intended for mass processing of medium-resolution satellite image archives. 10 | Thus, the hardware requirements are closely tied to the data volume of the envisaged project (space / time), as well as to the type of sensor (RAM / storage requirements for Sentinel-2 are higher than Landsat 4-8). 11 | Although the framework can also be used to process single (or a few) images, we generally recommend to use multi-CPU server systems. 12 | FORCE is command line software; a GUI is not provided. 13 | 14 | It is advised to monitor RAM usage, and we recommend to decrease the number of CPUs if swapping occurs. 15 | The software installation itself is small, but the disk should be large enough for the envisaged project (commonly a couple of Terabytes); note that the software does not check for free space. 16 | Internet access is needed for some optional functionality. 17 | 18 | 19 | Operating system 20 | ---------------- 21 | 22 | The software was developed and tested under Ubuntu 12.04 LTS, 14.04 LTS, 16.04 LTS, and 18.04 LTS operating systems. 23 | Note that we do not provide support for migrating the code to any other OS. 24 | 25 | The code can also be installed in other Linux distributions, e.g. CentOS. 26 | However, installation instructions are only given for Ubuntu. 27 | 28 | FORCE can also be run with Docker (see :ref:`docker`). 29 | 30 | We were able to successfully install and run FORCE on the Windows 10 subsystem for Linux, too. 31 | This can be enabled in Windows developer mode (`see this blogpost `_). 32 | Please note that this procedure is in beta stage and might not be as stable as running FORCE on a real Linux system. 33 | 34 | -------------------------------------------------------------------------------- /example/tsi-plugin.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | def forcepy_tsi_init( ): 4 | 5 | bandnames = ['mean', 'sd', 'median'] 6 | 7 | return bandnames 8 | 9 | 10 | # pixel function 11 | def forcepy_tsi(args): 12 | ts, date, nodata = args 13 | 14 | m = np.mean(ts) 15 | s = np.std(ts) 16 | d = np.median(ts) 17 | 18 | return (m, s, d) 19 | -------------------------------------------------------------------------------- /images/force.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidfrantz/force/29f289fc2216ba5bebc9f033d798aa917e204b8f/images/force.png -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########################################################################## 4 | # 5 | # This file is part of FORCE - Framework for Operational Radiometric 6 | # Correction for Environmental monitoring. 7 | # 8 | # Copyright (C) 2013-2022 David Frantz 9 | # 10 | # FORCE is free software: you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation, either version 3 of the License, or 13 | # (at your option) any later version. 14 | # 15 | # FORCE is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | # 20 | # You should have received a copy of the GNU General Public License 21 | # along with FORCE. If not, see . 22 | # 23 | ########################################################################## 24 | 25 | # this script installs a fully-featured FORCE 26 | # this will only work if all dependencies are met, and if all paths and environments are properly defined as expected 27 | # admin rights required 28 | 29 | EXPECTED_ARGS=0 30 | 31 | # if wrong number of input args, stop 32 | if [ $# -ne $EXPECTED_ARGS ]; then 33 | echo "Usage: $(basename $0)" 34 | echo "" 35 | exit 1 36 | fi 37 | 38 | BIN="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 39 | 40 | cd $BIN 41 | 42 | ./debug.sh disable 43 | ./splits.sh enable 44 | 45 | make -j 46 | sudo make install 47 | 48 | make clean 49 | 50 | ./splits.sh disable 51 | 52 | exit 0 53 | -------------------------------------------------------------------------------- /misc/force-rstats-library.r: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env Rscript 2 | 3 | # This file is part of FORCE - Framework for Operational Radiometric 4 | # Correction for Environmental monitoring. 5 | # 6 | # Copyright (C) 2013-2024 David Frantz 7 | # 8 | # FORCE is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # FORCE is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with FORCE. If not, see . 20 | 21 | 22 | silent_library <- function(package) { 23 | suppressMessages(library(package, character.only = TRUE)) 24 | } 25 | 26 | exit_normal <- function(argument) { 27 | cat( 28 | sprintf("%s\n", argument) 29 | ) 30 | quit( 31 | save = "no", 32 | status = 0 33 | ) 34 | } 35 | 36 | exit_with_error <- function(argument) { 37 | cat( 38 | sprintf("%s\n", argument), 39 | file = stderr() 40 | ) 41 | usage(1) 42 | } 43 | 44 | file_existing <- function(path) { 45 | if (!file.exists(path)) { 46 | cat( 47 | sprintf("file %s does not exist\n", path), 48 | file = stderr() 49 | ) 50 | usage(1) 51 | } 52 | } 53 | 54 | print_version <- function(progdir) { 55 | path <- sprintf("%s/force-misc/force-version.txt", progdir) 56 | file_existing(path) 57 | path %>% 58 | readLines() %>% 59 | exit_normal() 60 | } 61 | -------------------------------------------------------------------------------- /misc/force-version.txt: -------------------------------------------------------------------------------- 1 | 3.8.01 2 | -------------------------------------------------------------------------------- /pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # a hook that is executed before each commmit on develop (locally) 4 | # 5 | # it ensures that a software version with time stamp 6 | # uniquely identifies each commmit 7 | # 8 | # note: will this cause merge conflicts when 9 | # collaborators change the version number or 10 | # version number is changed on GitHub? 11 | # 12 | # this script can be installed with: 13 | # ./pre-commit install 14 | 15 | 16 | if [ $# -eq 1 ] && [ "$1" == "install" ]; then 17 | cp "$0" -t .git/hooks/ 18 | exit 0 19 | fi 20 | 21 | FILE="misc/force-version.txt" 22 | 23 | if ! grep 'dev' "$FILE" &> /dev/null; then 24 | exit 0 25 | fi 26 | 27 | VERSION=$(sed -E 's/:::.*//' "$FILE") 28 | TIME=$(date -u +"%Y-%m-%d_%H:%M:%S") 29 | 30 | printf "%s:::%s\n" "$VERSION" "$TIME" > "$FILE" 31 | 32 | git add "$FILE" 33 | 34 | exit 0 35 | -------------------------------------------------------------------------------- /src/modules/aux-level/train-aux.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Ttraining machine learning models header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef TRAIN_ML_H 29 | #define TRAIN_ML_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | /** OpenCV **/ 35 | #include 36 | using namespace cv; 37 | using namespace cv::ml; 38 | 39 | #include "../cross-level/stats-cl.h" 40 | #include "../cross-level/read-cl.h" 41 | #include "../aux-level/param-train-aux.h" 42 | 43 | 44 | #ifdef __cplusplus 45 | extern "C" { 46 | #endif 47 | 48 | Ptr train_svm(Ptr TrainData, par_train_t *train, FILE *fp); 49 | Ptr train_rf(Ptr TrainData, par_train_t *train, FILE *fp); 50 | void class_priors(int *c_response, int n_sample, par_train_t *train); 51 | void predict_regression(float **features, float *response, Ptr model, int n_sample, int n_feature, FILE *fp); 52 | void predict_classification(float **features, int *response, Ptr model, int n_sample, int n_feature, FILE *fp); 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif 59 | 60 | -------------------------------------------------------------------------------- /src/modules/cross-level/alloc-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Allocation header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef ALLOC_CL_H 29 | #define ALLOC_CL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | #include // string handling functions 34 | 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | void alloc(void **ptr, size_t n, size_t size); 41 | void alloc_2D(void ***ptr, size_t n1, size_t n2, size_t size); 42 | void alloc_3D(void ****ptr, size_t n1, size_t n2, size_t n3, size_t size); 43 | void alloc_2DC(void ***ptr, size_t n1, size_t n2, size_t size); 44 | void re_alloc(void **ptr, size_t n_now, size_t n, size_t size); 45 | void re_alloc_2D(void ***ptr, size_t n1_now, size_t n2_now, size_t n1, size_t n2, size_t size); 46 | void re_alloc_3D(void ****ptr, size_t n1_now, size_t n2_now, size_t n3_now, size_t n1, size_t n2, size_t n3, size_t size); 47 | void re_alloc_2DC(void ***ptr, size_t n1_now, size_t n2_now, size_t n1, size_t n2, size_t size); 48 | void free_2D(void **ptr, size_t n); 49 | void free_3D(void ***ptr, size_t n1, size_t n2); 50 | void free_2DC(void **ptr); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /src/modules/cross-level/const-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Named constant definitions 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef CONSTANT_CL_H 29 | #define CONSTANT_CL_H 30 | 31 | #include "../cross-level/enum-cl.h" 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | // abbreviated datatypes 38 | typedef unsigned short int ushort; 39 | typedef unsigned char small; 40 | 41 | // coordinate struct 42 | typedef struct { 43 | double x, y; 44 | } coord_t; 45 | 46 | 47 | // pi 48 | #ifndef M_PI 49 | #define M_PI 3.14159265358979323846 50 | #endif 51 | 52 | // radians to degree conversion 53 | #define _R2D_CONV_ 57.29577951308232286465 54 | #define _D2R_CONV_ 0.01745329251994329547 55 | 56 | // compiler options 57 | //#define FORCE_CLOCK 58 | //#define FORCE_DEBUG 59 | //#define FORCE_DEV 60 | 61 | //#define ACIX 62 | //#define ACIX2 63 | //#define CMIX_FAS 64 | //#define CMIX_FAS_2 65 | 66 | #ifdef __cplusplus 67 | } 68 | #endif 69 | 70 | #endif 71 | 72 | -------------------------------------------------------------------------------- /src/modules/cross-level/datesys-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | System date header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef DATESYS_CL_H 29 | #define DATESYS_CL_H 30 | 31 | #include // core input and output functions 32 | #include // common mathematical functions 33 | #include // date and time handling functions 34 | 35 | #include "../cross-level/const-cl.h" 36 | #include "../cross-level/date-cl.h" 37 | 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | void current_date(date_t *d); 44 | void date_plus(date_t *d); 45 | void date_minus(date_t *d); 46 | int date_overshoot(date_t *d); 47 | int date_order(date_t *d_early, date_t *d_late); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | 55 | -------------------------------------------------------------------------------- /src/modules/cross-level/download-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Image methods header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef IMAGEFUNS_CL_H 29 | #define IMAGEFUNS_CL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../cross-level/dir-cl.h" 36 | 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | int download_file(char *f_remote, char *f_local, char *header); 43 | int download_pattern(char *d_local, char *pattern, char *header); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /src/modules/cross-level/gdalopt-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | GDAL options 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef GDALOPT_CL_H 29 | #define GDALOPT_CL_H 30 | 31 | #include // core input and output functions 32 | #include // boolean data type 33 | #include // string handling functions 34 | 35 | #include "../cross-level/const-cl.h" 36 | #include "../cross-level/read-cl.h" 37 | 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | typedef struct { 44 | char driver[NPOW_04]; // GDAL driver short name 45 | char extension[NPOW_04]; // file extension 46 | char option[NPOW_06][NPOW_10]; // GDAL output options 47 | int n; // number of GDAL output options 48 | } gdalopt_t; 49 | 50 | void default_gdaloptions(int format, gdalopt_t *gdalopt); 51 | void update_gdaloptions_blocksize(int format, gdalopt_t *gdalopt, int cx, int cy); 52 | void parse_gdaloptions(char *fname, gdalopt_t *gdalopt); 53 | void print_gdaloptions(gdalopt_t *gdalopt); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif 60 | 61 | -------------------------------------------------------------------------------- /src/modules/cross-level/konami-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Konami code header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef KONAMI_CL_H 29 | #define KONAMI_CL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | #include // string handling functions 34 | #include // date and time handling functions 35 | 36 | #include "../cross-level/const-cl.h" 37 | 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | void konami_args(char *arg); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /src/modules/cross-level/lock-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Lockfiles header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef LOCK_CL_H 29 | #define LOCK_CL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | char *lock_file(char *fname, int timeout); 40 | void unlock_file(char *lock); 41 | double lock_timeout(size_t bytes); 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif 48 | 49 | -------------------------------------------------------------------------------- /src/modules/cross-level/pca-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | PCA header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef PCA_CL_H 29 | #define PCA_CL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | #include // boolean data type 34 | 35 | #include "../cross-level/const-cl.h" 36 | #include "../cross-level/alloc-cl.h" 37 | 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | float **pca(short **INP, small *mask_, int nb, int nc, short nodata, float minvar, int *newnb); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /src/modules/cross-level/queue-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | First-In-First-Out header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef QUEUE_CL_H 29 | #define QUEUE_CL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../cross-level/alloc-cl.h" 36 | 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | typedef struct { 43 | short *buf_x; 44 | short *buf_y; 45 | int head; 46 | int tail; 47 | int size; 48 | } queue_t; 49 | 50 | int create_queue(queue_t *q, int size); 51 | void destroy_queue(queue_t* q); 52 | int enqueue(queue_t *q, int x, int y); 53 | int dequeue(queue_t *q, int *x, int *y); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif 60 | 61 | -------------------------------------------------------------------------------- /src/modules/cross-level/read-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Reading all-purpose files 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef READ_CL_H 29 | #define READ_CL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | #include // string handling functions 34 | 35 | #include "../cross-level/const-cl.h" 36 | #include "../cross-level/alloc-cl.h" 37 | #include "../cross-level/string-cl.h" 38 | 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | double **read_table_deprecated(char *fname, int *nrows, int *ncols); 45 | char ***read_tagvalue(char *fname, int *nrows); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/modules/cross-level/string-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | String handling header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef STRING_CL_H 29 | #define STRING_CL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | #include // string handling functions 34 | #include // macro constants of the integer types 35 | #include // error numbers 36 | 37 | #include "../cross-level/const-cl.h" 38 | #include "../cross-level/alloc-cl.h" 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | void copy_string(char *dst, size_t size, const char *src); 45 | void concat_string_2(char *dst, size_t size, const char *src1, const char *src2, const char *delim); 46 | void concat_string_3(char *dst, size_t size, const char *src1, const char *src2, const char *src3, const char *delim); 47 | void replace_string(char *src, const char *search, const char *replace, size_t src_len); 48 | int char_to_int(const char *src, int *val); 49 | int char_to_float(const char *src, float *val); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /src/modules/cross-level/sun-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Sun position header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef SUN_CL_H 29 | #define SUN_CL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | #include // common mathematical functions 34 | 35 | #include "../cross-level/const-cl.h" 36 | #include "../cross-level/date-cl.h" 37 | 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | float doy2dsun(int doy); 44 | float sunJC(int year, int month, int day, float timenow); 45 | float sunGeomMeanLong(float t); 46 | float sunGeomMeanAnomaly(float t); 47 | float sunEccentricityEarthOrbit(float t); 48 | float sunEqOfCenter(float t); 49 | float sunTrueLong(float t); 50 | float sunTrueAnomaly(float t); 51 | float sunRadVector(float t); 52 | float sunApparentLong(float t); 53 | float sunMeanObliquityOfEcliptic(float t); 54 | float sunObliquityCorrection(float t); 55 | float sunRtAscension(float t); 56 | float sunDeclination(float t); 57 | float sunEquationOfTime(float t); 58 | float sunHourAngle(float time, float longitude, float eqtime); 59 | void sunpos(float latitude, float longitude, date_t date, float *zen, float *azi); 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif 66 | 67 | -------------------------------------------------------------------------------- /src/modules/cross-level/sys-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | System info header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef SYS_CL_H 29 | #define SYS_CL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | #include // string handling functions 34 | 35 | #include "../cross-level/const-cl.h" 36 | #include "../cross-level/string-cl.h" 37 | #include "../cross-level/alloc-cl.h" 38 | #include "../cross-level/dir-cl.h" 39 | 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | char **system_info(int *n); 46 | void get_install_path(char *buf, size_t size); 47 | void get_install_directory(char *buf, size_t size); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | 55 | -------------------------------------------------------------------------------- /src/modules/cross-level/tile-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Tiling header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef TILE_CL_H 29 | #define TILE_CL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../cross-level/cube-cl.h" 36 | 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | int tile_readlist(char *f_tile, int **X, int **Y, int *k); 43 | int tile_allowlisted(int *allow_x, int *allow_y, int allow_k, int x, int y); 44 | int tile_active(char *f_tile, cube_t *cube); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /src/modules/cross-level/vector-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2025 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Vector header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef VECTOR_CL_H 29 | #define VECTOR_CL_H 30 | 31 | #include // core input and output functions 32 | #include // string handling functions 33 | 34 | #include "gdal.h" // public (C callable) GDAL entry points 35 | 36 | #include "../cross-level/const-cl.h" 37 | #include "../cross-level/brick-cl.h" 38 | 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | GDALDatasetH warp_vector_from_disc(char *input_path, const char *proj); 45 | brick_t *rasterize_vector_from_memory(GDALDatasetH vector_dataset, brick_t *destination_brick); 46 | brick_t *rasterize_vector_from_disc(char *input_path, brick_t *destination_brick); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /src/modules/cross-level/warp-cl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Warp header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef WARP_CL_H 29 | #define WARP_CL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | int warp_geo_to_any(double srs_x, double srs_y, double *dst_x, double *dst_y, char *dst_wkt); 42 | int warp_any_to_geo(double srs_x, double srs_y, double *dst_x, double *dst_y, char *src_wkt); 43 | int warp_any_to_any(double srs_x, double srs_y, double *dst_x, double *dst_y, char *src_wkt, char *dst_wkt); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /src/modules/higher-level/cf-improphe-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Continuous Field ImproPhe header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef CFIMP_HL_H 29 | #define CFIMP_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../cross-level/pca-cl.h" 36 | #include "../cross-level/cite-cl.h" 37 | #include "../higher-level/read-ard-hl.h" 38 | #include "../higher-level/improphe-hl.h" 39 | 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | typedef struct { 46 | short ***imp_; 47 | } cfi_t; 48 | 49 | brick_t **confield_improphe(ard_t *ard_hr, ard_t *ard_mr, brick_t *mask, int nt_hr, int nt_mr, par_hl_t *phl, cube_t *cube, int *nproduct); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /src/modules/higher-level/cso-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | CSO Processing header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef CSO_HL_H 29 | #define CSO_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../cross-level/string-cl.h" 36 | #include "../cross-level/cite-cl.h" 37 | #include "../cross-level/brick-cl.h" 38 | #include "../cross-level/stats-cl.h" 39 | #include "../higher-level/param-hl.h" 40 | #include "../higher-level/read-ard-hl.h" 41 | 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | typedef struct { 48 | short **cso_[NPOW_08]; 49 | date_t *d_cso; 50 | } cso_t; 51 | 52 | brick_t **clear_sky_observations(ard_t *ard, brick_t *mask, int nt, par_hl_t *phl, cube_t *cube, int *nproduct); 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif 59 | 60 | -------------------------------------------------------------------------------- /src/modules/higher-level/fold-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Folding time series header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef FOLD_HL_H 29 | #define FOLD_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../higher-level/param-hl.h" 35 | #include "../higher-level/tsa-hl.h" 36 | 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | int tsa_fold(tsa_t *ts, small *mask_, int nc, int ni, short nodata, par_hl_t *phl); 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /src/modules/higher-level/improphe-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | ImproPhe header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef IMP_HL_H 29 | #define IMP_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../cross-level/stats-cl.h" 36 | #include "../higher-level/read-ard-hl.h" 37 | 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | int improphe(float **hr_, float *hr_tex_, float **mr_, float **mr_tex_, short **pred_, float **KDIST, float nodata_hr, short nodata_mr, int i, int j, int p, int nx, int ny, int h, int nb_hr, int nb_mr, int nk, int mink); 44 | double rescale_weight(double weight, double minweight, double maxweight); 45 | short **average_season(ard_t *ard, small *mask_, int nb, int nc, int nt, short nodata, int nwin, int *dwin, int ywin, bool *is_empty); 46 | int standardize_float(float *data, float nodata, int nc); 47 | float *focal_sd(float **DAT, float nodata, int h, int nx, int ny, int nb, int bstart); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | 55 | -------------------------------------------------------------------------------- /src/modules/higher-level/index-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Spectral index header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef INDEX_HL_H 29 | #define INDEX_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/cite-cl.h" 35 | #include "../higher-level/read-ard-hl.h" 36 | #include "../higher-level/param-hl.h" 37 | #include "../higher-level/tsa-hl.h" 38 | 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | int tsa_spectral_index(ard_t *ard, tsa_t *ts, small *mask_, int nc, int nt, int idx, short nodata, par_tsa_t *tsa, par_sen_t *sen, aux_emb_t *endmember); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /src/modules/higher-level/interpolate-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Time series interpolation header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef TS_INTERPOL_HL_H 29 | #define TS_INTERPOL_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/cite-cl.h" 35 | #include "../higher-level/param-hl.h" 36 | #include "../higher-level/tsa-hl.h" 37 | 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | typedef struct { 44 | int nk; 45 | int nbin; 46 | float **kernel; 47 | int *max_ce; 48 | int hbin; 49 | float *max_w; 50 | } rbf_t; 51 | 52 | int tsa_interpolation(tsa_t *ts, small *mask_, int nc, int nt, int nr, int ni, short nodata, par_tsi_t *tsi); 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif 59 | 60 | -------------------------------------------------------------------------------- /src/modules/higher-level/l2-improphe-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Level 2 ImproPhe header header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef L2IMP_HL_H 29 | #define L2IMP_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../cross-level/pca-cl.h" 36 | #include "../cross-level/cite-cl.h" 37 | #include "../higher-level/read-ard-hl.h" 38 | #include "../higher-level/improphe-hl.h" 39 | 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | typedef struct { 46 | short ***imp_; 47 | } l2i_t; 48 | 49 | brick_t **level2_improphe(ard_t *ard_hr, ard_t *ard_mr, brick_t *mask, int nt_hr, int nt_mr, par_hl_t *phl, cube_t *cube, int *nproduct); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /src/modules/higher-level/level3-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Level 3 Processing header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef LEVEL3_HL_H 29 | #define LEVEL3_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../cross-level/stats-cl.h" 36 | #include "../cross-level/cite-cl.h" 37 | #include "../higher-level/read-ard-hl.h" 38 | 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | typedef struct { 45 | short **bap; 46 | short **inf; 47 | short **scr; 48 | short **ovv; 49 | } level3_t; 50 | 51 | #include "../higher-level/bap-hl.h" 52 | 53 | brick_t **level3(ard_t *ard, ard_t *lsp, brick_t *mask, int nt, int nlsp, par_hl_t *phl, cube_t *cube, int *nproduct); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif 60 | 61 | -------------------------------------------------------------------------------- /src/modules/higher-level/lib-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Library completeness header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef LIBCOMPLETE_HL_H 29 | #define LIBCOMPLETE_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | 35 | #include "../cross-level/brick-cl.h" 36 | #include "../cross-level/string-cl.h" 37 | #include "../cross-level/stats-cl.h" 38 | #include "../higher-level/read-ard-hl.h" 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | typedef struct { 45 | double ***tab; // table 46 | int n; // number of tables 47 | int *ns; // number of samples 48 | int nf; // number of features 49 | bool scaled; // flag if table was cleaned 50 | double **mean; // mean per table and feature 51 | double **sd; // sd per table and feature 52 | } aux_lib_t; 53 | 54 | typedef struct { 55 | short **mae_; 56 | } lib_t; 57 | 58 | brick_t **library_completeness(ard_t *features, brick_t *mask, int nf, par_hl_t *phl, aux_lib_t *library, cube_t *cube, int *nproduct); 59 | 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | 64 | #endif 65 | 66 | -------------------------------------------------------------------------------- /src/modules/higher-level/ml-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Machine learning header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef ML_HL_H 29 | #define ML_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include 35 | 36 | #include "../cross-level/const-cl.h" 37 | #include "../cross-level/string-cl.h" 38 | #include "../cross-level/brick-cl.h" 39 | #include "../cross-level/stats-cl.h" 40 | #include "../higher-level/param-hl.h" 41 | #include "../higher-level/read-ard-hl.h" 42 | 43 | 44 | #ifdef __cplusplus 45 | extern "C" { 46 | #endif 47 | 48 | typedef struct { 49 | //std::vector> model; 50 | std::vector> rf_model; 51 | std::vector> sv_model; 52 | } aux_ml_t; 53 | 54 | typedef struct { 55 | short **mlp_; 56 | short **mli_; 57 | short **mlu_; 58 | short **rfp_; 59 | short **rfm_; 60 | } ml_t; 61 | 62 | brick_t **machine_learning(ard_t *features, brick_t *mask, int nf, par_hl_t *phl, aux_ml_t *mod, cube_t *cube, int *nproduct); 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | 68 | #endif 69 | 70 | -------------------------------------------------------------------------------- /src/modules/higher-level/polar-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Polarmetrics header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef POLAR_HL_H 29 | #define POLAR_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/cite-cl.h" 35 | #include "../higher-level/param-hl.h" 36 | #include "../higher-level/tsa-hl.h" 37 | 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | int tsa_polar(tsa_t *ts, small *mask_, int nc, int ni, short nodata, par_hl_t *phl); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /src/modules/higher-level/py-udf-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Python UDF plug-in header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef PYP_HL_H 29 | #define PYP_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../higher-level/tsa-hl.h" 35 | #include "../higher-level/udf-hl.h" 36 | 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | int register_python(par_hl_t *phl); 43 | void deregister_python(par_hl_t *phl); 44 | void init_pyp(ard_t *ard, tsa_t *ts, int submodule, char *idx_name, int nb, int nt, par_udf_t *udf); 45 | void term_pyp(par_udf_t *udf); 46 | int python_udf(ard_t *ard, udf_t *udf_, tsa_t *ts, small *mask_, int submodule, char *idx_name, int nx, int ny, int nc, int nb, int nt, short nodata, par_udf_t *udf, int cthread); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /src/modules/higher-level/quality-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Higher Level quality screening 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef QUALITY_HL_H 29 | #define QUALITY_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | #include // boolean data type 34 | 35 | #include "../cross-level/quality-cl.h" 36 | #include "../cross-level/brick-cl.h" 37 | #include "../higher-level/read-ard-hl.h" 38 | 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | int screen_qai(ard_t *ard, int nt, brick_t *mask, par_qai_t *qai_rule, int input_level); 45 | int screen_noise(ard_t *ard, int nt, brick_t *mask, par_qai_t *qai_rule); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif 52 | 53 | -------------------------------------------------------------------------------- /src/modules/higher-level/r-udf-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | R UDF plug-in header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef RSP_HL_H 29 | #define RSP_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../higher-level/tsa-hl.h" 35 | #include "../higher-level/udf-hl.h" 36 | 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | void register_rstats(par_hl_t *phl); 43 | void deregister_rstats(par_hl_t *phl); 44 | void init_rsp(ard_t *ard, tsa_t *ts, int submodule, char *idx_name, int nb, int nt, par_udf_t *udf); 45 | void term_rsp(par_udf_t *udf); 46 | int rstats_udf(ard_t *ard, udf_t *udf_, tsa_t *ts, small *mask_, int submodule, char *idx_name, int nx, int ny, int nc, int nb, int nt, short nodata, par_udf_t *udf, int cthread); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /src/modules/higher-level/read-aux-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Reading aux files 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef READAUX_HL_H 29 | #define READAUX_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../cross-level/stats-cl.h" 36 | #include "../cross-level/read-cl.h" 37 | #include "../higher-level/param-hl.h" 38 | #include "../higher-level/tsa-hl.h" 39 | #include "../higher-level/lib-hl.h" 40 | #include "../higher-level/ml-hl.h" 41 | #include "../higher-level/sample-hl.h" 42 | 43 | 44 | #ifdef __cplusplus 45 | extern "C" { 46 | #endif 47 | 48 | typedef struct { 49 | aux_emb_t endmember; 50 | aux_lib_t library; 51 | aux_ml_t ml; 52 | aux_smp_t sample; 53 | } aux_t; 54 | 55 | aux_t *read_aux(par_hl_t *phl); 56 | void free_aux(par_hl_t *phl, aux_t *aux); 57 | 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | 62 | #endif 63 | 64 | -------------------------------------------------------------------------------- /src/modules/higher-level/sample-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Sampling header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef SAMPLE_HL_H 29 | #define SAMPLE_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../higher-level/read-ard-hl.h" 36 | 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | typedef struct { 43 | double **tab; // table 44 | bool *visited; // sample already visited? 45 | int ns; // number of samples 46 | int nleft; // number of samples still to do 47 | int nr; // number of response variables 48 | } aux_smp_t; 49 | 50 | brick_t **sample_points(ard_t *features, brick_t *mask, int nf, par_hl_t *phl, aux_smp_t *smp, cube_t *cube, int *nproduct); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /src/modules/higher-level/spec-adjust-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Spectral adjustment header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef SPECHOMO_HL_H 29 | #define SPECHOMO_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../cross-level/brick-cl.h" 36 | #include "../cross-level/cite-cl.h" 37 | #include "../higher-level/param-hl.h" 38 | #include "../higher-level/read-ard-hl.h" 39 | 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | int spectral_adjust(ard_t *ard, brick_t *mask, int nt, par_hl_t *phl); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif 52 | 53 | -------------------------------------------------------------------------------- /src/modules/higher-level/standardize-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Standardizing time series header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef STANDARD_HL_H 29 | #define STANDARD_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../higher-level/param-hl.h" 35 | #include "../higher-level/tsa-hl.h" 36 | 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | int tsa_standardize(tsa_t *ts, small *mask_, int nc, int nt, int ni, short nodata, par_hl_t *phl); 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /src/modules/higher-level/stm-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Spectral temporal metrics header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef STM_HL_H 29 | #define STM_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/cite-cl.h" 35 | #include "../cross-level/stats-cl.h" 36 | #include "../higher-level/param-hl.h" 37 | #include "../higher-level/tsa-hl.h" 38 | 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | int tsa_stm(tsa_t *ts, small *mask_, int nc, int ni, short nodata, par_stm_t *stm); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /src/modules/higher-level/texture-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Texture header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef TEXTURE_HL_H 29 | #define TEXTURE_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../cross-level/brick-cl.h" 36 | #include "../higher-level/read-ard-hl.h" 37 | 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | typedef struct { 44 | short **ero_; 45 | short **dil_; 46 | short **opn_; 47 | short **cls_; 48 | short **grd_; 49 | short **tht_; 50 | short **bht_; 51 | } txt_t; 52 | 53 | brick_t **texture(ard_t *features, brick_t *mask, int nf, par_hl_t *phl, cube_t *cube, int *nproduct); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif 60 | 61 | -------------------------------------------------------------------------------- /src/modules/higher-level/trend-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Time series trends header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef TREND_HL_H 29 | #define TREND_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/cite-cl.h" 35 | #include "../higher-level/param-hl.h" 36 | #include "../higher-level/tsa-hl.h" 37 | 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | int tsa_trend(tsa_t *ts, small *mask_, int nc, short nodata, par_hl_t *phl); 44 | int tsa_cat(tsa_t *ts, small *mask_, int nc, short nodata, par_hl_t *phl); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /src/modules/higher-level/udf-hl.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | User-defined function header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef UDF_HL_H 29 | #define UDF_HL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../cross-level/brick-cl.h" 36 | #include "../higher-level/param-hl.h" 37 | #include "../higher-level/read-ard-hl.h" 38 | 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | typedef struct { 45 | short **pyp_; 46 | short **rsp_; 47 | } udf_t; 48 | 49 | #include "../higher-level/py-udf-hl.h" 50 | #include "../higher-level/r-udf-hl.h" 51 | 52 | brick_t **udf_plugin(ard_t *ard, brick_t *mask, int nt, par_hl_t *phl, cube_t *cube, int *nproduct); 53 | 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif 60 | 61 | -------------------------------------------------------------------------------- /src/modules/lower-level/acix-ll.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | ACIX header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef ACIX_LL_H 29 | #define ACIX_LL_H 30 | 31 | #include "../cross-level/const-cl.h" 32 | #include "../lower-level/param-ll.h" 33 | 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | #ifdef ACIX 40 | int parse_angledata_landsat(par_ll_t *pl2, int *ulx, int *uly, int *urx, int *ury, int *lrx, int *lry, int *llx, int *lly); 41 | #endif 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif 48 | 49 | -------------------------------------------------------------------------------- /src/modules/lower-level/atmo-ll.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Atmospheric correction header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef ATMO_LL_H 29 | #define ATMO_LL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../cross-level/string-cl.h" 36 | #include "../cross-level/brick-cl.h" 37 | #include "../cross-level/cube-cl.h" 38 | #include "../lower-level/param-ll.h" 39 | #include "../lower-level/atc-ll.h" 40 | #include "../lower-level/topo-ll.h" 41 | #include "../lower-level/radtran-ll.h" 42 | #include "../lower-level/brdf-ll.h" 43 | #include "../lower-level/gas-ll.h" 44 | #include "../lower-level/aod-ll.h" 45 | #include "../lower-level/cloud-ll.h" 46 | 47 | 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | brick_t **radiometric_correction(par_ll_t *pl2, meta_t *meta, int mission, atc_t *atc, cube_t *cube, brick_t *TOA, brick_t *QAI, brick_t *AOI, top_t *TOP, int *nprod); 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif 59 | 60 | -------------------------------------------------------------------------------- /src/modules/lower-level/brdf-ll.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | BRDF header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef BRDF_LL_H 29 | #define BRDF_LL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | #include // common mathematical functions 34 | 35 | #include "../cross-level/const-cl.h" 36 | #include "../cross-level/brick-cl.h" 37 | #include "../lower-level/sunview-ll.h" 38 | 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | int brdf_factor(brick_t *sun, brick_t *view, brick_t *cor, int g); 45 | float brdf_forward(float ti, float tv, float phi, float iso, float vol, float geo); 46 | void LiKernel(float hbratio, float brratio, float tantv, float tanti, float sinphi, float cosphi, float *result); 47 | void GetPhaang(float cos1, float cos2, float sin1, float sin2, float cos3, float *cosres, float *res,float *sinres); 48 | void GetpAngles(float brratio, float tan1, float *sinp, float *cosp, float *tanp); 49 | void GetDistance(float tan1, float tan2, float cos3,float *res); 50 | void GetOverlap(float hbratio, float distance, float cos1, float cos2, float tan1, float tan2, float sin3, float *overlap, float *temp); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /src/modules/lower-level/cloud-ll.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Cloud and cloud shadow header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef CLOUD_LL_H 29 | #define CLOUD_LL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | #include // boolean data type 34 | 35 | #include "../cross-level/const-cl.h" 36 | #include "../cross-level/quality-cl.h" 37 | #include "../cross-level/imagefuns-cl.h" 38 | #include "../cross-level/stats-cl.h" 39 | #include "../cross-level/cite-cl.h" 40 | #include "../lower-level/atc-ll.h" 41 | #include "../lower-level/param-ll.h" 42 | 43 | 44 | #ifdef __cplusplus 45 | extern "C" { 46 | #endif 47 | 48 | int detect_clouds(par_ll_t *pl2, int mission, atc_t *atc, brick_t *TOA, brick_t *DEM, brick_t *EXP, brick_t *QAI); 49 | int cloud_distance(brick_t *QAI, int nodata, short *DIST); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /src/modules/lower-level/coreg-ll.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Coregistration header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef COREG_LL_H 29 | #define COREG_LL_H 30 | 31 | #include // core input and output functions 32 | 33 | #include "../cross-level/const-cl.h" 34 | #include "../cross-level/brick-cl.h" 35 | #include "../cross-level/quality-cl.h" 36 | #include "../cross-level/cite-cl.h" 37 | #include "../lower-level/param-ll.h" 38 | #include "../lower-level/coregfuns-ll.h" 39 | 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | int coregister(int mission, par_ll_t *pl2, brick_t *TOA, brick_t *QAI); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif 52 | 53 | -------------------------------------------------------------------------------- /src/modules/lower-level/cube-ll.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Datacube header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef CUBE_LL_H 29 | #define CUBE_LL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/string-cl.h" 35 | #include "../cross-level/cube-cl.h" 36 | #include "../cross-level/tile-cl.h" 37 | #include "../cross-level/brick-cl.h" 38 | #include "../cross-level/quality-cl.h" 39 | #include "../lower-level/param-ll.h" 40 | #include "../lower-level/meta-ll.h" 41 | #include "../lower-level/equi7-ll.h" 42 | #include "../lower-level/glance7-ll.h" 43 | 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | int cube_level2(par_ll_t *pl2, meta_t *meta, cube_t *cube, brick_t **LEVEL2, int nprod); 50 | multicube_t *start_multicube(par_ll_t *pl2, brick_t *brick); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /src/modules/lower-level/equi7-ll.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Equi7 header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef EQUI7_CL_H 29 | #define EQUI7_CL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | #include // boolean data type 34 | 35 | #include "../cross-level/const-cl.h" 36 | #include "../cross-level/string-cl.h" 37 | #include "../cross-level/cite-cl.h" 38 | #include "../cross-level/brick-cl.h" 39 | #include "../lower-level/param-ll.h" 40 | 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | multicube_t *start_equi7cube(par_ll_t *pl2, brick_t *brick); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /src/modules/lower-level/glance7-ll.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | GLANCE header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef GLANCE7_CL_H 29 | #define GLANCE7_CL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../cross-level/string-cl.h" 36 | #include "../cross-level/brick-cl.h" 37 | #include "../lower-level/param-ll.h" 38 | 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | multicube_t *start_glance7cube(par_ll_t *pl2, brick_t *brick); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /src/modules/lower-level/read-ll.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Read Level 1 header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef READ_LL_H 29 | #define READ_LL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "cpl_conv.h" // various convenience functions for CPL 35 | #include "gdal.h" // public (C callable) GDAL entry points 36 | 37 | #include "../cross-level/const-cl.h" 38 | #include "../cross-level/brick-cl.h" 39 | #include "../cross-level/quality-cl.h" 40 | #include "../cross-level/sun-cl.h" 41 | #include "../cross-level/imagefuns-cl.h" 42 | #include "../cross-level/stats-cl.h" 43 | #include "../lower-level/param-ll.h" 44 | #include "../lower-level/meta-ll.h" 45 | #include "../lower-level/atc-ll.h" 46 | 47 | 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | int read_level1(meta_t *meta, int mission, brick_t *DN, par_ll_t *pl2); 53 | int bounds_level1(meta_t *meta, brick_t *DN, brick_t **QAI, par_ll_t *pl2); 54 | int impulse_noise_level1(meta_t *meta, brick_t *DN, brick_t *QAI, par_ll_t *pl2); 55 | int convert_level1(meta_t *meta, int mission, atc_t *atc, brick_t *DN, brick_t **toa, brick_t *QAI); 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | 63 | -------------------------------------------------------------------------------- /src/modules/lower-level/resmerge-ll.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Enhance spatial resolution header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef RESMERGE_LL_H 29 | #define RESMERGE_LL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | #include // boolean data type 34 | 35 | #include "../cross-level/const-cl.h" 36 | #include "../cross-level/quality-cl.h" 37 | #include "../cross-level/brick-cl.h" 38 | #include "../cross-level/imagefuns-cl.h" 39 | #include "../cross-level/cite-cl.h" 40 | 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | int resolution_merge(int mission, int resmerge, brick_t *TOA, brick_t *QAI); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /src/modules/lower-level/sunview-ll.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Sun/view geometry header 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef SUNVIEW_LL_H 29 | #define SUNVIEW_LL_H 30 | 31 | #include // core input and output functions 32 | #include // standard general utilities library 33 | 34 | #include "../cross-level/const-cl.h" 35 | #include "../cross-level/brick-cl.h" 36 | #include "../cross-level/quality-cl.h" 37 | #include "../cross-level/sun-cl.h" 38 | #include "../lower-level/meta-ll.h" 39 | #include "../lower-level/atc-ll.h" 40 | #include "../lower-level/acix-ll.h" 41 | 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | double standard_sunzenith(date_t *dmeta, double lat, double lon); 48 | int sun_target_view(par_ll_t *pl2, meta_t *meta, int mission, atc_t *atc, brick_t *QAI); 49 | int viewgeo(par_ll_t *pl2, brick_t *QAI, atc_t *atc); 50 | int view_angle(meta_t *meta, int mission, atc_t *atc, brick_t *QAI, int f, int e, int g); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /src/modules/lower-level/table-ll.h: -------------------------------------------------------------------------------- 1 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 | 3 | This file is part of FORCE - Framework for Operational Radiometric 4 | Correction for Environmental monitoring. 5 | 6 | Copyright (C) 2013-2022 David Frantz 7 | 8 | FORCE is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | FORCE is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with FORCE. If not, see . 20 | 21 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 22 | 23 | /**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | Global definition of tables 25 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/ 26 | 27 | 28 | #ifndef TABLE_H 29 | #define TABLE_H 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | extern const float _E0_[1991]; 36 | extern const float _AW_[1991]; 37 | extern const float _AO_[1991]; 38 | extern const float _WVL_[1991]; 39 | extern const int _WVL_DIM_; 40 | extern const int _RSR_START_LND04_; 41 | extern const int _RSR_START_LND05_; 42 | extern const int _RSR_START_LND07_; 43 | extern const int _RSR_START_LND08_; 44 | extern const int _RSR_START_LND09_; 45 | extern const int _RSR_START_SEN2A_; 46 | extern const int _RSR_START_SEN2B_; 47 | extern const int _RSR_START_SEN2C_; 48 | extern const int _RSR_START_SEN2D_; 49 | extern const float _RSR_[56][1991]; 50 | extern const int _RSR_DIM_; 51 | extern const int _AERO_WATERLIB_DIM_[2]; 52 | extern const float _AERO_WATERLIB_[26][491]; 53 | extern const int _AERO_LANDLIB_DIM_[2]; 54 | extern const float _AERO_LANDLIB_[34][1991]; 55 | 56 | float wavelength(int b_rsr); 57 | float E0(int b_rsr); 58 | 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | 63 | #endif 64 | 65 | -------------------------------------------------------------------------------- /src/tests/unity/version.txt: -------------------------------------------------------------------------------- 1 | v2.6.0 2 | 3 | --------------------------------------------------------------------------------