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

Legend:
Removed from v.55  
changed lines
  Added in v.1461

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26