Public | Automated Build

Last pushed: 5 days ago
Short Description
TERRA-REF flirIrCamera bin to geoTIFF conversion extractor for Clowder.
Full Description

FLIR Converter

This extractor processes binary files into PNG and TIFF files.

Input

  • Evaluation is triggered whenever a file is added to a dataset
  • Checks whether the file is a _ir.bin file

Output

  • The dataset containing the _ir file will get corresponding .png and .tif files
  • PNG file is a heatmap
  • TIF file consist of geospatial attributes and temperature in degree C in each pixel
  • If "calibrated" is "true" in metadata, this will use FlirRawToTemperature.m in degrees C, otherwise will consider raw data as 100 mk in unit

Docker

The Dockerfile included in this directory can be used to launch this extractor in a container.

Building the Docker image

docker build -f Dockerfile -t terra-ext-flir2tif .

Running the image locally

docker run \
  -p 5672 -p 9000 --add-host="localhost:{LOCAL_IP}" \
  -v /local/raw_data/folder:/home/extractor/sites/ua-mac/raw_data \
  -v /local/output/root/folder:/home/extractor/sites/ua-mac/Level_1/flir2tif \
  -e RABBITMQ_URI=amqp://{RMQ_USER}:{RMQ_PASSWORD}@localhost:5672/%2f \
  -e RABBITMQ_EXCHANGE=clowder \
  -e REGISTRATION_ENDPOINTS=http://localhost:9000/clowder/api/extractors?key={SECRET_KEY} \
  -e INFLUXDB_PASSWORD={INFLUX_PASS} \
  terra-ext-flir2tif

Note that by default RabbitMQ will not allow "guest:guest" access to non-local addresses, which includes Docker. You may need to create an additional local RabbitMQ user for testing.

Running the image remotely

docker run \
  -v /sites/ua-mac/raw_data:/home/extractor/sites/ua-mac/raw_data \
  -v /sites/ua-mac/Level_1/flir2tif:/home/extractor/sites/ua-mac/Level_1/flir2tif \
  -e RABBITMQ_URI=amqp://{RMQ_USER}:{RMQ_PASSWORD}@rabbitmq.ncsa.illinois.edu/clowder \
  -e RABBITMQ_EXCHANGE=terra \
  -e REGISTRATION_ENDPOINTS=http://terraref.ncsa.illinosi.edu/clowder//api/extractors?key={SECRET_KEY} \
  -e INFLUXDB_PASSWORD={INFLUX_PASS} \
  terra-ext-flir2tif

Dependencies

  • All the Python scripts syntactically support Python 2.7 and above. Please make sure that the Python in the running environment is in appropriate version.

  • All the Python scripts also rely on the third-party library including: PIL, scipy, numpy, matplotlib and osgeo.

Notice

  • flir_test.sh is an example of using this python script. using '-i' to indicates the input directory that contains of one day's flir data, using '-o' to indicates the output directory
Docker Pull Command
Owner
terraref