Changeset 1142
- Timestamp:
- 08/28/08 22:02:52
- Files:
-
- Shapely/trunk/shapely/wkt.py (modified) (2 diffs)
- Shapely/trunk/tests/attribute-chains.txt (modified) (1 diff)
- Shapely/trunk/tests/test_doctests.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Shapely/trunk/shapely/wkt.py
r1141 r1142 26 26 def dumps(ob): 27 27 """Dump a WKB representation of a geometry to a byte string.""" 28 writer = lgeos.GEOSWKTWriter_create() 29 func = lgeos.GEOSWKTWriter_write 28 func = lgeos.GEOSGeomToWKT 30 29 def errcheck(result, func, argtuple): 31 30 retval = result.value … … 34 33 func.restype = allocated_c_char_p 35 34 func.errcheck = errcheck 36 wkt = func(writer, ob._geom) 37 lgeos.GEOSWKTWriter_destroy(writer) 38 return wkt 35 return func(ob._geom) 39 36 40 37 def dump(ob, fp): Shapely/trunk/tests/attribute-chains.txt
r1066 r1142 9 9 [(0.0, 0.0), (0.0, 1.0), (-1.0, 1.0), (-1.0, 0.0), (0.0, 0.0)] 10 10 11 >>> print list(p.buffer(1).exterior.coords) 11 >>> from shapely.geometry import Point 12 >>> print list(Point(0.0, 0.0).buffer(1.0).exterior.coords) 12 13 [(0.0, -1.0), (-1.0, -1.0), ... 13 14 Shapely/trunk/tests/test_doctests.py
r1043 r1142 9 9 10 10 def list_doctests(): 11 print __file__ 11 12 return [filename 12 13 for filename
