Jupyternotebook
Display image from WMS (owslib)
https://gpwmap.jaxa.jp/ows?service=WCS&version=2.0.1&request=GetCoverage&CoverageID=LST250m_LST_Day&format=GeoTIFF&subset=Long(137.85,140.85)&subset=Lat(35.15,36.85)&subset=time("2021-04-02T01:33:00Z")
[89]:
from owslib.wcs import WebCoverageService
from IPython.display import Image
import rasterio
from rasterio.plot import show
from rasterio import MemoryFile
import matplotlib.pyplot as plt
url = 'https://gpwmap.jaxa.jp/ows?'
identifier = ['GCOM-C__LST250m_LST_Day']
format = "GeoTIFF"
subsets_long = ('Long', 137.85, 140.85)
subsets_lat = ('Lat', 35.15, 36.85)
subsets_time = ('time','2024-04-02T01:33:00Z')
subsets = [subsets_long, subsets_lat, subsets_time]
wcs = WebCoverageService(url, version="2.0.1")
img = wcs.getCoverage( identifier=identifier, format=format, subsets = subsets)
cmap = plt.colormaps['turbo']
with MemoryFile(img) as memfile:
with memfile.open() as dataset:
show(dataset, cmap=cmap)
