You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kev/Drawer/GVision/BatchCreateMap/GridCreateParameterBase.cs

314 lines
8.2 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Construction.BatchCreateMap
{
/// <summary>
/// 网格化基础参数.
/// </summary>
public class GridCreateParameterBase
{
private int m = 80;
private int n = 40;
private double xStep;
private double yStep;
[Category("\t\t\t基础数据")]
[DisplayName("\t\t\t\t\t\t\t\t名称")]
[ReadOnly(true)]
public string DataName { get; set; }
[Browsable(false)]
public GeoDataType DataType { get; set; }
/// <summary>
/// Gets or sets X网格数.
/// </summary>
/// <value>The m.</value>
[Category("\t\t\t基础数据")]
[DisplayName("\tX网格数")]
[ReadOnly(true)]
public int M
{
get
{
return this.m;
}
set
{
this.m = value;
this.xStep = (this.XMax - this.XMin) / value;
}
}
/// <summary>
/// Gets or sets Y网格数.
/// </summary>
/// <value>The n.</value>
[Category("\t\t\t基础数据")]
[DisplayName("\tY网格数")]
[ReadOnly(true)]
public int N
{
get
{
return this.n;
}
set
{
this.n = value;
this.yStep = (this.YMax - this.YMin) / value;
}
}
/// <summary>
/// 加密后网格数
/// </summary>
[Category("计算参数")]
[DisplayName("\t\t加密Y网格数")]
[ReadOnly(true)]
public int RefinedN
{
get
{
int nFactor = (int)Math.Pow(2, this.Times);
return (this.n * nFactor) - (nFactor - 1);
}
}
/// <summary>
/// 加密后X网格数
/// </summary>
[Category("计算参数")]
[DisplayName("\t\t\t加密X网格数")]
[ReadOnly(true)]
public int RefinedM
{
get
{
int nFactor = (int)Math.Pow(2, this.Times);
return (this.m * nFactor) - (nFactor - 1);
}
}
/// <summary>
/// 加密后网格数
/// </summary>
[Category("计算参数")]
[DisplayName("加密Y间隔")]
[ReadOnly(true)]
public double RefinedYStep
{
get
{
// return (this.YMax - this.YMin) / this.RefinedN;
return this.yStep / Math.Pow(2, this.Times);
}
}
/// <summary>
/// 加密后X网格数
/// </summary>
[Category("计算参数")]
[DisplayName("\t加密X间隔")]
[ReadOnly(true)]
public double RefinedXStep
{
get
{
// return (this.XMax - this.XMin) / this.RefinedM;
return this.xStep / Math.Pow(2, this.Times);
}
}
/// <summary>
/// Gets or sets the x step.
/// </summary>
/// <value>The x step.</value>
[Category("\t\t参数")]
[DisplayName("\t\t\t\tX间隔")]
public double XStep
{
get
{
return this.xStep;
}
set
{
this.xStep = value;
this.m = (int)(((this.XMax - this.XMin) / this.xStep) + 1 + 0.5);
}
}
[Category("\t\t\t基础数据")]
[DisplayName("\t\t\t\tZ最小"), ReadOnly(true)]
public double ZMin { get; set; } = 0;
[Category("\t\t\t基础数据")]
[DisplayName("\t\t\tZ最大"), ReadOnly(true)]
public double ZMax { get; set; } = 0;
/// <summary>
/// Gets or sets the y maximum.
/// </summary>
/// <value>The y maximum.</value>
[Category("\t\t\t基础数据")]
[DisplayName("\t\t\t\tY最大")]
[ReadOnly(true)]
public double YMax { get; set; } = -1;
/// <summary>
/// Gets or sets the times.
/// </summary>
/// <value>The times.</value>
[Category("\t\t参数")]
[DisplayName("\t\t加密次数")]
public int Times { get; set; } = 3;
/// <summary>
/// Gets or sets the smooth.
/// </summary>
/// <value>The smooth.</value>
[Category("\t\t参数")]
[DisplayName("\t光滑度")]
public int Smooth { get; set; } = 8;
///// <summary>
///// Gets or sets the times.
///// </summary>
///// <value>The times.</value>
//[Category("\t\t参数")]
//[DisplayName("断层优先级")]
//public int FaultLevel { get; set; } = 0;
/// <summary>
/// Gets or sets the x maximum.
/// </summary>
/// <value>The x maximum.</value>
[Category("\t\t\t基础数据")]
[DisplayName("\t\t\t\t\t\tX最大")]
[ReadOnly(true)]
public double XMax { get; set; } = -1;
/// <summary>
/// Gets or sets the x minimum.
/// </summary>
/// <value>The x minimum.</value>
[Category("\t\t\t基础数据")]
[DisplayName("\t\t\t\t\t\t\tX最小")]
[ReadOnly(true)]
public double XMin { get; set; } = -1;
/// <summary>
/// Gets or sets the y minimum.
/// </summary>
/// <value>The y minimum.</value>
[Category("\t\t\t基础数据")]
[DisplayName("\t\t\t\t\tY最小")]
[ReadOnly(true)]
public double YMin { get; set; } = -1;
/// <summary>
/// Gets or sets the y step.
/// </summary>
/// <value>The y step.</value>
[Category("\t\t参数")]
[DisplayName("\t\tY间隔")]
public double YStep
{
get
{
return this.yStep;
}
set
{
this.yStep = value;
this.n = (int)(((this.YMax - this.YMin) / this.yStep) + 1 + 0.5);
}
}
/// <summary>
/// Computes the step.
/// </summary>
public void ComputeStep()
{
this.xStep = (this.XMax - this.XMin) / (this.M - 1);
this.yStep = this.xStep; // (this.YMax - this.YMin) / this.N;
this.n = (int)(((this.YMax - this.YMin) / this.yStep) + 1 + 0.5);
}
}
public enum GeoDataType
{
/// <summary>
/// 任意散点
/// </summary>
XYZ,
/// <summary>
/// The time
/// </summary>
Time, // 时间
/// <summary>
/// The deep
/// </summary>
Deep, // 深度
/// <summary>
/// The stratum thickness
/// </summary>
StratumThickness, // 地层厚度
/// <summary>
/// The well sand thickness
/// </summary>
WellSandThickness, // 井砂岩厚度
/// <summary>
/// The well vaild thickness
/// </summary>
WellVaildThickness, // 井有效厚度
/// <summary>
/// The forecast sand thickness
/// </summary>
ForecastSandThickness, // 预测砂岩厚度
/// <summary>
/// The forecast vaild thickness
/// </summary>
ForecastVaildThickness, // 预测有效厚度
/// <summary>
/// The porosity
/// </summary>
Porosity, // 孔隙度
/// <summary>
/// The permeability
/// </summary>
Permeability, // 渗透率
/// <summary>
/// The water saturation
/// </summary>
WaterSaturation, // 含水饱和度
/// <summary>
/// The beam water saturation
/// </summary>
BeamWaterSaturation, // 束水饱和度
/// <summary>
/// The dd
/// </summary>
DD, // 断叠
/// <summary>
/// The gd
/// </summary>
GD, // 构叠
/// <summary>
/// The syb
/// </summary>
SYB, // 砂岩比
}
}