如何将海燕的测井测量深度转换为海洋中的英尺?

发布于 2024-11-06 00:01:06 字数 273 浏览 5 评论 0原文

我想将测井记录从 Slb.Ocean.Petrel.DomainObject.Well.WellLog 导出到外部文件,但我得到的测量深度以米为单位,即使项目设置为用脚。

我可以使用我获得的转换器来转换测井样本:

var converter = PetrelUnitSystem.GetConverterToUI(wellLog.WellLogVersion.UnitMeasurement);

如何获取测量深度的转换器?

I want to export a well log from a Slb.Ocean.Petrel.DomainObject.Well.WellLog to an external file, but the the measured depth I get is in meters even if the project is set up to use feet.

I can convert the well log samples with the converter I get from:

var converter = PetrelUnitSystem.GetConverterToUI(wellLog.WellLogVersion.UnitMeasurement);

How do I get a converter for the measured depth?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ゝ杯具 2024-11-13 00:01:06

Hallgrim,

您可以获取从不变的 Ocean 单位到 Petrel 显示单位的转换器:

IUnitConverter convertToDisplayMD = PetrelUnitSystem.GetConverterToUI(Domain.MD);

这是一个使用它的示例:

double valueToConvert = 3;

IUnit displayMD = PetrelUnitSystem.GetDisplayUnit(Domain.MD.Template);
IUnit oceanMD = PetrelUnitSystem.GetInvariantUnit(Domain.MD.Template);

PetrelLogger.InfoOutputWindow("converting " + valueToConvert.ToString() + 
" from: the Ocean unit for measured depth " + oceanMD.Symbol + 
" to: " + displayMD.Symbol + " = " + convertToDisplayMD.Convert(valueToConvert));

Petrel 消息日志中的输出将是:

“将 3 从测量深度 m 的海洋单位转换为:ft =
9.84251968503937"

,用于测量深度(以英尺为单位)的项目。

Hallgrim,

You can get a converter from the invariant Ocean unit to the Petrel display unit:

IUnitConverter convertToDisplayMD = PetrelUnitSystem.GetConverterToUI(Domain.MD);

Here is an example using it:

double valueToConvert = 3;

IUnit displayMD = PetrelUnitSystem.GetDisplayUnit(Domain.MD.Template);
IUnit oceanMD = PetrelUnitSystem.GetInvariantUnit(Domain.MD.Template);

PetrelLogger.InfoOutputWindow("converting " + valueToConvert.ToString() + 
" from: the Ocean unit for measured depth " + oceanMD.Symbol + 
" to: " + displayMD.Symbol + " = " + convertToDisplayMD.Convert(valueToConvert));

The output in the Petrel Message log will be:

"converting 3 from: the Ocean unit for measured depth m to: ft =
9.84251968503937"

, for a project having measured depth in feet.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文