Discussion:
Remove repeated points with Shapely
(too old to reply)
Denis Rykov
2014-01-20 04:53:56 UTC
Permalink
Raw Message
Hello!

I would like to remove repeated points from geometry (such as
ST_RemoveRepeatedPoints in PostGIS).
It looks like Shapely doesn't have appropriate function, but I've
discovered that I can solve my problem using "simplify" function with 0
tolerance: simplify(0).
Is it right approach?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gispython.org/pipermail/community/attachments/20140120/a13335bd/attachment.htm>
Sean Gillies
2014-01-20 18:11:55 UTC
Permalink
Raw Message
This sounds a bit like the buffer(0) approach to polygon cleaning. If it
works, then it's a good approach. I suspect it would be faster than
traversing the points of a line and removing equivalent ones in Python,
because all the logic would be done in GEOS with no Shapely object overhead.
Post by Denis Rykov
Hello!
I would like to remove repeated points from geometry (such as
ST_RemoveRepeatedPoints in PostGIS).
It looks like Shapely doesn't have appropriate function, but I've
discovered that I can solve my problem using "simplify" function with 0
tolerance: simplify(0).
Is it right approach?
Thanks.
_______________________________________________
Community mailing list
Community at lists.gispython.org
http://lists.gispython.org/mailman/listinfo/community
--
Sean Gillies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gispython.org/pipermail/community/attachments/20140120/b19d34f9/attachment.htm>
Loading...