1 |
|
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 |
|
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 |
|
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 |
|
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 |
|
|
53 |
|
* dbflibmodule.c: commit function was incorrectly pointing to |
54 |
|
dbflib_read_record |
55 |
|
|
56 |
|
2007-03-21 Bram de Greve <[email protected]> |
57 |
|
|
58 |
|
* shptreemodule.c: restoring something that shouldn't have been committed. |
59 |
|
|
60 |
|
2007-03-15 Bram de Greve <[email protected]> |
61 |
|
|
62 |
|
* 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]> |
2007-03-15 Bram de Greve <[email protected]> |
87 |
|
|
88 |
* shapelibmodule.c, dbflibmodule.c: added some Unicode support for the |
* shapelibmodule.c, dbflibmodule.c: added some Unicode support for the |