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. bzoj 3501 PA2008 Cliquers Strike Back——贝尔数

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=3501 用贝尔三角形 p^2 地预处理 p 以内的贝尔数.可以模(mod-1)(它是每个分解下 ...

  2. 洛谷 1155 (NOIp2008)双栈排序——仔细分析不合法的条件

    题目:https://www.luogu.org/problemnew/show/P1155 这道题教会我们要多思考. 好好分析过后发现同一个栈里不能有升序.就用它写了一个30分. #include& ...

  3. mysql 执行批量的sql

    <?xml version="1.0" encoding="utf-8" ?> <dbconfig> <!-- 数据库驱动 --& ...

  4. Java 传递可变参数和方法重载

    形式:类型... 参数名 示例:public void show(int... a) {}; 可变参数在方法中被当作数组来处理 可变参数传值的四种方式: 一个值也不传,可变参数会接收到长度为0的数组 ...

  5. 如何删除xcode 中过期的描述性文件

    1.使用终端 首先 打开终端 cd ~/Library/MobileDevice/Provisioning\ Profiles/再删除所有 rm *.mobileprovision 2.直接找到文件夹 ...

  6. 深入浅出MFC学习笔记 消息

    本章将会对MFC的消息映射和 命令传递机制做深入探讨. MFC规定了消息传递的路线,消息会按照这个路线传递下去,找不到归宿的话就交给DefWindowProc. 在产生窗口之前,如果我们在创建窗口时指 ...

  7. (转)Oracle存储过程中的事务

    本文转载自:http://www.cnblogs.com/linjiqin/archive/2011/04/18/2019990.html 1.事务用于确保数据的一致性,由一组相关的DML语句组成,该 ...

  8. VisualGDB:使用VS创建CMake Linux项目

    转载地址:点击打开链接 根据VisualGDB官网(https://visualgdb.com)的帮助文档大致翻译而成.主要是作为个人学习记录.有错误的地方,Robin欢迎大家指正. 本文介绍如何使用 ...

  9. 1052 Linked List Sorting

    题意:链表排序 思路:题目本身并不难,但是这题仔细读题很重要.原题中有一句话,"For each case, the first line contains a positive N and ...

  10. 文件操作方法大全以及文件打开的其他一些模式sys.stdout.write()就是标准输出到你当前的屏幕 sys.stdout.flush()把内存立即显示到您当前的屏幕

    read()会让你读取的光标变成最后.tell()把你现在文件的句柄的指针打印出来.文件的开头指针位置是0f.read(5)只读取5个字符串个数如果你想把光标移回去,移动到首位f.seek(0)f.d ...