Documentation request: Unclear on constraints/expectations on axes for 3D datasets
Hello,
I'm writing some utilities for my employer, Dynamic Graphics Inc., that are intended to convert between OpenVDS datasets and our own 3D grid file formats (one of them being a quite old internally-invented proprietary binary format, and the more recent one being HDF5-based), not unlike SEGYImport
and SEGYExport
.
As I started working on this, I found that numerous questions arose regarding the axes/dimensions for OpenVDS datasets that aren't really covered, or are at best glossed over, by the online docs. Many thanks in advance for light that you can shed on them!
- I'm presuming that for 3D datasets, axis 0 (that is, the axis named by
layout->GetAxisDescriptor(0)
) is always defined as being along the most rapidly-varying index in linear memory, while axis 2 is always along the most slowly-varying index in linear memory, is this correct? - For data in the inline/crossline/sample axis description system:
a) Will it always be the case that axis 0 is "sample", axis 1 is "crossline" and axis 2 is "inline" ? That seems to be what this line of examples/GettingStarted/main.cpp
(as of OpenVDS 3.3.1) implies:
const int sampleDimension = 0, crosslineDimension = 1, inlineDimension = 2;
but is it a robust assumption? Currently I am checking that the names of the three axes are in this expected order and erroring out otherwise (which is an expectation met by all 3D datasets to which I have access with "inline" / "crossline" / "sample" axes).
b) If I have a dataset in our own 3D format for which the inline or crossline number decreases in the positive direction (for the ordering in linear memory) of one or both of the two horizontal axes, this does not seem to be supported by OpenVDS. Do I have that correct? In other words, if I have such a 3D grid in our own format, it looks like I'll need to take care of moving the XY origin to the appropriate one of the other three grid corners in XY and swapping the nodes around correspondingly in memory, in order to be able to create an OpenVDS dataset where the inline/crossline numbers increase in the same direction as the node ordering in memory? Or am I missing something that would make this unnecessary (e.g. the axis descriptor min/max being possible to set in reversed order?)
- Regarding the I/J/K axis description system:
a) Is there any specific mapping that is required/expected between the I/J/K labels and the 0/1/2 axis numbering? Or is it possible that I might find (say) one dataset where axis 2 is the K axis, and another dataset where axis 0 is the K axis (and so on) ?
b) In the transformation from axes to world coordinates using the metadata, are the world Z-coordinates always in the downward sense (i.e. more positive values are farther underground) as is stated to be the case with the inline/crossline/sample system? If not, how can I tell whether the Z-coordinate axis points upward or downward?
c) In the I/J/K system, do the axis descriptors' GetCoordinateMin()/Max()
accessors return anything meaningful? (Since it would seem that the I/J/K axes are defined completely by the origin and step metadata, and by the axes' GetNumSamples()
getters?) If so, in what way would they be used?
d) Should I expect that all VDS datasets with the I/J/K axis description system have the same handedness for the I/J/K axes (which?), or is this not guaranteed? For the inline/crossline/sample system I have found datasets with both chiralities.
- Basically the same questions as (3a,b) for the X/Y/Z axis description system.
I'm not aware of any VDS datasets that exhibit the I/J/K or X/Y/Z coordinate systems; if there are public datasets available that do so, a pointer would be enormously appreciated!
- It appears that the only units for Z coordinates that are supported are milliseconds, meters, and feet (and also apparently US survey feet?). I'm unclear what happens on attempting to create an OpenVDS dataset having a vertical axis with a different unit -- e.g. "fathoms" or "km" or "seconds". Is it allowed but unsupported (and if so is it round-trippable)? Or will it provoke an exception or crash?
Again, thanks so much for your help!