[postgis-users] Handling N-d arrays in PostGIS

Mike Toews mwtoews at gmail.com
Mon Oct 30 17:17:42 PDT 2017

On 31 October 2017 at 00:09, Antonio Rodriges <antonio.rrz at gmail.com> wrote:
> The size of the array and its dimensions are below
>  dimensions:
>     lat = 94 ;
>     lon = 192 ;
>     time = 1460;

With PostGIS, you can get this as a multidimensional raster with 1460
bands, or 18048 multipart geometries with 1460 parts, or 26 million
single-part geometries. If you can't get raster2pgsql to recognize the
.nc file, then try using gdal_translate to convert to a .tif file
instead, and you should be able to load this into PostGIS as a raster.

However, I'll suggest none of these as good options, as they will all
have a much slower performance in an SQL environment compared to a
native multidimensional environment (netCDF, HDF5, etc. and NCO,
NumPy, etc.).

It really depends on what you are doing with the data. If you are
simply viewing it, then you can (e.g.) open the netCDF directly with
QGIS (via GDAL), which should be very quick and easy to use. There are
many tools that can efficiently process netCDF files which I'd expect
to be much quicker.

More information about the postgis-users mailing list