Skip to main content

Library to enable easy use of the Orfeo ToolBox (OTB) in Python

Project description

pyotb: Orfeo ToolBox for Python

latest release pipeline status coverage report read the docs status

pyotb wraps the Orfeo Toolbox in a pythonic, developer friendly fashion.

Key features

  • Easy use of Orfeo ToolBox (OTB) applications from python
  • Simplify common sophisticated I/O features of OTB
  • Lazy execution of operations thanks to OTB streaming mechanism
  • Interoperable with popular python libraries (numpy and rasterio)
  • Extensible

Documentation hosted at pyotb.readthedocs.io.

Example

Building a simple pipeline with OTB applications

import pyotb

# RigidTransformResample, with input parameters as dict
resampled = pyotb.RigidTransformResample({
    "in": "https://myserver.ia/input.tif",  # Note: no /vsicurl/
    "interpolator": "linear", 
    "transform.type.id.scaley": 0.5,
    "transform.type.id.scalex": 0.5
})

# OpticalCalibration, with input parameters as args
calib = pyotb.OpticalCalibration(resampled)

# BandMath, with input parameters as kwargs
ndvi = pyotb.BandMath(calib, exp="ndvi(im1b1, im1b4)")

# Pythonic slicing
roi = ndvi[20:586, 9:572]

# Pipeline execution. The actual computation happens here!
roi.write("output.tif", "float")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyotb-2.1.0.tar.gz (45.6 kB view details)

Uploaded Source

Built Distribution

pyotb-2.1.0-py3-none-any.whl (40.7 kB view details)

Uploaded Python 3

File details

Details for the file pyotb-2.1.0.tar.gz.

File metadata

  • Download URL: pyotb-2.1.0.tar.gz
  • Upload date:
  • Size: 45.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for pyotb-2.1.0.tar.gz
Algorithm Hash digest
SHA256 6eae3dae6410015e6edc20b9da2cceca2b139754318ef08c506f9006429be70d
MD5 033520d12970f523c38b29d19759e7ac
BLAKE2b-256 392824909e2e5ced0373f6fb6cca862e22cde4e6cb3e6b3c4802e55a68aba2d8

See more details on using hashes here.

File details

Details for the file pyotb-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyotb-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 40.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for pyotb-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d03e46a35adf75d931f7752c50074dc30e61ac2e2942ea5214a0b42f574f2c9
MD5 8c55b322f48b1e095c186af231e8f835
BLAKE2b-256 7236a5730c0a7080630492dc35a434ae954dce9d1eba7e88608a86b6ceb647a4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page