https://github.com/brookisme/cmap
CLI that adds color-maps to geotiffs
https://github.com/brookisme/cmap
Last synced: 5 months ago
JSON representation
CLI that adds color-maps to geotiffs
- Host: GitHub
- URL: https://github.com/brookisme/cmap
- Owner: brookisme
- Created: 2018-10-26T00:47:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-27T11:54:22.000Z (about 7 years ago)
- Last Synced: 2025-03-15T18:14:00.167Z (10 months ago)
- Language: Python
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#### CMAP: a simple cli for adding color-tables to geotiffs
---
###### INSTALL
```bash
git clone https://github.com/brookisme/cmap.git
cd sublr
pip install -e .
```
###### USAGE
**NOTE**: Before using `cmap` you must [generate a config file](#config).
1. [add](#add): create geotiff with color-table for a single file
2. [add_dir](#add_dir): create geotiffs with color-table for all geotiffs in a directory
3. [config](#config): generate cmap config file
```
Usage: cmap [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
add add color-table to geotiff
add_dir add color-table to geotiffs in dir
config generate config file
```
---
##### ADD
```
Usage: cmap add [OPTIONS] [CMAP] SRC
create tif with color map for a single file
Options:
--dst TEXT destination path: empty create name from src path
--ident TEXT clr ident: filename.tif => filename..tif
--folder TEXT destination directory: if None use current directory
--band INTEGER band index: if None use all bands
--help Show this message and exit.
```
---
##### ADD DIR
```
Usage: cmap add_dir [OPTIONS] [CMAP] DIR_PATH
create geotiffs with color-table for all geotiffs in a directory
Options:
--dst TEXT destination path: empty create name from src path
--ident TEXT clr ident: filename.tif => filename..tif
--folder TEXT destination directory: if None use current directory
--band INTEGER band index: if None use all bands
--ext TEXT extension: defaluts to tif: use "*." to find files
--help Show this message and exit.
```
---
##### CONFIG
NOTES:
* config file(s) must be generated before using other `cmap` methods
* the config file contains:
- color-tables and default: added after generation (see [example](https://github.com/brookisme/cmap/blob/master/example.cmap.config.yaml)).
- option defaults
* if a local config file is not present the `cmap` will use the global config.
```
Usage: cmap config [OPTIONS]
generate local or global config file
Options:
--force BOOLEAN if true overwrite existing config
--global_config BOOLEAN if true create global config otherwise local.
defaults to False
--ext TEXT default ext: config default is "tif"
--band INTEGER default band: config default is None
--ident TEXT default ident: config default is "clr"
--folder TEXT default folder: config default is "clr"
--help Show this message and exit.
```