Simple Image Visualization

Visualize a true color Landsat 8 image.

from descarteslabs.catalog import Product, properties as p
from descarteslabs.geo import DLTile
from descarteslabs.utils import display

Create a tile around Pisa, Italy.

tile = DLTile.from_latlon(43.7230, 10.3966, resolution=20.0, tilesize=1024, pad=0)

Use the Catalog API to search for imagery available over the area of interest.

search = (
    .filter("2022-04-01" <= p.acquired < "2022-05-01")
    .filter(p.cloud_fraction < 0.001)
images = search.collect()

Pick just one image to raster and display.

image = images[0]

# Load the data as an ndarray
arr = image.ndarray("red green blue", geocontext=images.geocontext)

# Display the image
display(arr, size=5,
/home/runner/.cache/bazel/_bazel_runner/2384562221c7b48aa7062cf83f0d40a3/sandbox/processwrapper-sandbox/12/execroot/_main/bazel-out/k8-opt-exec-2B5CBBC6/bin/docs/build_tools/public_sphinx-build.runfiles/rules_python~0.26.0~pip~pip_310_numpy/site-packages/numpy/lib/ RuntimeWarning: Mean of empty slice
  return np.nanmean(a, axis, out=out, keepdims=keepdims)

Total running time of the script: ( 0 minutes 0.772 seconds)

Gallery generated by Sphinx-Gallery