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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26