modis

package module
v0.0.0-...-a13259c Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: MIT Imports: 12 Imported by: 0

README

modis

Client for searching and downloading modis scenes

Thie project is under development

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mean

func Mean[T constraints.Float | constraints.Integer](nums []T) T

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(modisToken string) (*Client, error)

func (*Client) GetHDF

func (c *Client) GetHDF(sceneID string, scenePlatform Platform, isArchive bool) (io.Reader, error)

func (*Client) SearchModisScenes

func (c *Client) SearchModisScenes(startDate time.Time, endDate time.Time) (ModisData, error)

type ErrScene

type ErrScene struct {
	// contains filtered or unexported fields
}

func (ErrScene) Error

func (e ErrScene) Error() string

type ErrScenes

type ErrScenes struct {
	Errors []error
}

func (*ErrScenes) Error

func (e *ErrScenes) Error() string

type FileInfo

type FileInfo struct {
	Content []struct {
		ArchiveSets   int    `json:"archiveSets"`
		Cksum         string `json:"cksum"`
		DataDay       string `json:"dataDay"`
		DownloadsLink string `json:"downloadsLink"`
		FileID        int64  `json:"fileId"`
		Md5Sum        string `json:"md5sum"`
		Mtime         int    `json:"mtime"`
		Name          string `json:"name"`
		Products      string `json:"products"`
		ResourceType  string `json:"resourceType"`
		Self          string `json:"self"`
		Size          int    `json:"size"`
	} `json:"content"`
	DownloadsLink string `json:"downloadsLink"`
	FileCount     int    `json:"file_count"`
	Mtime         int    `json:"mtime"`
	Name          string `json:"name"`
	ResourceType  string `json:"resourceType"`
	Self          string `json:"self"`
	Size          int    `json:"size"`
}

type ModisData

type ModisData []ModisScene

type ModisScene

type ModisScene struct {
	ID                 string
	GranuleID          string
	StartDateTime      time.Time
	ArchiveSet         int
	OrbitNumber        int64
	DayNightFlag       string
	EastBoundingCoord  float64
	NorthBoundingCoord float64
	SouthBoundingCoord float64
	WestBoundingCoord  float64
	Platform           Platform
	ShapeWKT           string
	IsArchive          bool
}

type ParseErrors

type ParseErrors []error

func (ParseErrors) Error

func (e ParseErrors) Error() string

type Platform

type Platform int
const (
	PlatformTerra Platform = iota + 1
	PlatformAqua
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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