Skip to content
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.

Merging develop to master #2

Merged
merged 1 commit into from
Nov 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,40 @@

Stereo RGB Image Bin to GeoTIFF Converter.

### Sample Docker Command line
Below is a sample command line that shows how the bin2tif Docker image could be run.
An explanation of the command line options used follows.
Be sure to read up on the [docker run](https://docs.docker.com/engine/reference/run/) command line for more information.

```docker run --rm --mount "src=/home/test,target=/mnt,type=bind" agpipeline/bin2tif:2.0 --working_space "/mnt" --metadata "/mnt/08f445ef-b8f9-421a-acf1-8b8c206c1bb8_metadata_cleaned.json" "/mnt/08f445ef-b8f9-421a-acf1-8b8c206c1bb8_left.bin" ```

This example command line assumes the source files are located in the `/home/test` folder of the local machine.
The name of the image to run is `agpipeline/bin2tif:2.0`.

We are using the same folder for the source files and the output files.
By using multiple `--mount` options, the source and output files can be located in separate folders.

**Docker commands** \
Everything between 'docker' and the name of the image are docker commands.

- `run` indicates we want to run an image
- `--rm` automatically delete the image instance after it's run
- `--mount "src=/home/test,target=/mnt,type=bind"` mounts the `/home/test` folder to the `/mnt` folder of the running image

We mount the `/home/test` folder to the running image to make files available to the software in the image.

**Image's commands** \
The command line parameters after the image name are passed to the software inside the image.
Note that the paths provided are relative to the running image (see the --mount option specified above).

- `--working_space "/mnt"` specifies the folder to use as a workspace
- `--metadata "/mnt/08f445ef-b8f9-421a-acf1-8b8c206c1bb8_metadata.cleaned.json"` is the name of the source metadata to be cleaned
- `"/mnt/08f445ef-b8f9-421a-acf1-8b8c206c1bb8_left.bin"` is the name of the raw image to convert

# Original README
Below are the contents of the original README.md for the TERRA REF project.
It is included here as reference material for the history of this transformer.

## Authors:

* Zongyang Li, Donald Danforth Plant Science Center, St. Louis, MO
Expand Down
4 changes: 2 additions & 2 deletions transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ def add_parameters(parser: argparse.ArgumentParser) -> None:
help='saves the intermediate image file before it\'s saved as a geotiff')

# pylint: disable=unused-argument
def check_continue(transformer: transformer_class.Transformer, check_md: dict, transformer_md: dict, full_md: dict) -> list:
def check_continue(transformer: transformer_class.Transformer, check_md: dict, transformer_md: dict, full_md: dict) -> tuple:
"""Checks if conditions are right for continuing processing
Arguments:
transformer: instance of transformer class
Return:
Returns a dictionary containining the return code for continuing or not, and
Returns a tuple containining the return code for continuing or not, and
an error message if there's an error
"""
have_file = False
Expand Down