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

Legend:
Removed from v.766  
changed lines
  Added in v.1455

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26