OpenZGY/C++ API and Internals (ALPHA)
Access seismic data stored in ZGY format.
impl
enum.h
Go to the documentation of this file.
1
// Copyright 2017-2020, Schlumberger
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#pragma once
16
17
#include <array>
18
#include <cstdint>
19
#include <memory>
20
#include <functional>
21
33
namespace
InternalZGY
{
34
#if 0
35
}
36
#endif
37
38
/*
39
* The following type aliases are needed in class ZgyInternalBulk,
40
* GenLodBase, CompressFactoryImpl, *CompressPlugin, and possibly
41
* others. Might as well declare them directly in the InternalZGY
42
* namespace instead of duplicating the definitions in each class
43
* that uses them.
44
*
45
* The aliases are also used in the public api, in class ZgyWriterArgs
46
* and IZgyMeta. Those places the typedefs are duplicated.
47
*/
48
60
typedef
std::array<std::int64_t,3>
index3_t
;
61
71
typedef
std::pair<std::shared_ptr<const void>, std::int64_t>
rawdata_t
;
72
84
typedef
std::function<
rawdata_t
(
const
rawdata_t
&,
const
index3_t
&)>
compressor_t
;
85
95
enum class
RawDataType
96
{
97
SignedInt8 = 0,
98
UnsignedInt8 = 1,
99
SignedInt16 = 2,
100
UnsignedInt16 = 3,
101
SignedInt32 = 4,
102
UnsignedInt32 = 5,
103
Float32 = 6,
104
IbmFloat32 = 7,
105
};
106
113
enum class
RawCoordType
114
{
115
Unknown = 0,
116
Meters = 1,
117
Feet = 2,
118
ArcSec = 3,
// value = deg*3600 + min*60 + sec
119
ArcDeg = 4,
// value = deg + min/60 + sec/3600
120
ArcDegMinSec = 5,
// value = deg*10000 + min*100 + sec
121
};
122
129
enum class
RawHorizontalDimension
130
{
131
Unknown = 0,
132
Length = 1,
133
ArcAngle = 2,
134
};
135
142
enum class
RawVerticalDimension
143
{
144
Unknown = 0,
145
Depth = 1,
146
SeismicTWT = 2,
147
SeismicOWT = 3,
148
};
149
156
enum class
RawGridDefinition
157
{
158
Unknown = 0,
159
Parametric = 1,
160
ThreePoint = 2,
161
FourPoint = 3,
162
};
163
167
enum class
BrickStatus
168
{
169
Missing = 0,
170
Constant = 1,
171
Normal = 2,
172
Compressed = 3,
173
};
174
212
enum class
UpdateMode
213
{
214
Never = 0,
// Never allow updating. Can only write to "Missing" bricks.
215
216
Constant = 1,
// Can write to both "Missing" and "Constant" bricks. This
217
// permission is needed if the client wants to establish
218
// a default value for missing samples by setting the entire
219
// survey to this default. Followed by writing real data.
220
// "Never" and "Constant" require that the application
221
// writes brick aligned data. If a read/modify/write is
222
// indicated then this will raise an exception.
223
// The only drawback of "Constant" over "Never" is that
224
// "Constant" can cause a slight confusion: A particular
225
// read/modify/write might be allowed if the previous write
226
// just happened to have all constant values.
227
228
//NoCompress = 2, // Not recommended because it gives confusing behavior.
229
// Update is only allowed when both the old and the new
230
// brick is uncompressed. The only leaks allowed are those
231
// caused by the target block being in a closed segment on
232
// the cloud. The problem is that the decision is made
233
// per brick. It is more consistent to decide up front
234
// whether any compression might happen. If so, use
235
// Constant or Never. If not, just use Always.
236
237
//NoLeaks = 3, // Not recommended because it gives confusing behavior.
238
// As "Always" but if it turns out that a brick would be
239
// leaked, even in the rare "closed segment" case, the
240
// code will raise an exception.
241
242
Always = 4,
// Always allow updating. This may cause leaked data in
243
// some cases. Uncompressed local data will not leak.
244
// Uncompressed cloud data can only leak when the target
245
// block being in a closed segment on the cloud.
246
// This can be the default for uncompressed data.
247
// For compressed data it is usually a bad idea.
248
// Not only could there be a lot more leakage, but if
249
// the reason for the overwrite is a read/modify/write
250
// and the data had lossy compression then the
251
// compression noise will accumulate.
252
253
Pedantic = 5,
// As "Always", but when either the existing or the new
254
// brick is compressed then the old brick is leaked
255
// unconditionally. This gives more reproducible behavior
256
// but wastes more space.
257
};
258
259
}
// namespace
InternalZGY::RawCoordType
RawCoordType
Definition:
enum.h:113
InternalZGY::rawdata_t
std::pair< std::shared_ptr< const void >, std::int64_t > rawdata_t
Shared data plus size. No other information.
Definition:
enum.h:71
InternalZGY::UpdateMode
UpdateMode
Definition:
enum.h:212
InternalZGY::RawHorizontalDimension
RawHorizontalDimension
Definition:
enum.h:129
InternalZGY::RawDataType
RawDataType
Definition:
enum.h:95
InternalZGY::RawGridDefinition
RawGridDefinition
Definition:
enum.h:156
InternalZGY::compressor_t
std::function< rawdata_t(const rawdata_t &, const index3_t &)> compressor_t
Function for compressing a brick.
Definition:
enum.h:84
InternalZGY
Implementation not visible to clients.
InternalZGY::RawVerticalDimension
RawVerticalDimension
Definition:
enum.h:142
InternalZGY::index3_t
std::array< std::int64_t, 3 > index3_t
type equivalent to std::int64_t[3]
Definition:
enum.h:60
InternalZGY::BrickStatus
BrickStatus
Definition:
enum.h:167
Generated on Thu Sep 24 2020 12:46:04 for OpenZGY/C++ API and Internals (ALPHA) by
1.8.17