[postgis-devel] netCDF support

os662002 olivier.sanchez at airparif.asso.fr
Thu Dec 19 02:14:59 PST 2013

Hi all,

I have a problem trying to convert netcdf to POSTGIS raster.

I've got a netcdf file which header is the following
netcdf out.NO2.1 {
        Time = UNLIMITED ; // (97 currently)
        lat = 46 ;
        lon = 67 ;
        DateStrLen = 19 ;
        float NO2(Time, lat, lon) ;
                NO2:long_name = "NO2 Concentration" ;
                NO2:units = "ppb vol" ;
                NO2:grid_mapping = "crs" ;
        char Times(Time, DateStrLen) ;

When using raster2pgsql (raster2pgsql -f conc NETCDF:out.NO2.1.nc:NO2
), I got the following error message :

ERROR 1: nBlockYSize = 46, only 1 supported when reading bottom-up dataset
ERROR 1: NETCDF:out.NO2.1.nc:NO2, band 1: IReadBlock failed at X offset 0, Y
offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0

While gdalinfo seems to work fine giving all the raster bands that are in
the file.

When time dimension is absent ,the raster2pgsql works fine.

Does anyone have an idea ? Is it normal, I thought that adding the -b 1
option to raster2pgsql would allow me extract the right index band.

Thanks in advance,



View this message in context: http://postgis.17.x6.nabble.com/netCDF-support-tp4889659p5005322.html
Sent from the PostGIS - Dev mailing list archive at Nabble.com.

More information about the postgis-devel mailing list