Delete duplicates GPS coordinates in column in each row

我只是一个虾纸丫 提交于 2019-12-11 18:42:49

问题


I have a column with gps coordinates, in each row a set of geo-polygon coordinates. Most lines have duplicate gps coordinates (complete coincidence of longitude and latitude in one column).

Example:

MULTIPOLYGON 23.453411011874813 41.74245395132344 23.453972640029299 41.74214208390741 23.453977029220994 41.741827739090233 23.454523642352295 41.741515869012523 23.441100249526403 41.741203996333724 23.441661846243466 41.740892121053918 23.456223434003668 41.74058024317317 23.441661846243466 41.740892121053918

I need to remove duplicate coordinates (bold)

I'm using teradata 16.20.32.17

Thank you!


回答1:


Have a look at SimplifyPreserveTopology, it's not exactly removing duplicates, but probably close to what you want:

Simplifies a geometry by removing points that would fall within a specified distance tolerance.

The simplification always returns a valid geometry. Simplified geometries require less storage space and fewer spatial operations during geospatial manipulations. Consequently operations on simplified geometries generally perform faster. Smaller tolerance values result in a geometry closer to the input geometry, but will remove fewer vertices. Larger tolerance values will remove more vertices, but the resulting simplified geometry will be less similar to the original input.



来源:https://stackoverflow.com/questions/58767209/teradata-function-for-delete-duplicates-gps-coordinates-in-cell-data-type-st-ge

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!