Simple Image VisualizationΒΆ

Visualize a true color Landsat 8 Scene.

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

Out:

/root/.cache/bazel/_bazel_drone-agent-j2dr/3517bd091dde6188868082e15543f179/sandbox/processwrapper-sandbox/21/execroot/__main__/bazel-out/k8-opt/bin/docs/build_tools/public/descarteslabs/client/auth/auth.py:114: UserWarning: unable to read token_info from /root/.descarteslabs/token_info.json with error [Errno 2] No such file or directory: '/root/.descarteslabs/token_info.json'.
  self.token_info_path, str(e))
/root/.cache/bazel/_bazel_drone-agent-j2dr/3517bd091dde6188868082e15543f179/sandbox/processwrapper-sandbox/21/execroot/__main__/bazel-out/k8-opt/bin/docs/build_tools/public/descarteslabs/client/auth/auth.py:363: UserWarning: unable to read token_info from /root/.descarteslabs/token_info.json with error [Errno 2] No such file or directory: '/root/.descarteslabs/token_info.json'.
  self.token_info_path, str(e))
/root/.cache/bazel/_bazel_drone-agent-j2dr/3517bd091dde6188868082e15543f179/sandbox/processwrapper-sandbox/21/execroot/__main__/bazel-out/k8-opt/bin/docs/build_tools/public/descarteslabs/client/auth/auth.py:363: UserWarning: unable to read token_info from /root/.descarteslabs/token_info.json with error [Errno 2] No such file or directory: '/root/.descarteslabs/token_info.json'.
  self.token_info_path, str(e))
/root/.cache/bazel/_bazel_drone-agent-j2dr/3517bd091dde6188868082e15543f179/sandbox/processwrapper-sandbox/21/execroot/__main__/bazel-out/k8-opt/bin/docs/build_tools/public/descarteslabs/client/auth/auth.py:114: UserWarning: unable to read token_info from /root/.descarteslabs/token_info.json with error [Errno 2] No such file or directory: '/root/.descarteslabs/token_info.json'.
  self.token_info_path, str(e))

import descarteslabs as dl

# Create a tile around Pisa, Italy
tile = dl.scenes.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 = dl.scenes.search(
    tile,
    products=["landsat:LC08:01:RT:TOAR"],
    start_datetime="2018-04-01",
    end_datetime="2018-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
dl.scenes.display(arr, size=16, title=scene.properties.id)

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

Gallery generated by Sphinx-Gallery