[postgis-users] Error Loading HDF4 Format with raster2pgsql.py Script.

elliott elliott at cpi.com
Mon Nov 7 07:45:16 PST 2011


Hi,

I have tried to load an HDF4 formatted MODIS temperature file with the 
raster2pgsql.py script and getting the following error.  I have built 
GDAL with the HDF4 format and it seems to recognize the file but the 
loader is having the following problem:

/usr/local/pgsql/bin/raster2pgsql.py -r 
MOD11A2.A2011289.h27v05.005.2011298111759.hdf -F -t modisLandTemp -s 
4326 -I > /usr/local/pgsql/data/modislt.sql
Traceback (most recent call last):
   File "/usr/local/pgsql/bin/raster2pgsql.py", line 1040, in <module>
     main()
   File "/usr/local/pgsql/bin/raster2pgsql.py", line 1003, in main
     gt = wkblify_raster(opts, filename.replace( '\\', '/') , i, gt)
   File "/usr/local/pgsql/bin/raster2pgsql.py", line 945, in wkblify_raster
     summary = wkblify_raster_level(options, ds, options.overview_level, 
band_range, infile, i)
   File "/usr/local/pgsql/bin/raster2pgsql.py", line 861, in 
wkblify_raster_level
     pixel_size, block_size, extent)
   File "/usr/local/pgsql/bin/raster2pgsql.py", line 385, in 
make_sql_addrastercolumn
     assert len(pixeltypes) > 0, "No pixel types given"
AssertionError: No pixel types given

Thanks for your help!



More information about the postgis-users mailing list