[postgis-devel] netCDF support

Olivier Sanchez Olivier.Sanchez at airparif.asso.fr
Fri Dec 20 01:54:05 PST 2013


Hi,

You were right. I tested gdal_translate from nc to tiff and got the same error message.

I was using gdal1.10.1. After installing the 1.9.2 version, it seems ok.

Thank you,

Olivier


De : postgis-devel-bounces at lists.osgeo.org [mailto:postgis-devel-bounces at lists.osgeo.org] De la part de Bborie Park
Envoyé : vendredi 20 décembre 2013 03:55
À : PostGIS Development Discussion
Objet : Re: [postgis-devel] netCDF support


>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<mailto: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<mailto: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/20131220/11fc81fc/attachment.html>


More information about the postgis-devel mailing list