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

Antonio Rodriges antonio.rrz at gmail.com
Mon Oct 30 04:49:02 PDT 2017


Thank you for pointing to this tool.

However, I thought that since PostGIS uses GDAL it may be easier to import
such arrays, e.g. just split them onto individual 2-d grids (since PostGIS
mainly understands 2-d grids).

2017-10-30 14:34 GMT+03:00 Stephen V. Mather <svm at clevelandmetroparks.com>:

> I don’t know if it’s the ideal tool for the job, as it’s more flexible
> than you need, not being a regularized grid but a point cloud, but you
> might look to the pgPointCloud extension: https://github.com/
> pgpointcloud/pointcloud
>
> Cheers,
> Best,
> Steve
>
>
> [image: http://sig.cmparks.net/cmp-ms-90x122.png]*Stephen V. Mather*
> GIS Manager
> (216) 635-3243 (Work)
> (216) 339-6347 (Cell)
> --sent from phone--
>
>
>
> On Oct 30, 2017, at 07:09, Antonio Rodriges <antonio.rrz at gmail.com> wrote:
>
> Hello,
>
> Thank you for the reply, however my data is slightly different. Sorry
> that I did not make it clearer at the very beginning.
>
> Actually I would like to import a dense, 3-d array of wind speed (a
> time series of grids, each grid point contains the wind speed value)
>
> The array is stored as a NetCDF file
> FIles are here https://www.esrl.noaa.gov/psd/
> cgi-bin/db_search/DBListFiles.pl?did=61&tid=59909&vid=4298
>
> The size of the array and its dimensions are below
>
> dimensions:
>    lat = 94 ;
>    lon = 192 ;
>    time = 1460;
>
> The array
>
> short uwnd(time,lat,lon) ;
>      uwnd:long_name = "6-Hourly Forecast of U-wind at 10 m" ;
>      uwnd:valid_range = -32765s, -8765s ;
>      uwnd:unpacked_valid_range = -120.f, 120.f ;
>      uwnd:actual_range = -38.2f, 38.07f ;
>      uwnd:units = "m/s" ;
>      uwnd:add_offset = 207.65f ;
>      uwnd:scale_factor = 0.01f ;
>      uwnd:missing_value = 32766s ;
>      uwnd:_FillValue = -32767s ;
>      uwnd:precision = 2s ;
>      uwnd:least_significant_digit = 1s ;
>      uwnd:GRIB_id = 33s ;
>      uwnd:GRIB_name = "U GRD" ;
>      uwnd:var_desc = "u-wind" ;
>      uwnd:dataset = "NCEP/DOE AMIP-II Reanalysis (Reanalysis-2)" ;
>      uwnd:level_desc = "10 m" ;
>      uwnd:statistic = "Individual Obs" ;
>      uwnd:parent_stat = "Other" ;
>      uwnd:standard_name = "eastward_wind" ;
>
> 2017-10-30 11:04 GMT+03:00 Giuseppe Broccolo <g.broccolo.7 at gmail.com>:
>
> Hi Antonio,
>
>
> 2017-10-29 12:31 GMT+01:00 Antonio Rodriges <antonio.rrz at gmail.com>:
>
>
> Hello,
>
>
> Whether PostGIS allow importing 3-d, 4-d, etc. arrays or only 2-d arrays?
>
>
> Specifically, I have a 3-d array with axes (time, lat, lon).
>
> Does this mean that I need to split it onto 2-d bands (lat, lon) and
>
> import the number of bands that is equal to the number of time steps
>
> in the 3-d array?
>
>
>
> Which is the data source from which you import the data (e.g. textual,
>
> etc.)?
>
>
> If I've correctly understood, you have arrays where geospatial and
>
> non-geospatial information
>
> is present, each one providing a "dimension" of the array.
>
>
> Just FYI, in PostGIS is possible to define mixed, structured data with
>
> constructors like POINTM
>
> and POINT, that allow to add a further dimension to the 2D/3D
> (respectively)
>
> geospatial ones, that
>
> includes a scalar information.
>
>
> Hope this can help in your import, otherwise provide more information about
>
> source data and how
>
> you'd like to import.
>
>
> Giuseppe.
>
>
>
> _______________________________________________
>
> postgis-users mailing list
>
> postgis-users at lists.osgeo.org
>
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20171030/76d58bc6/attachment.html>


More information about the postgis-users mailing list