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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2334 - (hide annotations)
Tue Aug 10 19:58:50 2004 UTC (20 years, 6 months ago) by silke
Original Path: trunk/thuban/ChangeLog
File size: 396780 byte(s)
Fixed encoding problem of about dialog: Added function unicodeToLocale() to
convert special characters to users locale encoding

1 silke 2334
2     2004-08-10 Silke Reimer <[email protected]>
3    
4     * Thuban/UI/about.py: Fixed encoding problem of about dialog: Added
5     function unicodeToLocale() to convert special characters to users locale
6     encoding
7    
8 jan 2333 2004-08-10 Jan-Oliver Wagner <[email protected]>
9    
10     * Doc/technotes/coding_guidelines.txt: Added rule 'Method names start with
11     lower case letter'
12    
13 jschuengel 2331 2004-08-09 Jan Schüngel <[email protected]>
14    
15     * ChangeLog: Rewrite the last ChangeLog entry to follow
16     the standard way.
17    
18     * Extensions/umn_mapserver/mapfile: Moved the import AnnotationLayer to
19     the function where it is needed, because it don't works if it stands
20     at the beginning.
21     (MF_Layer.__init__): Removed the extra numclassed variable. Now
22     numclasses from the mapscript will be used.
23     (MF_Layer.get_index): New. Return the index of the layer in mapfile.
24     (MF_Layer.set_classes): New. A Classlist will be set to the layer.
25     (MF_Layer.set_metadata): New. A Metadata mapscript object will set.
26     (MF_Layer.remove_allclasses): New. All class of the layer will remove.
27     (MF_Map.create_new_layer): New. A new Layer is created and associated
28     with the mapscript object.
29     (MF_Map.set_layerorder): New. The Layer order like in thuban is set in
30     the mapscript.
31     (MF_Map.add_thubanlayer): Now a new layerobj is created if no one is
32     linked to the layer in thuban, else the layerobject linked to the
33     thubanlayer will be used.
34     AnnotationLayer will now store the filename of the shapefile.
35     (MF_Map.remove_layer): If a layer is removed the associated object
36     must be set new.
37    
38     * Extensions/umn_mapserver/mf_export.py(tb_layer_to_map): Add all
39     layers which are exists in thuban to the mapobj. All removed Layers
40     will be removed from the mapobj.
41     Added comments to all functions.
42     (thuban_to_map): No layer will be removed here.
43    
44     * Extensions/umn_mapserver/mf_handle.py
45     (_has_umn_mapobj_and_selectedlayer): Activating the layer menu. Now
46     Layersettings for the mapserver kann be edited.
47    
48     * Extensions/umn_mapserver/mf_import.py: Now all layers which are
49     imported, will be linked with the associated MF_Layer.
50     (import_mapfile): All layers, which are not selected, will be removed.
51     Disable the "import layer from mapfile" menu option.
52    
53     * Extensions/umn_mapserver/sample/iceland.map: Set the status of the
54     Annotation Layer from DEFAULT to OFF. The DEFAULT setting turns the
55     layer on permanently.
56    
57 jschuengel 2323 2004-08-03 Jan Schüngel <[email protected]>
58    
59 jschuengel 2331 * Extensions/umn_mapserver/mapfile.py(MF_Metadata.remove_allmetadata):
60     New. This function removes all metadata
61     (MF_Layer.set_group): New. Set the group setting.
62     (MF_Layer.get_group): New. Get the group setting.
63     (MF_Map): Removed the extra numlayers variable, used the mapscript
64     parameter instead.
65     (MF_Map.get_numlayers): New. This get numlayers.
66     (MF_Map.remove_all_layers): New. Removes all layers from the mapobj.
67 jschuengel 2323 (MF_Map.add_thubanlayer): Replaced the exception handling by a check
68     if the object is an instance. Also added the annotation layer here to
69     export, but only the layer is created in the mapfile.
70    
71 jschuengel 2331 * Extensions/umn_mapserver/mf_export.py(export_mapfile): Removed
72     the check if a mapobj exist, because its not needed anymore. The
73     export function is only available if a mapobj exist.
74     Use the new function to remove all layers.
75 jschuengel 2323
76 jschuengel 2331 * Extensions/umn_mapserver/mf_handle.py(Layer_Dialog): Added a group
77     option and the metadata button. The layer dialog is temporary disabled.
78     (Metadata_CustomDataTable): Added some functions to show the grid
79 jschuengel 2323 correct.
80    
81 jschuengel 2331 * Extensions/umn_mapserver/mf_import.py: Moved the code for showing
82     the number of layer from import_mapfile to this function.
83     (AnnotationLayer): New. This Class shows the Annotation layer in
84     thuban. The layer don't do anything. It's only to show the layer
85     and to save the layer order.
86     (add_annotationlayer): New. Import an annotation layer to thuban.
87     (select_layer2import): New. Import only layers to thuban and not
88     the other settings like projection or scalebar.
89     (create_new_mapfile): Moved the _has_umn_mapobj function and the
90     create_new_mapfile functions from mf_handle.py to mf_import.py.
91 jschuengel 2323
92     * Extensions/umn_mapserver/sample/iceland.map: Added the group
93     parameter to the roads and cultural layers. Also added a new
94     Annotation Layer for the cultural points.
95    
96     * Extensions/umn_mapserver/sample/iceland.html: Added the select
97     option for the annotation layer.
98    
99     * Extensions/umn_mapserver/sample/index.html: Added the start
100     parameter for the annotation layer.
101    
102 jan 2315 2004-08-01 Jan-Oliver Wagner <[email protected]>
103    
104     * Doc/manual/thuban-manual-de.xml (Chapter Session Management):
105     translation completed.
106    
107     * Doc/manual/thuban-manual.xml (Chapter Session Management):
108     Fixed unprecise description for Save Session.
109    
110 jan 2312 2004-07-31 Jan-Oliver Wagner <[email protected]>
111    
112     Started translation of Users Manual into german.
113    
114     * Doc/manual/thuban-manual-de.xml: New. German Users Manual.
115    
116     * Doc/manual/Makefile: Added build instructions for german
117     users manual.
118    
119     * Doc/manual/thuban-manual.xml: Minor corrections in Introduction.
120    
121 jschuengel 2308 2004-07-28 Jan Schüngel <[email protected]>
122    
123     * Extensions/umn_mapserver/mapfile.py(MF_Metadata): Changed all class
124     functions. Now all metadata will handle by the function and its not
125     needed to initialize it from outside. Therefor the associated mapobj
126     will be stored in the Metadata Object. So we can use the special
127     functions from the associated mapobj to get the Metadata.
128     Therefor all initialization code for the metadata is removed from the
129     other classes.
130     (MF_Layer): Added a function to get the metadata object.
131     (MF_Map): Added a function to set the mappath, the path where
132     the mapfile ist stored.
133    
134     * Extensions/umn_mapserver/mf_export.py(thuban_to_map): Changed the code
135     to set the extent in the mapfile. Now the code is set by the displayed
136     data in the Thuban-view.
137     (export_mapfile): The shapepath is now set empty, until relative
138     pathnames are supported.
139    
140     * Extension/umn_mapserver/mf_handle.py: Added a dialog to handle
141     metadata. Yet only mapfile metadata are supported. Layer and class
142     supported are not implemented.
143     Added a dialog to handle layer informations. The dialog only shows the
144     selected layer at the moment.
145    
146     * Extensions/umn_mapserver/mf_import.py(import_mapfile): Changed the
147     code for setting the extent in thuban. Now the extent is set to the
148     given extent from the mapfile.
149     Fixed a logical mistake. Now the extent is set when realy a layer is
150     loaded, and not if one is selected to load.
151    
152     * Extensions/umn_mapserver/sample/iceland.html: Added code to zoom and
153     move the shown map in the browser.
154    
155     * Extensions/umn_mapserver/sample/iceland.map: Added a new metadata
156     line to the mapobj and added metadata to the political layer.
157    
158     * Extensions/umn_mapserver/test/test_mapserver.py: Changed the test
159     for Metadata.
160    
161 joey 2300 2004-07-26 Martin Schulze <[email protected]>
162    
163     * Thuban/Lib/classmapper.py (ClassMapper.has): Added the new
164     ClassMapper
165    
166     * test/test_classmapper.py (TestMapping.test_mapper): Added a Test
167     case for the new ClassMapper
168    
169    
170 bh 2296 2004-07-22 Bernhard Herzog <[email protected]>
171    
172 bh 2297 * Thuban/UI/viewport.py (ViewPort.VisibleExtent): New. Return the
173     visible extent of the map in projected coordinates
174    
175     * test/test_viewport.py (SimpleViewPortTest.test_default_size)
176     (SimpleViewPortTest.test_init_with_size): Add some VisibleExtent()
177     tests.
178     (SimpleViewPortTest.test_visible_extent): New. The real test for
179     VisibleExtent()
180    
181     2004-07-22 Bernhard Herzog <[email protected]>
182    
183 bh 2296 * test/test_viewport.py: Use support.run_tests as the main
184     function when running asa script.
185    
186 jschuengel 2295 2004-07-22 Jan Schüngel <[email protected]>
187    
188     * Extensions/umn_mapserver/mf_export.py: Added "import os"
189     Removed the old "import Thuban.UI.mainwindow" code.
190     (tbextent_to_map): Removed the extra function and at the code direct
191     to "thuban_to_map" function.
192     (write_creatorcomment): Added. Now a short comment is added to the
193     beginning of an generated mapfile.
194     (export_mapfile): Now the Path and filename are saved in to variables,
195     and not together in one variable. This is needed for the new
196     write_creatorcomment function.
197    
198     * Extensions/umn_mapserver/mf_import.py (import_mapfile): Added the
199     import module "re". Also added Range and the ClassGroupRange import
200     from Thuban. Both are needed for the new range expression import.
201     (create_rangeexpression): Added. Creates a Range Expression in Thuban
202     style from a given mapfile expression.
203     (added_rasterlayer): Make some small code changes. The shapepath is
204     now stored in an extra variable and the clazz_name is set empty if no
205     class name set in the mapfile.
206     Changed the Error message for Range Expressions, becaus the new
207     function create a error string which will be shown in the dialog.
208    
209     * Extensions/umn_mapserver/test/test_mapserver.py: Added a test for the
210     range expression import.
211 jan 2312
212 jan 2291 2004-07-21 Jan-Oliver Wagner <[email protected]>
213    
214     * Extensions/umn_mapserver/README: Added hint that
215     installation as root can be avoided. Removed all tabs.
216    
217 bh 2289 2004-07-16 Bernhard Herzog <[email protected]>
218    
219     * test/test_viewport.py
220     (ViewPortTest.test_changing_map_projection): Check that changing
221     the projection of an empty map shown in a viewport doesn't lead to
222     exceptions in the viewport's handler for the
223     MAP_PROJECTION_CHANGED messages
224    
225     * Thuban/UI/viewport.py (ViewPort.map_projection_changed): Only
226     try to keep the same region visible when the map actually contains
227     something
228    
229 jschuengel 2288 2004-07-15 Jan Schüngel <[email protected]>
230    
231     * Extensions/umn_mapserver/mapfile.py: Added a function to get the
232     mappath directly from the mapobj. Is needed because of the changes
233     in mf_import.py.
234     (MF_Layer.add_thubanclass): Added a new comment.
235     (MF_Map.set_extent): Fixed a bug with exporting empty mapobj. If the
236     mapobj is empty there is no extent get from thuban an so no one can
237     set to th mapobj.
238    
239     * Extensions/umn_mapserver/mf_import.py (import_mapfile): Updated
240     the discription.
241     Split the funktion in to three smaller ones. The new functions are
242     add_rasterlayer, add_polygonlayer and select_layer2import.
243     Removed the mapfilepath and filepath initialisation, because its know
244     include in the new functions.
245     Now nothing will be imported if cancel is pressed in the
246     layer choice dialog.
247    
248 jschuengel 2285 2004-07-14 Jan Schüngel <[email protected]>
249    
250     * Extensions/umn_mapserver/mapfile.py: Added ClassGroupDefault to
251     import.
252     (MF_Symbolset): Removed the extra variable for numsymbols.
253     (MF_Class.__init__): Added a comment to the exception clause.
254     Removed the extent init, because it was not needed anymore.
255     (MF_Layer.add_thubanclass): Added the code to set the class name to
256     the expression value from thuban if no label is defined.
257     Added the code to export Range expressions from thuban to the mapfile.
258     (MF_Map.set_extent): Removed the exception and replace it by some if
259     code. If the size of a map is not defined the size will be set to 1,1.
260     This is necessary because if the extent is set, mapscript checks if
261     the size is greater than zero.
262     (MF_Web): Added the get and set function for the template.
263    
264     * Extensions/umn_mapserver/mf_export.py: Added the function to check
265     if a mapobject exists and used it to set the status of the menu items.
266     If no mapfile exists the settings could not be edditied.
267     Define after which menuitem the exportitem will include.
268    
269     * Extensions/umn_mapserver/mf_handle.py: Removed the import
270     Thuban.UI.mainwindow clause, because it is not needed.
271     Added the command Refresh() to all "OnChangeColor()" functions,
272     because the color preview window was not updated on a color change.
273     Added the function to check if a mapobject exists and used it to set the
274     status of the menu items. If no mapobject exists the settings could not
275     be edditied.
276     (Map_Dialog): Moved the imagetype selector from the
277     Outputformat_Dialog to Map_Dialog and removed Outputformat_Dialog.
278     (Web_Dialog): Removed the name label and added the template textbox.
279    
280     * Extensions/umn_mapserver/mf_import.py (import_mapfile): Replace
281     the exception handling on loading the layers by an if statement. It
282     is not necessary to us the exception there.
283     The Filepath creation now use os.path.join to build the path.
284    
285     * Extensions/umn_mapserver/test/test_mapserver.py: Moved the testMap
286     definition from global to the setUp function. Now the testMap will
287     initialize new on each test.
288    
289     * Extensions/umn_mapserver/sample/iceland.map: Include three new
290     classes in the Line Layer, to test logical Expressions.
291     Set the status of the class "Point9" in the Point Layer to off
292    
293 bh 2278 2004-07-13 Bernhard Herzog <[email protected]>
294    
295     * Thuban/UI/baserenderer.py
296     (BaseRenderer.render_map_incrementally): Fix a logic bug in the
297     optimization that tries not to draw layers under a raster layer.
298     The bug was harmless. All it effectively did was to produce The a
299     strange messages about not being able to draw Layer instances for
300     all vector layers below a raster layer which would be invisible
301     anyway because the raster layer currently always covers the entire
302     window
303    
304 jschuengel 2277 2004-07-08 Jan Schüngel <[email protected]>
305    
306     * Extensions/umn_mapserver/mapfile.py: Added code to generade and get
307     a list of supported outputformats. This formats are not alle supported
308     because there is no possibility to get the outputformat without the
309     name known. Make some formal changes to the code.
310     (MF_Map.set_name()): Fixed a bug if the name is None.
311    
312     * Extensions/umn_mapserver/mf_handle.py: Removed the image_type import
313     statement, because its not needed anymore. The Outputformat is now
314     given as string from the object. Make some formal changes to the code.
315    
316     * Extensions/umn_mapserver/test/test_mapserver.py: Added new test for
317     most of the new setting which were added during the last changes.
318     Removed the MF_Size Test.
319    
320     * Extensions/umn_mapserver/test/test.map: Added a new class to the
321     cultural Layer to test expressions and the the status of that layer
322     from on to default.
323     Changed the data path the the correct Thuban Data
324     Added the Outputformat Object and Symbol Object
325    
326 jschuengel 2272 2004-07-07 Jan Schüngel <[email protected]>
327    
328     * Extensions/umn_mapserver/mapfile.py: Added some new
329     settings to edit (outputformat, label, imagetype)
330    
331     * Extensions/umn_mapserver/mf_handle.py: Added some setting to
332     the Label Dialog and add the OutputDialog.
333     Make some changes to the code order.
334    
335 jschuengel 2269 2004-07-06 Jan Schüngel <[email protected]>
336    
337     * Extensions/umn_mapserver/mapfile.py: Added the symbolObj, pointObj
338     and line Obj and add the scalebar_status_type, scalebar_style_type and
339     scalebar_position_type.
340     Added the symbol- and symbolsetObject (MF_Symbol,MF_Symbolset). The
341     are only used to create a Symbol like the circle in Thuban.
342     Added the scalebarObject (MF_Scalebar)
343     (MF_Class): Added set_status and get_status.
344     (MF_Layer.add_thubanclass): Added code to set the class status
345     (MF_Map): Added code to handle the symbols and scalebar
346     (MF_Label): Added the set_partials and get_partials functions
347    
348     * Extensions/umn_mapserver/mf_export.py: Added MF_Symbol to import
349     from mapfile. Added a function to create a circle object like the one
350     from thuban if no one exists.
351    
352     * Extensions/umn_mapserver/mf_handle.py: All colors are now set when
353     press ok in the assosiated dialog and not at the end of the
354     colordialog.
355     Added the Dialog for the Scalebar.
356     (Label_Dialog): Added the offset option
357    
358     * Extensions/umn_mapserver/mf_import.py: Added code to import the
359     status of the Classes.
360     Fixed a bug with the projection. Now the to_meter parameter will be
361     added to the Projection only if it doesn't exists.
362    
363 jschuengel 2264 2004-07-01 Jan Schüngel <[email protected]>
364    
365     Added the functionality to handle the content thuban is not
366     able to handle directly.
367    
368     * Extensions/umn_mapserver/mf_handle.py: New. This module extents
369     Thuban with the possibility to edit the mapfile content.
370    
371     * Extensions/umn_mapserver/mf_import.py: Added the possibility
372     to import mapfiles without any layer selected. So it is possible
373     to edit the other settings in a mapfile.
374     (import_mapfile): Added code to use the editing functions.
375     Added the possibility to import the projection to a layer if one
376     is defined.
377     Status settings (On,Off) will now set in thuban (visible, invisible).
378     fixed a bug with with classnames. If no classname is set in mapfile
379     the value in Thuban will set to the expression.
380    
381     * Extensions/umn_mapserver/mf_export.py(export_mapfile): Added the
382     possibility to save a new mapfile or use the old one which is
383     imported or new created.
384     Added code to use the editing functions.
385     Remove some not needed import statements
386    
387     * Extensions/umn_mapserver/mapfile.py: Added new types which are
388     need for the editing functions.
389     Added needed set-functions for the editing functions.
390     Added the possibility to export rasterimages.
391     Added new classes (MF_Web, MF_Label, MF_Legend, MF_Symbol,
392     MF_SymbolSet). MF_Symbol and MF_SymbolSet are not needed at the
393     moment.
394     (MF_Class.set_thubanstyle): Now point layers will set to a default
395     symbol to show a circle in mapserver and not only a 1px dot.
396     (MF_Style.__init__): Fixed a bug with the color. Color was not set
397     correct before.
398     (MF_Size): Removed, because it is not needed.
399    
400     * Extensions/umn_mapserver/README: Added the hints to use the
401     export and editing functions, too.
402    
403     * Extensions/umn_mapserver/sample/iceland.map: Added the
404     new parameter "UNITS METERS".
405     Change the political layer to status OFF.
406    
407     * Extensions/umn_mapserver/sample/README: Added some
408     more details to setup the sample in the MapServer.
409    
410 bernhard 2256 2004-06-26 Bernhard Reiter <[email protected]>
411    
412     * Extensions/svgexport/test/test_svgmapwriter.py:
413     Removed class VFile and used standard StringIO instead.
414    
415 jschuengel 2255 2004-06-23 Jan Schüngel <[email protected]>
416    
417     Add the export function to the umn_mapserver extension.
418    
419     * Extension/umn_mapserver/mf_export.py: New. This module extents
420     Thuban with the possibility to export the Thuban content.
421    
422     * Extensions/umn_mapserver/mapfile.py: Expand the classes to use
423     with the export module. Especially added the possibility to
424     add thuban objects directly to the map objects.
425    
426     * Extensions/umn_mapserver/mf_import.py: Removed the wxCHANGE_DIR,
427     because of the hint from Bernhard Herzog.
428     Corrected the handling of absolute pathnames.
429     Changed the Text of the Menu-Item, now the beginning is upper case.
430    
431     * Extensions/umn_mapserver/README: Added the --with-tiff statement.
432    
433 jschuengel 2250 2004-06-16 Jan Schüngel <[email protected]>
434 jschuengel 2242
435 jschuengel 2250 Add a sample and make some changes.
436    
437     * Extension/umn_mapserver/mf_import.py: Changed the wxPython.wx
438     import from * to explicit used statements. Changed the
439     Thuban.UI.mainwindow import phrase, too.
440     (import_mapfile):Corrected a clerical mistake.
441     Added wxCHANGE_DIR in OpenFile Dialog.
442     Added a MultipleChoiceDialog, to select the layers to load from
443     mapfile into thuban. Thereby the projection is only set if one layer
444     is selected.
445     Added the possibility to handle relative pathnames which uses
446     up-level references.
447     Removed some doubled code.
448     Corrected an error with integer values used as label in thuban
449     ClassGroup.
450    
451     * Extensions/umn_mapserver/sample: New.
452    
453     * Extensions/umn_mapserver/sample/README: New. Describes the
454     usage of the sample files.
455    
456     * Extensions/umn_mapserver/sample/iceland.map: New. This is
457     a suitable .map-file for the iceland data.
458    
459     * Extensions/umn_mapserver/sample/index.html: New. The template
460     for the mapfile.
461    
462     * Extensions/umn_mapserver/sample/iceland.html: New. Initialisation
463     file for the Iceland Application on web.
464    
465     * Extensions/umn_mapserver/README: Corrected a inaccuracy and added
466     some details.
467    
468     * Extensions/umn_mapserver/test/test_mapserver
469     (mapserver_import_Test_generalClasses.test_MF_Color):
470     Corrected the thubancolor test.
471    
472     2004-06-15 Jan Schüngel <[email protected]>
473    
474 jschuengel 2242 * Extensions/umn_mapserver/README: New. Install instruction.
475    
476 bernhard 2240 2004-06-14 Bernhard Reiter <[email protected]>
477    
478     * libraries/thuban/cpl_mfile.h: Added copyright header.
479    
480     * libraries/thuban/ cpl_mfile.cpp, cpl_mfile.h: Added non-protecting
481     Free Software License so that it is most useful with gdalwarp
482     and bmpdataset.
483    
484 bh 2239 2004-06-14 Bernhard Herzog <[email protected]>
485    
486     * Thuban/UI/multiplechoicedialog.py (__version__): Add missing
487     import of wxPython.wx itself (as opposed to the contents of
488     wxPython.wx). For some reason wxPython.wx is available as
489     wxPython.wx.wx in at least some 2.4 releases. Fixes RT#2482
490     wrt. wxPython 2.4.
491    
492 jschuengel 2238 2004-06-10 Jan Schüngel <[email protected]>
493    
494     Initial version of new extension "umn_mapserver". This extension aims
495     to manage configuration for the UMN MapServer application. This
496     inital version just imports the .map-files and displays all, Thuban is
497     capable of.
498    
499     * Extensions/umn_mapserver, Extensions/umn_mapserver/test: New.
500    
501     * Extensions/umn_mapserver/test/README: New. Describes how to run the
502     tests.
503    
504     * Extensions/umn_mapserver/test/test.map: New. This is a test
505     .map-file for automated tests of the umn_mapserver extension of
506     Thuban.
507    
508     * Extensions/umn_mapserver/test/test_mapserver.py: New. Tests for
509     UMN Mapserver classes.
510    
511     * Extensions/umn_mapserver/__init__.py: New. Init to make this
512     directory a package.
513    
514     * Extensions/umn_mapserver/mapfile.py: New. Classes to represent
515     '.map'-file objects.
516    
517     * Extensions/umn_mapserver/mf_import.py: New. This module extends
518     Thuban with the possibility to handle UMN MapServer mapfiles.
519    
520 bh 2230 2004-06-03 Bernhard Herzog <[email protected]>
521    
522     * Thuban/Model/layer.py (Layer.TreeInfo): Convert the bounding box
523     to a tuple before using it as arguments to the % operator. This
524     fixes the formatting issue filed in RT#2239 on 2004-01-13 and
525     reported today on thuban-list by Jan Schüngel
526    
527     * test/test_layer.py (TestLayerModification.setUp): Save the
528     filename as an instance variable so we can refer to it in tests
529     (TestLayerModification.test_tree_info): Uncomment this method
530     again and make it work. This tests for the formatting issue
531     filed in RT#2239 on 2004-01-13
532    
533 bh 2224 2004-05-28 Bernhard Herzog <[email protected]>
534    
535     * Thuban/UI/baserenderer.py: Fix some typos.
536    
537 jan 2217 2004-05-18 Jan-Oliver Wagner <[email protected]>
538    
539     * Extensions/gns2shp/gns2shp.py (gns2shp): Fixed a bug
540     by increasing a field size.
541    
542 bh 2213 2004-05-17 Bernhard Herzog <[email protected]>
543    
544     Update to newest shapelib and get rid of Thuban specific
545     extensions, i.e. use the new DBFUpdateHeader instead of our
546     DBFCommit kludge
547    
548     * libraries/shapelib/shpopen.c: Update to version from current
549     shapelib CVS.
550    
551     * libraries/shapelib/shapefil.h: Update to version from current
552     shapelib CVS.
553    
554     * libraries/shapelib/dbfopen.c: Update to version from current
555     shapelib CVS.
556     (DBFCommit): Effectively removed since shapelib itself has
557     DBFUpdateHeader now which is better for what DBFCommit wanted to
558     achieve.
559     We're now using an unmodified version of dbfopen.
560    
561     * setup.py (extensions): Add the HAVE_UPDATE_HEADER macro with
562     value '1' to the Lib.dbflibc extension. This simply reflects the
563     shapelib and pyshapelib updates
564    
565 jan 2211 2004-05-16 Jan-Oliver Wagner <[email protected]>
566    
567     Finished introduction of Menu.FindOrInsertMenu.
568    
569     * Extensions/drawshape/drawshape.py: Add the command
570     to the experimental menu additionally to the toolbar.
571    
572     * Extensions/svgexport/svgsaver.py: Use FindOrInsertMenu() instead of
573     finding menu on its own.
574    
575     * Doc/manual/thuban-manual.xml: updated sample file
576     to use FindOrInsertMenu().
577    
578     * Examples/simple_extensions/hello_world.py: Use FindOrInsertMenu()
579     instead of finding menu on its own.
580    
581 jan 2206 2004-05-11 Jan-Oliver Wagner <[email protected]>
582    
583     * test/test_menu.py (MenuTest.test): Added testing
584     of method Menu.FindOrInsertMenu.
585    
586 jan 2204 2004-05-10 Jan-Oliver Wagner <[email protected]>
587    
588     Introduce and use Menu.FindOrInsertMenu.
589    
590     * Thuban/UI/menu.py (Menu.FindOrInsertMenu): New. Find a
591     given menu or, if not found, insert it.
592    
593     * Extensions/bboxdump/bboxdump.py, /Extensions/gns2shp/gns2shp.py,
594     /Extensions/importAPR/importAPR.py, Extensions/profiling/profiling.py,
595     /Extensions/wms/wms.py: Use FindOrInsertMenu() instead of finding
596     menu on its own.
597    
598 jan 2201 2004-05-06 Jan-Oliver Wagner <[email protected]>
599    
600     Introduce a abstract ColorDialog class and remove
601     and outdated file.
602    
603     * Thuban/UI/proj4dialog.py: Removed. It is has been
604     replaced by projdialog for quite a while and is not used
605     anymore.
606    
607     * Thuban/UI/colordialog.py: New. Abstraction for color selection
608     dialog(s).
609    
610     * Thuban/UI/classifier.py (SelectPropertiesDialog.__GetColor):
611     Now calls the abstract ColorDialog instead of wxColourDialog.
612     This also removed the dependency to Color class conversion
613     from this function.
614    
615 frank 2197 2004-05-04 Frank Koormann <[email protected]>
616    
617     * Extensions/bboxdump/__init__.py: Fixed string left over from
618     copying.
619    
620     * Extensions/bboxdump/bboxdump.py (bboxdump):
621     Use layer.ShapeStore().AllShapes() to loop over shapes instead of
622     xrange(layer.NumShapes()). Compile the bboxmessage from a list
623     of formatted outputs (string.join) instead of appending to the
624     message. Two progress bar dialogs to report progress on the sometimes
625     lenghty processing.
626    
627 frank 2196 2004-04-22 Frank Koormann <[email protected]>
628    
629     New Extension to dump bounding boxes of all shapes of the selected
630     layer. An optional column can be specified to group the objects,
631     in this case the bounding box is a union of the separate boxes.
632     Dump can be displayed in a ScrolledMessageDialog or written to file.
633     The Extension is simply a combination of available and well tested
634     Thuban functionality.
635    
636     * Extensions/bboxdump/__init__.py: New: Init to make this
637     directory a package.
638    
639     * Extensions/bboxdump/bboxdump.py: New: Dump bounding boxes of
640     all shapes of the selected layer.
641    
642 jan 2192 2004-04-22 Jan-Oliver Wagner <[email protected]>
643    
644     * Thuban/UI/classgen.py (GenUniquePanel.__init__): Fixed two
645     strings to be i18n now.
646    
647 jan 2188 2004-04-18 Jan-Oliver Wagner <[email protected]>
648    
649     Changing popup menu of legend from direct building
650     to using the Menu construction as used for the mainwindow.
651    
652     * Thuban/UI/mainwindow.py: New method commands: layer_to_top,
653     layer_to_bottom, layer_visibility
654     (MainWindow.LayerToTop): New. Put current layer to the top.
655     (MainWindow.LayerToBottom): New. Put current layer to bottom.
656     (MainWindow.HideLayer, MainWindow.ShowLayer, _has_visible_map):
657     Replace 1,0 by True, False.
658     (MainWindow.ToggleLayerVisibility): New. Toggle visibility of
659     current layer.
660     (MainWindow.LayerShowTable): Removed raising of dialog.
661     (_has_selected_layer_visible): New. Support function.
662    
663     * Thuban/UI/legend.py: ID_POP_xxx: removed.
664     (LegendPanel.__init__): Removed EVT_MENU bindings.
665     (LegendTree._OnRightClick): Replace direct creation of
666     menu via wx Classes by applying the menu definition
667     as of Menu class of menu.py.
668    
669 jan 2185 2004-04-16 Jan-Oliver Wagner <[email protected]>
670    
671     * Thuban/UI/exceptiondialog.py (ExceptionDialog.dialog_layout): Improved
672     button string to stronger clearify that Thuban will be closed when hitting
673     the button.
674    
675     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Added docstring.
676     Now for layers without a ShapeStore a corresponding message is given
677     to the user, that this layer has no table to show.
678    
679 joey 2182 2004-04-15 Martin Schulze <[email protected]>
680    
681     * Extensions/wms/layer.py (WMSLayer.setWMSFormat): Need to
682     recalculate the format for the internal render engine as well.
683    
684     * Extensions/wms/properties.py (wmsProperties): First start for a
685     properties dialog. It's functional for a first selection of
686     layers, but still has some weired wxWidgets/GTK problems but
687     beautification can be done later.
688    
689     * Extensions/wms/layer.py: Added more documentation
690     (WMSLayer.getFormats): New: Return list of supported image formats
691     by the WMS server
692     (WMSLayer.getLayers): New: Return the list of layer names
693     supported by the WMS server
694     (WMSLayer.getLayerTitle): New: Return the title of the named layer
695     (WMSLayer.getWMSFormat): New: Return the image format that is used
696     for WMS GetMap requests
697     (WMSLayer.setWMSFormat): New: Set the image format that is used
698     for WMS GetMap requests
699     (WMSLayer.__init__): Move away from using only one layer to using
700     a list of layers (unsorted at the moment, though).
701     (WMSLayer.getVisibleLayers): New: Return the list of names for all
702     visible layers
703     (WMSLayer.setVisibleLayers): New: Set the list of names for all
704     visible layers
705    
706     * Extensions/wms/wms.py: Moved the WMS layer into layer.py in
707     order to establish a clean structure.
708    
709     * Extensions/wms/layer.py: Moved the WMS layer into a file on its
710     own in order to establish a clean structure.
711    
712 joey 2174 2004-04-13 Martin Schulze <[email protected]>
713    
714     * Extensions/wms/parser.py (WMSCapabilitiesParser.grok): Added
715     support for oldstyle (WMS 1.0 apparently) image format
716     specification.
717    
718     * Extensions/wms/wms.py (WMSLayer.calcFormat): Reduce the list of
719     supported graphic formats back to JPEG and BMP, PNG and others are
720     too *cough* experimental... Sorry, I meant to filter this out
721     before I committed this part. This should make the WMS extension
722     run from CVS again.
723     (wms_dialog): Reset an empty URL to None so that the subsequent
724     program can depend on this, since the dialog will indeed return an
725     empty URL, causing another declaration of love by Python.
726    
727     * Extensions/wms/parser.py (WMSCapabilitiesParser.getLayerBBox):
728     Whenever a native BoundingBox request cannot be fulfilled, check
729     whether the requested SRS is EPSG:3426, in which case return the
730     LatLonBoundingBox values.
731    
732     * Extensions/wms/test/test_parser.py
733     (TestWMSCapabilitiesParser.test_LayerSRS): Added a test for
734     ignoring AUTO:* SRS.
735     (TestWMSCapabilitiesParser.test_LatLonBoundingBoxes_as_bboxes):
736     Added another test method to test whether the LatLonBoundingBox
737     values will be returned if BoundingBox values are requested with
738     SRS set to EPSG:3426.
739    
740     * Extensions/wms/parser.py (WMSCapabilitiesParser.peekLayers):
741     Added rudimentary support for non-EPSG SRS, i.e. ignore them for
742     the moment by placing them into a variable which is currently
743     unused. Also test whether the EPSG SRS is numerical as it should
744     be and add an error message if it is not.
745    
746     * Extensions/wms/test/sample.xml: Added AUTO:* SRS since they
747     appear in the real world as well. Since we cannot handle them yet
748     (OGCLib can't either), we will ignore them for the moment.
749    
750     * Extensions/wms/parser.py: Use a variable for denoting the sample
751     filename
752     (WMSCapabilitiesParser.peekLayers): Added support for error
753     messages during grok(). They will be aggregated in an array and
754     may be displayed later. We may have to add a classification
755     "Warning" and "Error" to this. That requires more experience,
756     though, since not every error may be lethal.
757    
758     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Raise the
759     ShowTable() dialog/frame when the user attempts to display it
760     while it has been opened before already and not closed again.
761    
762 joey 2161 2004-04-11 Martin Schulze <[email protected]>
763    
764     * Extensions/wms/infodialog.py: Adjusted the class documentation
765    
766     * Extensions/wms/wms.py (WMSLayer.__init__, WMSLayer.GetMapImg):
767     Switch to using Thuban{Begin,End}BusyCursor instead of the pure
768     wxWidgets variants.
769     (WMSLayer.__init__): The epsg_id variable is named top_srs now.
770    
771     * Extensions/wms/infodialog.py: Added an information dialog that
772     will display various information about the WMS current resource,
773     so that additional information such as the title, the abstract,
774     fees and access constraints can be displayed for the user if they
775     are documented in the WMS XML.
776    
777 joey 2156 2004-04-10 Martin Schulze <[email protected]>
778    
779     * Extensions/wms/parser.py (WMSCapabilitiesParser.grok): Adjusted
780     string handling. It's "foo".lower() and not lower(foo) without
781     lower imported from strings or something.
782    
783     * Extensions/wms/wms.py (WMSLayer): Incorporated WMSCapabilities
784     from capabilities.py and parser.py. Implement priority list for
785     supported graphics formats, take care of wbmp != bmp. PNG, TIFF
786     and GIF are supported here, but not yet by main Thuban. Hence,
787     support for them may be removed later. Special contribution to
788     usability: get wxWidgets to change the cursor when we're waiting
789     for data from the network so the user won't start to worry. This
790     causes a redrawing error/warning, though.
791    
792     * Extensions/wms/parser.py (WMSCapabilitiesParser.grok): Unlink
793     the DOM object.
794    
795     2004-04-01 Martin Schulze <[email protected]>
796    
797     * Extensions/wms/capabilities.py: Adjusted documentation
798     (WMSCapabilities.__init__): Improved documentation, fixed syntax
799     (WMSCapabilities.saveCapabilities): Only catch IOError when
800     handling files
801     (WMSCapabilities.loadCapabilities): Only catch IOError when
802     handling files
803     __main__: corrected variable naming
804     (WMSCapabilities.fetchCapabilities,loadCapabilities): Make this
805     class a specialisation of WMSCapabilitiesParser as well. Also
806     execute grok() after loading or fetching capabilities, if that
807     went well, so that subsequent calls can already access the data.
808     (WMSCapabilities.getVersion): Export the used version of the
809     GetCapabilities request, so we can use it for subsequent calls,
810     i.e. for GetMap requests.
811     (WMSCapabilities.fetchCapabilities): Added proper error handling
812     when the GetCapabilities request failed, so that the surrounding
813     program can act accordingly.
814    
815 joey 2146 2004-03-30 Martin Schulze <[email protected]>
816    
817     * Extensions/wms/parser.py (WMSCapabilitiesParser.getLayerSRS):
818     Adjusted the getLayerSRS method to return the list of SRSes
819     extracted from <SRS> elements instead of <BoundingBox> elements.
820     Added a bit of documentation as well.
821     (WMSCapabilitiesParser.checkLayerSRS): Removed integrity test
822     since it was only implemented due to a misunderstanding.
823    
824     * Extensions/wms/test/test_parser.py
825     (TestWMSCapabilitiesParser.test_LayerSRS): Adjust the tests to
826     reflect the corrected interpretation of the standard: i.e. a layer
827     does not have to define a BoundingBox for all SRSes it supports.
828     Hence the <SRS></SRS> specification is authoritative, not the list
829     of BoundingBoxes.
830     (TestWMSCapabilitiesParser.test_BoundingBoxes): Added a new test
831     to ensure None is returned for a non-existing SRS.
832     (TestWMSCapabilitiesParser.test_grok): Removed test_grok method
833     since it is not applicable anymore. Listing more SRSes in <SRS>
834     elements is valid according to the specs.
835    
836 bernhard 2140 2004-03-26 Bernhard Reiter <[email protected]>
837 joey 2146
838 bernhard 2140 * README: Nicer formatting of text. Improved descriptions.
839     Reflected wxWidgets name change.
840    
841     * Thuban/UI/about.py: Extended copyright to 2004 and added
842     information about the thuban-devel mailinglist.
843    
844 joey 2138 2004-03-24 Martin Schulze <[email protected]>
845 joey 2120
846 joey 2138 * Extensions/wms/capabilities.py: Renamed the class to contain
847     'WMS', also added a linebreak where required
848    
849     * Extensions/wms/parser.py: Finally added the XML parser for the
850     GetCapabilities response.
851    
852     * Extensions/wms/test/sample.xml: Adjusted the sample file so that
853     <SRS> elements match the <BoundingBox> elements, except for the
854     layer 'beschriftung'.
855    
856     * Extensions/wms/test/test_parser.py: Encode non-ascii strings
857     since Python uses unicode strings internally, otherwise
858     comparisons will fail. Removed tests for getLayerBBoxSRS() since
859     the SRS will be calculated anyway and this method is obsoleted by
860     getLayerSRS(). Denote SRS as strings and not as cardinal numbers.
861     Move loading the sample file into the setUp method. Added a test
862     for finding the integrity problem in the sample response.
863     Improved formatting.
864    
865     * Extensions/wms/domutils.py: Added convenience routines for
866     handling of Document Object Model (DOM) nodes.
867    
868     * Extensions/wms/test/test_domutils.py: Added a test for the
869     domutils module
870    
871     2004-03-19 Martin Schulze <[email protected]>
872    
873 joey 2120 * Extensions/wms/test/test_parser.py (TestWMSCapabilitiesParser):
874     Moved path detection and adding into a module of its own,
875     adjustpath, which exports thubandir as main Thuban directory.
876    
877     * Extensions/wms/test/test_ogclib.py (TestWMSLib): Moved path
878     detection and adding into a module of its own, adjustpath, which
879     exports thubandir as main Thuban directory. Reorganised the
880     module in order to support the SkipTest feature for Thuban test
881     cases.
882    
883     * Extensions/wms/test/adjustpath.py: Moved path detection and
884     adding into a module of its own.
885    
886 joey 2115 2004-03-18 Martin Schulze <[email protected]>
887    
888     * Extensions/wms/test/test_parser.py: Added another test for
889     checking whether the WMS XML parser (to be implemented) returns
890     the information we expect. This requires a sample WMS WML file
891     (sample.xml) which has been extracted from the frida server and
892     "improved" manually.
893    
894     * Extensions/wms/test/test_ogclib.py: Added legacy code to add the
895     main Thuban directory to the path in order to be able to import
896     random modules. Adjusted the PyOGCLib detection to reuse the
897     information gathered. Also added a note about the PYTHONPATH
898     environment variable.
899    
900     * Extensions/wms/test/test_ogclib.py: The format specification is
901     a mime-type, not a graphic format, hence image/jpeg wou ld be the
902     proper format and not JPEG. We'll also have to take care of the
903     encoding of / as %2F.
904    
905 joey 2111 2004-03-16 Martin Schulze <[email protected]>
906    
907     * Extensions/wms/test/test_ogclib.py: Added a (hopefully)
908     comprehensive test for the getMapURL method, built compare URLs
909     according to the documentation in OGC 01-068r3
910    
911     * Extensions/wms/capabilities.py (WMSCapabilities): Added the
912     class WMSCapabilities to manage capabilites, will incorporate
913     parsing the capabilities response and provide details for other
914     classes.
915    
916 bh 2105 2004-03-12 Bernhard Herzog <[email protected]>
917    
918 bh 2107 Support views in addition to normal tables in the postgis
919     shapestore
920    
921     * Thuban/Model/postgisdb.py
922     (PostGISShapeStore._fetch_table_information): Add a fallback for
923     the case where the table name is not in the geometry_columns
924     table. This is usually the case for views. Also, set
925     self.shapestore here.
926     (PostGISShapeStore.ShapeType): No need to query the database all
927     the time. The shape type is now determined in
928     _fetch_table_information
929    
930     * test/postgissupport.py (PostgreSQLServer.new_postgis_db)
931     (PostgreSQLServer.get_static_data_db, PostGISDatabase.__init__):
932     New parameter to specify views.
933     (PostGISDatabase.has_data): Also compare the views. New views
934     parameter
935     (PostGISDatabase.initdb): Create the views.
936     (PostgreSQLServer.get_default_static_data_db): Add the v_landmarks
937     view
938    
939     * test/test_postgis_db.py
940     (TestPostGISShapestorePointFromViews): New. Test a
941     PostGISShapeStore with a view
942     (TestPostGISShapestorePointOIDAsGIDColumn.setUp): Pass the name of
943     the geometry_column explicitly to test whether that works
944    
945     2004-03-12 Bernhard Herzog <[email protected]>
946    
947 bh 2105 Final step for explicit id/geometry columns: Loading and saving
948    
949     * Resources/XML/thuban-1.1.dtd: New. Derived from thuban-1.0.dtd
950     with the following changes:
951     (dbshapesource): Two new attributes id_column and geometry_column
952    
953     * Thuban/Model/save.py (SessionSaver.write): Use the new dtd
954     (SessionSaver.write_session): Use the new namespace
955     (SessionSaver.write_data_containers): Write the new dbshapesource
956     parameters
957    
958     * Thuban/Model/load.py (SessionLoader.__init__): New namespace for
959     the new file format version
960     (SessionLoader.start_dbshapesource): Handle the new db parameters
961    
962     * test/test_save.py: Update to the new dtd and namespace
963     (SaveSessionTest.test_save_postgis): Update the NonConnectionStore
964     mock object to provide a working IDColumn method.
965    
966     * test/test_load_1_0.py: New. Copy of the test_load.py before
967     today's changes but with the round-trip tests removed.
968    
969     * test/test_load_0_9.py: Update doc-string.
970    
971     * test/test_load.py: Update all .thuban files to the new dtd and
972     namespace.
973     (TestPostGISLayer.file_contents): Add the new dbshapesource
974     paramters
975    
976 bh 2100 2004-03-11 Bernhard Herzog <[email protected]>
977    
978 bh 2103 Next step for explicit id/geometry columns: User interaction
979    
980     * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Rework how
981     the dialog is constructed. Add combo boxes to select id and
982     geometry column. Rename some instance variables.
983     (ChooseDBTableDialog.GetTable): Return id and geometry column
984     names
985     (ChooseDBTableDialog.OnTableSelect): New. Event handler for
986     selections in the table list
987    
988     * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Use id_column
989     and geometry_column
990    
991     * Thuban/Model/session.py (Session.OpenDBShapeStore): Add the new
992     parameters for id_column and geometry column of PostGISShapeStore
993     here as well.
994    
995     * Thuban/Model/postgisdb.py (type_map): Add ROWID psycog type.
996     (_raw_type_map): New. Map raw PostgreSQL type ints to thuban types
997     (PostGISConnection.GeometryTables): Use a better query to
998     determine which relations in the database might be usable for
999     shapestores. Now supports views as well but is more PostgreSQL
1000     specific
1001     (PostGISConnection.table_columns): New. Somewhat experimental
1002     method to let the db dialogs provide lists of columns to users so
1003     that they can select id and geometry columns.
1004     (PostGISTable.__init__): The default value of the id_column
1005     parameter is now None it still means "gid" effectively, though.
1006     (PostGISTable.IDColumn): New introspection method to return a
1007     column object for the id column
1008     (PostGISShapeStore.GeometryColumn): New introspection method to
1009     return a column object for the geometry column
1010    
1011     * test/test_postgis_db.py
1012     (TestPostGISConnection.test_gis_tables_non_empty):
1013     Removed. Subsumed by the new:
1014     (TestPostGISConnection.test_gis_tables_with_views_and_tables):
1015     New. Tes the GeometryTables and table_columns methods with actual
1016     tables and views.
1017     (PointTests.test_id_column, PointTests.test_geometry_column):
1018     New. tests for the new methods.
1019     (TestPostGISShapestorePoint.setUp)
1020     (TestPostGISShapestorePointSRID.setUp)
1021     (TestPostGISShapestorePointExplicitGIDColumn.setUp): Fill the
1022     instance variables needed by the new tests
1023    
1024     2004-03-11 Bernhard Herzog <[email protected]>
1025    
1026 bh 2100 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): The row
1027     numbers given to ReadValue are ordinals.
1028    
1029     2004-03-11 Bernhard Herzog <[email protected]>
1030    
1031     Elimiate the requirement for PostGIS tables to have a column
1032     called "gid".
1033    
1034     * Thuban/Model/postgisdb.py (PostGISTable.__init__): New parameter
1035     id_column to specify which column to use to identify rows. Also
1036     new instance variables id_column and quoted_id_column
1037     (PostGISTable.RowIdToOrdinal, PostGISTable.RowOrdinalToId)
1038     (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue)
1039     (PostGISTable.SimpleQuery): Use the id column name provided to the
1040     constructor instead of "gid"
1041     (PostGISShapeStore.__init__): New parameter id_column analogously
1042     to PostGISTable.__init__. This parameter is simply passed through
1043     to the base class constructor
1044     (PostGISShapeStore._create_col_from_description): Fix typo in
1045     doc-string
1046     (PostGISShapeStore.Shape, PostGISShapeStore.AllShapes)
1047     (PostGISShapeStore.ShapesInRegion): Use the id column name
1048     provided to the constructor instead of "gid"
1049    
1050     * test/postgissupport.py
1051     (PostgreSQLServer.get_default_static_data_db): New static table
1052     landmarks_point_id with an id column != "gid. Update the comments
1053     a bit.
1054     (skip_if_addgeometrycolumn_does_not_use_quote_ident): Fix typo in
1055     doc-
1056     (upload_shapefile): New parameter gid_column to use a name other
1057     than "gid" for the column to store the shape ids
1058    
1059     * test/test_postgis_db.py (TableTests): New. Mixin-class
1060     containing all tests previously in TestPostGISTable. The actual
1061     tests are the same but the code is a bit more configurable to
1062     allow for different id columns etc.
1063     (TestPostGISTable): Derive from TableTests now for the actual
1064     tests.
1065     (TestPostGISTableExplicitGIDColumn): New. Like TestPostGISTable
1066     except that it the landmarks_point_id table to test the id_column
1067     parameter
1068     (PointTests): Extend the doc-string
1069     (TestPostGISShapestorePointExplicitGIDColumn)
1070     (TestPostGISShapestorePointOIDAsGIDColumn): New classes derived
1071     from PointTests to test the explicit id_column parameter. One
1072     tests with the name of the column holding the shape ids, the other
1073     uses PostgreSQL's OID column. For the latter a number of methods
1074     have to be overwritten to make them independent of the actual id
1075     values.
1076    
1077 silke 2095 2004-03-08 Silke Reimer <[email protected]>
1078    
1079     Update debian directory:
1080    
1081     * debian/changelog: Added new version.
1082     * deiban/rules: Updated management of patches (with cbds)
1083     * debian/control: Added cbds to dependencies
1084     * debian/patches/*: New. Adds better support for patches of thuban in
1085     debian
1086     * debian/menu: Syntax of menu changed slightly
1087     * debian/setup.py.patch: removed because it has been moved to
1088     debian/patechs/setup.py.patch
1089    
1090    
1091 bh 2094 2004-02-26 Bernhard Herzog <[email protected]>
1092    
1093     Create the Doc/technotes directory for text files with information
1094     for developers
1095    
1096     * Doc/technotes/README: New. README for the technotes
1097    
1098     * Doc/technotes/coding_guidelines.txt: New. Coding guidelines for
1099     Thuban
1100    
1101     * Doc/technotes/release_process.txt: New. Used to be
1102     HOWTO-Release. Now slightly adapted to technote formatting style.
1103    
1104     * HOWTO-Release: Removed. It's contents are now in
1105     Doc/technotes/release_process.txt
1106    
1107 bh 2089 2004-02-25 Bernhard Herzog <[email protected]>
1108    
1109     * libraries/thuban/wxproj.cpp (get_wx_version): New. Return the
1110     version of wxWindows the module was compiled with so we can check
1111     that against the wxPython version.
1112    
1113     * Thuban/version.py (thuban_branch, thuban_release): New variables
1114     controlling which and how Thuban versions are shown. See the
1115     comments for details.
1116     (verify_versions): Also check that the wx version that wxproj is
1117     compiled against matches that of the wxPython we use at runtime
1118    
1119 bh 2080 2004-02-20 Bernhard Herzog <[email protected]>
1120    
1121 bh 2087 * Extensions/wms/wms.py (epsg_code_to_projection): Use
1122     get_system_proj_file to read the epsg projections. The old way
1123     depended on the current directory being the top Thuban directory.
1124    
1125     2004-02-20 Bernhard Herzog <[email protected]>
1126    
1127 bh 2085 * Extensions/svgexport/test/test_svgmapwriter.py
1128     (TestVirtualDC.test_clippath): Remove a debug print
1129    
1130     2004-02-20 Bernhard Herzog <[email protected]>
1131    
1132 bh 2083 * Extensions/svgexport/__init__.py: New. Turn
1133     Extensions/svgexport into a package.
1134    
1135     * Extensions/svgexport/svgmapwriter.py: Reorder the imports and
1136     doc-string a bit. The doc-string must come first, otherwise it's
1137     not a doc-string. The __future__ import must be the first thing
1138     after the doc-string. Use only double quotes in doc-strings.
1139     Single quotes trip up emacs syntax highlighting if the text
1140     contains apostrophes.
1141    
1142     2004-02-20 Bernhard Herzog <[email protected]>
1143    
1144 bh 2080 * Extensions/svgexport/test/__init__.py,
1145     Extensions/svgexport/test/test_svgmapwriter.py: New. Initial test
1146     suite for svgexport
1147    
1148     * test/runtests.py (find_test_modules): New. Function with the
1149     module finding code from main.
1150     (main): Use find_test_modules to figure out the default test
1151     modules and take modules from Extensions.svgexport.test too.
1152    
1153 bh 2075 2004-02-19 Bernhard Herzog <[email protected]>
1154    
1155 bh 2077 * Thuban/UI/application.py (ThubanApplication.OnInit): Make sure
1156     the mainwindow has a reference to the map of the initial session.
1157     This fixes a bug introduced with the fix for RT#2245
1158    
1159     2004-02-19 Bernhard Herzog <[email protected]>
1160    
1161 bh 2075 * Extensions/svgexport/svgsaver.py,
1162     Extensions/svgexport/svgmapwriter.py,
1163     Extensions/svgexport/maplegend.py: Added again. This time in the
1164     correct place.
1165    
1166 bh 2070 2004-02-17 Bernhard Herzog <[email protected]>
1167    
1168 bh 2073 Fix for RT#2245
1169    
1170     * Thuban/UI/application.py (ThubanApplication.OnInit): Initialize
1171     instance variables before trying to create any windows. Creating
1172     windows can start an event loop if e.g. message boxes are popped
1173     up for some reason, and event handlers, especially EVT_UPDATE_UI
1174     may want to access things from the application.
1175     (ThubanApplication.maps_changed): The mainwindow may not have been
1176     created yet, so check whether it has been created before calling
1177     its methods
1178    
1179     * Thuban/UI/view.py (MapCanvas.OnIdle): Only try to redraw if we
1180     have a map
1181    
1182     2004-02-17 Bernhard Herzog <[email protected]>
1183    
1184 bh 2070 * test/test_svgmapwriter.py, Extensions/svgsaver.py,
1185     Extensions/svgmapwriter.py, Extensions/maplegend.py,
1186     extensions/svgexport/svgsaver.py,
1187     extensions/svgexport/svgmapwriter.py,
1188     extensions/svgexport/maplegend.py: Removed. These files were in
1189     the wrong places or didn't work at all.
1190    
1191 bh 2067 2004-02-16 Bernhard Herzog <[email protected]>
1192    
1193 bh 2069 * Thuban/UI/view.py (MapCanvas.Export): Remove accidentally added
1194     line
1195    
1196     2004-02-16 Bernhard Herzog <[email protected]>
1197    
1198 bh 2067 * Thuban/UI/view.py (MapCanvas.Export): Avoid UnboundLocalError.
1199    
1200 mrechtie 2064 2004-02-15 Markus Rechtien <[email protected]>
1201    
1202     * Extensions/svgexport/svgmapwriter.py: New. Adds the capability
1203     to write a session to a file in SVG format.
1204     * Extensions/svgexport/svgsaver.py: New. Uses svgmapwriter.py
1205     to write a SVG map of a session.
1206     * Extensions/svgexport/maplegend: New. Writes a basic maplegend
1207     in SVG format for the current session.
1208    
1209 bh 2062 2004-02-13 Bernhard Herzog <[email protected]>
1210    
1211     * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): When the layer
1212     can't be created, return immediately after displaying the error
1213     message.
1214    
1215 bh 2060 2004-02-11 Bernhard Herzog <[email protected]>
1216    
1217     Handle postgis tables with more than one geometry column.
1218    
1219     * Thuban/Model/postgisdb.py
1220     (PostGISTable._fetch_table_information): Delegate the creation of
1221     column objects to a different method so that we can extend that in
1222     derived classes
1223     (PostGISTable._create_col_from_description): New. Column object
1224     creation part of _fetch_table_information
1225     (PostGISShapeStore._create_col_from_description): New. Extend
1226     inherited method to handle geometry columns
1227     (PostGISShapeStore.__init__): New parameter geometry_column to
1228     specify which geometry column to use. Optional but mandatory for
1229     tables with more than one geometry column
1230     (PostGISShapeStore._fetch_table_information): Also use the name of
1231     the geometry column when looking for the srid
1232     (PostGISShapeStore.ShapeType): Also use the name of the geometry
1233     column when looking for the shape type
1234    
1235     * test/test_save.py (SaveSessionTest.test_save_postgis): Adapt
1236     NonConnectionStore to changes in the PostGISShapeStore
1237    
1238     * test/test_postgis_db.py
1239     (TestPostGISSpecialCases.test_shapestore_two_geom_cols): Test
1240     PostGISShapeStore with tables having two geometry columns.
1241    
1242 bh 2058 2004-02-10 Bernhard Herzog <[email protected]>
1243    
1244     Fix some postgis problems. What remains to be done is real
1245     handling of SRIDs as they affect how reprojection is done
1246    
1247     * Thuban/Model/postgisdb.py (quote_identifier): Fix typo in
1248     doc-string
1249     (PostGISShapeStore._fetch_table_information): New. Extend
1250     inherited method to retrieve srid
1251     (PostGISShapeStore.BoundingBox): Handle tables without data.
1252     extent yields NULL for those
1253     (PostGISShapeStore.ShapesInRegion): Use the srid of the table.
1254    
1255     * test/test_postgis_db.py
1256     (TestPostGISSpecialCases.test_shapestore_empty_table): New test
1257     for the special case of a table without any data
1258     (TestPostGISShapestorePointSRID): New class with tests for a table
1259     that uses srids
1260     (PolygonTests): Fix a doc-string typo
1261    
1262     * test/postgissupport.py (PostGISDatabase.__init__): New parameter
1263     reference_systems with a specification of spacial reference
1264     systems to create in the new db.
1265     (PostgreSQLServer.new_postgis_db)
1266     (PostgreSQLServer.get_static_data_db): New parameter
1267     reference_systems to be passed through ultimately to
1268     PostGISDatabase. In new_postgis_db also check whether an existing
1269     db already has the right srids
1270     (PostgreSQLServer.get_default_static_data_db): Add srids and a
1271     table that uses srids
1272     (PostGISDatabase.initdb): Create the entries for the reference
1273     systems
1274     (PostGISDatabase.has_data): Add reference_systems parameter to
1275     check for those too
1276     (upload_shapefile): New parameter srid to create tables with a
1277     specific srid
1278    
1279 frank 2055 2004-02-06 Frank Koormann <[email protected]>
1280    
1281     * po/pt_BR.po: Fixed charset
1282    
1283 frank 2054 2004-02-05 Frank Koormann <[email protected]>
1284    
1285     * po/pt_BR.po: Fixed format string for error message, missing %s
1286     added (Thuban/UI/application.py:273)
1287    
1288 frank 2053 2004-02-03 Frank Koormann <[email protected]>
1289    
1290     First version of Portuguese (Brazilian) translation
1291    
1292     * po/pt_BR.po: New, translation of pot (2004-01-15 16:07+0300) for
1293     Brazilian Portuguese by Eduardo Patto Kanegae.
1294    
1295     * Thuban/UI/about.py (About.__init.py__): Added Eduardo to the list of
1296     translators.
1297    
1298    
1299 frank 2052 2004-01-22 Frank Koormann <[email protected]>
1300    
1301     * Doc/manual/thuban-manual.xml: Added section on installation of
1302     Thuban under Win32 systems. Fixed image path references in the postgis
1303     section. Some minor source formattings.
1304    
1305 frank 2051 2004-01-21 Frank Koormann <[email protected]>
1306    
1307     Make Thuban remember path selections (at least for one application run).
1308    
1309     * Thuban/UI/application.py (Application.OnInit): Initialize path as a
1310     attribute of application object. Path is a dictionary of
1311     strings, currently with the items "data" and "projection".
1312     (Application.SetPath): New, stores path for the specified item.
1313     (Application.Path): New, return path for the specified item.
1314    
1315     * Thuban/UI/mainwindow.py
1316     (MainWindow.OpenSession, MainWindow.SaveSessionAs,
1317     MainWindow.AddLayer, MainWindow.AddRasterLayer,
1318     MainWindow.TableOpen): Access "data" path information of the
1319     application.
1320    
1321     * Thuban/UI/projdialog.py (ProjFrame._OnImport, ProjFrame._OnExport):
1322     Access "projection" path information of the application.
1323    
1324 bh 2048 2004-01-05 Bernhard Herzog <[email protected]>
1325    
1326 bh 2050 * po/ru.po: Updated translations from Alex Shevlakov
1327    
1328     2004-01-05 Bernhard Herzog <[email protected]>
1329    
1330 bh 2048 * po/Makefile, po/README: Move the description of how to generate
1331     the translation statistics to the README.
1332    
1333 bh 2042 2003-12-23 Bernhard Herzog <[email protected]>
1334    
1335 bh 2045 * NEWS: Update for 1.0.0
1336    
1337     * po/it.po: Another update from Maurizio Napolitano
1338    
1339     2003-12-23 Bernhard Herzog <[email protected]>
1340    
1341 bh 2042 * po/it.po: Updated translation from Maurizio Napolitano
1342    
1343     2003-12-23 Bernhard Herzog <[email protected]>
1344    
1345     * Thuban/UI/join.py (JoinDialog.__init__): Mark one more string
1346     for translation
1347    
1348     * Thuban/UI/mainwindow.py (MainWindow.TableRename)
1349     (MainWindow.RenameMap, MainWindow.RenameLayer): Mark some more
1350     strings for translation
1351    
1352     * po/de.po: Update with the newly marked strings.
1353    
1354 bh 2033 2003-12-22 Bernhard Herzog <[email protected]>
1355    
1356 bh 2039 * HOWTO-Release: Fix the places where version numbers have to be
1357     updated
1358    
1359     2003-12-22 Bernhard Herzog <[email protected]>
1360    
1361 bh 2037 * setup.py (setup call): 1.0.0, yeah!
1362    
1363     * Thuban/version.py (longversion): 1.0.0, yeah!
1364    
1365     * Thuban/Model/load.py (SessionLoader.__init__): Accept the
1366     1.0.0 namespace too
1367    
1368     * Thuban/Model/save.py (SessionSaver.write_session): Save with
1369     1.0.0 namespace
1370    
1371     * test/test_load.py (LoadSessionTest.dtd)
1372     (TestSingleLayer.file_contents)
1373     (TestNonAsciiColumnName.file_contents)
1374     (TestLayerVisibility.file_contents)
1375     (TestClassification.file_contents, TestLabels.file_contents)
1376     (TestLayerProjection.file_contents)
1377     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
1378     (TestLabelLayer.file_contents, TestPostGISLayer.file_contents)
1379     (TestPostGISLayerPassword.file_contents)
1380     (TestLoadError.file_contents, TestLoadError.test): Update for
1381     1.0.0 namespace
1382    
1383     * test/test_save.py (SaveSessionTest.dtd)
1384     (SaveSessionTest.testEmptySession)
1385     (SaveSessionTest.testSingleLayer)
1386     (SaveSessionTest.testLayerProjection)
1387     (SaveSessionTest.testRasterLayer)
1388     (SaveSessionTest.testClassifiedLayer)
1389     (SaveSessionTest.test_dbf_table)
1390     (SaveSessionTest.test_joined_table)
1391     (SaveSessionTest.test_save_postgis): Update for 1.0.0 namespace
1392    
1393     2003-12-22 Bernhard Herzog <[email protected]>
1394    
1395 bh 2035 * Thuban/Model/load.py (SessionLoader.start_label): Make sure the
1396     alignment flags are byte strings not unicode and that they have
1397     valid values
1398    
1399     * test/test_load.py (TestLabelLayer): New. Test loading (and
1400     indirectly saving) of maps with labels.
1401    
1402     2003-12-22 Bernhard Herzog <[email protected]>
1403    
1404 bh 2033 * Thuban/UI/tableview.py (TableGrid.OnDestroy)
1405     (TableGrid.__init__): Handle EVT_WINDOW_DESTROY in the grid to
1406     unsubscribe all subscribers.
1407     (LayerTableFrame.OnDestroy): Do not unsubscribe any messages from
1408     self.grid since it may already have been destroyed.
1409     Fixes RT #2256
1410    
1411 bh 2031 2003-12-19 Bernhard Herzog <[email protected]>
1412    
1413     * po/fr.po, po/es.po: Updated translations from Daniel Calvelo
1414    
1415 bh 2028 2003-12-16 Bernhard Herzog <[email protected]>
1416 silke 2029
1417     * debian/bitmappath.patch, debian/setup.py.patch:
1418     added to ensure compliance with FHS for debian
1419     * debian/rules, debian/changelog:
1420     added patches in rules to ensure compliance with FHS for debian
1421 bh 2028
1422 silke 2029 2003-12-16 Bernhard Herzog <[email protected]>
1423    
1424 bh 2028 * po/Makefile (mo): Make the output a bit nicer so that it prints
1425     statistics about the translations. Add a comment how produce even
1426     nicer statistics with sed.
1427    
1428 frank 2026 2003-12-09 Frank Koormann <[email protected]>
1429    
1430     * Resources/Projections/defaults.proj:
1431     French projection sample with correct accents (UNICODE).
1432    
1433 bh 2025 2003-12-05 Bernhard Herzog <[email protected]>
1434    
1435     * MANIFEST.in: Add the devtools directory
1436    
1437     * setup.py (setup call): Use license instead of licence. This
1438     silences a deprecation warning on Python 2.3
1439    
1440 frank 2022 2003-12-05 Frank Koormann <[email protected]>
1441    
1442 frank 2023 Documentation synced with 1.0rc1
1443    
1444     * Doc/manual/thuban-manual.xml:
1445     Minor formatting changes and references to database layers .
1446     Introduction.Internationalization: New section on i18n.
1447     MapManagement.AddingandRemovingLayers: Added item on database layers.
1448     MapManagement.TheLegend: Added section and screenshot on popup menu.
1449     ProjectionManagement: Updated screenshot and sentence on EPSG.
1450     Appendix.SupportedDataSources: Added PostGIS.
1451     Appendix.WorkingwithPostGIS: New section.
1452    
1453     * Doc/manual/images/6_projection.png: Updated screenshot including
1454     EPSG checkboxes.
1455    
1456     * Doc/manual/images/3_5_popup_menu.png: New, popup menu screenshot.
1457    
1458     * Doc/manual/images/app_postgis_add_layer.png,
1459     Doc/manual/images/app_postgis_db_add.png,
1460     Doc/manual/images/app_postgis_db_management.png:
1461     New screenshots focussing on database layers
1462    
1463     2003-12-05 Frank Koormann <[email protected]>
1464    
1465 frank 2022 * Thuban/UI/projdialog.py (load_user_proj): If user.proj is missing
1466     write warning to stderr instead of rising a warning dialog
1467    
1468 bh 2016 2003-12-03 Bernhard Herzog <[email protected]>
1469    
1470 bh 2021 Fix for RT #2243
1471    
1472 bh 2020 * Thuban/UI/mainwindow.py (MainWindow.has_selected_shape_layer):
1473     New. Like has_selected_layer but for shape layers only
1474     (_has_selected_shape_layer): New. Like _has_selected_layer but for
1475     shape layers only
1476     (layer_show_table command, layer_jointable command): Use these
1477     commands should only be available for shape layers
1478    
1479     2003-12-03 Bernhard Herzog <[email protected]>
1480    
1481 bh 2018 * Thuban/UI/mainwindow.py (MainWindow.Unsubscribe): Deal with
1482     publishers that are wx objects and may have been destroyed by wx
1483     already. Fixes RT #2242.
1484    
1485     2003-12-03 Bernhard Herzog <[email protected]>
1486    
1487 bh 2016 * po/ru.po: Updates from Alex Shevlakov
1488    
1489 silke 2013 2003-12-03 Silke Reimer <silkeintevation.de>
1490    
1491     * debian/control, debian/changelog: Added gdal-support to
1492     debian package, updated to new thuban version
1493    
1494    
1495 bh 2012 2003-12-03 Bernhard Herzog <[email protected]>
1496    
1497     * Thuban/Lib/version.py: New. Module for version number
1498     manipulations. The version of make_tuple here also deals better
1499     with more unusual version number strings, such as e.g.
1500     "1.2+cvs20031111"
1501    
1502     * Thuban/version.py (make_tuple): Removed. It's now in
1503     Thuban.Lib.version. Use that implementation instead.
1504    
1505     * test/test_lib_version.py: New. Tests for Thuban/Lib/version.py
1506    
1507 bh 2005 2003-12-02 Bernhard Herzog <[email protected]>
1508    
1509 bh 2010 * MANIFEST.in: Add debian files
1510    
1511 bh 2008 * setup.py (setup call): Add packages for the Extensions so that
1512     they're installed too
1513     (data_files): Add READMEs and sample data from some Extensions
1514    
1515     * NEWS: Add note about the extensions in binary packages
1516    
1517     2003-12-02 Bernhard Herzog <[email protected]>
1518    
1519 bh 2005 * Thuban/Model/save.py (SessionSaver.write_session): Save files
1520     with the thuban-1.0rc1
1521    
1522     * Thuban/Model/load.py (SessionLoader.__init__): Recognize the
1523     thuban-1.0rc1 namespace too
1524    
1525     * test/test_save.py (SaveSessionTest.dtd)
1526     (SaveSessionTest.testEmptySession)
1527     (SaveSessionTest.testSingleLayer)
1528     (SaveSessionTest.testLayerProjection)
1529     (SaveSessionTest.testRasterLayer)
1530     (SaveSessionTest.testClassifiedLayer)
1531     (SaveSessionTest.test_dbf_table)
1532     (SaveSessionTest.test_joined_table)
1533     (SaveSessionTest.test_save_postgis): Update to thuban-1.0rc1
1534     namespace
1535    
1536     * test/test_load.py (LoadSessionTest.dtd): Update to thuban-1.0rc1
1537     namespace
1538     (TestSingleLayer.file_contents)
1539     (TestNonAsciiColumnName.file_contents)
1540     (TestLayerVisibility.file_contents)
1541     (TestClassification.file_contents, TestLabels.file_contents)
1542     (TestLayerProjection.file_contents)
1543     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
1544     (TestPostGISLayer.file_contents)
1545     (TestPostGISLayerPassword.file_contents)
1546     (TestLoadError.file_contents, TestLoadError.test): Update to
1547     thuban-1.0rc1 namespace
1548    
1549 bh 1996 2003-12-01 Bernhard Herzog <[email protected]>
1550    
1551 bh 2003 * setup.py (proj4_prefix, wx_prefix, gdal_prefix): Fix these for
1552     nt to better match Intevation's current w32 setup
1553    
1554 bh 2001 * HOWTO-Release: Add note about updating MANIFEST.in
1555    
1556     * MANIFEST.in: Add the Extensions
1557    
1558 bh 1998 * NEWS: Update for 1.0rc1
1559    
1560     2003-12-01 Bernhard Herzog <[email protected]>
1561    
1562 bh 1996 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Change the wild
1563     cards for the dialog so that shapefiles ending in all uppercase
1564     SHP are listed too
1565    
1566 bh 1988 2003-11-28 Bernhard Herzog <[email protected]>
1567    
1568 bh 1996 * Thuban/version.py (longversion): Update to 1.0rc1
1569    
1570     * setup.py (setup call): Update version to 1.0rc1. Use the
1571     [email protected] email address as author email instead of my
1572     personal one.
1573    
1574     2003-11-28 Bernhard Herzog <[email protected]>
1575    
1576 bh 1992 * po/de.po: Update german translation.
1577    
1578     2003-11-28 Bernhard Herzog <[email protected]>
1579    
1580 bh 1990 Unify the filenames stored in .thuban files so that the .thuban
1581     files are more platform independend
1582    
1583     * Thuban/Model/save.py (unify_filename): New. Unify filenames so
1584     that they can be used on both windows and unix
1585     (SessionSaver.prepare_filename): New. Handle all filename
1586     transformations for filenames stored in the thuban file
1587     (SessionSaver.write_data_containers, SessionSaver.write_layer):
1588     Use prepare_filename
1589    
1590     * test/test_save.py (SaveSessionTest.testSingleLayer)
1591     (SaveSessionTest.testLayerProjection)
1592     (SaveSessionTest.testRasterLayer)
1593     (SaveSessionTest.testClassifiedLayer)
1594     (SaveSessionTest.test_dbf_table)
1595     (SaveSessionTest.test_joined_table): Filenames are always stored
1596     with slashes on all currently supported platforms so adapt all
1597     tests to this
1598    
1599     * test/test_load.py (LoadSessionTest.filenames): With the new
1600     filename scheme the filenames in the tests should be
1601     understandable on all currently supported platforms so we turn
1602     this into an empty list because we don't have to normalize them
1603     anymore
1604    
1605     2003-11-28 Bernhard Herzog <[email protected]>
1606    
1607 bh 1988 * test/test_layer.py (TestLayer.test_arc_layer_with_projection):
1608     Add the ellipsoid to the projection since some Proj versions
1609     complain if it's missing.
1610    
1611 bh 1984 2003-11-27 Bernhard Herzog <[email protected]>
1612    
1613     Corect some bounding box projection problems
1614    
1615     * Thuban/Model/proj.py (Projection.InverseBBox): New. Inverse
1616     version of ForwardBBox
1617     (Projection._transform_bbox): New. common implementation of
1618     ForwardBBox and InverseBBox
1619     (Projection.ForwardBBox): Use _transform_bbox.
1620    
1621     * test/test_proj.py (TestProjection.test): Add test for
1622     InverseBBox
1623    
1624     * Thuban/Model/layer.py (Layer.LatLongBoundingBox)
1625     (Layer.ShapesBoundingBox, RasterLayer.LatLongBoundingBox): Use the
1626     new InverseBBox method to determine the unprojected bounding box
1627     (Layer.ShapesInRegion): Use the ForwardBBox method to project the
1628     bbox.
1629    
1630     * test/test_layer.py (TestLayer.test_point_layer_with_projection):
1631     Removed.
1632     (TestLayer.test_arc_layer_with_projection): New. This test is
1633     better able to test whether bounding boxes are projected correctly
1634     than test_point_layer_with_projection
1635    
1636 bh 1986 * Thuban/UI/viewport.py (ViewPort.map_projection_changed): Use
1637     InverseBBox to unproject bboxes
1638    
1639 bh 1975 2003-11-25 Bernhard Herzog <[email protected]>
1640    
1641 bh 1981 * Thuban/UI/about.py (About.__init__): Make sure we have ASCII
1642     source code.
1643    
1644     2003-11-25 Bernhard Herzog <[email protected]>
1645    
1646 bh 1979 * Thuban/Model/layer.py (Layer.__getattr__): Removed. It was only
1647     there for backwards compatibility and all code relying on that
1648     should have been updated by now.
1649    
1650     2003-11-25 Bernhard Herzog <[email protected]>
1651    
1652 bh 1977 * test/test_load.py (TestClassification.test): Add the missing
1653     round trip test.
1654     (TestClassification.file_contents): Update to the newest file
1655     format
1656    
1657     2003-11-25 Bernhard Herzog <[email protected]>
1658    
1659 bh 1975 Add very experimental (and possibly dangerous) extension to draw
1660     polygons:
1661    
1662     * Extensions/drawshape/README: New. Brief installation
1663     instructions
1664    
1665     * Extensions/drawshape/drawshape.py: New. Implementation of the
1666     drawshape extensions
1667    
1668     * Extensions/drawshape/patch.diff: Patch to apply before the
1669     extension can be used.
1670    
1671 bh 1971 2003-11-24 Bernhard Herzog <[email protected]>
1672    
1673 bh 1973 * Thuban/Model/data.py (ShapefileStore._open_shapefile)
1674     (ShapefileStore.__init__): Factor opening the shapefile into a
1675     separate method (the new _open_shapefile). This makes the code a
1676     bit more readable but the real reason is that it makes some evil
1677     hacks easier. :-)
1678    
1679     2003-11-24 Bernhard Herzog <[email protected]>
1680    
1681 bh 1971 * Thuban/Model/load.py (SessionLoader.check_attrs): If no
1682     converter is specified for an attribute assume it's a string
1683     containing only Latin1 characters. Update doc-string accordingly.
1684     This change should fix many places where unicode objects might
1685     accidentally enter Thuban.
1686    
1687     * test/test_load.py (TestNonAsciiColumnName): New test to check
1688     what happens with column names in DBF files that contain non-ascii
1689     characters
1690    
1691 bh 1969 2003-11-21 Bernhard Herzog <[email protected]>
1692    
1693     Enable the experimental attribute editing again and introduce a
1694     command line switch to actually activate it
1695    
1696     * Thuban/UI/main.py (options): New. Container for options set on
1697     the commmand line
1698     (main): Add the --enable-attribute-editing flag.
1699    
1700     * Thuban/UI/identifyview.py (IdentifyView.__init__): If attribute
1701     editing is enabled use the grid ctrl which allows editing of the
1702     values
1703    
1704     * Thuban/Model/transientdb.py (AutoTransientTable.write_record):
1705     New. Just delegate this to the underlying table.
1706    
1707 bh 1967 2003-11-20 Bernhard Herzog <[email protected]>
1708    
1709     * test/test_proj.py (ProjFileReadTests.test_read_unreadable_file):
1710     Skip this test if run under non-posix systems since it only works
1711     there
1712    
1713 bh 1960 2003-11-19 Bernhard Herzog <[email protected]>
1714    
1715 bh 1965 * Thuban/Model/resource.py: Rework the way gdal support is
1716     determined so that we can give a reason in the about why gdal is
1717     not supported.
1718     (gdal_support_status): New. Variable holding a string with the
1719     reason for no gdal support
1720    
1721     * Thuban/UI/about.py (About.__init__): Add the reason why gdal is
1722     not supported to the message
1723    
1724     2003-11-19 Bernhard Herzog <[email protected]>
1725    
1726 bh 1963 Remove the old table interface and its test cases
1727    
1728     * Thuban/Model/table.py (OldTableInterfaceMixin): Removed.
1729     (DBFTable, MemoryTable): Do not derive from OldTableInterfaceMixin
1730     anymore
1731    
1732     * Thuban/Model/transientdb.py (TransientTableBase)
1733     (AutoTransientTable): Do not derive from OldTableInterfaceMixin
1734     anymore
1735    
1736     * test/test_table.py: Removed since the old interface it tests is
1737     gone.
1738    
1739     * test/runtests.py (main): The old table interface is gone and
1740     with it the deprecation warnings so remove the code that turns
1741     these warnings into errors
1742    
1743     2003-11-19 Bernhard Herzog <[email protected]>
1744    
1745 bh 1960 * test/test_table.py: Revert to revision 1.5 again. Changing the
1746     tests to use the new table interface is completely wrong since the
1747     whole purpose of the tests in this module is to test the old
1748     interface.
1749    
1750 bh 1954 2003-11-18 Bernhard Herzog <[email protected]>
1751    
1752 bh 1958 * Thuban/Model/postgisdb.py (PostGISConnection.MatchesParameters):
1753     New. Test whether the connection matches a set of connection
1754     parameters
1755    
1756     * Thuban/UI/dbdialog.py (DBFrame.conns_changed): Fix doc-string
1757     (DBFrame.OnAdd): Use the new MatchesParameters method when looking
1758     for existing connections with the same parameters and break out of
1759     the loop correctly.
1760    
1761     * test/test_postgis_db.py (TestBriefDescription)
1762     (TestPostGISSimple.test_brief_description): Rename
1763     TestBriefDescription to TestPostGISSimple and the test method to
1764     test_brief_description so that we can add more test methods.
1765     (TestPostGISSimple.test_matches_parameters): New. Test the new
1766     MatchesParameters method
1767    
1768     2003-11-18 Bernhard Herzog <[email protected]>
1769    
1770 bh 1960 * Thuban/Lib/connector.py (Publisher): Introduce a new flag,
1771 bh 1954 _was_destroyed, to indicate whether an publisher instance has
1772     already been destroyed.
1773     (Publisher.Unsubscribe): Only disconnect if the publisher has not
1774     been destroyed yet.
1775     (Publisher.Destroy): Set the _was_destroyed flag to true.
1776    
1777     * test/test_connector.py
1778     (TestPublisher.test_unsubscribe_after_destroy): New. Test that
1779     calling Unsubscribe after Destroy doesn't raise an exception
1780    
1781 bh 1951 2003-11-14 Bernhard Herzog <[email protected]>
1782    
1783     * Thuban/UI/identifyview.py (IdentifyView.selected_shape): Fix
1784     typo in doc-string
1785    
1786 bh 1949 2003-11-13 Bernhard Herzog <[email protected]>
1787    
1788     Quote table and column names properly for postgis.
1789    
1790     * Thuban/Model/postgisdb.py (quote_identifier): New. Function to
1791     quote an identifier for use in an sql statement
1792     (PostGISColumn.__init__): Add the quoted_name attribute
1793     (PostGISTable.__init__): New instance variable quoted_tablename
1794     (PostGISTable._fetch_table_information): Use the quoted table
1795     name. New isntance variable quoted_geo_col with a quoted version
1796     of geometry_column
1797     (PostGISTable.NumRows, PostGISTable.RowIdToOrdinal)
1798     (PostGISTable.RowOrdinalToId): Use the quoted table name
1799     (PostGISTable.ReadValue, PostGISTable.ValueRange)
1800     (PostGISTable.UniqueValues, PostGISTable.SimpleQuery)
1801     (PostGISShapeStore.BoundingBox, PostGISShapeStore.Shape)
1802     (PostGISShapeStore.AllShapes, PostGISShapeStore.ShapesInRegion):
1803     Use quoted table and column names
1804    
1805     * test/test_postgis_db.py (TestPostGISSpecialCases)
1806     (TestPostGISIgnoredColumns): Rename the class to
1807     TestPostGISSpecialCases because that better describes the new
1808     cases
1809     (TestPostGISSpecialCases.test_unsupported_types)
1810     (TestPostGISSpecialCases.test): Rename the method to
1811     test_unsupported_types because we need a more descriptive name now
1812     that there are more methods
1813     (TestPostGISSpecialCases.test_table_name_quoting)
1814     (TestPostGISSpecialCases.test_column_name_quoting)
1815     (TestPostGISSpecialCases.test_shapestore_name_quoting): New test
1816     cases to test quoting of table and column names in PostGISTable
1817     and PostGISShapeStore
1818    
1819     * test/postgissupport.py
1820     (skip_if_addgeometrycolumn_does_not_use_quote_ident): New. Skip if
1821     AddGeometryColumn desn't support table or column names with sapces
1822     or double quotes
1823    
1824 jan 1945 2003-11-12 Jan-Oliver Wagner <[email protected]>
1825    
1826     * Extensions/wms/__init__.py: New: Init to make this
1827     directory a package.
1828    
1829     * Extensions/wms/wms.py: New: Provide layers via OGC WMS.
1830    
1831 bh 1932 2003-11-11 Bernhard Herzog <[email protected]>
1832    
1833 bh 1942 * Thuban/Model/resource.py (EPSG_DEPRECATED_PROJ_FILE): New.
1834     Constant for the file woth deprecated epsg projections
1835     (get_system_proj_file): Update doc-string
1836    
1837     * Thuban/UI/projdialog.py (ProjFrame.build_dialog): Add a space
1838     above the EPS widgets, introduce a check box for the deprecated
1839     eps projections and a label for the epsg widgets
1840     (ProjFrame._OnShowEPSG): Handle the deprecated EPSG projections
1841     too
1842    
1843     2003-11-11 Bernhard Herzog <[email protected]>
1844    
1845 bh 1939 Avoid warnings when run under Python 2.3
1846    
1847     * Thuban/UI/baserenderer.py (BaseRenderer.draw_point_shape)
1848     (BaseRenderer.draw_label_layer): Coordinates must be ints.
1849    
1850     * Thuban/UI/renderer.py (MapRenderer.make_point): Turn this into a
1851     real method so that we can convert to int.
1852     (MapRenderer.label_font): The font size mist be an int.
1853    
1854     * Thuban/UI/common.py (Color2wxColour): The color values must be
1855     ints. Also, remove the unnecessary asserts.
1856    
1857     * test/test_load_0_8.py (TestUnicodeStrings.file_contents)
1858     (TestUnicodeStrings.test): Python source code should not contain
1859     non-ascii characters unless an encoding is specified in the file.
1860     Therefore use \x escapes in the string literals for non-ascii
1861     characters.
1862    
1863     2003-11-11 Bernhard Herzog <[email protected]>
1864    
1865 bh 1934 * Thuban/Model/resource.py (get_system_proj_file): Add a filename
1866     parameter so that this function can be used for all proj files in
1867     Resource/Projections
1868     (DEFAULT_PROJ_FILE, EPSG_PROJ_FILE): New. Predefined filenames for
1869     get_system_proj_file
1870    
1871     * Thuban/UI/projdialog.py (ProjFrame.__init__): Instead of one
1872     ProjFile self.__sysProjFile use a dictionary of system ProjFile
1873     objects self._sys_proj_files
1874     (ProjFrame.build_dialog): Adapt to the new changes in the
1875     ProjectionList constructor. Add a check button to toggle whether
1876     EPSG projections are shown
1877     (ProjFrame._OnShowEPSG): New. Handler for the epsg check button
1878     events.
1879     (ProjFrame.load_user_proj, ProjFrame.load_system_proj): Only show
1880     the busy cursor if the files have not yet been loaded by the
1881     dialog.
1882     (ProjFrame.load_system_proj): Add a parameter for the name of the
1883     proj file. Maintain the dictionary of system projections
1884     self._sys_proj_files
1885    
1886     * Thuban/UI/projlist.py (ProjectionList): Merge the system_projs,
1887     user_projs parameters into one parameter proj_files which is a
1888     list of proj files.
1889     (ProjectionList._subscribe_proj_files)
1890     (ProjectionList._unsubscribe_proj_files): New. Move
1891     subscription/unsubscription of projfile messages to separate
1892     methods
1893     (ProjectionList.Destroy): The unsubscribe is now done in
1894     _unsubscribe_proj_files
1895     (ProjectionList.update_projections): We now have a list of proj
1896     file objects
1897     (ProjectionList.SetProjFiles): New method to set a new list of
1898     proj file objects
1899    
1900     * test/test_proj.py (ProjFileReadTests.test_get_system_proj_file):
1901     Specify explicitly which system proj file to load.
1902    
1903     2003-11-11 Bernhard Herzog <[email protected]>
1904    
1905 bh 1932 * Thuban/Model/load.py (SessionLoader.Destroy): New. Clear all
1906     instance variables to cut cyclic references. The GC would have
1907     collected the loader eventually but it can happen that it doesn't
1908     run at all until thuban is closed (2.3 but not 2.2 tries a bit
1909     harder and forces a collection when the interpreter terminates)
1910     (load_session): Call the handler's Destroy method to make sure
1911     that it gets garbage collected early. Otherwise it will be
1912     collected very late if at all and it holds some references to e.g.
1913     shapestores and the session which can lead to leaks (of e.g. the
1914     temporary files)
1915    
1916     * test/test_load.py (TestSingleLayer.test_leak): New. test for the
1917     resource leak in load_session
1918    
1919 bh 1929 2003-11-10 Bernhard Herzog <[email protected]>
1920    
1921     * Thuban/UI/baserenderer.py: Add a way to specify how layers in
1922     extensions are to be rendered.
1923     (_renderer_extensions): New. List with renderer for layers in
1924     extensions
1925     (add_renderer_extension): New. Add a renderer extension
1926     (init_renderer_extensions): New. Init the renderer extensions
1927     (BaseRenderer.render_map_incrementally): Search
1928     _renderer_extensions for how to draw unknown layer types
1929     (BaseRenderer.draw_raster_data): Add format parameter so that
1930     formats other than BMP can be drawn
1931     (BaseRenderer.draw_raster_layer): Pass an explicit format to
1932     draw_raster_data
1933    
1934     * Thuban/UI/renderer.py (raster_format_map): New. Mapping form the
1935     strings of the format parameter of draw_raster_data method to wx
1936     constants
1937     (MapRenderer.draw_raster_data): Add the format parameter and use
1938     raster_format_map to map it to the right wxwindows constant for
1939     wxImageFromStream
1940    
1941     * test/test_baserenderer.py (SimpleRenderer.draw_raster_data): Add
1942     the format parameter and record it
1943     (TestBaseRenderer.test_raster_no_projection): check the format
1944     paramter of the draw_raster_data method
1945     (TestBaseRenderer.test_renderer_extension): New. Test the renderer
1946     extension facility
1947    
1948 bh 1925 2003-11-07 Bernhard Herzog <[email protected]>
1949    
1950     Tweak the usage of the sqlite database to make common use cases
1951     more responsive. In most cases copying the data to the sqlite
1952     database takes so long that using sqlite doesn't have enough
1953     advantages.
1954    
1955     * Thuban/Model/transientdb.py (TransientTableBase.ValueRange): Add
1956     comments about performance and query the min and max in separate
1957     statements because only that way will indexes be used.
1958     (TransientTableBase.UniqueValues): Add some comments about
1959     performance.
1960     (AutoTransientTable.ValueRange, AutoTransientTable.UniqueValues):
1961     Do not copy the data to the transient DB but use the transient
1962     copy if it exists. See the new comments for the performance trade
1963     offs
1964    
1965     * test/test_transientdb.py
1966     (TestTransientTable.test_auto_transient_table): Make sure that the
1967     data is copied to the transient database at some point.
1968    
1969 bh 1913 2003-11-03 Bernhard Herzog <[email protected]>
1970    
1971 bh 1922 * Thuban/Model/data.py (ShapefileStore.ShapesInRegion): Bind some
1972     globals to locals so that it's a bit faster
1973    
1974     2003-11-03 Bernhard Herzog <[email protected]>
1975    
1976 bh 1920 * Thuban/UI/baserenderer.py
1977     (BaseRenderer.draw_shape_layer_incrementally): Use the ReadValue
1978     method. ReadValue is faster than ReadRowAsDict since it only reads
1979     one cell especially now that the dbf file objects actually
1980     implement it.
1981    
1982     * Thuban/Model/table.py (DBFTable.ReadValue): Use the new
1983     read_attribute method of the dbf objects
1984    
1985     2003-11-03 Bernhard Herzog <[email protected]>
1986    
1987 bh 1916 * Extensions/profiling/profiling.py (popup_dialog_box): New config
1988     variable to indicate whether the result should be shown in a
1989     dialog box
1990     (profile_screen_renderer, time_screen_renderer): Only show a
1991     dialog box if popup_dialog_box is true.
1992     (profile_screen_renderer): Flush stdout after the printing the
1993     first part of the "profiling..." message
1994    
1995     * Thuban/UI/baserenderer.py
1996     (BaseRenderer.draw_shape_layer_incrementally): Cache the pens and
1997     brushes for the groups so that they're not created over and over
1998     again
1999    
2000 bh 1913 * Thuban/Model/classification.py (Classification.__getattr__)
2001     (Classification._compile_classification)
2002     (Classification._clear_compiled_classification): New. Methods to
2003     manage a 'compiled' representation of the classification groups
2004     which is created on demand
2005     (Classification.InsertGroup, Classification.RemoveGroup)
2006     (Classification.ReplaceGroup): reset the compiled representation
2007     (Classification.FindGroup): Use the compiled representation to
2008     find the matching group
2009     (ClassGroupRange.GetRangeTuple): New. Return the range as a tuple
2010    
2011 bh 1904 2003-10-31 Bernhard Herzog <[email protected]>
2012    
2013 bh 1911 * Thuban/Model/classification.py (Classification.SetDefaultGroup):
2014     Send a CLASS_CHANGED message
2015     (Classification.RemoveGroup): Send a CLASS_CHANGED message and do
2016     not return the removed group since it wasn't used.
2017    
2018     * test/test_classification.py
2019     (TestClassification.test_set_default_group): New. Test the
2020     SetDefaultGroup method
2021     (TestClassification.test_insert_group): New. Test the InsertGroup
2022     method
2023     (TestClassification.test_remove_group): New. Test the RemoveGroup
2024     method
2025     (TestClassification.test_replace_group): New. Test the
2026     ReplaceGroup method
2027    
2028     2003-10-31 Bernhard Herzog <[email protected]>
2029    
2030 bh 1908 * test/test_classification.py (TestClassification.setUp):
2031     Subscribe to the CLASS_CHANGED messages
2032     (TestClassification.tearDown): New. Destroy the classification
2033     properly
2034     (TestClassification.test_defaults): Add tests for the default line
2035     width and whether no messages were sent yet
2036     (TestClassification.test_set_default_properties): Add tests for
2037     messages and setting the default line width
2038     (TestClassification.test_add_singleton)
2039     (TestClassification.test_add_range)
2040     (TestClassification.test_multiple_groups): Add tests for messages
2041    
2042     2003-10-31 Bernhard Herzog <[email protected]>
2043    
2044 bh 1906 Some more refactoring in preparation for new tests:
2045    
2046     * test/test_classification.py (TestClassification.setUp): New.
2047     Instantiate the classification here. Update the test methods
2048     accordingly.
2049     (TestClassification.test_multiple_groups): Make sure that the two
2050     singletons matching 1 are considered different.
2051    
2052     2003-10-31 Bernhard Herzog <[email protected]>
2053    
2054 bh 1904 * test/test_classification.py (red, green, blue): New. These
2055     constants were used in several cases. Update the relevant methods.
2056     (TestClassification.test_defaults)
2057     (TestClassification.test_set_default_properties)
2058     (TestClassification.test_add_singleton)
2059     (TestClassification.test_add_range)
2060     (TestClassification.test_multiple_groups)
2061     (TestClassification.test_deepcopy): New. These were formerly all
2062     part of the single method test.
2063     (TestClassification.test_deepcopy): Removed.
2064     (TestClassIterator): Removed. The test case is now a method of
2065     TestClassification since it tests part of the public interface of
2066     Classification
2067     (TestClassification.test_iterator): New. Used to be
2068     TestClassIterator effectively
2069    
2070 jan 1902 2003-10-31 Jan-Oliver Wagner <[email protected]>
2071    
2072     GUIfied the functions of the profiling extension.
2073    
2074     * /Extensions/profiling/__init__.py: New: Init to make this
2075     directory a package.
2076    
2077     * Extensions/profiling/profiling.py: Moved menu entries to
2078     the Extensions menu. Applied _() for strings.
2079     (profile_screen_renderer): Catch the detailed printout and present
2080     it in a dialog.
2081 bh 1904 (time_screen_renderer): Raise a dialog to present the result instead
2082 jan 1902 of printing it to stdout.
2083    
2084 bh 1897 2003-10-31 Bernhard Herzog <[email protected]>
2085    
2086 bh 1899 * test/test_classification.py (TestClassGroupProperties)
2087     (TestClassGroup, TestClassGroupDefault, TestClassGroupRange)
2088     (TestClassGroupSingleton, TestClassIterator, TestClassification):
2089     Split TestClassification into several classes, one for each class
2090     being tested. TestClassification itself now only tests
2091     Classification. This split makes changes to the tests a bit easier
2092    
2093     2003-10-31 Bernhard Herzog <[email protected]>
2094    
2095 bh 1897 * Extensions/profiling/profiling.py: New. Extension to measure
2096     Thuban performance
2097    
2098 frank 1895 2003-10-31 Frank Koormann <[email protected]>
2099    
2100     Added two items to legend popup menu: Remove Layer and Show Layer Table
2101    
2102     * Thuban/UI/legend.py (LegendPanel._OnRemoveLayer,
2103     LegendPanel._OnShowTable): New event handlers, call the corresponding
2104     mainwindow methods.
2105     (LegendTree._OnRightClick): Added items to popup menu.
2106    
2107 bh 1894 2003-10-30 Bernhard Herzog <[email protected]>
2108    
2109     * Thuban/UI/dialogs.py (ThubanFrame.__init__): Handle
2110     EVT_WINDOW_DESTROY
2111     (ThubanFrame.OnDestroy): New. Handler for EVT_WINDOW_DESTROY. Does
2112     nothing but is convenient for the derived classes.
2113    
2114     * Thuban/UI/tableview.py
2115     (TableFrame.OnDestroy, LayerTableFrame.OnDestroy): New.
2116     Unsubscribe the messages here not in OnClose because that might
2117     get called multiple times. Fixes RT #2196
2118     (TableFrame.OnClose, LayerTableFrame.OnClose): Removed. Not needed
2119     anymore.
2120    
2121     * README: Update the minimum requirement for wxPython. Since we
2122     now use the EVT_WINDOW_DESTROY event, we need at least 2.4.0.4,
2123     the version in which that was introduced for all platforms
2124    
2125 frank 1890 2003-10-30 Frank Koormann <[email protected]>
2126    
2127     * Thuban/UI/join.py (JoinDialog.OnJoin): Wrapped the major parts of
2128     the join process in a ThubanBeginBusyCursor, ThubanEndBusyCursor
2129     frame.
2130    
2131 jan 1889 2003-10-30 Jan-Oliver Wagner <[email protected]>
2132    
2133     Improved APR import extension, added further EPSG definitions
2134     and some cleanup regarding string class.
2135    
2136     * test/test_proj.py (TestProjection.test_get_projection_units_geo):
2137     Added test for alias 'longlat'.
2138    
2139     * Resources/Projections/epsg-deprecated.proj: New. Contains
2140     deprecated EPSG definitions.
2141    
2142     * Extensions/importAPR/odb.py (ODBBaseObject.TreeInfo): Added
2143     the variable names for objects.
2144    
2145     * Extensions/importAPR/apr.py (APR_BLnSym, APR_BMkSym, APR_BShSym): New.
2146     Copied from importAPR and provided with documentation.
2147    
2148     * Extensions/importAPR/importAPR.py (APR_BLnSym, APR_BMkSym, APR_BShSym):
2149     Moved to apr.py.
2150     (APR_View): Added object ref 'ITheme'.
2151    
2152     * Thuban/Lib/fileutil.py, Thuban/UI/proj4dialog.py: Replaced string
2153     split function by corresponding use of the string class method.
2154    
2155     * Thuban/Model/xmlwriter.py: Replaced string replace function by
2156     corresponding string method.
2157    
2158 bh 1880 2003-10-29 Bernhard Herzog <[email protected]>
2159    
2160     * Thuban/UI/baserenderer.py
2161     (BaseRenderer.draw_shape_layer_incrementally): Speed up the
2162     special case of a classification that only has the default group
2163    
2164 bh 1868 2003-10-27 Bernhard Herzog <[email protected]>
2165    
2166 bh 1878 * po/fr.po, po/es.po: Updated translations from Daniel Calvelo
2167    
2168 bh 1876 * po/de.po: Update.
2169    
2170     * Thuban/UI/application.py
2171     (ThubanApplication.ShowExceptionDialog): Handle translation of the
2172     dialog message properly
2173    
2174     2003-10-27 Bernhard Herzog <[email protected]>
2175    
2176 bh 1873 Rework how localization works so that we use wx's translation
2177     functions when running Thuban as a normal application but not when
2178     we don't need any UI, such as in the test suite. See the comment
2179     in Thuban/__init__.py for details
2180    
2181     * Thuban/__init__.py (_): Add one level of indirection to make the
2182     translation handling more flexible and to make it possible to use
2183     either wx's translation services or not.
2184     (gettext_identity, translation_function_installed)
2185     (install_translation_function): New function to help with this
2186    
2187     * Thuban/UI/__init__.py: Install the wx specific translation
2188     function if it's OK to do that
2189    
2190     * test/support.py (initthuban): Install a dummy translation
2191     function so that importing Thuban.UI doesn't install a wx specific
2192     one for which would need to import wxPython
2193    
2194     2003-10-27 Bernhard Herzog <[email protected]>
2195    
2196 bh 1870 * HOWTO-Release: Source archives should be created first and the
2197     binary packages should be created from the source archives.
2198     There's an official debian package now so there's no need to test
2199     the rpm on debian anymore
2200    
2201     2003-10-27 Bernhard Herzog <[email protected]>
2202    
2203 bh 1868 Several rendering changes:
2204    
2205     - Render the selection into a separate bitmap so that only that
2206     bitmap needs to be redrawn when the selection changes
2207    
2208     - Render incrementally showing previews and allowing interaction
2209     before rendering is complete
2210    
2211     - Update the renderer interface a bit. Most parameters of
2212     RenderMap are now parameters of the constructor
2213    
2214     * Thuban/UI/baserenderer.py (BaseRenderer.__init__): Add the map
2215     and the update region as parameters. Update the doc-string
2216     (BaseRenderer.render_map_incrementally): New. Generator function
2217     to renders the map incrementally
2218     (BaseRenderer.render_map): Remove the map argument (it's now in
2219     the constructor) and simply iterate over the
2220     render_map_incrementally generator to draw the map.
2221     (BaseRenderer.draw_shape_layer_incrementally)
2222     (BaseRenderer.draw_shape_layer): Renamed to
2223     draw_shape_layer_incrementally and changed into a generator that
2224     yields True every 500 shapes. Used by render_map_incrementally to
2225     render shape layers incrementally
2226    
2227     * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Removed the
2228     map and region parameters which are now in the constructor
2229     (ScreenRenderer.RenderMapIncrementally): New. Public frontend for
2230     the inherited render_map_incrementally.
2231     (BaseRenderer.draw_shape_layer): Removed.
2232     (ScreenRenderer.draw_selection_incrementally): New. The selection
2233     drawing part of the removed draw_shape_layer as a generator
2234     (ScreenRenderer.layer_shapes): Update because of the region
2235     parameter change
2236     (ExportRenderer.__init__): New. Extend the inherited constructor
2237     with the destination region for the drawing
2238     (ExportRenderer.RenderMap): Removed the map and region parameters
2239     which are now in the constructor
2240    
2241     * Thuban/UI/view.py (MapCanvas.PreviewBitmap): New. Return a
2242     bitmap suitable for a preview in a tool
2243     (CanvasPanTool.MouseMove): Use the PreviewBitmap method to get the
2244     bitmap
2245     (MapPrintout.draw_on_dc): Adapt to new renderer interface
2246     (MapCanvas.OnPaint): Handle drawing the selection bitmap if it
2247     exists
2248     (MapCanvas.OnIdle): Update the logic to deal with incremental
2249     rendering and the selection bitmap
2250     (MapCanvas._do_redraw): Handle the instantiation of the render
2251     iterator and the redraws during rendering
2252     (MapCanvas._render_iterator): New. Generator to incrementally
2253     redraw both bitmaps
2254     (MapCanvas.Export): Adapt to new renderer interface.
2255     (MapCanvas.full_redraw): Reset the selection bitmap and the
2256     renderer iterator too
2257     (MapCanvas.redraw_selection): New. Force a redraw of the selection
2258     bitmap
2259     (MapCanvas.shape_selected): Only redraw the selection bitmap
2260    
2261     * test/test_baserenderer.py
2262     (TestBaseRenderer.test_polygon_no_projection)
2263     (TestBaseRenderer.test_raster_no_projection)
2264     (TestBaseRenderer.test_point_map_projection)
2265     (TestBaseRenderer.test_point_layer_and_map_projection)
2266     (TestBaseRenderer.test_point_layer_projection)
2267     (TestBaseRenderer.test_point_with_classification): Adapt to new
2268     renderer interface
2269    
2270 bh 1865 2003-10-24 Bernhard Herzog <[email protected]>
2271    
2272     * libraries/thuban/wxproj.cpp (draw_polygon_shape)
2273     (point_in_polygon_shape, shape_centroid): Raise an exception if
2274     the shape can't be read. Previously invalid shape ids would lead
2275     to a segfault.
2276    
2277     * test/test_wxproj.py (TestShapeCentroid.test_invalid_shape_id):
2278     New. test whether an exception is raised for invalid shape ids
2279    
2280 jan 1857 2003-10-24 Jan-Oliver Wagner <[email protected]>
2281    
2282 jan 1862 * Thuban/Model/proj.py (Projection.GetProjectedUnits): Added 'longlat'
2283     as alias for 'latlong'.
2284    
2285     * Thuban/UI/projdialog.py (ProjFrame.__init__): Added 'longlat'
2286     as alias for 'latlong'.
2287    
2288     2003-10-24 Jan-Oliver Wagner <[email protected]>
2289    
2290 jan 1859 * Thuban/UI/projdialog.py (ProjFrame.proj_selection_changed): Set
2291     the projection even for the UnknownPanel.
2292     (UnknownProjPanel.__init__): Define the text and create the textctrl
2293     widget.
2294     (UnknownProjPanel._DoLayout): Replaced static text widget by the
2295     textctrl created in __init__.
2296     (UnknownProjPanel.SetProjection): Set the text for the text ctrl
2297     including the parameters of the projection.
2298    
2299     2003-10-24 Jan-Oliver Wagner <[email protected]>
2300    
2301 jan 1857 * Resources/Projections/epsg.proj: New. This is a list of
2302     EPSG codes with parameters for proj. The list has been
2303     generated using devtools/create_epsg.py based on the
2304     file nad/epsg of the proj 4.4.7 package. Four projection
2305     definitions have been deleted as they are not accepted by proj:
2306     "CH1903+ / LV95", "Bern 1898 (Bern) / LV03C", "CH1903 / LV03"
2307     and "HD72 / EOV".
2308    
2309 bh 1855 2003-10-22 Bernhard Herzog <[email protected]>
2310    
2311     Some more tweaks to the projection dialog which should fix RT
2312     #1886.
2313    
2314     * Thuban/UI/projlist.py (ProjectionList.Destroy): Unsubscribe from
2315     the ProjFile's messages and call the base class methods correctly
2316     (ProjectionList.SelectProjection): Set the wxLIST_STATE_FOCUSED
2317     flag on the newly selected item too. Otherwise some other item is
2318     focused and the first time the focus is moved with the keyboard
2319     the selection moves in unexpected ways.
2320    
2321     * Thuban/UI/projdialog.py (ProjFrame.__init__): Do not set the
2322     focus on the OK button, only on the projection list. That way the
2323     list really has the focus initially
2324     (ProjFrame.OnClose): Call the projection list's Destroy method to
2325     make it unsubscribe all messages
2326    
2327 bh 1840 2003-10-21 Bernhard Herzog <[email protected]>
2328    
2329 bh 1852 Rework the projection dialog to fix a few bugs, including RT 2166
2330     and most of 2168
2331    
2332     * Thuban/UI/projlist.py: New. The class ProjectionList is a
2333     special wxListCtrl to show a list of projections in a more MVC
2334     fashion
2335    
2336     * Thuban/UI/projdialog.py (ProjFrame): Substantial changes
2337     throughout the class. The main change is to use the ProjectionList
2338     class instead of a normal wxListBox. Also, add an explicit
2339     "Unknown" projection to the projection choice control.
2340     (ProjPanel.__init__): Add an "unknown" ellipsoid
2341     (TMPanel.__init__, LCCPanel.__init__): Tweak the order of
2342     instantiation of the panel's controls to make the tab-order more
2343     natural
2344    
2345     2003-10-21 Bernhard Herzog <[email protected]>
2346    
2347 bh 1849 * test/test_load.py (TestSingleLayer.file_contents)
2348     (TestSingleLayer.test): Add non-ascii characters to the titles of
2349     session, map and layer. This is effectively a port of the
2350     TestUnicodeStrings test in test_load_0_8.py which for some reason
2351     was only added there.
2352    
2353     * test/test_load_0_9.py (TestSingleLayer.file_contents)
2354     (TestSingleLayer.test): Same as in test_load.py: add non-ascii
2355     characters to the titles of session, map and layer,.
2356    
2357     2003-10-21 Bernhard Herzog <[email protected]>
2358    
2359 bh 1847 Add EPSG projection handling to .thuban files
2360    
2361     * test/test_save.py (SaveSessionTest.dtd)
2362     (SaveSessionTest.testEmptySession)
2363     (SaveSessionTest.testLayerProjection)
2364     (SaveSessionTest.testRasterLayer)
2365     (SaveSessionTest.testClassifiedLayer)
2366     (SaveSessionTest.test_dbf_table)
2367     (SaveSessionTest.test_joined_table)
2368     (SaveSessionTest.test_save_postgis): Update to 1.0-dev namespace
2369     (SaveSessionTest.testSingleLayer): Update to 1.0-dev namespace and
2370     use a and epsg projection to test saving them
2371    
2372     * test/test_load.py (LoadSessionTest.dtd): Update to 1.0-dev
2373     namespace
2374     (TestLayerVisibility.file_contents, TestLabels.file_contents)
2375     (TestLayerProjection.file_contents)
2376     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
2377     (TestPostGISLayer.file_contents)
2378     (TestPostGISLayerPassword.file_contents)
2379     (TestLoadError.file_contents, TestLoadError.test): Update to use
2380     1.0-dev namespace
2381     (TestSingleLayer.file_contents, TestSingleLayer.test): Update to
2382     use 1.0-dev namespace and use an EPSG projection to test whether
2383     loading it works
2384    
2385     * test/test_load_0_9.py: New. Effectively a copy of test_load.py
2386     as of Thuban 0.9. These are now tests to determine whether Thuban
2387     can still read files generated by Thuban 0.9
2388    
2389     * Thuban/Model/save.py (SessionSaver.write)
2390     (SessionSaver.write_session): Use the 1.0 dtd and 1.0-dev
2391     namespace
2392     (SessionSaver.write_projection): Write the projection's epsg
2393     attribute
2394    
2395     * Thuban/Model/load.py (SessionLoader.__init__): Also accept the
2396     thuban-1.0-dev.dtd namespace
2397     (SessionLoader.check_attrs): Allow a callable object as conversion
2398     too
2399     (SessionLoader.start_projection, SessionLoader.end_projection)
2400     (SessionLoader.start_parameter): Handle the epsg attribute and
2401     rename a few instance variables to lower case
2402    
2403     * Resources/XML/thuban-1.0.dtd: New. Only difference to
2404     thuban-0.9.dtd is the epsg attribute for projections.
2405    
2406     2003-10-21 Bernhard Herzog <[email protected]>
2407    
2408 bh 1840 * test/runtests.py (main): Let the user specify which tests to run
2409     on the command line
2410    
2411     * test/support.py (ThubanTestResult.getDescription): Override to
2412     give a better short description. The description can be used as a
2413     parameter to run_tests to run that particular test in isolation.
2414    
2415 frank 1837 2003-10-21 Frank Koormann <[email protected]>
2416    
2417     Popup menu for legend. Scheduled for the 1.2 release this was too
2418     simple to implement: The popup menu is bound to the legend tree, while
2419     the events are hanlded by its anchestor, the legend panel. This
2420     allows reuse of all the event handlers already implemented for the
2421     legend toolbar buttons.
2422    
2423     * Thuban/UI/legend.py (LegendPanel.__init__): EVT_MENU macros
2424     to add handlers for the events issued by the popup menu.
2425     (LegendPanel._OnToggleVisibility): Handler for toggling layer
2426     visibility event
2427     (LegendPanel._OnProjection): Handler for layer projection event.
2428     (LegendTree.__init__): Added EVT_TREE_ITEM_RIGHT_CLICK
2429     (LegendTree._OnRightClick): Event handler for right click, select item
2430     and pop up menu.
2431     (LegendTree.ToggleVisibility): Toggle layer visibility
2432     (LegendTree.LayerProjection): Raise layer projection dialog for
2433     current layer.
2434    
2435 bh 1836 2003-10-21 Bernhard Herzog <[email protected]>
2436    
2437     * Resources/Projections/defaults.proj: Use correct DOCTYPE
2438     declaration. The top-level element is projectionlist not projfile
2439    
2440 bh 1834 2003-10-20 Bernhard Herzog <[email protected]>
2441    
2442     * Thuban/UI/projdialog.py (ProjFrame.write_proj_file): New. helper
2443     method to write a projfile and display a busy cursor and error
2444     dialogs.
2445     (ProjFrame._OnSave, ProjFrame._OnAddToList, ProjFrame._OnImport)
2446     (ProjFrame._OnExport, ProjFrame._OnRemove): Use write_proj_file
2447     (ProjFrame.__FillAvailList): Translate "<None>" too and display a
2448     busy cursor while loading the user and system prj files.
2449    
2450 bh 1832 2003-10-16 Bernhard Herzog <[email protected]>
2451    
2452     * Thuban/Model/resource.py (projfile_cache): Introduce a cache for
2453     ProjFile objects
2454     (clear_proj_file_cache): New function to clear the cache. Mainly
2455     useful for use by the test suite
2456     (read_proj_file): Use the cache.
2457    
2458     * test/test_proj.py (TestProjFile): Clarify the doc-string
2459     (ProjFileReadTests): Update doc-string
2460     (ProjFileReadTests.test_get_system_proj_file): Check whether the
2461     system proj files is cached.
2462     (ProjFileLoadTestCase): New base class for the proj file tests
2463     derived from support.FileLoadTestCase to provide some common
2464     behavior.
2465     (TestLoadingProjFile)
2466     (TestLoadingProjFileWithEmptyProjectionlist.file_contents)
2467     (TestProjFileWithInvalidParameters.file_contents): Derive from
2468     ProjFileLoadTestCase
2469     (TestLoadingProjFile.test_caching): New. Test whether the cache
2470     works
2471    
2472 silke 1829 2003-10-16 Silke Reimer <[email protected]>
2473    
2474     * debian/*: New directory with configuration files for building a thuban
2475     deb-package.
2476    
2477 bh 1822 2003-10-14 Bernhard Herzog <[email protected]>
2478    
2479 bh 1828 * test/test_proj.py: Execute support.run_tests when run as
2480     __main__ so that missing unsubscribes are detected
2481     (TestProjFile.tearDown): Destroy the proj_file properly
2482    
2483     2003-10-14 Bernhard Herzog <[email protected]>
2484    
2485 bh 1826 * Thuban/Model/messages.py (PROJECTION_ADDED)
2486     (PROJECTION_REPLACED, PROJECTION_REMOVED): New message types for
2487     the ProjFile objects
2488    
2489     * Thuban/Model/proj.py (ProjFile): Derive from Publisher so we can
2490     easily send messages when the projections change
2491     (ProjFile.Add, ProjFile.Remove, ProjFile.Replace): Issue messages
2492     when the change was successful
2493    
2494     * test/test_proj.py (TestProjFile.setUp): Subscribe to some of the
2495     proj file messages
2496     (TestProjFile.test_add_remove)
2497     (TestProjFile.test_remove_non_existing)
2498     (TestProjFile.test_replace)
2499     (TestProjFile.test_replace_non_existing): Test whether the right
2500     messages are sent
2501    
2502     2003-10-14 Bernhard Herzog <[email protected]>
2503    
2504 bh 1822 * test/test_proj.py (TestProjFile.test): Refactor into several
2505     tests
2506     (TestProjFile.test_add_remove)
2507     (TestProjFile.test_remove_non_existing)
2508     (TestProjFile.test_replace)
2509     (TestProjFile.test_replace_non_existing): Some of the new
2510     individual test cases
2511     (TestProjFileSimple): New class for the rest of the test cases
2512     that came out of the refactoring
2513     (ProjFileTest): Derive from xmlsupport.ValidationTest so that the
2514     derived classes don't have to
2515    
2516 bh 1812 2003-10-13 Bernhard Herzog <[email protected]>
2517    
2518 bh 1820 Add an optional EPSG code to the projection objects and extend the
2519     .proj file format accordingly.
2520    
2521     * Resources/XML/projfile.dtd (element projection): Add epsg
2522     attribute
2523    
2524     * Thuban/Model/proj.py (Projection.__init__): New parameter and
2525     instance variable epsg. Update doc-string
2526     (Projection.EPSGCode, Projection.Label): New methods to provide
2527     access to EPSG code and a label for use in dialogs
2528    
2529     * Thuban/Model/resource.py (ProjFileReader.start_projection)
2530     (ProjFileReader.end_projection, ProjFileSaver.write_projfile):
2531     Handle the epsg code attribute when reading or writing proj files
2532    
2533     * Thuban/UI/projdialog.py (ProjFrame._OnSave)
2534     (ProjFrame._OnAddToList, ProjFrame.__DoOnProjAvail)
2535     (ProjFrame.__FillAvailList): Use the projection's Label method to
2536     get the string for the list box
2537    
2538     * test/test_proj.py (TestProjection.test_label)
2539     (TestProjection.test_label_epsg)
2540     (TestProjection.test_epsgcode_for_non_epsg_projection)
2541     (TestProjection.test_epsgcode_for_real_epsg_projection): New tests
2542     for the label and EPSGCode methods
2543     (WriteProjFileTests.doTestWrite, WriteProjFileTests.test_write)
2544     (WriteProjFileTests.test_write_empty_file): Create the ProjFile
2545     objects in the test cases and put the expected contents into the
2546     test case methods too. Update doTestWrite accordingly
2547     (TestLoadingProjFile)
2548     (TestLoadingProjFileWithEmptyProjectionlist): New classes with the
2549     read tests from TestProjFile.
2550     (TestProjFile.doTestRead, TestProjFile.testRead): Removed. These
2551     tests are now in the new classes.
2552     (sample_projfile, sample_projfile_data)
2553     (sample_projfile2, sample_projfile_data2): Removed. Not used
2554     anymore.
2555     (TestProjFile.test_read_unreadable_file): No need to reset the
2556     permissions at the end anymore since we use a unique filename
2557    
2558     2003-10-13 Bernhard Herzog <[email protected]>
2559    
2560 bh 1814 * test/test_proj.py: Some more refactoring of the test cases
2561     (ProjFileTest): New base class for the proj file tests.
2562     (TestProjFile): Derive from ProjFileTest
2563     (TestProjFile.test_read_unreadable_file)
2564     (TestProjFile.test_read_empty_file, TestProjFile.doTestRead): Use
2565     the new filename method to get a unique filename
2566     (TestProjFile.doTestWrite, TestProjFile.testWrite): Removed.
2567     (WriteProjFileTests): New class for proj file write tests.
2568     Contains the write test that were in TestProjFile originally.
2569    
2570     2003-10-13 Bernhard Herzog <[email protected]>
2571    
2572 bh 1812 * test/test_proj.py (TestProjFile.testRead)
2573     (TestProjFile.test_read_non_existing_file)
2574     (TestProjFile.test_read_unreadable_file)
2575     (TestProjFile.test_read_empty_file): Split into several methods.
2576    
2577 bh 1805 2003-10-10 Bernhard Herzog <[email protected]>
2578    
2579 bh 1810 * Thuban/UI/sizers.py: New file with custom sizers.
2580    
2581     * Thuban/UI/projdialog.py (ProjFrame.build_dialog): Instantiate
2582     all projection type specific panels and put them into a
2583     NotebookLikeSizer. This way the dialog doesn't change its size
2584     when a different projection is selected
2585     (ProjFrame.__init__): Rename projection_panels
2586     projection_panel_defs and reuse projection_panels for a list of
2587     the instantiated panels.
2588     (ProjFrame._show_proj_panel, ProjFrame.__DoOnProjAvail)
2589     (ProjFrame.__DoOnProjChoice): Changes due to the new handling of
2590     the panels
2591     (UnknownProjPanel._DoLayout): Place the newlines in the message
2592     differently to make the panel narrower.
2593     (TMPanel._DoLayout): Layout the parameters in one column.
2594    
2595     2003-10-10 Bernhard Herzog <[email protected]>
2596    
2597 bh 1807 * Thuban/UI/projdialog.py (ProjFrame.build_dialog): New method
2598     that contains all the setup for the dialog's widgets, layout and
2599     event handling.
2600     (__): Call build_dialog to build the dialog.
2601     (ProjFrame.__set_properties, ProjFrame.__do_layout): Removed.
2602     Their functionality is now in build_dialog
2603     (ProjFrame.__VerifyButtons, ProjFrame.__VerifyButtons)
2604     (ProjFrame.__DoOnProjAvail, ProjFrame.__DoOnProjAvail)
2605     (ProjFrame.__DoOnProjChoice): Small updates due to slightly
2606     different widget names and hierarchy introduced with build_dialog.
2607    
2608     2003-10-10 Bernhard Herzog <[email protected]>
2609    
2610 bh 1805 * README: Fix typo.
2611    
2612 bh 1803 2003-10-09 Bernhard Herzog <[email protected]>
2613    
2614     * Thuban/Model/proj.py (ProjFile.Add): Do not check whether the
2615     projection is already in the list. This is *a lot* faster when
2616     loading files with hundreds of projections since it saves a linear
2617     search. OTOH this will allow adding the same projection to the
2618     user.proj file multiple times in the projection dialog but we'll
2619     deal with that later
2620    
2621 jan 1801 2003-10-09 Jan-Oliver Wagner <[email protected]>
2622    
2623     * devtools: New. Directory for developer tools that are not intended
2624     for the regular user.
2625    
2626     * devtools/create_epsg.py: New. Convert the epsg file of proj into
2627     a python .proj file.
2628    
2629 bh 1799 2003-10-09 Bernhard Herzog <[email protected]>
2630    
2631     * test/test_proj.py
2632     (TestProjection.test_get_parameter_without_equals_sign): New. Test
2633     whether GetParameter handles parameters without "=" sign correctly
2634    
2635     * Thuban/Model/proj.py (Projection.GetParameter): Handle
2636     parameters that do not contain a "=". Update the doc-string
2637    
2638 bh 1794 2003-10-08 Bernhard Herzog <[email protected]>
2639    
2640 bh 1796 * Thuban/UI/projdialog.py (ProjFrame.__set_properties): Remove the
2641     length limit on the projname text control
2642    
2643     2003-10-08 Bernhard Herzog <[email protected]>
2644    
2645 bh 1794 * test/test_proj.py (TestProjection.test_get_projection_units_geo)
2646     (TestProjection.test_get_projection_units_normal): New. Tests for
2647     the Projection.GetProjectedUnits method
2648    
2649 jan 1792 2003-10-08 Jan-Oliver Wagner <[email protected]>
2650    
2651     * Thuban/Model/resource.py (get_user_proj_file): small bug-fix:
2652     Added missing 'val' parameter.
2653    
2654 bh 1788 2003-10-08 Bernhard Herzog <[email protected]>
2655    
2656 bh 1790 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): When the
2657     projection type of the currently selected projection is not known,
2658     i.e. there's no panel for it, use the UnknownProjPanel
2659     (ProjFrame.__DoOnProjChoice, ProjFrame._show_proj_panel): Split
2660     the actual replacing of the proj panel into the new method
2661     _show_proj_panel.
2662     (UnknownProjPanel): Add doc-string.
2663     (UnknownProjPanel._DoLayout): Insert a newline into the text so
2664     that the panel is not so wide.
2665    
2666     2003-10-08 Bernhard Herzog <[email protected]>
2667    
2668 bh 1788 * Thuban/Model/resource.py (read_proj_file): Return the warnings
2669     too. Update the doc-string
2670     (get_proj_files): Removed. It wasn't used anywhere
2671     (get_system_proj_files, get_system_proj_file): Rename to
2672     get_system_proj_file and return the ProjFile object and not a list
2673     of ProjFile objects. Update the callers.
2674     (get_user_proj_files, get_user_proj_file): Rename to
2675     get_user_proj_file return the ProjFile object and not a list of
2676     ProjFile objects. Update the callers.
2677     (ProjFileReader.__init__): New instance variable for the warnings.
2678     Rename the __pf ivar to projfile. Update the methods referring to
2679     __pf
2680     (ProjFileReader.end_projection): Catch any errors raised when
2681     instantiating the projection and record that as an error. The
2682     projection will not be in the final ProjFile object.
2683     (ProjFileReader.GetWarnings): New method to return the warnings.
2684    
2685     * Thuban/UI/projdialog.py (ProjFrame.show_warnings): New method to
2686     show the warnings from the projfile reader
2687     (ProjFrame._OnImport): Deal with any warnings returned by
2688     read_proj_file
2689     (ProjFrame.__FillAvailList): Deal with any warnings returned by
2690     get_system_proj_file or get_user_proj_file.
2691    
2692     * test/test_proj.py (TestProjFile.doTestRead): Check the warnings.
2693     (TestProjFileWithInvalidParameters.file_contents): New test cases
2694     to test whether read_proj_file handles invalid projection
2695     parameters correctly
2696     (TestProjFile.test_get_system_proj_file): New. Simple test for
2697     resource.get_system_proj_file
2698    
2699 bh 1785 2003-10-07 Bernhard Herzog <[email protected]>
2700    
2701     * test/test_derivedshapestore.py
2702     (TestDerivedShapeStoreExceptions.tearDown): Clear the session
2703     properly so that the temporary directories get deleted correctly
2704    
2705 bh 1773 2003-10-06 Bernhard Herzog <[email protected]>
2706    
2707 bh 1783 Handle the title changes in a proper MVC way.
2708    
2709     * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
2710     canvas' TITLE_CHANGED messages
2711     (MainWindow.update_title): New. Update the main window's title
2712     (MainWindow.__SetTitle): Removed. Use update_title instead.
2713     (MainWindow.SetMap): Use update_title instead of __SetTitle
2714     (MainWindow.RenameMap): Do change the window title explicitly
2715     here. That's handled in a proper MVC way now.
2716     (MainWindow.title_changed): New. Subscriber for the TITLE_CHANGED
2717     messages
2718    
2719     * Thuban/Lib/connector.py (Conduit): New class to help classes
2720     that forward messages
2721    
2722     * Thuban/UI/viewport.py: Forward the map's TITLE_CHANGED messages
2723     (ViewPort): Derive from Conduit instead of Publisher
2724     (ViewPort.Subscribe, ViewPort.Unsubscribe): Use the new base class
2725     when calling the inherited versions
2726     (ViewPort._subscribe_map, ViewPort._unsubscribe_map): New helper
2727     methods to subscribe and unsubscribe map messages
2728     (ViewPort.SetMap, ViewPort.Destroy): Use the new helper methods to
2729     handle the map subscriptions
2730     (ViewPort.Map, ViewPort.map_projection_changed)
2731     (ViewPort.layer_projection_changed): Add or update doc-strings
2732    
2733     * test/test_connector.py (TestPublisher.test_issue_simple): Fix
2734     typo
2735     (MyConduit): Helper class for the Conduit test.
2736     (TestConduit): Test cases for Conduit
2737    
2738     * test/test_connector.py: Use support.run_tests as main.
2739    
2740     * test/test_viewport.py (ViewPortTest.setUp): Also subscribe to
2741     the TITLE_CHANGED messages
2742     (ViewPortTest.test_forwarding_title_changed): New test to check
2743     whether the viewport forwards the map's TITLE_CHANGED messages
2744     (TestViewportWithPostGIS.tearDown): Call the map's Destroy method
2745     after the port's because the latter may require a still functional
2746     map.
2747    
2748     2003-10-06 Bernhard Herzog <[email protected]>
2749    
2750 bh 1777 * Thuban/UI/application.py (ThubanApplication.maps_changed): Add
2751     doc-string
2752    
2753     2003-10-06 Bernhard Herzog <[email protected]>
2754    
2755 bh 1775 * test/test_viewport.py (ViewPortTest.setUp)
2756     (SimpleViewPortTest.test_init_with_size): Move the test for the
2757     initial size as a constructor parameter from ViewPortTest.setUp
2758     method to a new separate test in SimpleViewPortTest.
2759    
2760     2003-10-06 Bernhard Herzog <[email protected]>
2761    
2762 bh 1773 * test/test_viewport.py (MockView): New class derived from
2763     ViewPort with a mock implementation of GetTextExtent to be used in
2764     the test cases
2765     (ViewPortTest.setUp): Use MockView instead of ViewPort
2766    
2767     * Thuban/UI/viewport.py (ViewPort.GetTextExtent): Turn this method
2768     into what would be a "pure virtual function" in C++: always raise
2769     NotImplementedError. Mock implementations for test cases don't
2770     belong into the real code
2771    
2772 bh 1770 2003-10-02 Bernhard Herzog <[email protected]>
2773    
2774     * test/test_layer.py (TestLayer.test_empty_layer): Explicitly
2775     close the dbf file we create so that it's contents have been
2776     written properly.
2777    
2778     * libraries/shapelib/shptree.c, libraries/shapelib/shpopen.c,
2779     libraries/shapelib/shapefil.h, libraries/shapelib/dbfopen.c:
2780     Update to shapelib 1.2.10
2781    
2782 jan 1767 2003-10-01 Jan-Oliver Wagner <[email protected]>
2783    
2784     * Thuban/UI/tree.py, Thuban/UI/main.py: Remove the #! line as
2785     it annoys lintian which warns about these files not being
2786     executable. The #! isn't necessary here since if you absolutely
2787     must execute them you can always say "python <filename>".
2788    
2789 bh 1757 2003-09-26 Bernhard Herzog <[email protected]>
2790    
2791 bh 1760 * Thuban/Model/classgen.py (GenQuantiles0): Removed since it's
2792     only used in GREAT-ER but not used in Thuban itself. When GREAT-ER
2793     is ported to a newer the import will fail, so it should be noticed
2794     immediately that this function is gone.
2795     Fixes RT#1919
2796    
2797     2003-09-26 Bernhard Herzog <[email protected]>
2798    
2799 bh 1757 Add a DTD for the projection files and make thuban write valid
2800     projection files
2801    
2802     * Resources/XML/projfile.dtd: New. DTD for thuban's projection
2803     files
2804    
2805     * Thuban/Model/resource.py (ProjFileSaver.write): Use
2806     'projectionlist' as the name in the document type declaration so
2807     that it matches the element type of the root element.
2808    
2809     * test/test_proj.py (sample_projfile, sample_projfile2): Use
2810     'projectionlist' as the name in the document type declaration just
2811     as it is done now in the files thuban would write
2812     (sample_projfile, sample_projfile_data): Fix spelling of
2813     "Mercator"
2814     (TestProjFile.doTestWrite): Validate the written and the expected
2815     XML data
2816     (TestProjFile): Derive from ValidationTest so that we can run xml
2817     validation tests
2818    
2819 bh 1751 2003-09-24 Bernhard Herzog <[email protected]>
2820    
2821     * Thuban/UI/renderer.py (ExportRenderer.render_legend): Do not
2822     modify the list returned by map.Layers() in place since it is the
2823     actual list of layers used by the map.
2824    
2825 jan 1745 2003-09-23 Jan-Oliver Wagner <[email protected]>
2826    
2827     * Doc/manual/thuban-manual.xml: Added subsection to chapter
2828     Extensions to describe the extensions coming with the Thuban
2829     standard package (gns2shp and importAPR).
2830    
2831 bh 1743 2003-09-23 Bernhard Herzog <[email protected]>
2832    
2833     * libraries/thuban/wxproj.cpp (project_point): if there's an
2834     inverse but no forward projection, convert to degrees after
2835     applying the inverse projection. Fixes RT#2096
2836    
2837     * test/test_wxproj.py: New. Test cases for wxproj.so. One test
2838     implicitly tests for the fix to RT#2096
2839    
2840     * test/support.py (FloatComparisonMixin.assertFloatSeqEqual):
2841     Check that the sequences have the same lengths
2842    
2843     * Resources/Projections/defaults.proj (Geographic projection): Use
2844     a much more precise value for the to_meter attribute.
2845    
2846 bh 1737 2003-09-22 Bernhard Herzog <[email protected]>
2847    
2848     * test/support.py (initthuban): Make sure to unset the LANG env.
2849     var. so that tests that compare translated strings work. Solves RT
2850     #2094
2851    
2852 jan 1730 2003-09-22 Jan-Oliver Wagner <[email protected]>
2853    
2854 jan 1735 Small improvement of APR import.
2855    
2856     * Extensions/importAPR/test/test_apr.py (aprTest.test_LClass):
2857     Added tests for text-ranges.
2858    
2859     * Extensions/importAPR/apr.py (APR_LClass.GetThubanRange): Now
2860     returns a string object if the range is based on text.
2861    
2862     * Extensions/importAPR/importAPR.py (import_apr_dialog): Unified
2863     range retrieval.
2864    
2865     2003-09-22 Jan-Oliver Wagner <[email protected]>
2866    
2867 jan 1730 Initial version of the importAPR extension which is in
2868     experimental state.
2869    
2870     * /Extensions/importAPR/, /Extensions/importAPR/samples/,
2871     /Extensions/importAPR/test/: New directories.
2872    
2873     * /Extensions/importAPR/samples/README: New: Howto load the samples.
2874    
2875     * /Extensions/importAPR/samples/iceland.apr: New: A sample APR
2876     file which refers to the Thuban Iceland demo data.
2877    
2878     * /Extensions/importAPR/test/README: New: Howto execute the tests.
2879    
2880     * /Extensions/importAPR/test/test_apr.py: New: Tests for APR classes.
2881    
2882     * /Extensions/importAPR/apr.py: New: Classes for ArcView Objects
2883     as in '.apr'-files.
2884    
2885     * /Extensions/importAPR/odb.py: New: Classes for generic ArcView
2886     ODB Objects as in '.apr', '.avl' and other files.
2887    
2888     * /Extensions/importAPR/__init__.py: New: Init to make this
2889     directory a package.
2890    
2891     * /Extensions/importAPR/importAPR.py: New: Import a ArcView
2892     project file (.apr) and convert it to Thuban.
2893    
2894     2003-09-22 Jan-Oliver Wagner <[email protected]>
2895    
2896     * Extensions/gns2shp.gns2shp.py: The main module of gns2shp.
2897    
2898 jan 1720 2003-09-19 Jan-Oliver Wagner <[email protected]>
2899    
2900     * Doc/manual/thuban-manual.xml: Extended section 'Installation'
2901     with description on RPM installation and RPM binary package
2902     creation.
2903    
2904 bh 1718 2003-09-18 Bernhard Herzog <[email protected]>
2905    
2906     * setup.py (data_files): Only add the mo files if the Locales
2907     directory actually exists, so that setup.py works with a fresh CVS
2908     checkout
2909    
2910 jan 1716 2003-09-12 Jan-Oliver Wagner <[email protected]>
2911    
2912     * Examples/simple_extensions/simple_tool.py: bugfix: Tool is now
2913     in viewport, not anymore in view
2914    
2915 jan 1714 2003-09-04 Jan-Oliver Wagner <[email protected]>
2916    
2917     Introducing first Extension (gns2shp).
2918    
2919     * Extensions, Extensions/gns2shp, Extensions/gns2shp/test: New.
2920    
2921     * Extensions/__init__.py: New. init to make this dir a package.
2922    
2923     * Extensions/gns2shp/__init__.py: New. init to make this dir a package.
2924    
2925     * Extensions/gns2shp/test/README: New. some info on this test directory.
2926    
2927     * Extensions/gns2shp/test/ls.txt: New. test data set (Liechtenstein).
2928    
2929     * Extensions/gns2shp/test/test_gns2shp.py: New. Test for correct creation
2930     of Shapefile from GNS text file format
2931    
2932 jan 1705 2003-09-03 Jan-Oliver Wagner <[email protected]>
2933    
2934 jan 1707 Fix/workaround for bug #2019:
2935     https://intevation.de/rt/webrt?serial_num=2019
2936    
2937     * Thuban/UI/identifyview.py (IdentifyView.ID_STOP): New.
2938     (IdentifyView.__init__): Added another button that allows to
2939     stop the identify mode.
2940     (IdentifyView.OnStop): New. Stops the identify mode.
2941    
2942     2003-09-03 Jan-Oliver Wagner <[email protected]>
2943    
2944 jan 1705 Introducing a new exception dialog that allows to exit the
2945     application immediately.
2946     This fixes bug #2060: https://intevation.de/rt/webrt?serial_num=2060
2947    
2948     * Thuban/UI/exceptiondialog.py: New. A special exception dialog.
2949    
2950     * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
2951     Made strings available to translations. Exchanged the simple
2952     ScrolledMessageDialog by the new ExceptionDialog.
2953    
2954 bh 1694 2003-09-01 Bernhard Herzog <[email protected]>
2955    
2956 bh 1701 * NEWS: New. Summary of changes and release notes.
2957    
2958     * MANIFEST.in: Add NEWS
2959    
2960     2003-09-01 Bernhard Herzog <[email protected]>
2961    
2962 bh 1699 * MANIFEST.in: Correct the include statement for the mo-files and
2963     include the documentation too.
2964    
2965     * setup.py (data_files): Add the .mo files
2966     (setup call): Up to version 0.9.0
2967    
2968     2003-09-01 Bernhard Herzog <[email protected]>
2969    
2970 bh 1696 * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Change the
2971     parameter list to just parent and session
2972     (ChooseDBTableDialog.__set_properties): Removed. Setting the
2973     selection of empty list boxes is not allowed (and produces C++
2974     assertion errors) and the rest of the setup is better done in
2975     __init__ anyway.
2976     (ChooseDBTableDialog.OnCancel, ChooseDBTableDialog.OnOK)
2977     (ChooseDBTableDialog.OnLBDClick, DBDialog.OnOK): Use the Python
2978     builtins True/False for booleans to avoid warnings from wxPython
2979    
2980     * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Adapt to new
2981     ChooseDBTableDialog constructor parameters.
2982    
2983     2003-09-01 Bernhard Herzog <[email protected]>
2984    
2985 bh 1694 * Thuban/Model/postgisdb.py
2986     (PostGISTable): Extend doc-string
2987     (PostGISTable._fetch_table_information): Set the column index
2988     correctly, pretending ignored columns don't exist.
2989    
2990     * test/test_postgis_db.py (TestPostGISIgnoredColumns): New tests
2991     for postgis tables with data types not yet supported by thuban.
2992    
2993 bh 1692 2003-08-29 Bernhard Herzog <[email protected]>
2994    
2995     * HOWTO-Release: Tweak item about running the tests.
2996    
2997 jan 1690 2003-08-29 Jan-Oliver Wagner <[email protected]>
2998    
2999     * /Doc/manual/thuban-manual.xml: updated to version 1.0pre2.
3000    
3001 bh 1688 2003-08-29 Bernhard Herzog <[email protected]>
3002    
3003     Add some missing parameters to projections. Proj complains about
3004     them on windows but for some reason not on Linux.
3005    
3006     * test/test_save.py (SaveSessionTest.testLayerProjection): Add
3007     missing required projection parameters
3008    
3009     * test/test_proj.py (TestProjFile.test): Add missing required
3010     projection parameters
3011    
3012     * test/test_load_0_8.py (TestLayerProjection.file_contents)
3013     (TestLayerProjection.test): Add missing required projection
3014     parameters and tests for them
3015    
3016     * test/test_load.py (TestLayerProjection.file_contents)
3017     (TestLayerProjection.test): Add missing required projection
3018     parameters and tests for them
3019    
3020     * test/test_layer.py (TestLayer.test_base_layer): Add missing
3021     required projection parameters
3022    
3023     2003-08-29 Bernhard Herzog <[email protected]>
3024    
3025     * libraries/pyprojection/Projection.i: Use pj_get_errno_ref to
3026     access the pj_errno because directly accessing pj_errno doesn't
3027     work on windows if the proj library is in a DLL
3028    
3029     * libraries/pyprojection/Projection_wrap.c: Update from Projection.i
3030    
3031 bh 1672 2003-08-28 Bernhard Herzog <[email protected]>
3032    
3033 bh 1685 * test/test_proj.py: Import things from Thuban after calling
3034     initthuban
3035    
3036     * test/test_load.py (LoadSessionTest.filenames): New class
3037     variable with the filename attributes to normalize
3038     (LoadSessionTest.check_format): Pass self.filenames to
3039     sax_eventlist to normalize the filename attributes
3040    
3041     * test/xmlsupport.py: Add cvs keywords
3042     (SaxEventLister.__init__): New parameter filenames which indicates
3043     attributes that contain filenames
3044     (SaxEventLister.startElementNS): Normalize the filename attributes
3045     with os.path.normpath
3046     (sax_eventlist): New parameter filenames to pass through to
3047     SaxEventLister
3048    
3049     * test/test_derivedshapestore.py: Make this file callable as a
3050     program to execute the tests
3051     (TestDerivedShapeStoreExceptions.test_table_with_wrong_size): Bind
3052     the session to self.session so that it gets destroyed properly
3053    
3054     * test/test_layer.py (TestLayer.tearDown): Call the session's
3055     Destroy method
3056    
3057     * test/test_map.py (TestMapBase.tearDown): Destroy self.session
3058     too if it exists
3059     (TestMapAddLayer.test_add_layer): Bind the session to self.session
3060     so that it gets destroyed properly
3061    
3062     * test/postgissupport.py (reason_for_not_running_tests): Add a
3063     test for the existence of popen2.Popen4.
3064    
3065     * test/test_save.py (SaveSessionTest.tearDown): New. Provide a
3066     reliable way to destroy the sessions created in the test cases
3067     (SaveSessionTest.test_dbf_table): Bind the session to self.session
3068     so that it gets destroyed properly
3069     (SaveSessionTest.testLayerProjection): Bind the session to
3070     self.session so that it gets destroyed properly
3071    
3072     * test/test_session.py (UnreferencedTablesTests.tearDown): Make
3073     sure that the session is destroyed properly
3074    
3075     * test/test_shapefilestore.py: Make this callable as a program to
3076     execute the tests
3077    
3078     * test/test_scalebar.py: Remove unnecessary import of _ from
3079     Thuban
3080    
3081     * test/support.py (print_garbage_information): Call initthuban
3082     here because it may be called indirectly from test cases that test
3083     test support modules which do not use anything from thuban itself
3084     (ThubanTestProgram.runTests): Remove unnecessary debug print
3085    
3086     2003-08-28 Bernhard Herzog <[email protected]>
3087    
3088 bh 1672 * Thuban/version.py (longversion): Update to 0.9
3089    
3090     * Thuban/UI/mainwindow.py: Remove some unused imports
3091    
3092     * README: Add section about required additional software. Add date
3093     and revision CVS keywords
3094    
3095     * HOWTO-Release: Add item about the translations. Add date and
3096     revision CVs keywords and change formatting to match README a bit
3097     better
3098    
3099     * po/de.po: Update for 0.9
3100    
3101     * test/README: Tweak the wording a little because many tests are
3102     not really unittest.
3103    
3104 bh 1663 2003-08-27 Bernhard Herzog <[email protected]>
3105    
3106 bh 1665 As preparation for the 0.9 release, switch thuban files to a
3107     non-dev namespace
3108    
3109     * Thuban/Model/save.py (SessionSaver.write_session): Write files
3110     with the http://thuban.intevation.org/dtds/thuban-0.9.dtd
3111     namespace
3112    
3113     * Thuban/Model/load.py (SessionLoader.__init__): Accept the
3114     http://thuban.intevation.org/dtds/thuban-0.9.dtd namespace too
3115    
3116     * test/test_save.py (SaveSessionTest.dtd)
3117     (SaveSessionTest.testEmptySession)
3118     (SaveSessionTest.testSingleLayer)
3119     (SaveSessionTest.testLayerProjection)
3120     (SaveSessionTest.testRasterLayer)
3121     (SaveSessionTest.testClassifiedLayer)
3122     (SaveSessionTest.test_dbf_table)
3123     (SaveSessionTest.test_joined_table)
3124     (SaveSessionTest.test_save_postgis): Update for new namespace
3125    
3126     * test/test_load.py (LoadSessionTest.dtd, TestSingleLayer)
3127     (TestLayerVisibility.file_contents, TestLabels.file_contents)
3128     (TestLayerProjection.file_contents)
3129     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
3130     (TestPostGISLayer.file_contents)
3131     (TestPostGISLayerPassword.file_contents)
3132     (TestLoadError.file_contents, TestLoadError.test): Update for new
3133     namespace
3134    
3135     2003-08-27 Bernhard Herzog <[email protected]>
3136    
3137 bh 1663 Make the table interface distinguish between row ids (an integer
3138     that uniquely identifies a row) and row ordinals (a simple row
3139     count from 0 to NumRows() - 1)
3140    
3141     * Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
3142     (PostGISTable.RowOrdinalToId): New methods to conver between row
3143     ids and row ordinals
3144     (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
3145     parameter row_is_ordinal to indicate whether the row parameter is
3146     the row id or the ordinal
3147    
3148     * Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
3149     (TransientTableBase.RowOrdinalToId)
3150     (AutoTransientTable.RowIdToOrdinal)
3151     (AutoTransientTable.RowOrdinalToId): Same new methods as in
3152     PostGISTable.
3153     (TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
3154     (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
3155     Same new parameter as in PostGISTable.
3156    
3157     * Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
3158     (DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
3159     (MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
3160     (DBFTable.ReadValue, DBFTable.ReadRowAsDict)
3161     (MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
3162     parameter as in PostGISTable.
3163    
3164     * Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
3165     (DataTable.RowOrdinalToId): New methods to convert between row ids
3166     and row ordinals.
3167     (TableGrid.SelectRowById): New method to select a row based on its
3168     ID as opposed to its ordinal
3169     (DataTable.GetValue, TableGrid.OnRangeSelect)
3170     (TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
3171     (QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
3172     (LayerTableFrame.__init__): Convert between row ids and row
3173     ordinals as appropriate
3174    
3175     * test/postgissupport.py (PostGISDatabase.__init__): Add
3176     doc-string.
3177     (PostGISDatabase.initdb): The optional third item in a tuple in
3178     tables is now a (key, value) list with additional arguments to
3179     pass to upload_shapefile
3180     (upload_shapefile): New parameter gid_offset to allow gids that
3181     are not the same as the shapeids in the shapefile
3182     (PostgreSQLServer.get_default_static_data_db): Use the new
3183     gid_offset to make the gids in landmarks 1000 higher than the
3184     shapeids in the shapefile
3185    
3186     * test/test_viewport.py
3187     (TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
3188     new shapeids in the landmarks table
3189    
3190     * test/test_transientdb.py
3191     (TestTransientTable.run_iceland_political_tests)
3192     (TestTransientTable.test_transient_joined_table): Add tests for
3193     the new table methods and new keywords arguments.
3194    
3195     * test/test_postgis_db.py
3196     (TestPostGISTable.test_read_row_as_dict_row_count_mode)
3197     (TestPostGISTable.test_read_value_row_count_mode)
3198     (TestPostGISTable.test_row_id_to_ordinal)
3199     (TestPostGISTable.test_row_oridnal_to_id): New test for the new
3200     table methods and the new arguments
3201     (TestPostGISShapestorePoint.test_shapes_in_region)
3202     (TestPostGISShapestorePoint.test_shape_raw_data)
3203     (TestPostGISShapestorePoint.test_shape_points)
3204     (TestPostGISShapestorePoint.test_shape_shapeid)
3205     (TestPostGISShapestorePoint.test_all_shapes)
3206     (TestPostGISTable.test_simple_query)
3207     (TestPostGISTable.test_simple_query)
3208     (TestPostGISTable.test_simple_query)
3209     (TestPostGISTable.test_read_value)
3210     (TestPostGISTable.test_read_row_as_dict): Adapt to the new
3211     shapeids in the landmarks table
3212    
3213     * test/test_memory_table.py
3214     (TestMemoryTable.test_read_row_as_dict_row_count_mode)
3215     (TestMemoryTable.test_read_value_row_count_mode)
3216     (TestMemoryTable.test_row_id_to_ordinal)
3217     (TestMemoryTable.test_row_oridnal_to_id): New test for the new
3218     table methods and the new arguments
3219    
3220     * test/test_dbf_table.py
3221     (TestDBFTable.test_read_row_as_dict_row_count_mode)
3222     (TestDBFTable.test_read_value_row_count_mode)
3223     (TestDBFTable.test_row_id_to_ordinal)
3224     (TestDBFTable.test_row_oridnal_to_id): New test for the new table
3225     methods and the new arguments
3226    
3227 bh 1659 2003-08-26 Bernhard Herzog <[email protected]>
3228    
3229 bh 1661 * Thuban/Model/postgisdb.py (PostGISShapeStore.BoundingBox): Use a
3230     more postgis specific but much faster method to get the bounding
3231     box
3232    
3233     2003-08-26 Bernhard Herzog <[email protected]>
3234    
3235 bh 1659 * Thuban/Model/postgisdb.py (PostGISTable.Title)
3236     (PostGISShapeStore.AllShapes): Add these missing methods.
3237     (PostGISShapeStore.ShapesInRegion): No need to raise
3238     StopIteration. We can simply return
3239    
3240     * test/test_postgis_db.py (TestPostGISTable.test_title)
3241     (TestPostGISShapestorePoint.test_all_shapes): New tests for the
3242     new methods
3243    
3244 bh 1643 2003-08-25 Bernhard Herzog <[email protected]>
3245    
3246 bh 1657 * Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON.
3247    
3248     * test/test_postgis_db.py (PolygonTests): New class containing
3249     those tests from TestPostGISShapestorePolygon that can also be
3250     used to test MUTLIPOLYGON tables
3251     (TestPostGISShapestorePolygon): Most tests are now in PolygonTests
3252     so derive from that
3253     (TestPostGISShapestoreMultiPolygon): New class with tests for
3254     MUTLIPOLYGON tables
3255    
3256     * test/postgissupport.py (PostGISDatabase.initdb): Allow the
3257     tables argument to have tuples with three items to override the
3258     WKT type used.
3259     (PostgreSQLServer.get_default_static_data_db): Use the above to
3260     create a polygon table with MUTLIPOLYGONs
3261     (point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon)
3262     (arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to
3263     coords_to*
3264     (coords_to_multipolygon): New. Convert to MUTLIPOLYGON
3265     (wkt_converter): New. Map WKT types to converters
3266     (upload_shapefile): New parameter force_wkt_type to use a
3267     different WKT type than the default
3268    
3269     2003-08-25 Bernhard Herzog <[email protected]>
3270    
3271 bh 1655 * Thuban/UI/application.py
3272     (ThubanApplication.run_db_param_dialog): New. Suitable as a
3273     db_connection_callback. Main difference is that the dialog run
3274     from this method doesn't have a parent so it can be used even when
3275     there is no main window
3276     (ThubanApplication.OpenSession): Use self.run_db_param_dialog if
3277     no db_connection_callback was given. This way the dialog pops up
3278     even when the .thuban file was given as a command line parameter.
3279    
3280     2003-08-25 Bernhard Herzog <[email protected]>
3281    
3282 bh 1653 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse
3283     before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs
3284     which leads to an effectively frozen X session because the user
3285     can only interact with the dialog but the mouse is still grabbed
3286     by the canvas.
3287     Also, call the tool's Hide method before MouseLeftUp because
3288     MouseLeftUp may change the tool's coordinates.
3289    
3290     2003-08-25 Bernhard Herzog <[email protected]>
3291    
3292 bh 1651 * Thuban/UI/application.py (ThubanApplication.OpenSession): Catch
3293     LoadCancelled exceptions and handle them by returning immediately.
3294    
3295     2003-08-25 Bernhard Herzog <[email protected]>
3296    
3297 bh 1649 GUI part of loading sessions with postgis connections which may
3298     require user interaction to get passwords or updated parameters
3299    
3300     * Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a
3301     bit nucer and be more generic.
3302     (DBFrame.OnAdd): Adapt to new DBDialog interface
3303    
3304     * Thuban/UI/application.py (ThubanApplication.OpenSession): New
3305     optional parameter db_connection_callback which is passed to
3306     load_session.
3307    
3308     * Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New.
3309     Suitable as a db_connection_callback
3310     (MainWindow.OpenSession): Use self.run_db_param_dialog as the
3311     db_connection_callback of the application's OpenSession method
3312    
3313    
3314     2003-08-25 Bernhard Herzog <[email protected]>
3315    
3316 bh 1647 Basic loading of sessions containing postgis connections:
3317    
3318     * Thuban/Model/load.py (LoadError): Add doc-string
3319     (LoadCancelled): New exception class to indicate a cancelled load
3320     (SessionLoader.__init__): Add the db_connection_callback parameter
3321     which will be used by the loader to get updated parameters and a
3322     password for a database connection
3323     (SessionLoader.__init__): Add the new XML elements to the
3324     dispatchers dictionary
3325     (SessionLoader.check_attrs): Two new conversions, ascii to convert
3326     to a byte-string object and idref as a generic id reference
3327     (SessionLoader.start_dbconnection)
3328     (SessionLoader.start_dbshapesource): New. Handlers for the new XML
3329     elements
3330     (load_session): Add the db_connection_callback to pass through the
3331     SessionLoader
3332    
3333     * test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword):
3334     New classes to test loading of sessions with postgis database
3335     connections.
3336    
3337     2003-08-25 Bernhard Herzog <[email protected]>
3338    
3339 bh 1645 * Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and
3340     replace it and the comment with __BuildDate__ by the Source: and
3341     Id: cvs keywords as used in the other files.
3342    
3343     2003-08-25 Bernhard Herzog <[email protected]>
3344    
3345 bh 1643 * Thuban/Model/load.py (SessionLoader.check_attrs): Raise a
3346     LoadError when a required attribute is missing. The code used to
3347     be commented out for some reason, but probably should have been
3348     active.
3349    
3350     * test/test_load.py (TestLoadError.test): Test the message in the
3351     LoadError too to make sure it really is about the missing
3352     attribute
3353    
3354 bh 1632 2003-08-22 Bernhard Herzog <[email protected]>
3355 bh 1641
3356     * test/test_save.py (SaveSessionTest.test_dbf_table)
3357     (SaveSessionTest.test_joined_table): Add XML validation tests.
3358    
3359     2003-08-22 Bernhard Herzog <[email protected]>
3360    
3361 bh 1639 Implement saving a session with a postgis connection
3362 bh 1632
3363 bh 1639 * Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New
3364     elements for database connections and shapestores using db
3365     connections
3366     (session): Add the dbconnections to the content model
3367    
3368     * Thuban/Model/save.py (SessionSaver.write_db_connections): New.
3369     Write the db connections
3370     (SessionSaver.write_session): Call write_db_connections to write
3371     the connection before the data sources
3372     (SessionSaver.write_data_containers): Handle postgis shapestores
3373    
3374     * test/test_save.py (SaveSessionTest.thubanids)
3375     (SaveSessionTest.thubanidrefs): Update for new DTD
3376     (SaveSessionTest.test_save_postgis): New. Test saving a session
3377     with postgis connections
3378    
3379     * Thuban/Model/postgisdb.py (PostGISTable.DBConnection)
3380     (PostGISTable.TableName): New accessor methods for the connection
3381     and table name
3382    
3383     * test/test_postgis_db.py (TestPostGISTable.test_dbconn)
3384     (TestPostGISTable.test_dbname): New methods to test the new
3385     PostGISConnection methods
3386    
3387     2003-08-22 Bernhard Herzog <[email protected]>
3388    
3389 bh 1637 * Thuban/Model/postgisdb.py (ConnectionError): New exception class
3390     for exceptions occurring when establishing a Database connection
3391     (PostGISConnection.connect): Catch psycopg.OperationalError during
3392     connects and raise ConnectionError.
3393    
3394     * test/test_postgis_db.py (TestPostgisDBExceptions): New class for
3395     tests for database exceptions
3396    
3397     2003-08-22 Bernhard Herzog <[email protected]>
3398    
3399 bh 1635 Prepare the test suite for tests with required authentication
3400    
3401     * test/postgissupport.py (PostgreSQLServer.__init__): Add instance
3402     variables with two predefined users/passwords, one for the admin
3403     and one for a non-privileged user.
3404     (PostgreSQLServer.createdb): Pass the admin name to initdb and add
3405     the non-privileged user to the database and set the admin password
3406     (PostgreSQLServer.wait_for_postmaster): Use the admin user name.
3407     Better error reporting
3408     (PostgreSQLServer.connection_params)
3409     (PostgreSQLServer.connection_string): New methods to return
3410     information about how to connect to the server
3411     (PostgreSQLServer.execute_sql): New. Convenience method to execute
3412     SQL statements
3413     (PostgreSQLServer.require_authentication): Toggle whether the
3414     server requires authentication
3415     (PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New.
3416     Add or alter users
3417     (PostGISDatabase.initdb): Pass the admin name one the
3418     subprocesses' command lines. Grant select rights on
3419     geometry_columns to everybody.
3420     (upload_shapefile): Use the admin name and password when
3421     connecting. Grant select rights on the new table to everybody.
3422    
3423     * test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the
3424     server's new methods to get the connection parameters.
3425    
3426     * test/test_postgis_session.py (TestSessionWithPostGIS.setUp)
3427     (TestSessionWithPostGIS.test_remove_dbconn_exception): Use the
3428     server's new methods to get the connection parameters.
3429    
3430     * test/test_postgis_db.py
3431     (TestPostGISConnection.test_gis_tables_empty)
3432     (TestPostGISConnection.test_gis_tables_non_empty)
3433     (PostGISStaticTests.setUp): Use the server's new methods to get
3434     the connection parameters.
3435    
3436     2003-08-22 Bernhard Herzog <[email protected]>
3437    
3438 bh 1632 * Thuban/UI/about.py (About.__init__): Add the psycopg version.
3439    
3440     * Thuban/version.py: Add psycopg version
3441    
3442     * Thuban/Model/postgisdb.py (psycopg_version): New. Return the
3443     version of the psycopg module
3444    
3445     2003-08-22 Bernhard Herzog <[email protected]>
3446    
3447     * Thuban/UI/dbdialog.py (DBPwdDlg): Removed because it's not used.
3448     (DBFrame.OnEdit): Removed because it's not used and wouldn't work
3449     at the moment. The functionality should probably be implemented
3450     some time, though.
3451 bh 1633 (DBFrame.OnRemove): Display a message if the connection can't be
3452     removed because it's still in use.
3453 bh 1632
3454 jan 1629 2003-08-22 Jan-Oliver Wagner <[email protected]>
3455    
3456     * Thuban/UI/about.py (About.__init__): split up the huge about
3457     text into elements/lists for easier translation. This fixes bug
3458     https://intevation.de/rt/webrt?serial_num=2058
3459     Also, made some forgotten string available for the i18n.
3460    
3461 bh 1627 2003-08-21 Bernhard Herzog <[email protected]>
3462    
3463     Make postgis support really optional including insensitive menu
3464     items.
3465    
3466     * Thuban/Model/postgisdb.py (has_postgis_support): New. Return
3467     whether the postgis is supported.
3468    
3469     * Thuban/UI/dbdialog.py: Put the psycopg import into try..except
3470     to make postgis support optional
3471    
3472     * Thuban/UI/mainwindow.py (_has_postgis_support): New. Context
3473     version of Thuban.Model.postgisdb.has_postgis_support
3474     (database_management command): Make it only sensitive if postgis
3475     is supported.
3476    
3477 jan 1623 2003-08-21 Jan-Oliver Wagner <[email protected]>
3478    
3479 jan 1626 * Doc/manual/thuban-manual.xml: Added CVS revision for rev-history.
3480     (section Adding and Removing Layers): Added text and described
3481     multi-selection.
3482     (chapter Extensions): New.
3483    
3484     2003-08-21 Jan-Oliver Wagner <[email protected]>
3485    
3486 jan 1623 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Changed dialog
3487     settings to allow multiple files to load into the map.
3488     Also reduced selection to *.shp as a default.
3489    
3490 bh 1621 2003-08-20 Bernhard Herzog <[email protected]>
3491    
3492     Add dialogs and commands to open database connections and add
3493     database layers.
3494    
3495     * Thuban/UI/mainwindow.py (MainWindow.DatabaseManagement): New
3496     method to open the database connection management dialog
3497     (MainWindow.AddDBLayer): New method to add a layer from a database
3498     (_has_dbconnections): New helper function to use for sensitivity
3499     (database_management command, layer_add_db command): New commands
3500     that call the above new methods.
3501     (main_menu): Add the new commands to the menu.
3502    
3503     * Thuban/Model/postgisdb.py (PostGISConnection.__init__)
3504     (PostGISConnection.connect): Establish the actual connection in a
3505     separate method and call it in __init__. This makes it easier to
3506     override the behavior in test cases
3507     (PostGISConnection.BriefDescription): New method to return a brief
3508     description for use in dialogs.
3509    
3510     * test/test_postgis_db.py (NonConnection): DB connection that
3511     doesn't actually connect
3512     (TestBriefDescription): New class with tests for the new
3513     BriefDescription method
3514    
3515 jan 1619 2003-08-19 Jan-Oliver Wagner <[email protected]>
3516    
3517     Moved anything from extensions to libraries.
3518    
3519     * libraries: New.
3520    
3521     * libraries/ pyprojection, pyshapelib, shapelib, thuban: New.
3522    
3523     * libraries/pyprojection/ LICENSE, MANIFEST.in, Projection.i,
3524     Projection.py, Projection_wrap.c, setup.py, swighelp.txt: These files have
3525     been moved here from thuban/extensions/pyprojection/
3526     See there in the Attic for the older history.
3527    
3528     * libraries/pyshapelib/ COPYING, ChangeLog, NEWS, README, dbflib.i,
3529     dbflib.py, dbflib_wrap.c, pyshapelib_api.h, pytest.py, setup.py,
3530     shapelib.i, shapelib.py, shapelib_wrap.c, shptreemodule.c: These files
3531     have been moved here from thuban/extensions/pyshapelib/
3532     See there in the Attic for the older history.
3533    
3534     * libraries/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: These
3535     files have been moved here from thuban/extensions/shapelib/
3536     See there in the Attic for the older history.
3537    
3538     * libraries/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
3539     gdalwarp.cpp, wxproj.cpp: These files have been moved here from
3540     thuban/extensions/thuban/
3541     See there in the Attic for the older history.
3542    
3543     * MANIFEST.in, setup.cfg, setup.py: renamed extensions to libraries.
3544    
3545     * extensions/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
3546     gdalwarp.cpp, wxproj.cpp: Moved to libraries/thuban.
3547    
3548     * extensions/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c:
3549     Moved to libraries/shapelib.
3550    
3551     * extensions/pyshapelib/ COPYING, NEWS, dbflib.py, pytest.py,
3552     shapelib.py, README, dbflib_wrap.c, setup.py, shapelib_wrap.c,
3553     ChangeLog, dbflib.i, pyshapelib_api.h, shapelib.i, shptreemodule.c:
3554     Moved to libraries/pyshapelib.
3555    
3556     * extensions/pyprojection/ MANIFEST.in, Projection.py, setup.py,
3557     LICENSE, Projection.i, Projection_wrap.c, swighelp.txt:
3558     Moved to libraries/pyprojection.
3559    
3560     * extensions/ pyprojection, pyshapelib, shapelib, thuban: Removed.
3561    
3562     * extensions: Removed.
3563    
3564 bh 1606 2003-08-19 Bernhard Herzog <[email protected]>
3565    
3566 bh 1609 * test/test_viewport.py (ViewPortTest): We don't use the
3567     facilities of FileTestMixin so don't derive from it.
3568     (TestViewportWithPostGIS): New class with tests for using a
3569     viewport on a map with postgis layers.
3570    
3571     2003-08-19 Bernhard Herzog <[email protected]>
3572    
3573     Add the db connection management to the session.
3574    
3575     * Thuban/Model/session.py (Session.__init__): New instance
3576     variable db_connections
3577     (Session.AddDBConnection, Session.DBConnections)
3578     (Session.HasDBConnections, Session.CanRemoveDBConnection)
3579     (Session.RemoveDBConnection): New methods to manage and query the
3580     db connections managed by the session
3581     (Session.OpenDBShapeStore): New method to open a shapestore from a
3582     db connection
3583    
3584     * Thuban/Model/messages.py (DBCONN_REMOVED, DBCONN_ADDED): New
3585     messages for the db connection handling in the session
3586    
3587     * test/test_postgis_session.py: New. test cases for the session's
3588     db connection handling with postgis connections
3589    
3590     2003-08-19 Bernhard Herzog <[email protected]>
3591    
3592 bh 1606 Add very basic postgis database support and the corresponding test
3593     cases. The test cases require a PostgreSQL + postgis installation
3594     but no existing database. The database will be created
3595     automatically by the test cases
3596    
3597     * test/README: Add note about skipped tests and the requirements
3598     of the postgis tests.
3599    
3600     * Thuban/Model/postgisdb.py: New. Basic postgis database support.
3601    
3602     * test/test_postgis_db.py: New. Test cases for the postgis
3603     support.
3604    
3605     * Thuban/Model/wellknowntext.py: New. Parser for well-known-text
3606     format
3607    
3608     * test/test_wellknowntext.py: New. Test cases for the
3609     wellknowntext parser
3610    
3611     * test/postgissupport.py: New. Support module for tests involving
3612     a postgis database.
3613    
3614     * test/support.py (execute_as_testsuite): Shut down the postmaster
3615     if it's still running after the tests
3616    
3617     * Thuban/Model/data.py (RAW_WKT): New constant for raw data in
3618     well known text format
3619    
3620 jan 1604 2003-08-19 Jan-Oliver Wagner <[email protected]>
3621    
3622     * Examples/simple_extensions/hello_world.py: New. Raises a Hello World
3623     message dialog.
3624    
3625 bh 1600 2003-08-18 Bernhard Herzog <[email protected]>
3626    
3627 bh 1602 * test/support.py (ThubanTestResult.printErrors): Indent the
3628     reason for the skips in the output to make it a bit more readable.
3629     (execute_as_testsuite): New helper function to run a test suite
3630     and print some more information.
3631     (run_tests): Use execute_as_testsuite to run the tests
3632    
3633     * test/runtests.py (main): Use execute_as_testsuite to run the
3634     tests
3635    
3636     2003-08-18 Bernhard Herzog <[email protected]>
3637    
3638 bh 1600 Fix some bugs in Thuban and the test suite that were uncovered by
3639     changes introduced in Python 2.3:
3640    
3641     * Thuban/Model/table.py (DBFTable.__init__): Make sure the
3642     filename is an absolute name
3643    
3644     * Thuban/Model/layer.py (RasterLayer.__init__): Make sure the
3645     filename is an absolute name
3646    
3647     * test/test_save.py (SaveSessionTest.testRasterLayer): Use a
3648     unique filename to save to and use the correct relative filename
3649     in the expected output.
3650     (SaveSessionTest.test_dbf_table): Use the correct relative
3651     filename in the expected output.
3652    
3653     * test/test_layer.py (TestLayer.test_raster_layer): Update the
3654     test to check whether the filename is absolute.
3655    
3656 jan 1596 2003-08-18 Jan-Oliver Wagner <[email protected]>
3657    
3658     * Thuban/UI/about.py (About.__init__): Added Silke Reimer.
3659    
3660 bh 1586 2003-08-15 Bernhard Herzog <[email protected]>
3661    
3662 bh 1594 Change the way shapes are returned by a shape store. The
3663     ShapesInRegion method returns an iterator over actual shape
3664     objects instead of a list of shape ids.
3665    
3666     * Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
3667     id.
3668     (ShapefileStore.ShapesInRegion): Return an iterator over the
3669     shapes which yields shape objects instead of returning a list of
3670     shape ids
3671     (ShapefileStore.AllShapes): New. Return an iterator over all
3672     shapes in the shape store
3673     (DerivedShapeStore.AllShapes): New. Like in ShapefileStore
3674    
3675     * Thuban/Model/layer.py (Layer.ShapesInRegion): Update
3676     doc-string.
3677    
3678     * Thuban/UI/baserenderer.py
3679     (BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
3680     layer_shapes and make it return an iterator containg shapes
3681     instead of a list of ids.
3682     (BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
3683     layer_shapes() change
3684    
3685     * Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
3686     (ScreenRenderer.layer_shapes): Rename as in BaseRenderer
3687    
3688     * Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
3689     changes in the ShapesInRegion return value.
3690     (ViewPort._get_hit_tester): Remove commented out code
3691    
3692     * test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
3693     new return value.
3694     (SimpleShapeStore.AllShapes): New. Implement this method too.
3695    
3696     * test/test_layer.py (TestLayer.test_arc_layer)
3697     (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
3698     (TestLayer.test_point_layer_with_projection)
3699     (TestLayer.test_derived_store): Adapt to changes in the
3700     ShapesInRegion return value.
3701    
3702     * test/test_shapefilestore.py
3703     (TestShapefileStoreArc.test_shapes_in_region)
3704     (TestShapefileStorePolygon.test_shapes_in_region)
3705     (TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
3706     in the ShapesInRegion return value.
3707     (TestShapefileStorePoint.test_all_shapes)
3708     (TestShapefileStoreArc.test_shape_shapeid): New tests for the new
3709     methods
3710    
3711     * test/test_derivedshapestore.py
3712     (TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
3713     the ShapesInRegion return value.
3714     (TestDerivedShapeStore.test_all_shapes)
3715     (TestDerivedShapeStore.test_shape_shapeid): New tests for the new
3716     methods
3717    
3718     2003-08-15 Bernhard Herzog <[email protected]>
3719    
3720 bh 1592 Make the renderers deal correctly with raw vs. python level
3721     representation of shape geometries
3722    
3723     * Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer):
3724     Return a flag useraw in addition to the callable and the parameter
3725     to indicate whether the callable can deal with the raw shape data
3726     or uses the higher level python lists of coordinates. The callable
3727     now should accept either the raw data or the return value of the
3728     shape's Points() method.
3729     (BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer
3730     change
3731     (BaseRenderer.projected_points): Instead of the shape id use the
3732     points list as parameter.
3733     (BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape)
3734     (BaseRenderer.draw_point_shape): Adapt to projected_points()
3735     change and accept the points list as parameter instead of the
3736     shape id.
3737    
3738     * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return
3739     the useraw flag as required by the BaseRenderer
3740     (ScreenRenderer.draw_shape_layer): Adapt to low-level renderer
3741     changes.
3742    
3743     * test/test_baserenderer.py
3744     (TestBaseRenderer.test_point_with_classification): New test for
3745     rendering a map with classifications.
3746    
3747     2003-08-15 Bernhard Herzog <[email protected]>
3748    
3749 bh 1590 * Thuban/UI/viewport.py (ViewPort.find_shape_at)
3750     (ViewPort._find_shape_in_layer, ViewPort._find_shape_in_layer)
3751     (ViewPort._get_hit_tester, ViewPort.projected_points)
3752     (ViewPort._hit_point, ViewPort._hit_arc, ViewPort._hit_polygon)
3753     (ViewPort._find_label_at): Split the find_shape_at method into
3754     several new methods and use the functions in the hit-test module.
3755    
3756     * Thuban/UI/hittest.py: New module with Python-level hit-testing
3757     functions
3758    
3759     * test/test_hittest.py: New. Test for the new hittest module
3760    
3761     2003-08-15 Bernhard Herzog <[email protected]>
3762    
3763 bh 1588 * Thuban/Model/layer.py (Layer.ShapesInRegion): Apply the layer
3764     projection to all corners of the bounding box to get a better
3765     approximation of the projected bounding box
3766    
3767     * test/test_layer.py (TestLayer.test_point_layer_with_projection):
3768     New. Test coordinate handling of a layer with a projection.
3769     Catches the bug fixed in Layer.ShapesInRegion
3770    
3771     2003-08-15 Bernhard Herzog <[email protected]>
3772    
3773 bh 1586 Move some of the mock objects in test_baserenderer into their own
3774     module so they can easily be used from other tests
3775    
3776     * test/mockgeo.py: New test helper module with some mock objects
3777     for geometry related things like shapes, shapestores and
3778     projections.
3779    
3780     * test/test_mockgeo.py: New. Tests for the new helper module
3781    
3782     * test/test_baserenderer.py: Some of the mock-objects are in
3783     mockgeo now.
3784    
3785 jan 1584 2003-08-12 Jan-Oliver Wagner <[email protected]>
3786    
3787     * Thuban/UI/about.py (About.__init__): Added Björn Broscheit.
3788    
3789 bh 1580 2003-08-12 Bernhard Herzog <[email protected]>
3790    
3791 bh 1582 * po/de.po: New. German translations by Bjoern Broscheit
3792    
3793     2003-08-12 Bernhard Herzog <[email protected]>
3794    
3795 bh 1580 * Thuban/UI/projdialog.py (UnknownProjPanel._DoLayout): Translated
3796     strings have to be one string literal.
3797    
3798 bh 1573 2003-08-11 Bernhard Herzog <[email protected]>
3799    
3800 bh 1578 * test/support.py (FloatComparisonMixin.assertPointListEquals):
3801     New. This method was used in various derived classes, but it's
3802     better to have it here.
3803    
3804     * test/test_shapefilestore.py
3805     (ShapefileStoreTests.assertPointListEquals): Removed. It's now in
3806     FloatComparisonMixin
3807    
3808     * test/test_layer.py (TestLayer.assertPointListEquals): Removed.
3809     It's now in FloatComparisonMixin
3810    
3811     * test/test_derivedshapestore.py
3812     (TestDerivedShapeStore.assertPointListEquals): Removed. It's now
3813     in FloatComparisonMixin
3814    
3815     2003-08-11 Bernhard Herzog <[email protected]>
3816    
3817 bh 1573 * Thuban/UI/join.py (JoinDialog.OnJoin): Add missing space to
3818     error message
3819    
3820 jan 1569 2003-08-08 Jan-Oliver Wagner <[email protected]>
3821    
3822 jan 1571 * Doc/manual/thuban-manual.xml: Now use authorgroup. Added revhistory
3823     with version number.
3824     Changed title to reflect version number of Thuban.
3825    
3826     2003-08-08 Jan-Oliver Wagner <[email protected]>
3827    
3828 jan 1569 * Thuban/UI/about.py (About.__init__): Reworked the hall of fame. Now
3829     the list corresponds to the "About" web page.
3830    
3831 bh 1567 2003-08-08 Bernhard Herzog <[email protected]>
3832    
3833     * Thuban/UI/projdialog.py (UTMProposeZoneDialog.dialogLayout):
3834     Make sure translated strings are recognized as one string literal.
3835    
3836     * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog.dialogLayout):
3837     Make sure translated strings are recognized as one string literal.
3838    
3839     * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Make sure
3840     translated strings are recognized as one string literal.
3841    
3842     * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
3843     sure translated strings are recognized as one string literal.
3844    
3845 bh 1556 2003-08-07 Bernhard Herzog <[email protected]>
3846    
3847 bh 1565 * Thuban/Model/data.py (DerivedShapeStore.RawShapeFormat): New.
3848     Simply delegates to the original shapestore.
3849    
3850     * test/test_derivedshapestore.py
3851     (TestDerivedShapeStore.test_raw_format): New. Test case for
3852     DerivedShapeStore.RawShapeFormat
3853    
3854     2003-08-07 Bernhard Herzog <[email protected]>
3855    
3856 bh 1561 Add raw data interface to shape objects.
3857    
3858     * Thuban/Model/data.py (ShapefileShape, Shape): Rname the shape
3859     class to ShapefileShape which now holds shapefile specific
3860     information.
3861     (ShapefileShape.compute_bbox): Simplified to not cache any
3862     information. The way this method is used that shouldn't matter
3863     performance wise.
3864     (ShapefileShape.RawData): New. Return the shapeid which is the raw
3865     data format for shapes from shapefiles.
3866     (ShapefileStore.RawShapeFormat): New. Return the raw datatype used
3867     in the shape objects returned by a shapestore. For a
3868     ShapefileStore this is always RAW_SHAPEFILE.
3869     (RAW_PYTHON, RAW_SHAPEFILE): Constants for the RawShapeFormat
3870     method.
3871    
3872     * test/test_shapefilestore.py
3873     (TestShapefileStore.test_raw_format): New test to test the raw
3874     format feature of shapes.
3875    
3876 bh 1560 * Thuban/Model/layer.py: Remove the unused import of Shape from
3877     data. It was only there for interface compatibility but it's not
3878 bh 1561 used inside of Thuban and the generic Shape class has gone away.
3879 bh 1560
3880 bh 1563 * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Check
3881     the raw data format and only use an optimized version of its a
3882     shapefile.
3883    
3884 bh 1561 2003-08-07 Bernhard Herzog <[email protected]>
3885    
3886 bh 1559 * test/test_baserenderer.py (SimpleShape): Shape class for the
3887     tests.
3888     (SimpleShapeStore.Shape): Use SimpleShape instead of
3889     Thuban.Model.data.Shape to make the tests independed of the coming
3890     changes.
3891    
3892     2003-08-07 Bernhard Herzog <[email protected]>
3893    
3894 bh 1556 * test/support.py (SkipTest, ThubanTestResult, ThubanTestRunner)
3895     (ThubanTestProgram): New classes that extend the respective
3896     classes from unittest. These new version support skipping tests
3897     under certain expected conditions. In the Thuban test suite we
3898     uses this for tests that require the optional gdal support.
3899     (run_tests): Use ThubanTestProgram instead of the unittest.main()
3900    
3901     * test/runtests.py (main): Use the new ThubanTestRunner instead of
3902     the normal one from unittest
3903    
3904     * test/test_layer.py (TestLayer.test_raster_layer): If this test
3905     is not run because gdal support isn't available report this to the
3906     runner.
3907    
3908     * test/test_baserenderer.py
3909     (TestBaseRenderer.test_raster_no_projection): Do not run this test
3910     if gdal support isn't available and report this to the runner.
3911    
3912 bh 1553 2003-08-06 Bernhard Herzog <[email protected]>
3913    
3914     Rearrange the renderers a bit, partly in preparation for changes
3915     required for the postgis merge, partly to make it more testable.
3916     Also make the representation of coordinates in Shapes more
3917     consistent.
3918    
3919     * Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
3920     this class is now in BaseRenderer. This class is now practically
3921     only a specialization of BaseRenderer for rendering to an actual
3922     wx DC.
3923     (ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
3924     to get the shapetype specific rendering functions.
3925    
3926     * Thuban/UI/baserenderer.py: New file with the basic rendering
3927     logic. The code in this file is completely independend of wx.
3928     (BaseRenderer): Class with the basic rendering logic
3929    
3930     * test/test_baserenderer.py: New. Test cases for BaseRenderer
3931    
3932     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
3933     error_on_redraw to guard agains endless loops and stack overflows
3934     when there's a bug in the rendering code that raises exceptions.
3935     (MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
3936     rendering into a separate method _do_redraw so that error handling
3937     is a bit easier. When an exception occurs, set error_on_redraw to
3938     true. When it's true on entry to OnIdle do nothing and return
3939     immediately.
3940    
3941     * Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a
3942     Shape object will always have the coordinates as a list of list of
3943     coordinate pairs (tuples).
3944     (Shape.compute_bbox): Adapt to new representation.
3945    
3946     * Thuban/UI/viewport.py (ViewPort.find_shape_at)
3947     (ViewPort.LabelShapeAt): Adapt to new coordinate representation in
3948     Shape objects.
3949    
3950     * test/test_shapefilestore.py
3951     (ShapefileStoreTests.assertFloatTuplesEqual)
3952     (ShapefileStoreTests.assertPointListEquals): Rename to
3953     assertPointListEquals and change purpose to checking equality of
3954     the lists returned by Shape.Points().
3955     (TestShapefileStoreArc.test_shape)
3956     (TestShapefileStorePolygon.test_shape)
3957     (TestShapefileStorePoint.test_shape): Use the new
3958     assertPointListEquals instead of assertFloatTuplesEqual
3959    
3960     * test/test_layer.py (TestLayer.assertFloatTuplesEqual)
3961     (TestLayer.assertPointListEquals): Rename to assertPointListEquals
3962     and change purpose to checking equality of the lists returned by
3963     Shape.Points().
3964     (TestLayer.test_arc_layer, TestLayer.test_arc_layer)
3965     (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
3966     (TestLayer.test_derived_store): Use the new assertPointListEquals
3967     instead of assertFloatTuplesEqual
3968    
3969     * test/test_derivedshapestore.py
3970     (TestDerivedShapeStore.assertFloatTuplesEqual)
3971     (TestDerivedShapeStore.assertPointListEquals): Rename to
3972     assertPointListEquals and change purpose to checking equality of
3973     the lists returned by Shape.Points().
3974     (TestDerivedShapeStore.test_shape): Use the new
3975     assertPointListEquals instead of assertFloatTuplesEqual
3976    
3977 jan 1550 2003-08-06 Jan-Oliver Wagner <[email protected]>
3978    
3979     * Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for
3980     a bounding box. A dialog is raised in case, no bounding box
3981     is found. This fixes bug #2043:
3982     https://intevation.de/rt/webrt?serial_num=2043
3983    
3984 bh 1548 2003-08-05 Bernhard Herzog <[email protected]>
3985    
3986     * Thuban/Model/color.py (Color.__repr__): Make the repr of a color
3987     object look like a Color instantiation. Formerly it looked like a
3988     tuple.
3989    
3990     * test/test_color.py (TestColor.test_repr)
3991     (TestColor.test_equality, TestColor.test_inequality): New. test
3992     some more apects of the Color class
3993     (TestTransparent.test_repr, TestTransparent.test_hex)
3994     (TestTransparent.test_equality): New. Test cases for the
3995     Transparent object.
3996    
3997 jan 1545 2003-08-04 Jan-Oliver Wagner <[email protected]>
3998    
3999     * Doc/manual/thuban-manual.xml: a number of small improvements.
4000     The resulting file is the version submitted for GREAT-ER II.
4001    
4002 bh 1540 2003-08-01 Bernhard Herzog <[email protected]>
4003    
4004 bh 1543 * Thuban/UI/resource.py, Thuban/UI/projdialog.py,
4005     Thuban/UI/join.py, Thuban/UI/classgen.py, Thuban/UI/about.py,
4006     Thuban/Model/resource.py: Insert cvs keywords and doc-strings.
4007    
4008     * Thuban/UI/common.py: Insert cvs keywords and doc-strings.
4009     (Color2wxColour, wxColour2Color, ThubanBeginBusyCursor)
4010     (ThubanEndBusyCursor): Add doc-strings
4011    
4012     2003-08-01 Bernhard Herzog <[email protected]>
4013    
4014 bh 1540 First step towards PostGIS integration. More abstraction by movin
4015     more code from the layer to the shapestore. More methods of the
4016     layer are now simply delegated to the equivalent method of the
4017     shapestore. The SHAPETYPE_* constants are now in data not in
4018     layer.
4019    
4020     * Thuban/Model/data.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
4021     (SHAPETYPE_POINT, Shape): Move these constants and classes from
4022     layer.py to data.py
4023     (ShapefileStore.__init__): More Initialization for the new methods
4024     and functionality.
4025     (ShapefileStore.ShapeType, ShapefileStore.NumShapes)
4026     (ShapefileStore.BoundingBox, ShapefileStore.ShapesInRegion)
4027     (ShapefileStore.Shape): New methods that were formerly implemented
4028     in the layer.
4029     (DerivedShapeStore.Shape, DerivedShapeStore.ShapesInRegion)
4030     (DerivedShapeStore.ShapeType, DerivedShapeStore.NumShapes)
4031     (DerivedShapeStore.BoundingBox): New. DerivedShapeStore
4032     equivalents of the new shape methods. These versions are simply
4033     delegated to the original shapstore.
4034    
4035     * Thuban/Model/layer.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
4036     (SHAPETYPE_POINT, Shape): Removed. They're now in data.py
4037     (Layer.SetShapeStore): Removed the initializatin of instance
4038     variables that were needed for the stuff that's now in
4039     ShapefileStore
4040     (Layer.BoundingBox, Layer.NumShapes, Layer.ShapeType)
4041     (Layer.Shape, Layer.ShapesInRegion): Simply delegate to the
4042     shapestore.
4043    
4044     * Thuban/UI/classifier.py, Thuban/UI/renderer.py,
4045     Thuban/UI/viewport.py: Import the SHAPETYPE_* constants from data
4046     instead of layer.
4047    
4048     * test/test_shapefilestore.py: New. Tests for ShapefileStore.
4049    
4050     * test/test_derivedshapestore.py: New. Tests for DerivedShapeStore.
4051    
4052     * test/test_layer.py: Import the SHAPETYPE_* constants from data
4053     instead of layer.
4054     (TestLayer.test_derived_store): Remove the test for the exception
4055     when instantiating the DerivedShapeStore with an incompatible
4056     table which is now in test_derivedshapestore.py. Add some more
4057     tests of the layer methods to determine whether they work for a
4058     DerivedShapeStore as well.
4059    
4060 jonathan 1534 2003-07-31 Jonathan Coles <[email protected]>
4061    
4062     * Doc/manual/thuban-manual.xml: Fix the list of required packages
4063     by just listing the name and where they can be found.
4064    
4065 frank 1532 2003-07-31 Frank Koormann <[email protected]>
4066    
4067     * Doc/manual/thuban-manual.xml:
4068     Changed the screenshot elements to figure.
4069     Changed some variablelist elements to itemizedlist.
4070     Added section on GDAL formats.
4071    
4072 jonathan 1531 2003-07-31 Jonathan Coles <[email protected]>
4073    
4074     * Doc/manual/thuban-manual.xml: Added a few sentences about
4075     the Fix Border Color option when generating classes.
4076    
4077 jonathan 1529 2003-07-30 Jonathan Coles <[email protected]>
4078    
4079     * Thuban/Model/classgen.py: Add docstrings. Rename specific
4080     Ramp instances to use lower_case_style.
4081    
4082     * Thuban/UI/classgen.py: Use renamed Ramp instances.
4083    
4084     * Thuban/UI/classifier.py: Add docstrings.
4085    
4086     * Thuban/UI/dock.py: Add docstrings.
4087    
4088     * test/test_classgen.py: Use renamed Ramp instances.
4089    
4090 bh 1522 2003-07-30 Bernhard Herzog <[email protected]>
4091    
4092 bh 1524 * Thuban/Lib/connector.py (QueueingPublisher): Removed. This class
4093     was never used in Thuban.
4094    
4095     2003-07-30 Bernhard Herzog <[email protected]>
4096    
4097 bh 1522 * Thuban/UI/join.py (JoinDialog.__init__): Use the table's Title()
4098     method directly instead of going through the transient_table
4099     method. This faster because transient_table may force the copy of
4100     a DBF file into the transient database and setting a table's title
4101     doesnm't affect the title of the associated transient table, so
4102     this fixes RT #2042
4103    
4104     * Thuban/UI/main.py (__version__): Don't import the already
4105     removed show_exception_dialog.
4106    
4107 jonathan 1517 2003-07-29 Jonathan Coles <[email protected]>
4108    
4109 jonathan 1519 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
4110     Put back this method and remove the equivalent function since we
4111     are setting the exception hook from within this class (OnInit).
4112    
4113     2003-07-29 Jonathan Coles <[email protected]>
4114    
4115 jonathan 1517 * Doc/manual/images/5_2_custom_ramp.png,
4116     Doc/manual/images/5_2_quantiles.png,
4117     Doc/manual/images/5_2_uniform_dist.png,
4118     Doc/manual/images/5_2_unique_values.png,
4119     Doc/manual/images/8_int_error.png: New screen shots.
4120    
4121     * Doc/manual/thuban-manual.xml: Fixed typos and wording, clarified
4122     some points, and added more screen shots.
4123    
4124 bh 1512 2003-07-29 Bernhard Herzog <[email protected]>
4125    
4126 bh 1516 * Thuban/Model/data.py: Remove the now unused import of warnings
4127    
4128     2003-07-29 Bernhard Herzog <[email protected]>
4129    
4130 bh 1514 * Thuban/Model/data.py (SimpleStore): Removed. This class has been
4131     deprecated since before the 0.8 release and isn't used in Thuban
4132     itself anymore.
4133    
4134 bh 1512 * Thuban/Model/transientdb.py: Remove some unnecessary imports
4135    
4136 jonathan 1503 2003-07-29 Jonathan Coles <[email protected]>
4137 jonathan 1506
4138     * Thuban/UI/application.py (ThubanApplication.OnInit): set the
4139     python exception hook here so that we are sure to catch any
4140     Thuban exception that happen during initialization.
4141    
4142     * Thuban/UI/main.py (main): Don't set the exception hook here,
4143     it will get set in ThubanApplication.OnInit.
4144    
4145     2003-07-29 Jonathan Coles <[email protected]>
4146 jonathan 1503
4147     * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
4148     Removed and called it show_exception_dialog() so that the exception
4149     handler can be set before the class is created.
4150    
4151     * Thuban/UI/main.py (main): Install the exception handler before
4152     a ThubanApplication is created.
4153    
4154 bh 1500 2003-07-29 Bernhard Herzog <[email protected]>
4155    
4156     * po/it.po: New. Italian translation by Maurizio Napolitano
4157    
4158     * po/ru.po: New. Russian translation by Alex Shevlakov
4159    
4160 frank 1497 2003-07-29 Frank Koormann <[email protected]>
4161    
4162 frank 1508 * Doc/manual/thuban-manual.xml: Extended section on supported
4163     projections.
4164    
4165     2003-07-29 Frank Koormann <[email protected]>
4166    
4167 frank 1497 * Doc/manual/thuban-manual.xml: gaspell-checked.
4168    
4169 jonathan 1493 2003-07-29 Jonathan Coles <[email protected]>
4170    
4171 jonathan 1495 * Doc/manual/images/3_5_legend.png: Added border to improve look
4172     on white background.
4173    
4174     2003-07-29 Jonathan Coles <[email protected]>
4175    
4176 jonathan 1493 * Doc/manual/thuban-manual.xml: Fixed grammar and typos. Added
4177     descriptions for the legend toolbar.
4178    
4179     * Doc/manual/images/4_2_raster_layer_properties.png: Removed
4180     cursor from dialog box.
4181    
4182     2003-07-28 Jonathan Coles <[email protected]>
4183    
4184     * Doc/manual/thuban-manual.xml: More screenshots and more chapters.
4185    
4186     * Doc/manual/images/2_4_session_tree.png,
4187     Doc/manual/images/3_5_legend.png, Doc/manual/images/3_rename_map.png,
4188     Doc/manual/images/4_2_layer_properties.png,
4189     Doc/manual/images/4_2_raster_layer_properties.png,
4190     Doc/manual/images/5_3_genclass.png,
4191     Doc/manual/images/5_classification.png,
4192     Doc/manual/images/6_projection.png,
4193     Doc/manual/images/7_1_table_view.png,
4194     Doc/manual/images/7_2_5_join.png: New screenshots.
4195    
4196     2003-07-24 Jonathan Coles <[email protected]>
4197    
4198     * Doc/manual/thuban-manual.xml: Chapter on Projection Management.
4199    
4200     2003-07-24 Jonathan Coles <[email protected]>
4201    
4202     * Doc/manual/thuban-manual.xml: Added EPS images and wrote
4203     chapter on Layer Management.
4204    
4205     * Doc/manual/Makefile: New. Makefile to generate all formats for the
4206     manual and images.
4207    
4208 bh 1483 2003-07-24 Bernhard Herzog <[email protected]>
4209    
4210     * Thuban/Model/range.py, Thuban/version.py: Remove the #! line as
4211     it annoys lintian which warns about these files not being
4212 jan 1767 executable. The #! isn't necessary here since if you absolutely
4213 bh 1483 must execute them you can always say "python <filename>".
4214    
4215     * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Remove
4216     superfluous code to set brush and pen for point shapes
4217    
4218     * Thuban/UI/viewport.py: Remove commented out code that wouldn't
4219     belong in viewport anyway
4220    
4221 frank 1479 2003-07-24 Frank Koormann <[email protected]>
4222    
4223     * Doc/manual/thuban-manual.xml: Added section on table management.
4224    
4225 bh 1477 2003-07-24 Bernhard Herzog <[email protected]>
4226    
4227     * test/runtests.py (main): Recognize the long "verbose" option
4228     correctly.
4229    
4230 jonathan 1470 2003-07-22 Jonathan Coles <[email protected]>
4231    
4232     * Doc/manual/thuban-manual.xml: Continue to write first revision
4233     of the manual.
4234    
4235     * Thuban/UI/renderer.py (MapRenderer.render_map): Wrap method
4236     with Begin/EndDrawing() calls to ensure we aren't doing to
4237     many updates to the dc during rendering.
4238     (ScreenRenderer.draw_shape_layer): self.draw_point_shape takes
4239     a pen and brush argument so they need to be passed to the function.
4240    
4241     * Thuban/UI/viewport.py (ViewPort.calc_min_max_scales): New.
4242     Calculates the minimum and maximum scale values. Factored out
4243     of set_view_transform so that it could be used to zoom all the
4244     way into a single point.
4245     (ViewPort.set_view_transform): Call calc_min_max_scales().
4246     (ViewPort.FitSelectedToWindow): Zoom to the maximum scale
4247     if only a single point is selected.
4248    
4249     * Doc/manual/images/1_2_legend_close.png,
4250     Doc/manual/images/1_2_legend_dock.png,
4251     Doc/manual/images/1_2_mainwindow.png,
4252     Doc/manual/images/1_2_mainwindow.ps,
4253     Doc/manual/images/1_2_mainwindow.sk,
4254     Doc/manual/images/3_2_fullextent.png,
4255     Doc/manual/images/3_2_fulllayerextent.png,
4256     Doc/manual/images/3_2_fullshapeextent.png,
4257     Doc/manual/images/3_2_pan.png,
4258     Doc/manual/images/3_2_zoomin.png,
4259     Doc/manual/images/3_2_zoomout.png,
4260     Doc/manual/images/3_3_identify.png,
4261     Doc/manual/images/3_3_label.png,
4262     Doc/manual/images/3_5_invisible.png,
4263     Doc/manual/images/3_5_movedown.png,
4264     Doc/manual/images/3_5_moveup.png,
4265     Doc/manual/images/3_5_props.png,
4266     Doc/manual/images/3_5_tobottom.png,
4267     Doc/manual/images/3_5_totop.png,
4268     Doc/manual/images/3_5_visible.png: New. Images for the documentation.
4269    
4270 bh 1451 2003-07-18 Bernhard Herzog <[email protected]>
4271    
4272 bh 1465 * Thuban/UI/messages.py (MAP_REPLACED): New message.
4273    
4274     * Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED
4275     after the new map has been assigned
4276    
4277     * Thuban/UI/mainwindow.py (MainWindow.delegated_messages):
4278     Delegate MAP_REPLACED to the canvas too
4279     (MainWindow.prepare_new_session): Removed. Thanks to the new
4280     MAP_REPLACED message it's no longer needed
4281     (MainWindow.OpenSession, MainWindow.NewSession):
4282     prepare_new_session has been removed.
4283    
4284     * Thuban/UI/classifier.py (Classifier.__init__): Subscribe to
4285     MAP_REPLACED so that we can close the dialog if a new map is set.
4286     (Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED
4287     (Classifier.map_replaced): Handle MAP_REPLACED by closing the
4288     dialog
4289    
4290     * test/test_viewport.py (SimpleViewPortTest)
4291     (SimpleViewPortTest.test_default_size): Add doc-strings
4292     (ViewPortTest.setUp): Bind map to self.map so we can use it in
4293     tests. Subscribe to MAP_REPLACED messages too.
4294     (ViewPortTest.tearDown): No need to explicitly unsubscribe
4295     (ViewPortTest.test_set_map): New test for the SetMap method.
4296    
4297     2003-07-18 Bernhard Herzog <[email protected]>
4298    
4299 bh 1463 * test/test_viewport.py (SimpleViewPortTest.test_default_size):
4300     Move this test from ViewPortTest.setUp to this new separate test
4301     case. setUp is not the place for the actual tests.
4302     (ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
4303     more of the test from setUp to the new test test_inital_settings.
4304     (ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
4305     (ViewPortTest.test_proj_conv): Split test_proj_conv into
4306     test_win_to_proj and test_proj_to_win and make the tests easier to
4307     understand
4308     (ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
4309     (ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
4310     (ViewPortTest.test_unprojected_rect_around_point)
4311     (ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
4312     Reformat to increase readability.
4313    
4314     2003-07-18 Bernhard Herzog <[email protected]>
4315    
4316 bh 1461 * Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.
4317    
4318     2003-07-18 Bernhard Herzog <[email protected]>
4319    
4320 bh 1459 * test/runtests.py: The test suite can now be run without an X
4321     connection. To make sure this remains true, remove the DISPLAY
4322     environment variable so that an error occurs if the wxGTK is
4323     imported accidentally
4324    
4325     2003-07-18 Bernhard Herzog <[email protected]>
4326    
4327 bh 1457 * Thuban/UI/viewport.py: Remove unused imports
4328    
4329     * Thuban/UI/view.py: Remove unused imports
4330    
4331     2003-07-18 Bernhard Herzog <[email protected]>
4332    
4333 bh 1455 * test/test_export.py Remove unused imports. The OutputTransform
4334     function is now in viewport.py and is called output_transform
4335     (TestScalebar.test_output_transform)
4336     (TestScalebar.test_OutputTransform): Renamed to
4337     test_output_transform and updated to use output_transform instead
4338     of OutputTransform
4339    
4340     * Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
4341     renamed.
4342     (MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
4343     renamed to output_transform
4344    
4345     * Thuban/UI/viewport.py (OutputTransform, output_transform):
4346     Rename to output_transform
4347    
4348     2003-07-18 Bernhard Herzog <[email protected]>
4349    
4350 bh 1453 * Thuban/Model/layer.py (Layer.__init__): Rename
4351     classificationField to classificatin_column and init it here so
4352     that it can be used in SetClassificationColumn
4353     (Layer.GetClassificationColumn, Layer.GetClassificationField):
4354     Rename to GetClassificationColumn.
4355     (Layer.SetClassificationColumn, Layer.SetClassificationField):
4356     Rename to SetClassificationColumn and issue a LAYER_CHANGED
4357     message if the column changes.
4358     (Layer._classification_changed, Layer.ClassChanged): Rename to
4359     _classification_changed. Update the callers.
4360     (Layer.SetShapeStore): Further field->column renames.
4361    
4362     * Thuban/Model/load.py (SessionLoader.start_classification)
4363     (SessionLoader.start_clpoint): Updates because of
4364     field->column method name changes in the Layer class
4365    
4366     * Thuban/Model/save.py (SessionSaver.write_classification): Updates
4367     because of field->column method name changes in the Layer class
4368    
4369     * Thuban/UI/classifier.py (Classifier.__init__)
4370     (Classifier._OnTry, Classifier._OnRevert): Updates because of
4371     field->column method name changes in the Layer class
4372    
4373     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
4374     because of field->column method name changes in the Layer class
4375    
4376     * Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
4377     of field->column method name changes in the Layer class
4378    
4379     * test/test_save.py (SaveSessionTest.testClassifiedLayer)
4380     (SaveSessionTest.testClassifiedLayer): Update because of
4381     field->column method name changes in the Layer class
4382    
4383     * test/test_layer.py (SetShapeStoreTests.setUp)
4384     (SetShapeStoreTests.test_sanity): Update because of field->column
4385     method name changes in the Layer class
4386     (TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
4387     (TestLayerModification.test_sanity)
4388     (TestLayerModification.test_initial_settings): remove unsued code
4389     and rename to test_sanity.
4390     (TestLayerModification.test_set_classification): New test for
4391     SetClassification and SetClassificationField.
4392    
4393     2003-07-18 Bernhard Herzog <[email protected]>
4394    
4395 bh 1451 * test/test_classgen.py (TestFixedRamp.test): Extend test to check
4396     the non-fixed values as well. The old test would have accepted a
4397     fixed ramp that only returnes the fixed properties
4398    
4399 jonathan 1449 2003-07-17 Jonathan Coles <[email protected]>
4400    
4401     * Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
4402     shots for the manual. The XCF file is the source image and
4403     has additional layers to support changes.
4404    
4405     * Doc/manual/thuban-manual.xml: Wrote an initial Introduction.
4406    
4407     * Thuban/UI/classifier.py (Classifier.__BuildClassification):
4408     Return both the new class and the field name.
4409    
4410     * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't
4411     fit the map to the window as this changes any zoom level that
4412     the user may have set.
4413    
4414 jonathan 1442 2003-07-16 Jonathan Coles <[email protected]>
4415    
4416     * Thuban/Model/classgen.py (generate_singletons,
4417     generate_uniform_distribution, generate_quantiles): Remove
4418     fixes parameter, but maintain the same functionality by having
4419     the calling function pass a FixedRamp object for the ramp.
4420     (FixedRamp): New. Adapts a ramp to have fixed property values.
4421    
4422     * Thuban/Model/classification.py: Use new CLASS_CHANGED message.
4423     (Classification): Inherit from Publisher.
4424     (Classification.__init__): Remove the layer parameter.
4425     Classifications no longer need to have a parent layer.
4426     (Classification.GetField, Classification.GetFieldType,
4427     Classification.SetFieldInfo): Removed. The field name is stored
4428     in the layer, and the type can be retreived by calling
4429     Layer.GetFieldType().
4430     (Classification._set_layer, Classification.GetLayer): Removed.
4431     Classifications no longer have a parent layer.
4432    
4433     * Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
4434     classification.
4435     (Layer.SetShapeStore): Reset the classification first while
4436     we still have the old shape store to work with.
4437     (Layer.GetClassificationField, Layer.SetClassificationField):
4438     New. Method for getting/setting the field to classify on.
4439     (Layer.SetClassification): Simplified now that the layer
4440     simply has to hold a reference to the classification and not
4441     tell the classification who owns it.
4442     Fixes RTbug #2023.
4443    
4444     * Thuban/Model/load.py (SessionLoader.start_classification):
4445     Set the field name on the layer, not the classification.
4446    
4447     * Thuban/Model/messages.py: Add CLASS_CHANGED for when a
4448     classification is modified.
4449    
4450     * Thuban/Model/save.py (SessionSaver.write_classification):
4451     Get the field name and type from the layer.
4452    
4453     * Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
4454     parameter records to rows and add docstring. Fixes RTbug #1997.
4455    
4456     * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
4457     ramp when we need to fix certain values of a ramp rather than
4458     using the old fixes parameter. Fixes RTbug #2024.
4459    
4460     * Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
4461     parameter.
4462     (ClassTable.Reset): Add fieldType parameter and use it, rather
4463     than asking the classification.
4464     (Classifier.__init__): Remember the original class's field
4465     and ask the layer for the field type, rather than the classification.
4466     (Classifier.__SetGridTable): Retrieve the field and field type
4467     for the table because they are not in the classification.
4468     (Classifier._OnTry, Classifier._OnRevert): Set the classification
4469     field on the layer in addition to the classification itself.
4470    
4471     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
4472     classification field from layer.
4473    
4474     * Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
4475     classification field from layer. Split up tests and remove
4476     *-imports. Fixes RTbug #1992.
4477    
4478     * test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.
4479    
4480     * test/test_classification.py
4481     (TestClassification.test_classification): Remove tests for methods
4482     that no longer exist.
4483    
4484     * test/test_layer.py (SetShapeStoreTests.setUp): Classification
4485     __init__ no longer has a field parameter, use SetClassificationField.
4486     (SetShapeStoreTests.test_sanity): Use layer object to get class
4487     field info.
4488    
4489     * test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
4490     SetClassificationField on layer to set class field info.
4491    
4492     * test/test_viewport.py: Renamed from test/test_view.py.
4493    
4494 jan 1424 2003-07-16 Jan-Oliver Wagner <[email protected]>
4495    
4496     * Doc/manual/thuban-manual.xml: Added authors and an initial
4497     coarse structure.
4498    
4499 bh 1418 2003-07-15 Bernhard Herzog <[email protected]>
4500    
4501 bh 1422 * test/support.py (FloatComparisonMixin): This is a mix-in class
4502     and therefore should not be derived from any other class.
4503    
4504     * test/test_range.py (RangeTest): FloatComparisonMixin is a
4505     mix-in, so derive from TestCase as well.
4506    
4507     2003-07-15 Bernhard Herzog <[email protected]>
4508    
4509 bh 1420 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
4510     draw_func handling a bit to remove one layer of indirection. This
4511     makes the renderer about 10% faster in the non-classifying case
4512     and the code a bit cleaner
4513     (MapRenderer.draw_point_shape): Add the pen and brush parameters
4514     and set them in the dc. Now the draw_point_shape method and
4515     wxproj's draw_polygon_shape function have basically the same
4516     signature so that both can be directly used as draw_func
4517    
4518     2003-07-15 Bernhard Herzog <[email protected]>
4519    
4520 bh 1418 * Thuban/Model/save.py (SessionSaver.write_classification): Encode
4521     string values (in addition to the labels) as UTF 8
4522    
4523     * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
4524     values if the field type is string
4525    
4526     * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
4527     saving a session with non-ascii string classification values.
4528    
4529     * test/test_load.py (TestClassification.file_contents)
4530     (TestClassification.test): Check for non-ascii values in string
4531     classifications
4532    
4533 jonathan 1416 2003-07-14 Jonathan Coles <[email protected]>
4534    
4535     * test/test_view.py: New. Tests for ViewPort.
4536    
4537 frank 1409 2003-07-14 Frank Koormann <[email protected]>
4538    
4539     * Thuban/Model/load.py (SessionLoader.start_map): Encode map
4540     title to latin1. Fixes https://intevation.de/rt/webrt?serial_num=2013
4541    
4542 frank 1411 * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
4543     unicode strings from session file: session title, map title and
4544     projection name.
4545    
4546 jonathan 1403 2003-07-10 Jonathan Coles <[email protected]>
4547    
4548 jonathan 1406 * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
4549     drag_stop, not drag_move when the mouse is released.
4550    
4551     2003-07-10 Jonathan Coles <[email protected]>
4552    
4553 jonathan 1403 The most important part of this is the seperation of view.py into
4554     two pieces. viewport.py now has a class called ViewPort which
4555     contains all the non-wx parts of view.py and can therefore be
4556     tested. view.py contains only the wx-specific parts and is fairly
4557     simple.
4558    
4559     * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
4560     RTTbug #1992.
4561     * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
4562     RTTbug #1992.
4563    
4564     * Thuban/Model/classgen.py (generate_singletons,
4565     generate_uniform_distribution, generate_quantiles):
4566     Added 'fixes' parameter so that property attributes can
4567     be held constant over the generated classification groups.
4568     (CustomRamp.GetProperties): Remove unused variables.
4569    
4570     * Thuban/Model/map.py (Map.SetProjection): Send the old
4571     projection as an argument to listeners of the MAP_PROJECTION_CHANGED
4572     event.
4573    
4574     * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
4575     parameter which is a list of records that restricts which
4576     records are saved. Fixes RTbug #1997.
4577    
4578     * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
4579     Port exception dialog from GREAT-ER. Fixes RTbug #1993.
4580    
4581     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
4582     to allow the user to fix line color/width on generated groups.
4583     (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
4584     functions to optionally fix group properties.
4585    
4586     * Thuban/UI/main.py (main): Set exception hook to the
4587     ShowExceptionDialog. Fixes RTbug #1993.
4588    
4589     * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
4590     the table window when it is selectd to be shown.
4591    
4592     * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
4593     Export Selection button and move the export buttons underneath
4594     the table.
4595     (QueryTableFrame.UpdateStatusText): Added event argument so
4596     that it can respond to grid selection events. The status text
4597     is now updated even when the table is not associated with a
4598     layer as was previously assumed.
4599     (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
4600     UpdateStatusText responds to these events.
4601     (QueryTableFrame.OnSaveAs): Renamed to doExport.
4602     (QueryTableFrame.doExport): Helper function that saves the
4603     entire table, or selected rows, to a file.
4604     (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
4605     Respond to export button events and call doExport.
4606    
4607     * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
4608     the function doesn't return NULL without first setting a Python
4609     Error.
4610    
4611     * test/runtests.py (main): Only print "Unknown option" for
4612     unsupported options.
4613    
4614     * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
4615     optional epsilon argument to specify floating point accuracy.
4616     (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
4617     for each item test.
4618    
4619     * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
4620     tests for saving selected records.
4621    
4622     * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
4623     tests for saving selected records.
4624    
4625     * test/test_map.py (TestMapWithContents.test_set_projection):
4626     MAP_PROJECTION_CHANGED events send the old projection.
4627    
4628     * test/test_session.py
4629     (TestSessionWithContent.test_forward_map_projection):
4630     MAP_PROJECTION_CHANGED events send the old projection.
4631    
4632     * test/test_table.py (TableTest): Update tests to use non-deprecated
4633     functions.
4634    
4635 bh 1376 2003-07-08 Bernhard Herzog <[email protected]>
4636    
4637 bh 1382 * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
4638     constants in the column objects are the standard ones defined in
4639     the table module.
4640    
4641     * test/test_transientdb.py
4642     (TestTransientTable.test_transienttable_to_dbf): New. Test whether
4643     exporting transient tables as DBF works. This should catch the bug
4644     just fixed in TransientTableBase.Width.
4645    
4646     2003-07-08 Bernhard Herzog <[email protected]>
4647    
4648 bh 1380 * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
4649     interpolated colors correctly.
4650    
4651     * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
4652     New. Test case for the fix in classgen.py
4653    
4654     2003-07-08 Bernhard Herzog <[email protected]>
4655    
4656 bh 1378 * test/runtests.py (main): Make the default output less verbose
4657     and add a verbosity option (-v) to get the old output
4658    
4659     2003-07-08 Bernhard Herzog <[email protected]>
4660    
4661 bh 1376 * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
4662     0.9.
4663    
4664     * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
4665     New. Return the join type
4666    
4667     * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
4668     DTD
4669     (SessionSaver.write_data_containers): Save the join type for
4670     joined tables
4671    
4672     * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
4673     namespace
4674     (SessionLoader.start_jointable): Handle the jointype attribute
4675    
4676     * test/test_load_0_8.py: New. Effectively a copy of test_load.py
4677     as of Thuban 0.8. These are now tests to determine whether Thuban
4678     can still read files generated by Thuban 0.8
4679    
4680     * test/test_load.py (LoadSessionTest.dtd)
4681     (TestSingleLayer.file_contents)
4682     (TestLayerVisibility.file_contents, TestLabels.file_contents)
4683     (TestLayerProjection.file_contents)
4684     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
4685     (TestJoinedTable.file_contents)
4686     (TestLoadError.file_contents): Update for new DTD
4687     (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
4688     for new join type attribute
4689    
4690     * test/test_save.py (SaveSessionTest.dtd)
4691     (SaveSessionTest.testEmptySession)
4692     (SaveSessionTest.testSingleLayer)
4693     (SaveSessionTest.testLayerProjection)
4694     (SaveSessionTest.testRasterLayer)
4695     (SaveSessionTest.testClassifiedLayer)
4696     (SaveSessionTest.test_dbf_table)
4697     (SaveSessionTest.test_joined_table): Update for new DTD
4698     (SaveSessionTest.test_joined_table): Add test for new join type
4699     attribute
4700    
4701 bh 1372 2003-07-04 Bernhard Herzog <[email protected]>
4702    
4703     * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
4704     function for table_to_dbf
4705     (table_to_dbf): Deal with names longer than the 10 character limit
4706    
4707     * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
4708     doc-string
4709     (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
4710     long column names
4711    
4712 bh 1365 2003-07-03 Bernhard Herzog <[email protected]>
4713    
4714 bh 1370 * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
4715    
4716     2003-07-03 Bernhard Herzog <[email protected]>
4717    
4718 bh 1368 * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
4719     for the Thuban manual and README with some basic information about
4720     the manual
4721    
4722     2003-07-03 Bernhard Herzog <[email protected]>
4723    
4724 bh 1365 * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
4725     Update doc-string
4726     (TransientJoinedTable.create): Do not modify the column objects of
4727     the input tables in place and copy all columns of the input tables
4728     into the joined table after all.
4729    
4730     * test/test_transientdb.py
4731     (TestTransientTable.test_transient_joined_table_same_column_name):
4732     Update to reflect the new behavior
4733     (TestTransientTable.test_transient_joined_table_with_equal_column_names):
4734     Update to reflect the new behavior
4735     (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
4736     New test case for a bug which modified the column objects in place
4737    
4738 jonathan 1360 2003-07-02 Jonathan Coles <[email protected]>
4739 jonathan 1349
4740 jonathan 1360 * Thuban/Model/classgen.py (generate_singletons,
4741     generate_uniform_distribution, generate_quantiles,
4742 jonathan 1363 GenQuantiles0): Make sure maxValue isn't less than
4743     one, otherwise we could divide by zero.
4744    
4745     * test/test_classgen.py (ClassGenTest.doClassRangeTest,
4746     ClassGenTest.doClassSingleTest): Call doBoundsTest to
4747     check the end classification groups against the
4748     proper property values.
4749     (ClassGenTest.doBoundsTest): New. Checks the first and
4750     last classification groups to make sure their properties
4751     are the correct upper and lower bounds for a color ramp.
4752    
4753     2003-07-02 Jonathan Coles <[email protected]>
4754    
4755     * Thuban/Model/classgen.py (generate_singletons,
4756     generate_uniform_distribution, generate_quantiles,
4757 jonathan 1360 GenQuantiles0): The denominator was one to high when
4758     calculating the index for the ramp causing the index
4759     to never to reach one.
4760    
4761     2003-07-02 Jonathan Coles <[email protected]>
4762    
4763 jonathan 1358 Changed the singature of ClassGroupRange.__init__ and
4764     ClassGroupRange.SetRange() so that the min/max values are
4765     passed as a tuple. This makes a better calling scheme for
4766     when a Range object is passed instead.
4767    
4768     * Thuban/Model/classgen.py: Fixed parameters to
4769     ClassGroupRange constructor.
4770    
4771     * Thuban/Model/classification.py (ClassGroupRange.__init__):
4772     Consolidate the min/max parameters into a single _range which
4773     can either be a tuple or a Range object.
4774     (ClassGroupRange.SetRange): Consolidate the min/max parameters
4775     into a single _range which can either be a tuple or a Range object.
4776    
4777     * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
4778     call to ClassGroupRange constructor to use a tuple.
4779    
4780     * Thuban/Model/layer.py (Layer.SetClassification): Switch
4781     the classification instance variable to the new class
4782     before calling _set_layer otherwise subscribers to a
4783     LAYER_CHANGED event will not see any difference.
4784    
4785     * test/test_classification.py: Fix tests of ClassGroupRange
4786     so that they use the new signature.
4787    
4788     * test/test_load.py: Fix use of ClassGroupRange so that it
4789     uses the new signature.
4790    
4791     * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
4792     uses the new signature.
4793    
4794     * test/test_save.py: Fix use of ClassGroupRange so that it
4795     uses the new signature.
4796    
4797    
4798     2003-07-01 Jonathan Coles <[email protected]>
4799    
4800 jonathan 1349 * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
4801     Import used objects/class from color.
4802     (generate_singletons): We don't
4803     need the numGroups parameter anymore because we are using
4804     the new ramps with GetProperties().
4805     (generate_uniform_distribution): Use new ramp method
4806     GetProperties().
4807     (generate_quantiles, GenQuantiles0): Use new ramp method
4808     GetProperties().
4809     (CustomRamp.SetNumGroups): Removed. The ramps now map
4810     a value from 0 to 1 to class properties so the number
4811     of groups is not needed ahead of time.
4812     (CustomRamp.next): Removed. CustomRamp does not support
4813     interation anymore.
4814     (CustomRamp.GetProperties): Returns a ClassGroupProperties
4815     object based on the index value from 0 to 1 that is
4816     passed to it.
4817     (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
4818     Made into instances of Monochromatic class instread of
4819     deriving from it.
4820     (HotToCold.SetNumGroups): Removed. See CustomRamp.
4821     (HotToCold.next): Removed. See CustomRamp.
4822    
4823     * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
4824     (Classification.SetField, Classification.SetFieldType):
4825     Replaced with SetFieldInfo.
4826     (Classification.SetFieldInfo): New. Does a better job of
4827     what SetField and SetFieldType used to do by combining
4828     their function since they should really always be done
4829     at the same time.
4830     (Classification.SetLayer): Renamed to _set_layer.
4831     (Classification._set_layer): Should only be called from
4832     Layer's SetClassification. This does not cause a recursive
4833     call as SetLayer did because we know that Layer knows about
4834     the classification.
4835    
4836     * Thuban/Model/color.py: Fixes RTbug #1971.
4837     (_Transparent): Renamed from Transparent so it doesn't
4838     conflict with the module variable.
4839     (Transparent, Black): Renamed from Color.Transparent,
4840     Color.Black so they are not class variables.
4841    
4842     * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
4843     (Layer.Destroy): We don't need to call SetClassification
4844     anymore to clear out the back reference in the classifcation
4845     to the layer. It's better to set it to None using _set_layer,
4846     and we won't be creating another clas object too.
4847     (Layer.SetClassification): Classification._set_layer is not
4848     recursive so remove all the locking variables. Also clean
4849     up the code so that it remains unchanged if something fails.
4850    
4851     * Thuban/Model/load.py: Fixes RTbug #1971.
4852     (SessionLoader.start_classification): Call
4853     Classification.SetFieldInfo().
4854    
4855     * Thuban/Model/save.py: Removed import of Color which wasn't
4856     being used.
4857    
4858     * Thuban/UI/classgen.py: Fixes RTbug #1972.
4859     (ClassGenDialog.__init__): Color ramps are now instances
4860     already so we don't need to create any new objects.
4861     (ClassGenDialog.OnOK): Check for numGroups is no longer
4862     necessary because we never use it.
4863    
4864     * Thuban/UI/classifier.py: Fixes RTbug #1971.
4865     (Classifier.__BuildClassification, Classifier.__SetGridTable):
4866     Call Classification.SetFieldInfo() instead of SetFieldType.
4867    
4868     * Thuban/UI/renderer.py: Fixes RTbug #1971.
4869    
4870     * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
4871     (MapCanvas.__init__): Subscribe to the idle time event. Set
4872     background color to white.
4873     (MapCanvas.OnPaint): Set a flag indicating that we should
4874     render the map during idle time. If we already have a bitmap
4875     just draw it now.
4876     (MapCanvas.OnIdle): New. Render the map only during idle time.
4877     This also fixes a problem with the busy cursor under gtk.
4878    
4879     * test/test_classgen.py (ClassGenTest.test_generate_singletons):
4880     Fix calls to generate_singletons because the signature changed.
4881    
4882     * test/test_classification.py: Fix color references and
4883     change calls to Classification.[SetField|SetFieldType] to
4884     SetFieldInfo.
4885    
4886     * test/test_load.py: Fix color references.
4887    
4888     * test/test_load_0_2.py: Fix color references.
4889    
4890     * test/test_save.py (SaveSessionTest.testClassifiedLayer):
4891     Change calls to Classification.[SetField|SetFieldType] to
4892     SetFieldInfo.
4893    
4894 frank 1334 2003-07-01 Frank Koormann <[email protected]>
4895    
4896     MERGE from the greater-ms3 branch.
4897    
4898     * test/test_transientdb.py
4899     (TestTransientTable.test_transient_joined_table_with_equal_column_names):
4900     New. Test join of two tables with partly equal column names.
4901    
4902     * Thuban/Model/transientdb.py (TransientJoinedTable.create):
4903     If duplicates in left and right tables column names are found,
4904     append '_' (underscores) to the name until it is unique.
4905     Create always new internal names for the resulting table and reference
4906     columns in the join statement with <table>.<column>
4907    
4908 bh 1329 2003-07-01 Bernhard Herzog <[email protected]>
4909    
4910     * test/test_transientdb.py
4911     (TestTransientTable.test_transient_joined_table_same_column_name):
4912     New. Test whether joining on columns with the same names in both
4913     tables works.
4914 frank 1334
4915 bh 1329 * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
4916     sure to use the right internal names even when joining on field
4917     with the same names in both tables. Also, detect duplicate names
4918     in the joined table correctly.
4919    
4920 frank 1325 2003-07-01 Frank Koormann <[email protected]>
4921    
4922     * Thuban/UI/renderer.py (ExportRenderer.render_legend):
4923     Reverse List of layers to render in same order as in desktop legend.
4924    
4925 jonathan 1318 2003-06-30 Jonathan Coles <[email protected]>
4926    
4927 jonathan 1349 * Thuban/version.py (make_tuple): Takes a version string
4928     and splits it into a tuple of at most three integers.
4929     Used make_tuple() to make tuple versions of the version
4930     numbers.
4931    
4932     * Thuban/UI/about.py: Add Thuban email addresses.
4933    
4934     2003-06-30 Jonathan Coles <[email protected]>
4935    
4936 jonathan 1320 * Thuban/version.py: SQLite/PySQLite version dependencies
4937     were too high.
4938    
4939     2003-06-30 Jonathan Coles <[email protected]>
4940    
4941 jonathan 1318 * Thuban/version.py: Update version to 0.8.1
4942    
4943     * MANIFEST.in: Added Projections so that default.proj is
4944     included.
4945    
4946 jonathan 1312 2003-06-26 Jonathan Coles <[email protected]>
4947    
4948     New About box with lots more information including library
4949     versions and credits. More/better version checking before
4950     Thuban starts.
4951    
4952     * Thuban/UI/about.py: New. New About box that displays
4953     library version information and credits.
4954    
4955     * Thuban/version.py: Added new 'versions' dictionary which
4956     contains the verions of various libraries which are checked
4957     when the module loads.
4958     (verify_versions): Check all version numbers and returns
4959     a list of errors.
4960    
4961     * Thuban/UI/classifier.py (Classifier.__EnableButtons):
4962     Reset the status of the buttons as the situation warrants,
4963     but in a better more reliable way by not relying on the
4964     current status to determine what needs to change.
4965    
4966     * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
4967     (verify_versions): Remove most of the code since it is
4968     now in Thuban.version.verify_versions.o
4969    
4970     * Thuban/UI/mainwindow.py (MainWindow.About): Call new
4971     About box in Thuban.UI.about.
4972    
4973     * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
4974     Returns the version of gdal library being used as a string.
4975    
4976     * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
4977     Removed.
4978     (get_proj_version): Return the version of PROJ that the file
4979     was compiled with.
4980     (get_gtk_version): Return th version of GTK that the file
4981     was compiled with.
4982    
4983 jonathan 1304 2003-06-25 Jonathan Coles <[email protected]>
4984    
4985     * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
4986     of the SelectPropertiesDialog should be self so the window
4987     appears on top.
4988     (ClassGroupPropertiesCtrl.DoEdit): The parent
4989     of the SelectPropertiesDialog should be self so the window
4990     appears on top.
4991    
4992     * Thuban/UI/resource.py: Cleaned up how we determine file
4993     extensions.
4994     (GetImageResource): Return an wxImage from our Resources.
4995    
4996 jonathan 1299 2003-06-24 Jonathan Coles <[email protected]>
4997    
4998     * Thuban/UI/renderer.py (ExportRenderer.render_legend):
4999     Check that a layer has a classification before trying
5000     to get it. Raster layers don't have classifications.
5001    
5002 jonathan 1286 2003-06-23 Jonathan Coles <[email protected]>
5003 jonathan 1297
5004     * setup.py: Add Resources/XML to resource list.
5005    
5006     2003-06-23 Jonathan Coles <[email protected]>
5007 jonathan 1286
5008 jonathan 1297 * setup.cfg: Fix copyright dates
5009    
5010     2003-06-23 Jonathan Coles <[email protected]>
5011    
5012 jonathan 1294 * MANIFEST.in: Update with Resources/XML
5013    
5014     * setup.py: Don't include Locale resources yet as we don't
5015     have any and it causes problems building the distribution
5016     for Windows. Update version to 0.8.0.
5017    
5018     * Doc/thuban.dtd: Removed since it is now in Resources/XML.
5019    
5020     * Thuban/UI/mainwindow.py: Add blank line at the end because
5021     file was not being read correctly building the Windows
5022     distribution.
5023    
5024     2003-06-23 Jonathan Coles <[email protected]>
5025    
5026 jonathan 1289 * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
5027    
5028     * Thuban/version.py: Temporarily update longversion for
5029     the 0.8 release so that it doesn't have the cvs revision.
5030    
5031     2003-06-23 Jonathan Coles <[email protected]>
5032    
5033 jonathan 1286 * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
5034     to make sure that we don't create reentrant possibilities with
5035     wxYield.
5036    
5037     * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
5038     directly to avoid the wxSafeYield() call which generates an
5039     OnPaint event causing infinite recursion. Don't try to catch
5040     exception anymore. This was for before there were limits on map
5041     scaling.
5042    
5043 bh 1283 2003-06-23 Bernhard Herzog <[email protected]>
5044    
5045     Bug fix for RT #1961:
5046    
5047     * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
5048     Register DerivedShapestores with the session
5049    
5050     * Thuban/Model/session.py (Session.Tables): Make sure each table
5051     is only listed once.
5052    
5053     * test/test_load.py (TestJoinedTable.test): Add check_format call.
5054     Update file contents to match the one written out.
5055    
5056 bh 1281 2003-06-20 Bernhard Herzog <[email protected]>
5057    
5058     * test/xmlsupport.py (SaxEventLister.startElementNS)
5059     (SaxEventLister.endElementNS): Do not include the qname. Python
5060     2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
5061     is (presumably incorrectly) None, whereas it's a string with the
5062     element name in the later versions.
5063    
5064     * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
5065     (TestEventList.test_even_list_namespace): Update tests to reflect
5066     the new behaviour
5067     (TestEventList.test_even_list_id_normalization): Fix doc-string
5068    
5069 jonathan 1272 2003-06-20 Jonathan Coles <[email protected]>
5070    
5071 jonathan 1279 * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
5072     by deriving classes to determine if that layer supports shapes.
5073     (Layer): Override HasShapes and return true.
5074    
5075     * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
5076     instead of a direct call to wx[Begin|End]CusyCursor().
5077     (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
5078     table data.
5079    
5080     * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
5081     New. Wrappers around the wxWindows functions that allow us to
5082     make additional calls such as wxYield which gives the native
5083     system a chance to update the cursor correctly.
5084    
5085     * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
5086     instead of a direct call to wx[Begin|End]CusyCursor().
5087    
5088     * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
5089     instead of a direct call to wx[Begin|End]CusyCursor().
5090     (MapCanvas.find_shape_at): Check if the current search layer
5091     support shapes, otherwise go on to the next layer.
5092    
5093     * test/test_layer.py: Add tests in each type of layer for
5094     HasClassification() and HasShapes()
5095    
5096     2003-06-20 Jonathan Coles <[email protected]>
5097    
5098 jonathan 1272 * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
5099     turning on the busy cursor to allow the system to change the
5100     cursor before we begin painting. This fixes a problem that
5101     was occuring only under GTK. Fixes RTbug #1840.
5102    
5103 bh 1270 2003-06-20 Bernhard Herzog <[email protected]>
5104    
5105     * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
5106     version.
5107    
5108     * Thuban/Model/save.py (sort_data_stores): New. Make topological
5109     sort of the data sources so they can be written with sources that
5110     data sources that depend on other data sources come after the
5111     sources they depend on.
5112     (SessionSaver.__init__): Add idmap instance variable to map from
5113     objects to the ids used in the file.
5114     (SessionSaver.get_id, SessionSaver.define_id)
5115     (SessionSaver.has_id): New. Methods to manage the idmap
5116     (SessionSaver.write): Use thuban-0.8.dtd
5117     (SessionSaver.write_session): Add a namespace on the session and
5118     write out the data sources before the maps.
5119     (SessionSaver.write_data_containers): New. Write the data
5120     containers.
5121     (SessionSaver.write_layer): Layer elements now refer to a
5122     shapestore and don't contain filenames anymore.
5123    
5124     * Thuban/Model/load.py (LoadError): Exception class to raise when
5125     errors in the files are discovered
5126     (SessionLoader.__init__): Define dispatchers for elements with a
5127     thuban-0.8 namespace too.
5128     (SessionLoader.check_attrs): New helper method to check and
5129     convert attributes
5130     (AttrDesc): New. Helper class for SessionLoader.check_attrs
5131     (SessionLoader.start_fileshapesource)
5132     (SessionLoader.start_derivedshapesource)
5133     (SessionLoader.start_filetable, SessionLoader.start_jointable):
5134     Handlers for the new elements in the new fileformat
5135     (SessionLoader.start_layer): Handle the shapestore attribute in
5136     addition to filename.
5137     (SessionLoader.start_table, SessionLoader.end_table): Removed.
5138     They were never used in the old formats and aren't needed for the
5139     new.
5140    
5141     * Thuban/Model/session.py (Session.DataContainers): New method to
5142     return all "data containers", i.e. shapestores and tables
5143    
5144     * test/xmlsupport.py (SaxEventLister.__init__)
5145     (SaxEventLister.startElementNS, sax_eventlist): Add support to
5146     normalize IDs.
5147    
5148     * test/test_xmlsupport.py
5149     (TestEventList.test_even_list_id_normalization): New test case for
5150     id normalization
5151    
5152     * test/test_load.py (LoadSessionTest.check_format): Use ID
5153     normalization
5154     (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
5155     class atrributes used for ID normalization
5156     (TestSingleLayer, TestLayerVisibility, TestLabels.test)
5157     (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
5158     file format
5159     (TestJoinedTable): New test for loading sessions with joined
5160     tables.
5161     (TestLoadError): New. Test whether missing required attributes
5162     cause a LoadError.
5163    
5164     * test/test_save.py (SaveSessionTest.thubanids)
5165     (SaveSessionTest.thubanidrefs): New class attributes for ID
5166     normalization in .thuban files.
5167     (SaveSessionTest.compare_xml): Use id-normalization.
5168     (SaveSessionTest.testEmptySession)
5169     (SaveSessionTest.testLayerProjection)
5170     (SaveSessionTest.testRasterLayer)
5171     (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
5172     (SaveSessionTest.testLayerProjection): The filename used was the
5173     same as for testSingleLayer. Use a different one.
5174     (SaveSessionTest.test_dbf_table)
5175     (SaveSessionTest.test_joined_table): New test cases for saving the
5176     new data sources structures.
5177     (TestStoreSort, MockDataStore): Classes to test the sorting of the
5178     data stores for writing.
5179    
5180     * test/runtests.py: Add CVS keywords
5181    
5182 jonathan 1265 2003-06-20 Jonathan Coles <[email protected]>
5183    
5184 jonathan 1267 * test/test_session.py
5185     (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
5186     Use the cultural_landmark-point.dbf file for the store so that
5187     the table rows and shape count match.
5188    
5189     2003-06-20 Jonathan Coles <[email protected]>
5190    
5191 jonathan 1265 * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
5192     an exception if the number of shapes is different from the
5193     number of rows in the table. Address RTbug #1933.
5194    
5195     * test/test_layer.py (TestLayer.test_derived_store): Add
5196     a test for the new exception in DerivedShapeStore.__init__.
5197    
5198     * test/support.py (FloatTestCase): Removed since there is
5199     already FloatComparisonMixin. Fixes RTbug #1954.
5200     (FloatComparisonMixin.assertFloatEqual): Include test for
5201     infinity that was part of FloatTestCase.
5202    
5203     * test/test_range.py (RangeTest): Inherit from
5204     support.FloatComparisonMixin now that we don't have
5205     support.FloatTestCase.
5206    
5207 bh 1256 2003-06-20 Bernhard Herzog <[email protected]>
5208    
5209 bh 1260 * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
5210     the implementation in xmlsupport instead.
5211     (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
5212    
5213     * test/test_proj.py: Import sax_eventlist from xmlsupport instead
5214     of test_save
5215    
5216     2003-06-20 Bernhard Herzog <[email protected]>
5217    
5218 bh 1258 * test/test_load.py (LoadSessionTest.check_format): New helper
5219     method to make sure the test files we load might have been written
5220     by the current thuban version.
5221     (ClassificationTest.TestLayers, TestSingleLayer.test)
5222     (TestLayerVisibility.test, TestClassification.test)
5223     (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
5224     Add check_format() calls and fix the thuban data to match the data
5225     that would be written by saving the session loaded from it.
5226    
5227     * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
5228     the same class and function in test_save.
5229    
5230     * test/test_xmlsupport.py (TestEventList): New. test cases for
5231     sax_eventlist
5232    
5233     2003-06-20 Bernhard Herzog <[email protected]>
5234    
5235 bh 1256 * Resources/XML/thuban.dtd: Add comment about which versions of
5236     Thuban are covered by this DTD
5237     (map): Fix content model for layers and raster layers. There can
5238     be any number or layers and raster layers in any order.
5239    
5240 jonathan 1254 2003-06-20 Jonathan Coles <[email protected]>
5241    
5242 jonathan 1265 This is mainly about fixing RTbug #1949.
5243    
5244 jonathan 1254 * Thuban/Model/classification.py: Remove "from __future__"
5245     import statement since python 2.2 is the earliest supported
5246     version.
5247    
5248     * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
5249     Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
5250     depending on the units this projection *forwards* into.
5251    
5252     * Thuban/Model/save.py (SessionSaver.write_classification):
5253     Remove unnecessary use of lambdas and nested functions.
5254    
5255     * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
5256     adjustment here if the map projection uses degrees.
5257    
5258     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
5259     scale adjust code since it is now done before calling
5260     this method. Don't do anything if the map projection
5261     is None.
5262    
5263 bh 1244 2003-06-19 Bernhard Herzog <[email protected]>
5264    
5265 bh 1248 Move version specific load tests to their own file.
5266    
5267     * test/test_load.py: Expand the doc-string to explain a bit how to
5268     handle file format changes.
5269     (TestClassification.test): Update the docstring as this test is
5270     not about Thuban 0.2 anymore.
5271    
5272     * test/test_load_0_2.py: New file with the load tests for thuban
5273     files created with Thuban 0.2 and earlier.
5274    
5275     2003-06-19 Bernhard Herzog <[email protected]>
5276    
5277 bh 1246 Add XML validation to some of the tests. Validation will only be
5278     done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
5279     To make the DTD available to the test cases it's moved into
5280     Resources/XML
5281    
5282     * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
5283     for versions up to and including 0.2. Two slight changes: added an
5284     encoding specification and fixed the comment which refered to
5285     GRASS, not Thuban
5286    
5287     * test/xmlsupport.py: New support module for tests involving XML.
5288     Currently there's a mix-in class for XML validation.
5289    
5290     * test/test_xmlsupport.py: New. Tests for the xmlsupport module
5291    
5292     * test/test_save.py (SaveSessionTest): Derive from ValidationTest
5293     so that we can validate the
5294     (SaveSessionTest.testEmptySession)
5295     (SaveSessionTest.testSingleLayer)
5296     (SaveSessionTest.testSingleLayer)
5297     (SaveSessionTest.testLayerProjection)
5298     (SaveSessionTest.testRasterLayer)
5299     (SaveSessionTest.testClassifiedLayer): Validate the generated XML
5300    
5301     * test/runtests.py (main): Call print_additional_summary instead
5302     of print_garbage_information
5303    
5304     * test/support.py (resource_dir): New function to return the
5305     "Resource" subdirectory
5306     (print_additional_summary): New function to combine several
5307     summary functions
5308     (run_tests): Use print_additional_summary instead of calling
5309     print_garbage_information directly
5310    
5311     2003-06-19 Bernhard Herzog <[email protected]>
5312    
5313 bh 1244 * Doc/thuban.dtd (classification): Correct the content model of
5314     the classification element.
5315     (projection): Add the "name" attribute
5316    
5317 frank 1242 2003-06-19 Frank Koormann <[email protected]>
5318    
5319     MERGE from the greater-ms3 branch.
5320    
5321     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
5322     scale if projection is latlong to get better estimate.
5323    
5324     Fix problem of hidden properties dialog under windows after double
5325     click on layer tree:
5326     The tree control always gets an Expanded / Collapsed event after
5327 joey 2162 the ItemActivated on double click, which raises the main window again.
5328     We add a second ItemActivated event to the queue, which simply
5329 frank 1242 raises the already displayed window.
5330    
5331     * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
5332     raiseProperties initialized to prevent endless loops
5333     (LegendTree._OnItemActivated): Depending on self.raiseProperties
5334     simply raise the properties or open the dialog and issue a second
5335     event.
5336    
5337 jonathan 1235 2003-06-18 Jonathan Coles <[email protected]>
5338    
5339 jonathan 1239 * setup.py: Fix a few problems that occured under Windows.
5340    
5341     2003-06-18 Jonathan Coles <[email protected]>
5342    
5343 jonathan 1235 When Thuban loaded the map was redrawn twice because the
5344     legend was being opened after the mainwindow was created
5345     and not during its creation. This meant the map was drawn
5346     initially and then had to be redrawn when the legend
5347     caused the display to change. Now the legend is opened
5348     in the mainwindow constructor which resolves this issue.
5349    
5350     Also, although we were checking for the existence of
5351     gdal and gdalwarp modules, the gdalwarp extension was
5352     still being compiled (which may fail if the system doesn't
5353     have gdal installed). the build_ext command to setup.py
5354     now accepts the flags --with-gdal and --without-gdal.
5355     If --without-gdal is specified setup.py will try to
5356     use the gdal parameters specified by gdal-config. Under
5357     windows, those parameters have to be set in setup.py
5358     as with proj4 an wxWindows.
5359    
5360     * setup.py: Use a list instead of seperate variables for
5361     extension parameters so we can create a generic function
5362     that runs an appropriate *-config script.
5363     (run_cs_script): Renamed from run_wx_script and modified
5364     to accept a second argument which is a list of lists to
5365     be filled in by the values returned from running the command.
5366     (thuban_build_ext): New. Extends the build_ext command and
5367     provides the options --with-gdal/--without-gdal which then
5368     optionally includes the gdalwarp extension.
5369    
5370     * Thuban/Model/resource.py: First check if we can import
5371     the gdalwarp Thuban extension before checking for gdal.
5372     Also added some comments.
5373    
5374     * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
5375     the map is None which may be the case if none has been loaded
5376     yet.
5377    
5378     * Thuban/UI/main.py (main): Remove call to ShowLegend.
5379    
5380     * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
5381    
5382     * Thuban/UI/renderer.py: Check for gdal support before importing
5383     gdalwarp.
5384     (MapRenderer.render_map): Only try to optimize if we have gdal
5385     support otherwise nothing will get drawn.
5386    
5387 jonathan 1237 * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
5388     during startup before a map has been created. Check if map is None
5389     before using it and do nothing if it is.
5390    
5391 jonathan 1224 2003-06-17 Jonathan Coles <[email protected]>
5392    
5393     Fix the problem with raster layers under Windows that caused
5394     Thuban to crash. The view should respond to layer projection
5395     changed events to update the display. Changes to a projection
5396     should not cause the map to be set to full extent.
5397    
5398     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
5399     current_map_proj to remember the current map projection so that
5400     when the projection changes we know what the previous projection
5401     was.
5402     (MapCanvas.SetMap): Unsubscribe and subscribe to
5403     LAYER_PROJECTION_CHANGED events.
5404     (MapCanvas.projection_changed): Split into two methods that respond
5405     to map and layer projection changes.
5406     (MapCanvas.map_projection_changed): New. Takes the current view and
5407     projects it using the new projection. This does not cause the
5408     map to be redrawn at full extent.
5409     (MapCanvas.layer_projection_changed): New. Cause a redraw which
5410     will draw each layer in its new projection.
5411    
5412     * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
5413     VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
5414     under Windows.
5415    
5416     * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
5417     to twice sizeof(void*) because there are two digits for each
5418     hex byte.
5419    
5420 bh 1220 2003-06-16 Bernhard Herzog <[email protected]>
5421    
5422     Update to the layer interface: Direct access to the table,
5423     shapetable, shapefile and filename attributes is now actively
5424     deprecated by issuing deprecation warnings for all places where
5425     this happens.
5426    
5427     * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
5428     to the instance variables table, shapetable, shapefile and
5429     filename via __getattr__ so that we can issue a deprecation
5430     warning.
5431     (Layer.SetShapeStore): Don't set the deprecated instance variables
5432     any more
5433     (Layer.SetShapeStore): Don't use deprecated layer instance
5434     variables
5435     (Layer.Destroy): No need to explicitly remove the instance
5436     variables any more
5437     (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
5438     instance variables
5439    
5440     * Thuban/UI/classgen.py (ClassGenDialog.__init__)
5441     (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
5442     (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
5443     use deprecated layer instance variables
5444    
5445     * Thuban/UI/classifier.py (Classifier.__init__): Don't use
5446     deprecated layer instance variables
5447    
5448     * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
5449     (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
5450     instance variables
5451    
5452     * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
5453     deprecated layer instance variables
5454    
5455     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
5456     deprecated layer instance variables
5457    
5458     * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
5459     deprecated layer instance variables
5460    
5461     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
5462     (MapRenderer.polygon_render_param): Don't use deprecated layer instance
5463     variables
5464    
5465     * test/runtests.py (main): Turn Thuban's deprecation warnings into
5466     errors so that they're cought by the tests
5467    
5468     * test/test_load.py (TestSingleLayer.test): Don't use deprecated
5469     layer instance variables
5470    
5471 jonathan 1212 2003-06-16 Jonathan Coles <[email protected]>
5472    
5473     Fix a problem under Windows whereby if the user double-clicks on a
5474     layer in the legend that tree item will expand or collapse as well
5475     as open the layer properties dialog. The state of the tree item
5476     should not be affected.
5477    
5478     * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
5479     preventExpandCollapse and subscribe to expanding and collapsing
5480     events.
5481     (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
5482     collapsing events and will veto the event if it has been triggered
5483     by the user double clicking on a layer.
5484     (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
5485     that an expanding/collapsing event should be vetoed.
5486    
5487 bh 1208 2003-06-13 Bernhard Herzog <[email protected]>
5488    
5489     * Thuban/UI/classifier.py (Classifier.OnClose)
5490     (Classifier.map_layers_removed)
5491     (Classifier.layer_shapestore_replaced): Unsubscribe the messages
5492     in OnClose and not in map_layers_removed or
5493     layer_shapestore_replaced to make sure it always happens when the
5494     dialog is closed
5495    
5496 jonathan 1201 2003-06-13 Jonathan Coles <[email protected]>
5497    
5498 jonathan 1203 This puts back a fix for Windows where a panel is needed so that
5499     the background of the table view appears correctly.
5500    
5501     * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
5502     object that can be used by derived classes to place any
5503     controls (including the grid) onto.
5504     (QueryTableFrame.__init__): Use the panel as the parent window
5505     for all the controls. Reparent the grid so that the panel is
5506     the parent. Call UpdateStatusText() to correctly initialize
5507     the status bar.
5508    
5509     2003-06-13 Jonathan Coles <[email protected]>
5510    
5511 jonathan 1201 * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
5512     from wxFrame (as opposed to wxDialog like the other classes)
5513     but otherwise behaves like the other classes. This is needed
5514     for the TableView which isn't really a dialog and needs to
5515     have a status bar and control buttons.
5516    
5517     * Thuban/UI/tableview.py (TableGrid.__init__): Create an
5518     instance variable to keep track of how many rows are selected.
5519     Subscribe once to the the events we are interested in.
5520     (ThubanGrid.OnRangeSelect): Only handle event if event handling
5521     hasn't been turned off.
5522     (ThubanGrid.OnSelectCell): Only handle event if event handling
5523     hasn't been turned off.
5524     (ThubanGrid.ToggleEventListeners): Rather than subscribe None
5525     as an event listener (which changes the event handler stack)
5526     simply set an instance variable to False. This is checked in
5527     the event handlers.
5528     (ThubanGrid.GetNumberSelected): Return the number of currently
5529     selected rows.
5530     (TableFrame): Inherit from ThubanFrame so we can have a
5531     status bar and control buttons.
5532     (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
5533     Explicitly set which items are selected in the operator choice and
5534     action choice so there is always a valid selection. Fixes RTbug #1941.
5535     Subscribe to grid cell selection events so we can update the
5536     status bar.
5537     (QueryTableFrame.UpdateStatusText): Update the status bar with
5538     how many rows are in the grid, how many columns, and how many
5539     rows are selected.
5540     (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
5541     Call UpdateStatusText when cells are (de)selected.
5542     (QueryTableFrame.OnQuery): Use the string value in the value
5543     combo if either the selected item index is 0 or if the string
5544     cannot be found in the predefined list (this happens if the
5545     user changes the text). Fixes RTbug #1940.
5546     Only turn off the grid event listeners if there a query comes
5547     back with a none empty list of ids. in the case that the list
5548     is empty this causes a grid.ClearSelection() call to actually
5549     clear the grid selection which causes the selected items in
5550     the map to be deselected. Fixes RTbug #1939.
5551    
5552     * test/test_save.py (XMLWriterTest.Encode): Check return values.
5553     Fixes RTbug #1851.
5554    
5555 bh 1195 2003-06-13 Bernhard Herzog <[email protected]>
5556    
5557     * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
5558     self.selected_shape with the current selection to make sure the
5559     contents of the dialog are up to date when it's shown for the
5560     first time.
5561     The dialog used to work without this by luck. The recent fix to
5562     the connector module 'broke' a 'feature' the identify view was
5563     relying on, i.e that subscribing to a message in response to
5564     receiving a message of that type would mean that the new
5565     subscriber would also be called for the same message.
5566    
5567 jonathan 1169 2003-06-12 Jonathan Coles <[email protected]>
5568 jonathan 1175
5569 jonathan 1193 * extensions/thuban/gdalwarp.cpp: Removed debug printing as
5570     the image is rendered. Fixes RTbug #1937.
5571    
5572     2003-06-12 Jonathan Coles <[email protected]>
5573    
5574 jonathan 1191 * Thuban/Lib/fileutil.py: As is done under Windows, create the
5575 jonathan 1193 user directory if it doesn't exist on a posix system.
5576     Fixes RTbug #1815.
5577 jonathan 1191
5578     * Thuban/Model/resource.py (get_user_proj_files): Moved the
5579     called to get_application_dir here, so that the directory
5580     will only be called if this method is invoked.
5581    
5582     * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
5583     the projfilepath if no projection is selected.
5584    
5585     2003-06-12 Jonathan Coles <[email protected]>
5586    
5587 jonathan 1182 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
5588     the scalebar if the current map has no projection set.
5589    
5590     * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
5591     projfilepath label to just the basename of the projection file
5592     rather than include the entire path.
5593    
5594     * Thuban/Model/resource.py: Fix missed proj functions that
5595     needed to be renamed.
5596    
5597     2003-06-12 Jonathan Coles <[email protected]>
5598    
5599 jonathan 1178 * Thuban/Model/classification.py: Removed assert statements that
5600     tested if the variable was an instance of Color.
5601    
5602     * Thuban/Model/color.py (Color): Remove commented code that isn't
5603     used.
5604     (Transparent): Renamed from NoColor. Doesn't inherit from Color.
5605     Fixes RTbug #1835.
5606     (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
5607     Needed now that the class doesn't inherit from Color.
5608    
5609     2003-06-12 Jonathan Coles <[email protected]>
5610    
5611 jonathan 1175 * test/test_save.py (XMLWriterTest.testEncode): Explicitly
5612     check unicode strings.
5613    
5614     * test/test_layer.py: Check for existence of gdal.
5615    
5616     2003-06-12 Jonathan Coles <[email protected]>
5617 jonathan 1172
5618     * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
5619     that was in load.py
5620 jonathan 1169
5621 jonathan 1172 * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
5622     that was in save.py
5623    
5624     2003-06-12 Jonathan Coles <[email protected]>
5625    
5626 jonathan 1169 This is largely a collection of bug fixes. We also handle the
5627     case where gdal is not on the system. The XMLReader and XMLWriter
5628     classes were moved into there own files to resolve some circular
5629     import references and because they shouldn't really be in the
5630     file that is dediciated to reading/writing session files since
5631     they are also used elsewhere.
5632    
5633     * Thuban/Model/classgen.py: Renamed functions to follow the
5634     function_names_with_underscores style. Fixes RTbug #1903.
5635     (calculate_quantiles): Raise ValueError if 'percents' is invalid.
5636    
5637     * Thuban/Model/layer.py: Import gdal only if it available.
5638     (RasterLayer): Handle the case where the gdal library is unavailable.
5639     Addresses RTbug #1877.
5640    
5641     * Thuban/Model/load.py (XMLReader): Moved into seperate file
5642     xmlreader.py.
5643    
5644 jonathan 1172 2003-06-12 Jonathan Coles <[email protected]>
5645    
5646     This is largely a collection of bug fixes. We also handle the
5647     case where gdal is not on the system. The XMLReader and XMLWriter
5648     classes were moved into there own files to resolve some circular
5649     import references and because they shouldn't really be in the
5650     file that is dediciated to reading/writing session files since
5651     they are also used elsewhere.
5652    
5653     * Thuban/Model/classgen.py: Renamed functions to follow the
5654     function_names_with_underscores style. Fixes RTbug #1903.
5655     (calculate_quantiles): Raise ValueError if 'percents' is invalid.
5656    
5657     * Thuban/Model/layer.py: Import gdal only if it available.
5658     (RasterLayer): Handle the case where the gdal library is unavailable.
5659     Addresses RTbug #1877.
5660    
5661     * Thuban/Model/load.py (XMLReader): Moved into seperate file
5662     xmlreader.py.
5663    
5664 jonathan 1169 * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
5665     file xmlwriter.py.
5666    
5667     * Thuban/Model/resource.py: Renamed functions to following the
5668     function_names_with_underscores style.
5669     (has_gdal_support): New function that returns true if the gdal
5670     library is available. Addresses RTbug #1877.
5671    
5672     * Thuban/UI/application.py (ThubanApplication.OpenSession):
5673     Display a message box if the gdal library is not available, but
5674     only if there are any layers that would use it. Addresses RTbug #1877.
5675    
5676     * Thuban/UI/classgen.py: Use renamed projection resource functions.
5677     (GenUniformPanel.__CalcStepping): Fix a slight discrepency
5678     when using integers versus floats.
5679    
5680     * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
5681     determine if the "Add Image Layer" menu option should be
5682     greyed out or not. Addresses RTbug #1877.
5683    
5684     * Thuban/UI/projdialog.py: Use renamed projection resource functions.
5685    
5686     * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
5687     optimize if a raster layer is visible. Fixes RTbug #1931.
5688     Only draw the raster layer if the gdal library is available.
5689     Addresses RTbug #1877.
5690    
5691     * test/test_classgen.py: Add tests for generate_singletons,
5692     generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
5693     (test_calculate_quantiles): Fix some tests to catch the new
5694     ValueError that is raised.
5695    
5696     * test/test_proj.py: Use renamed projection resource functions.
5697    
5698     * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
5699     test for saving classified layers. Fixes RTbug #1902.
5700     (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
5701    
5702 jan 1156 2003-06-12 Jan-Oliver Wagner <[email protected]>
5703    
5704     Fix for http://intevation.de/rt/webrt?serial_num=1900.
5705    
5706     * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
5707    
5708     * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
5709     multiplechoicedialog.py rather than from the wxPython library.
5710    
5711 frank 1151 2003-06-11 Frank Koormann <[email protected]>
5712    
5713 frank 1152 * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
5714     update.
5715    
5716     2003-06-11 Frank Koormann <[email protected]>
5717    
5718 frank 1151 * Thuban/Lib/fileutil.py (get_application_dir): New function to
5719     determine the absolute .thuban/thuban directory under
5720     "posix" (os.expanduser) and "nt" (read AppData registry key).
5721    
5722     * Thuban/Model/resource.py: Use get_application_dir
5723    
5724     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
5725     Use get_application_dir.
5726    
5727 bh 1143 2003-06-10 Bernhard Herzog <[email protected]>
5728    
5729 bh 1147 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
5730     the messages MAP_LAYERS_REMOVED messages
5731     (LayerTableFrame.OnClose): Unsubscribe from it.
5732     (LayerTableFrame.map_layers_removed): New. Receiver for
5733     MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
5734     dialog is showing is removed.
5735    
5736     2003-06-10 Bernhard Herzog <[email protected]>
5737    
5738 bh 1145 * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
5739     of the receivers list so that unsubscribing in a receiver doesn't
5740     modify it while iterating over it.
5741    
5742     * test/test_connector.py
5743     (ConnectorTest.test_disconnect_in_receiver): New. Test whether
5744     unsubscribing in a receiver works correctly. See docstring for
5745     details
5746    
5747     2003-06-10 Bernhard Herzog <[email protected]>
5748    
5749 bh 1143 * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
5750     message.
5751    
5752     * Thuban/Model/layer.py (Layer.SetShapeStore): Send
5753     LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
5754     LAYER_CHANGED will still be sent if the classification changes.
5755    
5756     * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
5757     parameter so we can subscribe to some of its messages
5758     (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
5759     and the layer's LAYER_SHAPESTORE_REPLACED
5760     (Classifier.unsubscribe_messages): New. Unsubscribe from message
5761     subscribed to in __init__
5762     (Classifier.map_layers_removed)
5763     (Classifier.layer_shapestore_replaced): receivers for the messages
5764     subscribed to in __init__. Unsubscribe and close the dialog
5765    
5766     * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
5767     the map to the Classifier dialog
5768    
5769     * test/test_layer.py (SetShapeStoreTests): Derive from
5770     SubscriberMixin as well so we can test messages
5771     (SetShapeStoreTests.setUp): Subscribe to some of the layer's
5772     messages
5773     (SetShapeStoreTests.tearDown): Clear the messages again
5774     (SetShapeStoreTests.test_sanity): Expand the doc-string and check
5775     for the modified flag too
5776     (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
5777     to check whether SetShapeStore sets the modified flag
5778     (SetShapeStoreTests.test_set_shape_store_different_field_name)
5779     (SetShapeStoreTests.test_set_shape_store_same_field)
5780     (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
5781     Add tests for the messages. This checks both the new
5782     LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
5783    
5784 jan 1141 2003-06-06 Jan-Oliver Wagner <[email protected]>
5785    
5786     * Thuban/UI/mainwindow.py: Improved and partly added help texts for
5787     the menu items.
5788    
5789 frank 1134 2003-06-05 Frank Koormann <[email protected]>
5790    
5791 frank 1139 * Thuban/UI/identifyview.py (IdentifyView.__init__):
5792     Layout reimplemented without panel. Make life easier to fit the list
5793     in the dialog.
5794    
5795     2003-06-05 Frank Koormann <[email protected]>
5796    
5797 frank 1137 * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
5798     once on initialisation (Former implementation resulted in multiple
5799     entries for each projection).
5800     (ProjFrame.__FillAvailList): selectProj as second optional parameter,
5801     if set, select the projection found under the specified name. This
5802     overwrites any other selection estimate.
5803     Removed projchoice filling from this method.
5804     (ProjFrame._OnSave, ProjFrame._OnAddToList):
5805     Updated call of ProjFrame.__FillAvailList
5806     (LCCPanel._DoLayout): Moved parameter controls in more common order.
5807    
5808     * Resources/Projections/defaults.proj: Extended defaults representing
5809     various common European projections.
5810    
5811     2003-06-05 Frank Koormann <[email protected]>
5812    
5813 frank 1134 * Thuban/UI/identifyview.py (IdentifyView.__init__):
5814     Use ListCtrl instead of GridCtrl
5815    
5816     * Thuban/Model/resource.py:
5817     Guess location of .thuban directory from tempdir parent directory.
5818    
5819     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
5820     Guess location of .thuban directory from tempdir parent directory.
5821    
5822 bh 1130 2003-06-04 Bernhard Herzog <[email protected]>
5823    
5824     Do not cache the values returned by the tree widget's
5825     GetFirstChild and GetNextChild methods because it led to lots of
5826     segfaults. The new way requires more brute force but is more
5827     reliable.
5828    
5829     * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
5830     variable layer2id
5831     (LegendTree.find_layer): New method to do with brute force what
5832     layer2id tried to accomplish
5833     (LegendTree._OnMsgLayerChanged)
5834     (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
5835     Use find_layer instead of layer2id
5836     (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
5837     update layer2id anymore
5838     (LegendTree._OnMsgMapLayersRemoved)
5839     (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
5840    
5841 tkoester 1128 2003-06-03 Thomas Koester <[email protected]>
5842    
5843     * Thuban/Model/classgen.py (GenQuantiles0): New function.
5844    
5845 bh 1120 2003-06-02 Bernhard Herzog <[email protected]>
5846    
5847 bh 1127 * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
5848     New commands.
5849     (main_menu): Add the new commands.
5850     (MainWindow.TableRename): New. Implementation of the table_rename
5851     command.
5852     (MainWindow.RenameLayer): New. Implementation of the layer_rename
5853     command.
5854    
5855     * Thuban/Model/session.py (Session.AddTable): call self.changed to
5856     set the modified flag
5857    
5858     * test/test_session.py (TestSessionSimple.test_add_table): Test
5859     whether the modified flag is set properly
5860    
5861     * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
5862     instead of issue so that the modified flags get updated.
5863    
5864     * test/test_base.py (SomeTitledObject): Derive from Modifiable
5865     instead of Publisher to reflect reality better and to accomodate
5866     the fact that SetTitle now calls changed instead of issue
5867    
5868     2003-06-02 Bernhard Herzog <[email protected]>
5869    
5870     * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
5871     acquisition has to happen before the try in a try-finally.
5872    
5873     2003-06-02 Bernhard Herzog <[email protected]>
5874    
5875 bh 1120 * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
5876     possible that a layer is removed that is not currently selected in
5877     the legend so don't check for this.
5878    
5879 bh 1112 2003-05-30 Bernhard Herzog <[email protected]>
5880    
5881 bh 1118 * Thuban/Model/layer.py (Layer.Destroy): Set all instance
5882     variables to None that have direct or indirect references to
5883     shapefiles or dbf files to make sure that they do go away and the
5884     files are closed.
5885    
5886     2003-05-30 Bernhard Herzog <[email protected]>
5887    
5888 bh 1116 * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
5889     availImgListIndices when a new image list is created
5890    
5891     2003-05-30 Bernhard Herzog <[email protected]>
5892    
5893 bh 1114 * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
5894     changing_selection to indicate whether the LegendTree code itself
5895     is currently changing the selection
5896     (LegendTree.normalize_selection): New method to normalize the
5897     selection by selecting the layer item even if the user clicked on
5898     the classification.
5899     (LegendTree._OnSelChanged): normalize the selection. This works
5900     around a bug in wx which doesn't keep track of the selection
5901     properly when subtrees are deleted.
5902    
5903     2003-05-30 Bernhard Herzog <[email protected]>
5904    
5905 bh 1112 * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
5906     maximum and minimum scale factors.
5907    
5908     * test/test_classgen.py (ClassGenTest.test): Update to reflect the
5909     changes in classgen.py
5910    
5911 jonathan 1109 2003-05-30 Jonathan Coles <[email protected]>
5912    
5913     * Thuban/Model/classgen.py: Remove ClassGenerator class but make
5914     all the methods functions. Fixes RTBug #1903.
5915    
5916     * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
5917     to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
5918     RTBug #1907.
5919    
5920     * Thuban/UI/classgen.py: Use classgen functions that were part
5921     of the ClassGenerator class. Put try/finally blocks around
5922     code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
5923     RTBug #1904.
5924    
5925     * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
5926    
5927     * Thuban/UI/legend.py: The legend was cleared and repopulated any
5928     time something changed which caused some state to be lost such
5929     as which children were expanded or collapsed. Fixes RTBug #1901.
5930     (LegendTree._OnMsgMapLayersAdded): Add only new layers.
5931     (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
5932     the legend but not in the map.
5933     (LegendTree.__FillTree): Move main functionality out into smaller
5934     methods that can be used by other methods.
5935     (LegendTree.__FillTreeLayer): Reuse old slots in the image list
5936     if they are available.
5937     (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
5938     that we override the wxTreeCtrl method. Iterate over children
5939     and call __RemoveLayer.
5940     (LegendTree.__AddLayer): New. Add a new layer to the legend.
5941     (LegendTree.__RemoveLayer): Remove a layer from the legend.
5942     (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
5943     Should only be called with the id of a layer branch.
5944     (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
5945     Returns the root item or creates one if necessary.
5946    
5947     * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
5948     ProjectRasterFile with tuple arguments instead of strings.
5949    
5950     * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
5951     with try/finally. Fixes RTBug #1904.
5952    
5953     * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
5954     with try/finally. Fixes RTBug #1904.
5955     (MapCanvas.FitSelectedToWindow): If a single point is selected
5956     simply center it on the display. Fixes RTBug #1849.
5957    
5958     * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
5959     to be compiled as a standalone app. Now the code can only be
5960     called from Python which simplifies the parameter passing.
5961     (ProjectRasterFile): Handle Python arguments. Remove code that
5962     checks for a destination dataset. Add more clean up code.
5963    
5964     * test/test_map.py (TestMapWithContents.test_raise_layer_top,
5965     TestMapWithContents.test_lower_layer_bottom):
5966     Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
5967     Fixes RTBug #1907.
5968    
5969     * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
5970     extent to the map when the legend is toggled. Fixes RTBug #1881.
5971    
5972 jan 1097 2003-05-29 Jan-Oliver Wagner <[email protected]>
5973    
5974     * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
5975     unsubscribes all that is subcribed in __init__.
5976    
5977 bh 1089 2003-05-28 Bernhard Herzog <[email protected]>
5978    
5979 bh 1095 * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
5980     (MainWindow.CanDuplicateLayer): New methods to implement the
5981     Layer/Duplicate command.
5982     (layer_duplicate command): New.
5983     (main_menu): Add layer_duplicate to the Layer menu.
5984    
5985     2003-05-28 Bernhard Herzog <[email protected]>
5986    
5987 bh 1093 * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
5988     renderer so that NULL/None values get displayed differently (by a
5989     gray rectangle).
5990     (TableGrid.__init__): Override the default renderers
5991    
5992     2003-05-28 Bernhard Herzog <[email protected]>
5993    
5994 bh 1089 * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
5995     classification to "None" if the type of the field has changed.
5996    
5997     * test/test_layer.py (SetShapeStoreTests): New. Class with a few
5998     test for the Layer.SetShapeStore method
5999    
6000 jan 1087 2003-05-28 Jan-Oliver Wagner <[email protected]>
6001 jan 1085
6002 jan 1087 * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
6003     does not necessarily have a filename).
6004    
6005     2003-05-28 Jan-Oliver Wagner <[email protected]>
6006    
6007 jan 1085 * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
6008     sort the selection list for the dialog.
6009    
6010 frank 1083 2003-05-28 Frank Koormann <[email protected]>
6011    
6012     * extensions/thuban/wxproj.cpp
6013     (project_point): Removed cast to int for projected point coordinates.
6014     (shape_centroid): Return last point if all polygon vertices fall
6015     to one point.
6016    
6017 bh 1079 2003-05-28 Bernhard Herzog <[email protected]>
6018    
6019 bh 1081 * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
6020     with layers that don't have shapestores, i.e. raster layers.
6021    
6022     2003-05-28 Bernhard Herzog <[email protected]>
6023    
6024 bh 1079 * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
6025     when determining the title from the filename.
6026    
6027     * test/test_dbf_table.py (TestDBFTable.test_title): Update to
6028     reflect changes in the way the title is derived from the filename
6029    
6030 frank 1077 2003-05-28 Frank Koormann <[email protected]>
6031    
6032     * Thuban/UI/mainwindow.py (MainWindow.TableShow):
6033     Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
6034    
6035 bh 1069 2003-05-27 Bernhard Herzog <[email protected]>
6036    
6037 bh 1075 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
6038     delegate SelectedLayer.
6039     (MainWindow.LayerUnjoinTable): Implement.
6040     (_can_unjoin): New. Helper function for the sensitivity of the
6041     layer/unjoin command.
6042    
6043     * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
6044     (DerivedShapeStore.OrigShapeStore): New. Return the original
6045     shapestore. Used to figure out how to unjoin.
6046     (DerivedShapeStore.Shapefile): Fix a typo.
6047    
6048     2003-05-27 Bernhard Herzog <[email protected]>
6049    
6050 bh 1073 * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
6051     well
6052     (JoinDialog.__init__): Use the layer parameter and only build the
6053     left choice when a layer is given
6054     (JoinDialog.OnJoin): Handle layer joins as well
6055     (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
6056     that the user selects the "Select..." item. The sensitivitly
6057     updating is now in update_sensitivity
6058     (JoinDialog.y): New method to refactor the sensitivity update of
6059     the join button into its own method.
6060    
6061     * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
6062    
6063     2003-05-27 Bernhard Herzog <[email protected]>
6064    
6065 bh 1071 * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
6066     iff there are unreferenced tables in the session
6067    
6068     2003-05-27 Bernhard Herzog <[email protected]>
6069    
6070 bh 1069 * Thuban/Model/messages.py (TABLE_REMOVED): New message.
6071    
6072     * Thuban/Model/session.py (Session.UnreferencedTables): New method
6073     to return tables that are not referenced by other tables or shape
6074     stores and can be removed.
6075     (Session.RemoveTable): Issue a TABLE_REMOVED message after
6076     removing the table
6077    
6078     * Thuban/UI/mainwindow.py: Remove unused imports
6079     (MainWindow.TableClose): Implement.
6080    
6081     * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
6082     messages so that the frame will be automatically closed when a new
6083     session is opened or the table is removed.
6084     (TableFrame.OnClose): Unsubscribe the Subscriptions made in
6085     __init__
6086     (TableFrame.close_on_session_replaced)
6087     (TableFrame.close_on_table_removed): New. Subscribers that close
6088     the window
6089    
6090     * test/test_session.py (TestSessionMessages.test_remove_table)
6091     (TestSessionSimple.test_remove_table): Move the test to
6092     TestSessionSimple and add test for the TABLE_REMOVED message
6093     (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
6094     (TestSessionSimple.test_unreferenced_tables) New. Test for the
6095     UnreferencedTables method.
6096     (UnreferencedTablesTests): New. Class with some more sophisticated
6097     tests for UnreferencedTables.
6098    
6099 frank 1065 2003-05-27 Frank Koormann <[email protected]>
6100    
6101 frank 1067 * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
6102     display has some unwanted side effects. Removed again.
6103    
6104     2003-05-27 Frank Koormann <[email protected]>
6105    
6106 frank 1065 * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
6107    
6108     * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
6109    
6110 jan 1062 2003-05-27 Jan-Oliver Wagner <[email protected]>
6111    
6112 bh 1069 * test/test_menu.py (MenuTest.test): Added test for
6113     Menu.RemoveItem().
6114 jan 1062
6115 bh 1069 * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
6116     the menu.
6117 jan 1062
6118 frank 1059 2003-05-27 Frank Koormann <[email protected]>
6119    
6120     Nonmodal dialogs without parent (i.e. they can fall behind the main
6121     window)
6122    
6123     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
6124     all dialogs in the dialogs dictionary and the canvas.
6125    
6126     * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
6127     parent, i.e. can fall behind other windows.
6128     (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
6129     dictionary before removing it.
6130    
6131     * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
6132    
6133     * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
6134     * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
6135     * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
6136    
6137 bh 1053 2003-05-27 Bernhard Herzog <[email protected]>
6138    
6139 bh 1055 * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
6140     tableview dialog
6141     (MainWindow.TableShow): Use ShowTableView to open the dialogs.
6142     Also, don't use the table's titles as the dialog names. The titles
6143     aren't guaranteed to be unique.
6144     (MainWindow.TableOpen): Open a table view dialog after opening the
6145     table
6146    
6147     2003-05-27 Bernhard Herzog <[email protected]>
6148    
6149 bh 1053 * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
6150     effect can be achieved by simply closing the window showing the
6151     table.
6152     (MainWindow.TableHide): Removed.
6153     (main_menu): Removed "table_hide"
6154    
6155 frank 1051 2003-05-27 Frank Koormann <[email protected]>
6156    
6157     Fix legend tree display problems under Win32
6158    
6159     * Thuban/UI/legend.py: BMP_SIZE_W = 15
6160     (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
6161     (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
6162    
6163     * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
6164    
6165 jan 1048 2003-05-27 Jan-Oliver Wagner <[email protected]>
6166    
6167     * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
6168     'after' now allows to insert separators almost anywhere in the menu.
6169    
6170 frank 1046 2003-05-27 Frank Koormann <[email protected]>
6171    
6172     * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
6173     "S" of selection box label to hint on hot key (Alt-S). Works under
6174     Win32 but is ignored under GTK.
6175    
6176     2003-05-26 Frank Koormann <[email protected]>
6177    
6178     * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
6179     Center Choices.
6180    
6181 bh 1038 2003-05-26 Bernhard Herzog <[email protected]>
6182    
6183 bh 1044 Remove the Precision methods again. They're too DBF specific to be
6184     part of the table interface and they're only used in table_to_dbf
6185     anyway.
6186    
6187     * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
6188     fixed precision of 12 for doubles.
6189     (TransientTableBase.Precision): Removed
6190     (AutoTransientTable.Width): Delegate to self.table.
6191    
6192     * Thuban/Model/table.py (DBFTable.Precision)
6193     (MemoryTable.Precision): Removed.
6194     (MemoryTable.Width): Use a fixed precision of 12 for doubles.
6195     (table_to_dbf): Use a fixed precision of 12 for floats unless the
6196     column object specifies something else.
6197    
6198     * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
6199     test for table_to_dbf
6200    
6201     2003-05-26 Bernhard Herzog <[email protected]>
6202    
6203     * test/test_transientdb.py
6204     (TestTransientTable.run_iceland_political_tests): Fix a comment.
6205    
6206     2003-05-26 Bernhard Herzog <[email protected]>
6207    
6208 bh 1038 * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
6209     implementation. Mark parts of the file format strings for
6210     localization.
6211    
6212     * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
6213     file and add the table to the tables managed by the session
6214    
6215 bh 1040 * test/test_session.py (TestSessionSimple.test_open_table_file):
6216     New. test case for OpenTableFile
6217    
6218 jan 1033 2003-05-26 Jan-Oliver Wagner <[email protected]>
6219    
6220 jan 1035 * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
6221     Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
6222     Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
6223     Replace the true/false of wxWindows by True/False of Python 2.2.1.
6224    
6225     2003-05-26 Jan-Oliver Wagner <[email protected]>
6226    
6227 bh 1038 * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
6228     already a selection present, update the grid accordingly.
6229 jan 1033
6230     * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
6231     resizeable and increase its initial size.
6232    
6233 frank 1030 2003-05-26 Frank Koormann <[email protected]>
6234    
6235     Table export functionality
6236    
6237     * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
6238     Return width (in characters) for a column.
6239     (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
6240     (table_to_dbf): Write table to dbf file.
6241     (table_to_csv): Write table to csv file.
6242    
6243     * Thuban/Model/transientdb.py (TransientTableBase.Width,
6244     TransientTableBase.Precision): Return column width and precision.
6245    
6246     * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
6247     or table_to_csv depending on file selection.
6248    
6249     * test/test_dbf_table.py:
6250     Test table_to_dbf (extension of former part of test).
6251    
6252     * test/test_csv_table.py:
6253     Test table_to_csv.
6254    
6255 jan 1021 2003-05-23 Jan-Oliver Wagner <[email protected]>
6256    
6257 jan 1024 * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
6258     Use QueryTableFrame instead of TableFrame.
6259 jan 1021
6260 jan 1024 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
6261     table window with 'Layer Table:' instead of 'Table:'.
6262    
6263     2003-05-23 Jan-Oliver Wagner <[email protected]>
6264    
6265     Give all tables a title via mix-in TitledObject.LayerShowTable
6266    
6267 jan 1021 * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
6268     only if it exists.
6269    
6270     * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
6271     and call its init-method with a default title. Remove Title() method.
6272    
6273     * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
6274     AutoTransientTable): mix-in TitledObject and call its init-method with
6275     a default title. Remove Title() method.
6276    
6277 bh 1017 2003-05-23 Bernhard Herzog <[email protected]>
6278    
6279     * Thuban/Model/session.py (Session.AddShapeStore): Define
6280     AddShapeStore analogously to AddTable.
6281    
6282     * test/test_session.py (TestSessionSimple.test_add_shapestore):
6283     New. Test for AddShapeStore
6284    
6285 jan 1015 2003-05-23 Jan-Oliver Wagner <[email protected]>
6286    
6287     Introducing QueryTableFrame and a very coarse ShowTable implementation.
6288    
6289     * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
6290     class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
6291     The latter implements the selection GUI without dependency on a layer.
6292     LayerTableFrame now is derived from QueryTableFrame and connects
6293     to a layer.
6294    
6295     * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
6296     implementation that still needs work.
6297    
6298     * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
6299    
6300 frank 1011 2003-05-22 Frank Koormann <[email protected]>
6301    
6302     * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
6303     Added "outer_join = False" as optional parameter.
6304     (TransientJoinedTable.create): If outer join is true, perform a
6305     "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
6306     the left table. Records not matching are filled with 0 / None.
6307    
6308     * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
6309     (JoinDialog.OnJoin): Consider outer join check box.
6310    
6311 bh 1006 2003-05-22 Bernhard Herzog <[email protected]>
6312    
6313 bh 1008 * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
6314     somewhat safer way. Storing the traceback in a local variable can
6315     lead to memory leaks
6316    
6317     2003-05-22 Bernhard Herzog <[email protected]>
6318    
6319 bh 1006 * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
6320     the wxMessageDialog's Destroy() method.
6321    
6322 frank 1004 2003-05-22 Frank Koormann <[email protected]>
6323    
6324     * Thuban/UI/join.py (JoinDialog.__init__): Make use of
6325     TransientTable.Title()
6326    
6327     2003-05-22 Frank Koormann <[email protected]>
6328    
6329     Join Dialog, initial version.
6330    
6331     * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
6332    
6333     * Thuban/UI/join.py (JoinDialog): Functional implementation of
6334     former framework. Renamed Table1/Table2 to LeftTable/RightTable
6335     in all occurences.
6336    
6337     * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
6338     Typo fixed.
6339    
6340 bh 995 2003-05-22 Bernhard Herzog <[email protected]>
6341    
6342 bh 999 Give the tables titles so that the GUI can display more meaningful
6343     names. For now the titles are fixed but depend on e.g. filenames
6344     or the titles of the joined tables.
6345    
6346     * Thuban/Model/transientdb.py (TransientTable.Title)
6347     (TransientJoinedTable.Title, AutoTransientTable.Title): New.
6348    
6349     * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
6350    
6351     * test/test_transientdb.py
6352     (TestTransientTable.test_auto_transient_table_title): New. Test
6353     for the Title method
6354     (TestTransientTable.test_transient_joined_table)
6355     (TestTransientTable.test_transient_table): Add test for the Title
6356     methods
6357    
6358     * test/test_memory_table.py (TestMemoryTable.test_title): New.
6359     Test for the Title method
6360    
6361     * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
6362     the Title method
6363    
6364     2003-05-22 Bernhard Herzog <[email protected]>
6365    
6366 bh 997 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
6367     Provide a better way to destroy the layers
6368     (TestLayer.test_base_layer, TestLayer.test_arc_layer)
6369     (TestLayer.test_point_layer, TestLayer.test_empty_layer)
6370     (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
6371     the new way to destroy the layers.
6372     (TestLayer.test_derived_store): New. Test for using a layer with a
6373     DerivedShapeStore
6374    
6375     * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
6376     filename if the shape store actually has one.
6377    
6378     2003-05-22 Bernhard Herzog <[email protected]>
6379    
6380 bh 995 * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
6381     for the filename
6382    
6383     * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
6384     for the FileName method
6385     (TestDBFTableWriting.test_write): Fix spelling of filename
6386    
6387 tkoester 993 2003-05-22 Thomas Koester <[email protected]>
6388    
6389     * Thuban/Model/range.py, test/test_range.py: Brought over new Range
6390     from SciParam that now really is immutable.
6391    
6392 frank 992 2003-05-22 Frank Koormann <[email protected]>
6393    
6394     Layer Top/Bottom placement added to legend.
6395    
6396     * Thuban/UI/legend.py
6397     (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
6398     bound to tool events.
6399     (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
6400     New, methods binding the event methods with the map methods.
6401    
6402     * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
6403     layer at top/bottom of layer stack.
6404    
6405     * Resources/Bitmaps/top_layer.xpm: New button icon.
6406    
6407     * Resources/Bitmaps/bottom_layer.xpm: New button icon.
6408    
6409 bh 988 2003-05-22 Bernhard Herzog <[email protected]>
6410    
6411     * Thuban/Model/session.py (Session.RemoveTable): New method to
6412     remove tables
6413    
6414     * test/test_session.py (TestSessionSimple.test_remove_table): New.
6415     Test for RemoveTable
6416    
6417 tkoester 986 2003-05-22 Thomas Koester <[email protected]>
6418    
6419     * Thuban/Model/classgen.py: Added short module doc string and CVS id.
6420     (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
6421    
6422 bh 983 2003-05-22 Bernhard Herzog <[email protected]>
6423    
6424 bh 985 Implement a way to discover dependencies between tables and
6425     shapestores.
6426    
6427     * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
6428     (TransientJoinedTable.Dependencies)
6429     (AutoTransientTable.SimpleQuery): New. Implement the dependencies
6430     interface
6431     (TransientJoinedTable.__init__): Keep tack of the original table
6432     objects in addition to the corresponding transient tables.
6433    
6434     * Thuban/Model/table.py (DBFTable.Dependencies)
6435     (MemoryTable.Dependencies): New. Implement the dependencies
6436     interface
6437    
6438     * Thuban/Model/data.py (ShapeTable): New. Helper class for
6439     ShapefileStore
6440     (ShapefileStore.__init__): Use ShapeTable instead of
6441     AutoTransientTable
6442     (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
6443     (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
6444     methods for filename and type
6445     (ShapefileStore.Dependencies): New. Implement the dependencies
6446     interface
6447     (DerivedShapeStore): New class to replace SimpleStore. The main
6448     difference to SimpleStore is that it depends not on a shapefile
6449     but another shapestore which expresses the dependencies a bit
6450     better
6451     (SimpleStore.__init__): Add deprecation warning.
6452    
6453     * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
6454     Test for the Dependencies method.
6455    
6456     * test/test_memory_table.py (TestMemoryTable.test_dependencies):
6457     New. Test for the Dependencies method.
6458    
6459     * test/test_transientdb.py
6460     (TestTransientTable.test_auto_transient_table_dependencies): New.
6461     Test for the Dependencies method.
6462     (TestTransientTable.test_transient_joined_table): Add test for the
6463     Dependencies method.
6464    
6465     * test/test_session.py (TestSessionSimple.setUp)
6466     (TestSessionSimple.tearDown): New. Implement a better way to
6467     destroy the sessions.
6468     (TestSessionSimple.test_initial_state)
6469     (TestSessionSimple.test_add_table): Bind session to self.session
6470     so that it's destroyed by tearDown
6471     (TestSessionSimple.test_open_shapefile): New. Test for
6472     OpenShapefile and the object it returns
6473    
6474     2003-05-22 Bernhard Herzog <[email protected]>
6475    
6476 bh 983 * Thuban/Model/session.py (Session.AddTable): New method to
6477     register tables with the session.
6478     (Session.Tables): Return the tables registered with AddTable too.
6479    
6480     * test/test_session.py (TestSessionSimple.test_add_table): New.
6481     Test case for the AddTable method
6482    
6483 frank 981 2003-05-22 Frank Koormann <[email protected]>
6484    
6485     UI polishing updates: Place main buttons (OK, Cancel, etc) in the
6486     lower right corner, center labels for selections, initialize controls
6487     in reasonable order for keyboard navigation.
6488    
6489     * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
6490     (ProjFrame.__DoOnProjAvail): Determine position of current projection
6491     using the wxListBox.FindString() method. Still a problem (#1886)
6492    
6493     * Thuban/UI/classifier.py
6494     (Classifier.__init__, SelectPropertiesDialog.__init__)
6495    
6496     * Thuban/UI/classgen.py (ClassGenDialog.__init__,
6497     (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
6498     different classification types from here to __init__.
6499     (GenUniquePanel.__init__): Set the column width of the first field
6500     in the Field ListCtrl to the full width.
6501    
6502     * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
6503     Button to 'Export'. Center Buttons in Selection Box, set Focus to
6504     Grid.
6505     (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
6506     changes focus to the Selection when pressing "Alt-S".
6507    
6508     * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
6509     the text if not visible. The italic font sometimes exceeds the
6510     rendering area.
6511    
6512 jonathan 972 2003-05-21 Jonathan Coles <[email protected]>
6513 jonathan 971
6514 jonathan 975 * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
6515     to OnClose so that Thuban closes correctly.
6516    
6517     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
6518     DockFrame.OnClose, not DockFrame._OnClose.
6519    
6520     2003-05-21 Jonathan Coles <[email protected]>
6521    
6522 jonathan 971 * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
6523     references to 'inf' and use new Range __init__ to pass floats
6524     directly rather than converting them to strings first.
6525     Fixes RTBug #1876.
6526    
6527     * Thuban/Model/classification.py (ClassGroupRange.SetRange):
6528     Use new Range ___init__ to pass floats.
6529    
6530     * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
6531     filename is a valid image file. Throw IOError otherwise.
6532    
6533     * Thuban/Model/range.py: Brought over new Range from SciParam that
6534     is immutable and has an __init__ which can accept floats.
6535    
6536     * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
6537     into try block. AddLayer doesn't throw any exceptions anymore.
6538     (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
6539     try block.
6540    
6541     * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
6542     the first item in choices. Fixes RTBug #1882.
6543    
6544     * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
6545     has gone to 0 which is a serious problem. abort.
6546     (MapRenderer.draw_raster_layer): Catch IOError seperately and
6547     print the error from GDAL.
6548    
6549     * Thuban/UI/tableview.py (TableGrid.__init__): Call
6550     ToggleEventListeners to turn on listening.
6551     (TableGrid.ToggleEventListeners): New. Turns event listening on
6552     and off so as to prevent excessive messages.
6553     (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
6554     to suppress excessive messages when selecting many rows.
6555     Fixes RTBug #1880.
6556    
6557     * Thuban/UI/view.py: Added checks against if scale == 0. This
6558     is a serious problem that can occur when an image without
6559     geo data is loading and causes the map projection bounds to
6560     go to infinity. Right now, the solution is to simply try
6561     to recover.
6562    
6563     * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
6564     to set the MFILEReceiver attributes even if the data is NULL.
6565    
6566     * extensions/thuban/gdalwarp.cpp: Improved the error handling
6567     and passed GDAL messages back up to the Python layer. Also
6568     tried to fix some memory leaks that were present in the original
6569     utility but didn't matter because the program aborted.
6570    
6571     * test/test_range.py: Copied over tests from SciParam. Removed
6572     tests against importing. Fixes RTBug #1867.
6573    
6574 bh 958 2003-05-21 Bernhard Herzog <[email protected]>
6575    
6576     * test/test_load.py: Remove unused imports and restructure the
6577     test code
6578     (LoadSessionTest): Split into one class for each test and turn
6579     LoadSessionTest itself into the base class for all such session
6580     tests.
6581     (ClassificationTest): New base class for load tests that test
6582     classifications
6583     (TestSingleLayer, TestLayerVisibility, TestClassification)
6584     (TestLabels, TestLayerProjection, TestRasterLayer): New classes
6585     for the individual tests
6586    
6587     * test/support.py (FileLoadTestCase.filename): New base class for
6588     file loading tests
6589    
6590 jan 955 2003-05-21 Jan-Oliver Wagner <[email protected]>
6591    
6592     * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
6593     Mercator' to 'UTM Zone 32' as a more convenient example.
6594     Added 'Gauss Krueger Zone 6'.
6595    
6596     * Data/iceland_sample_raster.thuban: political polygon now
6597     filled transparent to have the raster image visible at once.
6598    
6599 frank 952 2003-05-21 Frank Koormann <[email protected]>
6600    
6601     * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
6602     OnClose() to keep in sync with extensions. Internally Thuban
6603     still uses "underscored" names.
6604    
6605 jonathan 949 2003-05-20 Jonathan Coles <[email protected]>
6606    
6607     This puts back Raster layer support. These layers support projections
6608     through the GDAL library. Currently, the CVS version is being used.
6609     There are no Debian packages available although this may change soon.
6610     A GDAL driver was extended to support writing to memory rather to
6611     files.
6612    
6613     There is still some work that needs to be done, such as some error
6614     handling when loading invalid images or when there is a problem
6615     projecting the image. This putback simply checks in the majority
6616     of the work.
6617    
6618     * setup.py: Add gdalwarp library extension.
6619    
6620     * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
6621     Defaults to False, but can be overridden by subclasses if they
6622     support classification.
6623     (RasterLayer): New. Defines a new layer that represents an
6624     image.
6625    
6626     * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
6627     tag handler.
6628     (SessionLoader.start_layer): Encode the filename.
6629     (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
6630     New. Supports reading a rasterlayer tag.
6631    
6632     * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
6633    
6634     * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
6635     get a string in Latin1. If we get such as string convert it to
6636     unicode first, otherwise leave if alone before encoding.
6637     (SessionSaver.write_layer): Add support for writing both Layers
6638     and RasterLayers.
6639    
6640     * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
6641     The right argument may not be a string, it could also be a Column.
6642    
6643     * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
6644     Make initial window size 600x400. Fixes RTBug #1872.
6645    
6646     * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
6647     the dialog is constructed so that we can support layers that
6648     do not have classifications.
6649     (Classifier._OnTry): Only build a classification if the layer
6650     supports one.
6651    
6652     * Thuban/UI/legend.py: Change all checks that a layer is an
6653     instance of Layer into checks against BaseLayer.
6654     (LegendTree.__FillTreeLayer): Only add children to a branch if
6655     the layer supports classification.
6656    
6657     * Thuban/UI/mainwindow.py (MainWindow.NewSession,
6658     MainWindow.OpenSession): Don't proceed with an action if the
6659     user chooses Cancel when they are asked to save changes.
6660     (MainWindow.AddRasterLayer): New. Open a dialog to allow the
6661     user to select an image file. Create a new RasterLayer and add
6662     it to the map.
6663    
6664     * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
6665     for rendering RasterLayer layers.
6666     (MapRenderer.draw_raster_layer): Actually method that calls
6667     the GDALWarp python wrapper and constructs an image from the
6668     data returned.
6669    
6670     * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
6671     Choices symbols to match those used in the table query method.
6672     Replace deprecated method calls on table with new method names.
6673    
6674     * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
6675     how small the scale can get. This still needs more testing.
6676    
6677     * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
6678     Provides a driver to output in .bmp format.
6679    
6680     * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
6681     New. Provides IO routines which write to memory, rather than a file.
6682    
6683     * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
6684     of the gdalwarp utility provided in GDAL. Added function calls
6685     that can be accessed from python.
6686    
6687     * Data/iceland_sample_raster.thuban: New. Sample file that uses
6688     a raster layer.
6689    
6690     * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
6691     layer image data.
6692    
6693     * Doc/thuban.dtd: Added rasterlayer attribute definition.
6694    
6695     * test/test_layer.py, test/test_load.py, test/test_save.py: Added
6696     tests associated with the raster layer code.
6697    
6698     * test/test_transientdb.py
6699     (TestTransientTable.test_auto_transient_table_query): Added a test
6700     for using a Column object as the "right" parameter to a query.
6701    
6702 frank 924 2003-05-19 Frank Koormann <[email protected]>
6703    
6704 frank 927 * Thuban/version.py (get_changelog_date):
6705     Catch exceptions if ChangeLog does not exist.
6706    
6707     * Thuban/UI/view.py (MapCanvas.Export): Bugfix
6708    
6709     2003-05-19 Frank Koormann <[email protected]>
6710    
6711 frank 924 Extended version information for Thuban
6712    
6713     * Thuban/version.py: New, version information for Thuban: Last
6714     modification date and last ChangeLog entry date.
6715    
6716     * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
6717     information: Display Thuban, wxPython and Python version.
6718    
6719 bh 919 2003-05-16 Bernhard Herzog <[email protected]>
6720    
6721 bh 921 * Thuban/Model/save.py: Remove some unused imports including the
6722     __future__ import for nested_scopes as Thuban relies on Python 2.2
6723     now.
6724     (XMLWriter.encode): Remove the special case for a None argument.
6725     In the saver encode is always called with a string argument.
6726    
6727     2003-05-16 Bernhard Herzog <[email protected]>
6728    
6729 bh 919 * Thuban/UI/__init__.py: Remove the work-around for the locale bug
6730     in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
6731     of the bug was that e.g. float("1.2") would fail. Thuban now
6732     requires 2.4.x.
6733    
6734 frank 917 2003-05-16 Frank Koormann <[email protected]>
6735    
6736     Printing enhancement and WMF export (under Win32)
6737    
6738     * Thuban/UI/renderer.py (ExportRenderer): New, derived from
6739     ScreenRenderer. Renders Map, Legend and Scalebar for export.
6740     (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
6741     PrintRender.
6742    
6743     * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
6744     to fullfil information needed for PrinterRenderer.
6745     (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
6746     (MapCanvas.Print): Adapted to new MapPrintout.
6747     (OutputTransform): General calculations to transform from canvas
6748     coordinates to export/printing devices.
6749    
6750     * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
6751     new method_command to call ExportMap, with platform dependency (only
6752     __WXMSW__)
6753    
6754     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
6755     of scalebar drawing area as new parameters.
6756    
6757     * Thuban/Model/scalebar.py (roundInterval): round long instead of int
6758    
6759     * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
6760     Update to extended scalebar.DrawScalebar header.
6761    
6762     * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
6763    
6764     * test/test_scalebar.py: Made test executable as standalone.
6765    
6766 bh 908 2003-05-16 Bernhard Herzog <[email protected]>
6767    
6768     * Thuban/Model/table.py (Table): Remove this compatibility alias
6769     for DBFTable.
6770    
6771     * test/test_table.py: Import DBFTable as Table because that alias
6772     doesn't exist anymore.
6773    
6774     * Thuban/UI/classgen.py: Remove some unused imports
6775    
6776 jonathan 906 2003-05-14 Jonathan Coles <[email protected]>
6777    
6778     * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
6779     Fix docstring.
6780     (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
6781     (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
6782     values of the supplied range to determine the beginning and end
6783     bounds of the generated classes.
6784    
6785     * Thuban/Model/range.py (Range.number_re): Now accepts floats that
6786     do not have a leading 0 (.5 is now accepted as well as 0.5).
6787    
6788     * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
6789     call to ClassGenerator.GenUniformDistribution.
6790    
6791     * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
6792     layout bug with the 'Projection' label.
6793    
6794     * test/support.py (FloatTestCase): New. Needed for the Range tests.
6795    
6796     * test/test_range.py: New. Imported from SciParam.
6797    
6798 jonathan 897 2003-05-12 Jonathan Coles <[email protected]>
6799    
6800 jonathan 899 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
6801     to table.UniqueValues() with calls that retrieve all the values
6802     from the table. This will need to be replaced by a method on table
6803     which can simply return the list (perhaps more efficiently).
6804    
6805     2003-05-12 Jonathan Coles <[email protected]>
6806    
6807 jonathan 897 The return value of ClassGenerator.CalculateQuantiles has changed.
6808     Refer to the documentation for details.
6809    
6810     * test/test_classgen.py: Modified Quantile tests to use the
6811     new return values.
6812    
6813     * Thuban/Model/classgen.py
6814     (ClassGenerator.GenQuantiles): Add comments describing the parameters,
6815     use new return values from CalculateQuantiles to produce the correct
6816     range bounds in the Classification.
6817     (ClassGenerator.CalculateQuantiles): Add more comments describing
6818     the return values and parameters. Make minor adjustments to improve
6819     the legibility of the code. Fix problem with adjusted not being set
6820     in most cases.
6821    
6822 frank 893 2003-05-12 Frank Koormann <[email protected]>
6823    
6824     * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
6825     and latin1. Fixes #1851 finally.
6826    
6827 jonathan 889 2003-05-09 Jonathan Coles <[email protected]>
6828    
6829 jonathan 897 * test/test_classgen.py: New. Tests the Quantile algorithm.
6830    
6831     * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
6832     Clean up debugging statement, add comments, fix a small bug in the
6833     returned adjusted percentiles.
6834    
6835     2003-05-09 Jonathan Coles <[email protected]>
6836    
6837 jonathan 889 Introduces Range class from SciParam into the ClassGroupRange class,
6838     and such ranges can now be saved and loaded from disk.
6839    
6840     Quantiles are now available in the Classification Generator.
6841    
6842     Initial support for building Queries on a table. Doesn't do anything
6843     but run some tests.
6844    
6845     * Thuban/Model/classification.py: Explicit imports.
6846     (ClassGroupRange): Use the Range class to store the underlying
6847     range information. The interface remains the same, except for
6848     GetRange(), and you can also supply a Range object as the min
6849     parameter to SetRange or __init__.
6850    
6851     * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
6852     string appropriately for use in Thuban. Fixes RTbug #1851.
6853     (SessionLoader.end_projection): Handle the context of the
6854     projection tag a bit better by looking at what objects are not
6855     None. There was an assumption that a projection tag for a map
6856     could occur before any layers.
6857     (SessionLoader.start_clrange): Provide backward compatibility for
6858     reading min/max values as well as the new range parameter.
6859    
6860     * Thuban/Model/map.py: Explicit imports.
6861    
6862     * Thuban/Model/resource.py: Import _.
6863     (ProjFileSaver.write): write header using projfile.dtd.
6864    
6865     * Thuban/Model/save.py: Explicit imports.
6866     (XMLWriter.encode): New. Encode the given string from a format
6867     used by Thuban into UTF-8. Fixes RTbug #1851.
6868    
6869     * Thuban/UI/classgen.py: Explicit imports.
6870     (ClassGenDialog.__init__): Clean up the code and add support
6871     for Quantiles.
6872     (ClassGenDialog.OnOK): Add support for Quantiles.
6873     (GenQuantilesPanel): New. Input panel for Quantiles.
6874     (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
6875     GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
6876    
6877     * Thuban/Model/classgen.py: New. Contains all the classes named above.
6878    
6879     * Thuban/UI/classifier.py: Explicit imports.
6880     (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
6881     ClassTable.SetValueAsCustom): Reworked to use new Range class.
6882    
6883     * Thuban/UI/legend.py: Explicit imports.
6884    
6885     * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
6886     a Table menu and associated method calls.
6887     (MainWindow.choose_color): Removed. No longer needed.
6888    
6889     * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
6890     should be disabled if no projection is selected in the available
6891     list.
6892    
6893     * Thuban/UI/renderer.py: Explicit imports.
6894    
6895     * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
6896     with correctly selecting the rows and issuing the right events.
6897     Be sure to call Skip() to allow the grid to do some of its own
6898     handling which allows the rows to actually be selected.
6899     (LayerTableGrid.select_shapes): Rename from select_shape. Supports
6900     selecting multiple shapes.
6901     (LayerTableFrame): Support for building Queries.
6902     (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
6903    
6904     * Thuban/UI/tree.py: Explicit imports.
6905    
6906     * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
6907     table view can call it.
6908    
6909     * test/test_classification.py: Explicit imports.
6910     (TestClassification.test_ClassGroupRange): Fix test for new
6911     Range class.
6912    
6913     * Doc/thuban.dtd: Add range parameter for clrange.
6914    
6915     * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
6916     object in ClassGroupRange, and also uesd for inputting ranges in
6917     the classifer table and elsewhere.
6918    
6919     * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
6920     yet.
6921    
6922 frank 872 2003-05-09 Frank Koormann <[email protected]>
6923    
6924     * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
6925    
6926 frank 860 2003-05-08 Frank Koormann <[email protected]>
6927    
6928 frank 870 Coding style updates
6929    
6930     * test/test_scalebar.py: Replaced tab indentation by spaces.
6931    
6932     * Thuban/UI/scalebar.py: Explicit imports.
6933    
6934     2003-05-08 Frank Koormann <[email protected]>
6935    
6936 frank 867 * Thuban/UI/scalebar.py
6937     (ScaleBar.DrawScalebar): Format string bug fixed.
6938    
6939     2003-05-08 Frank Koormann <[email protected]>
6940    
6941 frank 865 Reorganization of scalebar component (no wx in Thuban/Model)
6942    
6943     * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
6944     (deriveInterval):
6945     Calculate scalebar interval and unit which fits in width for scale.
6946     (roundInterval): Round float.
6947    
6948     * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
6949    
6950     * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
6951    
6952     * Thuban/UI/legend.py: Import Thuban.UI.scalebar
6953    
6954     2003-05-08 Frank Koormann <[email protected]>
6955    
6956 frank 860 * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
6957     Initialize ScaleBar with canvas.map
6958    
6959     * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
6960     round intervals to display smarter lengths
6961     (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
6962     layer. If the maps has no projection applied grey the scalebar.
6963    
6964 frank 857 2003-05-07 Frank Koormann <[email protected]>
6965    
6966     Basic Scalebar features added.
6967    
6968     * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
6969    
6970     * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
6971     (ScaleBarBitmap): New, links the scalebar bitmap with view messages
6972     and the renderer.
6973    
6974     * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
6975    
6976     * Thuban/UI/messages.py: SCALE_CHANGED added.
6977    
6978 bh 850 2003-05-07 Bernhard Herzog <[email protected]>
6979    
6980 bh 852 * Thuban/Model/session.py (Session.__init__): New instance
6981     variable shapestores to hold a list of all open shapestore objects
6982     (Session.ShapeStores): New. Accessor method for the shapestores
6983     list.
6984     (Session._add_shapestore, Session._clean_weak_store_refs): New.
6985     Internal methods to maintain the shapestores list.
6986     (Session.Tables): New. Return all tables open in the session.
6987     (Session.OpenShapefile): Insert the new ShapeStore into the
6988     shapestores list.
6989    
6990     * test/test_session.py (TestSessionSimple.test_initial_state): Add
6991     tests for ShapeStores and Tables
6992     (TestSessionWithContent.test_shape_stores)
6993     (TestSessionWithContent.test_tables): New. Test cases for
6994     ShapeStores and Tables
6995    
6996     2003-05-07 Bernhard Herzog <[email protected]>
6997    
6998 bh 850 * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
6999     Add comments about the optimizations used.
7000     (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
7001     Implement the ReadValue table interface method.
7002    
7003     * test/test_transientdb.py
7004     (TestTransientTable.run_iceland_political_tests)
7005     (TestTransientTable.test_transient_joined_table): Add tests for
7006     ReadValue
7007    
7008 frank 848 2003-05-07 Frank Koormann <[email protected]>
7009    
7010     * Resources/Bitmaps/fulllayerextent.xpm,
7011     Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
7012     new icons.
7013    
7014 bh 840 2003-05-06 Bernhard Herzog <[email protected]>
7015    
7016 bh 846 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
7017     New. Simply delegate to the transient table's version.
7018    
7019     * test/test_transientdb.py
7020     (TestTransientTable.test_auto_transient_table_query): New. Test
7021     case for AutoTransientTable's SimpleQuery
7022    
7023     2003-05-06 Bernhard Herzog <[email protected]>
7024    
7025 bh 843 * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
7026     Implement a simple query method for the query dialog
7027     (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
7028     the row index or shapeid.
7029     (TransientTable.create): Insert the right value of the row index
7030     (TransientJoinedTable.create): Copy the row index of the left
7031     table to the joined result table
7032    
7033     * test/test_transientdb.py
7034     (TestTransientTable.test_transient_table_read_twice): Fix
7035     doc-string
7036     (TestTransientTable.test_transient_table_query): New. Test for the
7037     SimpleQuery method
7038    
7039     2003-05-06 Bernhard Herzog <[email protected]>
7040    
7041 bh 840 Convert all table users to use the new table interface. This only
7042     covers Thuban itself, not GREAT-ER or other applications built on
7043     Thuban yet, so the compatibility interface stays in place for the
7044     time being but it now issues DeprecationWarnings.
7045    
7046     Finally, the new Table interface has a new method, HasColumn.
7047    
7048     * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
7049     issue deprecation warnings when they're. The warnings refer to the
7050     caller of the method.
7051     (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
7052     for the deprecation warnings
7053    
7054     * test/test_table.py: Ignore the deprecation warnings for the old
7055     table in the tests in this module. The purpose of the tests is to
7056     test the old interface, after all.
7057    
7058     * test/test_transientdb.py
7059     (TestTransientTable.run_iceland_political_tests): Use the
7060     constants for the types. Add a test for HasColumn
7061     (TestTransientTable.test_transient_joined_table): Adapt to new
7062     table interface. Add a test for HasColumn
7063     (TestTransientTable.test_transient_table_read_twice): Adapt to new
7064     table interface
7065    
7066     * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
7067     Adapt to new table interface
7068    
7069     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
7070     new table interface
7071    
7072     * Thuban/UI/controls.py (RecordListCtrl.fill_list)
7073     (RecordTable.SetTable): Adapt to new table interface
7074    
7075     * Thuban/UI/classifier.py (Classifier.__init__)
7076     (Classifier.__init__): Adapt to new table interface
7077    
7078     * Thuban/UI/classgen.py (ClassGenDialog.__init__)
7079     (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
7080     to new table interface
7081    
7082     * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
7083     (AutoTransientTable.HasColumn): Implement the new table interface
7084     method
7085     (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
7086     (AutoTransientTable.UniqueValues): Adapt to new table interface
7087    
7088     * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
7089     Adapt to new table interface
7090    
7091     * test/test_layer.py (TestLayer.open_shapefile): Helper method to
7092     simplify opening shapefiles a bit easier.
7093     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
7094     (TestLayer.test_point_layer): Use the new helper method
7095     (TestLayer.test_get_field_type): New. Test for the GetFieldType
7096     method
7097    
7098     * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
7099     the new table method
7100    
7101     * test/test_memory_table.py (TestMemoryTable.test_has_column):
7102     Test for the new table method HasColumn
7103    
7104 jonathan 833 2003-05-06 Jonathan Coles <[email protected]>
7105    
7106     Addresses the "Selection Extent" wish of RTbug #1787.
7107    
7108     * Resources/Bitmaps/fulllayerextent.xpm,
7109     Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
7110     extent. These are just place holders for the real bitmaps.
7111    
7112     * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
7113     calculate the bounding box once (the first time compute_bbox() is
7114     called).
7115     (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
7116     the bounding box for the shapes in lat/long coordinates.
7117    
7118     * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
7119     option.
7120     (MainWindow.has_selected_shapes): New. Returns true if there are
7121     any selected shapes.
7122     (MainWindow.FullSelectionExtent): New. Calls
7123     MapCanvas.FitSelectedToWindow() when the user selects the menu option.
7124     (_has_selected_shapes): New. Returns true if there are any
7125     selected shapes.
7126    
7127     * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
7128     true if there are any selected shapes.
7129    
7130     * Thuban/UI/view.py (MapCanvas): Added delegated method
7131     HasSelectedShapes.
7132     (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
7133     shapes on the canvas using the map projection (if any).
7134    
7135     * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
7136     for Layer.ShapesBoundingBox().
7137    
7138 bh 826 2003-05-06 Bernhard Herzog <[email protected]>
7139    
7140     * Resources/Projections/defaults.proj: Fix spelling of Mercator
7141    
7142 jonathan 823 2003-05-05 Jonathan Coles <[email protected]>
7143    
7144     Addresses the "Full Layer Extent" wish of RTbug #1787.
7145    
7146     * Resources/Projections/defaults.proj: Added UK National Grid.
7147    
7148     * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
7149     (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
7150     when the user selects the menu option.
7151    
7152     * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
7153     scales the given layer on the canvas using the map projection.
7154    
7155 bh 819 2003-05-05 Bernhard Herzog <[email protected]>
7156    
7157     Convert the table implementations to a new table interface. All
7158     tables use a common mixin class to provide backwards compatibility
7159     until all table users have been updated.
7160    
7161     * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
7162     provide backwards compatibility for table classes implementing the
7163     new interface
7164     (DBFTable, MemoryTable): Implement the new table interface. Use
7165     OldTableInterfaceMixin as base for compatibility
7166     (DBFColumn, MemoryColumn): New. Column description for DBFTable
7167     and MemoryTable resp.
7168    
7169     * test/test_dbf_table.py: New. Test cases for the DBFTable with
7170     the new table interface.
7171    
7172     * test/test_memory_table.py: New. Test cases for the MemoryTable
7173     with the new table interface.
7174    
7175     * test/test_table.py: Document the all tests in this file as only
7176     for backwards compatibility. The equivalent tests for the new
7177     interface are in test_memory_table.py and test_dbf_table.py
7178     (MemoryTableTest.test_read): field_info should be returning tuples
7179     with four items
7180     (MemoryTableTest.test_write): Make doc-string a more precise.
7181    
7182     * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
7183     table interface. Derive from from OldTableInterfaceMixin for
7184     compatibility.
7185     (TransientTableBase.create): New intance variable column_map to
7186     map from names and indices to column objects
7187     (TransientTable.create): Use the new table interface of the input
7188     table
7189     (AutoTransientTable): Convert to new table interface. Derive from
7190     from OldTableInterfaceMixin for compatibility.
7191     (AutoTransientTable.write_record): Removed. It's not implemented
7192     yet and we still have to decide how to handle writing with the new
7193     table and data framework.
7194    
7195     * test/test_transientdb.py
7196     (TestTransientTable.run_iceland_political_tests)
7197     (TestTransientTable.test_transient_joined_table): Use the new
7198     table interface
7199    
7200 jonathan 817 2003-05-05 Jonathan Coles <[email protected]>
7201    
7202     This is namely a collection of UI updates to improve user interactivity.
7203     Tabbing between controls now exists and you can use ESC to close dialog
7204     boxes; ENTER will active the default button.
7205    
7206     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
7207     order that the controls are created so that tabbing works correctly.
7208     (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
7209     wxDialog can handle the default button correctly.
7210     (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
7211     same reasons as for OnOK.
7212     (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
7213     when we ask the table for the maximum/minimum values of a field
7214     which could take a very long time.
7215    
7216     * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
7217     order that the controls are created so that tabbing works correctly.
7218     (SelectPropertiesDialog.__init__): Rearrange the order that the
7219     controls are created so that tabbing works correctly.
7220    
7221     * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
7222     to derive from a wxDialog but behave like the original implementation
7223     which was derived from a wxFrame. wxDialog provides useful key
7224     handling functionality like ESC calling OnCancel and ENTER calling
7225     OnOK which is lost with wxFrame.
7226    
7227     * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
7228     new dialogs.
7229    
7230     * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
7231     order that the controls are created so that tabbing works correctly.
7232     (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
7233     (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
7234     (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
7235     (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
7236     can provide the "UK National Grid" as a default projection.
7237     (UTMPanel.__init__): Rearrange the order that the controls are
7238     created so that tabbing works correctly.
7239    
7240 bh 809 2003-05-05 Bernhard Herzog <[email protected]>
7241    
7242 bh 811 * extensions/thuban/wxproj.cpp: Fix some of the comments.
7243     (project_point): If a map projection but no layer projection is
7244     given, convert degrees to radians before applying the map
7245     projection.
7246    
7247 bh 809 * Thuban/UI/tableview.py (TableGrid.disallow_messages)
7248     (TableGrid.allow_messages): New methods to make it possible to
7249     inhibit message sending.
7250     (TableGrid.issue): Only send the message if not inhibited.
7251     (LayerTableGrid.select_shape): Use the new methods to make sure
7252     that no ROW_SELECTED message is sent while we're updating the
7253     selected rows to match the selected shapes.
7254    
7255 jan 807 2003-05-02 Jan-Oliver Wagner <[email protected]>
7256    
7257     Implementation of MemoryTable.
7258    
7259     * Thuban/Model/table.py (MemoryTable): New. Quite simple table
7260     implementation that operates on a list of tuples. All of the data
7261     are kept in the memory.
7262    
7263     * test/test_table.py (MemoryTableTest): New.
7264    
7265     * test/test_transientdb.py (SimpleTable): Removed.
7266     (TestTransientTable.test_transient_joined_table,
7267     (TestTransientTable.test_transient_table_read_twice): Replaced
7268     SimpleTable by MemoryTable.
7269    
7270 jonathan 793 2003-04-30 Jonathan Coles <[email protected]>
7271    
7272 jonathan 803 * Data/iceland_sample.thuban: Now contains correct projections
7273     for each of the layers.
7274    
7275     * Resources/Projections/defaults.proj: Geographic projection
7276     contains unit conversion parameter.
7277    
7278     2003-04-30 Jonathan Coles <[email protected]>
7279    
7280 jonathan 793 The most important part of this putback is the projection changes.
7281     It should now be possible to specify the projection that a layer
7282     is in and then specify a different projection for the map. The
7283     projection dialog has an extra parameter for a geographic projection
7284     which lets the user select if the input is in degrees or radians.
7285    
7286     * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
7287     to say that the parameter is a tuple of unprojected
7288     points (which is what the callers to this method were assuming).
7289     Also, since the points are unprojected we need to projected them.
7290    
7291     * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
7292     LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
7293     groups are selected, move the layer up/down. Fixes RTbug #1833.
7294    
7295     * Thuban/UI/mainwindow.py: Move menu item map_rename up.
7296    
7297     * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
7298     parameter in call to SetClientData.
7299     (GeoPanel): Add support for selecting the units that the
7300     source data is in (Radians or Degrees).
7301    
7302     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
7303     the rendering loop by reducing the number of if's, removing the
7304     unnecessary try/except block, and checking if the old group
7305     is the same as the new one (which happens a lot if there is
7306     no classification, or lots of shapes are in the same group).
7307    
7308     * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
7309     around the redraw routine to try to catch problems that the user
7310     may create by selecting invalid projections for the data set and
7311     map. Clears the display if there are any problems and prints the
7312     error.
7313     (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
7314     rectangle.
7315    
7316     * extensions/thuban/wxproj.cpp (project_point): First invert the
7317     supplied point (which should be in projected coordinates) using
7318     the layer's projection and then project the point using the
7319     map's projection.
7320     (project_points): Use project_point() to project each point.
7321    
7322 jan 792 2003-04-30 Jan-Oliver Wagner <[email protected]>
7323    
7324     * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
7325     don't set the Classification to None if the classfication field
7326     is None (ie only a DEFAULT).
7327    
7328 bh 786 2003-04-30 Bernhard Herzog <[email protected]>
7329    
7330 bh 790 * Thuban/UI/view.py: Fix some typos.
7331    
7332 bh 788 * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
7333     not pop up the dialog if the selection becomes empty (this could
7334     happen if e.g. a new selection is opened while the identify tool
7335     is active and dialog had been closed)
7336    
7337     2003-04-30 Bernhard Herzog <[email protected]>
7338    
7339 bh 786 * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
7340     instance variable read_record_last_result
7341     (TransientTableBase.read_record): Make sure reading the same
7342     record twice works. The implementation uses the new instance
7343     variable read_record_last_result
7344    
7345     * test/test_transientdb.py
7346     (TestTransientTable.test_transient_table_read_twice): New test
7347     case for the above bug-fix.
7348    
7349 jonathan 793 2003-04-29 Jonathan Coles <[email protected]>
7350    
7351     * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
7352    
7353     * Thuban/UI/classgen.py: Remove all uses of Str2Num.
7354    
7355     * Thuban/UI/classifier.py: Remove all uses of Str2Num.
7356     (ClassTable.SetValueAsCustom): Rename keyword argument in
7357     ClassGroup* constructors to match argument name.
7358    
7359 bh 779 2003-04-29 Bernhard Herzog <[email protected]>
7360    
7361     * Thuban/Model/session.py (Session.Destroy): Explicitly close the
7362     transient DB if it exists to make sure it doesn't leave a journal
7363     file in the temp directory.
7364    
7365     * Thuban/Model/transientdb.py (TransientDatabase.close): Set
7366     self.conn to None after closing the connection to make sure it's
7367     not closed twice
7368    
7369 jonathan 767 2003-04-29 Jonathan Coles <[email protected]>
7370    
7371 jonathan 769 Add a visible parameter in the layer XML tag. The default value is
7372     "true". If anything other than "false" is specified we also assume
7373 jonathan 776 "true". Addresses RTbug #1025.
7374 jonathan 769
7375     * Doc/thuban.dtd: Add visible parameter to a layer.
7376    
7377     * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
7378     of visible from 1 to True.
7379     (Layer.__init__): Change default value of visible from 1 to True.
7380    
7381     * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
7382     parameter.
7383    
7384     * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
7385     parameter.
7386    
7387     * test/test_load.py: Add new test data contents_test_visible.
7388     (LoadSessionTest.setUp): save test data.
7389     (LoadSessionTest.testLayerVisibility): Test if the visible flag
7390     is loaded correctly.
7391    
7392     * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
7393     for saving an invisible layer.
7394    
7395     2003-04-29 Jonathan Coles <[email protected]>
7396    
7397 jonathan 767 * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
7398     legend dialog box and tell it to change its map to the one
7399     supplied to SetMap(). Fixes RTbug #1770.
7400    
7401 bh 764 2003-04-29 Bernhard Herzog <[email protected]>
7402    
7403 bh 766 Next step of table implementation. Introduce a transient database
7404     using SQLite that some of the data is copied to on demand. This
7405     allows us to do joins and other operations that require an index
7406     for good performance with reasonable efficiency. Thuban now needs
7407     SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
7408     haven't tested that.
7409    
7410     * Thuban/Model/transientdb.py: New. Transient database
7411     implementation.
7412    
7413     * test/test_transientdb.py: New. Tests for the transient DB
7414     classes.
7415    
7416     * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
7417     classes to help automatically remove temporary files and
7418     directories.
7419     (Session.__init__): New instance variables temp_dir for the
7420     temporary directory and transient_db for the SQLite database
7421     (Session.temp_directory): New. Create a temporary directory if not
7422     yet done and return its name. Use AutoRemoveDir to have it
7423     automatically deleted
7424     (Session.TransientDB): Instantiate the transient database if not
7425     done yet and return it.
7426    
7427     * Thuban/Model/data.py (ShapefileStore.__init__): Use an
7428     AutoTransientTable so that data is copied to the transient DB on
7429     demand.
7430     (SimpleStore): New class that simply combines a table and a
7431     shapefile
7432    
7433     * Thuban/Model/table.py (Table, DBFTable): Rename Table into
7434     DBFTable and update its doc-string to reflect the fact that this
7435     is only the table interface to a DBF file. Table is now an alias
7436     for DBFTable for temporary backwards compatibility.
7437    
7438     * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
7439     the last reference to the session goes away so that the temporary
7440     files are removed properly.
7441    
7442     * test/test_load.py (LoadSessionTest.tearDown): Remove the
7443     reference to the session to make sure the temporary files are
7444     removed.
7445    
7446     2003-04-29 Bernhard Herzog <[email protected]>
7447    
7448 bh 764 * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
7449     the __parser instance variable into a normal local variable in
7450     read. It's only used there and read will never be called more than
7451     once. Plus it introduces a reference cycle that keeps can keep the
7452     session object alive for a long time.
7453    
7454 jonathan 767 2003-04-29 Jonathan Coles <[email protected]>
7455 jonathan 735
7456 jonathan 762 * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
7457     Projection an immutable item. Fixes RTbug #1825.
7458     (Projection.__init__): Initialize instance variables here.
7459     (ProjFile.Replace): New. Replace the given projection object with
7460     the new projection object. This solves the problem of needing the
7461     mutator Projection.SetProjection() in the ProjFrame class and
7462     allows a projection to change parameters without changing its
7463     location in the file.
7464    
7465     * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
7466     be of type wxSAVE and should verify overwriting a file.
7467    
7468     * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
7469     ProjFile.Replace() method instead of the mutator
7470     Projection.SetProjection(). Also requires that we reassign the
7471     client data to the new projection.
7472    
7473     * test/test_proj.py (TestProjection.test): Test GetName() and
7474     GetAllParameters()
7475     (TestProjFile.test): Remove tests for Set*() methods. Add tests
7476     for Replace().
7477    
7478     2003-04-25 Jonathan Coles <[email protected]>
7479    
7480 jonathan 756 * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
7481     to save the name of the projection.
7482    
7483     * test/test_save.py (SaveSessionTest.testLayerProjection): New
7484     test to verify layer projections are saved correctly.
7485    
7486     2003-04-25 Jonathan Coles <[email protected]>
7487    
7488 jonathan 753 * Thuban/Model/proj.py (Projection.SetName): Set the name
7489     to "Unknown" if name is None.
7490     (Projection.SetAllParameters): New. Set the projection's
7491     parameter list to the one supplied.
7492     (Projection.SetProjection): New. Set the projection's
7493     properties to those of the supplied Projection.
7494    
7495     * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
7496     the dialog title to include the map's title.
7497     (MainWindow.LayerProjection): Set the dialog title to include
7498     the layer's title.
7499    
7500     * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
7501     error dialogs into a single method call.
7502     (ProjFrame.__VerifyButtons): Add more states to check.
7503     (ProjFrame.__GetProjection): Return the current state of an
7504     edited projection or None.
7505     (ProjFrame.__FillAvailList): Remove checks for states that
7506     shouldn't exist.
7507     (ProjFrame._OnNew): Clear all selected items and supply
7508     a projection panel if necessary.
7509    
7510     * test/test_proj.py (TestProjFile.test): Add tests for
7511     ProjFile.SetAllParameters, ProjFile.SetProjection,
7512     ProjFile.SetName.
7513    
7514     2003-04-25 Jonathan Coles <[email protected]>
7515    
7516 jonathan 748 * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
7517     takes an optional argument to select the current projection.
7518     This does not guarantee that the item is visible due to
7519     limited wxWindows functionality. Fixes RTBug #1821.
7520    
7521     2003-04-25 Jonathan Coles <[email protected]>
7522    
7523 jonathan 743 * Thuban/Model/load.py (SessionLoader.start_projection): Remember
7524     the projection name and use it when constructing the Projection
7525     object.
7526    
7527     * Thuban/Model/proj.py (Projection.__init__): Change the default
7528     value for 'name' to None and then test if name is equal to None
7529     in the body of the constructor. This way the caller doesn't have to
7530     know what the default value should be. Namely, useful in load.py
7531     where we have to pick a default value if the 'name' parameter
7532     doesn't exist in the XML file.
7533    
7534     * test/test_load.py (LoadSessionTest.testLayerProjection): New.
7535     Tests a file where a layer has a projection.
7536    
7537     2003-04-25 Jonathan Coles <[email protected]>
7538    
7539 jonathan 735 * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
7540     tree for projection information.
7541    
7542     * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
7543     XMLReader.GetFileName.
7544     (SessionLoader): Added support for loading projection tags that
7545     appear inside a layer.
7546    
7547     * Thuban/Model/proj.py (ProjFile): Document the class. Move
7548     back to using a list because the order of the projections in
7549     the file is important to maintain. Fixes RTbug #1817.
7550    
7551     * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
7552     to ProjFile.GetFilename.
7553    
7554     * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
7555     information.
7556    
7557     * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
7558     ProjFrame._OnSaveAs. Removed old dead code from previous
7559     implementation.
7560     (ProjFrame._OnExport): Add support for exporting more than one
7561     projection to a single file.
7562     (ProjFrame.__FillAvailList): use string formatting (% operator)
7563     to build strings that are (partly) translated. Fixes RTbug #1818.
7564    
7565     * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
7566     class.
7567    
7568 bh 734 2003-04-24 Bernhard Herzog <[email protected]>
7569    
7570     * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
7571    
7572     * po/fr.po: New. French translation by Daniel Calvelo Aros
7573    
7574     * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
7575     empty strings.
7576    
7577 jonathan 735 2003-04-24 Jonathan Coles <[email protected]>
7578 jonathan 724
7579     * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
7580     implement the interface that the ProjFrame dialog expects.
7581    
7582     * Thuban/Model/proj.py (Projection.SetName): New. Allows the
7583     name of the projection to be changed.
7584     (ProjFile): Use a dictionary instead of a list so that removing
7585     projections is easier and we are sure about uniqueness.
7586     (ProjFile.Remove): Remove the given projection object.
7587    
7588     * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
7589     Return a list with only one projection file instead of searching for
7590     any projection file. This simplifies many things if the user can
7591     only have one system file and one user file.
7592    
7593     * Thuban/UI/classgen.py: Change all references to
7594     genCombo to genChoice.
7595    
7596     * Thuban/UI/mainwindow.py: Add a Projection option under the
7597     layer menu.
7598     (MainWindow.LayerProjection): New. Open up a projection window
7599     for a layer.
7600    
7601     * Thuban/UI/projdialog.py: Large changes to how the dialog is
7602     laid out. Use three panels instead of one. One for the list of
7603     projections, one for the edit controls, and one for the buttons.
7604     Fixed resizing problems so that the dialog resizes correctly
7605     when the projection panel changes. Added import/export, save, and
7606     new buttons/functionality.
7607    
7608 bh 723 2003-04-24 Bernhard Herzog <[email protected]>
7609    
7610     First step towards table management. Introduce a simple data
7611     abstraction so that we replace the data a layer uses more easily
7612     in the next step.
7613    
7614     * Thuban/Model/data.py: New file with a simple data abstraction
7615     that bundles shapefile and dbffile into one object.
7616    
7617     * Thuban/Model/session.py (Session.OpenShapefile): New method to
7618     open shapefiles and return a shape store object
7619    
7620     * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
7621     object instead of a shapefile filename. This introduces a new
7622     instance variable store holding the datastore. For intermediate
7623     backwards compatibility keep the old instance variables.
7624     (open_shapefile): Removed. No longer needed with the shape store.
7625     (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
7626     get the shape store used by a layer.
7627     (Layer.Destroy): No need to explicitly destroy the shapefile or
7628     table anymore.
7629    
7630     * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
7631     (MainWindow.AddLayer): Use the session's OpenShapefile method to
7632     open shapefiles
7633    
7634     * Thuban/Model/load.py (ProcessSession.start_layer): Use the
7635     session's OpenShapefile method to open shapefiles
7636    
7637     * test/test_classification.py
7638     (TestClassification.test_classification): Use the session's
7639     OpenShapefile method to open shapefiles and build the filename in
7640     a more platform independed way
7641    
7642     * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
7643     Implement to have a session to use in the tests
7644     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
7645     (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
7646     session's OpenShapefile method to open shapefiles
7647     (TestLayerLegend.setUp): Instantiate a session so that we can use
7648     it to open shapefiles.
7649     (TestLayerLegend.tearDown): Make sure that all references to
7650     layers and session are removed otherwise we may get a resource
7651     leak
7652    
7653     * test/test_map.py (TestMapAddLayer.test_add_layer)
7654     (TestMapWithContents.setUp): Instantiate a session so that we can
7655     use it to open shapefiles.
7656     (TestMapWithContents.tearDown): Make sure that all references to
7657     layers, maps and sessions are removed otherwise we may get a
7658     resource leak
7659     ("__main__"): use support.run_tests() so that more info about
7660     uncollected garbage is printed
7661    
7662     * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
7663     session's OpenShapefile method to open shapefiles
7664     ("__main__"): use support.run_tests() so that more info about
7665     uncollected garbage is printed
7666    
7667     * test/test_selection.py (TestSelection.tearDown): Make sure that
7668     all references to the session and the selection are removed
7669     otherwise we may get a resource leak
7670     (TestSelection.get_layer): Instantiate a session so that we can
7671     use it to open shapefiles.
7672     ("__main__"): use support.run_tests() so that more info about
7673     uncollected garbage is printed
7674    
7675     * test/test_session.py (TestSessionBase.tearDown)
7676     (TestSessionWithContent.tearDown): Make sure that all references
7677     to the session and layers are removed otherwise we may get a
7678     resource leak
7679     (TestSessionWithContent.setUp): Use the session's OpenShapefile
7680     method to open shapefiles
7681    
7682 jonathan 721 2003-04-24 Jonathan Coles <[email protected]>
7683    
7684     * Thuban/Model/load.py (XMLReader.read): Should have been checking
7685     if the file_or_filename object had the 'read' attribute.
7686    
7687 jonathan 715 2003-04-23 Jonathan Coles <[email protected]>
7688    
7689 jonathan 720 * Thuban/Model/resource.py: Fixes RTbug #1813.
7690     (ReadProjFile): Add documentation about which exceptions are raised.
7691     Always pass the exceptions up to the caller.
7692     (GetProjFiles): If the directory can't be read return an empty list.
7693     If any of the proj files can't be read skip that file and go
7694     on to the next one.
7695    
7696     * test/test_proj.py: Added test cases to handle nonexistent files,
7697     unreadable files, and files that don't parse correctly.
7698    
7699     2003-04-23 Jonathan Coles <[email protected]>
7700    
7701 jonathan 716 Projection dialog. Allows the user to select from a list
7702     of projection templates and optionally edit them and save new ones.
7703    
7704     * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
7705     (ProjPanel): Base class for projection specific panels.
7706     (TMPanel): Projection panel for Transverse Mercartor.
7707     (UTMPanel): Projection panel for Universal Transverse Mercartor.
7708     (LCCPanel): Projection panel for Lambert Conic Conformal.
7709     (GeoPanel): Projetion panel for Geographic Projection.
7710    
7711     2003-04-23 Jonathan Coles <[email protected]>
7712    
7713 jonathan 715 * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
7714     promote symmetry. There now exists XMLReader and XMLWriter.
7715     (XMLReader.read): New. Call to read the given file descriptor or
7716     filename.
7717     (XMLReader.close): New. Make sure the file is closed.
7718     (XMLReader.GetFileName): New. Return just the file name that is being
7719     read from.
7720     (XMLReader.GetDirectory): New. Return just the directory of the file
7721     that is being read.
7722     (XMLReader.AddDispatchers): New. Take a dictionary which contains
7723     the names of functions to call as the XML tree is parsed.
7724     (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
7725     (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
7726     (SessionLoader): Removed class variables start_dispatcher and
7727     end_dispatcher since this functionality is now part of a class
7728     instance. Fixes RTbug #1808.
7729     (SessionLoader.__init__): Add dispatcher functions.
7730     (load_xmlfile): Code was moved into the XMLReader.read().
7731     (load_session): Use modified SessionLoader.
7732    
7733     * Thuban/Model/map.py (Map.GetProjection): New. Returns the
7734     map's projection.
7735    
7736     * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
7737     GetAllParameters.
7738     (Projection.GetParameter): Returns the value for the given parameter.
7739    
7740     * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
7741     (GetProjFiles): Renamed from GetProjections. Now returns a list
7742     of ProjFile objects.
7743     (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
7744     a list of ProjFile objects whose files are not user defined.
7745     (GetUserProjFiles): Renamed from GetUserProjections. Returns a
7746     list of ProjFile objects whose files are user defined.
7747     (ProjFileReader): Extend new XMLReader.
7748    
7749     * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
7750     promote symmetry.
7751    
7752     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
7753     control instead of a wxComboBox. wxChoice controls do not generate
7754     events as the uses highlights possible choices which fixes problems
7755     with resizing the dialog when the use selects an option.
7756    
7757     * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
7758     control instead of a wxComboBox.
7759    
7760     * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
7761     dialog.
7762    
7763     * test/test_proj.py (TestProjection.test): New tests for GetParameter
7764     method.
7765    
7766 bh 703 2003-04-22 Bernhard Herzog <[email protected]>
7767    
7768 bh 705 * Thuban/UI/mainwindow.py: Remove some unused imports and global
7769     constants
7770    
7771 bh 703 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
7772     (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
7773    
7774 bh 700 2003-04-17 Bernhard Herzog <[email protected]>
7775    
7776 bh 701 * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
7777     (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
7778     anymore.
7779     (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
7780     (Layer.ShapeType, Layer.Shape): No need to call
7781     self.open_shapefile since it's always called in __init__
7782    
7783 bh 700 * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
7784     In wxPython 2.4 there's no need to extend MainLoop anymore since
7785     wxPython itself makes sure OnExit is called.
7786    
7787 jonathan 688 2003-04-16 Jonathan Coles <[email protected]>
7788    
7789 jonathan 693 Initial putback of projection management code. Includes new
7790     classes to read and write projection files. The current load
7791     and save classes were abstracted a bit so they could be reused.
7792     The Projection class was extended to provide new methods and
7793     have a name.
7794    
7795     * Thuban/Model/load.py (XMLProcessor): New. Contains all the
7796     general XML reading methods that were part of ProcessSession.
7797    
7798     * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
7799     name.
7800     (ProjFile): New. Represents a file that contains projection
7801     information.
7802    
7803     * Thuban/Model/resource.py: New. Contains general utilities
7804     for read and writing projection files.
7805    
7806     * Thuban/Model/save.py (XMLSaver): New. Contains all the
7807     general XML writing methods that were part of SessionSaver.
7808     (SessionSaver): Renamed from Saver.
7809    
7810     * test/test_proj.py: New test cases for the projection
7811     file read and write functions.
7812    
7813     2003-04-16 Jonathan Coles <[email protected]>
7814    
7815 jonathan 688 * Thuban/Model/classification.py: Use repr() around values
7816     in the ClassGroup*.__repr__() methods so it is clearer when
7817     a value is a string and when it is a number.
7818    
7819     * test/test_load.py: Rework the classification test to test
7820     that we can load old files.
7821     (testLabels): Test a file where the groups have labels.
7822    
7823 bh 687 2003-04-16 Bernhard Herzog <[email protected]>
7824    
7825     Safer implementation of the performance enhancements of the
7826     low-level renderer:
7827    
7828     * extensions/thuban/wxproj.cpp (extract_projection)
7829     (extract_pointer): Rename extract_projection to extract_pointer
7830     and redefine its purpose to return the pointer stored in a CObject
7831     returned by the object's cobject method. Update all callers.
7832     (s_draw_info, free_draw_info, draw_polygon_init): Implement the
7833     handling of these low-level parameters so that each s_draw_info
7834     instance is handled as a CObject at python level that also
7835     contains real references to the actual python objects which
7836     contain the values in the struct. Add free_draw_info as the
7837     destructor.
7838     (draw_polygon_shape): Add the py_draw_info parameter which must a
7839     cobject containing an s_draw_info pointer.
7840    
7841     * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
7842     method to instantiat the low-level render parameter
7843     (MapRenderer.draw_shape_layer): Use the new method. Remove some
7844     commented out code.
7845     (MapRenderer.draw_polygon_shape): Make the first parameter not the
7846     layer but the low-level render parameter
7847     (ScreenRenderer.draw_shape_layer): Use the low-level render
7848     parameter.
7849    
7850 jonathan 673 2003-04-15 Jonathan Coles <[email protected]>
7851    
7852 jonathan 680 * Thuban/Model/classification.py: Implemented __repr__ for
7853     the ClassGroup* classes to make debugging a bit easier.
7854     (ClassGroup.SetLabel): Check that the string is an instance
7855     of StringTypes not StringType. Accounts for Unicode strings.
7856    
7857     * Thuban/Model/color.py: Implemented __repr__ to make
7858     debugging a bit easier.
7859    
7860     * Thuban/Model/save.py (Saver.write_classification): Need to
7861     save the group label.
7862    
7863     * test/test_load.py (testClassification): New. Loads the
7864     iceland_sample_test.thuban file and checks if it was loaded
7865     correctly.
7866    
7867     2003-04-15 Jonathan Coles <[email protected]>
7868    
7869 jonathan 673 * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
7870     to improve rendering performance by initializing the variables
7871     that are not change each time draw_polygon_shape() is called.
7872     The values are stored in a global struct draw_info.
7873     (draw_polygon_shape): Removed initialization code that is
7874     now in draw_polygon_init().
7875    
7876     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
7877 jonathan 674 drawing initialization call to draw_polygon_init()
7878     (MapRenderer.draw_polygon_shape): Use new signature of
7879     draw_polygon_shape.
7880 jonathan 673
7881 jonathan 674 * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
7882     weirdness by setting the range to (1, maxint).
7883 jonathan 673
7884 jonathan 674 * Thuban/Model/classification.py (ClassGroupProperties): Make
7885     instance variables private and optimize comparison operator
7886     by first checking if the color references are the same.
7887     (ClassGroupSingleton): Make instance variables private.
7888     (ClassGroupRange): Make instance variables private.
7889 jonathan 673
7890 jonathan 674 * HOWTO-Release: Filled in missing steps for releasing packages.
7891    
7892 bh 672 2003-04-15 Bernhard Herzog <[email protected]>
7893    
7894     First stab at internationalized messages:
7895    
7896     * Thuban/__init__.py (_): Implement the translation function for
7897     real using the python gettext module.
7898    
7899     * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
7900     translate empty strings.
7901    
7902     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
7903     Add a missing space to a warning message
7904    
7905     * po/README: New. Notes about the management of the translation
7906     files.
7907    
7908     * po/Makefile: New. Makefile to help manage the translation files.
7909    
7910     * po/es.po: New. Spanish translation by Daniel Calvelo Aros
7911    
7912     * MANIFEST.in: Include the *.mo files in Resources/Locale and the
7913     translations and support files in po/
7914    
7915     * setup.py (data_files): Add the *.mo files to the data_files too
7916    
7917     * README: Add note about the translations when building from CVS
7918    
7919 jonathan 669 2003-04-14 Jonathan Coles <[email protected]>
7920    
7921     * Thuban/UI/dock.py: Fixes some window resizing problems most
7922     noticable under windows. Always assume the button bitmaps will
7923     be there. Code clean up.
7924     (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
7925     images for the dock/undock button to the same images.
7926     Work around for RTbug #1801.
7927    
7928     * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
7929     be allowed to grow within the sizer. Fixes a bug under Windows
7930     where the toolbar wasn't being drawn.
7931    
7932 frank 664 2003-04-14 Frank Koormann <[email protected]>
7933    
7934     * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
7935     Updated design to try to make the button functionality more
7936     transparent.
7937    
7938 jonathan 662 2003-04-14 Jonathan Coles <[email protected]>
7939    
7940     * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
7941     finalize the intialization of the panel.
7942    
7943     * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
7944     creation of the panel. Should be the last thing called in the
7945     initializer of a subclass.
7946    
7947     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
7948     set the current selections in the combo boxes. This is needed
7949     under Windows.
7950    
7951     * Thuban/UI/classifier.py (Classifier.__init__): Add a top
7952     level panel to the dialog so that the background colors are
7953     consistent under Windows.
7954    
7955 jonathan 646 2003-04-11 Jonathan Coles <[email protected]>
7956    
7957 jonathan 662 * Thuban/UI/classgen.py: Change color ramps to start at white
7958     not black.
7959    
7960     * Thuban/UI/legend.py: Enable/disable the legend buttons when
7961     the legend changes. Fixes RTbug #1793.
7962    
7963     * test/test_classification.py: Added test for copying of
7964     classifications.
7965    
7966     2003-04-11 Jonathan Coles <[email protected]>
7967    
7968 jonathan 647 * Thuban/UI/resource.py: New. Centralize the loading of resources
7969     such as bitmaps.
7970    
7971     * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
7972     added images to the move buttons, added 'reverse' button.
7973     (CustomRampPanel.__init__): Added images to the move buttons.
7974     (GreyRamp): New. Generates a ramp from white to black.
7975     (HotToColdRamp): New. Generates a ramp from cold to hot colors.
7976    
7977     * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
7978     ID_PROPERTY_*.
7979     (Classifier.__init__): Minor changes to the layout.
7980     (Classifier._OnTitleChanged): Listen for when the user edits the
7981     title and update the dialog's title and the layer's title.
7982    
7983     * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
7984    
7985     * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
7986     (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
7987     if the layer's title changes.
7988    
7989     * Thuban/UI/mainwindow.py: Added new menu item and associated code
7990     to open a dialog to rename the map.
7991     (MainWindow): Use new resource class to import bitmaps.
7992    
7993     2003-04-11 Jonathan Coles <[email protected]>
7994    
7995 jonathan 646 * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
7996 jonathan 647 Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
7997     Resources/Bitmaps/group_use_none.xpm,
7998     Resources/Bitmaps/group_use_not.xpm,
7999     Resources/Bitmaps/hide_layer.xpm,
8000     Resources/Bitmaps/layer_properties.xpm,
8001     Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
8002     Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
8003     New.
8004 jonathan 646
8005 jonathan 636 2003-04-10 Jonathan Coles <[email protected]>
8006    
8007 jonathan 644 * Thuban/Model/classification.py: (ClassGroupRange.__init__):
8008     Should pass group to ClassGroup constructor.
8009    
8010     2003-04-10 Jonathan Coles <[email protected]>
8011    
8012 jonathan 636 * Thuban/Model/classification.py: (ClassGroup): Move all the common
8013     methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
8014     here. Implement SetVisible(), IsVisible().
8015     (ClassGroup.__init__): Add group parameter which acts as a copy
8016     constructor.
8017    
8018     * Thuban/UI/classifier.py (ClassTable): Add a new column for the
8019     "Visible" check boxes.
8020     (Classifier): Rename the buttons and refactor the code to match
8021     the new labels.
8022    
8023     * Thuban/UI/legend.py: Classify button is now called "Properties".
8024     Refactored the code to change variable names.
8025     (LegendTree.__FillTreeLayer): Only list a group if it is visible.
8026    
8027     * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
8028     MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
8029     renamed to MainWindow.LayerEditProperties.
8030     (MainWindow.ToggleLegend): Don't include map name in legend title.
8031     (MainWindow.SetMap): Added the map name to the window title.
8032     (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
8033     MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
8034     Functionality is found in the layer properties dialog.
8035    
8036     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
8037     draw visible groups.
8038    
8039 jonathan 626 2003-04-09 Jonathan Coles <[email protected]>
8040    
8041 jonathan 634 * Thuban/UI/classgen.py: Modifications to allow simple
8042     addition and selection of new color schemes.
8043     (MonochromaticRamp): New. Generates a ramp between two colors.
8044     (RedRamp): New. Generates a ramp of all red.
8045     (GreenRamp): New. Generates a ramp of all green.
8046     (BlueRamp): New. Generates a ramp of all blue.
8047    
8048     2003-04-09 Jonathan Coles <[email protected]>
8049    
8050 jonathan 626 * Thuban/Model/classification.py (Classification.__deepcopy__):
8051     Need to copy over field and fieldType attributes.
8052    
8053     * Thuban/Model/table.py (Table.field_range): New. Retrive the
8054     maximum and minimum values over the entire table for a given
8055     field.
8056     (Table.GetUniqueValues): New. Retrieve all the unique values
8057     in the table for a given field.
8058    
8059     * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
8060     (GenUniquePanel): New. Controls to allow the user to select
8061     which unique field values they would like in the classification.
8062     (CustomRampPanel): Code that was in ClassGenDialog that allows
8063     the user to select the properties for a custom ramp.
8064     (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
8065    
8066     * Thuban/UI/classifier.py: Removed a lot of debugging code.
8067     (Classifier._SetClassification): Callback method so that the
8068     class generator can set the classification in the grid.
8069     (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
8070     editing of a group properties class into a wxWindows control.
8071    
8072     * Thuban/UI/dock.py: It was decided that if the user closes
8073     a dockable window the window should simply hide itself. That
8074     way if the user wants to show the dock again it appears in the
8075     same place as it was when it was closed.
8076     (DockableWindow.Destroy): Call renamed method OnDockDestroy().
8077     (DockableWindow._OnButtonClose): Hide the window instead of
8078     destroying it.
8079     (DockableWindow._OnClose): Hide the window instead of
8080     destroying it.
8081    
8082     * Thuban/UI/legend.py (LegendTree): Use a private method to
8083     consistently set the font and style of the text. Fixes RTbug #1786.
8084    
8085     * Thuban/UI/mainwindow.py: Import just the Classifier class.
8086    
8087 bh 623 2003-04-07 Bernhard Herzog <[email protected]>
8088    
8089 bh 625 * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
8090     to the map module
8091    
8092     2003-04-07 Bernhard Herzog <[email protected]>
8093    
8094 bh 623 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
8095     favor of ToggleSessionTree
8096     (MainWindow.ToggleSessionTree): New method to toggle visibility of
8097     the session tree.
8098     (MainWindow.SessionTreeShown): New method to return whether the
8099     session tree is currently shown.
8100     (MainWindow.ToggleLegend): New method to toggle visibility of the
8101     legend
8102     (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
8103     LegendShown
8104     (MainWindow.LegendShown): New method to return whether the legend
8105     is currently shown.
8106     (_method_command): Add checked parameter so we can define check
8107     menu items
8108     (_has_tree_window_shown, _has_legend_shown): Use the appropriate
8109     mainwindow methods.
8110     (show_session_tree, show_legend commands): Removed.
8111     (toggle_session_tree, toggle_legend commands): New commands to
8112     toggle the visibility of the dialogs
8113    
8114 jonathan 612 2003-04-07 Jonathan Coles <[email protected]>
8115    
8116 jonathan 619 * Thuban/UI/classgen.py: Fix Windows problem.
8117    
8118     * Thuban/UI/dock.py: Fix Windows problem.
8119    
8120     * Thuban/UI/mainwindow.py: Use False instead of false.
8121     (MainWindow.ShowLegend): Remove unnecessary switch parameter.
8122    
8123     2003-04-07 Jonathan Coles <[email protected]>
8124    
8125 jonathan 612 Since we now say that the order of the groups in a classification
8126     matters, it makes sense to be able to manipulate that order. Most
8127     of the changes to Thuban/Model/classification.py are to that end.
8128    
8129     * Thuban/Model/classification.py (Classification.AppendGroup,
8130     Classification.InsertGroup, Classification.ReplaceGroup,
8131     Classification.RemoveGroup, Classification.GetGroup): Do as the
8132     names imply.
8133     (Classification.FindGroup): This was called GetGroup, but GetGroup
8134     takes an index, while FindGroup takes a value.
8135     (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
8136     REFERENCE. Currently there is a cyclic reference between the layer
8137     and its classification. If the classification doesn't need to know
8138     its owning layer we can change this, since it may make sense to be
8139     able to use the same classification with different layers.
8140    
8141     * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
8142    
8143     * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
8144     not AddGroup()
8145    
8146     * Thuban/UI/classifier.py: Now that we can depend on the order in
8147     a Classification and have methods to manipulate that order we don't
8148     need to use our own data structures in the grid. We can simply make
8149     the grid/table access the information they need from a copy of
8150     the classification object.
8151     (Classifier._OnCloseBtn): Event handler for when the user clicks
8152     'Close'. This is needed so if the user applies changes and then
8153     continues to change the table the user has the option of discarding
8154     the most recent changes and keeping what they applied.
8155    
8156     * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
8157     into the same group.
8158    
8159     * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
8160     with a really old version of proj, PJ_VERSION won't even be defined.
8161     If it isn't defined then just compile so that the function always
8162     returns Py_False.
8163    
8164     * test/test_classification.py: Fix tests to use the renamed methods.
8165     Still need to write tests for the new methods.
8166    
8167 jonathan 601 2003-04-04 Jonathan Coles <[email protected]>
8168 jonathan 608
8169 jonathan 612 * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
8170     call to SetSelection out of the method and before the call
8171     to __SelectField in __init__. This prevents a recursion of events
8172     when _OnFieldSelect is triggered by the user.
8173    
8174     2003-04-04 Jonathan Coles <[email protected]>
8175    
8176 jonathan 608 * Thuban/Model/classification.py: Rename Color.None to
8177     Color.Transparent.
8178     (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
8179     Don't bother copying the color, since Colors are immutable.
8180    
8181     * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
8182     Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
8183     Thuban/UI/renderer.py, Thuban/UI/view.py:
8184     Rename Color.None to Color.Transparent.
8185    
8186     * test/test_classification.py, test/test_load.py: Rename Color.None
8187     to Color.Transparent.
8188    
8189     2003-04-04 Jonathan Coles <[email protected]>
8190 jonathan 603
8191     * Thuban/Model/classification.py: Fix assert calls.
8192     (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
8193     Copy the color parameter rather than hold onto a reference.
8194 jonathan 601
8195 jonathan 603 * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
8196     the color object.
8197     (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
8198     are sure there exists only one refernce to Color.None in the system.
8199     This allows us to use 'is' rather than the comparision functions.
8200    
8201     * Thuban/Model/save.py: Fix assert calls.
8202    
8203     * Thuban/UI/classifier.py: Fix assert calls.
8204     (ClassGrid._OnCellDClick): Call up to the classifier to open the
8205     dialog to edit the groups properties.
8206     (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
8207     correctly if a cell is resized.
8208     (ClassTable.SetClassification): New. Changes the classification
8209     that is in the table.
8210     (ClassTable.__SetRow): Allow groups to be prepended.
8211     (Classifier): New code for opening the EditProperties and
8212     GenerateRanges dialogs.
8213     (SelectPropertiesDialog.__GetColor): Only set the color in the
8214     color dialog if the current color is not None.
8215    
8216     * Thuban/UI/dock.py: Fix assert calls.
8217    
8218     * Thuban/UI/legend.py: Fix assert calls.
8219    
8220     * Thuban/UI/renderer.py: Fix assert calls.
8221    
8222     * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
8223     classifications.
8224     (GenRangePanel): Panel specific to range generation.
8225     (GenSingletonPanel): Panel specific to singleton generation.
8226     (ClassGenerator): Class responsible for actually generating
8227     the classification from the data gathered in the dialog box.
8228     (PropertyRamp): Generates properties whose values range from
8229     a starting property to an ending property.
8230 jonathan 601
8231 bh 600 2003-04-03 Bernhard Herzog <[email protected]>
8232    
8233     * test/support.py (print_garbage_information): New function that
8234     prints information about still connected messages and memory
8235     leaks.
8236     (run_suite): Removed.
8237     (run_tests): New function for use as a replacement of
8238     unittest.main in the test_* files. This one calls
8239     print_garbage_information at the end.
8240    
8241     * test/runtests.py (main): Use support.print_garbage_information
8242    
8243     * test/test_layer.py: Use support.run_tests instead of
8244     unittest.main so we get memory leak information
8245     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
8246     (TestLayer.test_point_layer, TestLayer.test_empty_layer)
8247     (TestLayerLegend.test_visibility): Call the layer's Destroy method
8248     to fix a memory leak.
8249    
8250     * test/test_classification.py: Use support.run_tests instead of
8251     unittest.main so we get memory leak information
8252     (TestClassification.test_classification): Call the layer's Destroy
8253     method to fix a memory leak.
8254    
8255 bh 591 2003-04-02 Bernhard Herzog <[email protected]>
8256    
8257 bh 595 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
8258     Handle the reference counts of the return value and errors in
8259     PyArg_ParseTuple correctly.
8260    
8261 bh 593 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
8262     sure the filename is absolute to avoid problems when saving the
8263     session again
8264    
8265 bh 591 * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
8266    
8267 jonathan 587 2003-04-01 Jonathan Coles <[email protected]>
8268    
8269 jonathan 589 * Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
8270 jonathan 587 that there actually are points in the returned list of points
8271     before trying to index into the list. The list may be empty if
8272     the shape is a Null Shape.
8273    
8274 bh 586 2003-04-01 Bernhard Herzog <[email protected]>
8275    
8276     * test/test_map.py: Don't use from <module> import *
8277    
8278 jonathan 581 2003-04-01 Jonathan Coles <[email protected]>
8279    
8280     * Thuban/Model/session.py: Use LAYER_CHANGED instead of
8281     LAYER_LEGEND_CHANGED
8282    
8283     * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
8284     self.Destroy() to close the window after yesterday's changes.
8285    
8286     * test/test_map.py, test/test_session.py: Fix messages that
8287     are sent from maps and layers.
8288    
8289 jonathan 575 2003-03-31 Jonathan Coles <[email protected]>
8290    
8291     * Thuban/UI/classifier.py: Commented out some debugging statements.
8292     (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
8293     RTbug #1769.
8294    
8295     * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
8296     position (although position doesn't work yet under GTK).
8297     (DockableWindow.Destroy): New. Called when the window must be
8298     closed. Namely needed when the DockFrame closes and must close
8299     its children.
8300     (DockFrame): Listen for EVT_CLOSE and destroy all children.
8301    
8302     * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
8303     when then window is told to close.
8304     (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
8305     comment in source for more info.
8306    
8307     * Thuban/UI/main.py: Show the legend by default when Thuban starts.
8308    
8309     * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
8310     symmetry with other such methods.
8311     (MainWindow.ShowLegend): Show the legend docked by default.
8312    
8313 jonathan 569 2003-03-28 Jonathan Coles <[email protected]>
8314    
8315     * Thuban/UI/classifier.py: Support for highlighting a specific
8316     group within the grid when the classification dialog is opened.
8317     Also contains a lot of debugging printouts which will later
8318     be removed.
8319    
8320     * Thuban/UI/dock.py: Complete rework on the dock code so that
8321     that it is fairly removed from the rest of the Thuban application.
8322     It is easy to add new docks which the rest of the program having
8323     to be aware of them.
8324    
8325     * Thuban/UI/legend.py: Modifications to support selecting a
8326     specific group in the classification dialog. Changed how layers
8327     are drawn when the layer is visible/invisible.
8328    
8329     * Thuban/UI/mainwindow.py: Removed legend specific code and
8330     replaced it with calls to the new dock code.
8331    
8332     * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
8333     to check if scale > 0. Trying to track down a divide by zero.
8334    
8335 jonathan 557 2003-03-26 Jonathan Coles <[email protected]>
8336    
8337 jonathan 567 * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
8338     (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
8339     now part of DockableWindow.
8340     (LegendPanel.DoOnSelChanged): Select the current layer in the
8341     map.
8342     (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
8343     with the selected layer and/or group.
8344    
8345     2003-03-26 Jonathan Coles <[email protected]>
8346    
8347 jonathan 557 This putback contains the code for dockable windows. There is
8348     no support in wxWindows as of this date for windows that can
8349     attach themselves to other windows.
8350    
8351     The current model contains a DockableWindow which has a parent
8352     window for when it is detached and a dock window that it puts
8353     its contents in when it is docked. The contents of a DockableWindow
8354     must be a DockPanel. DockPanel itself derives from wxPanel.
8355    
8356     * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
8357     message, not a LAYER_LEGEND_CHANGED message.
8358    
8359     * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
8360    
8361     * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
8362     as one of the style properties for the fieldTypeText item to
8363     be sure that its size is correct when the text changes.
8364    
8365     * Thuban/UI/dock.py: New. Classes for the DockPanel and
8366     DockableWindow.
8367    
8368     * Thuban/UI/legend.py: Added some more buttons and made the
8369     LegendPanel a DockPanel.
8370    
8371     * Thuban/UI/mainwindow.py: Added sash windows to the main window
8372     and supporting functions for manipulating the sashes.
8373     (MainWindow.ShowLegend): Create a DockableWindow with the
8374     LegendPanel as the contents.
8375    
8376     * Thuban/UI/messages.py: Added DOCKABLE_* messages
8377    
8378     * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
8379     not LAYER_LEGEND_CHANGED, messages.
8380    
8381 jonathan 554 2003-03-25 Jonathan Coles <[email protected]>
8382    
8383     * setup.py: Added custom script bdist_rpm_build_script so that
8384     when the rpm is built the path to wx-config is correct.
8385    
8386     * setup.cfg: Added line saying to use the custom build script
8387    
8388 jonathan 552 2003-03-20 Jonathan Coles <[email protected]>
8389    
8390     Initial implementation of the Legend.
8391    
8392     * Thuban/UI/legend.py: New. Creates a window that shows the map's
8393     Legend information and allows the user to add/modify classifications
8394     and how the layers are drawn on the map.
8395    
8396     * setup.py: New command 'build_docs' which currently uses
8397     happydoc to generate html documentation for Thuban.
8398    
8399     * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
8400     Returns a string which is appropriately describes the group.
8401    
8402     * Thuban/Model/layer.py (Layer.SetClassification): Generate a
8403     LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
8404    
8405     * Thuban/Model/map.py (Map): Rename messages and use new, more
8406     specific, messages.
8407    
8408     * Thuban/Model/messages.py: New message to indicate that a layer's
8409     data has changed (LAYER_CHANGED). New map messages to indicate
8410     when layers have been added/removed/changed or if the stacking order
8411     of the layers has changed.
8412    
8413     * Thuban/Model/session.py: Rename and use new messages.
8414    
8415     * Thuban/UI/classifier.py: Remember if any changes have actually
8416     been applied so that if the dialog is cancelled without an application
8417     of changes we don't have to set a new classification.
8418     (ClassDataPreviewer): Pulled out the window specific code and put it
8419     ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
8420     symbols on any DC.
8421    
8422     * Thuban/UI/mainwindow.py: New code to open the legend.
8423    
8424     * Thuban/UI/view.py: Use new message names.
8425    
8426 jonathan 541 2003-03-19 Jonathan Coles <[email protected]>
8427    
8428     * Thuban/UI/main.py (verify_versions): New. Checks the versions
8429     of Python, wxPython, and some other libraries.
8430    
8431     * extensions/thuban/wxproj.cpp (check_version): Checks the given
8432     version against what wxproj was compiled with.
8433     (check_version_gtk): If wxproj was compiled with gtk then check
8434     the given version against the version of the gtk library
8435     currently being used.
8436    
8437 bh 538 2003-03-14 Bernhard Herzog <[email protected]>
8438    
8439     * test/test_command.py: Run the tests when the module is run as a
8440     script
8441    
8442     2003-03-14 Bernhard Herzog <[email protected]>
8443    
8444     Implement selection of multiple selected shapes in the same layer:
8445    
8446     - Introduce a new class to hold the selection. This basically
8447     replaces the interactor which was nothing more than the
8448     selection anyway. A major difference is of course that the new
8449     selection class supports multiple selected shapes in one layer
8450    
8451     - Move the object that represents the selection from the
8452     application to the canvas. The canvas is a better place than the
8453     application because the selection represents which shapes and
8454     layer of the map displayed by the canvas are selected and
8455     affects how the map is drawn.
8456    
8457     - Make the selection and its messages publicly available through
8458     the mainwindow.
8459    
8460     - The non-modal dialogs do not get a reference to the interactor
8461     anymore as they can simply refer to their parent, the
8462     mainwindow, for the what the interactor had to offer.
8463    
8464     * Thuban/UI/selection.py: New module with a class to represent the
8465     selection.
8466    
8467     * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
8468     these unused messages
8469    
8470     * Thuban/UI/application.py (ThubanApplication.OnInit)
8471     (ThubanApplication.OnExit, ThubanApplication.SetSession): The
8472     interactor is gone now.
8473     (ThubanApplication.CreateMainWindow): There is no interactor
8474     anymore so we pass None as the interactor argument for now for
8475     compatibility.
8476    
8477     * Thuban/UI/view.py (MapCanvas.delegated_messages)
8478     (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
8479     Unsubscribe, delegate messages according to the delegated_messages
8480     class variable.
8481     (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
8482     attributes from instance variables as described with the
8483     delegated_methods class variable.
8484     (MapCanvas.__init__): New instance variable selection holding the
8485     current selection
8486     (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
8487     pass them on to the renderer
8488     (MapCanvas.SetMap): Clear the selection when a different map is
8489     selected.
8490     (MapCanvas.shape_selected): Simple force a complete redraw. The
8491     selection class now takes care of only issueing SHAPES_SELECTED
8492     messages when the set of selected shapes actually does change.
8493     (MapCanvas.SelectShapeAt): The selection is now managed in
8494     self.selection
8495    
8496     * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
8497     (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
8498     Unsubscribe, delegate messages according to the delegated_messages
8499     class variable.
8500     (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
8501     attributes from instance variables as described with the
8502     delegated_methods class variable.
8503     (MainWindow.__init__): The interactor as ivar is gone. The
8504     parameter is still there for compatibility. The selection messages
8505     now come from the canvas.
8506     (MainWindow.current_layer, MainWindow.has_selected_layer):
8507     Delegate to the the canvas.
8508     (MainWindow.LayerShowTable, MainWindow.Classify)
8509     (MainWindow.identify_view_on_demand): The dialogs don't need the
8510     interactor parameter anymore.
8511    
8512     * Thuban/UI/tableview.py (TableFrame.__init__)
8513     (LayerTableFrame.__init__, LayerTableFrame.OnClose)
8514     (LayerTableFrame.row_selected): The interactor is gone. It's job
8515     from the dialog's point of view is now done by the mainwindow,
8516     i.e. the parent. Subscribe to SHAPES_SELECTED instead
8517     of SELECTED_SHAPE
8518    
8519     * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
8520     is gone. It's job from the dialog's point of view is now done by
8521     the mainwindow, i.e. the parent.
8522    
8523     * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
8524     gone. It's job from the dialog's point of view is now done by the
8525     mainwindow, i.e. the parent.
8526    
8527     * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
8528     gone. It's job from the dialog's point of view is now done by the
8529     mainwindow, i.e. the parent.
8530     (SessionTreeCtrl.__init__): New parameter mainwindow which is
8531     stored as self.mainwindow. The mainwindow is need so that the tree
8532     can still subscribe to the selection messages.
8533     (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
8534     (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
8535     selection is now accessible through the mainwindow. Subscribe to
8536     SHAPES_SELECTED instead of SELECTED_SHAPE
8537    
8538     * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
8539     SHAPES_SELECTED message now.
8540     (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
8541     so deal with multiple shapes
8542     (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
8543     gone. It's job from the dialog's point of view is now done by the
8544     mainwindow, i.e. the parent.
8545    
8546     * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
8547     parameter is now a list of shape ids.
8548     (RecordTable.SetTable): The second parameter is now a list of
8549     indices.
8550    
8551     * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
8552     selected_shape parameter and ivar to selected_shapes. It's now a
8553     list of shape ids.
8554     (MapRenderer.draw_label_layer): Deal with multiple selected
8555     shapes. Rearrange the code a bit so that the setup and shape type
8556     distinctions are only executed once.
8557    
8558     * test/test_selection.py: Test cases for the selection class
8559    
8560 jonathan 527 2003-03-11 Jonathan Coles <[email protected]>
8561    
8562     * Thuban/Model/load.py: Temporary fix so that the xml reader
8563     doesn't cause Thuban to crash.
8564    
8565     * Thuban/Model/layer.py: Handle the cyclic references between
8566     a layer and its classification better, and be sure to disconnect
8567     the classification from the layer when the layer is destroyed
8568     so that we don't maintain a cyclic reference that may not be
8569     garbage collected.
8570    
8571     * Thuban/Model/classification.py: See comment for layer.py.
8572    
8573 jan 523 2003-03-12 Jan-Oliver Wagner <[email protected]>
8574    
8575     * HOWTO-Release: New. Information on the steps for releasing
8576     a new version of Thuban.
8577    
8578 jonathan 514 2003-03-11 Jonathan Coles <[email protected]>
8579    
8580     * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
8581     Use True instead of true.
8582     (Classifier): Should have a single panel in which all the controls lie.
8583    
8584     * Thuban/UI/proj4dialog.py: Add normal border.
8585    
8586     * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
8587    
8588     * Thuban/UI/mainwindow.py: Use True instead of true.
8589    
8590     * setup.py: Update some definitions to use wxWindows2.4 files
8591    
8592     * Data/iceland_sample_class.thuban: Fixed file so that the
8593     field_type information is present.
8594    
8595 jonathan 490 2003-03-10 Jonathan Coles <[email protected]>
8596    
8597 jonathan 505 * Thuban/UI/classifier.py (Classifier.__init__): Make the
8598     field type label grow so that when the text changes the
8599     size is updated correctly. This may be a wxWindows bug.
8600    
8601     2003-03-10 Jonathan Coles <[email protected]>
8602    
8603 jonathan 499 * Thuban/UI/application.py: Changed SESSION_CHANGED to
8604     SESSION_REPLACED.
8605    
8606     * Thuban/UI/classifier.py: Wrap text with _().
8607     (ClassGrid.CreateTable): Set dimensions and size hints here,
8608     instead of in Reset, so we only set the size once.
8609    
8610     * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
8611    
8612     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
8613     Call Close() instead of Shutdown().
8614    
8615     * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
8616    
8617     * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
8618     Go back to using OnClose() instead of Shutdown().
8619    
8620     2003-03-10 Jonathan Coles <[email protected]>
8621    
8622 jonathan 497 * Thuban/UI/classifier.py (Classifier): SelectField() needed
8623     to know the old field index as well as the new one.
8624    
8625     2003-03-10 Jonathan Coles <[email protected]>
8626    
8627 jonathan 495 * Thuban/UI/classifier.py (Classifier): Use __SelectField()
8628     to correctly set the table information and call this from
8629     __init__ and from _OnFieldSelect so that all the information
8630     is up to date when the dialog opens and when a field is changed.
8631    
8632     2003-03-10 Jonathan Coles <[email protected]>
8633    
8634 jonathan 490 * Thuban/Model/classification.py (Classification): Don't use
8635     layer's message function directly, use the ClassChanged() method
8636     when then classification changes. SetField/SetFieldType/SetLayer
8637     must keep the information about field name and field type in
8638     sync when an owning layer is set or removed.
8639    
8640     * Thuban/Model/layer.py: Added ClassChanged() so that the
8641     classification can tell the layer when its data has changed.
8642     (Layer.SetClassification): Accepts None as an arguement to
8643     remove the current classification and correctly handles
8644     adding a new classification.
8645    
8646     * Thuban/Model/load.py: Comment out print statement
8647    
8648     * test/test_classification.py, test/test_save.py: New and
8649     improved tests.
8650    
8651 jonathan 483 2003-03-07 Jonathan Coles <[email protected]>
8652    
8653     * Thuban/Model/classification.py: Implemented __copy__ and
8654     __deepcopy__ for ClassGroup* and ClassGroupProperites so
8655     they can easily be copied by the classifier dialog.
8656     (ClassGroupProperites.__init__): The default line color should
8657     have been Color.Black.
8658    
8659     * Thuban/UI/classifier.py: Setting and Getting table values now
8660     uses a consistent set of functions.
8661     (Classifier): Now non-modal. Has field type label which changes
8662     as the field changes. Keep track of buttons in a list so that
8663     we can enable/disable the buttons when the None field is selected.
8664     (SelectPropertiesDialog): Add buttons to make the colors transparent.
8665    
8666     * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
8667     does what OnClose did, but can be called by the application to
8668     close a window. Needed when a session changes, and we have to
8669     close the classifier windows.
8670    
8671     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
8672     Shuts down open dialogs. Used when a new session is created
8673     or a session is opened.
8674     (MainWindow.SaveSession): Should only call application.SaveSession()
8675     if we don't call SaveSessionAs first.
8676     (MainWindow.Classify): Allow different classifier dialogs for
8677     different layers.
8678    
8679     * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
8680     the parent class handle it. Add Shutdown() to unsubscibe from
8681     event notification and call the parent Shutdown(). This was
8682     necessary so the application can close the tree window.
8683    
8684 jonathan 478 2003-03-06 Jonathan Coles <[email protected]>
8685    
8686     * Thuban/Model/classification.py: Minor documentation changes,
8687     Addition of __eq__ and __ne__ methods.
8688     (Classification.SetLayer): prevent recursion between this method
8689     and Layer.SetClassification().
8690    
8691     * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
8692    
8693     * Thuban/Model/layer.py (SetClassification): prevent recursion
8694     between this method and Classification.SetLayer().
8695    
8696     * test/test_classification.py, test/test_load.py,
8697     test/test_session.py: Fixed and added tests for the classification
8698     classes.
8699    
8700 bh 477 2003-03-06 Bernhard Herzog <[email protected]>
8701    
8702     * Thuban/UI/classifier.py (ClassGrid.__init__)
8703     (ClassGrid.CreateTable): Move the SetSelectionMode call to
8704     CreateTable because otherwise it triggers an assertion in
8705     wxPython/wxGTK 2.4.
8706    
8707 jonathan 459 2003-03-05 Jonathan Coles <[email protected]>
8708    
8709 jonathan 475 * Thuban/common.py: Move FIELDTYPE constants back to table.py.
8710 jonathan 471
8711 jonathan 475 * Thuban/Model/load.py: import FIELDTYPE constants from table.
8712 jonathan 471
8713 jonathan 475 * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
8714 jonathan 471
8715 jonathan 475 * Thuban/Model/table.py: Put FIELDTYPE constants back.
8716 jonathan 471
8717     2003-03-05 Jonathan Coles <[email protected]>
8718    
8719 jonathan 459 * Thuban/UI/classifier.py: Added class documentation.
8720     Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
8721     Store just the groups in the table and generate the other
8722     column information when it is requested. Add "None" field
8723     to pull-down to select no classification.
8724    
8725     * Thuban/common.py: Moved FIELDTYPE constants from table.py
8726     (Str2Num): Only catch ValueError exceptions.
8727    
8728     * Thuban/Model/classification.py: Class documentation. Renaming
8729     of methods with Stroke to Line. Groups are stored in a single
8730     list with the default as the first element. Groups are searched
8731     in the order they appear in the list.
8732    
8733     * Thuban/Model/color.py: Documentation.
8734    
8735     * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
8736     the kind of data represented by a field.
8737    
8738     * Thuban/Model/load.py (ProcessSession): Use proper string
8739     conversion function; fixes RTbug #1713.
8740    
8741     * Thuban/Model/save.py (Saver): Store field type information.
8742    
8743     * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
8744     (Table): Add field_info_by_name() to retrieve field information
8745     by specifying the field name, not the number.
8746    
8747     * Thuban/UI/mainwindow.py: Function name changes.
8748    
8749     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
8750     get the layer classification once. Don't try to classify
8751     values when the field is None: just use the default properties.
8752    
8753     * Thuban/UI/view.py: Function name changes.
8754    
8755     * Doc/thuban.dtd: Add field_type attribute to a classification.
8756    
8757 bh 456 2003-03-04 Bernhard Herzog <[email protected]>
8758    
8759 bh 458 * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
8760     the fill and stroke layer attributes optional with suitable
8761     default values. Add the stroke_width layer attribute. Use correct
8762     syntax for empty elements. Make the attribute list for labels
8763     refer to the label element.
8764    
8765     2003-03-04 Bernhard Herzog <[email protected]>
8766    
8767 bh 456 * setup.py (thuban_build_py.build): Add a comment about distutils in
8768     Python 2.3 containing some of the functionality we implement in
8769     setup.py ourselves.
8770    
8771     * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
8772     before the selection mode. Doing it the other way round triggers
8773     an assertion in wxWindows.
8774    
8775     * Thuban/Model/save.py (escape): Fix typo in doc-string
8776    
8777     * Thuban/Model/classification.py: Remove unnecessary wxPython
8778     import
8779    
8780 jonathan 448 2003-03-04 Jonathan Coles <[email protected]>
8781    
8782     * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
8783     Parameter 'value' should default to None.
8784    
8785     * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
8786     the class attribute __classification is now private.
8787    
8788     * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
8789     Classifier to ClassGrid. Added support for removing selected rows,
8790     which including code for keeping track of when cells are selected,
8791     and deselected.
8792     (ClassTable): Support for added/removing rows. Fixed a problem
8793     with __ParseInput whereby it would not allow strings (only numbers)
8794     to be entered.
8795     (Classifier): Added button and supporting code for removing
8796     selected rows.
8797    
8798 jonathan 445 2003-02-27 Jonathan Coles <[email protected]>
8799 jonathan 434
8800     * Thuban/common.py: Moved color conversion functions into
8801     Thuban/UI/common.py.
8802     (Str2Num): Now converts the float (not the string) to a long/int
8803     so that an exception isn't thrown.
8804    
8805     * Thuban/UI/common.py: Common functions used in several UI modules
8806    
8807     * Thuban/Model/classification.py: Changed the class hierarchy
8808     so that a Classification consists of Groups which return
8809     Properties when a value matches a Group.
8810    
8811     * Thuban/Model/layer.py: Fixed name resolution problem.
8812    
8813     * Thuban/Model/load.py: Use new Classification and Group functions.
8814    
8815     * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
8816     failure.
8817     (Saver.write_classification): Use new Classification and Group
8818     functions.
8819    
8820     * Thuban/UI/classifier.py: Changes to use new Classification and Group
8821 jonathan 445 functions. Fix to create a tuple with a single value instead of
8822     simply returning the value.
8823 jonathan 434
8824     * Thuban/UI/renderer.py: Use new Classification and Group functions.
8825     Use common.py functions.
8826    
8827 jonathan 445 * Thuban/UI/tree.py: Use common.py functions.
8828 jonathan 447
8829     * test/test_classification.py: Use new Classification and Group
8830     classes.
8831 jonathan 434
8832 jonathan 426 2003-02-24 Jonathan Coles <[email protected]>
8833    
8834     * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
8835     functions from Thuban color objects to wxWindow colour objects.
8836    
8837     * Thuban/Model/classification.py (Classification): Renamed
8838     GetProperties() to GetClassData(). Used the new iterator
8839     in TreeInfo().
8840     (ClassIterator): Iterator implementation to iterate over the
8841     ClassData objects in a classification object.
8842    
8843     * Thuban/Model/save.py (Saver.write_classificaton): Uses
8844     the new iterator to save the classification information.
8845    
8846     * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
8847     for changing the stroke and fill colors and previewing the
8848     changes.
8849    
8850     * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
8851     MainWindow.SaveSessionAs): Text string changes so the dialogs
8852     have more meaningful titles.
8853    
8854     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
8855     Classification method name from GetProperties to GetClassData.
8856    
8857     * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
8858     instead of accessing now non-existent class variables.
8859    
8860 bh 425 2003-02-24 Bernhard Herzog <[email protected]>
8861    
8862     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
8863     unneeded Shape() call. Rendering is substantially faster without
8864     it and it avoids some problems with broken shape files.
8865    
8866 frank 423 2003-02-20 Frank Koormann <[email protected]>
8867    
8868     Force minimal size of identify and label dialogs. The autosizing
8869     looked too ugly.
8870    
8871     * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
8872     * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
8873     Set size of listctrl.
8874     * Thuban/UI/identifyview.py (IdentifyView.__init__):
8875     Set size of dialog.
8876    
8877 jonathan 408 2003-02-19 Jonathan Coles <[email protected]>
8878    
8879     * test/test_classification.py, test/test_layer.py,
8880     test/test_load.py, test/test_map.py, test/test_session.py:
8881     Updated the tests to use the new functions that are in the
8882     respective classes.
8883    
8884     * Thuban/Model/classification.py (Classification):
8885     Uses the new ClassData* classes. Modification messages are
8886     passed up to the parent layer (if it exists).
8887     (ClassData): New class to encapsulate the common data in each
8888     classification property.
8889     (ClassDataDefault): Represents the Default class. data.
8890     (ClassDataPoint): Represents a single class. data point
8891     (ClassDataRange): Represents a class. range
8892     (ClassDataMap): Represents a class. map (unused).
8893    
8894     * Thuban/Model/color.py: Added Color.None to represent something
8895     with no color. Color.Black represents the color black.
8896     (NoColor): Helper class derived from Color to represent something
8897     with no color.
8898    
8899     * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
8900     stroke_width attributes. Made the 'classification' attribute private.
8901     New methods for setting/getting the classification.
8902    
8903     * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
8904     to get the classifcation and use the new ClassData* classes to
8905     hold the classification data. Use Str2Num to convert numbers
8906     properly.
8907    
8908     * Thuban/Model/save.py (Saver): Use new Color and Classification
8909     methods
8910    
8911     * Thuban/UI/classifier.py (ClassGrid): New class to represent a
8912     custom grid.
8913     (ClassTable): Support for editing Values and Labels and for
8914     changing what type (point or range) of data is stored in each
8915     property based on how the user enters the data.
8916     (Classifier): Support for saving the new classifications and
8917     launching the dialog to edit a property.
8918     (SelectPropertiesDialog): New class for editing the visual
8919     properties of a classification (stroke color, width, and fill color)
8920     (ClassPreviewer): Took the Draw method from ClassRenderer and
8921     made most of it into this new class. Intend to use this class in
8922     the SelectPropertiesDialog for previewing changes.
8923    
8924     * Thuban/UI/renderer.py: Use new Color and Classification methods.
8925    
8926     * Thuban/UI/tree.py: Formatting changes.
8927    
8928     * Doc/thuban.dtd: Add 'label' element
8929    
8930     * Thuban/common.py: New. Contains common routines used throughout
8931     the code.
8932     (Str2Num): Takes a string and converts it to the "best" type of
8933     number.
8934    
8935 bh 405 2003-02-14 Bernhard Herzog <[email protected]>
8936    
8937     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
8938     dragging flag is always set to 0 even when the tool implementation
8939     raises an exception
8940    
8941 bh 402 2003-02-11 Bernhard Herzog <[email protected]>
8942    
8943     * Thuban/UI/application.py (ThubanApplication.splash_screen): New
8944     method to create a splash screen.
8945     (ThubanApplication.ShowMainWindow): New. Show the main window.
8946     Needed so the splash screen can display the mainwindow
8947     (ThubanApplication.OnInit): Call the
8948     new splash_screen method to determine whether the application
8949     should display a splash screen. If it displays a splash screen do
8950     not immediately show the main window.
8951    
8952 jonathan 399 2003-02-11 Jonathan Coles <[email protected]>
8953    
8954     * Thuban/Model/classification.py: Added import line to fix
8955     feature conflicts between running on python2.2 and python2.1.
8956    
8957     * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
8958     onto the clinfo parameter, so removed the deepcopy().
8959    
8960 jonathan 396 2003-02-10 Jonathan Coles <[email protected]>
8961    
8962 tkoester 403 * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
8963 jonathan 396 Added element_open variable to track opening and closing of tags
8964     so that tags that don't span more than one line are closed with
8965     /> instead of </tag_name>. Use the GetDefault*() methods of
8966     the Classification class.
8967    
8968     * Thuban/Model/classification.py (Classificaton): Added set and
8969     get methods for the default data. The class also takes a layer
8970     reference so that modification messages can be sent. Fixed the
8971     methods to use the new ClassData class.
8972     (ClassData): New class to encapsulate the classification data
8973    
8974     * Thuban/Model/layer.py (Layer): Remove the
8975 tkoester 403 Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
8976 jonathan 396 SetDefault*() methods on the layer's classification object.
8977 tkoester 403 (Layer.__init__): Use the new SetDefault*() methods in the
8978 jonathan 396 Classification class.
8979    
8980     * Thuban/Model/load.py (ProcessSession): Use the new ClassData
8981     object instead of a dictionary.
8982    
8983 tkoester 403 * Thuban/UI/classifier.py (ClassRenderer): New class to
8984 jonathan 396 draw the classifications in the dialog box's table.
8985     (Classifier): Modified to use the ClassRenderer class.
8986    
8987 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
8988     methods of the Classification class.
8989 jonathan 396
8990     * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
8991     of the ClassData class.
8992    
8993     * test/test_classification.py, test/test_layer.py,
8994     test/test_map.py, test/test_session.py: Fix the tests to work
8995     with the above code changes.
8996    
8997 jonathan 387 2003-02-03 Jonathan Coles <[email protected]>
8998    
8999     * Thuban/Model/classification.py (Classification): Added getNull()
9000     to return the NullData reference
9001    
9002     * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
9003     Layer.SetStrokeWidth): Modified these functions to change the
9004     null data in the classification rather than keep these values
9005     directly in the Layer class. Menu options to change these values
9006     work again.
9007    
9008 jonathan 380 2003-01-28 Jonathan Coles <[email protected]>
9009    
9010 jonathan 384 * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
9011 tkoester 403 Fixed crashing problem on some systems. Dialog box shows
9012 jonathan 380 classification data.
9013    
9014 jonathan 384 * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
9015     Colors in the tree view.
9016    
9017     * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
9018     the tree info for classifications. Commented out unnecessary lines.
9019    
9020     * Thuban/Model/classification.py (Classification.TreeInfo): New
9021     function to add information about the classification into the
9022     tree view.
9023    
9024 tkoester 403 2003-01-27 Jan-Oliver Wagner <[email protected]>
9025 jan 375
9026 tkoester 403 * Thuban/__init__.py (_): New.
9027 jan 375
9028     * Thuban/Model/classification.py, Thuban/Model/extension.py,
9029     Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
9030 tkoester 403 Thuban/Model/session.py, Thuban/UI/application.py,
9031     Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
9032     Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
9033     Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
9034     Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
9035     Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
9036 jan 375
9037 jonathan 370 2003-01-27 Jonathan Coles <[email protected]>
9038    
9039 tkoester 403 * Thuban/Model/layer.py: Classification initialization calls.
9040 jonathan 370
9041 tkoester 403 * Thuban/Model/classification.py: Created class to encapsulate
9042     a layer classification. Supports specific data points and
9043     ranges.
9044 jonathan 370
9045 tkoester 403 * Thuban/Model/load.py: Added support for loading classification
9046     information.
9047 jonathan 370
9048 tkoester 403 * Thuban/Model/save.py: Added support for saving classification
9049     information.
9050 jonathan 370
9051 tkoester 403 * Thuban/UI/classifier.py: Initial class for a dialog box for
9052     specifying classification information.
9053 jonathan 370
9054 tkoester 403 * Thuban/UI/mainwindows.py: Support for opening the classifier
9055     dialog.
9056 jonathan 370
9057 tkoester 403 * Thuban/UI/renderer.py: Support for drawing a layer with the
9058     classification information.
9059 jonathan 370
9060 tkoester 403 * Data/iceland_sample_class.thuban: iceland_sample with
9061     classification data.
9062 jonathan 370
9063 tkoester 403 * test/test_classification: Tests for the Classification class.
9064 jonathan 370
9065 bh 359 2002-12-09 Bernhard Herzog <[email protected]>
9066    
9067 bh 361 * test/test_command.py: New. Tests for the command classes.
9068    
9069 bh 359 * Thuban/UI/command.py (ToolCommand): New class for tool commands.
9070     (Command.IsTool): New method to distinguish between command
9071     switching tools and other commands.
9072    
9073     * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
9074     the tool to avoid direct assignments to instance variables
9075     (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
9076     (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
9077     change the tool
9078    
9079     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
9080     active tool's command turns insensitive, disable the tool.
9081     (_tool_command): Use the new ToolCommand class
9082    
9083     * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
9084     SelectTool method to change the tool
9085     (iconfile): Use the ToolCommand class
9086    
9087 bh 354 2002-12-03 Bernhard Herzog <[email protected]>
9088    
9089     * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
9090     the case of selected items that are not children of Layers or Maps
9091     properly. Previously this bug would trigger an assertion in
9092     wxWindows.
9093    
9094 frank 352 2002-11-06 Frank Koormann <[email protected]>
9095    
9096 bh 354 * Thuban/UI/mainwindow.py: Altered the order of tools in the
9097     toolbar: First now are all navigation tools (Zoom In/Out, Pan,
9098     Full Extent).
9099 tkoester 403
9100 bh 349 2002-10-23 Bernhard Herzog <[email protected]>
9101    
9102     * setup.py (setup call): version now 0.1.3
9103    
9104     * MANIFEST.in: Add the files in test/
9105    
9106     * test/README: Add note about tests requiring the iceland data
9107    
9108     * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
9109     copyright notice.
9110    
9111 bh 344 2002-10-18 Bernhard Herzog <[email protected]>
9112    
9113     * test/test_map.py
9114     (TestMapWithContents.test_projected_bounding_box): Use an explicit
9115     epsilon.
9116    
9117     * test/support.py (FloatComparisonMixin.assertFloatEqual)
9118     (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
9119     message if the assertion fails and don't return the return value
9120     of self.assert_. In assertFloatSeqEqual the return meant that not
9121     all items of the sequence were compared.
9122    
9123 bh 326 2002-09-20 Bernhard Herzog <[email protected]>
9124    
9125 bh 341 * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
9126    
9127     * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
9128    
9129 bh 338 * test/test_map.py (TestMapWithContents.test_tree_info): Create
9130     the string with the bounding box on the fly because of platform
9131     differences in the way %g is handled.
9132    
9133     * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
9134     DBFfile too because Thuban layers can't yet cope missing DBF
9135     files.
9136    
9137     2002-09-20 Bernhard Herzog <[email protected]>
9138    
9139 bh 326 * test/test_menu.py: Use initthuban instead of
9140     add_thuban_dir_to_path to initialize Thuban.
9141    
9142     * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
9143     Mixin class for float comparisons
9144     (SubscriberMixin): New. Mixin class to test messages sent through
9145     the Connector class
9146    
9147     * test/README: Fix a typo and add the -v flag to the command for
9148     individual tests
9149    
9150 bh 335 * test/test_session.py: New. Test cases for Thuban.Model.session
9151    
9152     * test/test_proj.py: New. Test cases for Thuban.Model.proj
9153    
9154     * test/test_map.py: New. Test cases for Thuban.Model.map
9155    
9156     * test/test_layer.py: New. Test cases for Thuban.Model.layer
9157    
9158     * test/test_label.py: New. Test cases for Thuban.Model.label
9159    
9160     * test/test_connector.py: New. Test cases for Thuban.Lib.connector
9161    
9162     * test/test_color.py: New. Test cases for Thuban.Model.color
9163    
9164     * test/test_base.py: New. Test cases for Thuban.Model.base
9165    
9166 bh 322 2002-09-13 Bernhard Herzog <[email protected]>
9167    
9168     * Thuban/Model/session.py (Session.forwarded_channels): Forward
9169     the CHANGED channel too.
9170    
9171     * Thuban/Model/map.py (Map.forwarded_channels): Forward the
9172     CHANGED channel too.
9173     (Map.__init__): Call the Modifiable constructor as well.
9174    
9175     * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
9176     event if the modified flag changes.
9177     (Modifiable.changed): Tweak the doc-string.
9178    
9179     * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
9180     (MainWindow.set_position_text): Put the code that puts the text
9181     with the mouse position into the status bar into the new method
9182     set_position_text so that it can overwritten in derived classes.
9183    
9184 bh 317 2002-09-12 Bernhard Herzog <[email protected]>
9185    
9186     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
9187     message box on the main window.
9188    
9189 bh 313 2002-09-11 Bernhard Herzog <[email protected]>
9190    
9191     * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
9192     the 'E' because it's less likely to interfere with other menu
9193     entries.
9194 bh 315 (MainWindow.build_menu): remove an incorrect comment.
9195 bh 313
9196 bh 311 2002-09-10 Bernhard Herzog <[email protected]>
9197    
9198     * Thuban/UI/mainwindow.py (MainWindow.Map): New.
9199     (_tool_command): Add sensitive parameter
9200     (_has_visible_map): Sensitivity callback to tools and other
9201     commands that require a visible map. Use it in map_zoom_in_tool,
9202     map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
9203     and map_full_extent
9204    
9205 bh 308 2002-09-06 Bernhard Herzog <[email protected]>
9206    
9207     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
9208     VIEW_POSITION
9209    
9210 tkoester 403 2002-09-04 Frank Koormann <[email protected]>
9211 frank 306
9212     * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
9213    
9214 bh 302 2002-09-02 Bernhard Herzog <[email protected]>
9215    
9216 bh 304 * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
9217     wxWindows already and our implementation doesn't work correctly
9218     with wxGTK 2.3:
9219     (MapCanvas.__init__): Remove the instance variable
9220     (MapCanvas.OnPaint): Always call do_redraw when there's a map to
9221     be drawin
9222     (MapCanvas.OnIdle): Removed.
9223    
9224 bh 302 * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
9225     a parameter to determine the size of the rectangle.
9226     (MapCanvas.find_shape_at): Create the box around the point on a
9227     layer by layer basis and make the size depend on the shape type.
9228     This solves a problem with the selection of point shapes at the
9229     border of the layer's bounding box
9230    
9231 bh 292 2002-08-30 Bernhard Herzog <[email protected]>
9232    
9233 bh 300 * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
9234     for the sensitivity of remove layer.
9235     (_can_remove_layer): New. Sensitivity callback for remove layer
9236     (Command layer_remove): Use _can_remove_layer
9237    
9238     * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
9239     determine whether a given layer can be deleted.
9240    
9241 bh 297 * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
9242     (MapCanvas.do_redraw): Get rid of the unused update_region
9243     instance variable
9244    
9245 bh 294 * Thuban/UI/view.py: Add/update some doc-strings.
9246    
9247 bh 292 * test/: new subdirectory with a bunch of unit tests.
9248    
9249     * test/README, test/test_table.py, test/test_save.py,
9250     test/test_menu.py, test/test_load.py: Initial set of tests and
9251     brief instructions on how to run them
9252    
9253 bh 287 2002-08-29 Bernhard Herzog <[email protected]>
9254    
9255 bh 291 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
9256     arcs with multiple parts.
9257    
9258 bh 289 * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
9259     Handle degenrate rectangles.
9260    
9261 bh 287 * Thuban/Model/table.py: Make writing records work correctly:
9262     (Table.__init__): Keep track of whether the DBF is open for
9263     writing
9264     (Table.write_record): Open the DBF file for writing when necessary
9265    
9266 bh 285 2002-08-27 Bernhard Herzog <[email protected]>
9267    
9268     * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
9269     dbf files only for reading by default. Use a new writable dbf
9270     object for writing.
9271    
9272 bh 278 2002-08-26 Bernhard Herzog <[email protected]>
9273    
9274 bh 282 * Thuban/UI/mainwindow.py: Refactor the context creation:
9275     (MainWindow.Context): New method to return a context
9276     (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
9277     new method
9278    
9279 bh 278 * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
9280     layer table specific code from TableGrid into LayerTableGrid
9281     (TableFrame, LayerTableFrame): Split the layer table specific code
9282     from TableFrame into LayerTableFrame
9283 bh 280 (LayerTableGrid.select_shape): Remove a debug print
9284 bh 278
9285     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
9286     LayerTableFrame
9287    
9288 bh 277 2002-08-23 Bernhard Herzog <[email protected]>
9289    
9290     * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
9291     absolute filename.
9292    
9293 bh 269 2002-08-22 Bernhard Herzog <[email protected]>
9294    
9295 bh 275 * Thuban/Model/table.py (Table.write_record): New method to write
9296     records.
9297 tkoester 403 (Table.__init__): Open the DBF file for writing too.
9298 bh 275
9299     * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
9300     into the underlying table.
9301    
9302     * extensions/shapelib/shapefil.h (DBFCommit),
9303     extensions/shapelib/dbfopen.c (DBFCommit): New API function to
9304     commit any changes made to the DBF file.
9305    
9306 bh 271 * Thuban/UI/mainwindow.py (make_check_current_tool)
9307     (_tool_command): Put the code that generates the "checked"
9308     callback into a separate function so that we can reuse it
9309     elsewhere
9310    
9311 bh 269 * Thuban/Model/save.py (Saver): New class to handle serializing a
9312     session into an XML file. The main reason to introduce a class is
9313     that applications built on Thuban can derive from it so that they
9314     can save additional information in a session file.
9315     (save_session): Delegate almost all the work to the Saver class.
9316     Rename the filename argument to file because it may be a file like
9317     object now.
9318    
9319     * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
9320     code. Remove the little test code which would be executed when the
9321     module is run as a script which didn't work anymore since it can't
9322     import the other Thuban modules.
9323     (ProcessSession, load_session): Refactor the ProcessSession to
9324     have one method for each element start and end tag so that derived
9325     classes can easily override the processing of individual tags.
9326     Also, always parse with namespaces enabled because applications
9327     built on top of Thuban will likely use namespaces if they extend
9328     the session file format.
9329    
9330 bh 266 2002-08-21 Bernhard Herzog <[email protected]>
9331    
9332     * setup.py (ThubanInstall.run): Don't repr install_lib_orig
9333     because thubaninit_contents will do it for us.
9334    
9335 tkoester 403 2002-08-16 Jan-Oliver Wagner <[email protected]>
9336 jan 265
9337     * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
9338     tree window already open
9339    
9340 bh 259 2002-08-15 Bernhard Herzog <[email protected]>
9341    
9342 bh 263 * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
9343     with self.
9344    
9345     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
9346     when we have actually captured it.
9347    
9348 bh 259 * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
9349     shapefile and destroy the table.
9350    
9351     * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
9352    
9353 bh 254 2002-08-14 Bernhard Herzog <[email protected]>
9354    
9355 bh 256 * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
9356     instance variable columns
9357     (RecordTable.GetTypeName): row and col may be negative in some
9358     cases.
9359    
9360 bh 254 * setup.py (InstallLocal.initialize_options)
9361     (InstallLocal.finalize_options, InstallLocal.user_options): New
9362     option create-init-file to build a thubaninit.py when running
9363     install_local
9364     (InstallLocal.run): Create the thubaninit.py module when requested
9365     (thubaninit_contents): Split the template into several parts and
9366     create a new function thubaninit_contents that creates the
9367     contents of a thubaninit module.
9368     (ThubanInstall.run): Use the new function to create the thubaninit
9369     module.
9370    
9371 bh 252 2002-07-30 Bernhard Herzog <[email protected]>
9372    
9373     * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
9374     cleanup.
9375     (ThubanApplication.MainLoop): Extend to automatically call OnExit.
9376    
9377     * Thuban/Model/session.py (Session.Destroy): Don't bypass the
9378     direct base class' Destroy method.
9379    
9380     * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
9381     layers.
9382     (Map.Destroy): Destroy the label_layer as well and call the
9383     inherited Desatroymethod first so that no more messages are
9384     issued.
9385     (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
9386     message if the stacking order actually has changed. Add
9387     doc-strings.
9388     (Map.BoundingBox): Correct the doc-string.
9389     (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
9390     (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
9391    
9392     * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
9393     all labels.
9394    
9395 bh 247 2002-07-29 Bernhard Herzog <[email protected]>
9396    
9397     * Thuban/Model/map.py (Map.subscribe_layer_channels)
9398     (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
9399     to a layer's channels into separate methods.
9400     (Map.RemoveLayer, Map.AddLayer): Call the new methods
9401     (Map.Destroy): Unsubscribe from a layer's channels before
9402     destroying it.
9403    
9404     * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
9405     selected_layer parameter to searched_layer which is the layer to
9406     search in.
9407     (MapCanvas.SelectShapeAt): New parameter layer to restrict the
9408     search to that layer. Return the selected layer and shape.
9409    
9410     * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
9411     typo
9412    
9413 bh 238 2002-07-24 Bernhard Herzog <[email protected]>
9414    
9415 bh 243 * Thuban/UI/application.py (ThubanApplication.create_session):
9416     Extend the doc string.
9417     (ThubanApplication.subscribe_session)
9418     (ThubanApplication.unsubscribe_session): New methods to
9419     subscribe/unsubscribe to/from session channels.
9420     (ThubanApplication.SetSession): Call the new methods here.
9421     (ThubanApplication.maps_changed, ThubanApplication.set_map):
9422     Renamed set_map to maps_changed. Its now a subscriber for
9423     MAPS_CHANGED.
9424    
9425     * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
9426     x-coordinate in case of simple clicks
9427    
9428     * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
9429     don't pass it as a parameter
9430    
9431     * Thuban/Model/session.py (Session.RemoveMap): New
9432    
9433 bh 238 * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
9434     window size into a parameter.
9435    
9436 bh 235 2002-07-23 Bernhard Herzog <[email protected]>
9437    
9438 bh 237 * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
9439     just commands.
9440    
9441 bh 235 * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
9442     parameter list a bit to allow setting the window title and the
9443     initial message in the status bar. Update the callers.
9444    
9445     * Thuban/UI/application.py (ThubanApplication.OnInit)
9446     (ThubanApplication.CreateMainWindow): Put the mainwindow
9447     instantiation into a separate method so that it can be overridden
9448     by a subclass.
9449    
9450 bh 230 2002-07-19 Bernhard Herzog <[email protected]>
9451    
9452 bh 234 * Thuban/Model/session.py: Issue a CHANGED message every time
9453     another changed message is issued to make it easier to get
9454     notified of changes.
9455     (Session): Update the doc string
9456     (Session.forward): Issue changed-events as CHANGED as well.
9457     (Session.changed): Overwrite the inherited version to issue
9458     CHANGED events as well.
9459    
9460     * Thuban/UI/tree.py: We can now simply subscribe to the session's
9461     CHANGED channel to be informed of changes.
9462     (SessionTreeCtrl.session_channels): Not needed any longer.
9463 tkoester 403 (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
9464 bh 234 Only have to (un)subscribe CHANGED
9465    
9466     * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
9467    
9468 bh 230 * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
9469     for the wxPython locale bug to __init__.py so that it's
9470     automatically executed by anybody using UI code from Thuban.
9471    
9472 bh 225 2002-07-18 Bernhard Herzog <[email protected]>
9473    
9474 bh 228 * Thuban/UI/main.py (main): app no longer needs to be global
9475    
9476     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
9477     as parameter and store it in an instance variable
9478     (MainWindow.invoke_command, MainWindow.update_command_ui)
9479     (MainWindow.save_modified_session, MainWindow.NewSession)
9480     (MainWindow.OpenSession, MainWindow.SaveSession)
9481     (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
9482     application object.
9483    
9484     * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
9485     the main window with self.
9486    
9487 bh 225 * Thuban/UI/context.py: New module with the context class
9488    
9489     * Thuban/UI/command.py (Command): Update doc string.
9490    
9491     * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
9492     MainWindow.update_command_ui): Pass an instance of the context
9493     class to the command's methods
9494     (check_current_tool, call_method): Handle the new context
9495     implementation
9496    
9497     * Examples/simple_extensions/simple_tool.py (simple_tool,
9498     check_simple_tool): Handle the new context implementation
9499    
9500     * Examples/simple_extensions/simple_command.py (simple_command):
9501     Handle the new context implementation. Update the comments about
9502     the context.
9503    
9504     * Thuban/UI/application.py (ThubanApplication.SetSession): Add
9505     doc-string
9506     (ThubanApplication.Session): New method to return the session
9507     object
9508    
9509     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
9510     interactor's selected_layer may not be a layer of the current
9511     session when the tree is updated while a new session is being set.
9512    
9513 bh 217 2002-07-17 Bernhard Herzog <[email protected]>
9514    
9515     * Thuban/UI/tree.py (color_string): Removed. No longer used.
9516     (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
9517     update_tree into update_tree and add_items. The tree now uses a
9518     more generic way to display the contents of the tree.
9519     (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
9520    
9521     * Thuban/Model/layer.py (Layer.TreeInfo),
9522     Thuban/Model/extension.py (Extension.TreeInfo),
9523     Thuban/Model/map.py (Map.TreeInfo),
9524 tkoester 403 Thuban/Model/session.py (Session.TreeInfo):
9525 bh 217 Add TreeInfo methods to implement the new tree view update scheme
9526    
9527 bh 216 2002-07-16 Bernhard Herzog <[email protected]>
9528    
9529     * Thuban/UI/application.py: Don't use "import from" for the
9530     MainWindow. It can't always be resolved.
9531     (ThubanApplication.OnInit): change reference to MainWindow
9532     accordingly.
9533    
9534     * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
9535     completely
9536    
9537 bh 213 2002-07-10 Bernhard Herzog <[email protected]>
9538    
9539     * setup.py (create_init_module): New configurable variable whose
9540     default depends on the platform we're running on.
9541     (ThubanInstall.initialize_options): Initialize
9542     self.create_init_module from the global create_init_module
9543     (ThubanInstall.user_options): indictate that the options
9544     create-init-module and init-module-dir have arguments.
9545    
9546     * setup.py: In the setup call change the version number to include
9547     cvs.
9548    
9549     * MANIFEST.in: Add the files in Examples
9550    
9551 bh 205 2002-07-09 Bernhard Herzog <[email protected]>
9552    
9553 bh 210 * setup.py: In the setup call, use the thuban homepage as the
9554     value of the url parameter.
9555    
9556 bh 208 * Examples: New subdirectory for examples.
9557    
9558     * Examples/simple_extensions/simple_tool.xpm,
9559     Examples/simple_extensions/simple_tool.py,
9560     Examples/simple_extensions/simple_command.py,
9561     Examples/simple_extensions/README: Simple examples showing how to
9562     add new commands and tools.
9563    
9564 bh 207 * setup.cfg (bdist_rpm): Add the default value for prefix and tell
9565     bdist_rpm that we also have an install script.
9566     (bdist_inno): Add 2002 to the copyright notice.
9567    
9568 bh 205 * setup.py: Create a file in python's site-packages directory to
9569     make installation of Thuban as a library easier.
9570     (ThubanInstall.user_options): Add two new options,
9571     create-init-module and init-module-dir
9572     (ThubanInstall.expand_with_pure_python_dirs): New method to expand
9573     filenames for installation in the default directories.
9574     (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
9575     the inherited methods to capture some filenames before they're
9576     transformed too much by distutils.
9577     (ThubanInstall.run): Create the init module if requested.
9578     (ThubanInstall.thuban_init_filename): New method to return the
9579     full name of the init module.
9580     (ThubanInstall.get_outputs): Append the filename of the init
9581     module.
9582    
9583 bh 202 2002-07-08 Bernhard Herzog <[email protected]>
9584    
9585 bh 205 * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
9586     handle the prefix properly which means that the default for the
9587     installation prefix should be /usr for RPMs and /usr/local when
9588     doing a normal source install.
9589     (bdist_rpm_install_script): Script to override the default install
9590     commands in the specfile generated by the bdist_rpm command.
9591     (thuban_bdist_rpm.user_options): Add a prefix option
9592     (thuban_bdist_rpm.initialize_options): Init the prefix option.
9593     Create the script files for the spec files as empty files here
9594     (thuban_bdist_rpm._make_spec_file): Override the inherited method
9595     to fill the script files with content.
9596    
9597 bh 202 * Thuban/Model/save.py (relative_filename): Wrapper around
9598     Thuban.Lib.fileutil.relative_filename that accepts an empty dir
9599     argument. save_session now automatically uses this version,
9600     solving a problem when saving to a relative filename.
9601    
9602     * setup.py: In the setup call, make sure that the library
9603     directories are under $prefix/lib not directly under $prefix.
9604    
9605 tkoester 403 2002-06-20 Jan-Oliver Wagner <[email protected]>
9606 jan 199
9607     * Thuban/Model/extension.py: new module to handle extension objects.
9608     * Thuban/Model/messages.py: new messages for extensions.
9609     * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
9610     Session.AddExtension): new for handling extensions.
9611     Also some other minor changes to round up extension handling.
9612     * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
9613     of Extension titles and title and names of its objects.
9614    
9615 bh 194 2002-05-29 Bernhard Herzog <[email protected]>
9616    
9617     * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
9618 bh 202 the events for a command.
9619 bh 194 (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
9620     Call bind_command_events to bind the events. add_toolbar_command
9621     can now bind events too so that it's possible to have commands
9622     that are only available through the toolbar.
9623     (MainWindow.init_ids): New instance variable events_bound to keep
9624     track of for which commands events have been bound.
9625    
9626 bh 190 2002-05-28 Bernhard Herzog <[email protected]>
9627    
9628     * Thuban/UI/menu.py: New module to build and manage menus.
9629    
9630     * Thuban/UI/mainwindow.py: Remove some unused imports.
9631     (MainWindow.__init__, main_menu): move the definition of the main
9632     menu from __init__ to the Menu instance main_menu.
9633     (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
9634     build the menu bar and sub-menus from a menu description.
9635    
9636     * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
9637     startup file
9638     (ThubanApplication.read_startup_files): New method to run
9639     ~/.thuban/thubanstart.py
9640    
9641 bh 192 * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
9642     Move the toolbar definition to the Menu instance main_toolbar.
9643     (MainWindow.build_toolbar): New method to build the toolbar
9644     similar to the build_menu methods
9645    
9646 bh 184 2002-05-23 Bernhard Herzog <[email protected]>
9647    
9648 bh 186 * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
9649     layer_outline_color. Fix it in the definition of the command too.
9650    
9651 bh 184 * Thuban/UI/command.py (Command): Fix typo in doc string
9652    
9653 bh 182 2002-05-22 Bernhard Herzog <[email protected]>
9654    
9655     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
9656     in the docstring
9657    
9658 bh 175 2002-05-15 Bernhard Herzog <[email protected]>
9659    
9660 bh 180 * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
9661     when the shapefile is empty.
9662     (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
9663     now return None for empty shapefiles. Update doc-strings.
9664    
9665     * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
9666     the layer's bbox being None.
9667    
9668     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
9669     layer's bbox being None.
9670    
9671 bh 175 * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
9672     necessary.
9673     (MapCanvas.__init__): New instance variables, last_selected_layer
9674     and last_selected_shape to determine how the selection has
9675     changed.
9676    
9677     * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
9678     AutoSizeColumns because it will cause a traversal of the entire
9679     table which for large .dbf files will take a very long time.
9680    
9681 bh 172 2002-05-14 Bernhard Herzog <[email protected]>
9682    
9683     * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
9684     maximum depth for the tree than shapelib does by default.
9685    
9686 bh 165 2002-05-10 Bernhard Herzog <[email protected]>
9687    
9688     * setup.py (py_modules): The shptree modules doesn't have a
9689     wrapper, so don't include it in the py_modules
9690    
9691 bh 163 2002-05-08 Bernhard Herzog <[email protected]>
9692    
9693     * extensions/shapelib/shptree.c (compare_ints): Make arguments
9694     const void * as in the qsort prototype
9695     (SHPTreeFindLikelyShapes): Remove some unused variables.
9696    
9697     * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
9698     maintains to redraw the window during a drag.
9699     (MapCanvas.unprojected_rect_around_point): New method to determine
9700     a small region around a point for hit-testing.
9701     (MapCanvas.find_shape_at): Only test the shapes in a small region
9702     around the point.
9703    
9704     * setup.py: Increment the version to 0.1.2
9705    
9706     * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
9707     debug print and set session to None after unsubscribing
9708    
9709 bh 146 2002-05-07 Bernhard Herzog <[email protected]>
9710    
9711 bh 154 * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
9712     the file to have a .thuban extension.
9713    
9714 bh 152 * Thuban/UI/tree.py (session_channels): New class constant with
9715     all the session channels to subscribe to to update the tree
9716     (SessionTreeCtrl.session_changed): Remember the session so that we
9717     can unsubscribe properly. Use the new class constant to
9718     unsubscribe from the old session and subscribe to the new one.
9719     (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
9720     subscriptions of the SessionTreeCtrl.
9721     (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
9722    
9723     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
9724     Session Tree" command to the file menu.
9725    
9726     * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
9727     as update_region to the renderer.
9728    
9729     * Thuban/UI/renderer.py
9730     (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
9731     update box is now directly a tuple, not a wxRect anymore.
9732    
9733     * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
9734     prints.
9735    
9736     2002-05-07 Bernhard Herzog <[email protected]>
9737    
9738 bh 146 * setup.py: Add the shptree extension module. See
9739     extensions/pyshapelib/ChangeLog for more details.
9740    
9741     * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
9742     extensions/shapelib/dbfopen.c: Really update to the versions of
9743     shapelib 1.2.9. For some reason it wasn't really done on
9744     2002-04-11.
9745    
9746     * extensions/shapelib/shptree.c: Modified version of shptree.c of
9747     shapelib 1.2.9. The only real difference is the use of qsort
9748     instead of a bubble sort implementation
9749    
9750     * Thuban/Model/layer.py (Layer.__init__): New instance variable
9751     shapetree to hold the shapelib quadtree for the shapefile
9752     (Layer.open_shapefile): Create the quad tree.
9753     (Layer.ShapesInRegion): New method to return the ids of shapes in
9754     a given region using the quad tree.
9755    
9756     * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
9757     comment
9758     (draw_polygon_shape): Accept both arcs and polygons.
9759     (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
9760     the api.
9761    
9762     * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
9763     return the shape ids to be rendered in a given layer.
9764     (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
9765     ids. Use draw_polygon_shape to draw arc shapes as well.
9766     (ScreenRenderer.RenderMap): New parameter for the rectangle that
9767     has to be updated
9768     (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
9769     calling it's ShapesInRegion method.
9770    
9771     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
9772     update_region for the update region.
9773     (MapCanvas.OnPaint): Maintain the update region
9774     (MapCanvas.do_redraw): Pass the bounding box of the update_region
9775     to the renderer when drawing the bitmap. Reset the update_region.
9776    
9777 bh 129 2002-05-03 Bernhard Herzog <[email protected]>
9778    
9779 bh 131 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
9780     MainWindow.OpenSession): Change the file extension of the session
9781     files to .thuban
9782    
9783 bh 129 * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
9784     Move the map channels to be forwarded by the session into the
9785 bh 146 class constant with forwarded_channels. Also add
9786     LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
9787     forwarded_channels
9788 bh 129
9789     * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
9790     typo and some rewording).
9791    
9792 bh 126 2002-05-02 Bernhard Herzog <[email protected]>
9793    
9794     * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
9795     around to speed up most redraws:
9796     (MapCanvas.__init__): New instance variable bitmap which holds the
9797     bitmap
9798     (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
9799     self.bitmap to draw.
9800     (MapCanvas.full_redraw): New method to force a full redraw
9801     including the bitmap
9802     (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
9803     make sure the bitmap is redrawn.
9804     (MapCanvas.projection_changed, MapCanvas.set_view_transform,
9805     MapCanvas.shape_selected): Call full_redraw instead of readraw to
9806     make sure the bitmap is redrawn.
9807     (MapCanvas.OnSize): New method to handle size events so that the
9808     bitmap can be redrawn.
9809    
9810 bh 124 2002-04-29 Bernhard Herzog <[email protected]>
9811    
9812     * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
9813     canvas' VIEW_POSITION event
9814     (MainWindow.view_position_changed): Handler for VIEW_POSITION.
9815     Update the text in the status-bar accordingly.
9816    
9817     * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
9818     (MapCanvas.__del__): Implement because Publisher.__del__ has to be
9819     called.
9820     (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
9821     current_position
9822     (MapCanvas.set_current_position): New method to set
9823     current_position. Issue a VIEW_POSITION event
9824     (MapCanvas.CurrentPosition): New public method to return the value
9825     of current_position. Should be called when the VIEW_POSITION event
9826     is processed.
9827     (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
9828     Update the position.
9829     (MapCanvas.OnLeaveWindow): Set the position to None.
9830    
9831     * Thuban/UI/messages.py (VIEW_POSITION): New message for the
9832     position in the statusbar
9833    
9834 tkoester 403 2002-04-26 Frank Koormann <[email protected]>
9835 frank 120
9836     * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
9837    
9838 tkoester 403 2002-04-24 Frank Koormann <[email protected]>
9839    
9840 frank 118 * Resources/Bitmaps/identify.xpm: shadow added
9841    
9842     * Resources/Bitmaps/fullextent.xpm: new
9843 jan 116
9844 tkoester 403 2002-04-22 Jan-Oliver Wagner <[email protected]>
9845 jan 116
9846 tkoester 403 * Thuban/UI/tree.py (update_tree): added test for None on map bounding
9847     box
9848 jan 114
9849 tkoester 403 2002-04-21 Jan-Oliver Wagner <[email protected]>
9850    
9851 jan 114 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
9852    
9853     * Thuban/UI/tree.py (update_tree): added added map extent
9854    
9855     * Thuban/UI/mainwindow.py (_method_command): extended by parameter
9856 tkoester 403 icon; added map_full_extend as tool
9857 jan 114
9858 tkoester 403 2002-04-19 Jan-Oliver Wagner <[email protected]>
9859 jan 107
9860     * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
9861     saving _new_ sessions
9862    
9863     * Thuban/Model/session.py (create_empty_session): new session
9864     don't have a filename (set to None)
9865    
9866     * Thuban/UI/tree.py (update_tree): added filename and modified flag
9867    
9868     * Thuban/Model/load.py (ProcessSession): convert projection
9869     parameters from unicode to regular string
9870    
9871     * Data/iceland_sample.session: Added UTM Zone 26 projection.
9872    
9873 bh 100 2002-04-11 Bernhard Herzog <[email protected]>
9874    
9875     * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
9876     extensions/shapelib/dbfopen.c: Update to the versions of shapelib
9877     1.2.9
9878    
9879     * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
9880     the pyshapelib directoy into the list of include dirs, so that
9881     pyshapelib_api.h can be found.
9882    
9883     * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
9884     holds the pyshapelib C-API
9885     (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
9886     pyshapelib_api to access the shapelib functions.
9887     (initwxproj): Import the c_api from the shapelib module and
9888     initialize pyshapelib_api.
9889    
9890 bh 89 2002-04-04 Bernhard Herzog <[email protected]>
9891    
9892 bh 91 * setup.py (thuban_bdist_rpm.initialize_options): Use
9893     initialize_options to create the scripts for the rpm.
9894    
9895 bh 89 * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
9896    
9897 bh 85 2002-04-03 Bernhard Herzog <[email protected]>
9898    
9899 bh 87 * setup.py: Increment version to 0.1.1
9900    
9901 bh 85 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
9902     Layer" and "Remove Layer" commands from the layer menu to the map
9903     menu
9904    
9905 bh 83 2002-02-15 Bernhard Herzog <[email protected]>
9906    
9907     * Thuban/Model/layer.py (Layer.Shape): list append only takes one
9908     argument (python <= 1.5.2 erroneously accepted multiuple
9909     arguments)
9910    
9911 bh 81 2002-02-04 Bernhard Herzog <[email protected]>
9912    
9913     * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
9914     RecordGrid in the identifyview.
9915     (IdentifyView.__init__): Use IdentifyGridCtrl instead of
9916     IdentifyListCtrl. The grid allows editing of the values.
9917    
9918     * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
9919     implementing a grid for a single row of a thuban table.
9920    
9921     * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
9922     layers by default. Easier to use than the previous default of only
9923     searching through the select layer which meant that if no layer
9924     was selected, you couldn't select a shape.
9925    
9926     * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
9927    
9928     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
9929     stroke_width attribute
9930    
9931     * Thuban/Model/save.py (save_session): Write the new stroke_width
9932     attribute
9933    
9934     * Thuban/Model/load.py (ProcessSession.startElement): Read the
9935     stroke_width attribute
9936    
9937     * Thuban/Model/layer.py (Layer.__init__): New parameter and
9938     instance variable stroke_width
9939     (Layer.SetStrokeWidth): Set the stroke_width.
9940    
9941 bh 72 2002-02-01 Bernhard Herzog <[email protected]>
9942    
9943     * extensions/thuban/wxproj.cpp (project_points): Fix two
9944     off-by-one errors in the last loop that joins the various parts
9945     together.
9946    
9947 bh 71 2002-01-14 Bernhard Herzog <[email protected]>
9948    
9949     * setup.py (data_dist.make_distribution): Fix some typos
9950    
9951 bh 70 2001-09-18 Bernhard Herzog <[email protected]>
9952    
9953     * README: Slight tweaking in preparation for the 0.1 release
9954    
9955     * setup.cfg: Add section for sdist to create both tgz and zip
9956     archives
9957    
9958     * setup.py: increase version number to 0.1
9959     (data_dist): New command class for data distribution
9960    
9961 bh 64 2001-09-14 Bernhard Herzog <[email protected]>
9962    
9963 bh 70 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
9964     Handle the case of no layer (i.e. layer is None) properly.
9965    
9966 tkoester 403 * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
9967 bh 70 Set the initial selection of the combo boxes to reflect the
9968     projection we're starting with in a way that works on windows,
9969     too.
9970    
9971 bh 64 * Thuban/Lib/connector.py (Connector.print_connections): Print the
9972     puiblisher's ids in hex to make it easier to compare them to the
9973     standard repr of python methods
9974    
9975     * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
9976     messages
9977    
9978 bh 59 2001-09-13 Bernhard Herzog <[email protected]>
9979    
9980 bh 64 * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
9981     deselect the layer if no layer is selected
9982    
9983 bh 59 * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
9984     idle time when there actually is something to draw. If there's
9985     nothing to draw simply clear the window
9986     (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
9987     (MapCanvas.SetMap): force a redraw in all cases because
9988     FitMapToWindow doesn't always do it.
9989     (MapCanvas.ZoomFactor): Add an optional parameter, center, to
9990     specify the point to move into the center of the window
9991     (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
9992     dragged, zoon in/out by a factor of 2
9993 bh 64 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
9994     index, i.e. reversed drawing order) so that objects appearing to
9995     be in from of others are selected first. This is probably mostly
9996     relevant for point shapes where the symbols used may overlap
9997 bh 59
9998     * Thuban/Model/session.py (create_empty_session): Unset the
9999     modified bit before returning it
10000    
10001     * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
10002     create_empty_session session to create the new, empty session.
10003    
10004     * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
10005     the tool bitmaps.
10006     (MainWindow.OnClose, MainWindow.save_modified_session): Separate
10007     the code that asks whether the session should be saved into the
10008     new method save_modified_session.
10009     (MainWindow.OpenSession, MainWindow.NewSession): Use the new
10010     method to save modified session here too.
10011    
10012 bh 55 2001-09-11 Bernhard Herzog <[email protected]>
10013    
10014     * setup.py (InnoIconItem): fix typo
10015    
10016     (thuban_bdist_inno.run):
10017     (bdist_inno.run): Move the decision not to create symlinks on
10018     non-nt platforms to thuban_bdist_inno and do it unconditinally
10019     since we never want to create the symlinks here
10020    
10021 bh 48 2001-09-10 Bernhard Herzog <[email protected]>
10022    
10023 bh 53 * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
10024     identify view immediately
10025    
10026     * Thuban/UI/controls.py: New file with two classes RecordListCtrl
10027     and SelectableRecordListCtrl that implement the code shared by the
10028     identify view and the label dialog
10029    
10030     * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
10031     new class RecordListCtrl
10032    
10033     * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
10034     return value of GetValue is None instead of using it as a boolean
10035     directly so that Zero numbers are handled properly.
10036     (LabelListCtrl): Derive from the new class
10037     SelectableRecordListCtrl
10038    
10039 bh 48 * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
10040     (Proj4Dialog.dialogLayout): Make the window resizable and set the
10041     size of the text control explicitly to make the sizers work on
10042     both Windows and X.
10043    
10044 bh 44 2001-09-07 Bernhard Herzog <[email protected]>
10045    
10046     * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
10047     that can limit the search to the currently selected layer.
10048     (MapCanvas.SelectShapeAt): Make sure that the currently selected
10049     layer stays selected even when no shape is found
10050 bh 46 (MapCanvas.FitRectToWindow): If the rect has zero with or zero
10051     height do nothing (avoids zero division errors)
10052 bh 44
10053 bh 32 2001-09-06 Bernhard Herzog <[email protected]>
10054    
10055 bh 42 * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
10056     Correct the spelling of SessionTreeCtrl. dabbrev is too damn
10057     convenient :-)
10058     (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
10059     a new instvar layer_to_item to map layers to tree items
10060     (SessionTreeCtrl.layer_selected): Select the appropriate tree item
10061     to match the current selection in the interactor
10062    
10063 bh 40 * Thuban/UI/interactor.py (Interactor.SelectedLayer):
10064     (Interactor.HasSelectedLayer): New methods to query the current
10065     selection
10066    
10067     * Thuban/UI/mainwindow.py (MainWindow.current_layer):
10068     (MainWindow.has_selected_layer): Simply call the appropriate
10069     interactor method
10070    
10071     * Thuban/UI/mainwindow.py (MainWindow.__init__):
10072     (MainWindow.LayerShowTable):
10073     (MainWindow.identify_view_on_demand): Store the interactor in an
10074     instvar and use that reference instead of going through main.app
10075    
10076 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
10077     * Thuban/UI/application.py (ThubanApplication.OnInit):
10078 bh 40 * Thuban/UI/main.py (main): Create the session tree view in main
10079     with the new mainwindow method ShowSessionTree and not directly
10080     the application's OnInit method
10081    
10082     * Thuban/UI/tree.py (myTreeCtrlPanel):
10083     (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
10084     TreeCtrl isntead of a panel. This affects most method since we now
10085     refer to self instead of self.tree
10086     (SessionTreeView): New class implementing a non-modal dialog
10087     showing the session tree.
10088    
10089 bh 35 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
10090     layer to the tableview dialog.
10091    
10092     * Thuban/UI/tableview.py: Add some doc-strings
10093 tkoester 403 (TableGrid):
10094 bh 35 (TableGrid.OnRangeSelect):
10095     (TableGrid.OnSelectCell):
10096     (TableFrame.__init__):
10097     (TableFrame.row_selected):
10098     Selecting rows in the grid view now updates the selected shapes
10099     through the TableFrame. To achieve this we derive TableGrid from
10100     Publisher and introduce the message type ROW_SELECTED which the
10101     TableFrame subscribes to and which is issued by OnRangeSelect and
10102     OnSelectCell
10103    
10104     (DataTable.SelectRow): Removed because it's no longer needed in
10105     the row/shape selection scheme
10106    
10107 bh 32 * Thuban/UI/dialogs.py: New file implementing common classes for
10108     dialogs
10109    
10110     * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
10111     the SELECTED_SHAPE message anymore. This is now handled by the
10112     parent.
10113     (TableGrid.select_shape): Only update the selection if the shape
10114     is not None.
10115     (TableFrame): Inherit from the new NonModalDialog class.
10116     (TableFrame.__init__, TableFrame.select_shape): Handle the
10117     SELECT_SHAPE message.
10118     (TableFrame.OnClose): Extend the inherited method to unsubscribe
10119     SELECT_SHAPE
10120    
10121     * Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
10122     (MainWindow.add_dialog):
10123     (MainWindow.dialog_open):
10124     (MainWindow.remove_dialog):
10125     (MainWindow.get_open_dialog): New methods to maintain a dictionary
10126     of opened non-modal dialogs.
10127    
10128     (MainWindow.__init__): Initialize the new non-modal dictionary
10129     management code
10130     (MainWindow.LayerShowTable): maintain separate dialogs for each
10131     table using the non-modal dialog management code to only open a
10132     view once for each table.
10133    
10134     (MainWindow.IdentifyTool):
10135     (MainWindow.__init__):
10136     (MainWindow.identify_view_on_demand): Don't open the identify view
10137     in IdentifyTool anymore. This will be done automatically by the
10138     new method identify_view_on_demand which handles the
10139     SELECTED_SHAPE message so that the identify view will be opened on
10140     demand
10141    
10142     * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
10143     the interactor argument. The SELECTED_SHAPE message is now handled
10144     by the parent.
10145     (IdentifyView.__init__): Add the interactor argument so that we
10146     can handle the SELECTED_SHAPE message here
10147     (IdentifyView.selected_shape): New method to handle the
10148     SELECTED_SHAPE messages
10149    
10150     * Thuban/UI/identifyview.py (IdentifyView): Derive from the new
10151     NonModalDialog class
10152     (IdentifyView.OnClose): Extend the inherited version to
10153     unsubscribe SELECT_SHAPE
10154    
10155     * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints
10156    
10157 bh 26 2001-09-05 Bernhard Herzog <[email protected]>
10158    
10159     * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
10160 tkoester 403
10161 bh 26 * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
10162     interactor to pass through to the MapCanvas
10163 tkoester 403
10164 bh 26 * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
10165     argument to the MainWindow constructor to get rid of the ugly hack
10166     that made main.app available early just so that the mapcanvas
10167     could access the interactor object.
10168    
10169 bh 19 2001-09-04 Bernhard Herzog <[email protected]>
10170    
10171 bh 22 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
10172     that runs a modal message box
10173     (MainWindow.OnClose): Use the new method
10174     (MainWindow.RemoveLayer): Just do nothing in case no layer is
10175     selected. The command should be grayed out anyway, so there's no
10176     need to pop up a message box.
10177     (MainWindow.AddLayer): Pop up a message box with an error message
10178     if the shape file can't be opened
10179    
10180     * Thuban/Model/layer.py (Layer.__init__): Open the shapefile
10181     immediately. This will cause an exception in case the file can't
10182     be opened and we can display an appropriate message.
10183    
10184 bh 19 * MANIFEST.in: Add extensions/pyprojection/LICENSE
10185    
10186     * setup.py (thuban_bdist_rpm): New class implementing a Thuban
10187     specific bdist_rpm command.
10188    
10189     * Thuban/UI/main.py: Catch ImportError exceptions when importing
10190     the locale module because it may not be available on some
10191     installations.
10192    
10193     * extensions/pyprojection/LICENSE: Copy of the license text in
10194     Projection.i. Having it in a separate file makes it easier to
10195     refer to license text in e.g. RPMs
10196    
10197 bh 18 2001-09-03 Bernhard Herzog <[email protected]>
10198    
10199 bh 19 * setup.py: use wx-config instead of wxgtk-config because it's
10200     more generic
10201    
10202     * setup.py (ThubanInstall.get_outputs): Add the symlink in
10203     <prefix>/bin to the outputs
10204     (ThubanInstall.link_file): New method to link files. We need this
10205     because the standard copy_files refuses to link non-existing
10206     files.
10207     (ThubanInstall.run): Remove the leading install root from the
10208     script filename if an install root was specified and use the new
10209     link_file method
10210 tkoester 403
10211 bh 18 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
10212     the window when the first layer is added to the map.
10213    
10214     * setup.py (ThubanInstall.run): Honor the build root (self.root)
10215     when linking thuban.py to <prefix>/bin
10216    
10217 bh 16 2001-08-31 Bernhard Herzog <[email protected]>
10218    
10219     * setup.py: In the setup call, the install parameters shouldn't
10220     have trailing slashes because distutils on non-posix platforms
10221     doesn't like that. The same applies to other directories like
10222     "Resources/Bitmaps"
10223    
10224     In the configuration section for nt, move the wxWindows directory
10225     optins into the part clearly marked as editable.
10226    
10227     (InstallLocal.initialize_options):
10228     (InstallLocal.user_options): remove the currently unused debug
10229     flag
10230     (thuban_build_py.find_all_modules): Add this method so that it
10231     works for our case of having packages and modules in one
10232     distribution as well.
10233     (ThubanInstall.initialize_options):
10234     (ThubanInstall.finalize_options):
10235     (ThubanInstall.user_options):
10236     (ThubanInstall.boolean_options): Add new options, do-symlink and
10237     extra files. Since these are the first ThubanInstall specific
10238     options, override user_options and boolean_options
10239     (ThubanInstall.run): Honor the new do-symlink and extra-files
10240     options.
10241     (ThubanInstall.get_outputs): Add to override the base-class's
10242     version and add the extra-files to the outputs
10243     (bdist_inno): New class for windows distributions with Inno Setup
10244     (InnoIconItem): Helper class for bdist_inno
10245     (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
10246     this together with the appropriate parameters, to the setup call.
10247 tkoester 403
10248 bh 16 * setup.cfg (bdist_inno): added new section for the inno setup
10249     installer
10250    
10251     * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
10252     changing_selection to avoid recursive selection events when
10253     modifying the selection in response to a selection event.
10254     (myTreeCtrlPanel.normalize_selection): Set the new inst var when
10255     changing the tree's selection.
10256     (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
10257     we're not being called indirectly from normalize_selection.
10258    
10259     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
10260     event.Check only if the command is actuall checkable.
10261     (MainWindow.__init__): Call the toolbar's Realize method to make
10262     sure that the items are actually shown
10263    
10264 bh 7 2001-08-28 Bernhard Herzog <[email protected]>
10265    
10266 bh 9 * setup.py: Fix some doc strings
10267    
10268 bh 7 * ChangeLog: started
10269    

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26