问题
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