processor

package
v0.0.0-...-1152cda Latest Latest
Warning

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

Go to latest
Published: May 9, 2018 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const ISOFormat = "2006-01-02T15:04:05.000Z"

string used to format Go ISO times

View Source
const SIZE_OF_FLOAT32 = 4
View Source
const SIZE_OF_INT16 = 2
View Source
const SIZE_OF_UINT16 = 2

Variables

This section is empty.

Functions

func BBox2Geot

func BBox2Geot(width, height int, bbox []float64) []float64

BBox2Geot return the geotransform from the parameters received in a WMS GetMap request

func BBox2WKT

func BBox2WKT(bbox []float64) string

func ComputeMask

func ComputeMask(mask *utils.Mask, data []byte, rType string) (out []bool, err error)

func GradientRGBAPalette

func GradientRGBAPalette(palette *utils.Palette) ([]color.RGBA, error)

GradientPalette returns a palette of 256 colors creating an interpolation that goes though a list of provided colours.

func InterpolateColor

func InterpolateColor(a, b color.RGBA, i, sectionLength int) color.RGBA

InterpolateColor returns an RGBA color where the R, G, B, and A components have been interpolated from the 'a' and 'b' colors

func InterpolateUint8

func InterpolateUint8(a, b uint8, i, sectionLength int) uint8

InterpolateUint8 interpolates the value of a byte between two numbers 'a' and 'b' by especifying a length and a position 'i' along that length.

func MergeMaskedRaster

func MergeMaskedRaster(r *FlexRaster, canvasMap map[string]*FlexRaster, mask []bool) (err error)

func ProcessRasterStack

func ProcessRasterStack(rasterStack map[int64][]*FlexRaster, maskMap map[int64][]bool) (canvasMap map[string]*FlexRaster, err error)

func URLIndexGet

func URLIndexGet(ctx context.Context, url, nameSpace string, geoReq *GeoTileRequest, errChan chan error, out chan *GeoTileGranule, wg *sync.WaitGroup)

Types

type ByteRaster

type ByteRaster struct {
	ConfigPayLoad
	Data          []uint8
	Height, Width int
	OffX, OffY    int
	NoData        float64
	NameSpace     string
}

func (*ByteRaster) GetNoData

func (br *ByteRaster) GetNoData() float64

type ConcLimiter

type ConcLimiter struct {
	*sync.WaitGroup
	Pool chan struct{}
}

func NewConcLimiter

func NewConcLimiter(cLevel int) *ConcLimiter

func (*ConcLimiter) Decrease

func (c *ConcLimiter) Decrease()

func (*ConcLimiter) Increase

func (c *ConcLimiter) Increase()

type ConfigPayLoad

type ConfigPayLoad struct {
	NameSpaces  []string
	ScaleParams ScaleParams
	Palette     *utils.Palette
	Mask        *utils.Mask
	ZoomLimit   float64
}

type DrillFileDescriptor

type DrillFileDescriptor struct {
	OffX, OffY     int
	CountX, CountY int
	NoData         float64
	Mask           *image.Gray
}

type DrillIndexer

type DrillIndexer struct {
	Context    context.Context
	In         chan *GeoDrillRequest
	Out        chan *GeoDrillGranule
	Error      chan error
	APIAddress string
}

func NewDrillIndexer

func NewDrillIndexer(ctx context.Context, apiAddr string, errChan chan error) *DrillIndexer

func NewDrillIndexer(apiAddr string, errChan chan error) (*DrillIndexer) {

func (*DrillIndexer) Run

func (p *DrillIndexer) Run()

type DrillMerger

type DrillMerger struct {
	In    chan *DrillResult
	Out   chan string
	Error chan error
}

func NewDrillMerger

func NewDrillMerger(errChan chan error) *DrillMerger

func (*DrillMerger) Run

func (dm *DrillMerger) Run()

type DrillPipeline

type DrillPipeline struct {
	Context  context.Context
	Error    chan error
	RPCAddrs []string
	APIAddr  string
}

func InitDrillPipeline

func InitDrillPipeline(ctx context.Context, apiAddr string, rpcAddrs []string, errChan chan error) *DrillPipeline

func (*DrillPipeline) Process

func (dp *DrillPipeline) Process(geoReq GeoDrillRequest) chan string

type DrillResult

type DrillResult struct {
	NameSpace string
	Dates     []time.Time
	Data      []*pb.TimeSeries
}

type FileCrawler

type FileCrawler struct {
	In    chan string
	Out   chan string
	Error chan error
	// contains filtered or unexported fields
}

func NewFileCrawler

func NewFileCrawler(rootPath string, contains *regexp.Regexp, errChan chan error) *FileCrawler

func (*FileCrawler) Run

func (fc *FileCrawler) Run()

type FileList

type FileList struct {
	Files []string `json:"files"`
}

type FlexRaster

type FlexRaster struct {
	ConfigPayLoad
	Data          []byte
	Height, Width int
	OffX, OffY    int
	Type          string
	NoData        float64
	NameSpace     string
	TimeStamp     time.Time
	Polygon       string
}

type Float32Raster

type Float32Raster struct {
	ConfigPayLoad
	Data          []float32
	Height, Width int
	OffX, OffY    int
	NoData        float64
	NameSpace     string
}

func (*Float32Raster) GetNoData

func (f32 *Float32Raster) GetNoData() float64

type GDALDataset

type GDALDataset struct {
	DSName     string      `json:"ds_name"`
	ArrayType  string      `json:"array_type"`
	TimeStamps []time.Time `json:"timestamps"`
	Polygon    string      `json:"polygon"`
}

type GeoDrillGRPC

type GeoDrillGRPC struct {
	Context context.Context
	In      chan *GeoDrillGranule
	Out     chan *DrillResult
	Error   chan error
	Clients []string
}

func NewDrillGRPC

func NewDrillGRPC(ctx context.Context, serverAddress []string, errChan chan error) *GeoDrillGRPC

func (*GeoDrillGRPC) Run

func (gi *GeoDrillGRPC) Run()

type GeoDrillGranule

type GeoDrillGranule struct {
	Path       string
	NameSpace  string
	RasterType string
	TimeStamps []time.Time
	Geometry   string
	CRS        string
}

type GeoDrillRequest

type GeoDrillRequest struct {
	Geometry   string
	CRS        string
	Collection string
	NameSpaces []string
	StartTime  time.Time
	EndTime    time.Time
}

type GeoFile

type GeoFile struct {
	FileName string        `json:"filename,omitempty"`
	Driver   string        `json:"file_type"`
	DataSets []GeoMetaData `json:"geo_metadata"`
}

type GeoInfoGRPC

type GeoInfoGRPC struct {
	Context context.Context
	In      chan string
	Out     chan *GeoFile
	Error   chan error
	Clients []string
}

func NewInfoGRPC

func NewInfoGRPC(ctx context.Context, serverAddress []string, errChan chan error) *GeoInfoGRPC

func (*GeoInfoGRPC) Run

func (gi *GeoInfoGRPC) Run()

type GeoMetaData

type GeoMetaData struct {
	DataSetName  string         `json:"ds_name"`
	NameSpace    string         `json:"namespace,omitempty"`
	Type         string         `json:"array_type"`
	RasterCount  int32          `json:"raster_count"`
	TimeStamps   []time.Time    `json:"timestamps"`
	Heights      []float64      `json:"heights,omitempty"`
	Overviews    []*pb.Overview `json:"overviews,omitempty"`
	XSize        int32          `json:"x_size"`
	YSize        int32          `json:"y_size"`
	GeoTransform []float64      `json:"geotransform"`
	Polygon      string         `json:"polygon"`
	ProjWKT      string         `json:"proj_wkt"`
	Proj4        string         `json:"proj4"`
}

type GeoProcessor

type GeoProcessor struct {
	Context    context.Context
	In         chan *GeoTileRequest
	Out        chan *ByteRaster
	Error      chan error
	APIAddress string
	RPCAddress string
}

func NewGeoProcessor

func NewGeoProcessor(ctx context.Context, apiAddr, serverAddr string, errChan chan error) *GeoProcessor

func (*GeoProcessor) Run

func (gp *GeoProcessor) Run()

type GeoRasterGRPC

type GeoRasterGRPC struct {
	Context context.Context
	In      chan *GeoTileGranule
	Out     chan *FlexRaster
	Error   chan error
	Client  string
}

func NewRasterGRPC

func NewRasterGRPC(ctx context.Context, serverAddress string, errChan chan error) *GeoRasterGRPC

func (*GeoRasterGRPC) Run

func (gi *GeoRasterGRPC) Run()

type GeoTileGranule

type GeoTileGranule struct {
	ConfigPayLoad
	Path          string
	CRS           string
	BBox          []float64
	Height, Width int
	OffX, OffY    int
	NameSpace     string
	TimeStamps    []time.Time
	TimeStamp     time.Time
	Polygon       string
	RasterType    string
}

type GeoTileRequest

type GeoTileRequest struct {
	ConfigPayLoad
	Collection    string
	CRS           string
	BBox          []float64
	Height, Width int
	OffX, OffY    int
	StartTime     *time.Time
	EndTime       *time.Time
}

type InfoPipeline

type InfoPipeline struct {
	Context context.Context
	Error   chan error
	RPCAdds []string
}

func InitInfoPipeline

func InitInfoPipeline(ctx context.Context, rpcAddrs []string, errChan chan error) *InfoPipeline

func (*InfoPipeline) Process

func (dp *InfoPipeline) Process(rootPath string, contains *regexp.Regexp, file io.Writer) chan struct{}

type Int16Raster

type Int16Raster struct {
	ConfigPayLoad
	Data          []int16
	Height, Width int
	OffX, OffY    int
	NoData        float64
	NameSpace     string
}

func (*Int16Raster) GetNoData

func (s16 *Int16Raster) GetNoData() float64

type JPGEncoder

type JPGEncoder struct {
	In    chan *ByteRaster
	Out   chan []byte
	Error chan error
}

func NewJPGEncoder

func NewJPGEncoder(errChan chan error) *JPGEncoder

func (*JPGEncoder) Run

func (enc *JPGEncoder) Run()

type JSONEncoder

type JSONEncoder struct {
	In    chan *GeoFile
	Out   chan []byte
	Error chan error
}

func NewJSONEncoder

func NewJSONEncoder(errChan chan error) *JSONEncoder

func (*JSONEncoder) Run

func (jp *JSONEncoder) Run()

type JSONPrinter

type JSONPrinter struct {
	In    chan []byte
	Out   chan struct{}
	File  io.Writer
	Error chan error
}

func NewJSONPrinter

func NewJSONPrinter(file io.Writer, errChan chan error) *JSONPrinter

func (*JSONPrinter) Run

func (jp *JSONPrinter) Run()

type MetadataResponse

type MetadataResponse struct {
	Files        []string      `json:"files"`
	GDALDatasets []GDALDataset `json:"gdal"`
}

type Overview

type Overview struct {
	XSize int32 `json:"x_size"`
	YSize int32 `json:"y_size"`
}

type PNGEncoder

type PNGEncoder struct {
	In    chan *ByteRaster
	Out   chan []byte
	Error chan error
}

func NewPNGEncoder

func NewPNGEncoder(errChan chan error) *PNGEncoder

func (*PNGEncoder) Run

func (enc *PNGEncoder) Run()

type POSIXDescriptor

type POSIXDescriptor struct {
	GID   uint32 `json:"gid"`
	Group string `json:"group"`
	UID   uint32 `json:"uid"`
	User  string `json:"user"`
	Size  int64  `json:"size"`
	Mode  string `json:"mode"`
	Type  string `json:"type"`
	INode uint64 `json:"inode"`
	MTime int64  `json:"mtime"`
	ATime int64  `json:"atime"`
	CTime int64  `json:"ctime"`
}

type PosixInfo

type PosixInfo struct {
	In    chan string
	Out   chan string
	Error chan error
}

type Raster

type Raster interface {
	GetNoData() float64
}

type RasterMerger

type RasterMerger struct {
	In    chan *FlexRaster
	Out   chan Raster
	Error chan error
}

func NewRasterMerger

func NewRasterMerger(errChan chan error) *RasterMerger

func (*RasterMerger) Run

func (enc *RasterMerger) Run()

type RasterScaler

type RasterScaler struct {
	In    chan Raster
	Out   chan *ByteRaster
	Error chan error
}

func NewRasterScaler

func NewRasterScaler(errChan chan error) *RasterScaler

func (*RasterScaler) Run

func (scl *RasterScaler) Run()

type ScaleParams

type ScaleParams struct {
	Offset float64
	Scale  float64
	Clip   float64
}

type TileIndexer

type TileIndexer struct {
	Context    context.Context
	In         chan *GeoTileRequest
	Out        chan *GeoTileGranule
	Error      chan error
	APIAddress string
}

func NewTileIndexer

func NewTileIndexer(ctx context.Context, apiAddr string, errChan chan error) *TileIndexer

func (*TileIndexer) Run

func (p *TileIndexer) Run()

type TileInternalPipeline

type TileInternalPipeline struct {
	Context    context.Context
	Error      chan error
	RPCAddress string
	APIAddress string
}

func NewTileInternalPipeline

func NewTileInternalPipeline(ctx context.Context, apiAddr string, rpcAddr string, errChan chan error) *TileInternalPipeline

func (*TileInternalPipeline) Process

func (dp *TileInternalPipeline) Process(geoReq *GeoTileRequest) chan *ByteRaster

type TilePipeline

type TilePipeline struct {
	Context    context.Context
	Error      chan error
	RPCAddress string
	MASAddress string
}

func InitTilePipeline

func InitTilePipeline(ctx context.Context, masAddr string, rpcAddr string, errChan chan error) *TilePipeline

func (*TilePipeline) Process

func (dp *TilePipeline) Process(geoReq *GeoTileRequest) chan []byte

type TileSplitter

type TileSplitter struct {
	Context context.Context
	In      chan *GeoTileRequest
	Out     chan *GeoTileRequest
	Error   chan error
}

func NewTileSplitter

func NewTileSplitter(ctx context.Context, errChan chan error) *TileSplitter

func (*TileSplitter) Run

func (s *TileSplitter) Run()

type TimeSplitter

type TimeSplitter struct {
	In       chan *GeoDrillRequest
	Out      chan *GeoDrillRequest
	Error    chan error
	YearStep int
}

func NewTimeSplitter

func NewTimeSplitter(yearStep int, errChan chan error) *TimeSplitter

func (*TimeSplitter) Run

func (ts *TimeSplitter) Run()

type UInt16Raster

type UInt16Raster struct {
	ConfigPayLoad
	Data          []uint16
	Height, Width int
	OffX, OffY    int
	NoData        float64
	NameSpace     string
}

func (*UInt16Raster) GetNoData

func (u16 *UInt16Raster) GetNoData() float64

Jump to

Keyboard shortcuts

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