private List <CCorrCpts> BuildCorrespondences(CPolyline frcpl, CPolyline tocpl) { CLinearInterpolationA pLinearInterpolationA = new CLinearInterpolationA(); List <CPoint> pResultPtLt = pLinearInterpolationA.CLI(frcpl, tocpl); List <CCorrCpts> pCorrCptsLt = CHelpFunc.TransferResultptltToCorrCptsLt(pResultPtLt); return(pCorrCptsLt); }
/// <summary>计算距离值(Translation指标值)</summary> /// <param name="frcpl">大比例尺线段,可以只有一个顶点</param> /// <param name="tocpl">小比例尺线段,可以只有一个顶点</param> /// <returns>距离值</returns> public double CalDistance(CPolyline subfrcpl, CPolyline subtocpl, CPolyline frcpl, CPolyline tocpl) { List <CPoint> cresultptlt = _LinearInterpolationA.CLI(subfrcpl, subtocpl); //每次都相当于处理新的线段,因此使用CLI double dblTranslation = _pTranslation.CalTranslation(cresultptlt); return(dblTranslation); //List<CPoint> cresultptlt = _LinearInterpolationA.CLI(subfrcpl, subtocpl); //每次都相当于处理新的线段,因此使用CLI //double dblCost1 = _pTranslation.CalRatioTranslation(cresultptlt, frcpl, tocpl); //double dblCost2 = _pIntegral.CalRatioIntegral(cresultptlt, frcpl, tocpl); //double dblCost3 = _pLengthDiff.CalRatioLengthDiff(cresultptlt, frcpl, tocpl); //double dblSumCost = dblCost1 + dblCost2 + dblCost3; //return dblSumCost; }
private void DWCorrAtBd(List <CAtBd> pBSAtBdLt, List <CAtBd> pSSAtBdLt, CParameterThreshold ParameterThreshold) { CLinearInterpolationA pLinearInterpolation = new CLinearInterpolationA(); for (int i = 0; i < pBSAtBdLt.Count; i++) { CPolyline frcpl = pBSAtBdLt[i] as CPolyline; CPolyline tocpl = pSSAtBdLt[i] as CPolyline; //CHelpFunc.PreviousWork(ref frcpl, ref tocpl); pBSAtBdLt[i].CResultPtLt = pLinearInterpolation.CLI(frcpl, tocpl); ////By DP Algorithm //_pDPSimplify.DivideCplByDP(pBSAtBdLt[i] as CPolyline, pBSAtBdLt[i].pVirtualPolyline); //_pDPSimplify.DivideCplByDP(pSSAtBdLt[i] as CPolyline, pSSAtBdLt[i].pVirtualPolyline); //C5.LinkedList<CCorrSegment> CorrespondSegmentLk = new C5.LinkedList<CCorrSegment>(); //SubPolylineMatchLA(pBSAtBdLt[i] as CPolyline, pBSAtBdLt[i].pVirtualPolyline, pSSAtBdLt[i] as CPolyline, pSSAtBdLt[i].pVirtualPolyline, ParameterThreshold, ref CorrespondSegmentLk); ////linear interpolation //pBSAtBdLt[i].CResultPtLt = pAlgorithmsHelper.BuildPointCorrespondence(CorrespondSegmentLk, "Linear"); } }