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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26