[postgis-devel] Stats

Bryce L Nordgren bnordgren at gmail.com
Sun Dec 9 15:44:49 PST 2012


Typically, you would "layer" the abstractions. an "n-d matrix" is just
accessible via an (i,j,k,l,...) vector. You can then attach descriptions to
each axis. Postgis would then need to ignore any axis which doesn't have a
spatial descriptor for a horizontal coordinate system attached to it. To
steal from the netcdf4 code: 2 out of n axes would be labeled "GeoX" and
"GeoY". The remainder are ignored by any spatial operation.

The extra dimensions need not be spatial nor temporal. They could be
anything you can measure (temperature, mass, length, etc.). They can be
categories (e.g., the values of a classmap). They can be any numeric data
you want to store. Wide open.

5D is not atypical (3 spatial dimensions + time + measurements),
particularly for NWP applications. This allows you to lookup data based on
location, time, and "measurement type index". For instance, the
"measurement type index" axis might just index the channels of a
spectrometer. Or it could refer to mass, temperature, windspeed, wind
direction, etc. The only real constraint is that all of the matrix elements
have the same datatype (e.g., "real").

The "measurement type index" above is the same thing as "bands" in the
current implementation. Raster currently uses the two spatial axes to
calculate and return a vector (1d matrix) of bands/measurements from a 3d
matrix. Alternatively, you could reorder the axes, such that you have an
array (1d matrix) of rasters, which you then perform your spatial lookups
on. The nD case refers to the original nD matrix. If two of these axes are
spatial, then the above suggestion of making one-raster-per-band
generalizes to making an (n-2) dimensional matrix of rasters.

If you're only interested in horizontal operations on a dataset with more
than two dimensions (e.g., making a map of pressure contours at some
vertical level in the atmosphere), you don't have to add any 3D spatial
awareness to the system. Your raster is either a 2D array containing only
data for a particular altitude, or you can specify that the operation only
applies to "band x".

check out the netcdf4 package.

Bryce


On Mon, Dec 3, 2012 at 9:29 AM, Sandro Santilli <strk at keybit.net> wrote:

> On Mon, Dec 03, 2012 at 11:10:16AM -0500, Pierre Racine wrote:
> > Can't you just consider the extra bands the z or t dimensions? Then
> everything is just a matter of display or interpretation (as a voxel for
> example).
>
> I guess it'd be a 2.n-D, not an N-D: no two locations sharing
> the same 2D "shadow".
>
> --strk;
> _______________________________________________
> 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/20121209/65885ba9/attachment.html>


More information about the postgis-devel mailing list