Third-Party Recipes¶
Third-party tools like those provided by
the Geospatial Data Abstraction Library (GDAL) can be
found in the libexec/python_runtime/bin
directory alongside the Python
executable used by Polar2Grid.
Combining GeoTIFF Images¶
When working with polar orbiter satellite data, it is often useful to stitch images of neighboring passes together. The GDAL merge tool can do this easily using Polar2Grid GeoTIFF output files.
Suppose we have two VIIRS GeoTIFF files created from two sequential Suomi NPP overpasses. The GeoTIFF files we use in this example are false color images from data acquired at 20:43 and 22:22 UTC on 23 March 2017 created in a WGS84 projection. The individual images are displayed side by side below.
To combine these images into a single output GeoTIFF image I can use the gdal_merge.py command that is packaged as part of Polar2Grid:
gdal_merge.py -n 0 -o my_false_color.tif npp_viirs_false_color_20170323_204320_wgs84_fit.tif npp_viirs_false_color_20170323_222255_wgs84_fit.tif
The -n 0 is used to set the background data value so it will not be included in the merge. This is required because without it, the black regions that border the second WGS84 GeoTIFF will be overlaid on top of the first image.
The resulting image is displayed below.
More than one image can be combined. There are more options available to gdal_merge.py. Execute
gdal_merge.py -h
for a complete list of options.