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

Commit

Permalink
Readme and return type changes (#1) (#2)
Browse files Browse the repository at this point in the history
* Fixed a wrong comment/docstring

* Adding to README

* Fixing filename extension

* Some fixes and updates to README

* Fixing up return type
  • Loading branch information
Chris-Schnaufer committed Nov 25, 2019
1 parent 5b89d33 commit bc93006
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
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

0 comments on commit bc93006

Please sign in to comment.