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

Legend:
Removed from v.762  
changed lines
  Added in v.1453

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26