How to do it...

On the command line, navigate to the MODIS directory:

 > cd C:\postgis_cookbook\data\chap05\MODIS

In the MODIS directory, there should be several files. One of these files has the name srs.sql and contains the INSERT statement needed for the MODIS Sinusoidal projection. Run the INSERT statement:

> psql -d postgis_cookbook -f srs.sql

The main file has the extension HDF. Let's check the metadata of that HDF file:

> gdalinfo MYD09A1.A2012161.h08v05.005.2012170065756.hdf

When run, gdalinfo outputs a lot of information. We are looking for the list of subdatasets found in the Subdatasets section:

Subdatasets: 

Each subdataset is ...

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.