private List <CPoint> GenerateFieldCpt(CDCEL pDCEL) { CEnvelope pEnvelope = pDCEL.pEdgeGrid.pEnvelope; double dblCellSize = pDCEL.pEdgeGrid.dblCellWidth / 3; int intRow = Convert.ToInt32(Math.Truncate(pEnvelope.Height / dblCellSize)) + 1; int intCol = Convert.ToInt32(Math.Truncate(pEnvelope.Width / dblCellSize)) + 1; List <CPoint> FieldCptLt = new List <CPoint>(intRow * intCol); double dblX = pEnvelope.XMin; double dblY = pEnvelope.YMin; int intCount = 0; for (int i = 0; i < intRow; i++) { dblX = pEnvelope.XMin; for (int j = 0; j < intCol; j++) { FieldCptLt.Add(new CPoint(intCount, dblX, dblY)); dblX += dblCellSize; intCount++; } dblY += dblCellSize; } pDCEL.DetectCloestLeftCorrectCEdge(FieldCptLt); return(FieldCptLt); }
private CPolygon DetectFaceForSg(CPolyline SgCpl, CDCEL pInterLSDCEL) { var identitycpt = CGeoFunc.GetInbetweenCpt(SgCpl.CptLt[0], SgCpl.CptLt[1], 0.5); //comparing to the method which traverses along DCEL, this method only needs to detect the face once return(pInterLSDCEL.DetectCloestLeftCorrectCEdge(identitycpt).cpgIncidentFace); }