翻译自:https://www.codeproject.com/Articles/114797/Polyline-Simplification#headingDPN整个记录关于算法的部分是翻译来的,原作者实现的语言是C++,但是我看不懂这类代码,于是自己用Python实现了一遍,其中可能会有错误的地方,欢迎指出来让我改正。fromshapefileimportReader,Writerimportnumpyasnpimportmathimportmatplotlib.pyplotasplt#该shapefile文件内含一条线段,坐标系为:3857shp=Reader('./vector/lyr