基于CGAL高效生成TIN网
来源:互联网 发布:横道世之介 知乎 编辑:程序博客网 时间:2024/05/19 13:21
CGAL生成TIN网效率很高
参考文档:
http://doc.cgal.org/latest/Triangulation_2/index.html#Chapter_2D_Triangulations
处理核心代码如下:
#include <iostream>using namespace std;#include <fstream>#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>#include <CGAL/Delaunay_triangulation_2.h>typedef CGAL::Exact_predicates_inexact_constructions_kernel K;typedef CGAL::Delaunay_triangulation_2<K> Triangulation;typedef Triangulation::Point Point;int main() { //测试数据 std::ifstream in("triangulation_prog1.cin"); //读入测试数据 std::istream_iterator<Point> begin(in); std::istream_iterator<Point> end; //通过文件添加 Triangulation t; t.insert(begin, end); //这里已经形成了TIN网 //直接添加 Triangulation::Point pt(10, 6); t.push_back(pt); //输出点的数目 cout<<"t size = "<<t.number_of_vertices()<<endl; //获取每个face(TIN) //输出面的数目 cout<<"face count = "<<t.number_of_faces()<<endl; Triangulation::Face_iterator fi = t.faces_begin(); //三角形迭代器 int nFaceCount = 0; for (fi = t.faces_begin(); fi!=t.faces_end(); fi++) { nFaceCount++; cout<<"tri id "<<nFaceCount<<" = \t"; //输出三角形的每个顶点 for (int i=0; i<=2; i++) { cout<<fi->vertex(i)->point()<<"; "; } cout<<endl; } return 0;}
输入数据 triangulation_prog1.cin :
输出结果:
4w5个珠海市POIs形成的TIN网 (运算时间:1分钟):
0 0
- 基于CGAL高效生成TIN网
- 基于ArcEngine由散点生成featureclass,再生成tin
- 利用C#生成一个简单的TIN三角网
- ArcEngine由点生成TIN
- ArcEngine下TIN生成等高线
- Tin网滤波
- 不规则三角网(TIN)
- 不规则三角网(Tin)
- CGAL
- CGAL
- ArcGIS地形分析--TIN及DEM的生成,TIN的显示
- 等高线生成TIN时的flat triangle问题
- ArcGIS 高程点-TIN-DEM-等高线生成问题
- ArcGIS中如何用CAD格式数据生成TIN模型
- ArcGIS如何加载XYZ文本文件,进而生成Tin
- 地形建模(一)——TIN地形的生成
- TIN不规则三角网连接程序
- windows8 下基于vs2013开发环境CGAL配置(cmake,cgal,qt.boost,qglviewer)教程
- 公司搬家
- Ajax的常用框架有哪些?
- j2ee学习路线
- JAR包
- 计算机视觉相关牛人博客
- 基于CGAL高效生成TIN网
- OkHttp使用教程
- hibernate主键(generator)生成方式
- 互联网金融时代的基础设施——征信
- c++对map进行排序
- 经典算法-兵兵球比赛
- Paste模块的世界
- Ant详解
- Android RecycleView上拉加载