1 |
|
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 |
|
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 |
|
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 |
|
|
46 |
|
* dbflibmodule.c: commit function was incorrectly pointing to |
47 |
|
dbflib_read_record |
48 |
|
|
49 |
|
2007-03-21 Bram de Greve <[email protected]> |
50 |
|
|
51 |
|
* shptreemodule.c: restoring something that shouldn't have been committed. |
52 |
|
|
53 |
|
2007-03-15 Bram de Greve <[email protected]> |
54 |
|
|
55 |
|
* 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]> |
2007-03-15 Bram de Greve <[email protected]> |
80 |
|
|
81 |
* shapelibmodule.c, dbflibmodule.c: added some Unicode support for the |
* shapelibmodule.c, dbflibmodule.c: added some Unicode support for the |