Coder Social home page Coder Social logo

tra's Introduction

TRA

This repository shows the source codes of the Time-series-based Reflectance Adjustment (TRA) approach. It includes two versions: one is MATLAB version (versionMATLAB directory); and the other is Windows C/C++ version, which is based on Windows 10 and Microsoft Visual Studio 2017 (or higher).


Windows C/C++ version

This version requires the installation of the HDF library (version 4.2.11) for reading the HLS product (HDF format). When you open TRA.sln, you need to check the configuration. Choose Release and x64, and then make sure:

(1) Use MFC in a Shared DLL;

(2) Use Multi-Bytes Character Set;

(3) Add the include and library directories of HDF;

(4) Add _CTR_SECURE_NO_WARMINGs into preprocessor.

More details about how to use this code are given in the How to use.PDF.

There are two functions for running TRA: one is for a single pixel and the other is for the MGRS tile.

(1) When running a single pixel, you need to define the path of L30 and S30 point data (CSV format) and the output path of fitted parameters (TXT format). The CSV file should be organized as nine columns (Year, DOY, Blue, Green, Red, NIR, SWIR1, SWIR2, and ClearFlag). The ClearFlag labeled as 1 means the clear-sky observation.

(2) When running an MGRS tile, you need to create the TXT file for all paths of the HLS L30 or S30 files (use the command: dir S30.hdf /s/b >pathS30.txt), and then define the paths of two TXT files and the output path of the HDF file with the fitted parameters.

MATLAB verison

This version currently can only run TRA for a single pixel. The script mainTRAtest shows an example of using the TRA functions (e.g. TRAmatch, TRAregression, TRAadjust). Notice that the remaining clouds removal in this version (TimeSeiresNoiseFilter) is different from that in Windows C/C++ version, which can provide better results.


If using this code, please cite the following paper:

Shang, R., Zhu, Z., 2019. Harmonizing Landsat 8 and Sentinel-2: A time-series-based reflectance adjustment approach. Remote Sensing of Environment. 235, 111439.

tra's People

Contributors

rongshangrs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.