How it works...

This recipe was all about processing a MODIS raster into a form suitable for use in PostGIS. We used the gdalbuildvrt utility to create our VRT. As a bonus, we used gdal_translate to convert between raster formats; in this case, from VRT to GeoTIFF.

If you're feeling particularly adventurous, try using gdalbuildvrt to create a VRT of the 12 PRISM rasters with each raster as a separate band.

Get PostGIS Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.