Documentation ¶
Index ¶
- Constants
- Variables
- func AnimateImages(images []image.Image, delay int, style LoopStyle) (*gif.GIF, error)
- func AvailableDates(satellite *Satellite, sector *Sector, product *Product) ([]int, error)
- func CreateLoop(opts *LoopOptions) error
- func DownloadImage(request *ImageRequest) (image.Image, error)
- func LatestTimes(satellite *Satellite, sector *Sector, product *Product, count int) ([]int, error)
- func SaveGIF(output string, img *gif.GIF) (string, error)
- func SelectTimestamps(times []int, opts *LoopOptions) ([]time.Time, error)
- type ImageRequest
- type LoopOptions
- type LoopStyle
- type Product
- type Satellite
- type Sector
- type Zoom
Constants ¶
View Source
const AvailableDatesURI = "https://rammb-slider.cira.colostate.edu/data/json/%s/%s/%s/available_dates.json"
AvailableDatesURI is the address for retrieving the latest dates for available images.
- Satellite
- Sector
- Product Example: https://rammb-slider.cira.colostate.edu/data/json/jpss/northern_hemisphere/cira_geocolor/available_dates.json
View Source
const ImageURI = "https://rammb-slider.cira.colostate.edu/data/imagery/%s/%s---%s/%s/%s/%02d/%03d_%03d.png"
ImageURI is the request address for images. It contains the following fields:
- Date
- Satellite
- Sector
- Product
- Image Timestamp
- Zoom Level
- Section Y-Position
- Section X-Position Example: https://rammb-slider.cira.colostate.edu/data/imagery/20210404/jpss---northern_hemisphere/cira_geocolor/20210404215820/04/011_007.png
View Source
const LatestTimes5760URI = "https://rammb-slider.cira.colostate.edu/data/json/%s/%s/%s/latest_times_5760.json"
LatestTimes5760URI is the same as LatestTimesURI but with more times.
View Source
const LatestTimesURI = "https://rammb-slider.cira.colostate.edu/data/json/%s/%s/%s/latest_times.json"
LatestTimesURI is the address for retrieving the latest times for available images.
- Satellite
- Sector
- Product Example: https://rammb-slider.cira.colostate.edu/data/json/jpss/northern_hemisphere/cira_geocolor/latest_times.json
Variables ¶
View Source
var GOES16Satellite = &Satellite{ ID: "goes-16", FriendlyName: "GOES-16", Description: "East, 75.2W", SectorProducts: map[*Sector][]*Product{ GOESCONUSSector: { GOESBand1Product, GeoColorProduct, }, }, }
View Source
var GOESBand1Product = &Product{
ID: "band-1",
FriendlyName: "Band 1",
Description: "0.47 µm ('Blue')",
Value: "band_01",
}
View Source
var GOESCONUSSector = &Sector{ ID: "conus", FriendlyName: "CONUS", ZoomLevels: []Zoom{ { Level: 0, XCells: 1, YCells: 1, CellSizeX: 625, CellSizeY: 625, CropX: 625, CropY: 375, }, { Level: 1, XCells: 2, YCells: 2, CellSizeX: 625, CellSizeY: 625, CropX: 1250, CropY: 750, }, { Level: 2, XCells: 4, YCells: 4, CellSizeX: 625, CellSizeY: 625, CropX: 2500, CropY: 1500, }, { Level: 3, XCells: 8, YCells: 8, CellSizeX: 625, CellSizeY: 625, CropX: 5000, CropY: 3000, }, }, }
View Source
var GeoColorProduct = &Product{
ID: "geocolor",
FriendlyName: "GeoColor",
Description: "GeoColor (CIRA)",
Value: "geocolor",
}
View Source
var Products = map[string]*Product{ GOESBand1Product.ID: GOESBand1Product, GeoColorProduct.ID: GeoColorProduct, }
View Source
var Satellites = map[string]*Satellite{ GOES16Satellite.ID: GOES16Satellite, }
View Source
var Sectors = map[string]*Sector{ GOESCONUSSector.ID: GOESCONUSSector, }
Functions ¶
func AnimateImages ¶
func AvailableDates ¶
func CreateLoop ¶
func CreateLoop(opts *LoopOptions) error
func DownloadImage ¶
func DownloadImage(request *ImageRequest) (image.Image, error)
func LatestTimes ¶
func SaveGIF ¶
SaveGIF encodes the GIF data into a .gif file. The .gif extension will be added automatically. If a file with the same name exists an incrementing number will be appended to the end of the file name.
func SelectTimestamps ¶
func SelectTimestamps(times []int, opts *LoopOptions) ([]time.Time, error)
Types ¶
type ImageRequest ¶
type LoopOptions ¶
type Satellite ¶
type Satellite struct { // ID is the value sent in the request to SLIDER ID string // FriendlyName is the friendly human-readable name for the satellite FriendlyName string // Description is a short description of the satellite details Description string // SectorProducts contains a mapping of available sectors for this Satellite and Products available for each Sector. SectorProducts map[*Sector][]*Product }
func (*Satellite) ValidSector ¶
Click to show internal directories.
Click to hide internal directories.