[postgis-devel] netCDF support

Bborie Park dustymugs at gmail.com
Thu Dec 19 18:54:55 PST 2013


>From the error message, it looks like GDAL doesn't like reading the bottom
up file. Can you try something like gdal_translate to a different format?
gdalinfo doesn't really read through the whole file like other utilities.

-bborie
On Dec 19, 2013 2:15 AM, "os662002" <olivier.sanchez at airparif.asso.fr>
wrote:

> 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 {
> dimensions:
>         Time = UNLIMITED ; // (97 currently)
>         lat = 46 ;
>         lon = 67 ;
>         DateStrLen = 19 ;
> variables:
>         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
> esmassim_data
> ), 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,
>
> Regards,
>
> Olivier SANCHEZ
>
>
>
>
> --
> 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.
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20131219/f79cd38f/attachment.html>


More information about the postgis-devel mailing list