mapcmd

package
v0.0.0-...-26dca7e Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var Command = &command.Command{
	Usage: `map [-e|--equator <value>] [-c|--columns <value>]
	[--box <lat,lon,lat,lon>] [--mask <image>]
	[--points] [--pixels] [--random <value>]
	[--bg <image>] -o|--output <out-img-file>`,
	Short: "draw a map of a pixelation",
	Long: `
Package map draws the pixels of pixelation based on an equal area partitioning
of a sphere into an image file using a plate carrée (equirectangular)
projection.

By default the pixelation will have 360 pixels in the equator. Use the flag
--equator, or -e, to change the size of the pixelation.

The flag --output, or -o, is required, and indicates the name of the file of
the output image. In the image each pixel in the equal area pixelation will
have the same color (selected at random). By default the image will be 3600
pixels wide, use the flag --column, or -c, to define a different number of
image columns.

If the flag --bg is defined, the read image file will be used as the background
image, so the pixel colors will be taken from that image.

If the flag --box is defined, only pixels inside the box will be draw. The box
is defined using the format "lat,lon,lat,lon", for example "14,-94,-58,-26"
will enclose South America.

If the flag --mask is defined, the read image file will be used as a mask, so
only pixels that are white in the mask will be draw. This flag can be combined
with --box.

If the flag --points is defined, one or more coordinate points will be read
from the standard input. One coordinate is read per line (each coordinate
separated by one or more spaces), first latitude and the longitude. Lines
starting with '#' will be ignored. If the flag --pixels is defined, the input
values will be interpreted as pixel IDs (one ID per line). The points will be
drawn in solid red (RGB = 255, 0, 0) so, hopefully, they will be easy
identified in the resulting image.

If the flag --random is defined, the indicated number of random pixels will be
added. The pixels will be in solid red (RGB = 255, 0, 0).
	`,
	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