cmd

package
v1.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package cmd contains all the helper functions, handlers, and command-line methods for building the tiffany command-line interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClipLabelbyExtent

func ClipLabelbyExtent(extent gdal.Geometry, shpFile gdal.Layer, outpath string)

ClipLabelbyExtent gets the extent of an input raster and clips a shapefile from it

func Execute

func Execute()

Execute runs the root command

func GeoReferenceImage

func GeoReferenceImage(coordinate []string, size []int, zoom int, inpath string, outpath string)

GeoReferenceImage converts a Static Maps image into a geo-referenced TIFF

func GetGSMImage

func GetGSMImage(client *maps.Client, coordinate []string, zoom int, size []int, outpath string)

GetGSMImage downloads a single static maps image given a client and set of parameters

func GetRasterExtent

func GetRasterExtent(tifPath string) gdal.Geometry

GetRasterExtent computes for the extent of a TIFF image and returns a Geometry

func GetStaticMapsClient

func GetStaticMapsClient() *maps.Client

GetStaticMapsClient returns a Client for constructing a StaticMapRequest.

func ReadShapeFile

func ReadShapeFile(lblPath string) gdal.Layer

ReadShapeFile opens an ESRI Shapefile and returns a Layer of Features

func ReprojectImage

func ReprojectImage(path string, srs string)

ReprojectImage converts image projection into a new spatial reference

func RunBatchPipeline

func RunBatchPipeline(csvPath string, skipFirst bool, zoom int, size []int, path string, noRef bool, wtLbl string, force bool) (int, int)

RunBatchPipeline executes all tiffany tasks for a list of coordinates

func RunPipeline

func RunPipeline(coordinate []string, zoom int, size []int, path string, noRef bool, wtLbl string, force bool) bool

RunPipeline executes all tiffany tasks for a single coordinate

Types

type Coordinate

type Coordinate struct {
	Latitude  string `csv:"latitude"`
	Longitude string `csv:"longitude"`
}

Coordinate defines a lat-long coordinate from a csv file

func ReadCSVFile

func ReadCSVFile(path string, skipFirst bool) []*Coordinate

ReadCSVFile opens a csv file and returns a list of coordinates

Jump to

Keyboard shortcuts

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