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

Legend:
Removed from v.776  
changed lines
  Added in v.1479

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26