Changeset 1142

Show
Ignore:
Timestamp:
08/28/08 22:02:52
Author:
seang
Message:

Add WKT delocalization test and back out switch to the new GEOS WKT writer

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Shapely/trunk/shapely/wkt.py

    r1141 r1142  
    2626def dumps(ob): 
    2727    """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 
    3029    def errcheck(result, func, argtuple): 
    3130        retval = result.value 
     
    3433    func.restype = allocated_c_char_p 
    3534    func.errcheck = errcheck 
    36     wkt = func(writer, ob._geom) 
    37     lgeos.GEOSWKTWriter_destroy(writer) 
    38     return wkt 
     35    return func(ob._geom) 
    3936 
    4037def dump(ob, fp): 
  • Shapely/trunk/tests/attribute-chains.txt

    r1066 r1142  
    99    [(0.0, 0.0), (0.0, 1.0), (-1.0, 1.0), (-1.0, 0.0), (0.0, 0.0)] 
    1010 
    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) 
    1213    [(0.0, -1.0), (-1.0, -1.0), ... 
    1314 
  • Shapely/trunk/tests/test_doctests.py

    r1043 r1142  
    99 
    1010def list_doctests(): 
     11    print __file__ 
    1112    return [filename 
    1213            for filename