Visualizing Multispectral Data with HyperCoast¶
In [1]:
Copied!
# %pip install "hypercoast[extra]"
# %pip install "hypercoast[extra]"
In [2]:
Copied!
import hypercoast
import hypercoast
In [3]:
Copied!
url = "https://github.com/opengeos/datasets/releases/download/raster/cog.tif"
filepath = "data/cog.tif"
hypercoast.download_file(url, filepath, quiet=True)
url = "https://github.com/opengeos/datasets/releases/download/raster/cog.tif"
filepath = "data/cog.tif"
hypercoast.download_file(url, filepath, quiet=True)
Out[3]:
'/home/runner/work/HyperCoast/HyperCoast/docs/examples/data/cog.tif'
In [4]:
Copied!
m = hypercoast.Map()
filepath = "data/cog.tif" # replace it with your own raster data
m.add_dataset(
filepath, indexes=[4, 1, 2], vmin=0, vmax=2500, layer_name="Landsat", nodata=0
)
m.add("spectral")
m
m = hypercoast.Map()
filepath = "data/cog.tif" # replace it with your own raster data
m.add_dataset(
filepath, indexes=[4, 1, 2], vmin=0, vmax=2500, layer_name="Landsat", nodata=0
)
m.add("spectral")
m
Warning 1: TIFFReadDirectory:Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
Out[4]: