mapcmd

package
v0.0.0-...-d35a074 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2024 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package mapcmd implements a command to draw a time pixelation model as an image map.

Index

Constants

This section is empty.

Variables

View Source
var Command = &command.Command{
	Usage: `map [-c|--columns <value>] [--at <age>]
	[--key <key-file>] -o|--output <out-image-file>
	<time-pix-file>`,
	Short: "draw a map from a time pixelation model",
	Long: `
Command map reads a time pixelation model from a file and draws the pixel
values at the indicated time stage as a png image, using a plate carrée
projection.

The argument of the command is the name of the file that contains the time
pixelation model.

The flag --output, or -o, is required and sets the name of the output image. If
multiple stages are used, the time stage will append to the name of the image.
In the image all pixels with a given value will have the same color (selected
at random). With the flag --key a key-file can be used to define the colors to
be used in the output. A key file is a tab-delimited file with the following
required columns:

	key	the value used as identifier
	color	an RGB value separated by commas,
		for example "125,132,148".

Any other column will be ignored. Here is an example of a key file:

	key	color	gray	comment
	0	54, 75, 154	255	deep ocean
	1	74, 123, 183	235	oceanic plateaus
	2	152, 202, 225	225	continental shelf
	3	254, 218, 139	195	lowlands
	4	246, 126, 75	185	highlands
	5	231, 231, 231	245	ice sheets

In this case, gray a comment columns will be ignored.

By default the image will be 3600 pixels wide, use the flag --columns, or -c,
to define a different number of image columns.

By default all time stages will be produced. Use the flag --at to define a
particular time stage to be draw (in million years).
	`,
	SetFlags: setFlags,
	Run:      run,
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL