|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Runtime.InteropServices;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
namespace Construction.BatchCreateMap
|
|
|
{
|
|
|
public class ModelCreateCurvature
|
|
|
{
|
|
|
//#if DEBUG
|
|
|
// //const string DLL_FILE = @"C:\GeoIntelligent\Code\dirgdf\bin\Debug\WellCalibrate.dll";
|
|
|
// public const string DLL_FILE = "ModelCreateIDW.dll";
|
|
|
//#else
|
|
|
// public const string DLL_FILE = "ModelCreateIDW.dll";
|
|
|
//#endif
|
|
|
// [DllImport(DLL_FILE, EntryPoint = "IDWModelCreate", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
|
|
|
// public static extern void IDWModelCreate(string xyzFile, string borderFile, string faultFile, string resultFile,
|
|
|
// int XCount, double smoothFactor, int smoothTimes, IntPtr callback,
|
|
|
// int insertTimes /*= 0*/, double contourStep, int contourMarkSpace
|
|
|
// , double xMin = -1, double yMin = -1, double xMax = -1, double yMax = -1);
|
|
|
|
|
|
const string SURFACEGRIDLIB = @"SurfaceGrid.dll";
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
* \param sourcePointFile 离散点源数据文件(xyz 格式)
|
|
|
* \param faultFile 断层(fault,不存在z数据)区域数据文件,支持 bln文件、dfd文件
|
|
|
*
|
|
|
* \param outputFile 迭代输出结果文件
|
|
|
* \return
|
|
|
*/
|
|
|
[DllImport(SURFACEGRIDLIB, EntryPoint = "BuildMinCurvatureInterpolationGrid", CharSet = CharSet.Unicode, ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern bool BuildMinCurvatureInterpolationGrid(string sourcePointFile, string faultFile, string outputFile);
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
* \param sourcePointFile 离散点源数据文件(xyz 格式)
|
|
|
* \param faultFile 断层(fault,不存在z数据)区域数据文件,支持 bln文件、dfd文件
|
|
|
*
|
|
|
* \param xNodeCount 插值网格x坐标上网格节点数,默认101个(100个网格)
|
|
|
* \param yNodeCount 插值网格y坐标上网格节点数,默认101个(100个网格)
|
|
|
*
|
|
|
* \param faultEdgeLevel 添加断层数据标记位到输出文件中,添加标记位有不同的等级(0~4), 默认为不添加
|
|
|
* \param outputFile 迭代输出结果文件
|
|
|
* \return
|
|
|
*/
|
|
|
[DllImport(SURFACEGRIDLIB, EntryPoint = "BuildMinCurvatureInterpolationGrid2", CharSet = CharSet.Unicode, ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern bool BuildMinCurvatureInterpolationGrid2(string sourcePointFile, string faultFile, ulong xNodeCount, ulong yNodeCount, int faultEdgeLevel, string outputFile);
|
|
|
|
|
|
/**
|
|
|
* \param sourcePointFile 离散点源数据文件(xyz 格式)
|
|
|
* \param faultFile 断层(fault,不存在z数据)区域数据文件,支持 bln文件、dfd文件
|
|
|
*
|
|
|
* \param xNodeCount 插值网格x坐标上网格节点数,默认101个(100个网格)
|
|
|
* \param yNodeCount 插值网格y坐标上网格节点数,默认101个(100个网格)
|
|
|
* \param maxIteration 最大迭代次数,默认20000次
|
|
|
* \param residual 迭代容忍度指标, 默认为 0.01%
|
|
|
* \param fillValue 迭代填充值,对于迭代过程中没有数据的点使用填充值填充,默认为 0.0
|
|
|
*
|
|
|
* \param faultEdgeLevel 添加断层数据标记位到输出文件中,添加标记位有不同的等级(0~4), 默认为不添加
|
|
|
* \param outputFile 迭代输出结果文件
|
|
|
* estimateFactor 默认值 0
|
|
|
* cornerWeight 默认值 64
|
|
|
* \return
|
|
|
*/
|
|
|
//[DllImport(SURFACEGRIDLIB, EntryPoint = "BuildMinCurvatureGrid3", CharSet = CharSet.Unicode, ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
|
|
|
[DllImport(SURFACEGRIDLIB, EntryPoint = "BuildMinCurvatureGrid3", CharSet = CharSet.Unicode, ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
|
|
|
public static extern bool BuildMinCurvatureGrid3(string sourcePointFile, string faultFile, string borderFile
|
|
|
, ulong xNodeCount, /*ulong yNodeCount,*/ int maxIteration, double residual, double fillValue, int faultEdgeLevel, string outputFile
|
|
|
, int estimateFactor, int cornerWeight
|
|
|
, double contourStep, int contourMarkStep, int insertTimes
|
|
|
, double xMin = -1.0, double yMin = -1.0, double xMax = -1.0, double yMax = -1.0);
|
|
|
}
|
|
|
}
|