1package nasabluemarble23// The archived capture, as the crawler wrote it. A Blue Marble capture is one4// pinned publication: NASA Earth Observatory's global, cloud-free, true-color5// base map, taken whole as a single image and cut into the reference level the6// deriver folds down. The capture body records the product's identity and the7// derivation policy the crawler applied, so a reader of the archive can say8// exactly what these tiles are and how they came to be -- and so a policy9// change reads as a new capture rather than as the same one wearing new bytes.10//11// These are the only declarations in the tree permitted to carry this12// publisher's vocabulary. Fields are declared in the order they marshal.1314type capture struct {15 Source string `json:"source"`16 Body string `json:"body"`17 // Product names the publication as NASA titles it, and Credit is the line18 // NASA Earth Observatory asks republishers to carry.19 Product string `json:"product"`20 Credit string `json:"credit"`21 // AssetSHA256 is the digest of the source image the tiles were derived22 // from -- the capture's whole claim to identity. The asset's URL rides the23 // snapshot index as provenance, never this body.24 AssetSHA256 string `json:"assetSha256"`25 // Width and Height are the source image's pixels.26 Width int `json:"width"`27 Height int `json:"height"`28 Map mosaic `json:"map"`29 Derive derivation `json:"derive"`30 // Features is the vector half of the capture: country borders and primary31 // capitals, distilled from Natural Earth's public-domain files at crawl32 // time, coordinates verbatim.33 Features features `json:"features"`34}3536// mosaic is the pyramid as captured: the deepest square-world level the source37// was cut to, and the encoding its tiles wear. LayerTitle names the picture the38// way a person knows it, which is what a lens picker shows.39type mosaic struct {40 MaxZoom int `json:"maxZoom"`41 Extension string `json:"extension"`42 LayerTitle string `json:"layerTitle"`43}4445// derivation is the policy the crawler cut the reference level under. It is46// provenance a person reads and identity the capture hash carries; nothing47// downstream depends on it.48type derivation struct {49 Resampler string `json:"resampler"`50 JPEGQuality int `json:"jpegQuality"`51}5253// features is the vector publication the capture marries to the raster: which54// edition it was, the digests its files carried, and the distillation itself.55type features struct {56 Edition string `json:"edition"`57 BordersSHA256 string `json:"bordersSha256"`58 PlacesSHA256 string `json:"placesSha256"`59 Countries []country `json:"countries"`60 Capitals []capital `json:"capitals"`61}6263// country is one country as the capture keeps it: identity, the continent the64// publication files it under, its label point, and its rings -- polygons, then65// rings, then positions, longitude first, split at the antimeridian as the66// publication splits them.67type country struct {68 Name string `json:"name"`69 A3 string `json:"a3"`70 Continent string `json:"continent"`71 LabelLon float64 `json:"labelLon"`72 LabelLat float64 `json:"labelLat"`73 Polygons [][][][2]float64 `json:"polygons"`74}7576// capital is one primary capital as the capture keeps it.77type capital struct {78 Name string `json:"name"`79 Country string `json:"country"`80 A3 string `json:"a3"`81 Lat float64 `json:"lat"`82 Lon float64 `json:"lon"`83}