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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 59 by bh, Thu Sep 13 13:56:47 2001 UTC revision 1463 by bh, Fri Jul 18 15:33:58 2003 UTC
# Line 1  Line 1 
1    2003-07-18  Bernhard Herzog  <[email protected]>
2    
3            * test/test_viewport.py (SimpleViewPortTest.test_default_size):
4            Move this test from ViewPortTest.setUp to this new separate test
5            case. setUp is not the place for the actual tests.
6            (ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
7            more of the test from setUp to the new test test_inital_settings.
8            (ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
9            (ViewPortTest.test_proj_conv): Split test_proj_conv into
10            test_win_to_proj and test_proj_to_win and make the tests easier to
11            understand
12            (ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
13            (ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
14            (ViewPortTest.test_unprojected_rect_around_point)
15            (ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
16            Reformat to increase readability.
17    
18    2003-07-18  Bernhard Herzog  <[email protected]>
19    
20            * Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.
21    
22    2003-07-18  Bernhard Herzog  <[email protected]>
23    
24            * test/runtests.py: The test suite can now be run without an X
25            connection. To make sure this remains true, remove the DISPLAY
26            environment variable so that an error occurs if the wxGTK is
27            imported accidentally
28    
29    2003-07-18  Bernhard Herzog  <[email protected]>
30    
31            * Thuban/UI/viewport.py: Remove unused imports
32    
33            * Thuban/UI/view.py: Remove unused imports
34    
35    2003-07-18  Bernhard Herzog  <[email protected]>
36    
37            * test/test_export.py Remove unused imports. The OutputTransform
38            function is now in viewport.py and is called output_transform
39            (TestScalebar.test_output_transform)
40            (TestScalebar.test_OutputTransform): Renamed to
41            test_output_transform and updated to use output_transform instead
42            of OutputTransform
43    
44            * Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
45            renamed.
46            (MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
47            renamed to output_transform
48    
49            * Thuban/UI/viewport.py (OutputTransform, output_transform):
50            Rename to output_transform
51    
52    2003-07-18  Bernhard Herzog  <[email protected]>
53    
54            * Thuban/Model/layer.py (Layer.__init__): Rename
55            classificationField to classificatin_column and init it here so
56            that it can be used in SetClassificationColumn
57            (Layer.GetClassificationColumn, Layer.GetClassificationField):
58            Rename to GetClassificationColumn.
59            (Layer.SetClassificationColumn, Layer.SetClassificationField):
60            Rename to SetClassificationColumn and issue a LAYER_CHANGED
61            message if the column changes.
62            (Layer._classification_changed, Layer.ClassChanged): Rename to
63            _classification_changed. Update the callers.
64            (Layer.SetShapeStore): Further field->column renames.
65    
66            * Thuban/Model/load.py (SessionLoader.start_classification)
67            (SessionLoader.start_clpoint): Updates because of
68            field->column method name changes in the Layer class
69    
70            * Thuban/Model/save.py (SessionSaver.write_classification): Updates
71            because of field->column method name changes in the Layer class
72    
73            * Thuban/UI/classifier.py (Classifier.__init__)
74            (Classifier._OnTry, Classifier._OnRevert): Updates because of
75            field->column method name changes in the Layer class
76    
77            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
78            because of field->column method name changes in the Layer class
79    
80            * Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
81            of field->column method name changes in the Layer class
82    
83            * test/test_save.py (SaveSessionTest.testClassifiedLayer)
84            (SaveSessionTest.testClassifiedLayer): Update because of
85            field->column method name changes in the Layer class
86    
87            * test/test_layer.py (SetShapeStoreTests.setUp)
88            (SetShapeStoreTests.test_sanity): Update because of field->column
89            method name changes in the Layer class
90            (TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
91            (TestLayerModification.test_sanity)
92            (TestLayerModification.test_initial_settings): remove unsued code
93            and rename to test_sanity.
94            (TestLayerModification.test_set_classification): New test for
95            SetClassification and SetClassificationField.
96    
97    2003-07-18  Bernhard Herzog  <[email protected]>
98    
99            * test/test_classgen.py (TestFixedRamp.test): Extend test to check
100            the non-fixed values as well. The old test would have accepted a
101            fixed ramp that only returnes the fixed properties
102    
103    2003-07-17  Jonathan Coles   <[email protected]>
104    
105            * Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
106            shots for the manual. The XCF file is the source image and
107            has additional layers to support changes.
108    
109            * Doc/manual/thuban-manual.xml: Wrote an initial Introduction.
110    
111            * Thuban/UI/classifier.py (Classifier.__BuildClassification):
112            Return both the new class and the field name.
113    
114            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't
115            fit the map to the window as this changes any zoom level that
116            the user may have set.
117    
118    2003-07-16  Jonathan Coles   <[email protected]>
119    
120            * Thuban/Model/classgen.py (generate_singletons,
121            generate_uniform_distribution, generate_quantiles): Remove
122            fixes parameter, but maintain the same functionality by having
123            the calling function pass a FixedRamp object for the ramp.
124            (FixedRamp): New. Adapts a ramp to have fixed property values.
125    
126            * Thuban/Model/classification.py: Use new CLASS_CHANGED message.
127            (Classification): Inherit from Publisher.
128            (Classification.__init__): Remove the layer parameter.
129            Classifications no longer need to have a parent layer.
130            (Classification.GetField, Classification.GetFieldType,
131            Classification.SetFieldInfo): Removed. The field name is stored
132            in the layer, and the type can be retreived by calling
133            Layer.GetFieldType().
134            (Classification._set_layer, Classification.GetLayer): Removed.
135            Classifications no longer have a parent layer.
136    
137            * Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
138            classification.
139            (Layer.SetShapeStore): Reset the classification first while
140            we still have the old shape store to work with.
141            (Layer.GetClassificationField, Layer.SetClassificationField):
142            New. Method for getting/setting the field to classify on.
143            (Layer.SetClassification): Simplified now that the layer
144            simply has to hold a reference to the classification and not
145            tell the classification who owns it.
146            Fixes RTbug #2023.
147    
148            * Thuban/Model/load.py (SessionLoader.start_classification):
149            Set the field name on the layer, not the classification.
150    
151            * Thuban/Model/messages.py: Add CLASS_CHANGED for when a
152            classification is modified.
153    
154            * Thuban/Model/save.py (SessionSaver.write_classification):
155            Get the field name and type from the layer.
156    
157            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
158            parameter records to rows and add docstring. Fixes RTbug #1997.
159    
160            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
161            ramp when we need to fix certain values of a ramp rather than
162            using the old fixes parameter. Fixes RTbug #2024.
163    
164            * Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
165            parameter.
166            (ClassTable.Reset): Add fieldType parameter and use it, rather
167            than asking the classification.
168            (Classifier.__init__): Remember the original class's field
169            and ask the layer for the field type, rather than the classification.
170            (Classifier.__SetGridTable): Retrieve the field and field type
171            for the table because they are not in the classification.
172            (Classifier._OnTry, Classifier._OnRevert): Set the classification
173            field on the layer in addition to the classification itself.
174    
175            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
176            classification field from layer.
177    
178            * Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
179            classification field from layer. Split up tests and remove
180            *-imports. Fixes RTbug #1992.
181    
182            * test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.
183    
184            * test/test_classification.py
185            (TestClassification.test_classification): Remove tests for methods
186            that no longer exist.
187    
188            * test/test_layer.py (SetShapeStoreTests.setUp): Classification
189            __init__ no longer has a field parameter, use SetClassificationField.
190            (SetShapeStoreTests.test_sanity): Use layer object to get class
191            field info.
192    
193            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
194            SetClassificationField on layer to set class field info.
195    
196            * test/test_viewport.py: Renamed from test/test_view.py.
197    
198    2003-07-16  Jan-Oliver Wagner <[email protected]>
199    
200            * Doc/manual/thuban-manual.xml: Added authors and an initial
201            coarse structure.
202    
203    2003-07-15  Bernhard Herzog  <[email protected]>
204    
205            * test/support.py (FloatComparisonMixin): This is a mix-in class
206            and therefore should not be derived from any other class.
207    
208            * test/test_range.py (RangeTest): FloatComparisonMixin is a
209            mix-in, so derive from TestCase as well.
210    
211    2003-07-15  Bernhard Herzog  <[email protected]>
212    
213            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
214            draw_func handling a bit to remove one layer of indirection. This
215            makes the renderer about 10% faster in the non-classifying case
216            and the code a bit cleaner
217            (MapRenderer.draw_point_shape): Add the pen and brush parameters
218            and set them in the dc. Now the draw_point_shape method and
219            wxproj's draw_polygon_shape function have basically the same
220            signature so that both can be directly used as draw_func
221    
222    2003-07-15  Bernhard Herzog  <[email protected]>
223    
224            * Thuban/Model/save.py (SessionSaver.write_classification): Encode
225            string values (in addition to the labels) as UTF 8
226    
227            * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
228            values if the field type is string
229    
230            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
231            saving a session with non-ascii string classification values.
232    
233            * test/test_load.py (TestClassification.file_contents)
234            (TestClassification.test): Check for non-ascii values in string
235            classifications
236    
237    2003-07-14  Jonathan Coles   <[email protected]>
238    
239            * test/test_view.py: New. Tests for ViewPort.
240    
241    2003-07-14  Frank Koormann   <[email protected]>
242    
243            * Thuban/Model/load.py (SessionLoader.start_map): Encode map
244            title to latin1.  Fixes https://intevation.de/rt/webrt?serial_num=2013
245    
246            * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
247            unicode strings from session file: session title, map title and
248            projection name.
249            
250    2003-07-10  Jonathan Coles   <[email protected]>
251    
252            * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
253            drag_stop, not drag_move when the mouse is released.
254    
255    2003-07-10  Jonathan Coles   <[email protected]>
256    
257            The most important part of this is the seperation of view.py into
258            two pieces. viewport.py now has a class called ViewPort which
259            contains all the non-wx parts of view.py and can therefore be
260            tested. view.py contains only the wx-specific parts and is fairly
261            simple.
262    
263            * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
264            RTTbug #1992.
265            * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
266            RTTbug #1992.
267    
268            * Thuban/Model/classgen.py (generate_singletons,
269            generate_uniform_distribution, generate_quantiles):
270            Added 'fixes' parameter so that property attributes can
271            be held constant over the generated classification groups.
272            (CustomRamp.GetProperties): Remove unused variables.
273    
274            * Thuban/Model/map.py (Map.SetProjection): Send the old
275            projection as an argument to listeners of the MAP_PROJECTION_CHANGED
276            event.
277    
278            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
279            parameter which is a list of records that restricts which
280            records are saved. Fixes RTbug #1997.
281    
282            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
283            Port exception dialog from GREAT-ER. Fixes RTbug #1993.
284    
285            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
286            to allow the user to fix line color/width on generated groups.
287            (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
288            functions to optionally fix group properties.
289    
290            * Thuban/UI/main.py (main): Set exception hook to the
291            ShowExceptionDialog. Fixes RTbug #1993.
292    
293            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
294            the table window when it is selectd to be shown.
295    
296            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
297            Export Selection button and move the export buttons underneath
298            the table.
299            (QueryTableFrame.UpdateStatusText): Added event argument so
300            that it can respond to grid selection events. The status text
301            is now updated even when the table is not associated with a
302            layer as was previously assumed.
303            (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
304            UpdateStatusText responds to these events.
305            (QueryTableFrame.OnSaveAs): Renamed to doExport.
306            (QueryTableFrame.doExport): Helper function that saves the
307            entire table, or selected rows, to a file.
308            (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
309            Respond to export button events and call doExport.
310    
311            * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
312            the function doesn't return NULL without first setting a Python
313            Error.
314    
315            * test/runtests.py (main): Only print "Unknown option" for
316            unsupported options.
317    
318            * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
319            optional epsilon argument to specify floating point accuracy.
320            (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
321            for each item test.
322    
323            * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
324            tests for saving selected records.
325    
326            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
327            tests for saving selected records.
328    
329            * test/test_map.py (TestMapWithContents.test_set_projection):
330            MAP_PROJECTION_CHANGED events send the old projection.
331    
332            * test/test_session.py
333            (TestSessionWithContent.test_forward_map_projection):
334            MAP_PROJECTION_CHANGED events send the old projection.
335    
336            * test/test_table.py (TableTest): Update tests to use non-deprecated
337            functions.
338    
339    2003-07-08  Bernhard Herzog  <[email protected]>
340    
341            * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
342            constants in the column objects are the standard ones defined in
343            the table module.
344    
345            * test/test_transientdb.py
346            (TestTransientTable.test_transienttable_to_dbf): New. Test whether
347            exporting transient tables as DBF works. This should catch the bug
348            just fixed in TransientTableBase.Width.
349    
350    2003-07-08  Bernhard Herzog  <[email protected]>
351    
352            * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
353            interpolated colors correctly.
354    
355            * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
356            New. Test case for the fix in classgen.py
357    
358    2003-07-08  Bernhard Herzog  <[email protected]>
359    
360            * test/runtests.py (main): Make the default output less verbose
361            and add a verbosity option (-v) to get the old output
362    
363    2003-07-08  Bernhard Herzog  <[email protected]>
364    
365            * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
366            0.9.
367    
368            * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
369            New. Return the join type
370    
371            * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
372            DTD
373            (SessionSaver.write_data_containers): Save the join type for
374            joined tables
375    
376            * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
377            namespace
378            (SessionLoader.start_jointable): Handle the jointype attribute
379    
380            * test/test_load_0_8.py: New. Effectively a copy of test_load.py
381            as of Thuban 0.8. These are now tests to determine whether Thuban
382            can still read files generated by Thuban 0.8
383    
384            * test/test_load.py (LoadSessionTest.dtd)
385            (TestSingleLayer.file_contents)
386            (TestLayerVisibility.file_contents, TestLabels.file_contents)
387            (TestLayerProjection.file_contents)
388            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
389            (TestJoinedTable.file_contents)
390            (TestLoadError.file_contents): Update for new DTD
391            (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
392            for new join type attribute
393    
394            * test/test_save.py (SaveSessionTest.dtd)
395            (SaveSessionTest.testEmptySession)
396            (SaveSessionTest.testSingleLayer)
397            (SaveSessionTest.testLayerProjection)
398            (SaveSessionTest.testRasterLayer)
399            (SaveSessionTest.testClassifiedLayer)
400            (SaveSessionTest.test_dbf_table)
401            (SaveSessionTest.test_joined_table): Update for new DTD
402            (SaveSessionTest.test_joined_table): Add test for new join type
403            attribute
404    
405    2003-07-04  Bernhard Herzog  <[email protected]>
406    
407            * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
408            function for table_to_dbf
409            (table_to_dbf): Deal with names longer than the 10 character limit
410    
411            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
412            doc-string
413            (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
414            long column names
415    
416    2003-07-03  Bernhard Herzog  <[email protected]>
417    
418            * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
419    
420    2003-07-03  Bernhard Herzog  <[email protected]>
421    
422            * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
423            for the Thuban manual and README with some basic information about
424            the manual
425    
426    2003-07-03  Bernhard Herzog  <[email protected]>
427    
428            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
429            Update doc-string
430            (TransientJoinedTable.create): Do not modify the column objects of
431            the input tables in place and copy all columns of the input tables
432            into the joined table after all.
433    
434            * test/test_transientdb.py
435            (TestTransientTable.test_transient_joined_table_same_column_name):
436            Update to reflect the new behavior
437            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
438            Update to reflect the new behavior
439            (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
440            New test case for a bug which modified the column objects in place
441    
442    2003-07-02  Jonathan Coles   <[email protected]>
443    
444            * Thuban/Model/classgen.py (generate_singletons,
445            generate_uniform_distribution, generate_quantiles,
446            GenQuantiles0): Make sure maxValue isn't less than
447            one, otherwise we could divide by zero.
448    
449            * test/test_classgen.py (ClassGenTest.doClassRangeTest,
450            ClassGenTest.doClassSingleTest): Call doBoundsTest to
451            check the end classification groups against the
452            proper property values.
453            (ClassGenTest.doBoundsTest): New. Checks the first and
454            last classification groups to make sure their properties
455            are the correct upper and lower bounds for a color ramp.
456    
457    2003-07-02  Jonathan Coles   <[email protected]>
458    
459            * Thuban/Model/classgen.py (generate_singletons,
460            generate_uniform_distribution, generate_quantiles,
461            GenQuantiles0): The denominator was one to high when
462            calculating the index for the ramp causing the index
463            to never to reach one.
464    
465    2003-07-02  Jonathan Coles   <[email protected]>
466    
467            Changed the singature of ClassGroupRange.__init__ and
468            ClassGroupRange.SetRange() so that the min/max values are
469            passed as a tuple. This makes a better calling scheme for
470            when a Range object is passed instead.
471    
472            * Thuban/Model/classgen.py: Fixed parameters to
473            ClassGroupRange constructor.
474    
475            * Thuban/Model/classification.py (ClassGroupRange.__init__):
476            Consolidate the min/max parameters into a single _range which
477            can either be a tuple or a Range object.
478            (ClassGroupRange.SetRange): Consolidate the min/max parameters
479            into a single _range which can either be a tuple or a Range object.
480    
481            * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
482            call to ClassGroupRange constructor to use a tuple.
483    
484            * Thuban/Model/layer.py (Layer.SetClassification): Switch
485            the classification instance variable to the new class
486            before calling _set_layer otherwise subscribers to a
487            LAYER_CHANGED event will not see any difference.
488    
489            * test/test_classification.py: Fix tests of ClassGroupRange
490            so that they use the new signature.
491    
492            * test/test_load.py: Fix use of ClassGroupRange so that it
493            uses the new signature.
494    
495            * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
496            uses the new signature.
497    
498            * test/test_save.py: Fix use of ClassGroupRange so that it
499            uses the new signature.
500    
501    
502    2003-07-01  Jonathan Coles   <[email protected]>
503    
504            * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
505            Import used objects/class from color.
506            (generate_singletons): We don't
507            need the numGroups parameter anymore because we are using
508            the new ramps with GetProperties().
509            (generate_uniform_distribution): Use new ramp method
510            GetProperties().
511            (generate_quantiles, GenQuantiles0): Use new ramp method
512            GetProperties().
513            (CustomRamp.SetNumGroups): Removed. The ramps now map
514            a value from 0 to 1 to class properties so the number
515            of groups is not needed ahead of time.
516            (CustomRamp.next): Removed. CustomRamp does not support
517            interation anymore.
518            (CustomRamp.GetProperties): Returns a ClassGroupProperties
519            object based on the index value from 0 to 1 that is
520            passed to it.
521            (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
522            Made into instances of Monochromatic class instread of
523            deriving from it.
524            (HotToCold.SetNumGroups): Removed. See CustomRamp.
525            (HotToCold.next): Removed. See CustomRamp.
526    
527            * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
528            (Classification.SetField, Classification.SetFieldType):
529            Replaced with SetFieldInfo.
530            (Classification.SetFieldInfo): New. Does a better job of
531            what SetField and SetFieldType used to do by combining
532            their function since they should really always be done
533            at the same time.
534            (Classification.SetLayer): Renamed to _set_layer.
535            (Classification._set_layer): Should only be called from
536            Layer's SetClassification. This does not cause a recursive
537            call as SetLayer did because we know that Layer knows about
538            the classification.
539    
540            * Thuban/Model/color.py: Fixes RTbug #1971.
541            (_Transparent): Renamed from Transparent so it doesn't
542            conflict with the module variable.
543            (Transparent, Black): Renamed from Color.Transparent,
544            Color.Black so they are not class variables.
545    
546            * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
547            (Layer.Destroy): We don't need to call SetClassification
548            anymore to clear out the back reference in the classifcation
549            to the layer. It's better to set it to None using _set_layer,
550            and we won't be creating another clas object too.
551            (Layer.SetClassification): Classification._set_layer is not
552            recursive so remove all the locking variables. Also clean
553            up the code so that it remains unchanged if something fails.
554    
555            * Thuban/Model/load.py: Fixes RTbug #1971.
556            (SessionLoader.start_classification): Call
557            Classification.SetFieldInfo().
558    
559            * Thuban/Model/save.py: Removed import of Color which wasn't
560            being used.
561    
562            * Thuban/UI/classgen.py: Fixes RTbug #1972.
563            (ClassGenDialog.__init__): Color ramps are now instances
564            already so we don't need to create any new objects.
565            (ClassGenDialog.OnOK): Check for numGroups is no longer
566            necessary because we never use it.
567    
568            * Thuban/UI/classifier.py: Fixes RTbug #1971.
569            (Classifier.__BuildClassification, Classifier.__SetGridTable):
570            Call Classification.SetFieldInfo() instead of SetFieldType.
571    
572            * Thuban/UI/renderer.py: Fixes RTbug #1971.
573    
574            * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
575            (MapCanvas.__init__): Subscribe to the idle time event. Set
576            background color to white.
577            (MapCanvas.OnPaint): Set a flag indicating that we should
578            render the map during idle time. If we already have a bitmap
579            just draw it now.
580            (MapCanvas.OnIdle): New. Render the map only during idle time.
581            This also fixes a problem with the busy cursor under gtk.
582    
583            * test/test_classgen.py (ClassGenTest.test_generate_singletons):
584            Fix calls to generate_singletons because the signature changed.
585    
586            * test/test_classification.py: Fix color references and
587            change calls to Classification.[SetField|SetFieldType] to
588            SetFieldInfo.
589    
590            * test/test_load.py: Fix color references.
591    
592            * test/test_load_0_2.py: Fix color references.
593    
594            * test/test_save.py (SaveSessionTest.testClassifiedLayer):
595            Change calls to Classification.[SetField|SetFieldType] to
596            SetFieldInfo.
597    
598    2003-07-01  Frank Koormann   <[email protected]>
599    
600            MERGE from the greater-ms3 branch.
601    
602            * test/test_transientdb.py
603            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
604            New. Test join of two tables with partly equal column names.
605    
606            * Thuban/Model/transientdb.py (TransientJoinedTable.create):
607            If duplicates in left and right tables column names are found,
608            append '_' (underscores) to the name until it is unique.
609            Create always new internal names for the resulting table and reference
610            columns in the join statement with <table>.<column>
611    
612    2003-07-01  Bernhard Herzog  <[email protected]>
613    
614            * test/test_transientdb.py
615            (TestTransientTable.test_transient_joined_table_same_column_name):
616            New. Test whether joining on columns with the same names in both
617            tables works.
618            
619            * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
620            sure to use the right internal names even when joining on field
621            with the same names in both tables. Also, detect duplicate names
622            in the joined table correctly.
623    
624    2003-07-01  Frank Koormann   <[email protected]>
625    
626            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
627            Reverse List of layers to render in same order as in desktop legend.
628    
629    2003-06-30  Jonathan Coles   <[email protected]>
630    
631            * Thuban/version.py (make_tuple): Takes a version string
632            and splits it into a tuple of at most three integers.
633            Used make_tuple() to make tuple versions of the version
634            numbers.
635    
636            * Thuban/UI/about.py: Add Thuban email addresses.
637    
638    2003-06-30  Jonathan Coles   <[email protected]>
639    
640            * Thuban/version.py: SQLite/PySQLite version dependencies
641            were too high.
642    
643    2003-06-30  Jonathan Coles   <[email protected]>
644    
645            * Thuban/version.py: Update version to 0.8.1
646            
647            * MANIFEST.in: Added Projections so that default.proj is
648            included.
649    
650    2003-06-26  Jonathan Coles   <[email protected]>
651    
652            New About box with lots more information including library
653            versions and credits. More/better version checking before
654            Thuban starts.
655    
656            * Thuban/UI/about.py: New. New About box that displays
657            library version information and credits.
658    
659            * Thuban/version.py: Added new 'versions' dictionary which
660            contains the verions of various libraries which are checked
661            when the module loads.
662            (verify_versions): Check all version numbers and returns
663            a list of errors.
664    
665            * Thuban/UI/classifier.py (Classifier.__EnableButtons):
666            Reset the status of the buttons as the situation warrants,
667            but in a better more reliable way by not relying on the
668            current status to determine what needs to change.
669    
670            * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
671            (verify_versions): Remove most of the code since it is
672            now in Thuban.version.verify_versions.o
673    
674            * Thuban/UI/mainwindow.py (MainWindow.About): Call new
675            About box in Thuban.UI.about.
676    
677            * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
678            Returns the version of gdal library being used as a string.
679    
680            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
681            Removed.
682            (get_proj_version): Return the version of PROJ that the file
683            was compiled with.
684            (get_gtk_version): Return th version of GTK that the file
685            was compiled with.
686    
687    2003-06-25  Jonathan Coles   <[email protected]>
688    
689            * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
690            of the SelectPropertiesDialog should be self so the window
691            appears on top.
692            (ClassGroupPropertiesCtrl.DoEdit): The parent
693            of the SelectPropertiesDialog should be self so the window
694            appears on top.
695    
696            * Thuban/UI/resource.py: Cleaned up how we determine file
697            extensions.
698            (GetImageResource): Return an wxImage from our Resources.
699    
700    2003-06-24  Jonathan Coles   <[email protected]>
701    
702            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
703            Check that a layer has a classification before trying
704            to get it. Raster layers don't have classifications.
705    
706    2003-06-23  Jonathan Coles   <[email protected]>
707            
708            * setup.py: Add Resources/XML to resource list.
709        
710    2003-06-23  Jonathan Coles   <[email protected]>
711    
712            * setup.cfg: Fix copyright dates
713        
714    2003-06-23  Jonathan Coles   <[email protected]>
715    
716            * MANIFEST.in: Update with Resources/XML
717    
718            * setup.py: Don't include Locale resources yet as we don't
719            have any and it causes problems building the distribution
720            for Windows. Update version to 0.8.0.
721    
722            * Doc/thuban.dtd: Removed since it is now in Resources/XML.
723    
724            * Thuban/UI/mainwindow.py: Add blank line at the end because
725            file was not being read correctly building the Windows
726            distribution.
727    
728    2003-06-23  Jonathan Coles   <[email protected]>
729    
730            * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
731    
732            * Thuban/version.py: Temporarily update longversion for
733            the 0.8 release so that it doesn't have the cvs revision.
734    
735    2003-06-23  Jonathan Coles   <[email protected]>
736    
737            * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
738            to make sure that we don't create reentrant possibilities with
739            wxYield.
740    
741            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
742            directly to avoid the wxSafeYield() call which generates an
743            OnPaint event causing infinite recursion. Don't try to catch
744            exception anymore. This was for before there were limits on map
745            scaling.
746    
747    2003-06-23  Bernhard Herzog  <[email protected]>
748    
749            Bug fix for RT #1961:
750    
751            * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
752            Register DerivedShapestores with the session
753    
754            * Thuban/Model/session.py (Session.Tables): Make sure each table
755            is only listed once.
756    
757            * test/test_load.py (TestJoinedTable.test): Add check_format call.
758            Update file contents to match the one written out.
759    
760    2003-06-20  Bernhard Herzog  <[email protected]>
761    
762            * test/xmlsupport.py (SaxEventLister.startElementNS)
763            (SaxEventLister.endElementNS): Do not include the qname. Python
764            2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
765            is (presumably incorrectly) None, whereas it's a string with the
766            element name in the later versions.
767    
768            * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
769            (TestEventList.test_even_list_namespace): Update tests to reflect
770            the new behaviour
771            (TestEventList.test_even_list_id_normalization): Fix doc-string
772    
773    2003-06-20  Jonathan Coles   <[email protected]>
774    
775            * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
776            by deriving classes to determine if that layer supports shapes.
777            (Layer): Override HasShapes and return true.
778    
779            * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
780            instead of a direct call to wx[Begin|End]CusyCursor().
781            (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
782            table data.
783    
784            * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
785            New. Wrappers around the wxWindows functions that allow us to
786            make additional calls such as wxYield which gives the native
787            system a chance to update the cursor correctly.
788    
789            * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
790            instead of a direct call to wx[Begin|End]CusyCursor().
791    
792            * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
793            instead of a direct call to wx[Begin|End]CusyCursor().
794            (MapCanvas.find_shape_at): Check if the current search layer
795            support shapes, otherwise go on to the next layer.
796    
797            * test/test_layer.py: Add tests in each type of layer for
798            HasClassification() and HasShapes()
799    
800    2003-06-20  Jonathan Coles   <[email protected]>
801    
802            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
803            turning on the busy cursor to allow the system to change the
804            cursor before we begin painting. This fixes a problem that
805            was occuring only under GTK. Fixes RTbug #1840.
806    
807    2003-06-20  Bernhard Herzog  <[email protected]>
808    
809            * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
810            version.
811    
812            * Thuban/Model/save.py (sort_data_stores): New. Make topological
813            sort of the data sources so they can be written with sources that
814            data sources that depend on other data sources come after the
815            sources they depend on.
816            (SessionSaver.__init__): Add idmap instance variable to map from
817            objects to the ids used in the file.
818            (SessionSaver.get_id, SessionSaver.define_id)
819            (SessionSaver.has_id): New. Methods to manage the idmap
820            (SessionSaver.write): Use thuban-0.8.dtd
821            (SessionSaver.write_session): Add a namespace on the session and
822            write out the data sources before the maps.
823            (SessionSaver.write_data_containers): New. Write the data
824            containers.
825            (SessionSaver.write_layer): Layer elements now refer to a
826            shapestore and don't contain filenames anymore.
827    
828            * Thuban/Model/load.py (LoadError): Exception class to raise when
829            errors in the files are discovered
830            (SessionLoader.__init__): Define dispatchers for elements with a
831            thuban-0.8 namespace too.
832            (SessionLoader.check_attrs): New helper method to check and
833            convert attributes
834            (AttrDesc): New. Helper class for SessionLoader.check_attrs
835            (SessionLoader.start_fileshapesource)
836            (SessionLoader.start_derivedshapesource)
837            (SessionLoader.start_filetable, SessionLoader.start_jointable):
838            Handlers for the new elements in the new fileformat
839            (SessionLoader.start_layer): Handle the shapestore attribute in
840            addition to filename.
841            (SessionLoader.start_table, SessionLoader.end_table): Removed.
842            They were never used in the old formats and aren't needed for the
843            new.
844    
845            * Thuban/Model/session.py (Session.DataContainers): New method to
846            return all "data containers", i.e. shapestores and tables
847    
848            * test/xmlsupport.py (SaxEventLister.__init__)
849            (SaxEventLister.startElementNS, sax_eventlist): Add support to
850            normalize IDs.
851    
852            * test/test_xmlsupport.py
853            (TestEventList.test_even_list_id_normalization): New test case for
854            id normalization
855    
856            * test/test_load.py (LoadSessionTest.check_format): Use ID
857            normalization
858            (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
859            class atrributes used for ID normalization
860            (TestSingleLayer, TestLayerVisibility, TestLabels.test)
861            (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
862            file format
863            (TestJoinedTable): New test for loading sessions with joined
864            tables.
865            (TestLoadError): New. Test whether missing required attributes
866            cause a LoadError.
867    
868            * test/test_save.py (SaveSessionTest.thubanids)
869            (SaveSessionTest.thubanidrefs): New class attributes for ID
870            normalization in .thuban files.
871            (SaveSessionTest.compare_xml): Use id-normalization.
872            (SaveSessionTest.testEmptySession)
873            (SaveSessionTest.testLayerProjection)
874            (SaveSessionTest.testRasterLayer)
875            (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
876            (SaveSessionTest.testLayerProjection): The filename used was the
877            same as for testSingleLayer. Use a different one.
878            (SaveSessionTest.test_dbf_table)
879            (SaveSessionTest.test_joined_table): New test cases for saving the
880            new data sources structures.
881            (TestStoreSort, MockDataStore): Classes to test the sorting of the
882            data stores for writing.
883    
884            * test/runtests.py: Add CVS keywords
885    
886    2003-06-20  Jonathan Coles   <[email protected]>
887    
888            * test/test_session.py
889            (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
890            Use the cultural_landmark-point.dbf file for the store so that
891            the table rows and shape count match.
892    
893    2003-06-20  Jonathan Coles   <[email protected]>
894    
895            * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
896            an exception if the number of shapes is different from the
897            number of rows in the table. Address RTbug #1933.
898    
899            * test/test_layer.py (TestLayer.test_derived_store): Add
900            a test for the new exception in DerivedShapeStore.__init__.
901    
902            * test/support.py (FloatTestCase): Removed since there is
903            already FloatComparisonMixin. Fixes RTbug #1954.
904            (FloatComparisonMixin.assertFloatEqual): Include test for
905            infinity that was part of FloatTestCase.
906    
907            * test/test_range.py (RangeTest): Inherit from
908            support.FloatComparisonMixin now that we don't have
909            support.FloatTestCase.
910    
911    2003-06-20  Bernhard Herzog  <[email protected]>
912    
913            * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
914            the implementation in xmlsupport instead.
915            (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
916    
917            * test/test_proj.py: Import sax_eventlist from xmlsupport instead
918            of test_save
919    
920    2003-06-20  Bernhard Herzog  <[email protected]>
921    
922            * test/test_load.py (LoadSessionTest.check_format): New helper
923            method to make sure the test files we load might have been written
924            by the current thuban version.
925            (ClassificationTest.TestLayers, TestSingleLayer.test)
926            (TestLayerVisibility.test, TestClassification.test)
927            (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
928            Add check_format() calls and fix the thuban data to match the data
929            that would be written by saving the session loaded from it.
930    
931            * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
932            the same class and function in test_save.
933    
934            * test/test_xmlsupport.py (TestEventList): New. test cases for
935            sax_eventlist
936    
937    2003-06-20  Bernhard Herzog  <[email protected]>
938    
939            * Resources/XML/thuban.dtd: Add comment about which versions of
940            Thuban are covered by this DTD
941            (map): Fix content model for layers and raster layers. There can
942            be any number or layers and raster layers in any order.
943    
944    2003-06-20  Jonathan Coles   <[email protected]>
945    
946            This is mainly about fixing RTbug #1949.
947    
948            * Thuban/Model/classification.py: Remove "from __future__"
949            import statement since python 2.2 is the earliest supported
950            version.
951    
952            * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
953            Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
954            depending on the units this projection *forwards* into.
955    
956            * Thuban/Model/save.py (SessionSaver.write_classification):
957            Remove unnecessary use of lambdas and nested functions.
958    
959            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
960            adjustment here if the map projection uses degrees.
961    
962            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
963            scale adjust code since it is now done before calling
964            this method. Don't do anything if the map projection
965            is None.
966    
967    2003-06-19  Bernhard Herzog  <[email protected]>
968    
969            Move version specific load tests to their own file.
970    
971            * test/test_load.py: Expand the doc-string to explain a bit how to
972            handle file format changes.
973            (TestClassification.test): Update the docstring as this test is
974            not about Thuban 0.2 anymore.
975    
976            * test/test_load_0_2.py: New file with the load tests for thuban
977            files created with Thuban 0.2 and earlier.
978    
979    2003-06-19  Bernhard Herzog  <[email protected]>
980    
981            Add XML validation to some of the tests. Validation will only be
982            done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
983            To make the DTD available to the test cases it's moved into
984            Resources/XML
985    
986            * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
987            for versions up to and including 0.2. Two slight changes: added an
988            encoding specification and fixed the comment which refered to
989            GRASS, not Thuban
990    
991            * test/xmlsupport.py: New support module for tests involving XML.
992            Currently there's a mix-in class for XML validation.
993    
994            * test/test_xmlsupport.py: New. Tests for the xmlsupport module
995    
996            * test/test_save.py (SaveSessionTest): Derive from ValidationTest
997            so that we can validate the
998            (SaveSessionTest.testEmptySession)
999            (SaveSessionTest.testSingleLayer)
1000            (SaveSessionTest.testSingleLayer)
1001            (SaveSessionTest.testLayerProjection)
1002            (SaveSessionTest.testRasterLayer)
1003            (SaveSessionTest.testClassifiedLayer): Validate the generated XML
1004    
1005            * test/runtests.py (main): Call print_additional_summary instead
1006            of print_garbage_information
1007    
1008            * test/support.py (resource_dir): New function to return the
1009            "Resource" subdirectory
1010            (print_additional_summary): New function to combine several
1011            summary functions
1012            (run_tests): Use print_additional_summary instead of calling
1013            print_garbage_information directly
1014    
1015    2003-06-19  Bernhard Herzog  <[email protected]>
1016    
1017            * Doc/thuban.dtd (classification): Correct the content model of
1018            the classification element.
1019            (projection): Add the "name" attribute
1020    
1021    2003-06-19  Frank Koormann   <[email protected]>
1022    
1023            MERGE from the greater-ms3 branch.
1024    
1025            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
1026            scale if projection is latlong to get better estimate.
1027    
1028            Fix problem of hidden properties dialog under windows after double
1029            click on layer tree:
1030            The tree control always gets an Expanded / Collapsed event after
1031            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
1032            raises the already displayed window.
1033    
1034            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
1035            raiseProperties initialized to prevent endless loops
1036            (LegendTree._OnItemActivated): Depending on self.raiseProperties
1037            simply raise the properties or open the dialog and issue a second
1038            event.
1039    
1040    2003-06-18  Jonathan Coles   <[email protected]>
1041    
1042            * setup.py: Fix a few problems that occured under Windows.
1043    
1044    2003-06-18  Jonathan Coles   <[email protected]>
1045    
1046            When Thuban loaded the map was redrawn twice because the
1047            legend was being opened after the mainwindow was created
1048            and not during its creation. This meant the map was drawn
1049            initially and then had to be redrawn when the legend
1050            caused the display to change. Now the legend is opened
1051            in the mainwindow constructor which resolves this issue.
1052    
1053            Also, although we were checking for the existence of
1054            gdal and gdalwarp modules, the gdalwarp extension was
1055            still being compiled (which may fail if the system doesn't
1056            have gdal installed). the build_ext command to setup.py
1057            now accepts the flags --with-gdal and --without-gdal.
1058            If --without-gdal is specified setup.py will try to
1059            use the gdal parameters specified by gdal-config. Under
1060            windows, those parameters have to be set in setup.py
1061            as with proj4 an wxWindows.
1062    
1063            * setup.py: Use a list instead of seperate variables for
1064            extension parameters so we can create a generic function
1065            that runs an appropriate *-config script.
1066            (run_cs_script): Renamed from run_wx_script and modified
1067            to accept a second argument which is a list of lists to
1068            be filled in by the values returned from running the command.
1069            (thuban_build_ext): New. Extends the build_ext command and
1070            provides the options --with-gdal/--without-gdal which then
1071            optionally includes the gdalwarp extension.
1072    
1073            * Thuban/Model/resource.py: First check if we can import
1074            the gdalwarp Thuban extension before checking for gdal.
1075            Also added some comments.
1076            
1077            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
1078            the map is None which may be the case if none has been loaded
1079            yet.
1080    
1081            * Thuban/UI/main.py (main): Remove call to ShowLegend.
1082    
1083            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
1084    
1085            * Thuban/UI/renderer.py: Check for gdal support before importing
1086            gdalwarp.
1087            (MapRenderer.render_map): Only try to optimize if we have gdal
1088            support otherwise nothing will get drawn.
1089    
1090            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
1091            during startup before a map has been created. Check if map is None
1092            before using it and do nothing if it is.
1093    
1094    2003-06-17  Jonathan Coles   <[email protected]>
1095    
1096            Fix the problem with raster layers under Windows that caused
1097            Thuban to crash. The view should respond to layer projection
1098            changed events to update the display. Changes to a projection
1099            should not cause the map to be set to full extent.
1100            
1101            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
1102            current_map_proj to remember the current map projection so that
1103            when the projection changes we know what the previous projection
1104            was.
1105            (MapCanvas.SetMap): Unsubscribe and subscribe to
1106            LAYER_PROJECTION_CHANGED events.
1107            (MapCanvas.projection_changed): Split into two methods that respond
1108            to map and layer projection changes.
1109            (MapCanvas.map_projection_changed): New. Takes the current view and
1110            projects it using the new projection. This does not cause the
1111            map to be redrawn at full extent.
1112            (MapCanvas.layer_projection_changed): New. Cause a redraw which
1113            will draw each layer in its new projection.
1114            
1115            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
1116            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
1117            under Windows.
1118            
1119            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
1120            to twice sizeof(void*) because there are two digits for each
1121            hex byte.
1122    
1123    2003-06-16  Bernhard Herzog  <[email protected]>
1124    
1125            Update to the layer interface: Direct access to the table,
1126            shapetable, shapefile and filename attributes is now actively
1127            deprecated by issuing deprecation warnings for all places where
1128            this happens.
1129    
1130            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
1131            to the instance variables table, shapetable, shapefile and
1132            filename via __getattr__ so that we can issue a deprecation
1133            warning.
1134            (Layer.SetShapeStore): Don't set the deprecated instance variables
1135            any more
1136            (Layer.SetShapeStore): Don't use deprecated layer instance
1137            variables
1138            (Layer.Destroy): No need to explicitly remove the instance
1139            variables any more
1140            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
1141            instance variables
1142    
1143            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
1144            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
1145            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
1146            use deprecated layer instance variables
1147    
1148            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
1149            deprecated layer instance variables
1150    
1151            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
1152            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
1153            instance variables
1154    
1155            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
1156            deprecated layer instance variables
1157    
1158            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
1159            deprecated layer instance variables
1160    
1161            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
1162            deprecated layer instance variables
1163    
1164            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
1165            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
1166            variables
1167    
1168            * test/runtests.py (main): Turn Thuban's deprecation warnings into
1169            errors so that they're cought by the tests
1170    
1171            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
1172            layer instance variables
1173    
1174    2003-06-16  Jonathan Coles   <[email protected]>
1175    
1176            Fix a problem under Windows whereby if the user double-clicks on a
1177            layer in the legend that tree item will expand or collapse as well
1178            as open the layer properties dialog. The state of the tree item
1179            should not be affected.
1180    
1181            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
1182            preventExpandCollapse and subscribe to expanding and collapsing
1183            events.
1184            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
1185            collapsing events and will veto the event if it has been triggered
1186            by the user double clicking on a layer.
1187            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
1188            that an expanding/collapsing event should be vetoed.
1189    
1190    2003-06-13  Bernhard Herzog  <[email protected]>
1191    
1192            * Thuban/UI/classifier.py (Classifier.OnClose)
1193            (Classifier.map_layers_removed)
1194            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
1195            in OnClose and not in map_layers_removed or
1196            layer_shapestore_replaced to make sure it always happens when the
1197            dialog is closed
1198    
1199    2003-06-13  Jonathan Coles   <[email protected]>
1200    
1201            This puts back a fix for Windows where a panel is needed so that
1202            the background of the table view appears correctly.
1203    
1204            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
1205            object that can be used by derived classes to place any
1206            controls (including the grid) onto.
1207            (QueryTableFrame.__init__): Use the panel as the parent window
1208            for all the controls. Reparent the grid so that the panel is
1209            the parent. Call UpdateStatusText() to correctly initialize
1210            the status bar.
1211    
1212    2003-06-13  Jonathan Coles   <[email protected]>
1213    
1214            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
1215            from wxFrame (as opposed to wxDialog like the other classes)
1216            but otherwise behaves like the other classes. This is needed
1217            for the TableView which isn't really a dialog and needs to
1218            have a status bar and control buttons.
1219    
1220            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
1221            instance variable to keep track of how many rows are selected.
1222            Subscribe once to the the events we are interested in.
1223            (ThubanGrid.OnRangeSelect): Only handle event if event handling
1224            hasn't been turned off.
1225            (ThubanGrid.OnSelectCell): Only handle event if event handling
1226            hasn't been turned off.
1227            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
1228            as an event listener (which changes the event handler stack)
1229            simply set an instance variable to False. This is checked in
1230            the event handlers.
1231            (ThubanGrid.GetNumberSelected): Return the number of currently
1232            selected rows.
1233            (TableFrame): Inherit from ThubanFrame so we can have a
1234            status bar and control buttons.
1235            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
1236            Explicitly set which items are selected in the operator choice and
1237            action choice so there is always a valid selection. Fixes RTbug #1941.
1238            Subscribe to grid cell selection events so we can update the
1239            status bar.
1240            (QueryTableFrame.UpdateStatusText): Update the status bar with
1241            how many rows are in the grid, how many columns, and how many
1242            rows are selected.
1243            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
1244            Call UpdateStatusText when cells are (de)selected.
1245            (QueryTableFrame.OnQuery): Use the string value in the value
1246            combo if either the selected item index is 0 or if the string
1247            cannot be found in the predefined list (this happens if the
1248            user changes the text). Fixes RTbug #1940.
1249            Only turn off the grid event listeners if there a query comes
1250            back with a none empty list of ids. in the case that the list
1251            is empty this causes a grid.ClearSelection() call to actually
1252            clear the grid selection which causes the selected items in
1253            the map to be deselected. Fixes RTbug #1939.
1254    
1255            * test/test_save.py (XMLWriterTest.Encode): Check return values.
1256            Fixes RTbug #1851.
1257    
1258    2003-06-13  Bernhard Herzog  <[email protected]>
1259    
1260            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
1261            self.selected_shape with the current selection to make sure the
1262            contents of the dialog are up to date when it's shown for the
1263            first time.
1264            The dialog used to work without this by luck. The recent fix to
1265            the connector module 'broke' a 'feature' the identify view was
1266            relying on, i.e that subscribing to a message in response to
1267            receiving a message of that type would mean that the new
1268            subscriber would also be called for the same message.
1269            
1270    2003-06-12  Jonathan Coles   <[email protected]>
1271    
1272            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
1273            the image is rendered. Fixes RTbug #1937.
1274    
1275    2003-06-12  Jonathan Coles   <[email protected]>
1276    
1277            * Thuban/Lib/fileutil.py: As is done under Windows, create the
1278            user directory if it doesn't exist on a posix system.
1279            Fixes RTbug #1815.
1280    
1281            * Thuban/Model/resource.py (get_user_proj_files): Moved the
1282            called to get_application_dir here, so that the directory
1283            will only be called if this method is invoked.
1284    
1285            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
1286            the projfilepath if no projection is selected.
1287    
1288    2003-06-12  Jonathan Coles   <[email protected]>
1289    
1290            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
1291            the scalebar if the current map has no projection set.
1292    
1293            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
1294            projfilepath label to just the basename of the projection file
1295            rather than include the entire path.
1296    
1297            * Thuban/Model/resource.py: Fix missed proj functions that
1298            needed to be renamed.
1299    
1300    2003-06-12  Jonathan Coles   <[email protected]>
1301    
1302            * Thuban/Model/classification.py: Removed assert statements that
1303            tested if the variable was an instance of Color.
1304    
1305            * Thuban/Model/color.py (Color): Remove commented code that isn't
1306            used.
1307            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
1308            Fixes RTbug #1835.
1309            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
1310            Needed now that the class doesn't inherit from Color.
1311    
1312    2003-06-12  Jonathan Coles   <[email protected]>
1313    
1314            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
1315            check unicode strings.
1316    
1317            * test/test_layer.py: Check for existence of gdal.
1318    
1319    2003-06-12  Jonathan Coles   <[email protected]>
1320        
1321            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
1322            that was in load.py
1323    
1324            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
1325            that was in save.py
1326    
1327    2003-06-12  Jonathan Coles   <[email protected]>
1328    
1329            This is largely a collection of bug fixes. We also handle the
1330            case where gdal is not on the system. The XMLReader and XMLWriter
1331            classes were moved into there own files to resolve some circular
1332            import references and because they shouldn't really be in the
1333            file that is dediciated to reading/writing session files since
1334            they are also used elsewhere.
1335    
1336            * Thuban/Model/classgen.py: Renamed functions to follow the
1337            function_names_with_underscores style. Fixes RTbug #1903.
1338            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
1339    
1340            * Thuban/Model/layer.py: Import gdal only if it available.
1341            (RasterLayer): Handle the case where the gdal library is unavailable.
1342            Addresses RTbug #1877.
1343    
1344            * Thuban/Model/load.py (XMLReader): Moved into seperate file
1345            xmlreader.py.
1346    
1347    2003-06-12  Jonathan Coles   <[email protected]>
1348    
1349            This is largely a collection of bug fixes. We also handle the
1350            case where gdal is not on the system. The XMLReader and XMLWriter
1351            classes were moved into there own files to resolve some circular
1352            import references and because they shouldn't really be in the
1353            file that is dediciated to reading/writing session files since
1354            they are also used elsewhere.
1355    
1356            * Thuban/Model/classgen.py: Renamed functions to follow the
1357            function_names_with_underscores style. Fixes RTbug #1903.
1358            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
1359    
1360            * Thuban/Model/layer.py: Import gdal only if it available.
1361            (RasterLayer): Handle the case where the gdal library is unavailable.
1362            Addresses RTbug #1877.
1363    
1364            * Thuban/Model/load.py (XMLReader): Moved into seperate file
1365            xmlreader.py.
1366    
1367            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
1368            file xmlwriter.py.
1369    
1370            * Thuban/Model/resource.py: Renamed functions to following the
1371            function_names_with_underscores style.
1372            (has_gdal_support): New function that returns true if the gdal
1373            library is available. Addresses RTbug #1877.
1374    
1375            * Thuban/UI/application.py (ThubanApplication.OpenSession):
1376            Display a message box if the gdal library is not available, but
1377            only if there are any layers that would use it. Addresses RTbug #1877.
1378    
1379            * Thuban/UI/classgen.py: Use renamed projection resource functions.
1380            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
1381            when using integers versus floats.
1382    
1383            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
1384            determine if the "Add Image Layer" menu option should be
1385            greyed out or not. Addresses RTbug #1877.
1386    
1387            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
1388    
1389            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
1390            optimize if a raster layer is visible. Fixes RTbug #1931.
1391            Only draw the raster layer if the gdal library is available.
1392            Addresses RTbug #1877.
1393    
1394            * test/test_classgen.py: Add tests for generate_singletons,
1395            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
1396            (test_calculate_quantiles): Fix some tests to catch the new
1397            ValueError that is raised.
1398    
1399            * test/test_proj.py: Use renamed projection resource functions.
1400    
1401            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
1402            test for saving classified layers. Fixes RTbug #1902.
1403            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
1404    
1405    2003-06-12  Jan-Oliver Wagner <[email protected]>
1406    
1407            Fix for http://intevation.de/rt/webrt?serial_num=1900.
1408    
1409            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
1410    
1411            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
1412            multiplechoicedialog.py rather than from the wxPython library.
1413    
1414    2003-06-11  Frank Koormann  <[email protected]>
1415    
1416            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
1417            update.
1418    
1419    2003-06-11  Frank Koormann  <[email protected]>
1420    
1421            * Thuban/Lib/fileutil.py (get_application_dir): New function to
1422            determine the absolute .thuban/thuban directory under
1423            "posix" (os.expanduser) and "nt" (read AppData registry key).
1424    
1425            * Thuban/Model/resource.py: Use get_application_dir
1426    
1427            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1428            Use get_application_dir.
1429    
1430    2003-06-10  Bernhard Herzog  <[email protected]>
1431    
1432            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
1433            the messages MAP_LAYERS_REMOVED messages
1434            (LayerTableFrame.OnClose): Unsubscribe from it.
1435            (LayerTableFrame.map_layers_removed): New. Receiver for
1436            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
1437            dialog is showing is removed.
1438    
1439    2003-06-10  Bernhard Herzog  <[email protected]>
1440    
1441            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
1442            of the receivers list so that unsubscribing in a receiver doesn't
1443            modify it while iterating over it.
1444    
1445            * test/test_connector.py
1446            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
1447            unsubscribing in a receiver works correctly. See docstring for
1448            details
1449    
1450    2003-06-10  Bernhard Herzog  <[email protected]>
1451    
1452            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
1453            message.
1454    
1455            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
1456            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
1457            LAYER_CHANGED will still be sent if the classification changes.
1458    
1459            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
1460            parameter so we can subscribe to some of its messages
1461            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
1462            and the layer's LAYER_SHAPESTORE_REPLACED
1463            (Classifier.unsubscribe_messages): New. Unsubscribe from message
1464            subscribed to in __init__
1465            (Classifier.map_layers_removed)
1466            (Classifier.layer_shapestore_replaced): receivers for the messages
1467            subscribed to in __init__. Unsubscribe and close the dialog
1468    
1469            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
1470            the map to the Classifier dialog
1471    
1472            * test/test_layer.py (SetShapeStoreTests): Derive from
1473            SubscriberMixin as well so we can test messages
1474            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
1475            messages
1476            (SetShapeStoreTests.tearDown): Clear the messages again
1477            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
1478            for the modified flag too
1479            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
1480            to check whether SetShapeStore sets the modified flag
1481            (SetShapeStoreTests.test_set_shape_store_different_field_name)
1482            (SetShapeStoreTests.test_set_shape_store_same_field)
1483            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
1484            Add tests for the messages. This checks both the new
1485            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
1486    
1487    2003-06-06  Jan-Oliver Wagner <[email protected]>
1488    
1489            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
1490            the menu items.
1491    
1492    2003-06-05  Frank Koormann  <[email protected]>
1493    
1494            * Thuban/UI/identifyview.py (IdentifyView.__init__):
1495            Layout reimplemented without panel. Make life easier to fit the list
1496            in the dialog.
1497    
1498    2003-06-05  Frank Koormann  <[email protected]>
1499    
1500            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
1501            once on initialisation (Former implementation resulted in multiple
1502            entries for each projection).
1503            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
1504            if set, select the projection found under the specified name. This
1505            overwrites any other selection estimate.
1506            Removed projchoice filling from this method.
1507            (ProjFrame._OnSave, ProjFrame._OnAddToList):
1508            Updated call of ProjFrame.__FillAvailList
1509            (LCCPanel._DoLayout): Moved parameter controls in more common order.
1510    
1511            * Resources/Projections/defaults.proj: Extended defaults representing
1512            various common European projections.
1513    
1514    2003-06-05  Frank Koormann  <[email protected]>
1515    
1516            * Thuban/UI/identifyview.py (IdentifyView.__init__):
1517            Use ListCtrl instead of GridCtrl
1518    
1519            * Thuban/Model/resource.py:
1520            Guess location of .thuban directory from tempdir parent directory.
1521    
1522            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1523            Guess location of .thuban directory from tempdir parent directory.
1524    
1525    2003-06-04  Bernhard Herzog  <[email protected]>
1526    
1527            Do not cache the values returned by the tree widget's
1528            GetFirstChild and GetNextChild methods because it led to lots of
1529            segfaults. The new way requires more brute force but is more
1530            reliable.
1531    
1532            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
1533            variable layer2id
1534            (LegendTree.find_layer): New method to do with brute force what
1535            layer2id tried to accomplish
1536            (LegendTree._OnMsgLayerChanged)
1537            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
1538            Use find_layer instead of layer2id
1539            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
1540            update layer2id anymore
1541            (LegendTree._OnMsgMapLayersRemoved)
1542            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
1543    
1544    2003-06-03  Thomas Koester  <[email protected]>
1545    
1546            * Thuban/Model/classgen.py (GenQuantiles0): New function.
1547    
1548    2003-06-02  Bernhard Herzog  <[email protected]>
1549    
1550            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
1551            New commands.
1552            (main_menu): Add the new commands.
1553            (MainWindow.TableRename): New. Implementation of the table_rename
1554            command.
1555            (MainWindow.RenameLayer): New. Implementation of the layer_rename
1556            command.
1557    
1558            * Thuban/Model/session.py (Session.AddTable): call self.changed to
1559            set the modified flag
1560    
1561            * test/test_session.py (TestSessionSimple.test_add_table): Test
1562            whether the modified flag is set properly
1563    
1564            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
1565            instead of issue so that the modified flags get updated.
1566    
1567            * test/test_base.py (SomeTitledObject): Derive from Modifiable
1568            instead of Publisher to reflect reality better and to accomodate
1569            the fact that SetTitle now calls changed instead of issue
1570    
1571    2003-06-02  Bernhard Herzog  <[email protected]>
1572    
1573            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
1574            acquisition has to happen before the try in a try-finally.
1575    
1576    2003-06-02  Bernhard Herzog  <[email protected]>
1577    
1578            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
1579            possible that a layer is removed that is not currently selected in
1580            the legend so don't check for this.
1581    
1582    2003-05-30  Bernhard Herzog  <[email protected]>
1583    
1584            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
1585            variables to None that have direct or indirect references to
1586            shapefiles or dbf files to make sure that they do go away and the
1587            files are closed.
1588    
1589    2003-05-30  Bernhard Herzog  <[email protected]>
1590    
1591            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
1592            availImgListIndices when a new image list is created
1593            
1594    2003-05-30  Bernhard Herzog  <[email protected]>
1595    
1596            * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
1597            changing_selection to indicate whether the LegendTree code itself
1598            is currently changing the selection
1599            (LegendTree.normalize_selection): New method to normalize the
1600            selection by selecting the layer item even if the user clicked on
1601            the classification.
1602            (LegendTree._OnSelChanged): normalize the selection. This works
1603            around a bug in wx which doesn't keep track of the selection
1604            properly when subtrees are deleted.
1605    
1606    2003-05-30  Bernhard Herzog  <[email protected]>
1607    
1608            * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
1609            maximum and minimum scale factors.
1610    
1611            * test/test_classgen.py (ClassGenTest.test): Update to reflect the
1612            changes in classgen.py
1613    
1614    2003-05-30  Jonathan Coles   <[email protected]>
1615    
1616            * Thuban/Model/classgen.py: Remove ClassGenerator class but make
1617            all the methods functions. Fixes RTBug #1903.
1618    
1619            * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
1620            to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
1621            RTBug #1907.
1622    
1623            * Thuban/UI/classgen.py: Use classgen functions that were part
1624            of the ClassGenerator class. Put try/finally blocks around
1625            code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
1626            RTBug #1904.
1627    
1628            * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
1629    
1630            * Thuban/UI/legend.py: The legend was cleared and repopulated any
1631            time something changed which caused some state to be lost such
1632            as which children were expanded or collapsed. Fixes RTBug #1901.
1633            (LegendTree._OnMsgMapLayersAdded): Add only new layers.
1634            (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
1635            the legend but not in the map.
1636            (LegendTree.__FillTree): Move main functionality out into smaller
1637            methods that can be used by other methods.
1638            (LegendTree.__FillTreeLayer): Reuse old slots in the image list
1639            if they are available.
1640            (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
1641            that we override the wxTreeCtrl method. Iterate over children
1642            and call __RemoveLayer.
1643            (LegendTree.__AddLayer): New. Add a new layer to the legend.
1644            (LegendTree.__RemoveLayer): Remove a layer from the legend.
1645            (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
1646            Should only be called with the id of a layer branch.
1647            (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
1648            Returns the root item or creates one if necessary.
1649    
1650            * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
1651            ProjectRasterFile with tuple arguments instead of strings.
1652    
1653            * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
1654            with try/finally. Fixes RTBug #1904.
1655    
1656            * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
1657            with try/finally. Fixes RTBug #1904.
1658            (MapCanvas.FitSelectedToWindow): If a single point is selected
1659            simply center it on the display. Fixes RTBug #1849.
1660    
1661            * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
1662            to be compiled as a standalone app. Now the code can only be
1663            called from Python which simplifies the parameter passing.
1664            (ProjectRasterFile): Handle Python arguments. Remove code that
1665            checks for a destination dataset. Add more clean up code.
1666    
1667            * test/test_map.py (TestMapWithContents.test_raise_layer_top,
1668            TestMapWithContents.test_lower_layer_bottom):
1669            Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
1670            Fixes RTBug #1907.
1671    
1672            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
1673            extent to the map when the legend is toggled. Fixes RTBug #1881.
1674    
1675    2003-05-29  Jan-Oliver Wagner <[email protected]>
1676    
1677            * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
1678            unsubscribes all that is subcribed in __init__.
1679    
1680    2003-05-28  Bernhard Herzog  <[email protected]>
1681    
1682            * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
1683            (MainWindow.CanDuplicateLayer): New methods to implement the
1684            Layer/Duplicate command.
1685            (layer_duplicate command): New.
1686            (main_menu): Add layer_duplicate to the Layer menu.
1687    
1688    2003-05-28  Bernhard Herzog  <[email protected]>
1689    
1690            * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
1691            renderer so that NULL/None values get displayed differently (by a
1692            gray rectangle).
1693            (TableGrid.__init__): Override the default renderers
1694    
1695    2003-05-28  Bernhard Herzog  <[email protected]>
1696    
1697            * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
1698            classification to "None" if the type of the field has changed.
1699    
1700            * test/test_layer.py (SetShapeStoreTests): New. Class with a few
1701            test for the Layer.SetShapeStore method
1702    
1703    2003-05-28  Jan-Oliver Wagner <[email protected]>
1704    
1705            * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
1706            does not necessarily have a filename).
1707    
1708    2003-05-28  Jan-Oliver Wagner <[email protected]>
1709    
1710            * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
1711            sort the selection list for the dialog.
1712    
1713    2003-05-28  Frank Koormann  <[email protected]>
1714    
1715            * extensions/thuban/wxproj.cpp
1716            (project_point): Removed cast to int for projected point coordinates.
1717            (shape_centroid): Return last point if all polygon vertices fall
1718            to one point.
1719    
1720    2003-05-28  Bernhard Herzog  <[email protected]>
1721    
1722            * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
1723            with layers that don't have shapestores, i.e. raster layers.
1724    
1725    2003-05-28  Bernhard Herzog  <[email protected]>
1726    
1727            * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
1728            when determining the title from the filename.
1729    
1730            * test/test_dbf_table.py (TestDBFTable.test_title): Update to
1731            reflect changes in the way the title is derived from the filename
1732    
1733    2003-05-28  Frank Koormann  <[email protected]>
1734    
1735            * Thuban/UI/mainwindow.py (MainWindow.TableShow):
1736            Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
1737    
1738    2003-05-27  Bernhard Herzog  <[email protected]>
1739    
1740            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
1741            delegate SelectedLayer.
1742            (MainWindow.LayerUnjoinTable): Implement.
1743            (_can_unjoin): New. Helper function for the sensitivity of the
1744            layer/unjoin command.
1745    
1746            * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
1747            (DerivedShapeStore.OrigShapeStore): New. Return the original
1748            shapestore. Used to figure out how to unjoin.
1749            (DerivedShapeStore.Shapefile): Fix a typo.
1750    
1751    2003-05-27  Bernhard Herzog  <[email protected]>
1752    
1753            * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
1754            well
1755            (JoinDialog.__init__): Use the layer parameter and only build the
1756            left choice when a layer is given
1757            (JoinDialog.OnJoin): Handle layer joins as well
1758            (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
1759            that the user selects the "Select..." item. The sensitivitly
1760            updating is now in update_sensitivity
1761            (JoinDialog.y): New method to refactor the sensitivity update of
1762            the join button into its own method.
1763    
1764            * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
1765    
1766    2003-05-27  Bernhard Herzog  <[email protected]>
1767    
1768            * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
1769            iff there are unreferenced tables in the session
1770    
1771    2003-05-27  Bernhard Herzog  <[email protected]>
1772    
1773            * Thuban/Model/messages.py (TABLE_REMOVED): New message.
1774    
1775            * Thuban/Model/session.py (Session.UnreferencedTables): New method
1776            to return tables that are not referenced by other tables or shape
1777            stores and can be removed.
1778            (Session.RemoveTable): Issue a TABLE_REMOVED message after
1779            removing the table
1780    
1781            * Thuban/UI/mainwindow.py: Remove unused imports
1782            (MainWindow.TableClose): Implement.
1783    
1784            * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
1785            messages so that the frame will be automatically closed when a new
1786            session is opened or the table is removed.
1787            (TableFrame.OnClose): Unsubscribe the Subscriptions made in
1788            __init__
1789            (TableFrame.close_on_session_replaced)
1790            (TableFrame.close_on_table_removed): New. Subscribers that close
1791            the window
1792    
1793            * test/test_session.py (TestSessionMessages.test_remove_table)
1794            (TestSessionSimple.test_remove_table): Move the test to
1795            TestSessionSimple and add test for the TABLE_REMOVED message
1796            (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
1797            (TestSessionSimple.test_unreferenced_tables) New. Test for the
1798            UnreferencedTables method.
1799            (UnreferencedTablesTests): New. Class with some more sophisticated
1800            tests for UnreferencedTables.
1801    
1802    2003-05-27  Frank Koormann  <[email protected]>
1803    
1804            * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
1805            display has some unwanted side effects. Removed again.
1806    
1807    2003-05-27  Frank Koormann  <[email protected]>
1808    
1809            * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
1810    
1811            * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
1812    
1813    2003-05-27  Jan-Oliver Wagner <[email protected]>
1814    
1815            * test/test_menu.py (MenuTest.test): Added test for
1816            Menu.RemoveItem().
1817    
1818            * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
1819            the menu.
1820    
1821    2003-05-27  Frank Koormann  <[email protected]>
1822            
1823            Nonmodal dialogs without parent (i.e. they can fall behind the main
1824            window)
1825    
1826            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
1827            all dialogs in the dialogs dictionary and the canvas.
1828    
1829            * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
1830            parent, i.e. can fall behind other windows.
1831            (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
1832            dictionary before removing it.
1833    
1834            * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
1835    
1836            * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
1837            * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
1838            * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
1839    
1840    2003-05-27  Bernhard Herzog  <[email protected]>
1841    
1842            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
1843            tableview dialog
1844            (MainWindow.TableShow): Use ShowTableView to open the dialogs.
1845            Also, don't use the table's titles as the dialog names. The titles
1846            aren't guaranteed to be unique.
1847            (MainWindow.TableOpen): Open a table view dialog after opening the
1848            table
1849    
1850    2003-05-27  Bernhard Herzog  <[email protected]>
1851    
1852            * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
1853            effect can be achieved by simply closing the window showing the
1854            table.
1855            (MainWindow.TableHide): Removed.
1856            (main_menu): Removed "table_hide"
1857    
1858    2003-05-27  Frank Koormann  <[email protected]>
1859    
1860            Fix legend tree display problems under Win32
1861    
1862            * Thuban/UI/legend.py:  BMP_SIZE_W = 15
1863            (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
1864            (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
1865    
1866            * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
1867    
1868    2003-05-27  Jan-Oliver Wagner <[email protected]>
1869    
1870            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
1871            'after' now allows to insert separators almost anywhere in the menu.
1872    
1873    2003-05-27  Frank Koormann  <[email protected]>
1874    
1875            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
1876            "S" of selection box label to hint on hot key (Alt-S). Works under
1877            Win32 but is ignored under GTK.
1878    
1879    2003-05-26  Frank Koormann  <[email protected]>
1880    
1881            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
1882            Center Choices.
1883    
1884    2003-05-26  Bernhard Herzog  <[email protected]>
1885    
1886            Remove the Precision methods again. They're too DBF specific to be
1887            part of the table interface and they're only used in table_to_dbf
1888            anyway.
1889            
1890            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
1891            fixed precision of 12 for doubles.
1892            (TransientTableBase.Precision): Removed
1893            (AutoTransientTable.Width): Delegate to self.table.
1894    
1895            * Thuban/Model/table.py (DBFTable.Precision)
1896            (MemoryTable.Precision): Removed.
1897            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
1898            (table_to_dbf): Use a fixed precision of 12 for floats unless the
1899            column object specifies something else.
1900    
1901            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
1902            test for table_to_dbf
1903    
1904    2003-05-26  Bernhard Herzog  <[email protected]>
1905    
1906            * test/test_transientdb.py
1907            (TestTransientTable.run_iceland_political_tests): Fix a comment.
1908    
1909    2003-05-26  Bernhard Herzog  <[email protected]>
1910    
1911            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
1912            implementation. Mark parts of the file format strings for
1913            localization.
1914    
1915            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
1916            file and add the table to the tables managed by the session
1917    
1918            * test/test_session.py (TestSessionSimple.test_open_table_file):
1919            New. test case for OpenTableFile
1920    
1921    2003-05-26  Jan-Oliver Wagner <[email protected]>
1922    
1923            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
1924            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
1925            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
1926            Replace the true/false of wxWindows by True/False of Python 2.2.1.
1927    
1928    2003-05-26  Jan-Oliver Wagner <[email protected]>
1929    
1930            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
1931            already a selection present, update the grid accordingly.
1932    
1933            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
1934            resizeable and increase its initial size.
1935    
1936    2003-05-26  Frank Koormann  <[email protected]>
1937    
1938            Table export functionality
1939    
1940            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
1941            Return width (in characters) for a column.
1942            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
1943            (table_to_dbf): Write table to dbf file.
1944            (table_to_csv): Write table to csv file.
1945    
1946            * Thuban/Model/transientdb.py (TransientTableBase.Width,
1947            TransientTableBase.Precision): Return column width and precision.
1948    
1949            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
1950            or table_to_csv depending on file selection.
1951    
1952            * test/test_dbf_table.py:
1953            Test table_to_dbf (extension of former part of test).
1954    
1955            * test/test_csv_table.py:
1956            Test table_to_csv.
1957    
1958    2003-05-23  Jan-Oliver Wagner <[email protected]>
1959    
1960            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
1961            Use QueryTableFrame instead of TableFrame.
1962    
1963            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
1964            table window with 'Layer Table:' instead of 'Table:'.
1965    
1966    2003-05-23  Jan-Oliver Wagner <[email protected]>
1967    
1968            Give all tables a title via mix-in TitledObject.LayerShowTable
1969    
1970            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
1971            only if it exists.
1972    
1973            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
1974            and call its init-method with a default title. Remove Title() method.
1975    
1976            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
1977            AutoTransientTable): mix-in TitledObject and call its init-method with
1978            a default title. Remove Title() method.
1979    
1980    2003-05-23  Bernhard Herzog  <[email protected]>
1981    
1982            * Thuban/Model/session.py (Session.AddShapeStore): Define
1983            AddShapeStore analogously to AddTable.
1984    
1985            * test/test_session.py (TestSessionSimple.test_add_shapestore):
1986            New. Test for AddShapeStore
1987    
1988    2003-05-23  Jan-Oliver Wagner <[email protected]>
1989    
1990            Introducing QueryTableFrame and a very coarse ShowTable implementation.
1991    
1992            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
1993            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
1994            The latter implements the selection GUI without dependency on a layer.
1995            LayerTableFrame now is derived from QueryTableFrame and connects
1996            to a layer.
1997    
1998            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
1999            implementation that still needs work.
2000    
2001            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
2002    
2003    2003-05-22  Frank Koormann  <[email protected]>
2004    
2005            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
2006            Added "outer_join = False" as optional parameter.
2007            (TransientJoinedTable.create): If outer join is true, perform a
2008            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
2009            the left table. Records not matching are filled with 0 / None.
2010    
2011            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
2012            (JoinDialog.OnJoin): Consider outer join check box.
2013    
2014    2003-05-22  Bernhard Herzog  <[email protected]>
2015    
2016            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
2017            somewhat safer way. Storing the traceback in a local variable can
2018            lead to memory leaks
2019    
2020    2003-05-22  Bernhard Herzog  <[email protected]>
2021    
2022            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
2023            the wxMessageDialog's Destroy() method.
2024    
2025    2003-05-22  Frank Koormann  <[email protected]>
2026    
2027            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
2028            TransientTable.Title()
2029    
2030    2003-05-22  Frank Koormann  <[email protected]>
2031    
2032            Join Dialog, initial version.
2033    
2034            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
2035    
2036            * Thuban/UI/join.py (JoinDialog): Functional implementation of
2037            former framework. Renamed Table1/Table2 to LeftTable/RightTable
2038            in all occurences.
2039    
2040            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
2041            Typo fixed.
2042    
2043    2003-05-22  Bernhard Herzog  <[email protected]>
2044    
2045            Give the tables titles so that the GUI can display more meaningful
2046            names. For now the titles are fixed but depend on e.g. filenames
2047            or the titles of the joined tables.
2048    
2049            * Thuban/Model/transientdb.py (TransientTable.Title)
2050            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
2051    
2052            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
2053    
2054            * test/test_transientdb.py
2055            (TestTransientTable.test_auto_transient_table_title): New. Test
2056            for the Title method
2057            (TestTransientTable.test_transient_joined_table)
2058            (TestTransientTable.test_transient_table): Add test for the Title
2059            methods
2060    
2061            * test/test_memory_table.py (TestMemoryTable.test_title): New.
2062            Test for the Title method
2063    
2064            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
2065            the Title method
2066    
2067    2003-05-22  Bernhard Herzog  <[email protected]>
2068    
2069            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
2070            Provide a better way to destroy the layers
2071            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
2072            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
2073            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
2074            the new way to destroy the layers.
2075            (TestLayer.test_derived_store): New. Test for using a layer with a
2076            DerivedShapeStore
2077    
2078            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
2079            filename if the shape store actually has one.
2080    
2081    2003-05-22  Bernhard Herzog  <[email protected]>
2082    
2083            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
2084            for the filename
2085    
2086            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
2087            for the FileName method
2088            (TestDBFTableWriting.test_write): Fix spelling of filename
2089    
2090    2003-05-22  Thomas Koester  <[email protected]>
2091    
2092            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
2093            from SciParam that now really is immutable.
2094    
2095    2003-05-22  Frank Koormann  <[email protected]>
2096    
2097            Layer Top/Bottom placement added to legend.
2098    
2099            * Thuban/UI/legend.py
2100            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
2101            bound to tool events.
2102            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
2103            New, methods binding the event methods with the map methods.
2104    
2105            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
2106            layer at top/bottom of layer stack.
2107    
2108            * Resources/Bitmaps/top_layer.xpm: New button icon.
2109    
2110            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
2111    
2112    2003-05-22  Bernhard Herzog  <[email protected]>
2113    
2114            * Thuban/Model/session.py (Session.RemoveTable): New method to
2115            remove tables
2116    
2117            * test/test_session.py (TestSessionSimple.test_remove_table): New.
2118            Test for RemoveTable
2119    
2120    2003-05-22  Thomas Koester  <[email protected]>
2121    
2122            * Thuban/Model/classgen.py: Added short module doc string and CVS id.
2123            (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
2124    
2125    2003-05-22  Bernhard Herzog  <[email protected]>
2126    
2127            Implement a way to discover dependencies between tables and
2128            shapestores.
2129    
2130            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
2131            (TransientJoinedTable.Dependencies)
2132            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
2133            interface
2134            (TransientJoinedTable.__init__): Keep tack of the original table
2135            objects in addition to the corresponding transient tables.
2136    
2137            * Thuban/Model/table.py (DBFTable.Dependencies)
2138            (MemoryTable.Dependencies): New. Implement the dependencies
2139            interface
2140    
2141            * Thuban/Model/data.py (ShapeTable): New. Helper class for
2142            ShapefileStore
2143            (ShapefileStore.__init__): Use ShapeTable instead of
2144            AutoTransientTable
2145            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
2146            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
2147            methods for filename and type
2148            (ShapefileStore.Dependencies): New. Implement the dependencies
2149            interface
2150            (DerivedShapeStore): New class to replace SimpleStore. The main
2151            difference to SimpleStore is that it depends not on a shapefile
2152            but another shapestore which expresses the dependencies a bit
2153            better
2154            (SimpleStore.__init__): Add deprecation warning.
2155    
2156            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
2157            Test for the Dependencies method.
2158    
2159            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
2160            New. Test for the Dependencies method.
2161    
2162            * test/test_transientdb.py
2163            (TestTransientTable.test_auto_transient_table_dependencies): New.
2164            Test for the Dependencies method.
2165            (TestTransientTable.test_transient_joined_table): Add test for the
2166            Dependencies method.
2167    
2168            * test/test_session.py (TestSessionSimple.setUp)
2169            (TestSessionSimple.tearDown): New. Implement a better way to
2170            destroy the sessions.
2171            (TestSessionSimple.test_initial_state)
2172            (TestSessionSimple.test_add_table): Bind session to self.session
2173            so that it's destroyed by tearDown
2174            (TestSessionSimple.test_open_shapefile): New. Test for
2175            OpenShapefile and the object it returns
2176    
2177    2003-05-22  Bernhard Herzog  <[email protected]>
2178    
2179            * Thuban/Model/session.py (Session.AddTable): New method to
2180            register tables with the session.
2181            (Session.Tables): Return the tables registered with AddTable too.
2182    
2183            * test/test_session.py (TestSessionSimple.test_add_table): New.
2184            Test case for the AddTable method
2185    
2186    2003-05-22  Frank Koormann  <[email protected]>
2187    
2188            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
2189            lower right corner, center labels for selections, initialize controls
2190            in reasonable order for keyboard navigation.
2191    
2192            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
2193            (ProjFrame.__DoOnProjAvail): Determine position of current projection
2194            using the wxListBox.FindString() method. Still a problem (#1886)
2195    
2196            * Thuban/UI/classifier.py
2197            (Classifier.__init__, SelectPropertiesDialog.__init__)
2198    
2199            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
2200            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
2201            different classification types from here to __init__.
2202            (GenUniquePanel.__init__): Set the column width of the first field
2203            in the Field ListCtrl to the full width.
2204    
2205            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
2206            Button to 'Export'. Center Buttons in Selection Box, set Focus to
2207            Grid.
2208            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
2209            changes focus to the Selection when pressing "Alt-S".
2210    
2211            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
2212            the text if not visible. The italic font sometimes exceeds the
2213            rendering area.
2214    
2215    2003-05-21  Jonathan Coles   <[email protected]>
2216    
2217            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
2218            to OnClose so that Thuban closes correctly.
2219    
2220            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
2221            DockFrame.OnClose, not DockFrame._OnClose.
2222    
2223    2003-05-21  Jonathan Coles   <[email protected]>
2224    
2225            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
2226            references to 'inf' and use new Range __init__ to pass floats
2227            directly rather than converting them to strings first.
2228            Fixes RTBug #1876.
2229    
2230            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
2231            Use new Range ___init__ to pass floats.
2232    
2233            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
2234            filename is a valid image file. Throw IOError otherwise.
2235    
2236            * Thuban/Model/range.py: Brought over new Range from SciParam that
2237            is immutable and has an __init__ which can accept floats.
2238    
2239            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
2240            into try block. AddLayer doesn't throw any exceptions anymore.
2241            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
2242            try block.
2243    
2244            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
2245            the first item in choices. Fixes RTBug #1882.
2246    
2247            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
2248            has gone to 0 which is a serious problem. abort.
2249            (MapRenderer.draw_raster_layer): Catch IOError seperately and
2250            print the error from GDAL.
2251    
2252            * Thuban/UI/tableview.py (TableGrid.__init__): Call
2253            ToggleEventListeners to turn on listening.
2254            (TableGrid.ToggleEventListeners): New. Turns event listening on
2255            and off so as to prevent excessive messages.
2256            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
2257            to suppress excessive messages when selecting many rows.
2258            Fixes RTBug #1880.
2259    
2260            * Thuban/UI/view.py: Added checks against if scale == 0. This
2261            is a serious problem that can occur when an image without
2262            geo data is loading and causes the map projection bounds to
2263            go to infinity. Right now, the solution is to simply try
2264            to recover.
2265    
2266            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
2267            to set the MFILEReceiver attributes even if the data is NULL.
2268    
2269            * extensions/thuban/gdalwarp.cpp: Improved the error handling
2270            and passed GDAL messages back up to the Python layer. Also
2271            tried to fix some memory leaks that were present in the original
2272            utility but didn't matter because the program aborted.
2273    
2274            * test/test_range.py: Copied over tests from SciParam. Removed
2275            tests against importing. Fixes RTBug #1867.
2276    
2277    2003-05-21  Bernhard Herzog  <[email protected]>
2278    
2279            * test/test_load.py: Remove unused imports and restructure the
2280            test code
2281            (LoadSessionTest): Split into one class for each test and turn
2282            LoadSessionTest itself into the base class for all such session
2283            tests.
2284            (ClassificationTest): New base class for load tests that test
2285            classifications
2286            (TestSingleLayer, TestLayerVisibility, TestClassification)
2287            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
2288            for the individual tests
2289    
2290            * test/support.py (FileLoadTestCase.filename): New base class for
2291            file loading tests
2292    
2293    2003-05-21  Jan-Oliver Wagner <[email protected]>
2294    
2295            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
2296            Mercator' to 'UTM Zone 32' as a more convenient example.
2297            Added 'Gauss Krueger Zone 6'.
2298    
2299            * Data/iceland_sample_raster.thuban: political polygon now
2300            filled transparent to have the raster image visible at once.
2301    
2302    2003-05-21  Frank Koormann  <[email protected]>
2303    
2304            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
2305            OnClose() to keep in sync with extensions. Internally Thuban
2306            still uses "underscored" names.
2307    
2308    2003-05-20  Jonathan Coles   <[email protected]>
2309    
2310            This puts back Raster layer support. These layers support projections
2311            through the GDAL library. Currently, the CVS version is being used.
2312            There are no Debian packages available although this may change soon.
2313            A GDAL driver was extended to support writing to memory rather to
2314            files.
2315    
2316            There is still some work that needs to be done, such as some error
2317            handling when loading invalid images or when there is a problem
2318            projecting the image. This putback simply checks in the majority
2319            of the work.
2320    
2321            * setup.py: Add gdalwarp library extension.
2322    
2323            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
2324            Defaults to False, but can be overridden by subclasses if they
2325            support classification.
2326            (RasterLayer): New. Defines a new layer that represents an
2327            image.
2328    
2329            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
2330            tag handler.
2331            (SessionLoader.start_layer): Encode the filename.
2332            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
2333            New. Supports reading a rasterlayer tag.
2334    
2335            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
2336    
2337            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
2338            get a string in Latin1. If we get such as string convert it to
2339            unicode first, otherwise leave if alone before encoding.
2340            (SessionSaver.write_layer): Add support for writing both Layers
2341            and RasterLayers.
2342    
2343            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
2344            The right argument may not be a string, it could also be a Column.
2345    
2346            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
2347            Make initial window size 600x400. Fixes RTBug #1872.
2348    
2349            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
2350            the dialog is constructed so that we can support layers that
2351            do not have classifications.
2352            (Classifier._OnTry): Only build a classification if the layer
2353            supports one.
2354    
2355            * Thuban/UI/legend.py: Change all checks that a layer is an
2356            instance of Layer into checks against BaseLayer.
2357            (LegendTree.__FillTreeLayer): Only add children to a branch if
2358            the layer supports classification.
2359    
2360            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
2361            MainWindow.OpenSession): Don't proceed with an action if the
2362            user chooses Cancel when they are asked to save changes.
2363            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
2364            user to select an image file. Create a new RasterLayer and add
2365            it to the map.
2366    
2367            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
2368            for rendering RasterLayer layers.
2369            (MapRenderer.draw_raster_layer): Actually method that calls
2370            the GDALWarp python wrapper and constructs an image from the
2371            data returned.
2372    
2373            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
2374            Choices symbols to match those used in the table query method.
2375            Replace deprecated method calls on table with new method names.
2376    
2377            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
2378            how small the scale can get. This still needs more testing.
2379    
2380            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
2381            Provides a driver to output in .bmp format.
2382    
2383            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
2384            New. Provides IO routines which write to memory, rather than a file.
2385    
2386            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
2387            of the gdalwarp utility provided in GDAL. Added function calls
2388            that can be accessed from python.
2389    
2390            * Data/iceland_sample_raster.thuban: New. Sample file that uses
2391            a raster layer.
2392    
2393            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
2394            layer image data.
2395    
2396            * Doc/thuban.dtd: Added rasterlayer attribute definition.
2397    
2398            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
2399            tests associated with the raster layer code.
2400    
2401            * test/test_transientdb.py
2402            (TestTransientTable.test_auto_transient_table_query): Added a test
2403            for using a Column object as the "right" parameter to a query.
2404    
2405    2003-05-19  Frank Koormann  <[email protected]>
2406    
2407            * Thuban/version.py (get_changelog_date):
2408            Catch exceptions if ChangeLog does not exist.
2409    
2410            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
2411    
2412    2003-05-19  Frank Koormann  <[email protected]>
2413    
2414            Extended version information for Thuban
2415    
2416            * Thuban/version.py: New, version information for Thuban: Last
2417            modification date and last ChangeLog entry date.
2418    
2419            * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
2420            information: Display Thuban, wxPython and Python version.
2421    
2422    2003-05-16  Bernhard Herzog  <[email protected]>
2423    
2424            * Thuban/Model/save.py: Remove some unused imports including the
2425            __future__ import for nested_scopes as Thuban relies on Python 2.2
2426            now.
2427            (XMLWriter.encode): Remove the special case for a None argument.
2428            In the saver encode is always called with a string argument.
2429    
2430    2003-05-16  Bernhard Herzog  <[email protected]>
2431    
2432            * Thuban/UI/__init__.py: Remove the work-around for the locale bug
2433            in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
2434            of the bug was that e.g. float("1.2") would fail. Thuban now
2435            requires 2.4.x.
2436            
2437    2003-05-16  Frank Koormann   <[email protected]>
2438    
2439            Printing enhancement and WMF export (under Win32)
2440    
2441            * Thuban/UI/renderer.py (ExportRenderer): New, derived from
2442            ScreenRenderer. Renders Map, Legend and Scalebar for export.
2443            (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
2444            PrintRender.
2445    
2446            * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
2447            to fullfil information needed for PrinterRenderer.
2448            (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
2449            (MapCanvas.Print): Adapted to new MapPrintout.
2450            (OutputTransform): General calculations to transform from canvas
2451            coordinates to export/printing devices.
2452    
2453            * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
2454            new method_command to call ExportMap, with platform dependency (only
2455            __WXMSW__)
2456      
2457            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
2458            of scalebar drawing area as new parameters.
2459            
2460            * Thuban/Model/scalebar.py (roundInterval): round long instead of int
2461    
2462            * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
2463            Update to extended scalebar.DrawScalebar header.
2464    
2465            * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
2466    
2467            * test/test_scalebar.py: Made test executable as standalone.
2468    
2469    2003-05-16  Bernhard Herzog  <[email protected]>
2470    
2471            * Thuban/Model/table.py (Table): Remove this compatibility alias
2472            for DBFTable.
2473    
2474            * test/test_table.py: Import DBFTable as Table because that alias
2475            doesn't exist anymore.
2476    
2477            * Thuban/UI/classgen.py: Remove some unused imports
2478    
2479    2003-05-14  Jonathan Coles   <[email protected]>
2480    
2481            * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
2482            Fix docstring.
2483            (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
2484            (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
2485            values of the supplied range to determine the beginning and end
2486            bounds of the generated classes.
2487    
2488            * Thuban/Model/range.py (Range.number_re): Now accepts floats that
2489            do not have a leading 0 (.5 is now accepted as well as 0.5).
2490    
2491            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
2492            call to ClassGenerator.GenUniformDistribution.
2493    
2494            * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
2495            layout bug with the 'Projection' label.
2496    
2497            * test/support.py (FloatTestCase): New. Needed for the Range tests.
2498    
2499            * test/test_range.py: New. Imported from SciParam.
2500    
2501    2003-05-12  Jonathan Coles   <[email protected]>
2502    
2503            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
2504            to table.UniqueValues() with calls that retrieve all the values
2505            from the table. This will need to be replaced by a method on table
2506            which can simply return the list (perhaps more efficiently).
2507    
2508    2003-05-12  Jonathan Coles   <[email protected]>
2509    
2510            The return value of ClassGenerator.CalculateQuantiles has changed.
2511            Refer to the documentation for details.
2512    
2513            * test/test_classgen.py: Modified Quantile tests to use the
2514            new return values.
2515    
2516            * Thuban/Model/classgen.py
2517            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
2518            use new return values from CalculateQuantiles to produce the correct
2519            range bounds in the Classification.
2520            (ClassGenerator.CalculateQuantiles): Add more comments describing
2521            the return values and parameters. Make minor adjustments to improve
2522            the legibility of the code. Fix problem with adjusted not being set
2523            in most cases.
2524    
2525    2003-05-12  Frank Koormann <[email protected]>
2526            
2527            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
2528            and latin1. Fixes #1851 finally.
2529    
2530    2003-05-09  Jonathan Coles   <[email protected]>
2531    
2532            * test/test_classgen.py: New. Tests the Quantile algorithm.
2533    
2534            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
2535            Clean up debugging statement, add comments, fix a small bug in the
2536            returned adjusted percentiles.
2537            
2538    2003-05-09  Jonathan Coles   <[email protected]>
2539    
2540            Introduces Range class from SciParam into the ClassGroupRange class,
2541            and such ranges can now be saved and loaded from disk.
2542    
2543            Quantiles are now available in the Classification Generator.
2544    
2545            Initial support for building Queries on a table. Doesn't do anything
2546            but run some tests.
2547    
2548            * Thuban/Model/classification.py: Explicit imports.
2549            (ClassGroupRange): Use the Range class to store the underlying
2550            range information. The interface remains the same, except for
2551            GetRange(), and you can also supply a Range object as the min
2552            parameter to SetRange or __init__.
2553    
2554            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
2555            string appropriately for use in Thuban. Fixes RTbug #1851.
2556            (SessionLoader.end_projection): Handle the context of the
2557            projection tag a bit better by looking at what objects are not
2558            None. There was an assumption that a projection tag for a map
2559            could occur before any layers.
2560            (SessionLoader.start_clrange): Provide backward compatibility for
2561            reading min/max values as well as the new range parameter.
2562    
2563            * Thuban/Model/map.py: Explicit imports.
2564    
2565            * Thuban/Model/resource.py: Import _.
2566            (ProjFileSaver.write): write header using projfile.dtd.
2567    
2568            * Thuban/Model/save.py: Explicit imports.
2569            (XMLWriter.encode): New. Encode the given string from a format
2570            used by Thuban into UTF-8. Fixes RTbug #1851.
2571    
2572            * Thuban/UI/classgen.py: Explicit imports.
2573            (ClassGenDialog.__init__): Clean up the code and add support
2574            for Quantiles.
2575            (ClassGenDialog.OnOK): Add support for Quantiles.
2576            (GenQuantilesPanel): New. Input panel for Quantiles.
2577            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
2578            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
2579    
2580            * Thuban/Model/classgen.py: New. Contains all the classes named above.
2581    
2582            * Thuban/UI/classifier.py: Explicit imports.
2583            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
2584            ClassTable.SetValueAsCustom): Reworked to use new Range class.
2585    
2586            * Thuban/UI/legend.py: Explicit imports.
2587    
2588            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
2589            a Table menu and associated method calls.
2590            (MainWindow.choose_color): Removed. No longer needed.
2591    
2592            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
2593            should be disabled if no projection is selected in the available
2594            list.
2595    
2596            * Thuban/UI/renderer.py: Explicit imports.
2597    
2598            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
2599            with correctly selecting the rows and issuing the right events.
2600            Be sure to call Skip() to allow the grid to do some of its own
2601            handling which allows the rows to actually be selected.
2602            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
2603            selecting multiple shapes.
2604            (LayerTableFrame): Support for building Queries.
2605            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
2606    
2607            * Thuban/UI/tree.py: Explicit imports.
2608    
2609            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
2610            table view can call it.
2611    
2612            * test/test_classification.py: Explicit imports.
2613            (TestClassification.test_ClassGroupRange): Fix test for new
2614            Range class.
2615    
2616            * Doc/thuban.dtd: Add range parameter for clrange.
2617    
2618            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
2619            object in ClassGroupRange, and also uesd for inputting ranges in
2620            the classifer table and elsewhere.
2621    
2622            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
2623            yet.
2624    
2625    2003-05-09  Frank Koormann <[email protected]>
2626    
2627            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
2628    
2629    2003-05-08  Frank Koormann <[email protected]>
2630    
2631            Coding style updates
2632    
2633            * test/test_scalebar.py: Replaced tab indentation by spaces.
2634    
2635            * Thuban/UI/scalebar.py: Explicit imports.
2636    
2637    2003-05-08  Frank Koormann <[email protected]>
2638    
2639            * Thuban/UI/scalebar.py
2640            (ScaleBar.DrawScalebar): Format string bug fixed.
2641    
2642    2003-05-08  Frank Koormann <[email protected]>
2643    
2644            Reorganization of scalebar component (no wx in Thuban/Model)
2645    
2646            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
2647            (deriveInterval):
2648            Calculate scalebar interval and unit which fits in width for scale.
2649            (roundInterval): Round float.
2650    
2651            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
2652    
2653            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
2654    
2655            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
2656    
2657    2003-05-08  Frank Koormann <[email protected]>
2658    
2659            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
2660            Initialize ScaleBar with canvas.map
2661    
2662            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
2663            round intervals to display smarter lengths
2664            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
2665            layer. If the maps has no projection applied grey the scalebar.
2666    
2667    2003-05-07  Frank Koormann <[email protected]>
2668            
2669            Basic Scalebar features added.
2670    
2671            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
2672    
2673            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
2674            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
2675            and the renderer.
2676    
2677            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
2678    
2679            * Thuban/UI/messages.py: SCALE_CHANGED added.
2680    
2681    2003-05-07  Bernhard Herzog  <[email protected]>
2682    
2683            * Thuban/Model/session.py (Session.__init__): New instance
2684            variable shapestores to hold a list of all open shapestore objects
2685            (Session.ShapeStores): New. Accessor method for the shapestores
2686            list.
2687            (Session._add_shapestore, Session._clean_weak_store_refs): New.
2688            Internal methods to maintain the shapestores list.
2689            (Session.Tables): New. Return all tables open in the session.
2690            (Session.OpenShapefile): Insert the new ShapeStore into the
2691            shapestores list.
2692    
2693            * test/test_session.py (TestSessionSimple.test_initial_state): Add
2694            tests for ShapeStores and Tables
2695            (TestSessionWithContent.test_shape_stores)
2696            (TestSessionWithContent.test_tables): New. Test cases for
2697            ShapeStores and Tables
2698    
2699    2003-05-07  Bernhard Herzog  <[email protected]>
2700    
2701            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
2702            Add comments about the optimizations used.
2703            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
2704            Implement the ReadValue table interface method.
2705    
2706            * test/test_transientdb.py
2707            (TestTransientTable.run_iceland_political_tests)
2708            (TestTransientTable.test_transient_joined_table): Add tests for
2709            ReadValue
2710    
2711    2003-05-07  Frank Koormann <[email protected]>
2712    
2713            * Resources/Bitmaps/fulllayerextent.xpm,
2714            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
2715            new icons.
2716    
2717    2003-05-06  Bernhard Herzog  <[email protected]>
2718    
2719            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
2720            New. Simply delegate to the transient table's version.
2721    
2722            * test/test_transientdb.py
2723            (TestTransientTable.test_auto_transient_table_query): New. Test
2724            case for AutoTransientTable's SimpleQuery
2725    
2726    2003-05-06  Bernhard Herzog  <[email protected]>
2727    
2728            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
2729            Implement a simple query method for the query dialog
2730            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
2731            the row index or shapeid.
2732            (TransientTable.create): Insert the right value of the row index
2733            (TransientJoinedTable.create): Copy the row index of the left
2734            table to the joined result table
2735    
2736            * test/test_transientdb.py
2737            (TestTransientTable.test_transient_table_read_twice): Fix
2738            doc-string
2739            (TestTransientTable.test_transient_table_query): New. Test for the
2740            SimpleQuery method
2741    
2742    2003-05-06  Bernhard Herzog  <[email protected]>
2743    
2744            Convert all table users to use the new table interface. This only
2745            covers Thuban itself, not GREAT-ER or other applications built on
2746            Thuban yet, so the compatibility interface stays in place for the
2747            time being but it now issues DeprecationWarnings.
2748    
2749            Finally, the new Table interface has a new method, HasColumn.
2750    
2751            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
2752            issue deprecation warnings when they're. The warnings refer to the
2753            caller of the method.
2754            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
2755            for the deprecation warnings
2756    
2757            * test/test_table.py: Ignore the deprecation warnings for the old
2758            table in the tests in this module. The purpose of the tests is to
2759            test the old interface, after all.
2760    
2761            * test/test_transientdb.py
2762            (TestTransientTable.run_iceland_political_tests): Use the
2763            constants for the types. Add a test for HasColumn
2764            (TestTransientTable.test_transient_joined_table): Adapt to new
2765            table interface. Add a test for HasColumn
2766            (TestTransientTable.test_transient_table_read_twice): Adapt to new
2767            table interface
2768    
2769            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
2770            Adapt to new table interface
2771    
2772            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
2773            new table interface
2774    
2775            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
2776            (RecordTable.SetTable): Adapt to new table interface
2777    
2778            * Thuban/UI/classifier.py (Classifier.__init__)
2779            (Classifier.__init__): Adapt to new table interface
2780    
2781            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
2782            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
2783            to new table interface
2784    
2785            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
2786            (AutoTransientTable.HasColumn): Implement the new table interface
2787            method
2788            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
2789            (AutoTransientTable.UniqueValues): Adapt to new table interface
2790    
2791            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
2792            Adapt to new table interface
2793    
2794            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
2795            simplify opening shapefiles a bit easier.
2796            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
2797            (TestLayer.test_point_layer): Use the new helper method
2798            (TestLayer.test_get_field_type): New. Test for the GetFieldType
2799            method
2800    
2801            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
2802            the new table method
2803    
2804            * test/test_memory_table.py (TestMemoryTable.test_has_column):
2805            Test for the new table method HasColumn
2806    
2807    2003-05-06  Jonathan Coles   <[email protected]>
2808    
2809            Addresses the "Selection Extent" wish of RTbug #1787.
2810    
2811            * Resources/Bitmaps/fulllayerextent.xpm,
2812            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
2813            extent. These are just place holders for the real bitmaps.
2814    
2815            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
2816            calculate the bounding box once (the first time compute_bbox() is
2817            called).
2818            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
2819            the bounding box for the shapes in lat/long coordinates.
2820    
2821            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
2822            option.
2823            (MainWindow.has_selected_shapes): New. Returns true if there are
2824            any selected shapes.
2825            (MainWindow.FullSelectionExtent): New. Calls
2826            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
2827            (_has_selected_shapes): New. Returns true if there are any
2828            selected shapes.
2829    
2830            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
2831            true if there are any selected shapes.
2832    
2833            * Thuban/UI/view.py (MapCanvas): Added delegated method
2834            HasSelectedShapes.
2835            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
2836            shapes on the canvas using the map projection (if any).
2837    
2838            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
2839            for Layer.ShapesBoundingBox().
2840    
2841    2003-05-06  Bernhard Herzog  <[email protected]>
2842    
2843            * Resources/Projections/defaults.proj: Fix spelling of Mercator
2844    
2845    2003-05-05  Jonathan Coles   <[email protected]>
2846    
2847            Addresses the "Full Layer Extent" wish of RTbug #1787.
2848    
2849            * Resources/Projections/defaults.proj: Added UK National Grid.
2850    
2851            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
2852            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
2853            when the user selects the menu option.
2854    
2855            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
2856            scales the given layer on the canvas using the map projection.
2857    
2858    2003-05-05  Bernhard Herzog  <[email protected]>
2859    
2860            Convert the table implementations to a new table interface. All
2861            tables use a common mixin class to provide backwards compatibility
2862            until all table users have been updated.
2863    
2864            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
2865            provide backwards compatibility for table classes implementing the
2866            new interface
2867            (DBFTable, MemoryTable): Implement the new table interface. Use
2868            OldTableInterfaceMixin as base for compatibility
2869            (DBFColumn, MemoryColumn): New. Column description for DBFTable
2870            and MemoryTable resp.
2871    
2872            * test/test_dbf_table.py: New. Test cases for the DBFTable with
2873            the new table interface.
2874    
2875            * test/test_memory_table.py: New. Test cases for the MemoryTable
2876            with the new table interface.
2877    
2878            * test/test_table.py: Document the all tests in this file as only
2879            for backwards compatibility. The equivalent tests for the new
2880            interface are in test_memory_table.py and test_dbf_table.py
2881            (MemoryTableTest.test_read): field_info should be returning tuples
2882            with four items
2883            (MemoryTableTest.test_write): Make doc-string a more precise.
2884    
2885            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
2886            table interface. Derive from from OldTableInterfaceMixin for
2887            compatibility.
2888            (TransientTableBase.create): New intance variable column_map to
2889            map from names and indices to column objects
2890            (TransientTable.create): Use the new table interface of the input
2891            table
2892            (AutoTransientTable): Convert to new table interface. Derive from
2893            from OldTableInterfaceMixin for compatibility.
2894            (AutoTransientTable.write_record): Removed. It's not implemented
2895            yet and we still have to decide how to handle writing with the new
2896            table and data framework.
2897    
2898            * test/test_transientdb.py
2899            (TestTransientTable.run_iceland_political_tests)
2900            (TestTransientTable.test_transient_joined_table): Use the new
2901            table interface
2902    
2903    2003-05-05  Jonathan Coles   <[email protected]>
2904    
2905            This is namely a collection of UI updates to improve user interactivity.
2906            Tabbing between controls now exists and you can use ESC to close dialog
2907            boxes; ENTER will active the default button.
2908    
2909            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
2910            order that the controls are created so that tabbing works correctly.
2911            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
2912            wxDialog can handle the default button correctly.
2913            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
2914            same reasons as for OnOK.
2915            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
2916            when we ask the table for the maximum/minimum values of a field
2917            which could take a very long time.
2918    
2919            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
2920            order that the controls are created so that tabbing works correctly.
2921            (SelectPropertiesDialog.__init__): Rearrange the order that the
2922            controls are created so that tabbing works correctly.
2923    
2924            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
2925            to derive from a wxDialog but behave like the original implementation
2926            which was derived from a wxFrame. wxDialog provides useful key
2927            handling functionality like ESC calling OnCancel and ENTER calling
2928            OnOK which is lost with wxFrame.
2929    
2930            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
2931            new dialogs.
2932    
2933            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
2934            order that the controls are created so that tabbing works correctly.
2935            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
2936            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
2937            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
2938            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
2939            can provide the "UK National Grid" as a default projection.
2940            (UTMPanel.__init__): Rearrange the order that the controls are
2941            created so that tabbing works correctly.
2942    
2943    2003-05-05  Bernhard Herzog  <[email protected]>
2944    
2945            * extensions/thuban/wxproj.cpp: Fix some of the comments.
2946            (project_point): If a map projection but no layer projection is
2947            given, convert degrees to radians before applying the map
2948            projection.
2949    
2950            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
2951            (TableGrid.allow_messages): New methods to make it possible to
2952            inhibit message sending.
2953            (TableGrid.issue): Only send the message if not inhibited.
2954            (LayerTableGrid.select_shape): Use the new methods to make sure
2955            that no ROW_SELECTED message is sent while we're updating the
2956            selected rows to match the selected shapes.
2957    
2958    2003-05-02  Jan-Oliver Wagner <[email protected]>
2959    
2960            Implementation of MemoryTable.
2961    
2962            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
2963            implementation that operates on a list of tuples. All of the data
2964            are kept in the memory.
2965    
2966            * test/test_table.py (MemoryTableTest): New.
2967    
2968            * test/test_transientdb.py (SimpleTable): Removed.
2969            (TestTransientTable.test_transient_joined_table,
2970            (TestTransientTable.test_transient_table_read_twice): Replaced
2971            SimpleTable by MemoryTable.
2972    
2973    2003-04-30  Jonathan Coles   <[email protected]>
2974    
2975            * Data/iceland_sample.thuban: Now contains correct projections
2976            for each of the layers.
2977    
2978            * Resources/Projections/defaults.proj: Geographic projection
2979            contains unit conversion parameter.
2980    
2981    2003-04-30  Jonathan Coles   <[email protected]>
2982    
2983            The most important part of this putback is the projection changes.
2984            It should now be possible to specify the projection that a layer
2985            is in and then specify a different projection for the map. The
2986            projection dialog has an extra parameter for a geographic projection
2987            which lets the user select if the input is in degrees or radians.
2988    
2989            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
2990            to say that the parameter is a tuple of unprojected
2991            points (which is what the callers to this method were assuming).
2992            Also, since the points are unprojected we need to projected them.
2993    
2994            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
2995            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
2996            groups are selected, move the layer up/down. Fixes RTbug #1833.
2997    
2998            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
2999    
3000            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
3001            parameter in call to SetClientData.
3002            (GeoPanel): Add support for selecting the units that the
3003            source data is in (Radians or Degrees).
3004    
3005            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
3006            the rendering loop by reducing the number of if's, removing the
3007            unnecessary try/except block, and checking if the old group
3008            is the same as the new one (which happens a lot if there is
3009            no classification, or lots of shapes are in the same group).
3010    
3011            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
3012            around the redraw routine to try to catch problems that the user
3013            may create by selecting invalid projections for the data set and
3014            map. Clears the display if there are any problems and prints the
3015            error.
3016            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
3017            rectangle.
3018    
3019            * extensions/thuban/wxproj.cpp (project_point): First invert the
3020            supplied point (which should be in projected coordinates) using
3021            the layer's projection and then project the point using the
3022            map's projection.
3023            (project_points): Use project_point() to project each point.
3024    
3025    2003-04-30  Jan-Oliver Wagner <[email protected]>
3026    
3027            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
3028            don't set the Classification to None if the classfication field
3029            is None (ie only a DEFAULT).
3030    
3031    2003-04-30  Bernhard Herzog  <[email protected]>
3032    
3033            * Thuban/UI/view.py: Fix some typos.
3034    
3035            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
3036            not pop up the dialog if the selection becomes empty (this could
3037            happen if e.g. a new selection is opened while the identify tool
3038            is active and dialog had been closed)
3039    
3040    2003-04-30  Bernhard Herzog  <[email protected]>
3041    
3042            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
3043            instance variable read_record_last_result
3044            (TransientTableBase.read_record): Make sure reading the same
3045            record twice works. The implementation uses the new instance
3046            variable read_record_last_result
3047    
3048            * test/test_transientdb.py
3049            (TestTransientTable.test_transient_table_read_twice): New test
3050            case for the above bug-fix.
3051    
3052    2003-04-29  Jonathan Coles   <[email protected]>
3053    
3054            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
3055    
3056            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
3057    
3058            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
3059            (ClassTable.SetValueAsCustom): Rename keyword argument in
3060            ClassGroup* constructors to match argument name.
3061    
3062    2003-04-29  Bernhard Herzog  <[email protected]>
3063    
3064            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
3065            transient DB if it exists to make sure it doesn't leave a journal
3066            file in the temp directory.
3067    
3068            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
3069            self.conn to None after closing the connection to make sure it's
3070            not closed twice
3071    
3072    2003-04-29  Jonathan Coles   <[email protected]>
3073    
3074            Add a visible parameter in the layer XML tag. The default value is
3075            "true". If anything other than "false" is specified we also assume
3076            "true". Addresses RTbug #1025.
3077    
3078            * Doc/thuban.dtd: Add visible parameter to a layer.
3079    
3080            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
3081            of visible from 1 to True.
3082            (Layer.__init__): Change default value of visible from 1 to True.
3083    
3084            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
3085            parameter.
3086    
3087            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
3088            parameter.
3089    
3090            * test/test_load.py: Add new test data contents_test_visible.
3091            (LoadSessionTest.setUp): save test data.
3092            (LoadSessionTest.testLayerVisibility): Test if the visible flag
3093            is loaded correctly.
3094    
3095            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
3096            for saving an invisible layer.
3097    
3098    2003-04-29  Jonathan Coles   <[email protected]>
3099    
3100            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
3101            legend dialog box and tell it to change its map to the one
3102            supplied to SetMap(). Fixes RTbug #1770.
3103    
3104    2003-04-29  Bernhard Herzog  <[email protected]>
3105    
3106            Next step of table implementation. Introduce a transient database
3107            using SQLite that some of the data is copied to on demand. This
3108            allows us to do joins and other operations that require an index
3109            for good performance with reasonable efficiency. Thuban now needs
3110            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
3111            haven't tested that.
3112            
3113            * Thuban/Model/transientdb.py: New. Transient database
3114            implementation.
3115    
3116            * test/test_transientdb.py: New. Tests for the transient DB
3117            classes.
3118    
3119            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
3120            classes to help automatically remove temporary files and
3121            directories.
3122            (Session.__init__): New instance variables temp_dir for the
3123            temporary directory and transient_db for the SQLite database
3124            (Session.temp_directory): New. Create a temporary directory if not
3125            yet done and return its name. Use AutoRemoveDir to have it
3126            automatically deleted
3127            (Session.TransientDB): Instantiate the transient database if not
3128            done yet and return it.
3129    
3130            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
3131            AutoTransientTable so that data is copied to the transient DB on
3132            demand.
3133            (SimpleStore): New class that simply combines a table and a
3134            shapefile
3135    
3136            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
3137            DBFTable and update its doc-string to reflect the fact that this
3138            is only the table interface to a DBF file. Table is now an alias
3139            for DBFTable for temporary backwards compatibility.
3140    
3141            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
3142            the last reference to the session goes away so that the temporary
3143            files are removed properly.
3144    
3145            * test/test_load.py (LoadSessionTest.tearDown): Remove the
3146            reference to the session to make sure the temporary files are
3147            removed.
3148    
3149    2003-04-29  Bernhard Herzog  <[email protected]>
3150    
3151            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
3152            the __parser instance variable into a normal local variable in
3153            read. It's only used there and read will never be called more than
3154            once. Plus it introduces a reference cycle that keeps can keep the
3155            session object alive for a long time.
3156    
3157    2003-04-29  Jonathan Coles   <[email protected]>
3158    
3159            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
3160            Projection an immutable item. Fixes RTbug #1825.
3161            (Projection.__init__): Initialize instance variables here.
3162            (ProjFile.Replace): New. Replace the given projection object with
3163            the new projection object. This solves the problem of needing the
3164            mutator Projection.SetProjection() in the ProjFrame class and
3165            allows a projection to change parameters without changing its
3166            location in the file.
3167    
3168            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
3169            be of type wxSAVE and should verify overwriting a file.
3170    
3171            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
3172            ProjFile.Replace() method instead of the mutator
3173            Projection.SetProjection(). Also requires that we reassign the
3174            client data to the new projection.
3175    
3176            * test/test_proj.py (TestProjection.test): Test GetName() and
3177            GetAllParameters()
3178            (TestProjFile.test): Remove tests for Set*() methods. Add tests
3179            for Replace().
3180    
3181    2003-04-25  Jonathan Coles   <[email protected]>
3182    
3183            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
3184            to save the name of the projection.
3185    
3186            * test/test_save.py (SaveSessionTest.testLayerProjection): New
3187            test to verify layer projections are saved correctly.
3188    
3189    2003-04-25  Jonathan Coles   <[email protected]>
3190    
3191            * Thuban/Model/proj.py (Projection.SetName): Set the name
3192            to "Unknown" if name is None.
3193            (Projection.SetAllParameters): New. Set the projection's
3194            parameter list to the one supplied.
3195            (Projection.SetProjection): New. Set the projection's
3196            properties to those of the supplied Projection.
3197    
3198            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
3199            the dialog title to include the map's title.
3200            (MainWindow.LayerProjection): Set the dialog title to include
3201            the layer's title.
3202    
3203            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
3204            error dialogs into a single method call.
3205            (ProjFrame.__VerifyButtons): Add more states to check.
3206            (ProjFrame.__GetProjection): Return the current state of an
3207            edited projection or None.
3208            (ProjFrame.__FillAvailList): Remove checks for states that
3209            shouldn't exist.
3210            (ProjFrame._OnNew): Clear all selected items and supply
3211            a projection panel if necessary.
3212    
3213            * test/test_proj.py (TestProjFile.test): Add tests for
3214            ProjFile.SetAllParameters, ProjFile.SetProjection,
3215            ProjFile.SetName.
3216    
3217    2003-04-25  Jonathan Coles   <[email protected]>
3218    
3219            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
3220            takes an optional argument to select the current projection.
3221            This does not guarantee that the item is visible due to
3222            limited wxWindows functionality. Fixes RTBug #1821.
3223    
3224    2003-04-25  Jonathan Coles   <[email protected]>
3225    
3226            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
3227            the projection name and use it when constructing the Projection
3228            object.
3229    
3230            * Thuban/Model/proj.py (Projection.__init__): Change the default
3231            value for 'name' to None and then test if name is equal to None
3232            in the body of the constructor. This way the caller doesn't have to
3233            know what the default value should be. Namely, useful in load.py
3234            where we have to pick a default value if the 'name' parameter
3235            doesn't exist in the XML file.
3236    
3237            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
3238            Tests a file where a layer has a projection.
3239    
3240    2003-04-25  Jonathan Coles   <[email protected]>
3241    
3242            * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
3243            tree for projection information.
3244    
3245            * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
3246            XMLReader.GetFileName.
3247            (SessionLoader): Added support for loading projection tags that
3248            appear inside a layer.
3249    
3250            * Thuban/Model/proj.py (ProjFile): Document the class. Move
3251            back to using a list because the order of the projections in
3252            the file is important to maintain. Fixes RTbug #1817.
3253    
3254            * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
3255            to ProjFile.GetFilename.
3256    
3257            * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
3258            information.
3259    
3260            * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
3261            ProjFrame._OnSaveAs. Removed old dead code from previous
3262            implementation.
3263            (ProjFrame._OnExport): Add support for exporting more than one
3264            projection to a single file.
3265            (ProjFrame.__FillAvailList): use string formatting (% operator)
3266            to build strings that are (partly) translated. Fixes RTbug #1818.
3267    
3268            * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
3269            class.
3270    
3271    2003-04-24  Bernhard Herzog  <[email protected]>
3272    
3273            * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
3274    
3275            * po/fr.po: New. French translation by Daniel Calvelo Aros
3276    
3277            * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
3278            empty strings.
3279    
3280    2003-04-24  Jonathan Coles   <[email protected]>
3281    
3282            * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
3283            implement the interface that the ProjFrame dialog expects.
3284    
3285            * Thuban/Model/proj.py (Projection.SetName): New. Allows the
3286            name of the projection to be changed.
3287            (ProjFile): Use a dictionary instead of a list so that removing
3288            projections is easier and we are sure about uniqueness.
3289            (ProjFile.Remove): Remove the given projection object.
3290    
3291            * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
3292            Return a list with only one projection file instead of searching for
3293            any projection file. This simplifies many things if the user can
3294            only have one system file and one user file.
3295    
3296            * Thuban/UI/classgen.py: Change all references to
3297            genCombo to genChoice.
3298    
3299            * Thuban/UI/mainwindow.py: Add a Projection option under the
3300            layer menu.
3301            (MainWindow.LayerProjection): New. Open up a projection window
3302            for a layer.
3303    
3304            * Thuban/UI/projdialog.py: Large changes to how the dialog is
3305            laid out. Use three panels instead of one. One for the list of
3306            projections, one for the edit controls, and one for the buttons.
3307            Fixed resizing problems so that the dialog resizes correctly
3308            when the projection panel changes. Added import/export, save, and
3309            new buttons/functionality.
3310    
3311    2003-04-24  Bernhard Herzog  <[email protected]>
3312    
3313            First step towards table management. Introduce a simple data
3314            abstraction so that we replace the data a layer uses more easily
3315            in the next step.
3316    
3317            * Thuban/Model/data.py: New file with a simple data abstraction
3318            that bundles shapefile and dbffile into one object.
3319    
3320            * Thuban/Model/session.py (Session.OpenShapefile): New method to
3321            open shapefiles and return a shape store object
3322    
3323            * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
3324            object instead of a shapefile filename. This introduces a new
3325            instance variable store holding the datastore. For intermediate
3326            backwards compatibility keep the old instance variables.
3327            (open_shapefile): Removed. No longer needed with the shape store.
3328            (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
3329            get the shape store used by a layer.
3330            (Layer.Destroy): No need to explicitly destroy the shapefile or
3331            table anymore.
3332    
3333            * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
3334            (MainWindow.AddLayer): Use the session's OpenShapefile method to
3335            open shapefiles
3336    
3337            * Thuban/Model/load.py (ProcessSession.start_layer): Use the
3338            session's OpenShapefile method to open shapefiles
3339    
3340            * test/test_classification.py
3341            (TestClassification.test_classification): Use the session's
3342            OpenShapefile method to open shapefiles and build the filename in
3343            a more platform independed way
3344    
3345            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
3346            Implement to have a session to use in the tests
3347            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
3348            (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
3349            session's OpenShapefile method to open shapefiles
3350            (TestLayerLegend.setUp): Instantiate a session so that we can use
3351            it to open shapefiles.
3352            (TestLayerLegend.tearDown): Make sure that all references to
3353            layers and session are removed otherwise we may get a resource
3354            leak
3355    
3356            * test/test_map.py (TestMapAddLayer.test_add_layer)
3357            (TestMapWithContents.setUp): Instantiate a session so that we can
3358            use it to open shapefiles.
3359            (TestMapWithContents.tearDown): Make sure that all references to
3360            layers, maps and sessions are removed otherwise we may get a
3361            resource leak
3362            ("__main__"): use support.run_tests() so that more info about
3363            uncollected garbage is printed
3364    
3365            * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
3366            session's OpenShapefile method to open shapefiles
3367            ("__main__"): use support.run_tests() so that more info about
3368            uncollected garbage is printed
3369    
3370            * test/test_selection.py (TestSelection.tearDown): Make sure that
3371            all references to the session and the selection are removed
3372            otherwise we may get a resource leak
3373            (TestSelection.get_layer): Instantiate a session so that we can
3374            use it to open shapefiles.
3375            ("__main__"): use support.run_tests() so that more info about
3376            uncollected garbage is printed
3377    
3378            * test/test_session.py (TestSessionBase.tearDown)
3379            (TestSessionWithContent.tearDown): Make sure that all references
3380            to the session and layers are removed otherwise we may get a
3381            resource leak
3382            (TestSessionWithContent.setUp): Use the session's OpenShapefile
3383            method to open shapefiles
3384    
3385    2003-04-24  Jonathan Coles   <[email protected]>
3386    
3387            * Thuban/Model/load.py (XMLReader.read): Should have been checking
3388            if the file_or_filename object had the 'read' attribute.
3389    
3390    2003-04-23  Jonathan Coles   <[email protected]>
3391    
3392            * Thuban/Model/resource.py: Fixes RTbug #1813.
3393            (ReadProjFile): Add documentation about which exceptions are raised.
3394            Always pass the exceptions up to the caller.
3395            (GetProjFiles): If the directory can't be read return an empty list.
3396            If any of the proj files can't be read skip that file and go
3397            on to the next one.
3398    
3399            * test/test_proj.py: Added test cases to handle nonexistent files,
3400            unreadable files, and files that don't parse correctly.
3401    
3402    2003-04-23  Jonathan Coles   <[email protected]>
3403    
3404            Projection dialog. Allows the user to select from a list
3405            of projection templates and optionally edit them and save new ones.
3406    
3407            * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
3408            (ProjPanel): Base class for projection specific panels.
3409            (TMPanel): Projection panel for Transverse Mercartor.
3410            (UTMPanel): Projection panel for Universal Transverse Mercartor.
3411            (LCCPanel): Projection panel for Lambert Conic Conformal.
3412            (GeoPanel): Projetion panel for Geographic Projection.
3413    
3414    2003-04-23  Jonathan Coles   <[email protected]>
3415    
3416            * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
3417            promote symmetry. There now exists XMLReader and XMLWriter.
3418            (XMLReader.read): New. Call to read the given file descriptor or
3419            filename.
3420            (XMLReader.close): New. Make sure the file is closed.
3421            (XMLReader.GetFileName): New. Return just the file name that is being
3422            read from.
3423            (XMLReader.GetDirectory): New. Return just the directory of the file
3424            that is being read.
3425            (XMLReader.AddDispatchers): New. Take a dictionary which contains
3426            the names of functions to call as the XML tree is parsed.
3427            (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
3428            (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
3429            (SessionLoader): Removed class variables start_dispatcher and
3430            end_dispatcher since this functionality is now part of a class
3431            instance. Fixes RTbug #1808.
3432            (SessionLoader.__init__): Add dispatcher functions.
3433            (load_xmlfile): Code was moved into the XMLReader.read().
3434            (load_session): Use modified SessionLoader.
3435    
3436            * Thuban/Model/map.py (Map.GetProjection): New. Returns the
3437            map's projection.
3438    
3439            * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
3440            GetAllParameters.
3441            (Projection.GetParameter): Returns the value for the given parameter.
3442    
3443            * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
3444            (GetProjFiles): Renamed from GetProjections. Now returns a list
3445            of ProjFile objects.
3446            (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
3447            a list of ProjFile objects whose files are not user defined.
3448            (GetUserProjFiles): Renamed from GetUserProjections. Returns a
3449            list of ProjFile objects whose files are user defined.
3450            (ProjFileReader): Extend new XMLReader.
3451    
3452            * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
3453            promote symmetry.
3454    
3455            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
3456            control instead of a wxComboBox. wxChoice controls do not generate
3457            events as the uses highlights possible choices which fixes problems
3458            with resizing the dialog when the use selects an option.
3459    
3460            * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
3461            control instead of a wxComboBox.
3462    
3463            * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
3464            dialog.
3465    
3466            * test/test_proj.py (TestProjection.test): New tests for GetParameter
3467            method.
3468    
3469    2003-04-22  Bernhard Herzog  <[email protected]>
3470    
3471            * Thuban/UI/mainwindow.py: Remove some unused imports and global
3472            constants
3473    
3474            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
3475            (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
3476    
3477    2003-04-17  Bernhard Herzog  <[email protected]>
3478    
3479            * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
3480            (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
3481            anymore.
3482            (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
3483            (Layer.ShapeType, Layer.Shape): No need to call
3484            self.open_shapefile since it's always called in __init__
3485    
3486            * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
3487            In wxPython 2.4 there's no need to extend MainLoop anymore since
3488            wxPython itself makes sure OnExit is called.
3489    
3490    2003-04-16  Jonathan Coles   <[email protected]>
3491    
3492            Initial putback of projection management code. Includes new
3493            classes to read and write projection files. The current load
3494            and save classes were abstracted a bit so they could be reused.
3495            The Projection class was extended to provide new methods and
3496            have a name.
3497    
3498            * Thuban/Model/load.py (XMLProcessor): New. Contains all the
3499            general XML reading methods that were part of ProcessSession.
3500    
3501            * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
3502            name.
3503            (ProjFile): New. Represents a file that contains projection
3504            information.
3505    
3506            * Thuban/Model/resource.py: New. Contains general utilities
3507            for read and writing projection files.
3508    
3509            * Thuban/Model/save.py (XMLSaver): New. Contains all the
3510            general XML writing methods that were part of SessionSaver.
3511            (SessionSaver): Renamed from Saver.
3512    
3513            * test/test_proj.py: New test cases for the projection
3514            file read and write functions.
3515    
3516    2003-04-16  Jonathan Coles   <[email protected]>
3517    
3518            * Thuban/Model/classification.py: Use repr() around values
3519            in the ClassGroup*.__repr__() methods so it is clearer when
3520            a value is a string and when it is a number.
3521    
3522            * test/test_load.py: Rework the classification test to test
3523            that we can load old files.
3524            (testLabels): Test a file where the groups have labels.
3525    
3526    2003-04-16  Bernhard Herzog  <[email protected]>
3527    
3528            Safer implementation of the performance enhancements of the
3529            low-level renderer:
3530            
3531            * extensions/thuban/wxproj.cpp (extract_projection)
3532            (extract_pointer): Rename extract_projection to extract_pointer
3533            and redefine its purpose to return the pointer stored in a CObject
3534            returned by the object's cobject method. Update all callers.
3535            (s_draw_info, free_draw_info, draw_polygon_init): Implement the
3536            handling of these low-level parameters so that each s_draw_info
3537            instance is handled as a CObject at python level that also
3538            contains real references to the actual python objects which
3539            contain the values in the struct. Add free_draw_info as the
3540            destructor.
3541            (draw_polygon_shape): Add the py_draw_info parameter which must a
3542            cobject containing an s_draw_info pointer.
3543    
3544            * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
3545            method to instantiat the low-level render parameter
3546            (MapRenderer.draw_shape_layer): Use the new method. Remove some
3547            commented out code.
3548            (MapRenderer.draw_polygon_shape): Make the first parameter not the
3549            layer but the low-level render parameter
3550            (ScreenRenderer.draw_shape_layer): Use the low-level render
3551            parameter.
3552    
3553    2003-04-15  Jonathan Coles   <[email protected]>
3554    
3555            * Thuban/Model/classification.py: Implemented __repr__ for
3556            the ClassGroup* classes to make debugging a bit easier.
3557            (ClassGroup.SetLabel): Check that the string is an instance
3558            of StringTypes not StringType. Accounts for Unicode strings.
3559    
3560            * Thuban/Model/color.py: Implemented __repr__ to make
3561            debugging a bit easier.
3562    
3563            * Thuban/Model/save.py (Saver.write_classification): Need to
3564            save the group label.
3565    
3566            * test/test_load.py (testClassification): New. Loads the
3567            iceland_sample_test.thuban file and checks if it was loaded
3568            correctly.
3569    
3570    2003-04-15  Jonathan Coles   <[email protected]>
3571    
3572            * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
3573            to improve rendering performance by initializing the variables
3574            that are not change each time draw_polygon_shape() is called.
3575            The values are stored in a global struct draw_info.
3576            (draw_polygon_shape): Removed initialization code that is
3577            now in draw_polygon_init().
3578    
3579            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
3580            drawing initialization call to draw_polygon_init()
3581            (MapRenderer.draw_polygon_shape): Use new signature of
3582            draw_polygon_shape.
3583    
3584            * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
3585            weirdness by setting the range to (1, maxint).
3586    
3587            * Thuban/Model/classification.py (ClassGroupProperties): Make
3588            instance variables private and optimize comparison operator
3589            by first checking if the color references are the same.
3590            (ClassGroupSingleton): Make instance variables private.
3591            (ClassGroupRange): Make instance variables private.
3592    
3593            * HOWTO-Release: Filled in missing steps for releasing packages.
3594    
3595    2003-04-15  Bernhard Herzog  <[email protected]>
3596    
3597            First stab at internationalized messages:
3598    
3599            * Thuban/__init__.py (_): Implement the translation function for
3600            real using the python gettext module.
3601    
3602            * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
3603            translate empty strings.
3604    
3605            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
3606            Add a missing space to a warning message
3607    
3608            * po/README: New. Notes about the management of the translation
3609            files.
3610    
3611            * po/Makefile: New. Makefile to help manage the translation files.
3612    
3613            * po/es.po: New. Spanish translation by Daniel Calvelo Aros
3614    
3615            * MANIFEST.in: Include the *.mo files in Resources/Locale and the
3616            translations and support files in po/
3617    
3618            * setup.py (data_files): Add the *.mo files to the data_files too
3619    
3620            * README: Add note about the translations when building from CVS
3621    
3622    2003-04-14  Jonathan Coles   <[email protected]>
3623    
3624            * Thuban/UI/dock.py: Fixes some window resizing problems most
3625            noticable under windows. Always assume the button bitmaps will
3626            be there. Code clean up.
3627            (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
3628            images for the dock/undock button to the same images.
3629            Work around for RTbug #1801.
3630    
3631            * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
3632            be allowed to grow within the sizer. Fixes a bug under Windows
3633            where the toolbar wasn't being drawn.
3634    
3635    2003-04-14  Frank Koormann   <[email protected]>
3636    
3637            * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
3638            Updated design to try to make the button functionality more
3639            transparent.
3640    
3641    2003-04-14  Jonathan Coles   <[email protected]>
3642    
3643            * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
3644            finalize the intialization of the panel.
3645    
3646            * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
3647            creation of the panel. Should be the last thing called in the
3648            initializer of a subclass.
3649    
3650            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
3651            set the current selections in the combo boxes. This is needed
3652            under Windows.
3653    
3654            * Thuban/UI/classifier.py (Classifier.__init__): Add a top
3655            level panel to the dialog so that the background colors are
3656            consistent under Windows.
3657    
3658    2003-04-11  Jonathan Coles   <[email protected]>
3659    
3660            * Thuban/UI/classgen.py: Change color ramps to start at white
3661            not black.
3662    
3663            * Thuban/UI/legend.py: Enable/disable the legend buttons when
3664            the legend changes. Fixes RTbug #1793.
3665    
3666            * test/test_classification.py: Added test for copying of
3667            classifications.
3668    
3669    2003-04-11  Jonathan Coles   <[email protected]>
3670    
3671            * Thuban/UI/resource.py: New. Centralize the loading of resources
3672            such as bitmaps.
3673    
3674            * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
3675            added images to the move buttons, added 'reverse' button.
3676            (CustomRampPanel.__init__): Added images to the move buttons.
3677            (GreyRamp): New. Generates a ramp from white to black.
3678            (HotToColdRamp): New. Generates a ramp from cold to hot colors.
3679    
3680            * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
3681            ID_PROPERTY_*.
3682            (Classifier.__init__): Minor changes to the layout.
3683            (Classifier._OnTitleChanged): Listen for when the user edits the
3684            title and update the dialog's title and the layer's title.
3685    
3686            * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
3687    
3688            * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
3689            (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
3690            if the layer's title changes.
3691    
3692            * Thuban/UI/mainwindow.py: Added new menu item and associated code
3693            to open a dialog to rename the map.
3694            (MainWindow): Use new resource class to import bitmaps.
3695    
3696    2003-04-11  Jonathan Coles   <[email protected]>
3697    
3698            * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
3699            Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
3700            Resources/Bitmaps/group_use_none.xpm,
3701            Resources/Bitmaps/group_use_not.xpm,
3702            Resources/Bitmaps/hide_layer.xpm,
3703            Resources/Bitmaps/layer_properties.xpm,
3704            Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
3705            Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
3706            New.
3707    
3708    2003-04-10  Jonathan Coles   <[email protected]>
3709    
3710            * Thuban/Model/classification.py: (ClassGroupRange.__init__):
3711            Should pass group to ClassGroup constructor.
3712    
3713    2003-04-10  Jonathan Coles   <[email protected]>
3714    
3715            * Thuban/Model/classification.py: (ClassGroup): Move all the common
3716            methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
3717            here. Implement SetVisible(), IsVisible().
3718            (ClassGroup.__init__): Add group parameter which acts as a copy
3719            constructor.
3720    
3721            * Thuban/UI/classifier.py (ClassTable): Add a new column for the
3722            "Visible" check boxes.
3723            (Classifier): Rename the buttons and refactor the code to match
3724            the new labels.
3725    
3726            * Thuban/UI/legend.py: Classify button is now called "Properties".
3727            Refactored the code to change variable names.
3728            (LegendTree.__FillTreeLayer): Only list a group if it is visible.
3729    
3730            * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
3731            MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
3732            renamed to MainWindow.LayerEditProperties.
3733            (MainWindow.ToggleLegend): Don't include map name in legend title.
3734            (MainWindow.SetMap): Added the map name to the window title.
3735            (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
3736            MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
3737            Functionality is found in the layer properties dialog.
3738    
3739            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
3740            draw visible groups.
3741    
3742    2003-04-09  Jonathan Coles   <[email protected]>
3743    
3744            * Thuban/UI/classgen.py: Modifications to allow simple
3745            addition and selection of new color schemes.
3746            (MonochromaticRamp): New. Generates a ramp between two colors.
3747            (RedRamp): New. Generates a ramp of all red.
3748            (GreenRamp): New. Generates a ramp of all green.
3749            (BlueRamp): New. Generates a ramp of all blue.
3750    
3751    2003-04-09  Jonathan Coles   <[email protected]>
3752    
3753            * Thuban/Model/classification.py (Classification.__deepcopy__):
3754            Need to copy over field and fieldType attributes.
3755    
3756            * Thuban/Model/table.py (Table.field_range): New. Retrive the
3757            maximum and minimum values over the entire table for a given
3758            field.
3759            (Table.GetUniqueValues): New. Retrieve all the unique values
3760            in the table for a given field.
3761    
3762            * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
3763            (GenUniquePanel): New. Controls to allow the user to select
3764            which unique field values they would like in the classification.
3765            (CustomRampPanel): Code that was in ClassGenDialog that allows
3766            the user to select the properties for a custom ramp.
3767            (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
3768    
3769            * Thuban/UI/classifier.py: Removed a lot of debugging code.
3770            (Classifier._SetClassification): Callback method so that the
3771            class generator can set the classification in the grid.
3772            (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
3773            editing of a group properties class into a wxWindows control.
3774    
3775            * Thuban/UI/dock.py: It was decided that if the user closes
3776            a dockable window the window should simply hide itself. That
3777            way if the user wants to show the dock again it appears in the
3778            same place as it was when it was closed.
3779            (DockableWindow.Destroy): Call renamed method OnDockDestroy().
3780            (DockableWindow._OnButtonClose): Hide the window instead of
3781            destroying it.
3782            (DockableWindow._OnClose): Hide the window instead of
3783            destroying it.
3784    
3785            * Thuban/UI/legend.py (LegendTree): Use a private method to
3786            consistently set the font and style of the text. Fixes RTbug #1786.
3787    
3788            * Thuban/UI/mainwindow.py: Import just the Classifier class.
3789    
3790    2003-04-07  Bernhard Herzog  <[email protected]>
3791    
3792            * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
3793            to the map module
3794    
3795    2003-04-07  Bernhard Herzog  <[email protected]>
3796    
3797            * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
3798            favor of ToggleSessionTree
3799            (MainWindow.ToggleSessionTree): New method to toggle visibility of
3800            the session tree.
3801            (MainWindow.SessionTreeShown): New method to return whether the
3802            session tree is currently shown.
3803            (MainWindow.ToggleLegend): New method to toggle visibility of the
3804            legend
3805            (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
3806            LegendShown
3807            (MainWindow.LegendShown): New method to return whether the legend
3808            is currently shown.
3809            (_method_command): Add checked parameter so we can define check
3810            menu items
3811            (_has_tree_window_shown, _has_legend_shown): Use the appropriate
3812            mainwindow methods.
3813            (show_session_tree, show_legend commands): Removed.
3814            (toggle_session_tree, toggle_legend commands): New commands to
3815            toggle the visibility of the dialogs
3816    
3817    2003-04-07  Jonathan Coles   <[email protected]>
3818    
3819            * Thuban/UI/classgen.py: Fix Windows problem.
3820    
3821            * Thuban/UI/dock.py: Fix Windows problem.
3822    
3823            * Thuban/UI/mainwindow.py: Use False instead of false.
3824            (MainWindow.ShowLegend): Remove unnecessary switch parameter.
3825    
3826    2003-04-07  Jonathan Coles   <[email protected]>
3827    
3828            Since we now say that the order of the groups in a classification
3829            matters, it makes sense to be able to manipulate that order. Most
3830            of the changes to Thuban/Model/classification.py are to that end.
3831    
3832            * Thuban/Model/classification.py (Classification.AppendGroup,
3833            Classification.InsertGroup, Classification.ReplaceGroup,
3834            Classification.RemoveGroup, Classification.GetGroup): Do as the
3835            names imply.
3836            (Classification.FindGroup): This was called GetGroup, but GetGroup
3837            takes an index, while FindGroup takes a value.
3838            (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
3839            REFERENCE. Currently there is a cyclic reference between the layer
3840            and its classification. If the classification doesn't need to know
3841            its owning layer we can change this, since it may make sense to be
3842            able to use the same classification with different layers.
3843    
3844            * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
3845    
3846            * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
3847            not AddGroup()
3848    
3849            * Thuban/UI/classifier.py: Now that we can depend on the order in
3850            a Classification and have methods to manipulate that order we don't
3851            need to use our own data structures in the grid. We can simply make
3852            the grid/table access the information they need from a copy of
3853            the classification object.
3854            (Classifier._OnCloseBtn): Event handler for when the user clicks
3855            'Close'. This is needed so if the user applies changes and then
3856            continues to change the table the user has the option of discarding
3857            the most recent changes and keeping what they applied.
3858    
3859            * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
3860            into the same group.
3861    
3862            * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
3863            with a really old version of proj, PJ_VERSION won't even be defined.
3864            If it isn't defined then just compile so that the function always
3865            returns Py_False.
3866    
3867            * test/test_classification.py: Fix tests to use the renamed methods.
3868            Still need to write tests for the new methods.
3869    
3870    2003-04-04  Jonathan Coles   <[email protected]>
3871    
3872            * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
3873            call to SetSelection out of the method and before the call
3874            to __SelectField in __init__. This prevents a recursion of events
3875            when _OnFieldSelect is triggered by the user.
3876    
3877    2003-04-04  Jonathan Coles   <[email protected]>
3878    
3879            * Thuban/Model/classification.py: Rename Color.None to
3880            Color.Transparent.
3881            (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
3882            Don't bother copying the color, since Colors are immutable.
3883    
3884            * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
3885            Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
3886            Thuban/UI/renderer.py, Thuban/UI/view.py:
3887            Rename Color.None to Color.Transparent.
3888        
3889            * test/test_classification.py, test/test_load.py: Rename Color.None
3890            to Color.Transparent.
3891    
3892    2003-04-04  Jonathan Coles   <[email protected]>
3893    
3894            * Thuban/Model/classification.py: Fix assert calls.
3895            (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
3896            Copy the color parameter rather than hold onto a reference.
3897    
3898            * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
3899            the color object.
3900            (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
3901            are sure there exists only one refernce to Color.None in the system.
3902            This allows us to use 'is' rather than the comparision functions.
3903            
3904            * Thuban/Model/save.py: Fix assert calls.
3905            
3906            * Thuban/UI/classifier.py: Fix assert calls.
3907            (ClassGrid._OnCellDClick): Call up to the classifier to open the
3908            dialog to edit the groups properties.
3909            (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
3910            correctly if a cell is resized.
3911            (ClassTable.SetClassification): New. Changes the classification
3912            that is in the table.
3913            (ClassTable.__SetRow): Allow groups to be prepended.
3914            (Classifier): New code for opening the EditProperties and
3915            GenerateRanges dialogs.
3916            (SelectPropertiesDialog.__GetColor): Only set the color in the
3917            color dialog if the current color is not None.
3918            
3919            * Thuban/UI/dock.py: Fix assert calls.
3920            
3921            * Thuban/UI/legend.py: Fix assert calls.
3922            
3923            * Thuban/UI/renderer.py: Fix assert calls.
3924            
3925            * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
3926            classifications.
3927            (GenRangePanel): Panel specific to range generation.
3928            (GenSingletonPanel): Panel specific to singleton generation.
3929            (ClassGenerator): Class responsible for actually generating
3930            the classification from the data gathered in the dialog box.
3931            (PropertyRamp): Generates properties whose values range from
3932            a starting property to an ending property.
3933    
3934    2003-04-03  Bernhard Herzog  <[email protected]>
3935    
3936            * test/support.py (print_garbage_information): New function that
3937            prints information about still connected messages and memory
3938            leaks.
3939            (run_suite): Removed.
3940            (run_tests): New function for use as a replacement of
3941            unittest.main in the test_* files. This one calls
3942            print_garbage_information at the end.
3943    
3944            * test/runtests.py (main): Use support.print_garbage_information
3945    
3946            * test/test_layer.py: Use support.run_tests instead of
3947            unittest.main so we get memory leak information
3948            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
3949            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
3950            (TestLayerLegend.test_visibility): Call the layer's Destroy method
3951            to fix a memory leak.
3952    
3953            * test/test_classification.py: Use support.run_tests instead of
3954            unittest.main so we get memory leak information
3955            (TestClassification.test_classification): Call the layer's Destroy
3956            method to fix a memory leak.
3957    
3958    2003-04-02  Bernhard Herzog  <[email protected]>
3959    
3960            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
3961            Handle the reference counts of the return value and errors in
3962            PyArg_ParseTuple correctly.
3963    
3964            * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
3965            sure the filename is absolute to avoid problems when saving the
3966            session again
3967    
3968            * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
3969    
3970    2003-04-01  Jonathan Coles   <[email protected]>
3971    
3972            *  Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
3973            that there actually are points in the returned list of points
3974            before trying to index into the list. The list may be empty if
3975            the shape is a Null Shape.
3976    
3977    2003-04-01  Bernhard Herzog  <[email protected]>
3978    
3979            * test/test_map.py: Don't use from <module> import *
3980    
3981    2003-04-01  Jonathan Coles   <[email protected]>
3982    
3983            * Thuban/Model/session.py: Use LAYER_CHANGED instead of
3984            LAYER_LEGEND_CHANGED
3985    
3986            * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
3987            self.Destroy() to close the window after yesterday's changes.
3988    
3989            * test/test_map.py, test/test_session.py: Fix messages that
3990            are sent from maps and layers.
3991    
3992    2003-03-31  Jonathan Coles   <[email protected]>
3993    
3994            * Thuban/UI/classifier.py: Commented out some debugging statements.
3995            (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
3996            RTbug #1769.
3997    
3998            * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
3999            position (although position doesn't work yet under GTK).
4000            (DockableWindow.Destroy): New. Called when the window must be
4001            closed. Namely needed when the DockFrame closes and must close
4002            its children.
4003            (DockFrame): Listen for EVT_CLOSE and destroy all children.
4004    
4005            * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
4006            when then window is told to close.
4007            (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
4008            comment in source for more info.
4009    
4010            * Thuban/UI/main.py: Show the legend by default when Thuban starts.
4011    
4012            * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
4013            symmetry with other such methods.
4014            (MainWindow.ShowLegend): Show the legend docked by default.
4015    
4016    2003-03-28  Jonathan Coles   <[email protected]>
4017    
4018            * Thuban/UI/classifier.py: Support for highlighting a specific
4019            group within the grid when the classification dialog is opened.
4020            Also contains a lot of debugging printouts which will later
4021            be removed.
4022    
4023            * Thuban/UI/dock.py: Complete rework on the dock code so that
4024            that it is fairly removed from the rest of the Thuban application.
4025            It is easy to add new docks which the rest of the program having
4026            to be aware of them.
4027    
4028            * Thuban/UI/legend.py: Modifications to support selecting a
4029            specific group in the classification dialog. Changed how layers
4030            are drawn when the layer is visible/invisible.
4031    
4032            * Thuban/UI/mainwindow.py: Removed legend specific code and
4033            replaced it with calls to the new dock code.
4034    
4035            * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
4036            to check if scale > 0. Trying to track down a divide by zero.
4037    
4038    2003-03-26  Jonathan Coles   <[email protected]>
4039    
4040            * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
4041            (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
4042            now part of DockableWindow.
4043            (LegendPanel.DoOnSelChanged): Select the current layer in the
4044            map.
4045            (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
4046            with the selected layer and/or group.
4047    
4048    2003-03-26  Jonathan Coles   <[email protected]>
4049    
4050            This putback contains the code for dockable windows. There is
4051            no support in wxWindows as of this date for windows that can
4052            attach themselves to other windows.
4053    
4054            The current model contains a DockableWindow which has a parent
4055            window for when it is detached and a dock window that it puts
4056            its contents in when it is docked. The contents of a DockableWindow
4057            must be a DockPanel. DockPanel itself derives from wxPanel.
4058    
4059            * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
4060            message, not a LAYER_LEGEND_CHANGED message.
4061    
4062            * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
4063    
4064            * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
4065            as one of the style properties for the fieldTypeText item to
4066            be sure that its size is correct when the text changes.
4067    
4068            * Thuban/UI/dock.py: New. Classes for the DockPanel and
4069            DockableWindow.
4070    
4071            * Thuban/UI/legend.py: Added some more buttons and made the
4072            LegendPanel a DockPanel.
4073    
4074            * Thuban/UI/mainwindow.py: Added sash windows to the main window
4075            and supporting functions for manipulating the sashes.
4076            (MainWindow.ShowLegend): Create a DockableWindow with the
4077            LegendPanel as the contents.
4078    
4079            * Thuban/UI/messages.py: Added DOCKABLE_* messages
4080    
4081            * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
4082            not LAYER_LEGEND_CHANGED, messages.
4083    
4084    2003-03-25  Jonathan Coles   <[email protected]>
4085    
4086            * setup.py: Added custom script bdist_rpm_build_script so that
4087            when the rpm is built the path to wx-config is correct.
4088    
4089            * setup.cfg: Added line saying to use the custom build script
4090    
4091    2003-03-20  Jonathan Coles   <[email protected]>
4092    
4093            Initial implementation of the Legend.
4094    
4095            * Thuban/UI/legend.py: New. Creates a window that shows the map's
4096            Legend information and allows the user to add/modify classifications
4097            and how the layers are drawn on the map.
4098    
4099            * setup.py: New command 'build_docs' which currently uses
4100            happydoc to generate html documentation for Thuban.
4101    
4102            * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
4103            Returns a string which is appropriately describes the group.
4104    
4105            * Thuban/Model/layer.py (Layer.SetClassification): Generate a
4106            LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
4107    
4108            * Thuban/Model/map.py (Map): Rename messages and use new, more
4109            specific, messages.
4110    
4111            * Thuban/Model/messages.py: New message to indicate that a layer's
4112            data has changed (LAYER_CHANGED). New map messages to indicate
4113            when layers have been added/removed/changed or if the stacking order
4114            of the layers has changed.
4115    
4116            * Thuban/Model/session.py: Rename and use new messages.
4117    
4118            * Thuban/UI/classifier.py: Remember if any changes have actually
4119            been applied so that if the dialog is cancelled without an application
4120            of changes we don't have to set a new classification.
4121            (ClassDataPreviewer): Pulled out the window specific code and put it
4122            ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
4123            symbols on any DC.
4124            
4125            * Thuban/UI/mainwindow.py: New code to open the legend.
4126    
4127            * Thuban/UI/view.py: Use new message names.
4128    
4129    2003-03-19  Jonathan Coles   <[email protected]>
4130    
4131            * Thuban/UI/main.py (verify_versions): New. Checks the versions
4132            of Python, wxPython, and some other libraries.
4133    
4134            * extensions/thuban/wxproj.cpp (check_version): Checks the given
4135            version against what wxproj was compiled with.
4136            (check_version_gtk): If wxproj was compiled with gtk then check
4137            the given version against the version of the gtk library
4138            currently being used.
4139    
4140    2003-03-14  Bernhard Herzog  <[email protected]>
4141    
4142            * test/test_command.py: Run the tests when the module is run as a
4143            script
4144    
4145    2003-03-14  Bernhard Herzog  <[email protected]>
4146    
4147            Implement selection of multiple selected shapes in the same layer:
4148    
4149            - Introduce a new class to hold the selection. This basically
4150              replaces the interactor which was nothing more than the
4151              selection anyway. A major difference is of course that the new
4152              selection class supports multiple selected shapes in one layer
4153            
4154            - Move the object that represents the selection from the
4155              application to the canvas. The canvas is a better place than the
4156              application because the selection represents which shapes and
4157              layer of the map displayed by the canvas are selected and
4158              affects how the map is drawn.
4159    
4160            - Make the selection and its messages publicly available through
4161              the mainwindow.
4162    
4163            - The non-modal dialogs do not get a reference to the interactor
4164              anymore as they can simply refer to their parent, the
4165              mainwindow, for the what the interactor had to offer.
4166    
4167            * Thuban/UI/selection.py: New module with a class to represent the
4168            selection.
4169    
4170            * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
4171            these unused messages
4172    
4173            * Thuban/UI/application.py (ThubanApplication.OnInit)
4174            (ThubanApplication.OnExit, ThubanApplication.SetSession): The
4175            interactor is gone now.
4176            (ThubanApplication.CreateMainWindow): There is no interactor
4177            anymore so we pass None as the interactor argument for now for
4178            compatibility.
4179    
4180            * Thuban/UI/view.py (MapCanvas.delegated_messages)
4181            (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
4182            Unsubscribe, delegate messages according to the delegated_messages
4183            class variable.
4184            (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
4185            attributes from instance variables as described with the
4186            delegated_methods class variable.
4187            (MapCanvas.__init__): New instance variable selection holding the
4188            current selection
4189            (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
4190            pass them on to the renderer
4191            (MapCanvas.SetMap): Clear the selection when a different map is
4192            selected.
4193            (MapCanvas.shape_selected): Simple force a complete redraw. The
4194            selection class now takes care of only issueing SHAPES_SELECTED
4195            messages when the set of selected shapes actually does change.
4196            (MapCanvas.SelectShapeAt): The selection is now managed in
4197            self.selection
4198    
4199            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
4200            (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
4201            Unsubscribe, delegate messages according to the delegated_messages
4202            class variable.
4203            (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
4204            attributes from instance variables as described with the
4205            delegated_methods class variable.
4206            (MainWindow.__init__): The interactor as ivar is gone. The
4207            parameter is still there for compatibility. The selection messages
4208            now come from the canvas.
4209            (MainWindow.current_layer, MainWindow.has_selected_layer):
4210            Delegate to the the canvas.
4211            (MainWindow.LayerShowTable, MainWindow.Classify)
4212            (MainWindow.identify_view_on_demand): The dialogs don't need the
4213            interactor parameter anymore.
4214    
4215            * Thuban/UI/tableview.py (TableFrame.__init__)
4216            (LayerTableFrame.__init__, LayerTableFrame.OnClose)
4217            (LayerTableFrame.row_selected): The interactor is gone. It's job
4218            from the dialog's point of view is now done by the mainwindow,
4219            i.e. the parent. Subscribe to SHAPES_SELECTED instead
4220            of SELECTED_SHAPE
4221            
4222            * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
4223            is gone. It's job from the dialog's point of view is now done by
4224            the mainwindow, i.e. the parent.
4225            
4226            * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
4227            gone. It's job from the dialog's point of view is now done by the
4228            mainwindow, i.e. the parent.
4229    
4230            * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
4231            gone. It's job from the dialog's point of view is now done by the
4232            mainwindow, i.e. the parent.
4233            (SessionTreeCtrl.__init__): New parameter mainwindow which is
4234            stored as self.mainwindow. The mainwindow is need so that the tree
4235            can still subscribe to the selection messages.
4236            (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
4237            (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
4238            selection is now accessible through the mainwindow. Subscribe to
4239            SHAPES_SELECTED instead of SELECTED_SHAPE
4240    
4241            * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
4242            SHAPES_SELECTED message now.
4243            (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
4244            so deal with multiple shapes
4245            (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
4246            gone. It's job from the dialog's point of view is now done by the
4247            mainwindow, i.e. the parent.
4248    
4249            * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
4250            parameter is now a list of shape ids.
4251            (RecordTable.SetTable): The second parameter is now a list of
4252            indices.
4253    
4254            * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
4255            selected_shape parameter and ivar to selected_shapes. It's now a
4256            list of shape ids.
4257            (MapRenderer.draw_label_layer): Deal with multiple selected
4258            shapes. Rearrange the code a bit so that the setup and shape type
4259            distinctions are only executed once.
4260    
4261            * test/test_selection.py: Test cases for the selection class
4262    
4263    2003-03-11  Jonathan Coles   <[email protected]>
4264    
4265            * Thuban/Model/load.py: Temporary fix so that the xml reader
4266            doesn't cause Thuban to crash.
4267    
4268            * Thuban/Model/layer.py: Handle the cyclic references between
4269            a layer and its classification better, and be sure to disconnect
4270            the classification from the layer when the layer is destroyed
4271            so that we don't maintain a cyclic reference that may not be
4272            garbage collected.
4273    
4274            * Thuban/Model/classification.py: See comment for layer.py.
4275    
4276    2003-03-12  Jan-Oliver Wagner <[email protected]>
4277    
4278            * HOWTO-Release: New. Information on the steps for releasing
4279            a new version of Thuban.
4280    
4281    2003-03-11  Jonathan Coles   <[email protected]>
4282    
4283            * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
4284            Use True instead of true.
4285            (Classifier): Should have a single panel in which all the controls lie.
4286    
4287            * Thuban/UI/proj4dialog.py: Add normal border.
4288    
4289            * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
4290    
4291            * Thuban/UI/mainwindow.py: Use True instead of true.
4292    
4293            * setup.py: Update some definitions to use wxWindows2.4 files
4294    
4295            * Data/iceland_sample_class.thuban: Fixed file so that the
4296            field_type information is present.
4297    
4298    2003-03-10  Jonathan Coles   <[email protected]>
4299    
4300            * Thuban/UI/classifier.py (Classifier.__init__): Make the
4301            field type label grow so that when the text changes the
4302            size is updated correctly. This may be a wxWindows bug.
4303    
4304    2003-03-10  Jonathan Coles   <[email protected]>
4305    
4306            * Thuban/UI/application.py: Changed SESSION_CHANGED to
4307            SESSION_REPLACED.
4308    
4309            * Thuban/UI/classifier.py: Wrap text with _().
4310            (ClassGrid.CreateTable): Set dimensions and size hints here,
4311            instead of in Reset, so we only set the size once.
4312    
4313            * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
4314    
4315            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
4316            Call Close() instead of Shutdown().
4317    
4318            * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
4319    
4320            * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
4321            Go back to using OnClose() instead of Shutdown().
4322    
4323    2003-03-10  Jonathan Coles   <[email protected]>
4324    
4325            * Thuban/UI/classifier.py (Classifier): SelectField() needed
4326            to know the old field index as well as the new one.
4327    
4328    2003-03-10  Jonathan Coles   <[email protected]>
4329    
4330            * Thuban/UI/classifier.py (Classifier): Use __SelectField()
4331            to correctly set the table information and call this from
4332            __init__ and from _OnFieldSelect so that all the information
4333            is up to date when the dialog opens and when a field is changed.
4334    
4335    2003-03-10  Jonathan Coles   <[email protected]>
4336    
4337            * Thuban/Model/classification.py (Classification): Don't use
4338            layer's message function directly, use the ClassChanged() method
4339            when then classification changes. SetField/SetFieldType/SetLayer
4340            must keep the information about field name and field type in
4341            sync when an owning layer is set or removed.
4342    
4343            * Thuban/Model/layer.py: Added ClassChanged() so that the
4344            classification can tell the layer when its data has changed.
4345            (Layer.SetClassification): Accepts None as an arguement to
4346            remove the current classification and correctly handles
4347            adding a new classification.
4348    
4349            * Thuban/Model/load.py: Comment out print statement
4350    
4351            * test/test_classification.py, test/test_save.py: New and
4352            improved tests.
4353    
4354    2003-03-07  Jonathan Coles   <[email protected]>
4355    
4356            * Thuban/Model/classification.py: Implemented __copy__ and
4357            __deepcopy__ for ClassGroup* and ClassGroupProperites so
4358            they can easily be copied by the classifier dialog.
4359            (ClassGroupProperites.__init__): The default line color should
4360            have been Color.Black.
4361    
4362            * Thuban/UI/classifier.py: Setting and Getting table values now
4363            uses a consistent set of functions.
4364            (Classifier): Now non-modal. Has field type label which changes
4365            as the field changes. Keep track of buttons in a list so that
4366            we can enable/disable the buttons when the None field is selected.
4367            (SelectPropertiesDialog): Add buttons to make the colors transparent.
4368    
4369            * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
4370            does what OnClose did, but can be called by the application to
4371            close a window. Needed when a session changes, and we have to
4372            close the classifier windows.
4373    
4374            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
4375            Shuts down open dialogs. Used when a new session is created
4376            or a session is opened.
4377            (MainWindow.SaveSession): Should only call application.SaveSession()
4378            if we don't call SaveSessionAs first.
4379            (MainWindow.Classify): Allow different classifier dialogs for
4380            different layers.
4381    
4382            * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
4383            the parent class handle it. Add Shutdown() to unsubscibe from
4384            event notification and call the parent Shutdown(). This was
4385            necessary so the application can close the tree window.
4386    
4387    2003-03-06  Jonathan Coles   <[email protected]>
4388    
4389            * Thuban/Model/classification.py: Minor documentation changes,
4390            Addition of __eq__ and __ne__ methods.
4391            (Classification.SetLayer): prevent recursion between this method
4392            and Layer.SetClassification().
4393    
4394            * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
4395    
4396            * Thuban/Model/layer.py (SetClassification): prevent recursion
4397            between this method and Classification.SetLayer().
4398    
4399            * test/test_classification.py, test/test_load.py,
4400            test/test_session.py: Fixed and added tests for the classification
4401            classes.
4402    
4403    2003-03-06  Bernhard Herzog  <[email protected]>
4404    
4405            * Thuban/UI/classifier.py (ClassGrid.__init__)
4406            (ClassGrid.CreateTable): Move the SetSelectionMode call to
4407            CreateTable because otherwise it triggers an assertion in
4408            wxPython/wxGTK 2.4.
4409    
4410    2003-03-05  Jonathan Coles   <[email protected]>
4411    
4412            * Thuban/common.py: Move FIELDTYPE constants back to table.py.
4413    
4414            * Thuban/Model/load.py: import FIELDTYPE constants from table.
4415    
4416            * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
4417    
4418            * Thuban/Model/table.py: Put FIELDTYPE constants back.
4419    
4420    2003-03-05  Jonathan Coles   <[email protected]>
4421    
4422            * Thuban/UI/classifier.py: Added class documentation.
4423            Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
4424            Store just the groups in the table and generate the other
4425            column information when it is requested. Add "None" field
4426            to pull-down to select no classification.
4427    
4428            * Thuban/common.py: Moved FIELDTYPE constants from table.py
4429            (Str2Num): Only catch ValueError exceptions.
4430    
4431            * Thuban/Model/classification.py: Class documentation. Renaming
4432            of methods with Stroke to Line. Groups are stored in a single
4433            list with the default as the first element. Groups are searched
4434            in the order they appear in the list.
4435    
4436            * Thuban/Model/color.py: Documentation.
4437    
4438            * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
4439            the kind of data represented by a field.
4440    
4441            * Thuban/Model/load.py (ProcessSession): Use proper string
4442            conversion function; fixes RTbug #1713.
4443    
4444            * Thuban/Model/save.py (Saver): Store field type information.
4445    
4446            * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
4447            (Table): Add field_info_by_name() to retrieve field information
4448            by specifying the field name, not the number.
4449    
4450            * Thuban/UI/mainwindow.py: Function name changes.
4451    
4452            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
4453            get the layer classification once. Don't try to classify
4454            values when the field is None: just use the default properties.
4455    
4456            * Thuban/UI/view.py: Function name changes.
4457    
4458            * Doc/thuban.dtd: Add field_type attribute to a classification.
4459    
4460    2003-03-04  Bernhard Herzog  <[email protected]>
4461    
4462            * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
4463            the fill and stroke layer attributes optional with suitable
4464            default values. Add the stroke_width layer attribute. Use correct
4465            syntax for empty elements. Make the attribute list for labels
4466            refer to the label element.
4467    
4468    2003-03-04  Bernhard Herzog  <[email protected]>
4469    
4470            * setup.py (thuban_build_py.build): Add a comment about distutils in
4471            Python 2.3 containing some of the functionality we implement in
4472            setup.py ourselves.
4473    
4474            * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
4475            before the selection mode. Doing it the other way round triggers
4476            an assertion in wxWindows.
4477    
4478            * Thuban/Model/save.py (escape): Fix typo in doc-string
4479    
4480            * Thuban/Model/classification.py: Remove unnecessary wxPython
4481            import
4482    
4483    2003-03-04  Jonathan Coles   <[email protected]>
4484    
4485            * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
4486            Parameter 'value' should default to None.
4487    
4488            * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
4489            the class attribute __classification is now private.
4490    
4491            * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
4492            Classifier to ClassGrid. Added support for removing selected rows,
4493            which including code for keeping track of when cells are selected,
4494            and deselected.
4495            (ClassTable): Support for added/removing rows. Fixed a problem
4496            with __ParseInput whereby it would not allow strings (only numbers)
4497            to be entered.
4498            (Classifier): Added button and supporting code for removing
4499            selected rows.
4500    
4501    2003-02-27  Jonathan Coles   <[email protected]>
4502    
4503            * Thuban/common.py: Moved color conversion functions into
4504            Thuban/UI/common.py.
4505            (Str2Num): Now converts the float (not the string) to a long/int
4506            so that an exception isn't thrown.
4507    
4508            * Thuban/UI/common.py: Common functions used in several UI modules
4509    
4510            * Thuban/Model/classification.py: Changed the class hierarchy
4511            so that a Classification consists of Groups which return
4512            Properties when a value matches a Group.
4513    
4514            * Thuban/Model/layer.py: Fixed name resolution problem.
4515    
4516            * Thuban/Model/load.py: Use new Classification and Group functions.
4517    
4518            * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
4519            failure.
4520            (Saver.write_classification): Use new Classification and Group
4521            functions.
4522    
4523            * Thuban/UI/classifier.py: Changes to use new Classification and Group
4524            functions. Fix to create a tuple with a single value instead of
4525            simply returning the value.
4526    
4527            * Thuban/UI/renderer.py: Use new Classification and Group functions.
4528            Use common.py functions.
4529    
4530            * Thuban/UI/tree.py: Use common.py functions.
4531            
4532            * test/test_classification.py: Use new Classification and Group
4533            classes.
4534    
4535    2003-02-24  Jonathan Coles   <[email protected]>
4536    
4537            * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
4538            functions from Thuban color objects to wxWindow colour objects.
4539    
4540            * Thuban/Model/classification.py (Classification): Renamed
4541            GetProperties() to GetClassData(). Used the new iterator
4542            in TreeInfo().
4543            (ClassIterator): Iterator implementation to iterate over the
4544            ClassData objects in a classification object.
4545    
4546            * Thuban/Model/save.py (Saver.write_classificaton): Uses
4547            the new iterator to save the classification information.
4548    
4549            * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
4550            for changing the stroke and fill colors and previewing the
4551            changes.
4552    
4553            * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
4554            MainWindow.SaveSessionAs): Text string changes so the dialogs
4555            have more meaningful titles.
4556    
4557            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
4558            Classification method name from GetProperties to GetClassData.
4559    
4560            * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
4561            instead of accessing now non-existent class variables.
4562    
4563    2003-02-24  Bernhard Herzog  <[email protected]>
4564    
4565            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
4566            unneeded Shape() call. Rendering is substantially faster without
4567            it and it avoids some problems with broken shape files.
4568    
4569    2003-02-20  Frank Koormann   <[email protected]>
4570    
4571            Force minimal size of identify and label dialogs. The autosizing
4572            looked too ugly.
4573    
4574            * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
4575            * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
4576            Set size of listctrl.
4577            * Thuban/UI/identifyview.py (IdentifyView.__init__):
4578            Set size of dialog.
4579    
4580    2003-02-19  Jonathan Coles   <[email protected]>
4581    
4582            * test/test_classification.py, test/test_layer.py,
4583            test/test_load.py, test/test_map.py, test/test_session.py:
4584            Updated the tests to use the new functions that are in the
4585            respective classes.
4586    
4587            * Thuban/Model/classification.py (Classification):
4588            Uses the new ClassData* classes. Modification messages are
4589            passed up to the parent layer (if it exists).
4590            (ClassData): New class to encapsulate the common data in each
4591            classification property.
4592            (ClassDataDefault): Represents the Default class. data.
4593            (ClassDataPoint): Represents a single class. data point
4594            (ClassDataRange): Represents a class. range
4595            (ClassDataMap): Represents a class. map (unused).
4596    
4597            * Thuban/Model/color.py: Added Color.None to represent something
4598            with no color. Color.Black represents the color black.
4599            (NoColor): Helper class derived from Color to represent something
4600            with no color.
4601    
4602            * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
4603            stroke_width attributes. Made the 'classification' attribute private.
4604            New methods for setting/getting the classification.
4605    
4606            * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
4607            to get the classifcation and use the new ClassData* classes to
4608            hold the classification data. Use Str2Num to convert numbers
4609            properly.
4610    
4611            * Thuban/Model/save.py (Saver): Use new Color and Classification
4612            methods
4613    
4614            * Thuban/UI/classifier.py (ClassGrid): New class to represent a
4615            custom grid.
4616            (ClassTable): Support for editing Values and Labels and for
4617            changing what type (point or range) of data is stored in each
4618            property based on how the user enters the data.
4619            (Classifier): Support for saving the new classifications and
4620            launching the dialog to edit a property.
4621            (SelectPropertiesDialog): New class for editing the visual
4622            properties of a classification (stroke color, width, and fill color)
4623            (ClassPreviewer): Took the Draw method from ClassRenderer and
4624            made most of it into this new class. Intend to use this class in
4625            the SelectPropertiesDialog for previewing changes.
4626    
4627            * Thuban/UI/renderer.py: Use new Color and Classification methods.
4628    
4629            * Thuban/UI/tree.py: Formatting changes.
4630    
4631            * Doc/thuban.dtd: Add 'label' element
4632    
4633            * Thuban/common.py: New. Contains common routines used throughout
4634            the code.
4635            (Str2Num): Takes a string and converts it to the "best" type of
4636            number.
4637    
4638    2003-02-14  Bernhard Herzog  <[email protected]>
4639    
4640            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
4641            dragging flag is always set to 0 even when the tool implementation
4642            raises an exception
4643    
4644    2003-02-11  Bernhard Herzog  <[email protected]>
4645    
4646            * Thuban/UI/application.py (ThubanApplication.splash_screen): New
4647            method to create a splash screen.
4648            (ThubanApplication.ShowMainWindow): New. Show the main window.
4649            Needed so the splash screen can display the mainwindow
4650            (ThubanApplication.OnInit): Call the
4651            new splash_screen method to determine whether the application
4652            should display a splash screen. If it displays a splash screen do
4653            not immediately show the main window.
4654    
4655    2003-02-11  Jonathan Coles  <[email protected]>
4656    
4657            * Thuban/Model/classification.py: Added import line to fix
4658            feature conflicts between running on python2.2 and python2.1.
4659    
4660            * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
4661            onto the clinfo parameter, so removed the deepcopy().
4662    
4663    2003-02-10  Jonathan Coles  <[email protected]>
4664    
4665            * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
4666            Added element_open variable to track opening and closing of tags
4667            so that tags that don't span more than one line are closed with
4668            /> instead of </tag_name>. Use the GetDefault*() methods of
4669            the Classification class.
4670    
4671            * Thuban/Model/classification.py (Classificaton): Added set and
4672            get methods for the default data. The class also takes a layer
4673            reference so that modification messages can be sent. Fixed the
4674            methods to use the new ClassData class.
4675            (ClassData): New class to encapsulate the classification data
4676    
4677            * Thuban/Model/layer.py (Layer): Remove the
4678            Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
4679            SetDefault*() methods on the layer's classification object.
4680            (Layer.__init__): Use the new SetDefault*() methods in the
4681            Classification class.
4682    
4683            * Thuban/Model/load.py (ProcessSession): Use the new ClassData
4684            object instead of a dictionary.
4685    
4686            * Thuban/UI/classifier.py (ClassRenderer): New class to
4687            draw the classifications in the dialog box's table.
4688            (Classifier): Modified to use the ClassRenderer class.
4689    
4690            * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
4691            methods of the Classification class.
4692    
4693            * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
4694            of the ClassData class.
4695    
4696            * test/test_classification.py, test/test_layer.py,
4697            test/test_map.py, test/test_session.py: Fix the tests to work
4698            with the above code changes.
4699    
4700    2003-02-03  Jonathan Coles  <[email protected]>
4701    
4702            * Thuban/Model/classification.py (Classification): Added getNull()
4703            to return the NullData reference
4704    
4705            * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
4706            Layer.SetStrokeWidth): Modified these functions to change the
4707            null data in the classification rather than keep these values
4708            directly in the Layer class. Menu options to change these values
4709            work again.
4710    
4711    2003-01-28  Jonathan Coles  <[email protected]>
4712    
4713            * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
4714            Fixed crashing problem on some systems. Dialog box shows
4715            classification data.
4716    
4717            * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
4718            Colors in the tree view.
4719    
4720            * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
4721            the tree info for classifications. Commented out unnecessary lines.
4722    
4723            * Thuban/Model/classification.py (Classification.TreeInfo): New
4724            function to add information about the classification into the
4725            tree view.
4726    
4727    2003-01-27  Jan-Oliver Wagner <[email protected]>
4728    
4729            * Thuban/__init__.py (_): New.
4730    
4731            * Thuban/Model/classification.py, Thuban/Model/extension.py,
4732            Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
4733            Thuban/Model/session.py, Thuban/UI/application.py,
4734            Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
4735            Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
4736            Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
4737            Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
4738            Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
4739    
4740    2003-01-27  Jonathan Coles  <[email protected]>
4741    
4742            * Thuban/Model/layer.py: Classification initialization calls.
4743    
4744            * Thuban/Model/classification.py: Created class to encapsulate
4745            a layer classification. Supports specific data points and
4746            ranges.
4747    
4748            * Thuban/Model/load.py: Added support for loading classification
4749            information.
4750    
4751            * Thuban/Model/save.py: Added support for saving classification
4752            information.
4753    
4754            * Thuban/UI/classifier.py: Initial class for a dialog box for
4755            specifying classification information.
4756    
4757            * Thuban/UI/mainwindows.py: Support for opening the classifier
4758            dialog.
4759    
4760            * Thuban/UI/renderer.py: Support for drawing a layer with the
4761            classification information.
4762    
4763            * Data/iceland_sample_class.thuban: iceland_sample with
4764            classification data.
4765    
4766            * test/test_classification: Tests for the Classification class.
4767    
4768    2002-12-09  Bernhard Herzog  <[email protected]>
4769    
4770            * test/test_command.py: New. Tests for the command classes.
4771    
4772            * Thuban/UI/command.py (ToolCommand): New class for tool commands.
4773            (Command.IsTool): New method to distinguish between command
4774            switching tools and other commands.
4775    
4776            * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
4777            the tool to avoid direct assignments to instance variables
4778            (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
4779            (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
4780            change the tool
4781    
4782            * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
4783            active tool's command turns insensitive, disable the tool.
4784            (_tool_command): Use the new ToolCommand class
4785    
4786            * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
4787            SelectTool method to change the tool
4788            (iconfile): Use the ToolCommand class
4789    
4790    2002-12-03  Bernhard Herzog  <[email protected]>
4791    
4792            * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
4793            the case of selected items that are not children of Layers or Maps
4794            properly. Previously this bug would trigger an assertion in
4795            wxWindows.
4796    
4797    2002-11-06  Frank Koormann  <[email protected]>
4798    
4799            * Thuban/UI/mainwindow.py: Altered the order of tools in the
4800            toolbar: First now are all navigation tools (Zoom In/Out, Pan,
4801            Full Extent).
4802    
4803    2002-10-23  Bernhard Herzog  <[email protected]>
4804    
4805            * setup.py (setup call): version now 0.1.3
4806    
4807            * MANIFEST.in: Add the files in test/
4808    
4809            * test/README: Add note about tests requiring the iceland data
4810    
4811            * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
4812            copyright notice.
4813    
4814    2002-10-18  Bernhard Herzog  <[email protected]>
4815    
4816            * test/test_map.py
4817            (TestMapWithContents.test_projected_bounding_box): Use an explicit
4818            epsilon.
4819    
4820            * test/support.py (FloatComparisonMixin.assertFloatEqual)
4821            (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
4822            message if the assertion fails and don't return the return value
4823            of self.assert_. In assertFloatSeqEqual the return meant that not
4824            all items of the sequence were compared.
4825    
4826    2002-09-20  Bernhard Herzog  <[email protected]>
4827    
4828            * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
4829    
4830            * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
4831    
4832            * test/test_map.py (TestMapWithContents.test_tree_info): Create
4833            the string with the bounding box on the fly because of platform
4834            differences in the way %g is handled.
4835    
4836            * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
4837            DBFfile too because Thuban layers can't yet cope missing DBF
4838            files.
4839    
4840    2002-09-20  Bernhard Herzog  <[email protected]>
4841    
4842            * test/test_menu.py: Use initthuban instead of
4843            add_thuban_dir_to_path to initialize Thuban.
4844    
4845            * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
4846            Mixin class for float comparisons
4847            (SubscriberMixin): New. Mixin class to test messages sent through
4848            the Connector class
4849    
4850            * test/README: Fix a typo and add the -v flag to the command for
4851            individual tests
4852    
4853            * test/test_session.py: New. Test cases for Thuban.Model.session
4854    
4855            * test/test_proj.py: New. Test cases for Thuban.Model.proj
4856    
4857            * test/test_map.py: New. Test cases for Thuban.Model.map
4858    
4859            * test/test_layer.py: New. Test cases for Thuban.Model.layer
4860    
4861            * test/test_label.py: New. Test cases for Thuban.Model.label
4862    
4863            * test/test_connector.py: New. Test cases for Thuban.Lib.connector
4864    
4865            * test/test_color.py: New. Test cases for Thuban.Model.color
4866    
4867            * test/test_base.py: New. Test cases for Thuban.Model.base
4868    
4869    2002-09-13  Bernhard Herzog  <[email protected]>
4870    
4871            * Thuban/Model/session.py (Session.forwarded_channels): Forward
4872            the CHANGED channel too.
4873    
4874            * Thuban/Model/map.py (Map.forwarded_channels): Forward the
4875            CHANGED channel too.
4876            (Map.__init__): Call the Modifiable constructor as well.
4877    
4878            * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
4879            event if the modified flag changes.
4880            (Modifiable.changed): Tweak the doc-string.
4881    
4882            * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
4883            (MainWindow.set_position_text): Put the code that puts the text
4884            with the mouse position into the status bar into the new method
4885            set_position_text so that it can overwritten in derived classes.
4886    
4887    2002-09-12  Bernhard Herzog  <[email protected]>
4888    
4889            * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
4890            message box on the main window.
4891    
4892    2002-09-11  Bernhard Herzog  <[email protected]>
4893    
4894            * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
4895            the 'E' because it's less likely to interfere with other menu
4896            entries.
4897            (MainWindow.build_menu): remove an incorrect comment.
4898    
4899    2002-09-10  Bernhard Herzog  <[email protected]>
4900    
4901            * Thuban/UI/mainwindow.py (MainWindow.Map): New.
4902            (_tool_command): Add sensitive parameter
4903            (_has_visible_map): Sensitivity callback to tools and other
4904            commands that require a visible map. Use it in map_zoom_in_tool,
4905            map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
4906            and map_full_extent
4907    
4908    2002-09-06  Bernhard Herzog  <[email protected]>
4909    
4910            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
4911            VIEW_POSITION
4912    
4913    2002-09-04  Frank Koormann  <[email protected]>
4914    
4915            * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
4916    
4917    2002-09-02  Bernhard Herzog  <[email protected]>
4918    
4919            * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
4920            wxWindows already and our implementation doesn't work correctly
4921            with wxGTK 2.3:
4922            (MapCanvas.__init__): Remove the instance variable
4923            (MapCanvas.OnPaint): Always call do_redraw when there's a map to
4924            be drawin
4925            (MapCanvas.OnIdle): Removed.
4926    
4927            * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
4928            a parameter to determine the size of the rectangle.
4929            (MapCanvas.find_shape_at): Create the box around the point on a
4930            layer by layer basis and make the size depend on the shape type.
4931            This solves a problem with the selection of point shapes at the
4932            border of the layer's bounding box
4933    
4934    2002-08-30  Bernhard Herzog  <[email protected]>
4935    
4936            * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
4937            for the sensitivity  of remove layer.
4938            (_can_remove_layer): New. Sensitivity callback for remove layer
4939            (Command layer_remove): Use _can_remove_layer
4940    
4941            * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
4942            determine whether a given layer can be deleted.
4943    
4944            * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
4945            (MapCanvas.do_redraw): Get rid of the unused update_region
4946            instance variable
4947    
4948            * Thuban/UI/view.py: Add/update some doc-strings.
4949    
4950            * test/: new subdirectory with a bunch of unit tests.
4951    
4952            * test/README, test/test_table.py, test/test_save.py,
4953            test/test_menu.py, test/test_load.py: Initial set of tests and
4954            brief instructions on how to run them
4955    
4956    2002-08-29  Bernhard Herzog  <[email protected]>
4957    
4958            * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
4959            arcs with multiple parts.
4960    
4961            * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
4962            Handle degenrate rectangles.
4963    
4964            * Thuban/Model/table.py: Make writing records work correctly:
4965            (Table.__init__): Keep track of whether the DBF is open for
4966            writing
4967            (Table.write_record): Open the DBF file for writing when necessary
4968    
4969    2002-08-27  Bernhard Herzog  <[email protected]>
4970    
4971            * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
4972            dbf files only for reading by default. Use a new writable dbf
4973            object for writing.
4974    
4975    2002-08-26  Bernhard Herzog  <[email protected]>
4976    
4977            * Thuban/UI/mainwindow.py: Refactor the context creation:
4978            (MainWindow.Context): New method to return a context
4979            (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
4980            new method
4981    
4982            * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
4983            layer table specific code from TableGrid into LayerTableGrid
4984            (TableFrame, LayerTableFrame): Split the layer table specific code
4985            from TableFrame into LayerTableFrame
4986            (LayerTableGrid.select_shape): Remove a debug print
4987    
4988            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
4989            LayerTableFrame
4990    
4991    2002-08-23  Bernhard Herzog  <[email protected]>
4992    
4993            * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
4994            absolute filename.
4995    
4996    2002-08-22  Bernhard Herzog  <[email protected]>
4997    
4998            * Thuban/Model/table.py (Table.write_record): New method to write
4999            records.
5000            (Table.__init__): Open the DBF file for writing too.
5001    
5002            * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
5003            into the underlying table.
5004    
5005            * extensions/shapelib/shapefil.h (DBFCommit),
5006            extensions/shapelib/dbfopen.c (DBFCommit): New API function to
5007            commit any changes made to the DBF file.
5008    
5009            * Thuban/UI/mainwindow.py (make_check_current_tool)
5010            (_tool_command): Put the code that generates the "checked"
5011            callback into a separate function so that we can reuse it
5012            elsewhere
5013    
5014            * Thuban/Model/save.py (Saver): New class to handle serializing a
5015            session into an XML file. The main reason to introduce a class is
5016            that applications built on Thuban can derive from it so that they
5017            can save additional information in a session file.
5018            (save_session): Delegate almost all the work to the Saver class.
5019            Rename the filename argument to file because it may be a file like
5020            object now.
5021    
5022            * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
5023            code. Remove the little test code which would be executed when the
5024            module is run as a script which didn't work anymore since it can't
5025            import the other Thuban modules.
5026            (ProcessSession, load_session): Refactor the ProcessSession to
5027            have one method for each element start and end tag so that derived
5028            classes can easily override the processing of individual tags.
5029            Also, always parse with namespaces enabled because applications
5030            built on top of Thuban will likely use namespaces if they extend
5031            the session file format.
5032    
5033    2002-08-21  Bernhard Herzog  <[email protected]>
5034    
5035            * setup.py (ThubanInstall.run): Don't repr install_lib_orig
5036            because thubaninit_contents will do it for us.
5037    
5038    2002-08-16  Jan-Oliver Wagner <[email protected]>
5039    
5040            * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
5041            tree window already open
5042    
5043    2002-08-15  Bernhard Herzog  <[email protected]>
5044    
5045            * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
5046            with self.
5047    
5048            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
5049            when we have actually captured it.
5050    
5051            * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
5052            shapefile and destroy the table.
5053    
5054            * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
5055    
5056    2002-08-14  Bernhard Herzog  <[email protected]>
5057    
5058            * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
5059            instance variable columns
5060            (RecordTable.GetTypeName): row and col may be negative in some
5061            cases.
5062    
5063            * setup.py (InstallLocal.initialize_options)
5064            (InstallLocal.finalize_options, InstallLocal.user_options): New
5065            option create-init-file to build a thubaninit.py when running
5066            install_local
5067            (InstallLocal.run): Create the thubaninit.py module when requested
5068            (thubaninit_contents): Split the template into several parts and
5069            create a new function thubaninit_contents that creates the
5070            contents of a thubaninit module.
5071            (ThubanInstall.run): Use the new function to create the thubaninit
5072            module.
5073    
5074    2002-07-30  Bernhard Herzog  <[email protected]>
5075    
5076            * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
5077            cleanup.
5078            (ThubanApplication.MainLoop): Extend to automatically call OnExit.
5079    
5080            * Thuban/Model/session.py (Session.Destroy): Don't bypass the
5081            direct base class' Destroy method.
5082    
5083            * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
5084            layers.
5085            (Map.Destroy): Destroy the label_layer as well and call the
5086            inherited Desatroymethod first so that no more messages are
5087            issued.
5088            (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
5089            message if the stacking order actually has changed. Add
5090            doc-strings.
5091            (Map.BoundingBox): Correct the doc-string.
5092            (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
5093            (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
5094    
5095            * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
5096            all labels.
5097    
5098    2002-07-29  Bernhard Herzog  <[email protected]>
5099    
5100            * Thuban/Model/map.py (Map.subscribe_layer_channels)
5101            (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
5102            to a layer's channels into separate methods.
5103            (Map.RemoveLayer, Map.AddLayer): Call the new methods
5104            (Map.Destroy): Unsubscribe from a layer's channels before
5105            destroying it.
5106    
5107            * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
5108            selected_layer parameter to searched_layer which is the layer to
5109            search in.
5110            (MapCanvas.SelectShapeAt): New parameter layer to restrict the
5111            search to that layer. Return the selected layer and shape.
5112    
5113            * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
5114            typo
5115    
5116    2002-07-24  Bernhard Herzog  <[email protected]>
5117    
5118            * Thuban/UI/application.py (ThubanApplication.create_session):
5119            Extend the doc string.
5120            (ThubanApplication.subscribe_session)
5121            (ThubanApplication.unsubscribe_session): New methods to
5122            subscribe/unsubscribe to/from session channels.
5123            (ThubanApplication.SetSession): Call the new methods here.
5124            (ThubanApplication.maps_changed, ThubanApplication.set_map):
5125            Renamed set_map to maps_changed. Its now a subscriber for
5126            MAPS_CHANGED.
5127    
5128            * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
5129            x-coordinate in case of simple clicks
5130    
5131            * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
5132            don't pass it as a parameter
5133    
5134            * Thuban/Model/session.py (Session.RemoveMap): New
5135    
5136            * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
5137            window size into a parameter.
5138    
5139    2002-07-23  Bernhard Herzog  <[email protected]>
5140    
5141            * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
5142            just commands.
5143    
5144            * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
5145            parameter list a bit to allow setting the window title and the
5146            initial message in the status bar. Update the callers.
5147    
5148            * Thuban/UI/application.py (ThubanApplication.OnInit)
5149            (ThubanApplication.CreateMainWindow): Put the mainwindow
5150            instantiation into a separate method so that it can be overridden
5151            by a subclass.
5152    
5153    2002-07-19  Bernhard Herzog  <[email protected]>
5154    
5155            * Thuban/Model/session.py: Issue a CHANGED message every time
5156            another changed message is issued to make it easier to get
5157            notified of changes.
5158            (Session): Update the doc string
5159            (Session.forward): Issue changed-events as CHANGED as well.
5160            (Session.changed): Overwrite the inherited version to issue
5161            CHANGED events as well.
5162    
5163            * Thuban/UI/tree.py: We can now simply subscribe to the session's
5164            CHANGED channel to be informed of changes.
5165            (SessionTreeCtrl.session_channels): Not needed any longer.
5166            (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
5167            Only have to (un)subscribe CHANGED
5168    
5169            * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
5170    
5171            * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
5172            for the wxPython locale bug to __init__.py so that it's
5173            automatically executed by anybody using UI code from Thuban.
5174    
5175    2002-07-18  Bernhard Herzog  <[email protected]>
5176    
5177            * Thuban/UI/main.py (main): app no longer needs to be global
5178    
5179            * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
5180            as parameter and store it in an instance variable
5181            (MainWindow.invoke_command, MainWindow.update_command_ui)
5182            (MainWindow.save_modified_session, MainWindow.NewSession)
5183            (MainWindow.OpenSession, MainWindow.SaveSession)
5184            (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
5185            application object.
5186    
5187            * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
5188            the main window with self.
5189    
5190            * Thuban/UI/context.py: New module with the context class
5191    
5192            * Thuban/UI/command.py (Command): Update doc string.
5193    
5194            * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
5195            MainWindow.update_command_ui): Pass an instance of the context
5196            class to the command's methods
5197            (check_current_tool, call_method): Handle the new context
5198            implementation
5199    
5200            * Examples/simple_extensions/simple_tool.py (simple_tool,
5201            check_simple_tool): Handle the new context implementation
5202    
5203            * Examples/simple_extensions/simple_command.py (simple_command):
5204            Handle the new context implementation. Update the comments about
5205            the context.
5206    
5207            * Thuban/UI/application.py (ThubanApplication.SetSession): Add
5208            doc-string
5209            (ThubanApplication.Session): New method to return the session
5210            object
5211    
5212            * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
5213            interactor's selected_layer may not be a layer of the current
5214            session when the tree is updated while a new session is being set.
5215    
5216    2002-07-17  Bernhard Herzog  <[email protected]>
5217    
5218            * Thuban/UI/tree.py (color_string): Removed. No longer used.
5219            (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
5220            update_tree into update_tree and add_items. The tree now uses a
5221            more generic way to display the contents of the tree.
5222            (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
5223    
5224            * Thuban/Model/layer.py (Layer.TreeInfo),
5225            Thuban/Model/extension.py (Extension.TreeInfo),
5226            Thuban/Model/map.py (Map.TreeInfo),
5227            Thuban/Model/session.py (Session.TreeInfo):
5228            Add TreeInfo methods to implement the new tree view update scheme
5229    
5230    2002-07-16  Bernhard Herzog  <[email protected]>
5231    
5232            * Thuban/UI/application.py: Don't use "import from" for the
5233            MainWindow. It can't always be resolved.
5234            (ThubanApplication.OnInit): change reference to MainWindow
5235            accordingly.
5236    
5237            * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
5238            completely
5239    
5240    2002-07-10  Bernhard Herzog  <[email protected]>
5241    
5242            * setup.py (create_init_module): New configurable variable whose
5243            default depends on the platform we're running on.
5244            (ThubanInstall.initialize_options): Initialize
5245            self.create_init_module from the global create_init_module
5246            (ThubanInstall.user_options): indictate that the options
5247            create-init-module and init-module-dir have arguments.
5248    
5249            * setup.py: In the setup call change the version number to include
5250            cvs.
5251    
5252            * MANIFEST.in: Add the files in Examples
5253    
5254    2002-07-09  Bernhard Herzog  <[email protected]>
5255    
5256            * setup.py: In the setup call, use the thuban homepage as the
5257            value of the url parameter.
5258    
5259            * Examples: New subdirectory for examples.
5260    
5261            * Examples/simple_extensions/simple_tool.xpm,
5262            Examples/simple_extensions/simple_tool.py,
5263            Examples/simple_extensions/simple_command.py,
5264            Examples/simple_extensions/README: Simple examples showing how to
5265            add new commands and tools.
5266    
5267            * setup.cfg (bdist_rpm): Add the default value for prefix and tell
5268            bdist_rpm that we also have an install script.
5269            (bdist_inno): Add 2002 to the copyright notice.
5270    
5271            * setup.py: Create a file in python's site-packages directory to
5272            make installation of Thuban as a library easier.
5273            (ThubanInstall.user_options): Add two new options,
5274            create-init-module and init-module-dir
5275            (ThubanInstall.expand_with_pure_python_dirs): New method to expand
5276            filenames for installation in the default directories.
5277            (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
5278            the inherited methods to capture some filenames before they're
5279            transformed too much by distutils.
5280            (ThubanInstall.run): Create the init module if requested.
5281            (ThubanInstall.thuban_init_filename): New method to return the
5282            full name of the init module.
5283            (ThubanInstall.get_outputs): Append the filename of the init
5284            module.
5285    
5286    2002-07-08  Bernhard Herzog  <[email protected]>
5287    
5288            * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
5289            handle the prefix properly which means that the default for the
5290            installation prefix should be /usr for RPMs and /usr/local when
5291            doing a normal source install.
5292            (bdist_rpm_install_script): Script to override the default install
5293            commands in the specfile generated by the bdist_rpm command.
5294            (thuban_bdist_rpm.user_options): Add a prefix option
5295            (thuban_bdist_rpm.initialize_options): Init the prefix option.
5296            Create the script files for the spec files as empty files here
5297            (thuban_bdist_rpm._make_spec_file): Override the inherited method
5298            to fill the script files with content.
5299    
5300            * Thuban/Model/save.py (relative_filename): Wrapper around
5301            Thuban.Lib.fileutil.relative_filename that accepts an empty dir
5302            argument. save_session now automatically uses this version,
5303            solving a problem when saving to a relative filename.
5304    
5305            * setup.py: In the setup call, make sure that the library
5306            directories are under $prefix/lib not directly under $prefix.
5307    
5308    2002-06-20  Jan-Oliver Wagner <[email protected]>
5309    
5310            * Thuban/Model/extension.py: new module to handle extension objects.
5311            * Thuban/Model/messages.py: new messages for extensions.
5312            * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
5313            Session.AddExtension): new for handling extensions.
5314            Also some other minor changes to round up extension handling.
5315            * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
5316            of Extension titles and title and names of its objects.
5317    
5318    2002-05-29  Bernhard Herzog  <[email protected]>
5319    
5320            * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
5321            the events for a command.
5322            (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
5323            Call bind_command_events to bind the events. add_toolbar_command
5324            can now bind events too so that it's possible to have commands
5325            that are only available through the toolbar.
5326            (MainWindow.init_ids): New instance variable events_bound to keep
5327            track of for which commands events have been bound.
5328    
5329    2002-05-28  Bernhard Herzog  <[email protected]>
5330    
5331            * Thuban/UI/menu.py: New module to build and manage menus.
5332    
5333            * Thuban/UI/mainwindow.py: Remove some unused imports.
5334            (MainWindow.__init__, main_menu): move the definition of the main
5335            menu from __init__ to the Menu instance main_menu.
5336            (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
5337            build the menu bar and sub-menus from a menu description.
5338    
5339            * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
5340            startup file
5341            (ThubanApplication.read_startup_files): New method to run
5342            ~/.thuban/thubanstart.py
5343    
5344            * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
5345            Move the toolbar definition to the Menu instance main_toolbar.
5346            (MainWindow.build_toolbar): New method to build the toolbar
5347            similar to the build_menu methods
5348    
5349    2002-05-23  Bernhard Herzog  <[email protected]>
5350    
5351            * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
5352            layer_outline_color. Fix it in the definition of the command too.
5353    
5354            * Thuban/UI/command.py (Command): Fix typo in doc string
5355    
5356    2002-05-22  Bernhard Herzog  <[email protected]>
5357    
5358            * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
5359            in the docstring
5360    
5361    2002-05-15  Bernhard Herzog  <[email protected]>
5362    
5363            * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
5364            when the shapefile is empty.
5365            (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
5366            now return None for empty shapefiles. Update doc-strings.
5367    
5368            * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
5369            the layer's bbox being None.
5370    
5371            * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
5372            layer's bbox being None.
5373    
5374            * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
5375            necessary.
5376            (MapCanvas.__init__): New instance variables, last_selected_layer
5377            and last_selected_shape to determine how the selection has
5378            changed.
5379    
5380            * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
5381            AutoSizeColumns because it will cause a traversal of the entire
5382            table which for large .dbf files will take a very long time.
5383    
5384    2002-05-14  Bernhard Herzog  <[email protected]>
5385    
5386            * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
5387            maximum depth for the tree than shapelib does by default.
5388    
5389    2002-05-10  Bernhard Herzog  <[email protected]>
5390    
5391            * setup.py (py_modules): The shptree modules doesn't have a
5392            wrapper, so don't include it in the py_modules
5393    
5394    2002-05-08  Bernhard Herzog  <[email protected]>
5395    
5396            * extensions/shapelib/shptree.c (compare_ints): Make arguments
5397            const void * as in the qsort prototype
5398            (SHPTreeFindLikelyShapes): Remove some unused variables.
5399    
5400            * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
5401            maintains to redraw the window during a drag.
5402            (MapCanvas.unprojected_rect_around_point): New method to determine
5403            a small region around a point for hit-testing.
5404            (MapCanvas.find_shape_at): Only test the shapes in a small region
5405            around the point.
5406    
5407            * setup.py: Increment the version to 0.1.2
5408    
5409            * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
5410            debug print and set session to None after unsubscribing
5411    
5412    2002-05-07  Bernhard Herzog  <[email protected]>
5413    
5414            * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
5415            the file to have a .thuban extension.
5416    
5417            * Thuban/UI/tree.py (session_channels): New class constant with
5418            all the session channels to subscribe to to update the tree
5419            (SessionTreeCtrl.session_changed): Remember the session so that we
5420            can unsubscribe properly. Use the new class constant to
5421            unsubscribe from the old session and subscribe to the new one.
5422            (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
5423            subscriptions of the SessionTreeCtrl.
5424            (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
5425    
5426            * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
5427            Session Tree" command to the file menu.
5428    
5429            * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
5430            as update_region to the renderer.
5431    
5432            * Thuban/UI/renderer.py
5433            (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
5434            update box is now directly a tuple, not a wxRect anymore.
5435    
5436            * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
5437            prints.
5438    
5439    2002-05-07  Bernhard Herzog  <[email protected]>
5440    
5441            * setup.py: Add the shptree extension module. See
5442            extensions/pyshapelib/ChangeLog for more details.
5443    
5444            * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
5445            extensions/shapelib/dbfopen.c: Really update to the versions of
5446            shapelib 1.2.9. For some reason it wasn't really done on
5447            2002-04-11.
5448    
5449            * extensions/shapelib/shptree.c: Modified version of shptree.c of
5450            shapelib 1.2.9. The only real difference is the use of qsort
5451            instead of a bubble sort implementation
5452    
5453            * Thuban/Model/layer.py (Layer.__init__): New instance variable
5454            shapetree to hold the shapelib quadtree for the shapefile
5455            (Layer.open_shapefile): Create the quad tree.
5456            (Layer.ShapesInRegion): New method to return the ids of shapes in
5457            a given region using the quad tree.
5458    
5459            * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
5460            comment
5461            (draw_polygon_shape): Accept both arcs and polygons.
5462            (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
5463            the api.
5464    
5465            * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
5466            return the shape ids to be rendered in a given layer.
5467            (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
5468            ids. Use draw_polygon_shape to draw arc shapes as well.
5469            (ScreenRenderer.RenderMap): New parameter for the rectangle that
5470            has to be updated
5471            (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
5472            calling it's ShapesInRegion method.
5473    
5474            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
5475            update_region for the update region.
5476            (MapCanvas.OnPaint): Maintain the update region
5477            (MapCanvas.do_redraw): Pass the bounding box of the update_region
5478            to the renderer when drawing the bitmap. Reset the update_region.
5479    
5480    2002-05-03  Bernhard Herzog  <[email protected]>
5481    
5482            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
5483            MainWindow.OpenSession): Change the file extension of the session
5484            files to .thuban
5485    
5486            * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
5487            Move the map channels to be forwarded by the session into the
5488            class constant with forwarded_channels. Also add
5489            LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
5490            forwarded_channels
5491    
5492            * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
5493            typo and some rewording).
5494    
5495    2002-05-02  Bernhard Herzog  <[email protected]>
5496    
5497            * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
5498            around to speed up most redraws:
5499            (MapCanvas.__init__): New instance variable bitmap which holds the
5500            bitmap
5501            (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
5502            self.bitmap to draw.
5503            (MapCanvas.full_redraw): New method to force a full redraw
5504            including the bitmap
5505            (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
5506            make sure the bitmap is redrawn.
5507            (MapCanvas.projection_changed, MapCanvas.set_view_transform,
5508            MapCanvas.shape_selected): Call full_redraw instead of readraw to
5509            make sure the bitmap is redrawn.
5510            (MapCanvas.OnSize): New method to handle size events so that the
5511            bitmap can be redrawn.
5512    
5513    2002-04-29  Bernhard Herzog  <[email protected]>
5514    
5515            * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
5516            canvas' VIEW_POSITION event
5517            (MainWindow.view_position_changed): Handler for VIEW_POSITION.
5518            Update the text in the status-bar accordingly.
5519    
5520            * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
5521            (MapCanvas.__del__): Implement because Publisher.__del__ has to be
5522            called.
5523            (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
5524            current_position
5525            (MapCanvas.set_current_position): New method to set
5526            current_position. Issue a VIEW_POSITION event
5527            (MapCanvas.CurrentPosition): New public method to return the value
5528            of current_position. Should be called when the VIEW_POSITION event
5529            is processed.
5530            (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
5531            Update the position.
5532            (MapCanvas.OnLeaveWindow): Set the position to None.
5533    
5534            * Thuban/UI/messages.py (VIEW_POSITION): New message for the
5535            position in the statusbar
5536    
5537    2002-04-26  Frank Koormann <[email protected]>
5538    
5539            * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
5540    
5541    2002-04-24  Frank Koormann <[email protected]>
5542    
5543            * Resources/Bitmaps/identify.xpm: shadow added
5544    
5545            * Resources/Bitmaps/fullextent.xpm: new
5546    
5547    2002-04-22  Jan-Oliver Wagner <[email protected]>
5548    
5549            * Thuban/UI/tree.py (update_tree): added test for None on map bounding
5550            box
5551    
5552    2002-04-21  Jan-Oliver Wagner <[email protected]>
5553    
5554            * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
5555    
5556            * Thuban/UI/tree.py (update_tree): added added map extent
5557    
5558            * Thuban/UI/mainwindow.py (_method_command): extended by parameter
5559            icon; added map_full_extend as tool
5560    
5561    2002-04-19  Jan-Oliver Wagner <[email protected]>
5562    
5563            * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
5564            saving _new_ sessions
5565    
5566            * Thuban/Model/session.py (create_empty_session): new session
5567            don't have a filename (set to None)
5568    
5569            * Thuban/UI/tree.py (update_tree): added filename and modified flag
5570    
5571            * Thuban/Model/load.py (ProcessSession): convert projection
5572            parameters from unicode to regular string
5573    
5574            * Data/iceland_sample.session: Added UTM Zone 26 projection.
5575    
5576    2002-04-11  Bernhard Herzog  <[email protected]>
5577    
5578            * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
5579            extensions/shapelib/dbfopen.c: Update to the versions of shapelib
5580            1.2.9
5581    
5582            * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
5583            the pyshapelib directoy into the list of include dirs, so that
5584            pyshapelib_api.h can be found.
5585    
5586            * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
5587            holds the pyshapelib C-API
5588            (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
5589            pyshapelib_api to access the shapelib functions.
5590            (initwxproj): Import the c_api from the shapelib module and
5591            initialize pyshapelib_api.
5592    
5593    2002-04-04  Bernhard Herzog  <[email protected]>
5594    
5595            * setup.py (thuban_bdist_rpm.initialize_options): Use
5596            initialize_options to create the scripts for the rpm.
5597    
5598            * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
5599    
5600    2002-04-03  Bernhard Herzog  <[email protected]>
5601    
5602            * setup.py: Increment version to 0.1.1
5603    
5604            * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
5605            Layer" and "Remove Layer" commands from the layer menu to the map
5606            menu
5607    
5608    2002-02-15  Bernhard Herzog  <[email protected]>
5609    
5610            * Thuban/Model/layer.py (Layer.Shape): list append only takes one
5611            argument (python <= 1.5.2 erroneously accepted multiuple
5612            arguments)
5613    
5614    2002-02-04  Bernhard Herzog  <[email protected]>
5615    
5616            * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
5617            RecordGrid in the identifyview.
5618            (IdentifyView.__init__): Use IdentifyGridCtrl instead of
5619            IdentifyListCtrl. The grid allows editing of the values.
5620    
5621            * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
5622            implementing a grid for a single row of a thuban table.
5623    
5624            * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
5625            layers by default. Easier to use than the previous default of only
5626            searching through the select layer which meant that if no layer
5627            was selected, you couldn't select a shape.
5628    
5629            * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
5630    
5631            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
5632            stroke_width attribute
5633    
5634            * Thuban/Model/save.py (save_session): Write the new stroke_width
5635            attribute
5636    
5637            * Thuban/Model/load.py (ProcessSession.startElement): Read the
5638            stroke_width attribute
5639    
5640            * Thuban/Model/layer.py (Layer.__init__): New parameter and
5641            instance variable stroke_width
5642            (Layer.SetStrokeWidth): Set the stroke_width.
5643    
5644    2002-02-01  Bernhard Herzog  <[email protected]>
5645    
5646            * extensions/thuban/wxproj.cpp (project_points): Fix two
5647            off-by-one errors in the last loop that joins the various parts
5648            together.
5649    
5650    2002-01-14  Bernhard Herzog  <[email protected]>
5651    
5652            * setup.py (data_dist.make_distribution): Fix some typos
5653    
5654    2001-09-18  Bernhard Herzog  <[email protected]>
5655    
5656            * README: Slight tweaking in preparation for the 0.1 release
5657    
5658            * setup.cfg: Add section for sdist to create both tgz and zip
5659            archives
5660    
5661            * setup.py: increase version number to 0.1
5662            (data_dist): New command class for data distribution
5663    
5664    2001-09-14  Bernhard Herzog  <[email protected]>
5665    
5666            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
5667            Handle the case of no layer (i.e. layer is None) properly.
5668    
5669            * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
5670            Set the initial selection of the combo boxes to reflect the
5671            projection we're starting with in a way that works on windows,
5672            too.
5673    
5674            * Thuban/Lib/connector.py (Connector.print_connections): Print the
5675            puiblisher's ids in hex to make it easier to compare them to the
5676            standard repr of python methods
5677    
5678            * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
5679            messages
5680    
5681  2001-09-13  Bernhard Herzog  <[email protected]>  2001-09-13  Bernhard Herzog  <[email protected]>
5682    
5683            * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
5684            deselect the layer if no layer is selected
5685    
5686          * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to          * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
5687          idle time when there actually is something to draw. If there's          idle time when there actually is something to draw. If there's
5688          nothing to draw simply clear the window          nothing to draw simply clear the window
# Line 10  Line 5693 
5693          specify the point to move into the center of the window          specify the point to move into the center of the window
5694          (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't          (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
5695          dragged, zoon in/out by a factor of 2          dragged, zoon in/out by a factor of 2
5696            (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
5697            index, i.e. reversed drawing order) so that objects appearing to
5698            be in from of others are selected first. This is probably mostly
5699            relevant for point shapes where the symbols used may overlap
5700    
5701          * Thuban/Model/session.py (create_empty_session): Unset the          * Thuban/Model/session.py (create_empty_session): Unset the
5702          modified bit before returning it          modified bit before returning it
# Line 89  Line 5776 
5776          (MainWindow.identify_view_on_demand): Store the interactor in an          (MainWindow.identify_view_on_demand): Store the interactor in an
5777          instvar and use that reference instead of going through main.app          instvar and use that reference instead of going through main.app
5778    
5779          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
5780          * Thuban/UI/application.py (ThubanApplication.OnInit):          * Thuban/UI/application.py (ThubanApplication.OnInit):
5781          * Thuban/UI/main.py (main): Create the session tree view in main          * Thuban/UI/main.py (main): Create the session tree view in main
5782          with the new mainwindow method ShowSessionTree and not directly          with the new mainwindow method ShowSessionTree and not directly
5783          the application's OnInit method          the application's OnInit method
# Line 106  Line 5793 
5793          layer to the tableview dialog.          layer to the tableview dialog.
5794    
5795          * Thuban/UI/tableview.py: Add some doc-strings          * Thuban/UI/tableview.py: Add some doc-strings
5796          (TableGrid):          (TableGrid):
5797          (TableGrid.OnRangeSelect):          (TableGrid.OnRangeSelect):
5798          (TableGrid.OnSelectCell):          (TableGrid.OnSelectCell):
5799          (TableFrame.__init__):          (TableFrame.__init__):
# Line 173  Line 5860 
5860  2001-09-05  Bernhard Herzog  <[email protected]>  2001-09-05  Bernhard Herzog  <[email protected]>
5861    
5862          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
5863            
5864          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
5865          interactor to pass through to the MapCanvas          interactor to pass through to the MapCanvas
5866            
5867          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
5868          argument to the MainWindow constructor to get rid of the ugly hack          argument to the MainWindow constructor to get rid of the ugly hack
5869          that made main.app available early just so that the mapcanvas          that made main.app available early just so that the mapcanvas
# Line 223  Line 5910 
5910          (ThubanInstall.run): Remove the leading install root from the          (ThubanInstall.run): Remove the leading install root from the
5911          script filename if an install root was specified and use the new          script filename if an install root was specified and use the new
5912          link_file method          link_file method
5913            
5914          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
5915          the window when the first layer is added to the map.          the window when the first layer is added to the map.
5916    
# Line 260  Line 5947 
5947          (InnoIconItem): Helper class for bdist_inno          (InnoIconItem): Helper class for bdist_inno
5948          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
5949          this together with the appropriate parameters, to the setup call.          this together with the appropriate parameters, to the setup call.
5950            
5951          * setup.cfg (bdist_inno): added new section for the inno setup          * setup.cfg (bdist_inno): added new section for the inno setup
5952          installer          installer
5953    

Legend:
Removed from v.59  
changed lines
  Added in v.1463

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26