Skip to content

Instantly share code, notes, and snippets.

@danclewley
Last active December 22, 2015 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danclewley/6504563 to your computer and use it in GitHub Desktop.
Save danclewley/6504563 to your computer and use it in GitHub Desktop.
Co-register two remote sensing images using RSGISLib.
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Co-register two images
-->
<rsgis:commands xmlns:rsgis="http://www.rsgislib.org/xml/">
<!-- Generate GCPs -->
<rsgis:command algor="registration" option="basic"
reference="ref_image.kea"
floating="float_image.kea"
output="float2ref_tiepoints.txt"
outputType="rsgis_img2map" metric="correlation"
pixelgap="50" window="100" search="10" threshold="0.6"
stddevRef="2" stddevFloat="2" subpixelresolution="4" />
<!-- Add GCPs to GDAL -->
<rsgis:command algor="registration" option="gcp2gdal"
gcps="float2ref_tiepoints.txt"
image="float_image.kea"
output="float_image_gcps.kea"
datatype="UInt16" format="KEA" />
<!-- Warp using GDAL -->
<rsgis:command algor="commandline" option="execute"
command="gdalwarp -of KEA -ot Byte -tr 100 100 -tps float_image_gcps.kea float_image_warp.kea" />
<rsgis:command algor="commandline" option="execute"
command="rm float_image_gcps.kea" />
</rsgis:commands>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment