[gdal-dev] "Syncing" two rasters together...

kempenep kempenep at gmail.com
Fri Mar 28 02:49:26 PDT 2014


Hi Jonathan,

If I understand your question correctly, I might suggest an open source tool
(GPL v3) for this job: pkcrop. It is part of pktools
(http://pktools.nongnu.org), which is based on the GDAL API. By combining
pkcrop with pkinfo (also in pktools), you could get what you want in a quite
operational way. pkinfo allows you to define the proper bounding box, x, y
resolution (pkinfo -i reference.tif -bb -dx -dy). The output can be directly
used within pkcrop using $(command substitution). Not covered areas will
have a nodata value. You can perform all steps in a one-liner: stacking a
list of input images to  a multi-layer image using the same bounding box and
spatial resolution

pkcrop $(pkinfo -i reference.tif -dx -dy -bb) $(for LS in landsat*.tif; do
echo " -i " $LS;done) -o stacked.tif

Pieter.



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/gdal-dev-Syncing-two-rasters-together-tp5131677p5131753.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list