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-n94w/3517bd091dde6188868082e15543f179/sandbox/processwrapper-sandbox/10/execroot/__main__/bazel-out/k8-opt-exec-724A0052/bin/docs/build_tools/public_sphinx-build.runfiles/requirements_py3_pypi__matplotlib_2_2_4/matplotlib/cbook/__init__.py:2349: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  if isinstance(obj, collections.Iterator):
/root/.cache/bazel/_bazel_drone-agent-n94w/3517bd091dde6188868082e15543f179/sandbox/processwrapper-sandbox/10/execroot/__main__/bazel-out/k8-opt-exec-724A0052/bin/docs/build_tools/public_sphinx-build.runfiles/requirements_py3_pypi__matplotlib_2_2_4/matplotlib/cbook/__init__.py:2366: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  return list(data) if isinstance(data, collections.MappingView) else data

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 5.620 seconds)

Gallery generated by Sphinx-Gallery