/[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 924 by frank, Mon May 19 09:12:42 2003 UTC revision 1465 by bh, Fri Jul 18 18:21:07 2003 UTC
# Line 1  Line 1 
1    2003-07-18  Bernhard Herzog  <[email protected]>
2    
3            * Thuban/UI/messages.py (MAP_REPLACED): New message.
4    
5            * Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED
6            after the new map has been assigned
7    
8            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages):
9            Delegate MAP_REPLACED to the canvas too
10            (MainWindow.prepare_new_session): Removed. Thanks to the new
11            MAP_REPLACED message it's no longer needed
12            (MainWindow.OpenSession, MainWindow.NewSession):
13            prepare_new_session has been removed.
14    
15            * Thuban/UI/classifier.py (Classifier.__init__): Subscribe to
16            MAP_REPLACED so that we can close the dialog if a new map is set.
17            (Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED
18            (Classifier.map_replaced): Handle MAP_REPLACED by closing the
19            dialog
20    
21            * test/test_viewport.py (SimpleViewPortTest)
22            (SimpleViewPortTest.test_default_size): Add doc-strings
23            (ViewPortTest.setUp): Bind map to self.map so we can use it in
24            tests. Subscribe to MAP_REPLACED messages too.
25            (ViewPortTest.tearDown): No need to explicitly unsubscribe
26            (ViewPortTest.test_set_map): New test for the SetMap method.
27    
28    2003-07-18  Bernhard Herzog  <[email protected]>
29    
30            * test/test_viewport.py (SimpleViewPortTest.test_default_size):
31            Move this test from ViewPortTest.setUp to this new separate test
32            case. setUp is not the place for the actual tests.
33            (ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
34            more of the test from setUp to the new test test_inital_settings.
35            (ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
36            (ViewPortTest.test_proj_conv): Split test_proj_conv into
37            test_win_to_proj and test_proj_to_win and make the tests easier to
38            understand
39            (ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
40            (ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
41            (ViewPortTest.test_unprojected_rect_around_point)
42            (ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
43            Reformat to increase readability.
44    
45    2003-07-18  Bernhard Herzog  <[email protected]>
46    
47            * Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.
48    
49    2003-07-18  Bernhard Herzog  <[email protected]>
50    
51            * test/runtests.py: The test suite can now be run without an X
52            connection. To make sure this remains true, remove the DISPLAY
53            environment variable so that an error occurs if the wxGTK is
54            imported accidentally
55    
56    2003-07-18  Bernhard Herzog  <[email protected]>
57    
58            * Thuban/UI/viewport.py: Remove unused imports
59    
60            * Thuban/UI/view.py: Remove unused imports
61    
62    2003-07-18  Bernhard Herzog  <[email protected]>
63    
64            * test/test_export.py Remove unused imports. The OutputTransform
65            function is now in viewport.py and is called output_transform
66            (TestScalebar.test_output_transform)
67            (TestScalebar.test_OutputTransform): Renamed to
68            test_output_transform and updated to use output_transform instead
69            of OutputTransform
70    
71            * Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
72            renamed.
73            (MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
74            renamed to output_transform
75    
76            * Thuban/UI/viewport.py (OutputTransform, output_transform):
77            Rename to output_transform
78    
79    2003-07-18  Bernhard Herzog  <[email protected]>
80    
81            * Thuban/Model/layer.py (Layer.__init__): Rename
82            classificationField to classificatin_column and init it here so
83            that it can be used in SetClassificationColumn
84            (Layer.GetClassificationColumn, Layer.GetClassificationField):
85            Rename to GetClassificationColumn.
86            (Layer.SetClassificationColumn, Layer.SetClassificationField):
87            Rename to SetClassificationColumn and issue a LAYER_CHANGED
88            message if the column changes.
89            (Layer._classification_changed, Layer.ClassChanged): Rename to
90            _classification_changed. Update the callers.
91            (Layer.SetShapeStore): Further field->column renames.
92    
93            * Thuban/Model/load.py (SessionLoader.start_classification)
94            (SessionLoader.start_clpoint): Updates because of
95            field->column method name changes in the Layer class
96    
97            * Thuban/Model/save.py (SessionSaver.write_classification): Updates
98            because of field->column method name changes in the Layer class
99    
100            * Thuban/UI/classifier.py (Classifier.__init__)
101            (Classifier._OnTry, Classifier._OnRevert): Updates because of
102            field->column method name changes in the Layer class
103    
104            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
105            because of field->column method name changes in the Layer class
106    
107            * Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
108            of field->column method name changes in the Layer class
109    
110            * test/test_save.py (SaveSessionTest.testClassifiedLayer)
111            (SaveSessionTest.testClassifiedLayer): Update because of
112            field->column method name changes in the Layer class
113    
114            * test/test_layer.py (SetShapeStoreTests.setUp)
115            (SetShapeStoreTests.test_sanity): Update because of field->column
116            method name changes in the Layer class
117            (TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
118            (TestLayerModification.test_sanity)
119            (TestLayerModification.test_initial_settings): remove unsued code
120            and rename to test_sanity.
121            (TestLayerModification.test_set_classification): New test for
122            SetClassification and SetClassificationField.
123    
124    2003-07-18  Bernhard Herzog  <[email protected]>
125    
126            * test/test_classgen.py (TestFixedRamp.test): Extend test to check
127            the non-fixed values as well. The old test would have accepted a
128            fixed ramp that only returnes the fixed properties
129    
130    2003-07-17  Jonathan Coles   <[email protected]>
131    
132            * Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
133            shots for the manual. The XCF file is the source image and
134            has additional layers to support changes.
135    
136            * Doc/manual/thuban-manual.xml: Wrote an initial Introduction.
137    
138            * Thuban/UI/classifier.py (Classifier.__BuildClassification):
139            Return both the new class and the field name.
140    
141            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't
142            fit the map to the window as this changes any zoom level that
143            the user may have set.
144    
145    2003-07-16  Jonathan Coles   <[email protected]>
146    
147            * Thuban/Model/classgen.py (generate_singletons,
148            generate_uniform_distribution, generate_quantiles): Remove
149            fixes parameter, but maintain the same functionality by having
150            the calling function pass a FixedRamp object for the ramp.
151            (FixedRamp): New. Adapts a ramp to have fixed property values.
152    
153            * Thuban/Model/classification.py: Use new CLASS_CHANGED message.
154            (Classification): Inherit from Publisher.
155            (Classification.__init__): Remove the layer parameter.
156            Classifications no longer need to have a parent layer.
157            (Classification.GetField, Classification.GetFieldType,
158            Classification.SetFieldInfo): Removed. The field name is stored
159            in the layer, and the type can be retreived by calling
160            Layer.GetFieldType().
161            (Classification._set_layer, Classification.GetLayer): Removed.
162            Classifications no longer have a parent layer.
163    
164            * Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
165            classification.
166            (Layer.SetShapeStore): Reset the classification first while
167            we still have the old shape store to work with.
168            (Layer.GetClassificationField, Layer.SetClassificationField):
169            New. Method for getting/setting the field to classify on.
170            (Layer.SetClassification): Simplified now that the layer
171            simply has to hold a reference to the classification and not
172            tell the classification who owns it.
173            Fixes RTbug #2023.
174    
175            * Thuban/Model/load.py (SessionLoader.start_classification):
176            Set the field name on the layer, not the classification.
177    
178            * Thuban/Model/messages.py: Add CLASS_CHANGED for when a
179            classification is modified.
180    
181            * Thuban/Model/save.py (SessionSaver.write_classification):
182            Get the field name and type from the layer.
183    
184            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
185            parameter records to rows and add docstring. Fixes RTbug #1997.
186    
187            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
188            ramp when we need to fix certain values of a ramp rather than
189            using the old fixes parameter. Fixes RTbug #2024.
190    
191            * Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
192            parameter.
193            (ClassTable.Reset): Add fieldType parameter and use it, rather
194            than asking the classification.
195            (Classifier.__init__): Remember the original class's field
196            and ask the layer for the field type, rather than the classification.
197            (Classifier.__SetGridTable): Retrieve the field and field type
198            for the table because they are not in the classification.
199            (Classifier._OnTry, Classifier._OnRevert): Set the classification
200            field on the layer in addition to the classification itself.
201    
202            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
203            classification field from layer.
204    
205            * Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
206            classification field from layer. Split up tests and remove
207            *-imports. Fixes RTbug #1992.
208    
209            * test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.
210    
211            * test/test_classification.py
212            (TestClassification.test_classification): Remove tests for methods
213            that no longer exist.
214    
215            * test/test_layer.py (SetShapeStoreTests.setUp): Classification
216            __init__ no longer has a field parameter, use SetClassificationField.
217            (SetShapeStoreTests.test_sanity): Use layer object to get class
218            field info.
219    
220            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
221            SetClassificationField on layer to set class field info.
222    
223            * test/test_viewport.py: Renamed from test/test_view.py.
224    
225    2003-07-16  Jan-Oliver Wagner <[email protected]>
226    
227            * Doc/manual/thuban-manual.xml: Added authors and an initial
228            coarse structure.
229    
230    2003-07-15  Bernhard Herzog  <[email protected]>
231    
232            * test/support.py (FloatComparisonMixin): This is a mix-in class
233            and therefore should not be derived from any other class.
234    
235            * test/test_range.py (RangeTest): FloatComparisonMixin is a
236            mix-in, so derive from TestCase as well.
237    
238    2003-07-15  Bernhard Herzog  <[email protected]>
239    
240            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
241            draw_func handling a bit to remove one layer of indirection. This
242            makes the renderer about 10% faster in the non-classifying case
243            and the code a bit cleaner
244            (MapRenderer.draw_point_shape): Add the pen and brush parameters
245            and set them in the dc. Now the draw_point_shape method and
246            wxproj's draw_polygon_shape function have basically the same
247            signature so that both can be directly used as draw_func
248    
249    2003-07-15  Bernhard Herzog  <[email protected]>
250    
251            * Thuban/Model/save.py (SessionSaver.write_classification): Encode
252            string values (in addition to the labels) as UTF 8
253    
254            * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
255            values if the field type is string
256    
257            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
258            saving a session with non-ascii string classification values.
259    
260            * test/test_load.py (TestClassification.file_contents)
261            (TestClassification.test): Check for non-ascii values in string
262            classifications
263    
264    2003-07-14  Jonathan Coles   <[email protected]>
265    
266            * test/test_view.py: New. Tests for ViewPort.
267    
268    2003-07-14  Frank Koormann   <[email protected]>
269    
270            * Thuban/Model/load.py (SessionLoader.start_map): Encode map
271            title to latin1.  Fixes https://intevation.de/rt/webrt?serial_num=2013
272    
273            * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
274            unicode strings from session file: session title, map title and
275            projection name.
276            
277    2003-07-10  Jonathan Coles   <[email protected]>
278    
279            * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
280            drag_stop, not drag_move when the mouse is released.
281    
282    2003-07-10  Jonathan Coles   <[email protected]>
283    
284            The most important part of this is the seperation of view.py into
285            two pieces. viewport.py now has a class called ViewPort which
286            contains all the non-wx parts of view.py and can therefore be
287            tested. view.py contains only the wx-specific parts and is fairly
288            simple.
289    
290            * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
291            RTTbug #1992.
292            * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
293            RTTbug #1992.
294    
295            * Thuban/Model/classgen.py (generate_singletons,
296            generate_uniform_distribution, generate_quantiles):
297            Added 'fixes' parameter so that property attributes can
298            be held constant over the generated classification groups.
299            (CustomRamp.GetProperties): Remove unused variables.
300    
301            * Thuban/Model/map.py (Map.SetProjection): Send the old
302            projection as an argument to listeners of the MAP_PROJECTION_CHANGED
303            event.
304    
305            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
306            parameter which is a list of records that restricts which
307            records are saved. Fixes RTbug #1997.
308    
309            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
310            Port exception dialog from GREAT-ER. Fixes RTbug #1993.
311    
312            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
313            to allow the user to fix line color/width on generated groups.
314            (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
315            functions to optionally fix group properties.
316    
317            * Thuban/UI/main.py (main): Set exception hook to the
318            ShowExceptionDialog. Fixes RTbug #1993.
319    
320            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
321            the table window when it is selectd to be shown.
322    
323            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
324            Export Selection button and move the export buttons underneath
325            the table.
326            (QueryTableFrame.UpdateStatusText): Added event argument so
327            that it can respond to grid selection events. The status text
328            is now updated even when the table is not associated with a
329            layer as was previously assumed.
330            (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
331            UpdateStatusText responds to these events.
332            (QueryTableFrame.OnSaveAs): Renamed to doExport.
333            (QueryTableFrame.doExport): Helper function that saves the
334            entire table, or selected rows, to a file.
335            (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
336            Respond to export button events and call doExport.
337    
338            * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
339            the function doesn't return NULL without first setting a Python
340            Error.
341    
342            * test/runtests.py (main): Only print "Unknown option" for
343            unsupported options.
344    
345            * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
346            optional epsilon argument to specify floating point accuracy.
347            (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
348            for each item test.
349    
350            * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
351            tests for saving selected records.
352    
353            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
354            tests for saving selected records.
355    
356            * test/test_map.py (TestMapWithContents.test_set_projection):
357            MAP_PROJECTION_CHANGED events send the old projection.
358    
359            * test/test_session.py
360            (TestSessionWithContent.test_forward_map_projection):
361            MAP_PROJECTION_CHANGED events send the old projection.
362    
363            * test/test_table.py (TableTest): Update tests to use non-deprecated
364            functions.
365    
366    2003-07-08  Bernhard Herzog  <[email protected]>
367    
368            * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
369            constants in the column objects are the standard ones defined in
370            the table module.
371    
372            * test/test_transientdb.py
373            (TestTransientTable.test_transienttable_to_dbf): New. Test whether
374            exporting transient tables as DBF works. This should catch the bug
375            just fixed in TransientTableBase.Width.
376    
377    2003-07-08  Bernhard Herzog  <[email protected]>
378    
379            * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
380            interpolated colors correctly.
381    
382            * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
383            New. Test case for the fix in classgen.py
384    
385    2003-07-08  Bernhard Herzog  <[email protected]>
386    
387            * test/runtests.py (main): Make the default output less verbose
388            and add a verbosity option (-v) to get the old output
389    
390    2003-07-08  Bernhard Herzog  <[email protected]>
391    
392            * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
393            0.9.
394    
395            * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
396            New. Return the join type
397    
398            * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
399            DTD
400            (SessionSaver.write_data_containers): Save the join type for
401            joined tables
402    
403            * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
404            namespace
405            (SessionLoader.start_jointable): Handle the jointype attribute
406    
407            * test/test_load_0_8.py: New. Effectively a copy of test_load.py
408            as of Thuban 0.8. These are now tests to determine whether Thuban
409            can still read files generated by Thuban 0.8
410    
411            * test/test_load.py (LoadSessionTest.dtd)
412            (TestSingleLayer.file_contents)
413            (TestLayerVisibility.file_contents, TestLabels.file_contents)
414            (TestLayerProjection.file_contents)
415            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
416            (TestJoinedTable.file_contents)
417            (TestLoadError.file_contents): Update for new DTD
418            (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
419            for new join type attribute
420    
421            * test/test_save.py (SaveSessionTest.dtd)
422            (SaveSessionTest.testEmptySession)
423            (SaveSessionTest.testSingleLayer)
424            (SaveSessionTest.testLayerProjection)
425            (SaveSessionTest.testRasterLayer)
426            (SaveSessionTest.testClassifiedLayer)
427            (SaveSessionTest.test_dbf_table)
428            (SaveSessionTest.test_joined_table): Update for new DTD
429            (SaveSessionTest.test_joined_table): Add test for new join type
430            attribute
431    
432    2003-07-04  Bernhard Herzog  <[email protected]>
433    
434            * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
435            function for table_to_dbf
436            (table_to_dbf): Deal with names longer than the 10 character limit
437    
438            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
439            doc-string
440            (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
441            long column names
442    
443    2003-07-03  Bernhard Herzog  <[email protected]>
444    
445            * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
446    
447    2003-07-03  Bernhard Herzog  <[email protected]>
448    
449            * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
450            for the Thuban manual and README with some basic information about
451            the manual
452    
453    2003-07-03  Bernhard Herzog  <[email protected]>
454    
455            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
456            Update doc-string
457            (TransientJoinedTable.create): Do not modify the column objects of
458            the input tables in place and copy all columns of the input tables
459            into the joined table after all.
460    
461            * test/test_transientdb.py
462            (TestTransientTable.test_transient_joined_table_same_column_name):
463            Update to reflect the new behavior
464            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
465            Update to reflect the new behavior
466            (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
467            New test case for a bug which modified the column objects in place
468    
469    2003-07-02  Jonathan Coles   <[email protected]>
470    
471            * Thuban/Model/classgen.py (generate_singletons,
472            generate_uniform_distribution, generate_quantiles,
473            GenQuantiles0): Make sure maxValue isn't less than
474            one, otherwise we could divide by zero.
475    
476            * test/test_classgen.py (ClassGenTest.doClassRangeTest,
477            ClassGenTest.doClassSingleTest): Call doBoundsTest to
478            check the end classification groups against the
479            proper property values.
480            (ClassGenTest.doBoundsTest): New. Checks the first and
481            last classification groups to make sure their properties
482            are the correct upper and lower bounds for a color ramp.
483    
484    2003-07-02  Jonathan Coles   <[email protected]>
485    
486            * Thuban/Model/classgen.py (generate_singletons,
487            generate_uniform_distribution, generate_quantiles,
488            GenQuantiles0): The denominator was one to high when
489            calculating the index for the ramp causing the index
490            to never to reach one.
491    
492    2003-07-02  Jonathan Coles   <[email protected]>
493    
494            Changed the singature of ClassGroupRange.__init__ and
495            ClassGroupRange.SetRange() so that the min/max values are
496            passed as a tuple. This makes a better calling scheme for
497            when a Range object is passed instead.
498    
499            * Thuban/Model/classgen.py: Fixed parameters to
500            ClassGroupRange constructor.
501    
502            * Thuban/Model/classification.py (ClassGroupRange.__init__):
503            Consolidate the min/max parameters into a single _range which
504            can either be a tuple or a Range object.
505            (ClassGroupRange.SetRange): Consolidate the min/max parameters
506            into a single _range which can either be a tuple or a Range object.
507    
508            * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
509            call to ClassGroupRange constructor to use a tuple.
510    
511            * Thuban/Model/layer.py (Layer.SetClassification): Switch
512            the classification instance variable to the new class
513            before calling _set_layer otherwise subscribers to a
514            LAYER_CHANGED event will not see any difference.
515    
516            * test/test_classification.py: Fix tests of ClassGroupRange
517            so that they use the new signature.
518    
519            * test/test_load.py: Fix use of ClassGroupRange so that it
520            uses the new signature.
521    
522            * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
523            uses the new signature.
524    
525            * test/test_save.py: Fix use of ClassGroupRange so that it
526            uses the new signature.
527    
528    
529    2003-07-01  Jonathan Coles   <[email protected]>
530    
531            * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
532            Import used objects/class from color.
533            (generate_singletons): We don't
534            need the numGroups parameter anymore because we are using
535            the new ramps with GetProperties().
536            (generate_uniform_distribution): Use new ramp method
537            GetProperties().
538            (generate_quantiles, GenQuantiles0): Use new ramp method
539            GetProperties().
540            (CustomRamp.SetNumGroups): Removed. The ramps now map
541            a value from 0 to 1 to class properties so the number
542            of groups is not needed ahead of time.
543            (CustomRamp.next): Removed. CustomRamp does not support
544            interation anymore.
545            (CustomRamp.GetProperties): Returns a ClassGroupProperties
546            object based on the index value from 0 to 1 that is
547            passed to it.
548            (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
549            Made into instances of Monochromatic class instread of
550            deriving from it.
551            (HotToCold.SetNumGroups): Removed. See CustomRamp.
552            (HotToCold.next): Removed. See CustomRamp.
553    
554            * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
555            (Classification.SetField, Classification.SetFieldType):
556            Replaced with SetFieldInfo.
557            (Classification.SetFieldInfo): New. Does a better job of
558            what SetField and SetFieldType used to do by combining
559            their function since they should really always be done
560            at the same time.
561            (Classification.SetLayer): Renamed to _set_layer.
562            (Classification._set_layer): Should only be called from
563            Layer's SetClassification. This does not cause a recursive
564            call as SetLayer did because we know that Layer knows about
565            the classification.
566    
567            * Thuban/Model/color.py: Fixes RTbug #1971.
568            (_Transparent): Renamed from Transparent so it doesn't
569            conflict with the module variable.
570            (Transparent, Black): Renamed from Color.Transparent,
571            Color.Black so they are not class variables.
572    
573            * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
574            (Layer.Destroy): We don't need to call SetClassification
575            anymore to clear out the back reference in the classifcation
576            to the layer. It's better to set it to None using _set_layer,
577            and we won't be creating another clas object too.
578            (Layer.SetClassification): Classification._set_layer is not
579            recursive so remove all the locking variables. Also clean
580            up the code so that it remains unchanged if something fails.
581    
582            * Thuban/Model/load.py: Fixes RTbug #1971.
583            (SessionLoader.start_classification): Call
584            Classification.SetFieldInfo().
585    
586            * Thuban/Model/save.py: Removed import of Color which wasn't
587            being used.
588    
589            * Thuban/UI/classgen.py: Fixes RTbug #1972.
590            (ClassGenDialog.__init__): Color ramps are now instances
591            already so we don't need to create any new objects.
592            (ClassGenDialog.OnOK): Check for numGroups is no longer
593            necessary because we never use it.
594    
595            * Thuban/UI/classifier.py: Fixes RTbug #1971.
596            (Classifier.__BuildClassification, Classifier.__SetGridTable):
597            Call Classification.SetFieldInfo() instead of SetFieldType.
598    
599            * Thuban/UI/renderer.py: Fixes RTbug #1971.
600    
601            * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
602            (MapCanvas.__init__): Subscribe to the idle time event. Set
603            background color to white.
604            (MapCanvas.OnPaint): Set a flag indicating that we should
605            render the map during idle time. If we already have a bitmap
606            just draw it now.
607            (MapCanvas.OnIdle): New. Render the map only during idle time.
608            This also fixes a problem with the busy cursor under gtk.
609    
610            * test/test_classgen.py (ClassGenTest.test_generate_singletons):
611            Fix calls to generate_singletons because the signature changed.
612    
613            * test/test_classification.py: Fix color references and
614            change calls to Classification.[SetField|SetFieldType] to
615            SetFieldInfo.
616    
617            * test/test_load.py: Fix color references.
618    
619            * test/test_load_0_2.py: Fix color references.
620    
621            * test/test_save.py (SaveSessionTest.testClassifiedLayer):
622            Change calls to Classification.[SetField|SetFieldType] to
623            SetFieldInfo.
624    
625    2003-07-01  Frank Koormann   <[email protected]>
626    
627            MERGE from the greater-ms3 branch.
628    
629            * test/test_transientdb.py
630            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
631            New. Test join of two tables with partly equal column names.
632    
633            * Thuban/Model/transientdb.py (TransientJoinedTable.create):
634            If duplicates in left and right tables column names are found,
635            append '_' (underscores) to the name until it is unique.
636            Create always new internal names for the resulting table and reference
637            columns in the join statement with <table>.<column>
638    
639    2003-07-01  Bernhard Herzog  <[email protected]>
640    
641            * test/test_transientdb.py
642            (TestTransientTable.test_transient_joined_table_same_column_name):
643            New. Test whether joining on columns with the same names in both
644            tables works.
645            
646            * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
647            sure to use the right internal names even when joining on field
648            with the same names in both tables. Also, detect duplicate names
649            in the joined table correctly.
650    
651    2003-07-01  Frank Koormann   <[email protected]>
652    
653            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
654            Reverse List of layers to render in same order as in desktop legend.
655    
656    2003-06-30  Jonathan Coles   <[email protected]>
657    
658            * Thuban/version.py (make_tuple): Takes a version string
659            and splits it into a tuple of at most three integers.
660            Used make_tuple() to make tuple versions of the version
661            numbers.
662    
663            * Thuban/UI/about.py: Add Thuban email addresses.
664    
665    2003-06-30  Jonathan Coles   <[email protected]>
666    
667            * Thuban/version.py: SQLite/PySQLite version dependencies
668            were too high.
669    
670    2003-06-30  Jonathan Coles   <[email protected]>
671    
672            * Thuban/version.py: Update version to 0.8.1
673            
674            * MANIFEST.in: Added Projections so that default.proj is
675            included.
676    
677    2003-06-26  Jonathan Coles   <[email protected]>
678    
679            New About box with lots more information including library
680            versions and credits. More/better version checking before
681            Thuban starts.
682    
683            * Thuban/UI/about.py: New. New About box that displays
684            library version information and credits.
685    
686            * Thuban/version.py: Added new 'versions' dictionary which
687            contains the verions of various libraries which are checked
688            when the module loads.
689            (verify_versions): Check all version numbers and returns
690            a list of errors.
691    
692            * Thuban/UI/classifier.py (Classifier.__EnableButtons):
693            Reset the status of the buttons as the situation warrants,
694            but in a better more reliable way by not relying on the
695            current status to determine what needs to change.
696    
697            * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
698            (verify_versions): Remove most of the code since it is
699            now in Thuban.version.verify_versions.o
700    
701            * Thuban/UI/mainwindow.py (MainWindow.About): Call new
702            About box in Thuban.UI.about.
703    
704            * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
705            Returns the version of gdal library being used as a string.
706    
707            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
708            Removed.
709            (get_proj_version): Return the version of PROJ that the file
710            was compiled with.
711            (get_gtk_version): Return th version of GTK that the file
712            was compiled with.
713    
714    2003-06-25  Jonathan Coles   <[email protected]>
715    
716            * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
717            of the SelectPropertiesDialog should be self so the window
718            appears on top.
719            (ClassGroupPropertiesCtrl.DoEdit): The parent
720            of the SelectPropertiesDialog should be self so the window
721            appears on top.
722    
723            * Thuban/UI/resource.py: Cleaned up how we determine file
724            extensions.
725            (GetImageResource): Return an wxImage from our Resources.
726    
727    2003-06-24  Jonathan Coles   <[email protected]>
728    
729            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
730            Check that a layer has a classification before trying
731            to get it. Raster layers don't have classifications.
732    
733    2003-06-23  Jonathan Coles   <[email protected]>
734            
735            * setup.py: Add Resources/XML to resource list.
736        
737    2003-06-23  Jonathan Coles   <[email protected]>
738    
739            * setup.cfg: Fix copyright dates
740        
741    2003-06-23  Jonathan Coles   <[email protected]>
742    
743            * MANIFEST.in: Update with Resources/XML
744    
745            * setup.py: Don't include Locale resources yet as we don't
746            have any and it causes problems building the distribution
747            for Windows. Update version to 0.8.0.
748    
749            * Doc/thuban.dtd: Removed since it is now in Resources/XML.
750    
751            * Thuban/UI/mainwindow.py: Add blank line at the end because
752            file was not being read correctly building the Windows
753            distribution.
754    
755    2003-06-23  Jonathan Coles   <[email protected]>
756    
757            * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
758    
759            * Thuban/version.py: Temporarily update longversion for
760            the 0.8 release so that it doesn't have the cvs revision.
761    
762    2003-06-23  Jonathan Coles   <[email protected]>
763    
764            * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
765            to make sure that we don't create reentrant possibilities with
766            wxYield.
767    
768            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
769            directly to avoid the wxSafeYield() call which generates an
770            OnPaint event causing infinite recursion. Don't try to catch
771            exception anymore. This was for before there were limits on map
772            scaling.
773    
774    2003-06-23  Bernhard Herzog  <[email protected]>
775    
776            Bug fix for RT #1961:
777    
778            * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
779            Register DerivedShapestores with the session
780    
781            * Thuban/Model/session.py (Session.Tables): Make sure each table
782            is only listed once.
783    
784            * test/test_load.py (TestJoinedTable.test): Add check_format call.
785            Update file contents to match the one written out.
786    
787    2003-06-20  Bernhard Herzog  <[email protected]>
788    
789            * test/xmlsupport.py (SaxEventLister.startElementNS)
790            (SaxEventLister.endElementNS): Do not include the qname. Python
791            2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
792            is (presumably incorrectly) None, whereas it's a string with the
793            element name in the later versions.
794    
795            * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
796            (TestEventList.test_even_list_namespace): Update tests to reflect
797            the new behaviour
798            (TestEventList.test_even_list_id_normalization): Fix doc-string
799    
800    2003-06-20  Jonathan Coles   <[email protected]>
801    
802            * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
803            by deriving classes to determine if that layer supports shapes.
804            (Layer): Override HasShapes and return true.
805    
806            * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
807            instead of a direct call to wx[Begin|End]CusyCursor().
808            (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
809            table data.
810    
811            * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
812            New. Wrappers around the wxWindows functions that allow us to
813            make additional calls such as wxYield which gives the native
814            system a chance to update the cursor correctly.
815    
816            * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
817            instead of a direct call to wx[Begin|End]CusyCursor().
818    
819            * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
820            instead of a direct call to wx[Begin|End]CusyCursor().
821            (MapCanvas.find_shape_at): Check if the current search layer
822            support shapes, otherwise go on to the next layer.
823    
824            * test/test_layer.py: Add tests in each type of layer for
825            HasClassification() and HasShapes()
826    
827    2003-06-20  Jonathan Coles   <[email protected]>
828    
829            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
830            turning on the busy cursor to allow the system to change the
831            cursor before we begin painting. This fixes a problem that
832            was occuring only under GTK. Fixes RTbug #1840.
833    
834    2003-06-20  Bernhard Herzog  <[email protected]>
835    
836            * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
837            version.
838    
839            * Thuban/Model/save.py (sort_data_stores): New. Make topological
840            sort of the data sources so they can be written with sources that
841            data sources that depend on other data sources come after the
842            sources they depend on.
843            (SessionSaver.__init__): Add idmap instance variable to map from
844            objects to the ids used in the file.
845            (SessionSaver.get_id, SessionSaver.define_id)
846            (SessionSaver.has_id): New. Methods to manage the idmap
847            (SessionSaver.write): Use thuban-0.8.dtd
848            (SessionSaver.write_session): Add a namespace on the session and
849            write out the data sources before the maps.
850            (SessionSaver.write_data_containers): New. Write the data
851            containers.
852            (SessionSaver.write_layer): Layer elements now refer to a
853            shapestore and don't contain filenames anymore.
854    
855            * Thuban/Model/load.py (LoadError): Exception class to raise when
856            errors in the files are discovered
857            (SessionLoader.__init__): Define dispatchers for elements with a
858            thuban-0.8 namespace too.
859            (SessionLoader.check_attrs): New helper method to check and
860            convert attributes
861            (AttrDesc): New. Helper class for SessionLoader.check_attrs
862            (SessionLoader.start_fileshapesource)
863            (SessionLoader.start_derivedshapesource)
864            (SessionLoader.start_filetable, SessionLoader.start_jointable):
865            Handlers for the new elements in the new fileformat
866            (SessionLoader.start_layer): Handle the shapestore attribute in
867            addition to filename.
868            (SessionLoader.start_table, SessionLoader.end_table): Removed.
869            They were never used in the old formats and aren't needed for the
870            new.
871    
872            * Thuban/Model/session.py (Session.DataContainers): New method to
873            return all "data containers", i.e. shapestores and tables
874    
875            * test/xmlsupport.py (SaxEventLister.__init__)
876            (SaxEventLister.startElementNS, sax_eventlist): Add support to
877            normalize IDs.
878    
879            * test/test_xmlsupport.py
880            (TestEventList.test_even_list_id_normalization): New test case for
881            id normalization
882    
883            * test/test_load.py (LoadSessionTest.check_format): Use ID
884            normalization
885            (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
886            class atrributes used for ID normalization
887            (TestSingleLayer, TestLayerVisibility, TestLabels.test)
888            (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
889            file format
890            (TestJoinedTable): New test for loading sessions with joined
891            tables.
892            (TestLoadError): New. Test whether missing required attributes
893            cause a LoadError.
894    
895            * test/test_save.py (SaveSessionTest.thubanids)
896            (SaveSessionTest.thubanidrefs): New class attributes for ID
897            normalization in .thuban files.
898            (SaveSessionTest.compare_xml): Use id-normalization.
899            (SaveSessionTest.testEmptySession)
900            (SaveSessionTest.testLayerProjection)
901            (SaveSessionTest.testRasterLayer)
902            (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
903            (SaveSessionTest.testLayerProjection): The filename used was the
904            same as for testSingleLayer. Use a different one.
905            (SaveSessionTest.test_dbf_table)
906            (SaveSessionTest.test_joined_table): New test cases for saving the
907            new data sources structures.
908            (TestStoreSort, MockDataStore): Classes to test the sorting of the
909            data stores for writing.
910    
911            * test/runtests.py: Add CVS keywords
912    
913    2003-06-20  Jonathan Coles   <[email protected]>
914    
915            * test/test_session.py
916            (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
917            Use the cultural_landmark-point.dbf file for the store so that
918            the table rows and shape count match.
919    
920    2003-06-20  Jonathan Coles   <[email protected]>
921    
922            * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
923            an exception if the number of shapes is different from the
924            number of rows in the table. Address RTbug #1933.
925    
926            * test/test_layer.py (TestLayer.test_derived_store): Add
927            a test for the new exception in DerivedShapeStore.__init__.
928    
929            * test/support.py (FloatTestCase): Removed since there is
930            already FloatComparisonMixin. Fixes RTbug #1954.
931            (FloatComparisonMixin.assertFloatEqual): Include test for
932            infinity that was part of FloatTestCase.
933    
934            * test/test_range.py (RangeTest): Inherit from
935            support.FloatComparisonMixin now that we don't have
936            support.FloatTestCase.
937    
938    2003-06-20  Bernhard Herzog  <[email protected]>
939    
940            * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
941            the implementation in xmlsupport instead.
942            (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
943    
944            * test/test_proj.py: Import sax_eventlist from xmlsupport instead
945            of test_save
946    
947    2003-06-20  Bernhard Herzog  <[email protected]>
948    
949            * test/test_load.py (LoadSessionTest.check_format): New helper
950            method to make sure the test files we load might have been written
951            by the current thuban version.
952            (ClassificationTest.TestLayers, TestSingleLayer.test)
953            (TestLayerVisibility.test, TestClassification.test)
954            (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
955            Add check_format() calls and fix the thuban data to match the data
956            that would be written by saving the session loaded from it.
957    
958            * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
959            the same class and function in test_save.
960    
961            * test/test_xmlsupport.py (TestEventList): New. test cases for
962            sax_eventlist
963    
964    2003-06-20  Bernhard Herzog  <[email protected]>
965    
966            * Resources/XML/thuban.dtd: Add comment about which versions of
967            Thuban are covered by this DTD
968            (map): Fix content model for layers and raster layers. There can
969            be any number or layers and raster layers in any order.
970    
971    2003-06-20  Jonathan Coles   <[email protected]>
972    
973            This is mainly about fixing RTbug #1949.
974    
975            * Thuban/Model/classification.py: Remove "from __future__"
976            import statement since python 2.2 is the earliest supported
977            version.
978    
979            * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
980            Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
981            depending on the units this projection *forwards* into.
982    
983            * Thuban/Model/save.py (SessionSaver.write_classification):
984            Remove unnecessary use of lambdas and nested functions.
985    
986            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
987            adjustment here if the map projection uses degrees.
988    
989            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
990            scale adjust code since it is now done before calling
991            this method. Don't do anything if the map projection
992            is None.
993    
994    2003-06-19  Bernhard Herzog  <[email protected]>
995    
996            Move version specific load tests to their own file.
997    
998            * test/test_load.py: Expand the doc-string to explain a bit how to
999            handle file format changes.
1000            (TestClassification.test): Update the docstring as this test is
1001            not about Thuban 0.2 anymore.
1002    
1003            * test/test_load_0_2.py: New file with the load tests for thuban
1004            files created with Thuban 0.2 and earlier.
1005    
1006    2003-06-19  Bernhard Herzog  <[email protected]>
1007    
1008            Add XML validation to some of the tests. Validation will only be
1009            done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
1010            To make the DTD available to the test cases it's moved into
1011            Resources/XML
1012    
1013            * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
1014            for versions up to and including 0.2. Two slight changes: added an
1015            encoding specification and fixed the comment which refered to
1016            GRASS, not Thuban
1017    
1018            * test/xmlsupport.py: New support module for tests involving XML.
1019            Currently there's a mix-in class for XML validation.
1020    
1021            * test/test_xmlsupport.py: New. Tests for the xmlsupport module
1022    
1023            * test/test_save.py (SaveSessionTest): Derive from ValidationTest
1024            so that we can validate the
1025            (SaveSessionTest.testEmptySession)
1026            (SaveSessionTest.testSingleLayer)
1027            (SaveSessionTest.testSingleLayer)
1028            (SaveSessionTest.testLayerProjection)
1029            (SaveSessionTest.testRasterLayer)
1030            (SaveSessionTest.testClassifiedLayer): Validate the generated XML
1031    
1032            * test/runtests.py (main): Call print_additional_summary instead
1033            of print_garbage_information
1034    
1035            * test/support.py (resource_dir): New function to return the
1036            "Resource" subdirectory
1037            (print_additional_summary): New function to combine several
1038            summary functions
1039            (run_tests): Use print_additional_summary instead of calling
1040            print_garbage_information directly
1041    
1042    2003-06-19  Bernhard Herzog  <[email protected]>
1043    
1044            * Doc/thuban.dtd (classification): Correct the content model of
1045            the classification element.
1046            (projection): Add the "name" attribute
1047    
1048    2003-06-19  Frank Koormann   <[email protected]>
1049    
1050            MERGE from the greater-ms3 branch.
1051    
1052            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
1053            scale if projection is latlong to get better estimate.
1054    
1055            Fix problem of hidden properties dialog under windows after double
1056            click on layer tree:
1057            The tree control always gets an Expanded / Collapsed event after
1058            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
1059            raises the already displayed window.
1060    
1061            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
1062            raiseProperties initialized to prevent endless loops
1063            (LegendTree._OnItemActivated): Depending on self.raiseProperties
1064            simply raise the properties or open the dialog and issue a second
1065            event.
1066    
1067    2003-06-18  Jonathan Coles   <[email protected]>
1068    
1069            * setup.py: Fix a few problems that occured under Windows.
1070    
1071    2003-06-18  Jonathan Coles   <[email protected]>
1072    
1073            When Thuban loaded the map was redrawn twice because the
1074            legend was being opened after the mainwindow was created
1075            and not during its creation. This meant the map was drawn
1076            initially and then had to be redrawn when the legend
1077            caused the display to change. Now the legend is opened
1078            in the mainwindow constructor which resolves this issue.
1079    
1080            Also, although we were checking for the existence of
1081            gdal and gdalwarp modules, the gdalwarp extension was
1082            still being compiled (which may fail if the system doesn't
1083            have gdal installed). the build_ext command to setup.py
1084            now accepts the flags --with-gdal and --without-gdal.
1085            If --without-gdal is specified setup.py will try to
1086            use the gdal parameters specified by gdal-config. Under
1087            windows, those parameters have to be set in setup.py
1088            as with proj4 an wxWindows.
1089    
1090            * setup.py: Use a list instead of seperate variables for
1091            extension parameters so we can create a generic function
1092            that runs an appropriate *-config script.
1093            (run_cs_script): Renamed from run_wx_script and modified
1094            to accept a second argument which is a list of lists to
1095            be filled in by the values returned from running the command.
1096            (thuban_build_ext): New. Extends the build_ext command and
1097            provides the options --with-gdal/--without-gdal which then
1098            optionally includes the gdalwarp extension.
1099    
1100            * Thuban/Model/resource.py: First check if we can import
1101            the gdalwarp Thuban extension before checking for gdal.
1102            Also added some comments.
1103            
1104            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
1105            the map is None which may be the case if none has been loaded
1106            yet.
1107    
1108            * Thuban/UI/main.py (main): Remove call to ShowLegend.
1109    
1110            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
1111    
1112            * Thuban/UI/renderer.py: Check for gdal support before importing
1113            gdalwarp.
1114            (MapRenderer.render_map): Only try to optimize if we have gdal
1115            support otherwise nothing will get drawn.
1116    
1117            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
1118            during startup before a map has been created. Check if map is None
1119            before using it and do nothing if it is.
1120    
1121    2003-06-17  Jonathan Coles   <[email protected]>
1122    
1123            Fix the problem with raster layers under Windows that caused
1124            Thuban to crash. The view should respond to layer projection
1125            changed events to update the display. Changes to a projection
1126            should not cause the map to be set to full extent.
1127            
1128            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
1129            current_map_proj to remember the current map projection so that
1130            when the projection changes we know what the previous projection
1131            was.
1132            (MapCanvas.SetMap): Unsubscribe and subscribe to
1133            LAYER_PROJECTION_CHANGED events.
1134            (MapCanvas.projection_changed): Split into two methods that respond
1135            to map and layer projection changes.
1136            (MapCanvas.map_projection_changed): New. Takes the current view and
1137            projects it using the new projection. This does not cause the
1138            map to be redrawn at full extent.
1139            (MapCanvas.layer_projection_changed): New. Cause a redraw which
1140            will draw each layer in its new projection.
1141            
1142            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
1143            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
1144            under Windows.
1145            
1146            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
1147            to twice sizeof(void*) because there are two digits for each
1148            hex byte.
1149    
1150    2003-06-16  Bernhard Herzog  <[email protected]>
1151    
1152            Update to the layer interface: Direct access to the table,
1153            shapetable, shapefile and filename attributes is now actively
1154            deprecated by issuing deprecation warnings for all places where
1155            this happens.
1156    
1157            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
1158            to the instance variables table, shapetable, shapefile and
1159            filename via __getattr__ so that we can issue a deprecation
1160            warning.
1161            (Layer.SetShapeStore): Don't set the deprecated instance variables
1162            any more
1163            (Layer.SetShapeStore): Don't use deprecated layer instance
1164            variables
1165            (Layer.Destroy): No need to explicitly remove the instance
1166            variables any more
1167            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
1168            instance variables
1169    
1170            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
1171            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
1172            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
1173            use deprecated layer instance variables
1174    
1175            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
1176            deprecated layer instance variables
1177    
1178            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
1179            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
1180            instance variables
1181    
1182            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
1183            deprecated layer instance variables
1184    
1185            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
1186            deprecated layer instance variables
1187    
1188            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
1189            deprecated layer instance variables
1190    
1191            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
1192            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
1193            variables
1194    
1195            * test/runtests.py (main): Turn Thuban's deprecation warnings into
1196            errors so that they're cought by the tests
1197    
1198            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
1199            layer instance variables
1200    
1201    2003-06-16  Jonathan Coles   <[email protected]>
1202    
1203            Fix a problem under Windows whereby if the user double-clicks on a
1204            layer in the legend that tree item will expand or collapse as well
1205            as open the layer properties dialog. The state of the tree item
1206            should not be affected.
1207    
1208            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
1209            preventExpandCollapse and subscribe to expanding and collapsing
1210            events.
1211            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
1212            collapsing events and will veto the event if it has been triggered
1213            by the user double clicking on a layer.
1214            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
1215            that an expanding/collapsing event should be vetoed.
1216    
1217    2003-06-13  Bernhard Herzog  <[email protected]>
1218    
1219            * Thuban/UI/classifier.py (Classifier.OnClose)
1220            (Classifier.map_layers_removed)
1221            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
1222            in OnClose and not in map_layers_removed or
1223            layer_shapestore_replaced to make sure it always happens when the
1224            dialog is closed
1225    
1226    2003-06-13  Jonathan Coles   <[email protected]>
1227    
1228            This puts back a fix for Windows where a panel is needed so that
1229            the background of the table view appears correctly.
1230    
1231            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
1232            object that can be used by derived classes to place any
1233            controls (including the grid) onto.
1234            (QueryTableFrame.__init__): Use the panel as the parent window
1235            for all the controls. Reparent the grid so that the panel is
1236            the parent. Call UpdateStatusText() to correctly initialize
1237            the status bar.
1238    
1239    2003-06-13  Jonathan Coles   <[email protected]>
1240    
1241            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
1242            from wxFrame (as opposed to wxDialog like the other classes)
1243            but otherwise behaves like the other classes. This is needed
1244            for the TableView which isn't really a dialog and needs to
1245            have a status bar and control buttons.
1246    
1247            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
1248            instance variable to keep track of how many rows are selected.
1249            Subscribe once to the the events we are interested in.
1250            (ThubanGrid.OnRangeSelect): Only handle event if event handling
1251            hasn't been turned off.
1252            (ThubanGrid.OnSelectCell): Only handle event if event handling
1253            hasn't been turned off.
1254            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
1255            as an event listener (which changes the event handler stack)
1256            simply set an instance variable to False. This is checked in
1257            the event handlers.
1258            (ThubanGrid.GetNumberSelected): Return the number of currently
1259            selected rows.
1260            (TableFrame): Inherit from ThubanFrame so we can have a
1261            status bar and control buttons.
1262            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
1263            Explicitly set which items are selected in the operator choice and
1264            action choice so there is always a valid selection. Fixes RTbug #1941.
1265            Subscribe to grid cell selection events so we can update the
1266            status bar.
1267            (QueryTableFrame.UpdateStatusText): Update the status bar with
1268            how many rows are in the grid, how many columns, and how many
1269            rows are selected.
1270            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
1271            Call UpdateStatusText when cells are (de)selected.
1272            (QueryTableFrame.OnQuery): Use the string value in the value
1273            combo if either the selected item index is 0 or if the string
1274            cannot be found in the predefined list (this happens if the
1275            user changes the text). Fixes RTbug #1940.
1276            Only turn off the grid event listeners if there a query comes
1277            back with a none empty list of ids. in the case that the list
1278            is empty this causes a grid.ClearSelection() call to actually
1279            clear the grid selection which causes the selected items in
1280            the map to be deselected. Fixes RTbug #1939.
1281    
1282            * test/test_save.py (XMLWriterTest.Encode): Check return values.
1283            Fixes RTbug #1851.
1284    
1285    2003-06-13  Bernhard Herzog  <[email protected]>
1286    
1287            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
1288            self.selected_shape with the current selection to make sure the
1289            contents of the dialog are up to date when it's shown for the
1290            first time.
1291            The dialog used to work without this by luck. The recent fix to
1292            the connector module 'broke' a 'feature' the identify view was
1293            relying on, i.e that subscribing to a message in response to
1294            receiving a message of that type would mean that the new
1295            subscriber would also be called for the same message.
1296            
1297    2003-06-12  Jonathan Coles   <[email protected]>
1298    
1299            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
1300            the image is rendered. Fixes RTbug #1937.
1301    
1302    2003-06-12  Jonathan Coles   <[email protected]>
1303    
1304            * Thuban/Lib/fileutil.py: As is done under Windows, create the
1305            user directory if it doesn't exist on a posix system.
1306            Fixes RTbug #1815.
1307    
1308            * Thuban/Model/resource.py (get_user_proj_files): Moved the
1309            called to get_application_dir here, so that the directory
1310            will only be called if this method is invoked.
1311    
1312            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
1313            the projfilepath if no projection is selected.
1314    
1315    2003-06-12  Jonathan Coles   <[email protected]>
1316    
1317            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
1318            the scalebar if the current map has no projection set.
1319    
1320            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
1321            projfilepath label to just the basename of the projection file
1322            rather than include the entire path.
1323    
1324            * Thuban/Model/resource.py: Fix missed proj functions that
1325            needed to be renamed.
1326    
1327    2003-06-12  Jonathan Coles   <[email protected]>
1328    
1329            * Thuban/Model/classification.py: Removed assert statements that
1330            tested if the variable was an instance of Color.
1331    
1332            * Thuban/Model/color.py (Color): Remove commented code that isn't
1333            used.
1334            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
1335            Fixes RTbug #1835.
1336            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
1337            Needed now that the class doesn't inherit from Color.
1338    
1339    2003-06-12  Jonathan Coles   <[email protected]>
1340    
1341            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
1342            check unicode strings.
1343    
1344            * test/test_layer.py: Check for existence of gdal.
1345    
1346    2003-06-12  Jonathan Coles   <[email protected]>
1347        
1348            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
1349            that was in load.py
1350    
1351            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
1352            that was in save.py
1353    
1354    2003-06-12  Jonathan Coles   <[email protected]>
1355    
1356            This is largely a collection of bug fixes. We also handle the
1357            case where gdal is not on the system. The XMLReader and XMLWriter
1358            classes were moved into there own files to resolve some circular
1359            import references and because they shouldn't really be in the
1360            file that is dediciated to reading/writing session files since
1361            they are also used elsewhere.
1362    
1363            * Thuban/Model/classgen.py: Renamed functions to follow the
1364            function_names_with_underscores style. Fixes RTbug #1903.
1365            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
1366    
1367            * Thuban/Model/layer.py: Import gdal only if it available.
1368            (RasterLayer): Handle the case where the gdal library is unavailable.
1369            Addresses RTbug #1877.
1370    
1371            * Thuban/Model/load.py (XMLReader): Moved into seperate file
1372            xmlreader.py.
1373    
1374    2003-06-12  Jonathan Coles   <[email protected]>
1375    
1376            This is largely a collection of bug fixes. We also handle the
1377            case where gdal is not on the system. The XMLReader and XMLWriter
1378            classes were moved into there own files to resolve some circular
1379            import references and because they shouldn't really be in the
1380            file that is dediciated to reading/writing session files since
1381            they are also used elsewhere.
1382    
1383            * Thuban/Model/classgen.py: Renamed functions to follow the
1384            function_names_with_underscores style. Fixes RTbug #1903.
1385            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
1386    
1387            * Thuban/Model/layer.py: Import gdal only if it available.
1388            (RasterLayer): Handle the case where the gdal library is unavailable.
1389            Addresses RTbug #1877.
1390    
1391            * Thuban/Model/load.py (XMLReader): Moved into seperate file
1392            xmlreader.py.
1393    
1394            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
1395            file xmlwriter.py.
1396    
1397            * Thuban/Model/resource.py: Renamed functions to following the
1398            function_names_with_underscores style.
1399            (has_gdal_support): New function that returns true if the gdal
1400            library is available. Addresses RTbug #1877.
1401    
1402            * Thuban/UI/application.py (ThubanApplication.OpenSession):
1403            Display a message box if the gdal library is not available, but
1404            only if there are any layers that would use it. Addresses RTbug #1877.
1405    
1406            * Thuban/UI/classgen.py: Use renamed projection resource functions.
1407            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
1408            when using integers versus floats.
1409    
1410            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
1411            determine if the "Add Image Layer" menu option should be
1412            greyed out or not. Addresses RTbug #1877.
1413    
1414            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
1415    
1416            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
1417            optimize if a raster layer is visible. Fixes RTbug #1931.
1418            Only draw the raster layer if the gdal library is available.
1419            Addresses RTbug #1877.
1420    
1421            * test/test_classgen.py: Add tests for generate_singletons,
1422            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
1423            (test_calculate_quantiles): Fix some tests to catch the new
1424            ValueError that is raised.
1425    
1426            * test/test_proj.py: Use renamed projection resource functions.
1427    
1428            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
1429            test for saving classified layers. Fixes RTbug #1902.
1430            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
1431    
1432    2003-06-12  Jan-Oliver Wagner <[email protected]>
1433    
1434            Fix for http://intevation.de/rt/webrt?serial_num=1900.
1435    
1436            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
1437    
1438            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
1439            multiplechoicedialog.py rather than from the wxPython library.
1440    
1441    2003-06-11  Frank Koormann  <[email protected]>
1442    
1443            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
1444            update.
1445    
1446    2003-06-11  Frank Koormann  <[email protected]>
1447    
1448            * Thuban/Lib/fileutil.py (get_application_dir): New function to
1449            determine the absolute .thuban/thuban directory under
1450            "posix" (os.expanduser) and "nt" (read AppData registry key).
1451    
1452            * Thuban/Model/resource.py: Use get_application_dir
1453    
1454            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1455            Use get_application_dir.
1456    
1457    2003-06-10  Bernhard Herzog  <[email protected]>
1458    
1459            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
1460            the messages MAP_LAYERS_REMOVED messages
1461            (LayerTableFrame.OnClose): Unsubscribe from it.
1462            (LayerTableFrame.map_layers_removed): New. Receiver for
1463            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
1464            dialog is showing is removed.
1465    
1466    2003-06-10  Bernhard Herzog  <[email protected]>
1467    
1468            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
1469            of the receivers list so that unsubscribing in a receiver doesn't
1470            modify it while iterating over it.
1471    
1472            * test/test_connector.py
1473            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
1474            unsubscribing in a receiver works correctly. See docstring for
1475            details
1476    
1477    2003-06-10  Bernhard Herzog  <[email protected]>
1478    
1479            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
1480            message.
1481    
1482            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
1483            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
1484            LAYER_CHANGED will still be sent if the classification changes.
1485    
1486            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
1487            parameter so we can subscribe to some of its messages
1488            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
1489            and the layer's LAYER_SHAPESTORE_REPLACED
1490            (Classifier.unsubscribe_messages): New. Unsubscribe from message
1491            subscribed to in __init__
1492            (Classifier.map_layers_removed)
1493            (Classifier.layer_shapestore_replaced): receivers for the messages
1494            subscribed to in __init__. Unsubscribe and close the dialog
1495    
1496            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
1497            the map to the Classifier dialog
1498    
1499            * test/test_layer.py (SetShapeStoreTests): Derive from
1500            SubscriberMixin as well so we can test messages
1501            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
1502            messages
1503            (SetShapeStoreTests.tearDown): Clear the messages again
1504            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
1505            for the modified flag too
1506            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
1507            to check whether SetShapeStore sets the modified flag
1508            (SetShapeStoreTests.test_set_shape_store_different_field_name)
1509            (SetShapeStoreTests.test_set_shape_store_same_field)
1510            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
1511            Add tests for the messages. This checks both the new
1512            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
1513    
1514    2003-06-06  Jan-Oliver Wagner <[email protected]>
1515    
1516            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
1517            the menu items.
1518    
1519    2003-06-05  Frank Koormann  <[email protected]>
1520    
1521            * Thuban/UI/identifyview.py (IdentifyView.__init__):
1522            Layout reimplemented without panel. Make life easier to fit the list
1523            in the dialog.
1524    
1525    2003-06-05  Frank Koormann  <[email protected]>
1526    
1527            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
1528            once on initialisation (Former implementation resulted in multiple
1529            entries for each projection).
1530            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
1531            if set, select the projection found under the specified name. This
1532            overwrites any other selection estimate.
1533            Removed projchoice filling from this method.
1534            (ProjFrame._OnSave, ProjFrame._OnAddToList):
1535            Updated call of ProjFrame.__FillAvailList
1536            (LCCPanel._DoLayout): Moved parameter controls in more common order.
1537    
1538            * Resources/Projections/defaults.proj: Extended defaults representing
1539            various common European projections.
1540    
1541    2003-06-05  Frank Koormann  <[email protected]>
1542    
1543            * Thuban/UI/identifyview.py (IdentifyView.__init__):
1544            Use ListCtrl instead of GridCtrl
1545    
1546            * Thuban/Model/resource.py:
1547            Guess location of .thuban directory from tempdir parent directory.
1548    
1549            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1550            Guess location of .thuban directory from tempdir parent directory.
1551    
1552    2003-06-04  Bernhard Herzog  <[email protected]>
1553    
1554            Do not cache the values returned by the tree widget's
1555            GetFirstChild and GetNextChild methods because it led to lots of
1556            segfaults. The new way requires more brute force but is more
1557            reliable.
1558    
1559            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
1560            variable layer2id
1561            (LegendTree.find_layer): New method to do with brute force what
1562            layer2id tried to accomplish
1563            (LegendTree._OnMsgLayerChanged)
1564            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
1565            Use find_layer instead of layer2id
1566            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
1567            update layer2id anymore
1568            (LegendTree._OnMsgMapLayersRemoved)
1569            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
1570    
1571    2003-06-03  Thomas Koester  <[email protected]>
1572    
1573            * Thuban/Model/classgen.py (GenQuantiles0): New function.
1574    
1575    2003-06-02  Bernhard Herzog  <[email protected]>
1576    
1577            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
1578            New commands.
1579            (main_menu): Add the new commands.
1580            (MainWindow.TableRename): New. Implementation of the table_rename
1581            command.
1582            (MainWindow.RenameLayer): New. Implementation of the layer_rename
1583            command.
1584    
1585            * Thuban/Model/session.py (Session.AddTable): call self.changed to
1586            set the modified flag
1587    
1588            * test/test_session.py (TestSessionSimple.test_add_table): Test
1589            whether the modified flag is set properly
1590    
1591            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
1592            instead of issue so that the modified flags get updated.
1593    
1594            * test/test_base.py (SomeTitledObject): Derive from Modifiable
1595            instead of Publisher to reflect reality better and to accomodate
1596            the fact that SetTitle now calls changed instead of issue
1597    
1598    2003-06-02  Bernhard Herzog  <[email protected]>
1599    
1600            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
1601            acquisition has to happen before the try in a try-finally.
1602    
1603    2003-06-02  Bernhard Herzog  <[email protected]>
1604    
1605            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
1606            possible that a layer is removed that is not currently selected in
1607            the legend so don't check for this.
1608    
1609    2003-05-30  Bernhard Herzog  <[email protected]>
1610    
1611            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
1612            variables to None that have direct or indirect references to
1613            shapefiles or dbf files to make sure that they do go away and the
1614            files are closed.
1615    
1616    2003-05-30  Bernhard Herzog  <[email protected]>
1617    
1618            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
1619            availImgListIndices when a new image list is created
1620            
1621    2003-05-30  Bernhard Herzog  <[email protected]>
1622    
1623            * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
1624            changing_selection to indicate whether the LegendTree code itself
1625            is currently changing the selection
1626            (LegendTree.normalize_selection): New method to normalize the
1627            selection by selecting the layer item even if the user clicked on
1628            the classification.
1629            (LegendTree._OnSelChanged): normalize the selection. This works
1630            around a bug in wx which doesn't keep track of the selection
1631            properly when subtrees are deleted.
1632    
1633    2003-05-30  Bernhard Herzog  <[email protected]>
1634    
1635            * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
1636            maximum and minimum scale factors.
1637    
1638            * test/test_classgen.py (ClassGenTest.test): Update to reflect the
1639            changes in classgen.py
1640    
1641    2003-05-30  Jonathan Coles   <[email protected]>
1642    
1643            * Thuban/Model/classgen.py: Remove ClassGenerator class but make
1644            all the methods functions. Fixes RTBug #1903.
1645    
1646            * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
1647            to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
1648            RTBug #1907.
1649    
1650            * Thuban/UI/classgen.py: Use classgen functions that were part
1651            of the ClassGenerator class. Put try/finally blocks around
1652            code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
1653            RTBug #1904.
1654    
1655            * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
1656    
1657            * Thuban/UI/legend.py: The legend was cleared and repopulated any
1658            time something changed which caused some state to be lost such
1659            as which children were expanded or collapsed. Fixes RTBug #1901.
1660            (LegendTree._OnMsgMapLayersAdded): Add only new layers.
1661            (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
1662            the legend but not in the map.
1663            (LegendTree.__FillTree): Move main functionality out into smaller
1664            methods that can be used by other methods.
1665            (LegendTree.__FillTreeLayer): Reuse old slots in the image list
1666            if they are available.
1667            (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
1668            that we override the wxTreeCtrl method. Iterate over children
1669            and call __RemoveLayer.
1670            (LegendTree.__AddLayer): New. Add a new layer to the legend.
1671            (LegendTree.__RemoveLayer): Remove a layer from the legend.
1672            (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
1673            Should only be called with the id of a layer branch.
1674            (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
1675            Returns the root item or creates one if necessary.
1676    
1677            * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
1678            ProjectRasterFile with tuple arguments instead of strings.
1679    
1680            * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
1681            with try/finally. Fixes RTBug #1904.
1682    
1683            * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
1684            with try/finally. Fixes RTBug #1904.
1685            (MapCanvas.FitSelectedToWindow): If a single point is selected
1686            simply center it on the display. Fixes RTBug #1849.
1687    
1688            * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
1689            to be compiled as a standalone app. Now the code can only be
1690            called from Python which simplifies the parameter passing.
1691            (ProjectRasterFile): Handle Python arguments. Remove code that
1692            checks for a destination dataset. Add more clean up code.
1693    
1694            * test/test_map.py (TestMapWithContents.test_raise_layer_top,
1695            TestMapWithContents.test_lower_layer_bottom):
1696            Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
1697            Fixes RTBug #1907.
1698    
1699            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
1700            extent to the map when the legend is toggled. Fixes RTBug #1881.
1701    
1702    2003-05-29  Jan-Oliver Wagner <[email protected]>
1703    
1704            * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
1705            unsubscribes all that is subcribed in __init__.
1706    
1707    2003-05-28  Bernhard Herzog  <[email protected]>
1708    
1709            * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
1710            (MainWindow.CanDuplicateLayer): New methods to implement the
1711            Layer/Duplicate command.
1712            (layer_duplicate command): New.
1713            (main_menu): Add layer_duplicate to the Layer menu.
1714    
1715    2003-05-28  Bernhard Herzog  <[email protected]>
1716    
1717            * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
1718            renderer so that NULL/None values get displayed differently (by a
1719            gray rectangle).
1720            (TableGrid.__init__): Override the default renderers
1721    
1722    2003-05-28  Bernhard Herzog  <[email protected]>
1723    
1724            * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
1725            classification to "None" if the type of the field has changed.
1726    
1727            * test/test_layer.py (SetShapeStoreTests): New. Class with a few
1728            test for the Layer.SetShapeStore method
1729    
1730    2003-05-28  Jan-Oliver Wagner <[email protected]>
1731    
1732            * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
1733            does not necessarily have a filename).
1734    
1735    2003-05-28  Jan-Oliver Wagner <[email protected]>
1736    
1737            * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
1738            sort the selection list for the dialog.
1739    
1740    2003-05-28  Frank Koormann  <[email protected]>
1741    
1742            * extensions/thuban/wxproj.cpp
1743            (project_point): Removed cast to int for projected point coordinates.
1744            (shape_centroid): Return last point if all polygon vertices fall
1745            to one point.
1746    
1747    2003-05-28  Bernhard Herzog  <[email protected]>
1748    
1749            * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
1750            with layers that don't have shapestores, i.e. raster layers.
1751    
1752    2003-05-28  Bernhard Herzog  <[email protected]>
1753    
1754            * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
1755            when determining the title from the filename.
1756    
1757            * test/test_dbf_table.py (TestDBFTable.test_title): Update to
1758            reflect changes in the way the title is derived from the filename
1759    
1760    2003-05-28  Frank Koormann  <[email protected]>
1761    
1762            * Thuban/UI/mainwindow.py (MainWindow.TableShow):
1763            Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
1764    
1765    2003-05-27  Bernhard Herzog  <[email protected]>
1766    
1767            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
1768            delegate SelectedLayer.
1769            (MainWindow.LayerUnjoinTable): Implement.
1770            (_can_unjoin): New. Helper function for the sensitivity of the
1771            layer/unjoin command.
1772    
1773            * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
1774            (DerivedShapeStore.OrigShapeStore): New. Return the original
1775            shapestore. Used to figure out how to unjoin.
1776            (DerivedShapeStore.Shapefile): Fix a typo.
1777    
1778    2003-05-27  Bernhard Herzog  <[email protected]>
1779    
1780            * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
1781            well
1782            (JoinDialog.__init__): Use the layer parameter and only build the
1783            left choice when a layer is given
1784            (JoinDialog.OnJoin): Handle layer joins as well
1785            (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
1786            that the user selects the "Select..." item. The sensitivitly
1787            updating is now in update_sensitivity
1788            (JoinDialog.y): New method to refactor the sensitivity update of
1789            the join button into its own method.
1790    
1791            * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
1792    
1793    2003-05-27  Bernhard Herzog  <[email protected]>
1794    
1795            * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
1796            iff there are unreferenced tables in the session
1797    
1798    2003-05-27  Bernhard Herzog  <[email protected]>
1799    
1800            * Thuban/Model/messages.py (TABLE_REMOVED): New message.
1801    
1802            * Thuban/Model/session.py (Session.UnreferencedTables): New method
1803            to return tables that are not referenced by other tables or shape
1804            stores and can be removed.
1805            (Session.RemoveTable): Issue a TABLE_REMOVED message after
1806            removing the table
1807    
1808            * Thuban/UI/mainwindow.py: Remove unused imports
1809            (MainWindow.TableClose): Implement.
1810    
1811            * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
1812            messages so that the frame will be automatically closed when a new
1813            session is opened or the table is removed.
1814            (TableFrame.OnClose): Unsubscribe the Subscriptions made in
1815            __init__
1816            (TableFrame.close_on_session_replaced)
1817            (TableFrame.close_on_table_removed): New. Subscribers that close
1818            the window
1819    
1820            * test/test_session.py (TestSessionMessages.test_remove_table)
1821            (TestSessionSimple.test_remove_table): Move the test to
1822            TestSessionSimple and add test for the TABLE_REMOVED message
1823            (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
1824            (TestSessionSimple.test_unreferenced_tables) New. Test for the
1825            UnreferencedTables method.
1826            (UnreferencedTablesTests): New. Class with some more sophisticated
1827            tests for UnreferencedTables.
1828    
1829    2003-05-27  Frank Koormann  <[email protected]>
1830    
1831            * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
1832            display has some unwanted side effects. Removed again.
1833    
1834    2003-05-27  Frank Koormann  <[email protected]>
1835    
1836            * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
1837    
1838            * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
1839    
1840    2003-05-27  Jan-Oliver Wagner <[email protected]>
1841    
1842            * test/test_menu.py (MenuTest.test): Added test for
1843            Menu.RemoveItem().
1844    
1845            * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
1846            the menu.
1847    
1848    2003-05-27  Frank Koormann  <[email protected]>
1849            
1850            Nonmodal dialogs without parent (i.e. they can fall behind the main
1851            window)
1852    
1853            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
1854            all dialogs in the dialogs dictionary and the canvas.
1855    
1856            * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
1857            parent, i.e. can fall behind other windows.
1858            (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
1859            dictionary before removing it.
1860    
1861            * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
1862    
1863            * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
1864            * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
1865            * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
1866    
1867    2003-05-27  Bernhard Herzog  <[email protected]>
1868    
1869            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
1870            tableview dialog
1871            (MainWindow.TableShow): Use ShowTableView to open the dialogs.
1872            Also, don't use the table's titles as the dialog names. The titles
1873            aren't guaranteed to be unique.
1874            (MainWindow.TableOpen): Open a table view dialog after opening the
1875            table
1876    
1877    2003-05-27  Bernhard Herzog  <[email protected]>
1878    
1879            * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
1880            effect can be achieved by simply closing the window showing the
1881            table.
1882            (MainWindow.TableHide): Removed.
1883            (main_menu): Removed "table_hide"
1884    
1885    2003-05-27  Frank Koormann  <[email protected]>
1886    
1887            Fix legend tree display problems under Win32
1888    
1889            * Thuban/UI/legend.py:  BMP_SIZE_W = 15
1890            (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
1891            (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
1892    
1893            * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
1894    
1895    2003-05-27  Jan-Oliver Wagner <[email protected]>
1896    
1897            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
1898            'after' now allows to insert separators almost anywhere in the menu.
1899    
1900    2003-05-27  Frank Koormann  <[email protected]>
1901    
1902            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
1903            "S" of selection box label to hint on hot key (Alt-S). Works under
1904            Win32 but is ignored under GTK.
1905    
1906    2003-05-26  Frank Koormann  <[email protected]>
1907    
1908            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
1909            Center Choices.
1910    
1911    2003-05-26  Bernhard Herzog  <[email protected]>
1912    
1913            Remove the Precision methods again. They're too DBF specific to be
1914            part of the table interface and they're only used in table_to_dbf
1915            anyway.
1916            
1917            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
1918            fixed precision of 12 for doubles.
1919            (TransientTableBase.Precision): Removed
1920            (AutoTransientTable.Width): Delegate to self.table.
1921    
1922            * Thuban/Model/table.py (DBFTable.Precision)
1923            (MemoryTable.Precision): Removed.
1924            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
1925            (table_to_dbf): Use a fixed precision of 12 for floats unless the
1926            column object specifies something else.
1927    
1928            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
1929            test for table_to_dbf
1930    
1931    2003-05-26  Bernhard Herzog  <[email protected]>
1932    
1933            * test/test_transientdb.py
1934            (TestTransientTable.run_iceland_political_tests): Fix a comment.
1935    
1936    2003-05-26  Bernhard Herzog  <[email protected]>
1937    
1938            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
1939            implementation. Mark parts of the file format strings for
1940            localization.
1941    
1942            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
1943            file and add the table to the tables managed by the session
1944    
1945            * test/test_session.py (TestSessionSimple.test_open_table_file):
1946            New. test case for OpenTableFile
1947    
1948    2003-05-26  Jan-Oliver Wagner <[email protected]>
1949    
1950            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
1951            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
1952            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
1953            Replace the true/false of wxWindows by True/False of Python 2.2.1.
1954    
1955    2003-05-26  Jan-Oliver Wagner <[email protected]>
1956    
1957            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
1958            already a selection present, update the grid accordingly.
1959    
1960            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
1961            resizeable and increase its initial size.
1962    
1963    2003-05-26  Frank Koormann  <[email protected]>
1964    
1965            Table export functionality
1966    
1967            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
1968            Return width (in characters) for a column.
1969            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
1970            (table_to_dbf): Write table to dbf file.
1971            (table_to_csv): Write table to csv file.
1972    
1973            * Thuban/Model/transientdb.py (TransientTableBase.Width,
1974            TransientTableBase.Precision): Return column width and precision.
1975    
1976            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
1977            or table_to_csv depending on file selection.
1978    
1979            * test/test_dbf_table.py:
1980            Test table_to_dbf (extension of former part of test).
1981    
1982            * test/test_csv_table.py:
1983            Test table_to_csv.
1984    
1985    2003-05-23  Jan-Oliver Wagner <[email protected]>
1986    
1987            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
1988            Use QueryTableFrame instead of TableFrame.
1989    
1990            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
1991            table window with 'Layer Table:' instead of 'Table:'.
1992    
1993    2003-05-23  Jan-Oliver Wagner <[email protected]>
1994    
1995            Give all tables a title via mix-in TitledObject.LayerShowTable
1996    
1997            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
1998            only if it exists.
1999    
2000            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
2001            and call its init-method with a default title. Remove Title() method.
2002    
2003            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
2004            AutoTransientTable): mix-in TitledObject and call its init-method with
2005            a default title. Remove Title() method.
2006    
2007    2003-05-23  Bernhard Herzog  <[email protected]>
2008    
2009            * Thuban/Model/session.py (Session.AddShapeStore): Define
2010            AddShapeStore analogously to AddTable.
2011    
2012            * test/test_session.py (TestSessionSimple.test_add_shapestore):
2013            New. Test for AddShapeStore
2014    
2015    2003-05-23  Jan-Oliver Wagner <[email protected]>
2016    
2017            Introducing QueryTableFrame and a very coarse ShowTable implementation.
2018    
2019            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
2020            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
2021            The latter implements the selection GUI without dependency on a layer.
2022            LayerTableFrame now is derived from QueryTableFrame and connects
2023            to a layer.
2024    
2025            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
2026            implementation that still needs work.
2027    
2028            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
2029    
2030    2003-05-22  Frank Koormann  <[email protected]>
2031    
2032            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
2033            Added "outer_join = False" as optional parameter.
2034            (TransientJoinedTable.create): If outer join is true, perform a
2035            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
2036            the left table. Records not matching are filled with 0 / None.
2037    
2038            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
2039            (JoinDialog.OnJoin): Consider outer join check box.
2040    
2041    2003-05-22  Bernhard Herzog  <[email protected]>
2042    
2043            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
2044            somewhat safer way. Storing the traceback in a local variable can
2045            lead to memory leaks
2046    
2047    2003-05-22  Bernhard Herzog  <[email protected]>
2048    
2049            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
2050            the wxMessageDialog's Destroy() method.
2051    
2052    2003-05-22  Frank Koormann  <[email protected]>
2053    
2054            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
2055            TransientTable.Title()
2056    
2057    2003-05-22  Frank Koormann  <[email protected]>
2058    
2059            Join Dialog, initial version.
2060    
2061            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
2062    
2063            * Thuban/UI/join.py (JoinDialog): Functional implementation of
2064            former framework. Renamed Table1/Table2 to LeftTable/RightTable
2065            in all occurences.
2066    
2067            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
2068            Typo fixed.
2069    
2070    2003-05-22  Bernhard Herzog  <[email protected]>
2071    
2072            Give the tables titles so that the GUI can display more meaningful
2073            names. For now the titles are fixed but depend on e.g. filenames
2074            or the titles of the joined tables.
2075    
2076            * Thuban/Model/transientdb.py (TransientTable.Title)
2077            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
2078    
2079            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
2080    
2081            * test/test_transientdb.py
2082            (TestTransientTable.test_auto_transient_table_title): New. Test
2083            for the Title method
2084            (TestTransientTable.test_transient_joined_table)
2085            (TestTransientTable.test_transient_table): Add test for the Title
2086            methods
2087    
2088            * test/test_memory_table.py (TestMemoryTable.test_title): New.
2089            Test for the Title method
2090    
2091            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
2092            the Title method
2093    
2094    2003-05-22  Bernhard Herzog  <[email protected]>
2095    
2096            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
2097            Provide a better way to destroy the layers
2098            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
2099            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
2100            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
2101            the new way to destroy the layers.
2102            (TestLayer.test_derived_store): New. Test for using a layer with a
2103            DerivedShapeStore
2104    
2105            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
2106            filename if the shape store actually has one.
2107    
2108    2003-05-22  Bernhard Herzog  <[email protected]>
2109    
2110            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
2111            for the filename
2112    
2113            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
2114            for the FileName method
2115            (TestDBFTableWriting.test_write): Fix spelling of filename
2116    
2117    2003-05-22  Thomas Koester  <[email protected]>
2118    
2119            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
2120            from SciParam that now really is immutable.
2121    
2122    2003-05-22  Frank Koormann  <[email protected]>
2123    
2124            Layer Top/Bottom placement added to legend.
2125    
2126            * Thuban/UI/legend.py
2127            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
2128            bound to tool events.
2129            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
2130            New, methods binding the event methods with the map methods.
2131    
2132            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
2133            layer at top/bottom of layer stack.
2134    
2135            * Resources/Bitmaps/top_layer.xpm: New button icon.
2136    
2137            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
2138    
2139    2003-05-22  Bernhard Herzog  <[email protected]>
2140    
2141            * Thuban/Model/session.py (Session.RemoveTable): New method to
2142            remove tables
2143    
2144            * test/test_session.py (TestSessionSimple.test_remove_table): New.
2145            Test for RemoveTable
2146    
2147    2003-05-22  Thomas Koester  <[email protected]>
2148    
2149            * Thuban/Model/classgen.py: Added short module doc string and CVS id.
2150            (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
2151    
2152    2003-05-22  Bernhard Herzog  <[email protected]>
2153    
2154            Implement a way to discover dependencies between tables and
2155            shapestores.
2156    
2157            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
2158            (TransientJoinedTable.Dependencies)
2159            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
2160            interface
2161            (TransientJoinedTable.__init__): Keep tack of the original table
2162            objects in addition to the corresponding transient tables.
2163    
2164            * Thuban/Model/table.py (DBFTable.Dependencies)
2165            (MemoryTable.Dependencies): New. Implement the dependencies
2166            interface
2167    
2168            * Thuban/Model/data.py (ShapeTable): New. Helper class for
2169            ShapefileStore
2170            (ShapefileStore.__init__): Use ShapeTable instead of
2171            AutoTransientTable
2172            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
2173            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
2174            methods for filename and type
2175            (ShapefileStore.Dependencies): New. Implement the dependencies
2176            interface
2177            (DerivedShapeStore): New class to replace SimpleStore. The main
2178            difference to SimpleStore is that it depends not on a shapefile
2179            but another shapestore which expresses the dependencies a bit
2180            better
2181            (SimpleStore.__init__): Add deprecation warning.
2182    
2183            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
2184            Test for the Dependencies method.
2185    
2186            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
2187            New. Test for the Dependencies method.
2188    
2189            * test/test_transientdb.py
2190            (TestTransientTable.test_auto_transient_table_dependencies): New.
2191            Test for the Dependencies method.
2192            (TestTransientTable.test_transient_joined_table): Add test for the
2193            Dependencies method.
2194    
2195            * test/test_session.py (TestSessionSimple.setUp)
2196            (TestSessionSimple.tearDown): New. Implement a better way to
2197            destroy the sessions.
2198            (TestSessionSimple.test_initial_state)
2199            (TestSessionSimple.test_add_table): Bind session to self.session
2200            so that it's destroyed by tearDown
2201            (TestSessionSimple.test_open_shapefile): New. Test for
2202            OpenShapefile and the object it returns
2203    
2204    2003-05-22  Bernhard Herzog  <[email protected]>
2205    
2206            * Thuban/Model/session.py (Session.AddTable): New method to
2207            register tables with the session.
2208            (Session.Tables): Return the tables registered with AddTable too.
2209    
2210            * test/test_session.py (TestSessionSimple.test_add_table): New.
2211            Test case for the AddTable method
2212    
2213    2003-05-22  Frank Koormann  <[email protected]>
2214    
2215            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
2216            lower right corner, center labels for selections, initialize controls
2217            in reasonable order for keyboard navigation.
2218    
2219            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
2220            (ProjFrame.__DoOnProjAvail): Determine position of current projection
2221            using the wxListBox.FindString() method. Still a problem (#1886)
2222    
2223            * Thuban/UI/classifier.py
2224            (Classifier.__init__, SelectPropertiesDialog.__init__)
2225    
2226            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
2227            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
2228            different classification types from here to __init__.
2229            (GenUniquePanel.__init__): Set the column width of the first field
2230            in the Field ListCtrl to the full width.
2231    
2232            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
2233            Button to 'Export'. Center Buttons in Selection Box, set Focus to
2234            Grid.
2235            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
2236            changes focus to the Selection when pressing "Alt-S".
2237    
2238            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
2239            the text if not visible. The italic font sometimes exceeds the
2240            rendering area.
2241    
2242    2003-05-21  Jonathan Coles   <[email protected]>
2243    
2244            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
2245            to OnClose so that Thuban closes correctly.
2246    
2247            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
2248            DockFrame.OnClose, not DockFrame._OnClose.
2249    
2250    2003-05-21  Jonathan Coles   <[email protected]>
2251    
2252            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
2253            references to 'inf' and use new Range __init__ to pass floats
2254            directly rather than converting them to strings first.
2255            Fixes RTBug #1876.
2256    
2257            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
2258            Use new Range ___init__ to pass floats.
2259    
2260            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
2261            filename is a valid image file. Throw IOError otherwise.
2262    
2263            * Thuban/Model/range.py: Brought over new Range from SciParam that
2264            is immutable and has an __init__ which can accept floats.
2265    
2266            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
2267            into try block. AddLayer doesn't throw any exceptions anymore.
2268            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
2269            try block.
2270    
2271            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
2272            the first item in choices. Fixes RTBug #1882.
2273    
2274            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
2275            has gone to 0 which is a serious problem. abort.
2276            (MapRenderer.draw_raster_layer): Catch IOError seperately and
2277            print the error from GDAL.
2278    
2279            * Thuban/UI/tableview.py (TableGrid.__init__): Call
2280            ToggleEventListeners to turn on listening.
2281            (TableGrid.ToggleEventListeners): New. Turns event listening on
2282            and off so as to prevent excessive messages.
2283            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
2284            to suppress excessive messages when selecting many rows.
2285            Fixes RTBug #1880.
2286    
2287            * Thuban/UI/view.py: Added checks against if scale == 0. This
2288            is a serious problem that can occur when an image without
2289            geo data is loading and causes the map projection bounds to
2290            go to infinity. Right now, the solution is to simply try
2291            to recover.
2292    
2293            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
2294            to set the MFILEReceiver attributes even if the data is NULL.
2295    
2296            * extensions/thuban/gdalwarp.cpp: Improved the error handling
2297            and passed GDAL messages back up to the Python layer. Also
2298            tried to fix some memory leaks that were present in the original
2299            utility but didn't matter because the program aborted.
2300    
2301            * test/test_range.py: Copied over tests from SciParam. Removed
2302            tests against importing. Fixes RTBug #1867.
2303    
2304    2003-05-21  Bernhard Herzog  <[email protected]>
2305    
2306            * test/test_load.py: Remove unused imports and restructure the
2307            test code
2308            (LoadSessionTest): Split into one class for each test and turn
2309            LoadSessionTest itself into the base class for all such session
2310            tests.
2311            (ClassificationTest): New base class for load tests that test
2312            classifications
2313            (TestSingleLayer, TestLayerVisibility, TestClassification)
2314            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
2315            for the individual tests
2316    
2317            * test/support.py (FileLoadTestCase.filename): New base class for
2318            file loading tests
2319    
2320    2003-05-21  Jan-Oliver Wagner <[email protected]>
2321    
2322            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
2323            Mercator' to 'UTM Zone 32' as a more convenient example.
2324            Added 'Gauss Krueger Zone 6'.
2325    
2326            * Data/iceland_sample_raster.thuban: political polygon now
2327            filled transparent to have the raster image visible at once.
2328    
2329    2003-05-21  Frank Koormann  <[email protected]>
2330    
2331            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
2332            OnClose() to keep in sync with extensions. Internally Thuban
2333            still uses "underscored" names.
2334    
2335    2003-05-20  Jonathan Coles   <[email protected]>
2336    
2337            This puts back Raster layer support. These layers support projections
2338            through the GDAL library. Currently, the CVS version is being used.
2339            There are no Debian packages available although this may change soon.
2340            A GDAL driver was extended to support writing to memory rather to
2341            files.
2342    
2343            There is still some work that needs to be done, such as some error
2344            handling when loading invalid images or when there is a problem
2345            projecting the image. This putback simply checks in the majority
2346            of the work.
2347    
2348            * setup.py: Add gdalwarp library extension.
2349    
2350            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
2351            Defaults to False, but can be overridden by subclasses if they
2352            support classification.
2353            (RasterLayer): New. Defines a new layer that represents an
2354            image.
2355    
2356            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
2357            tag handler.
2358            (SessionLoader.start_layer): Encode the filename.
2359            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
2360            New. Supports reading a rasterlayer tag.
2361    
2362            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
2363    
2364            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
2365            get a string in Latin1. If we get such as string convert it to
2366            unicode first, otherwise leave if alone before encoding.
2367            (SessionSaver.write_layer): Add support for writing both Layers
2368            and RasterLayers.
2369    
2370            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
2371            The right argument may not be a string, it could also be a Column.
2372    
2373            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
2374            Make initial window size 600x400. Fixes RTBug #1872.
2375    
2376            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
2377            the dialog is constructed so that we can support layers that
2378            do not have classifications.
2379            (Classifier._OnTry): Only build a classification if the layer
2380            supports one.
2381    
2382            * Thuban/UI/legend.py: Change all checks that a layer is an
2383            instance of Layer into checks against BaseLayer.
2384            (LegendTree.__FillTreeLayer): Only add children to a branch if
2385            the layer supports classification.
2386    
2387            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
2388            MainWindow.OpenSession): Don't proceed with an action if the
2389            user chooses Cancel when they are asked to save changes.
2390            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
2391            user to select an image file. Create a new RasterLayer and add
2392            it to the map.
2393    
2394            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
2395            for rendering RasterLayer layers.
2396            (MapRenderer.draw_raster_layer): Actually method that calls
2397            the GDALWarp python wrapper and constructs an image from the
2398            data returned.
2399    
2400            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
2401            Choices symbols to match those used in the table query method.
2402            Replace deprecated method calls on table with new method names.
2403    
2404            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
2405            how small the scale can get. This still needs more testing.
2406    
2407            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
2408            Provides a driver to output in .bmp format.
2409    
2410            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
2411            New. Provides IO routines which write to memory, rather than a file.
2412    
2413            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
2414            of the gdalwarp utility provided in GDAL. Added function calls
2415            that can be accessed from python.
2416    
2417            * Data/iceland_sample_raster.thuban: New. Sample file that uses
2418            a raster layer.
2419    
2420            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
2421            layer image data.
2422    
2423            * Doc/thuban.dtd: Added rasterlayer attribute definition.
2424    
2425            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
2426            tests associated with the raster layer code.
2427    
2428            * test/test_transientdb.py
2429            (TestTransientTable.test_auto_transient_table_query): Added a test
2430            for using a Column object as the "right" parameter to a query.
2431    
2432    2003-05-19  Frank Koormann  <[email protected]>
2433    
2434            * Thuban/version.py (get_changelog_date):
2435            Catch exceptions if ChangeLog does not exist.
2436    
2437            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
2438    
2439  2003-05-19  Frank Koormann  <[email protected]>  2003-05-19  Frank Koormann  <[email protected]>
2440    
2441          Extended version information for Thuban          Extended version information for Thuban

Legend:
Removed from v.924  
changed lines
  Added in v.1465

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26