gdalprocess

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultQueueSizePerProcess = 200
View Source
const SizeofFloat32 = 4
View Source
const SizeofInt16 = 2
View Source
const SizeofUint16 = 2

Variables

View Source
var CWGS84WKT = C.CString(`GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]","proj4":"+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs `)
View Source
var CncDimLevelValues = C.CString("NETCDF_DIM_lev_VALUES")
View Source
var CncDimTimeValues = C.CString("NETCDF_DIM_time_VALUES")
View Source
var CsubDS = C.CString("SUBDATASETS")
View Source
var CtimeUnits = C.CString("time#units")
View Source
var GDALTypes = map[C.GDALDataType]string{0: "Unkown", 1: "Byte", 2: "UInt16", 3: "Int16",
	4: "UInt32", 5: "Int32", 6: "Float32", 7: "Float64",
	8: "CInt16", 9: "CInt32", 10: "CFloat32", 11: "CFloat64",
	12: "TypeCount"}

Functions

func ComputeReprojectExtent

func ComputeReprojectExtent(in *pb.GeoRPCGranule) *pb.Result

func DrillDataset

func DrillDataset(in *pb.GeoRPCGranule) *pb.Result

func ExtractGDALInfo

func ExtractGDALInfo(in *pb.GeoRPCGranule) *pb.Result

func WarpRaster

func WarpRaster(in *pb.GeoRPCGranule) *pb.Result

Types

type DrillFileDescriptor

type DrillFileDescriptor struct {
	SrcBBox []int32
	DstBBox []int32
	Mask    []uint8
}

type ErrorMsg

type ErrorMsg struct {
	Address string
	Replace bool
	Error   error
}

type OOMMonitor

type OOMMonitor struct {
	ExecMatch    string
	OOMThreshold int
	Verbose      bool
}

func NewOOMMonitor

func NewOOMMonitor(execMatch string, oomThreshold int, verbose bool) *OOMMonitor

func (*OOMMonitor) StartMonitorLoop

func (mon *OOMMonitor) StartMonitorLoop() error

type PixelFunctionCode

type PixelFunctionCode struct {
	XMLName xml.Name `xml:"PixelFunctionCode"`
	Text    string   `xml:",cdata"`
}

type Process

type Process struct {
	TaskQueue        chan *Task
	Address          string
	TempFile         string
	Cmd              *exec.Cmd
	CombinedOutput   io.ReadCloser
	MaxTaskProcessed int
	ErrorMsg         chan *ErrorMsg
	Verbose          bool
}

func NewProcess

func NewProcess(tQueue chan *Task, binary string, port int, errChan chan *ErrorMsg, maxTaskProcessed int, verbose bool) *Process

func (*Process) RemoveTempFiles

func (p *Process) RemoveTempFiles()

func (*Process) Start

func (p *Process) Start() error

type ProcessPool

type ProcessPool struct {
	Pool             []*Process
	PoolSize         int
	TaskQueue        chan *Task
	MaxTaskProcessed int
	ErrorMsg         chan *ErrorMsg
}

func CreateProcessPool

func CreateProcessPool(n int, executable string, port int, maxTaskProcessed int, verbose bool) (*ProcessPool, error)

func (*ProcessPool) AddQueue

func (p *ProcessPool) AddQueue(task *Task)

func (*ProcessPool) CreateProcess

func (p *ProcessPool) CreateProcess(executable string, port int, verbose bool) (*Process, error)

type SimpleSource

type SimpleSource struct {
	MetadataTemplate int    `xml:"metadata-template,attr"`
	SourceFileName   string `xml:"SourceFilename"`
}

type Task

type Task struct {
	Payload   *pb.GeoRPCGranule
	Resp      chan *pb.Result
	Error     chan error
	NumTrials int
}

type VRTDataset

type VRTDataset struct {
	XMLName        xml.Name         `xml:"VRTDataset"`
	RasterXSize    int              `xml:"rasterXSize,attr"`
	RasterYSize    int              `xml:"rasterYSize,attr"`
	SRS            string           `xml:"SRS"`
	GeoTransform   string           `xml:"GeoTransform"`
	VRTRasterBands []*VRTRasterBand `xml:"VRTRasterBand"`
}

type VRTManager

type VRTManager struct {
	DSFileName string
	// contains filtered or unexported fields
}

func NewVRTManager

func NewVRTManager(vrt []byte) (*VRTManager, error)

func (*VRTManager) Close

func (mgr *VRTManager) Close()

type VRTRasterBand

type VRTRasterBand struct {
	XMLName               xml.Name           `xml:"VRTRasterBand"`
	DataType              string             `xml:"dataType,attr"`
	Band                  int                `xml:"band,attr"`
	SubClass              string             `xml:"subClass,attr"`
	NoDataValue           float64            `xml:"NoDataValue"`
	PixelFunctionType     string             `xml:"PixelFunctionType"`
	PixelFunctionLanguage string             `xml:"PixelFunctionLanguage"`
	PixelFunctionCode     *PixelFunctionCode `xml:"PixelFunctionCode"`
	SimpleSources         []*SimpleSource    `xml:"SimpleSource"`
}

Jump to

Keyboard shortcuts

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