Simple Image VisualizationΒΆ

Visualize a true color Landsat 8 Scene.

https://cdn.descarteslabs.com/docs/1.11.0/public/_images/sphx_glr_plot_simple_viz_001.png

Out:

/home/stephen/.cache/bazel/_bazel_stephen/94c12998f847de25a1ba31a2db877e84/sandbox/linux-sandbox/333/execroot/monorepo/bazel-out/k8-opt/bin/docs/build_tools/public/descarteslabs/scenes/_display.py:227: UserWarning: Tight layout not applied. The left and right margins cannot be made large enough to accommodate all axes decorations.
  fig.tight_layout()

from descarteslabs.scenes import DLTile, search, display

# Create a tile around Pisa, Italy
tile = DLTile.from_latlon(43.7230, 10.3966, resolution=20.0, tilesize=1024, pad=0)

# Use the Scenes API to search for imagery availble over the area of interest
scenes, ctx = search(
    tile,
    products=["landsat:LC08:01:RT:TOAR"],
    start_datetime="2022-04-01",
    end_datetime="2022-05-01",
    limit=2,
    cloud_fraction=0.1,
)

# Pick just one scene
scene = scenes[0]

# Load the data as an ndarray
arr = scene.ndarray("red green blue", ctx)

# Display the scene
display(arr, size=2, title=scene.properties.id)

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

Gallery generated by Sphinx-Gallery