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.2.1.tar.gz (41.7 kB view details)

Uploaded Source

Built Distribution

pyotb-2.2.1-py3-none-any.whl (35.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyotb-2.2.1.tar.gz
  • Upload date:
  • Size: 41.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pyotb-2.2.1.tar.gz
Algorithm Hash digest
SHA256 11acde69bb0a61e825cf5dc3fb28906293e0970806ea46a17138e2df59528fb9
MD5 f754f7968e9c296990f929225f7791ff
BLAKE2b-256 a0f7ed24355f7d9c23008dc8bdbf7231a296c6e59ff211a1bc9e3d011bfabdb1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyotb-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 35.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pyotb-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dc33ec41680292e567c7e80b327e62101c42b2a0251347df4d31155a9f58777b
MD5 91c45cc349f68fac3df156ed5fea753b
BLAKE2b-256 9192b4d7a0965c32ccf7ca813e00854e12a402299689187a2f456e0df9279c9a

See more details on using hashes here.

Supported by

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