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

Legend:
Removed from v.803  
changed lines
  Added in v.1540

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26