Changeset 1008
- Timestamp:
- 01/04/08 11:13:19
- Files:
-
- Shapely/trunk/manual/manual.txt (modified) (1 diff)
- Shapely/trunk/setup.py (modified) (1 diff)
- Shapely/trunk/shapely/wkb.py (modified) (2 diffs)
- Shapely/trunk/shapely/wkt.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Shapely/trunk/manual/manual.txt
r1007 r1008 10 10 :date: 2 January 2008 11 11 12 :copyright: This work is licensed under a `Creative Commons Attribution -Share Alike3.0 United States License`__.13 14 .. __: http://creativecommons.org/licenses/by -sa/3.0/us/12 :copyright: This work is licensed under a `Creative Commons Attribution 3.0 United States License`__. 13 14 .. __: http://creativecommons.org/licenses/by/3.0/us/ 15 15 16 16 :abstract: This document describes the Shapely Python package for programming with geospatial geometries. Shapely/trunk/setup.py
r985 r1008 12 12 13 13 setup(name = 'Shapely', 14 version = '1.0b 3',14 version = '1.0b4', 15 15 description = 'Geospatial geometries, predicates, and operations', 16 16 license = 'BSD', Shapely/trunk/shapely/wkb.py
r750 r1008 5 5 from ctypes import byref, c_int, c_size_t, c_char_p, string_at 6 6 7 from shapely.geos import lgeos, ReadingError7 from shapely.geos import lgeos, free, ReadingError 8 8 from shapely.geometry.base import geom_factory 9 9 … … 26 26 def dumps(ob): 27 27 """Dump a WKB representation of a geometry to a byte string.""" 28 func = lgeos.GEOSGeomToWKB_buf 28 29 size = c_int() 29 bytes = lgeos.GEOSGeomToWKB_buf(ob._geom, byref(size)) 30 return string_at(bytes, size.value) 30 def errcheck(result, func, argtuple): 31 retval = string_at(result, size.value)[:] 32 free(result) 33 return retval 34 func.errcheck = errcheck 35 return func(ob._geom, byref(size)) 31 36 32 37 def dump(ob, fp): Shapely/trunk/shapely/wkt.py
r750 r1008 5 5 from ctypes import byref, c_int, c_size_t, c_char_p, string_at 6 6 7 from shapely.geos import lgeos, ReadingError7 from shapely.geos import lgeos, free, allocated_c_char_p, ReadingError 8 8 from shapely.geometry.base import geom_factory 9 9 … … 26 26 def dumps(ob): 27 27 """Dump a WKB representation of a geometry to a byte string.""" 28 return string_at(lgeos.GEOSGeomToWKT(ob._geom)) 28 func = lgeos.GEOSGeomToWKT 29 def errcheck(result, func, argtuple): 30 retval = result.value 31 free(result) 32 return retval 33 func.restype = allocated_c_char_p 34 func.errcheck = errcheck 35 return lgeos.GEOSGeomToWKT(ob._geom) 29 36 30 37 def dump(ob, fp):
