psimpl - generic n-dimensional polyline simplification 通用N维折线简化程序

Author - Elmar de Koning 作者 - Elmar de Koning
Support - edekoning@gmail.com
Website - http://psimpl.sf.net
Article - http://www.codeproject.com/KB/recipes/PolylineSimplification.aspx
License - MPL 1.1

psimpl
'psimpl' is a c++ polyline simplification library that is generic, easy to use, and supports the following algorithms:

Simplification
+ Nth point - A naive algorithm that keeps only each nth point
+ Distance between points - Removes successive points that are clustered together
+ Perpendicular distance - Removes points based on their distance to the line segment defined
by their left and right neighbors
+ Reumann-Witkam - Shifts a strip along the polyline and removes points that fall outside
+ Opheim - A constrained version of Reumann-Witkam
+ Lang - Similar to the Perpendicular distance routine, but instead of looking only at direct
neighbors, an entire search region is processed
+ Douglas-Peucker - A classic simplification algorithm that provides an excellent approximation
of the original line
+ A variation on the Douglas-Peucker algorithm - Slower, but yields better results at lower resolutions

Errors
+ positional error - Distance of each polyline point to its simplification

All the algorithms have been implemented in a single standalone C++ header using an STL-style
interface that operates on input and output iterators. Polylines can be of any dimension, and
defined using floating point or signed integer data types.

changelog
28-09-2010 - Initial version
23-10-2010 - Changed license from CPOL to MPL
26-10-2010 - Clarified input (type) requirements, and changed the behavior of the algorithms
under invalid input
01-12-2010 - Added the nth point, perpendicular distance and Reumann-Witkam routines; moved all
functions related to distance calculations to the math namespace
10-12-2010 - Fixed a bug in the perpendicular distance routine
27-02-2011 - Added Opheim simplification, and functions for computing positional errors due to
simplification; renamed simplify_douglas_peucker_alt to simplify_douglas_peucker_n
18-06-2011 - Added Lang simplification; fixed divide by zero bug when using integers; fixed a
bug where incorrect output iterators were returned under invalid input; fixed a bug
in douglas_peucker_n where an incorrect number of points could be returned; fixed a
bug in compute_positional_errors2 that required the output and input iterator types
to be the same; fixed a bug in compute_positional_error_statistics where invalid
statistics could be returned under questionable input; documented input iterator
requirements for each algorithm; miscellaneous refactoring of most algorithms.

Class List:

Here are the classes, structs, unions and interfaces with brief descriptions:
psimpl::PolylineSimplification< DIM, InputIterator, OutputIterator >::DPHelper Douglas-Peucker approximation helper class
psimpl::PolylineSimplification< DIM, InputIterator, OutputIterator >::DPHelper::KeyInfo Defines the key of a polyline
psimpl::PolylineSimplification< DIM, InputIterator, OutputIterator > Provides various simplification algorithms for n-dimensional simple polylines
psimpl::util::scoped_array< T > A smart pointer for holding a dynamically allocated array
psimpl::math::Statistics POD structure for storing several statistical values
psimpl::PolylineSimplification< DIM, InputIterator, OutputIterator >::DPHelper::SubPoly Defines a sub polyline
psimpl::PolylineSimplification< DIM, InputIterator, OutputIterator >::DPHelper::SubPolyAlt Defines a sub polyline including its key 

psimpl_v7_win32_demo的更多相关文章

随机推荐

  1. hdu 5730 Shell Necklace——多项式求逆+拆系数FFT

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=5730 可以用分治FFT.但自己只写了多项式求逆. 和COGS2259几乎很像.设A(x),指数是长度,系数 ...

  2. CentOS7上部署https

    目前很多浏览器都加强了html都安全性,要求配置https. 下面都例子是在CentOS7上的Apache配置https都过程. 一.生成证书 用OpenSSL生成key和证书: mkdir /etc ...

  3. CodeReview是开发中的重要一个环节,整理了一些关于jupiter for java

    什么是代码评审(CodeReview)? 代码评审也称代码复查,是指通过阅读代码来检查源代码与编码标准的符合性以及代码质量的活动. Jupiter提供了代码行级别的评审批注功能,方便评审参与人了解具体 ...

  4. Python if-elif-else

    alien_color = ['green','yellow','red']for color in alien_color: if color == 'green': print 'alien_co ...

  5. Maria数据库

    项目上要进行数据库选型,业务上来讲,数据是非常结构化的数据,使用传统关系数据库更适合:另外项目采用微服务框架,每个服务的数据库应该尽可能轻量级, 最后考虑Maria数据库. MariaDB简介: Ma ...

  6. mysql库操作

    一 系统数据库 information_schema: 虚拟库,不占用磁盘空间,存储的是数据库启动后的一些参数,如用户表信息.列信息.权限信息.字符信息等performance_schema: MyS ...

  7. <正则吃饺子> :关于redis集群的搭建、集群测试、搭建中遇到的问题总结

    项目中使用了redis ,对于其基本的使用,相对简单些,根据项目中已经提供的工具就可以实现基本的功能,但是只是这样的话,对于redis还是太肤浅,甚至刚开始时候,集群.多节点.主从是什么,他们之间是什 ...

  8. BurpSuite系列(九)----Comparer模块(比较器)

    一.简介 Burp Comparer在Burp Suite中主要提供一个可视化的差异比对功能,来对比分析两次数据之间的区别.使用中的场景可能是: 1.枚举用户名过程中,对比分析登陆成功和失败时,服务器 ...

  9. clock函数返回负值~ (转)

    使用clock() 函数来进行计时,时不时的返回一个很大的负数,怎么检查也检查不出错误,现在找出错误原因,给大家分享一下. 来源网页:http://kebe-jea.blogbus.com/logs/ ...

  10. CentOS 调用.Net 的Web Service,提示连接超时解决方案

    我是使用axis调用.NET 的Web Service ,在Window下跑没有问题,将项目部署到Linux下,发现Web Service 连接超时,百度了下,发现是因为Linux不能直接跑.Net, ...