command

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColName          = "Column"
	ColType          = "Type"
	ColAnnotation    = "Annotation"
	ColRepetition    = "Repetition"
	ColCompression   = "Compression"
	ColEncoding      = "Encoding"
	ColGeometryTypes = "Geometry Types"
	ColBounds        = "Bounds"
	ColDetail        = "Detail"
)

Variables

View Source
var CLI struct {
	Convert  ConvertCmd  `cmd:"" help:"Convert data from one format to another."`
	Validate ValidateCmd `cmd:"" help:"Validate a GeoParquet file."`
	Describe DescribeCmd `cmd:"" help:"Describe a GeoParquet file."`
	Version  VersionCmd  `cmd:"" help:"Print the version of this program."`
}

Functions

This section is empty.

Types

type ConvertCmd

type ConvertCmd struct {
	Input              string `arg:"" optional:"" name:"input" help:"Input file.  If not provided, input is read from stdin." type:"path"`
	From               string `help:"Input file format.  Possible values: ${enum}." enum:"auto, geojson, geoparquet, parquet" default:"auto"`
	Output             string `arg:"" optional:"" name:"output" help:"Output file.  If not provided, output is written to stdout." type:"path"`
	To                 string `help:"Output file format.  Possible values: ${enum}." enum:"auto, geojson, geoparquet" default:"auto"`
	Min                int    `help:"Minimum number of features to consider when building a schema." default:"10"`
	Max                int    `help:"Maximum number of features to consider when building a schema." default:"100"`
	InputPrimaryColumn string `help:"Primary geometry column name when reading Parquet withtout metadata." default:"geometry"`
	Compression        string `help:"Parquet compression to use.  Possible values: ${enum}." enum:"uncompressed, snappy, gzip, brotli, zstd" default:"zstd"`
	RowGroupLength     int    `help:"Maximum number of rows per group when writing Parquet."`
}

func (*ConvertCmd) Run

func (c *ConvertCmd) Run() error

type DescribeCmd

type DescribeCmd struct {
	Input    string `` /* 129-byte string literal not displayed */
	Format   string `help:"Report format.  Possible values: ${enum}." enum:"text, json" default:"text"`
	Unpretty bool   `help:"No newlines or indentation in the JSON output."`
}

func (*DescribeCmd) Run

func (c *DescribeCmd) Run() error

type DescribeInfo

type DescribeInfo struct {
	Schema   *DescribeSchema      `json:"schema"`
	Metadata *geoparquet.Metadata `json:"metadata"`
	NumRows  int64                `json:"rows"`
}

type DescribeSchema

type DescribeSchema struct {
	Name        string            `json:"name,omitempty"`
	Optional    bool              `json:"optional,omitempty"`
	Repeated    bool              `json:"repeated,omitempty"`
	Type        string            `json:"type,omitempty"`
	Annotation  string            `json:"annotation,omitempty"`
	Compression string            `json:"compression,omitempty"`
	Fields      []*DescribeSchema `json:"fields,omitempty"`
}

type FormatType

type FormatType string
const (
	AutoType       FormatType = "auto"
	GeoParquetType FormatType = "geoparquet"
	ParquetType    FormatType = "parquet"
	GeoJSONType    FormatType = "geojson"
	UnknownType    FormatType = "unknown"
)

type ReaderAtSeeker

type ReaderAtSeeker interface {
	io.Reader
	io.ReaderAt
	io.Seeker
}

type ValidateCmd

type ValidateCmd struct {
	Input        string `` /* 129-byte string literal not displayed */
	MetadataOnly bool   `help:"Only run rules that apply to file metadata and schema (no data will be scanned)."`
	Unpretty     bool   `help:"No colors in text output, no newlines and indentation in JSON output."`
	Format       string `help:"Report format.  Possible values: ${enum}." enum:"text, json" default:"text"`
}

func (*ValidateCmd) Run

func (c *ValidateCmd) Run(ctx *kong.Context) error

type VersionCmd

type VersionCmd struct {
	Detail bool `help:"Include detail about the commit and build date."`
}

func (*VersionCmd) Run

func (c *VersionCmd) Run() error

Jump to

Keyboard shortcuts

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