Skip to main content

Rational Polynomial Camera Model for optical satellite images.

Project description

RPCM - Rational Polynomial Camera Model

Python implementation of the Rational Polynomial Camera (RPC) model for optical satellite images.

Carlo de Franchis, Gabriele Facciolo, Enric Meinhardt-Llopis (Centre Borelli, ENS Paris-Saclay, Université Paris-Saclay) 2013-21

rpcm is a Python library and command line tool for geolocating satellite images with RPCs. Its main source code repository is https://github.com/centreborelli/rpcm.

Installation

To install rpcm from PyPI:

pip install rpcm

Alternatively, to install rpcm from sources:

git clone https://github.com/centreborelli/rpcm.git
cd rpcm
pip install -e .

Usage

rpcm is a Python library that can be imported into other applications. A Jupyter notebook tutorial covering the main features of the library is included (TODO).

rpcm also comes with a Command Line Interface (CLI). The rpcm CLI has an extensive help that can be printed with the -h and --help switches.

$ rpcm -h
usage: rpcm [-h] {projection, localization, crop, footprint, angle} ...

Some CLI usage examples can be found in tests/tests.sh.

There are several subcommands, projection, localization, crop, footprint, angle, each of which has its own help.

Projection

$ rpcm projection -h
usage: rpcm projection [-h] [--lon LON] [--lat LAT] [-z Z] [--points POINTS]
                       [--crop CROP] [--svg SVG]
                       img

positional arguments:
  img              path or url to a GeoTIFF image file with RPC metadata

optional arguments:
  -h, --help       show this help message and exit
  --lon LON        longitude
  --lat LAT        latitude
  -z Z             altitude, in meters
  --points POINTS  path to a 2/3 columns txt file: lon lat [z]
  --crop CROP      path to a tif crop previously produced by rpcm. Image
                   coordinates are computed with respect to this crop.
  --svg SVG        path to an svg file where to plot projected points.

Localization

$ rpcm localization -h
usage: rpcm localization [-h] [-x X] [-y Y] [-z Z] [--points POINTS]
                     [--crop CROP]
                     img

positional arguments:
  img              path or url to a GeoTIFF image file with RPC metadata

optional arguments:
  -h, --help       show this help message and exit
  -x X             horizontal pixel coordinate (i.e. column index)
  -y Y             vertical pixel coordinate (i.e. row index)
  -z Z             altitude, in meters
  --points POINTS  path to a 3 columns txt file: x y z
  --crop CROP      path to a tif crop previously produced by rpcm. Image
                   coordinates are interpreted with respect to this crop.

Crop

$ rpcm crop -h
usage: rpcm crop [-h] [-z Z] img aoi crop

positional arguments:
  img         path to a GeoTIFF image file with RPC metadata
  aoi         path to geojson file defining the area of interest (AOI)
  crop        path to the output cropped tif image

optional arguments:
  -h, --help  show this help message and exit
  -z Z        altitude of the crop center

Footprint

$ rpcm footprint -h
usage: rpcm footprint [-h] [-z Z] img

positional arguments:
  img         path or url to a GeoTIFF image file with RPC metadata

optional arguments:
  -h, --help  show this help message and exit
  -z Z        altitude, in meters

Angle

$ rpcm angle -h
usage: rpcm angle [-h] [--lon LON] [--lat LAT] [-z Z] img1 img2

positional arguments:
  img1        path to a GeoTIFF image file with RPC metadata
  img2        path to a GeoTIFF image file with RPC metadata

optional arguments:
  -h, --help  show this help message and exit
  --lon LON   longitude
  --lat LAT   latitude
  -z Z        altitude

Common issues

Warning: A rasterio issue on Ubuntu causes the need for this environment variable (more info on rasterio's github):

export CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt

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

rpcm-1.4.10.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

rpcm-1.4.10-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file rpcm-1.4.10.tar.gz.

File metadata

  • Download URL: rpcm-1.4.10.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.3 CPython/3.9.7

File hashes

Hashes for rpcm-1.4.10.tar.gz
Algorithm Hash digest
SHA256 47ed99229f22ff3ee4025dadd99981f5df810ed56443a1839ea6d4d9072b1217
MD5 04f9015053017414dd8a180221f3820d
BLAKE2b-256 efc5d4c6872ce86508e3c0e541a8cce8fcb179ee8cb5f3f4f0c28e262ded6152

See more details on using hashes here.

File details

Details for the file rpcm-1.4.10-py3-none-any.whl.

File metadata

  • Download URL: rpcm-1.4.10-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.3 CPython/3.9.7

File hashes

Hashes for rpcm-1.4.10-py3-none-any.whl
Algorithm Hash digest
SHA256 a487d7d6e67ef4a35fd464c5170023c63176c2e05509057c511656c9b9562fa0
MD5 ed9d7819e74ce989d0e9483767a63bc1
BLAKE2b-256 0ae0418f433baf0fcf170d0a253f77460ada7a3703b58e32a64e0f9f25fc1677

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