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.<br>
<br>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.<br>
<br>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"). <br>
<br>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.<br>
<br>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".<br>
<br>check out the netcdf4 package.<br><br>Bryce<br><br><br><div class="gmail_quote">On Mon, Dec 3, 2012 at 9:29 AM, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, Dec 03, 2012 at 11:10:16AM -0500, Pierre Racine wrote:<br>
> 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).<br>
<br>
</div>I guess it'd be a 2.n-D, not an N-D: no two locations sharing<br>
the same 2D "shadow".<br>
<div class="HOEnZb"><div class="h5"><br>
--strk;<br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel</a><br>
</div></div></blockquote></div><br>