Elastix-based geospatial pairwise raster alignment
Project description
Coregix
Coregix provides elastix-based pairwise raster alignment for geospatial imagery.
Current scope:
- pairwise raster alignment CLI and Python API
- edge-proxy registration for structural cross-sensor alignment
- chunked transform application for large moving rasters
- optional postprocess trimming of invalid edge artifacts
Install
Conda environment
conda env create -f environment.yml
conda activate coregix
This installs the runtime stack and the package in editable mode.
Editable install into an existing environment
pip install -e .
The installed CLI entrypoint is:
vhr-align-image-pair --help
You can also run the module directly:
python -m coregix.cli.align_image_pair --help
CLI usage
Align a moving image to a fixed image
vhr-align-image-pair \
--moving-image /path/to/moving.tif \
--fixed-image /path/to/fixed.tif \
--output-image /path/to/aligned.tif
By default this:
- registers on edge-proxy images
- writes the result on the moving-image grid
- uses no chunking (
--split-factor 0)
Use chunking for large moving rasters
--split-factor controls chunked transform application as 2^k total chunks:
0: no split1: halves2: quadrants3: octants
Example with quadrants:
vhr-align-image-pair \
--moving-image /path/to/moving_large.tif \
--fixed-image /path/to/fixed.tif \
--output-image /path/to/aligned_large.tif \
--split-factor 2
Remove invalid edge artifacts after alignment
--trim-edge-invalid runs a raster-space cleanup pass after alignment and sets edge artifacts to nodata.
Example:
vhr-align-image-pair \
--moving-image /path/to/moving_large.tif \
--fixed-image /path/to/fixed.tif \
--output-image /path/to/aligned_large_edgefixed.tif \
--split-factor 2 \
--trim-edge-invalid \
--edge-trim-depth 8 \
--edge-trim-invalid-below -3000
The edge-trim thresholds are dataset-specific. --edge-trim-invalid-below is useful when interpolation artifacts are not equal to the dataset nodata value.
Python usage
Basic alignment
from coregix import align_image_pair
result = align_image_pair(
moving_image_path="/path/to/moving.tif",
fixed_image_path="/path/to/fixed.tif",
output_image_path="/path/to/aligned.tif",
)
print(result.output_image_path)
Large raster with chunking and edge cleanup
from coregix import align_image_pair
result = align_image_pair(
moving_image_path="/path/to/moving_large.tif",
fixed_image_path="/path/to/fixed.tif",
output_image_path="/path/to/aligned_large_edgefixed.tif",
split_factor=2,
trim_edge_invalid=True,
edge_trim_depth=8,
edge_trim_invalid_below=-3000,
)
print(result.output_image_path)
Notes
split_factorchanges only transform application, not the registration model.split_factor=2is the direct replacement for the previous quadrant-based large-raster path.- If needed, you can select separate registration bands with
moving_band_indexandfixed_band_indexin Python or--moving-band-indexand--fixed-band-indexin the CLI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coregix-0.1.2.tar.gz.
File metadata
- Download URL: coregix-0.1.2.tar.gz
- Upload date:
- Size: 25.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ea38cebbdb344bf8bb7b1ebabdcad616c7ddbb780c68296daddc99420a8d182
|
|
| MD5 |
e61efb1bc0af2b320fd25b9699176051
|
|
| BLAKE2b-256 |
f2397faaf5c9a6f9772a857f6bca455f354ca147ca28a4b58e2f278418a0db80
|
Provenance
The following attestation bundles were made for coregix-0.1.2.tar.gz:
Publisher:
publish-pypi.yml on iosefa/coregix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coregix-0.1.2.tar.gz -
Subject digest:
6ea38cebbdb344bf8bb7b1ebabdcad616c7ddbb780c68296daddc99420a8d182 - Sigstore transparency entry: 1439661562
- Sigstore integration time:
-
Permalink:
iosefa/coregix@288171439b5d44322ce000d425cc87db92514e95 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/iosefa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@288171439b5d44322ce000d425cc87db92514e95 -
Trigger Event:
push
-
Statement type:
File details
Details for the file coregix-0.1.2-py3-none-any.whl.
File metadata
- Download URL: coregix-0.1.2-py3-none-any.whl
- Upload date:
- Size: 28.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0586ec4e999fa1eb78f0e1ddb9b15e38221638c14f1868438295274c9fd18c7
|
|
| MD5 |
5512d09000b1363fac7b0b5568c020d5
|
|
| BLAKE2b-256 |
93bea626e348aa01096e14f376c3cd310035780e845d11c2ceb4115c3f1c3c10
|
Provenance
The following attestation bundles were made for coregix-0.1.2-py3-none-any.whl:
Publisher:
publish-pypi.yml on iosefa/coregix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coregix-0.1.2-py3-none-any.whl -
Subject digest:
a0586ec4e999fa1eb78f0e1ddb9b15e38221638c14f1868438295274c9fd18c7 - Sigstore transparency entry: 1439661565
- Sigstore integration time:
-
Permalink:
iosefa/coregix@288171439b5d44322ce000d425cc87db92514e95 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/iosefa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@288171439b5d44322ce000d425cc87db92514e95 -
Trigger Event:
push
-
Statement type: