Skip to main content

Rectify oblique images to a plane

Project description

Tests PyPI - Version

Plan-Rect

Plan-Rect is command line tool for rectifying oblique images to a plane.

Installation

Plan-Rect is a python 3 package that can be installed with pip:

pip install plan-rect

Usage

Rectification is performed with the plan-rect command. It requires an image and marker locations as inputs, and creates a rectified image and rectification data file as outputs. Its options are described below:

Option Value Description
-im / --image FILE Path / URI of the source image (required).
-m / --marker ID X Y COL ROW Marker ID and location in world and pixel coordinates, with pixel coordinate origin at the bottom left image corner.
-g / --gcp FILE Path / URI of an Orthority GCP file defining marker locations.
-r / --res FLOAT Rectified pixel size in meters. Can be used twice for non-square pixels: --res WIDTH --res HEIGHT. Defaults to the ground sampling distance.
-i / --interp nearest, average, bilinear, cubic, lanczos Interpolation method for remapping source to rectified image. Defaults to cubic.
-n / --nodata FLOAT Nodata value for the rectified image. Defaults to the maximum value of the image data type if it is integer, and nan if it is floating point.
-ep / --export-params Export interior parameters and markers to Orthority format files and exit.
-od / --out-dir DIRECTORY Path / URI of the output file directory. Defaults to the current working directory.
-o / --overwrite Overwrite existing output(s).
--version Show the version and exit.
--help Show the help and exit.

Marker locations are required with either -m / --marker or -g / --gcp. The -m / --marker option can be provided multiple times. At least four markers are required.

Examples

Supply marker locations with -m / --marker:

plan-rect --image source.jpg --marker A 0 0 1002 1221 --marker B 2.659 0 4261 1067 --marker C 2.321 5.198 3440 3706 --marker D -0.313 4.729 1410 3663

Supply marker locations with -g / --gcp:

plan-rect --image source.jpg --gcp gcps.geojson

Set the rectified image pixel size with -r / --res:

plan-rect --image source.jpg --res 0.01 --gcp gcps.geojson

Export marker locations to an Orthority GCP file in the data directory, overwriting any existing file:

plan-rect --image source.jpg --export-params --out-dir data --overwrite --marker A 0 0 1002 1221 --marker B 2.659 0 4261 1067 --marker C 2.321 5.198 3440 3706 --marker D -0.313 4.729 1410 3663

Licence

Plan-Rect is licenced under the GNU Affero General Public License v3.0 (AGPLv3).

Acknowledgments

This project was funded by NedCAD.

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

plan_rect-0.2.0.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plan_rect-0.2.0-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file plan_rect-0.2.0.tar.gz.

File metadata

  • Download URL: plan_rect-0.2.0.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for plan_rect-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2b99030717681fe4ff7b109cd599cef88c553c4df3b417fa9bb954cff9e99f52
MD5 6122fdd9db217e197d280ece4109c87f
BLAKE2b-256 5863b6b134ca86fc6c68acdaed5f4a5e6f3f90f08c0ec3c42b65d2b21e10acf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for plan_rect-0.2.0.tar.gz:

Publisher: publish-pypi.yml on leftfield-geospatial/plan-rect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file plan_rect-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: plan_rect-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for plan_rect-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35459a0b5ff5d23ec5e80921c457ab6dfe47459f0f3aa5dcc9fc1277b3c18b63
MD5 6b46833b5b14705f4bf39a52c9268947
BLAKE2b-256 e5bdd198c5de434eed55e99fe5d4b42ab2a40c9ae9754aea07872d5a62cc80e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for plan_rect-0.2.0-py3-none-any.whl:

Publisher: publish-pypi.yml on leftfield-geospatial/plan-rect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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