NASA GIBS: What an amazing resource for incredible Earth observation and remote sensing data!
https://wiki.earthdata.nasa.gov/display/GIBS/
They've got a lot of great documentation and resources for developers too, even some great examples to get you started!
https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+...
Go from zero to web map in a few minutes, with almost any geospatial tool or library you want to use!
| importWMTSCapabilitiesfrom'ol/format/WMTSCapabilities.js'; | |
| importWMTS,{optionsFromCapabilities}from'ol/source/WMTS'; | |
| // App | |
| import{GIBS_CAPABILITIES_URL}from'./constants'; | |
| // Define the WMTS Capabilities Parser | |
| constparser=newWMTSCapabilities(); | |
| // Get Capabilities from GIBS | |
| exportconstfetchGibsCapabilities=()=> | |
| fetch(GIBS_CAPABILITIES_URL) | |
| .then(response=>response.text()) | |
| .then(text=>parser.read(text)); | |
| // Get a layer object by id/identifier of the layer from a capabilities list | |
| exportconstgetLayerById=(id,capabilities)=> | |
| capabilities&& | |
| capabilities.Contents.Layer.find(item=>item.Identifier===id); | |
| // Create a layer source from a layer and and capabilities | |
| exportconstcreateWMTSsourceFromCapabilities=(layerId,capabilities)=>{ | |
| // Create options from the capabilities list for the new current layer | |
| constoptions=optionsFromCapabilities(capabilities,{ | |
| layer: layerId, | |
| crossOrigin: 'anonymous', | |
| wrapX: false | |
| }); | |
| // Create a new source object using the options | |
| constnewSource=newWMTS(options); | |
| // Get the dimensions for the source | |
| constdimensions=newSource.getDimensions(); | |
| // Update the dimensions, because the URL expects {Time} not {time} | |
| newSource.updateDimensions({Time: dimensions.time}); | |
| returnnewSource; | |
| }; |
SpaceApps is a NASA incubator innovation program.