Toblerity/Shapely — pull request #201 by snorfalorpagus (2014-11-25 23:58:25+00:00)
Title: Implementing GEOSSnap function.

This commit adds support for the GEOSSnap function added in GEOS 3.3.0:

http://trac.osgeo.org/geos/browser/tags/3.4.2/NEWS#L175

Usage is given below. Documentation is included, and the manual has been updated (more work than the actual implementation, which is 6 lines...)

```
>>> square = Polygon([(1,1), (2, 1), (2, 2), (1, 2), (1, 1)])
>>> line = LineString([(0,0), (0.8, 0.8), (1.8, 0.95), (2.6, 0.5)])
>>> result = snap(line, square, 0.5)
>>> result.wkt
'LINESTRING (0 0, 1 1, 2 1, 2.6 0.5)'
```