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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26