/[thuban]/branches/WIP-pyshapelib-bramz/libraries/pyshapelib/ChangeLog
ViewVC logotype

Annotation of /branches/WIP-pyshapelib-bramz/libraries/pyshapelib/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2752 - (hide annotations)
Tue Apr 10 23:45:00 2007 UTC (17 years, 11 months ago) by bramz
File size: 12122 byte(s)
attempt to add support for Unicode and Language Driver ID (LDID) support in dbflib
1 bramz 2752 2007-04-11 Bram de Greve <[email protected]>
2    
3     * dbflibmodule.c, pyshapelib_common.h, setup.py: attempt to add support for
4     Unicode and Language Driver ID (LDID) support in dbflib. Before the strings
5     are send to the underlying shapelib, they are encoded using the code page
6     specified by the database's LDID if present. To know this LDID requires
7     some unofficial modifications to maptools' shapelib. Backwards
8     compatibility is ensured by detecting if this field is present and setting
9     HAVE_LANGUAGE_DRIVER accordingly in setup.py. In absence of the LDID,
10     dbflib assumes a Windows ANSI codepage (cp1252).
11     New or modified functions/attributes of the DBFFile class:
12     - read_record(...), DBFFile.read_attribute(...): modified, now return
13     Unicode strings.
14     - write_record(...) and write_field(...): modified, now accept both regular
15     and Unicode strings but both are encoded.
16     - language_driver (read-only): new, the numerical value of the LDID
17     (exists only if HAVE_LANGUAGE_DRIVER == 1)
18     New or modified functions/constants of the dbflib module:
19     - language_driver_codec(...): added, translates a numerical LDID into the
20     string name of the Python codec used to encode/decode the strings.
21     (exists only if HAVE_LANGUAGE_DRIVER == 1)
22     - language_driver_name(...): added, translates a numerical LDID into a string
23     representing the corresponding constant.
24     (exists only if HAVE_LANGUAGE_DRIVER == 1)
25     - LDID_NOT_SET, LDID_DOS_USA, ...: constants representing language drivers.
26     (existsonly if HAVE_LANGUAGE_DRIVER == 1)
27    
28 bramz 2751 2007-03-29 Bram de Greve <[email protected]>
29    
30     * shapelibmodule.c, dbflibmodule.c, pyshapelib_common.h: added support for
31     Win32 wide character file API. Unicode filenames are now fully supported
32     on the windows platform: for example exotic filenames like the greek letter
33     pi (u"\u03c0"). This is mostly mimicked from Python's fileobject.c, and
34     needed some severe changes in the C++ shapelib library to support the wide
35     filename API. All XOpen and XCreate functions now have XOpenW and XCreateW
36     counterparts plus some common code has been split to XOpenEx and XCreateEx.
37     I hope these modifications might one day end up in an official shapelib
38     release. Meanwhile, compatibility is guaranteed as the specific Unicode
39     code paths are not compiled if the modifications are not found.
40    
41 bramz 2749 2007-03-22 Bram de Greve <[email protected]>
42    
43     * shapelibmodule.c, dbflibmodule.c: in __init__ of ShapeFile and DBFFile,
44     throw proper IOError if opening of file failed.
45 bramz 2750
46     * dbflibmodule.c: commit function was incorrectly pointing to
47     dbflib_read_record
48 bramz 2749
49 bramz 2747 2007-03-21 Bram de Greve <[email protected]>
50    
51     * shptreemodule.c: restoring something that shouldn't have been committed.
52    
53 bramz 2744 2007-03-15 Bram de Greve <[email protected]>
54    
55 bramz 2745 * shapelib.c: When creating measured shapes (XYM), treat M value
56     value as optional (defaults to zero). Similar for
57     3D shapes (XYZM), threat both the Z and M value as options
58     (both default to zero). When M values are to be given,
59     None is accepted as "no-data" value, and is stored as zero
60     (ESRI shapefile specs define any M value smaller than 1e-38
61     as no-data). Added an unpack_vertex() function to lift some
62     of the load of shpobject_init. Fixed a missing break and
63     PyMem_Free in build_vertex_list(), shapefile_init() and
64     shapelib_create().
65    
66     * dbflibmodule.c: Added support for the FTLogical field type.
67    
68     * shapelibmodule.c, dbflibmodule.c: Added 'name' and 'mode'
69     keywords for ShapeFile and DBFFile constructors and the module's
70     open() function, similiar to Python's file(). Reformatted
71     the doc strings to have a standard look and feel when parsed
72     through pydoc.
73    
74     * shapelib_common.h: added no-data constants.
75    
76     * pytest.py: Added tests for multipatch shapefile with XYZM values.
77     Added tests for FTLogical field.
78    
79     2007-03-15 Bram de Greve <[email protected]>
80    
81 bramz 2744 * shapelibmodule.c, dbflibmodule.c: added some Unicode support for the
82     filenames (no internal encoding for DBFFile yet). It now should similar
83     Unicode support Python's file() (concerning the filename, that is).
84    
85 bramz 2742 2007-03-14 Bram de Greve <[email protected]>
86 bramz 2735
87 bramz 2743 * shapelibmodule.c: added support for shapetypes with Z and M values
88    
89     2007-03-14 Bram de Greve <[email protected]>
90    
91 bramz 2742 * dbflibmodule.c, dbflib.i: replaced dbflib.i by dbflibmodule.c to use
92     hand-crafted Python bindings instead of SWIG generated ones
93    
94     * shapelibmodule.c, shapelib.c: Renamed shapelib.c to shapelibmodule.c
95     to match style of dbflibmodule.c and shptreemodule.c. Changed some
96     (well, most) names to match same style.
97    
98     * pyshapelib_common.h: do all necessary includes here
99    
100     * setup.py: updated building of dbflib.
101    
102     2007-03-13 Bram de Greve <[email protected]>
103    
104 bramz 2741 * shapelib.c, shapelib_common.h: Added part_types() to SHPObject to
105     return tuple of part types. Added __repr__ operators to return a
106     string that can reconstruct the object using eval()
107    
108     * pytest.py: Added tests for part_types() and __repr__.
109     Humanized the output a bit.
110    
111 bramz 2742 2007-03-12 Bram de Greve <[email protected]>
112 bramz 2741
113 bramz 2735 * shapelib.c, shapelib.i: replaced shapelib.i by shapelib.c to use
114     hand-crafted Python bindings instead of SWIG generated ones.
115    
116     * pyshapelib_common.h: New file with some common stuff for both
117     shapelib and dbflib
118    
119     * pyshapelib_api.h, setup.py: import/build shapelib instead of shapelibc
120    
121 bernhard 2704 2006-09-24 Bernhard Reiter <[email protected]>
122    
123 bernhard 2706 * dbflib_wrap.c, README: Checked for python version >= 2.4.0a0
124     before using &PyOS_ascii_atof.
125    
126     2006-09-24 Bernhard Reiter <[email protected]>
127    
128 bernhard 2704 Added dirty workaround to make dbflib agnostic
129     against decimal_poinst != ".\0".
130    
131     * dbflib_wrap.c: Added call DBFSetatof_function(&PyOS_ascii_atof);
132     to initdbflibc().
133     * README: noted that manual editing of dbflib_wrap.c is necessary now.
134    
135 bh 2637 2005-06-30 Bernhard Herzog <[email protected]>
136    
137     * shapelib.i (new_SHPObject): Fix the test for the length of the
138     part types. It used the wrong variable.
139    
140     * shapelib_wrap.c: Regenerated from shapelib.i
141    
142     * pytest.py (make_shapefile): Add some more comments and add an
143     example with a polygon with a hole.
144    
145 bernhard 2510 2004-12-27 Bernhard Reiter <[email protected]>
146    
147     * README: Refering to the new homepage shapelib.maptools.org now.
148    
149 bh 2453 2004-12-13 Bernhard Herzog <[email protected]>
150    
151     * dbflib.py: Updated from difflib.i with SWIG.
152    
153     * dbflib.i: Work around a bug in the generated python code which
154     leads to exception in the __del__ method when the constructor
155     fails. See the comments in the code for more details.
156    
157 bh 2223 2004-05-28 Bernhard Herzog <[email protected]>
158    
159 bh 2227 * README: Flesh out the some more. Correct the shapelib
160     requirements.
161    
162     * NEWS: Update the date of the actual release of 0.3
163    
164     2004-05-28 Bernhard Herzog <[email protected]>
165    
166 bh 2223 * setup.py: Determine shp_dir correctly when run with bdist_rpm
167     (dbf_macros): Remove a debug print
168    
169     * NEWS: Also mention the new (compared to 0.2) setup.py
170    
171     * MANIFEST.in: New. Define which files belong into a source
172     distribution
173    
174 bh 2213 2004-05-17 Bernhard Herzog <[email protected]>
175    
176     * README: Update for new release
177    
178     * setup.py (dbf_macros): New. Return the preprocessor macros
179     needed to compile the dbflib wrapper. Determine whether
180     DBFUpdateHeader is available and define the right value of
181     HAVE_UPDATE_HEADER
182     (extensions): Use dbf_macros for the dbflibc extension
183    
184     * dbflib_wrap.c, dbflib.py: Update from dbflib.i
185    
186     * dbflib.i (DBFInfo_commit): New. Implementation of the commit
187     method. This new indirection is necessary because we use the
188     DBFUpdateHeader function now which is not available in shapelib <=
189     1.2.10
190     (DBFFile::commit): Use DBFInfo_commit as implementation
191     (pragma __class__): New. Kludge to remove the commit method when
192     the DBFUpdateHeader function isn't available
193     (_have_commit): New. Helper for the pragma kludge.
194    
195 bh 1920 2003-11-03 Bernhard Herzog <[email protected]>
196    
197     * dbflib.i (do_read_attribute): New helper function for reading
198     one attribute as a python object
199     (DBFInfo_read_attribute): New. Implement the read_attribute method
200     (DBFInfo_read_record): Use do_read_attribute to read the
201     individual values
202     (struct DBFFile): Add the read_attribute method.
203    
204     * dbflib_wrap.c, dbflib.py: Update from dbflib.i.
205    
206 bh 1763 2003-09-29 Bernhard Herzog <[email protected]>
207    
208     * dbflib.i: Add exception typemap for the add_field method. Fixes
209     Thuban bug RT#1842
210    
211     * dbflib_wrap.c: Update from dbflib.i
212    
213     * testdbf.py: New. Test cases for the dbflib bindings based on the
214     unittest module
215    
216 jan 1611 2003-08-18 Bernhard Herzog <[email protected]>
217    
218     * dbflib.i (DBFInfo_write_record): Use PySequence_Check instead of
219     PyMapping_Check to distinguish between sequences and mappings
220     because in Python 2.3, PyMapping_Check returns true for tuples and
221     lists too.
222    
223     2003-05-28 Bernhard Herzog <[email protected]>
224    
225     * dbflib.i (DBFInfo_read_record): Read NULL fields as None unless
226     it's a string field. DBF files can't distinguish between NULL and
227     an empty string. Also, check the return value of
228     DBFReadStringAttribute which may return NULL to indicate errors.
229    
230     * dbflib_wrap.c: Updated from dbflib.i
231    
232     2002-08-27 Bernhard Herzog <[email protected]>
233    
234     * dbflib.i: Raise an exception if open or create fails.
235    
236     * shapelib.i: Slightly better wording for the IOError exception
237     that open and create may raise.
238    
239     * shapelib_wrap.c, dbflib_wrap.c: Regenerated
240    
241     2002-08-22 Bernhard Herzog <[email protected]>
242    
243     * dbflib.i (DBFFile::commit): New method for DBFCommit.
244    
245     * dbflib_wrap.c, dbflib.py: Update from dbflib.i
246    
247     2002-08-15 Bernhard Herzog <[email protected]>
248    
249     * shapelib.i, dbflib.i: Make the NOCHECK trick for the ShapeFile *
250     check typemap work with SWIG 1.3.
251    
252     * shapelib_wrap.c, dbflib_wrap.c: Regenerate from the .i files.
253    
254     2002-05-10 Bernhard Herzog <[email protected]>
255    
256     * dbflib.i (DBFInfo_write_record): Only DECREF if the return value
257     of PyMapping_GetItemString is not NULL. Also, test the return
258     value of PySequence_GetItem
259     (write_field): Remove some debug prints
260    
261     * dbflib_wrap.c: Updated from dbflib.i
262    
263     2002-05-07 Bernhard Herzog <[email protected]>
264    
265     * shptreemodule.c (SHPTreeType, initshptree): Set SHPTreeType's
266     PyType_Type pointer in the init function.
267     (shptree_methods): Use METH_VARARGS
268     (shptree_dealloc): Use PyMem_DEL
269     (shptree_find_shapes): Add a missing return
270    
271     2002-05-07 Bernhard Herzog <[email protected]>
272    
273     * shptreemodule.c: New file with a simple wrapper for shapelib's
274     quadtree
275    
276     * setup.py: Some fixes to use explicit forward slashes as
277     directory separators because of distutils.
278     (extensions): Add the shptree module.
279    
280     * pytest.py (read_shapefile): Add some demo calls for the shptree
281     module
282    
283     * pyshapelib_api.h (PyShapeLibAPI): Add some of the shptree
284     functions.
285     (PYSHAPELIB_IMPORT_API): New macro to import the API
286    
287     * shapelib.i (the_api): add the tree API functions.
288    
289     * shapelib_wrap.c: Updated from shapelib.i with SWIG.
290    
291     2002-04-11 Bernhard Herzog <[email protected]>
292    
293     * pyshapelib_api.h: New file with a limited C-level API for
294     accessing shapilib functions from other Python-extensions.
295    
296     * shapelib.i: Export the C-level API with the c_api function.
297    
298     * shapelib.py, shapelib_wrap.c: Updated from shapelib.i. Still
299     done with a very old version of SWIG, but it's probably not worth
300     it to try it with a newer version as long as this still works.
301    
302     2001-07-18 Bernhard Herzog <[email protected]>
303    
304     * shapelib.i (open_ShapeFile): declare the swig prototype
305     correctly with ShapeFile* as return type
306     (ShapeFile.cobject): New method returning the SHPHandle* as a
307     CObject
308    
309     * Makefile (VERSION): Increase to 0.3
310    
311     * setup.py, MANIFEST.in: New files for python distutils.
312    
313     2001-06-15 Bernhard Herzog <[email protected]>
314    
315     * Makefile (VERSION): Increase to 0.2
316    
317     2001-06-14 Bernhard Herzog <[email protected]>
318    
319     * shapelib.i: Add the functions SHPTypeName as type_name and
320     SHPPartTypeName as part_type_name
321     (SHPObject_vertices):
322     (build_vertex_list): Put building a list of vertices into the
323     separate function build_vertex_list so that SHPObject_vertices can
324     support SHPT_POINT too.
325    
326     * ChangeLog: create ChangeLog
327    

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26