/[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 988 by bh, Thu May 22 16:46:23 2003 UTC revision 1561 by bh, Thu Aug 7 17:45:58 2003 UTC
# Line 1  Line 1 
1    2003-08-07  Bernhard Herzog  <[email protected]>
2    
3            Add raw data interface to shape objects.
4    
5            * Thuban/Model/data.py (ShapefileShape, Shape): Rname the shape
6            class to ShapefileShape which now holds shapefile specific
7            information.
8            (ShapefileShape.compute_bbox): Simplified to not cache any
9            information. The way this method is used that shouldn't matter
10            performance wise.
11            (ShapefileShape.RawData): New. Return the shapeid which is the raw
12            data format for shapes from shapefiles.
13            (ShapefileStore.RawShapeFormat): New. Return the raw datatype used
14            in the shape objects returned by a shapestore. For a
15            ShapefileStore this is always RAW_SHAPEFILE.
16            (RAW_PYTHON, RAW_SHAPEFILE): Constants for the RawShapeFormat
17            method.
18    
19            * test/test_shapefilestore.py
20            (TestShapefileStore.test_raw_format): New test to test the raw
21            format feature of shapes.
22    
23            * Thuban/Model/layer.py: Remove the unused import of Shape from
24            data. It was only there for interface compatibility but it's not
25            used inside of Thuban and the generic Shape class has gone away.
26    
27    2003-08-07  Bernhard Herzog  <[email protected]>
28    
29            * test/test_baserenderer.py (SimpleShape): Shape class for the
30            tests.
31            (SimpleShapeStore.Shape): Use SimpleShape instead of
32            Thuban.Model.data.Shape to make the tests independed of the coming
33            changes.
34    
35    2003-08-07  Bernhard Herzog  <[email protected]>
36    
37            * test/support.py (SkipTest, ThubanTestResult, ThubanTestRunner)
38            (ThubanTestProgram): New classes that extend the respective
39            classes from unittest. These new version support skipping tests
40            under certain expected conditions. In the Thuban test suite we
41            uses this for tests that require the optional gdal support.
42            (run_tests): Use ThubanTestProgram instead of the unittest.main()
43    
44            * test/runtests.py (main): Use the new ThubanTestRunner instead of
45            the normal one from unittest
46    
47            * test/test_layer.py (TestLayer.test_raster_layer): If this test
48            is not run because gdal support isn't available report this to the
49            runner.
50    
51            * test/test_baserenderer.py
52            (TestBaseRenderer.test_raster_no_projection): Do not run this test
53            if gdal support isn't available and report this to the runner.
54    
55    2003-08-06  Bernhard Herzog  <[email protected]>
56    
57            Rearrange the renderers a bit, partly in preparation for changes
58            required for the postgis merge, partly to make it more testable.
59            Also make the representation of coordinates in Shapes more
60            consistent.
61    
62            * Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
63            this class is now in BaseRenderer. This class is now practically
64            only a specialization of BaseRenderer for rendering to an actual
65            wx DC.
66            (ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
67            to get the shapetype specific rendering functions.
68    
69            * Thuban/UI/baserenderer.py: New file with the basic rendering
70            logic. The code in this file is completely independend of wx.
71            (BaseRenderer): Class with the basic rendering logic
72    
73            * test/test_baserenderer.py: New. Test cases for BaseRenderer
74    
75            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
76            error_on_redraw to guard agains endless loops and stack overflows
77            when there's a bug in the rendering code that raises exceptions.
78            (MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
79            rendering into a separate method _do_redraw so that error handling
80            is a bit easier. When an exception occurs, set error_on_redraw to
81            true. When it's true on entry to OnIdle do nothing and return
82            immediately.
83    
84            * Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a
85            Shape object will always have the coordinates as a list of list of
86            coordinate pairs (tuples).
87            (Shape.compute_bbox): Adapt to new representation.
88    
89            * Thuban/UI/viewport.py (ViewPort.find_shape_at)
90            (ViewPort.LabelShapeAt): Adapt to new coordinate representation in
91            Shape objects.
92    
93            * test/test_shapefilestore.py
94            (ShapefileStoreTests.assertFloatTuplesEqual)
95            (ShapefileStoreTests.assertPointListEquals): Rename to
96            assertPointListEquals and change purpose to checking equality of
97            the lists returned by Shape.Points().
98            (TestShapefileStoreArc.test_shape)
99            (TestShapefileStorePolygon.test_shape)
100            (TestShapefileStorePoint.test_shape): Use the new
101            assertPointListEquals instead of assertFloatTuplesEqual
102    
103            * test/test_layer.py (TestLayer.assertFloatTuplesEqual)
104            (TestLayer.assertPointListEquals): Rename to assertPointListEquals
105            and change purpose to checking equality of the lists returned by
106            Shape.Points().
107            (TestLayer.test_arc_layer, TestLayer.test_arc_layer)
108            (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
109            (TestLayer.test_derived_store): Use the new assertPointListEquals
110            instead of assertFloatTuplesEqual
111    
112            * test/test_derivedshapestore.py
113            (TestDerivedShapeStore.assertFloatTuplesEqual)
114            (TestDerivedShapeStore.assertPointListEquals): Rename to
115            assertPointListEquals and change purpose to checking equality of
116            the lists returned by Shape.Points().
117            (TestDerivedShapeStore.test_shape): Use the new
118            assertPointListEquals instead of assertFloatTuplesEqual
119    
120    2003-08-06  Jan-Oliver Wagner <[email protected]>
121    
122            * Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for
123            a bounding box. A dialog is raised in case, no bounding box
124            is found. This fixes bug #2043:
125            https://intevation.de/rt/webrt?serial_num=2043
126    
127    2003-08-05  Bernhard Herzog  <[email protected]>
128    
129            * Thuban/Model/color.py (Color.__repr__): Make the repr of a color
130            object look like a Color instantiation. Formerly it looked like a
131            tuple.
132    
133            * test/test_color.py (TestColor.test_repr)
134            (TestColor.test_equality, TestColor.test_inequality): New. test
135            some more apects of the Color class
136            (TestTransparent.test_repr, TestTransparent.test_hex)
137            (TestTransparent.test_equality): New. Test cases for the
138            Transparent object.
139    
140    2003-08-04  Jan-Oliver Wagner <[email protected]>
141    
142            * Doc/manual/thuban-manual.xml: a number of small improvements.
143            The resulting file is the version submitted for GREAT-ER II.
144    
145    2003-08-01  Bernhard Herzog  <[email protected]>
146    
147            * Thuban/UI/resource.py, Thuban/UI/projdialog.py,
148            Thuban/UI/join.py, Thuban/UI/classgen.py, Thuban/UI/about.py,
149            Thuban/Model/resource.py: Insert cvs keywords and doc-strings.
150    
151            * Thuban/UI/common.py: Insert cvs keywords and doc-strings.
152            (Color2wxColour, wxColour2Color, ThubanBeginBusyCursor)
153            (ThubanEndBusyCursor): Add doc-strings
154    
155    2003-08-01  Bernhard Herzog  <[email protected]>
156    
157            First step towards PostGIS integration. More abstraction by movin
158            more code from the layer to the shapestore. More methods of the
159            layer are now simply delegated to the equivalent method of the
160            shapestore. The SHAPETYPE_* constants are now in data not in
161            layer.
162    
163            * Thuban/Model/data.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
164            (SHAPETYPE_POINT, Shape): Move these constants and classes from
165            layer.py to data.py
166            (ShapefileStore.__init__): More Initialization for the new methods
167            and functionality.
168            (ShapefileStore.ShapeType, ShapefileStore.NumShapes)
169            (ShapefileStore.BoundingBox, ShapefileStore.ShapesInRegion)
170            (ShapefileStore.Shape): New methods that were formerly implemented
171            in the layer.
172            (DerivedShapeStore.Shape, DerivedShapeStore.ShapesInRegion)
173            (DerivedShapeStore.ShapeType, DerivedShapeStore.NumShapes)
174            (DerivedShapeStore.BoundingBox): New. DerivedShapeStore
175            equivalents of the new shape methods. These versions are simply
176            delegated to the original shapstore.
177    
178            * Thuban/Model/layer.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
179            (SHAPETYPE_POINT, Shape): Removed. They're now in data.py
180            (Layer.SetShapeStore): Removed the initializatin of instance
181            variables that were needed for the stuff that's now in
182            ShapefileStore
183            (Layer.BoundingBox, Layer.NumShapes, Layer.ShapeType)
184            (Layer.Shape, Layer.ShapesInRegion): Simply delegate to the
185            shapestore.
186    
187            * Thuban/UI/classifier.py, Thuban/UI/renderer.py,
188            Thuban/UI/viewport.py: Import the SHAPETYPE_* constants from data
189            instead of layer.
190    
191            * test/test_shapefilestore.py: New. Tests for ShapefileStore.
192    
193            * test/test_derivedshapestore.py: New. Tests for DerivedShapeStore.
194    
195            * test/test_layer.py: Import the SHAPETYPE_* constants from data
196            instead of layer.
197            (TestLayer.test_derived_store): Remove the test for the exception
198            when instantiating the DerivedShapeStore with an incompatible
199            table which is now in test_derivedshapestore.py. Add some more
200            tests of the layer methods to determine whether they work for a
201            DerivedShapeStore as well.
202    
203    2003-07-31  Jonathan Coles   <[email protected]>
204    
205            * Doc/manual/thuban-manual.xml: Fix the list of required packages
206            by just listing the name and where they can be found.
207    
208    2003-07-31  Frank Koormann   <[email protected]>
209    
210            * Doc/manual/thuban-manual.xml:
211            Changed the screenshot elements to figure.
212            Changed some variablelist elements to itemizedlist.
213            Added section on GDAL formats.
214    
215    2003-07-31  Jonathan Coles   <[email protected]>
216    
217            * Doc/manual/thuban-manual.xml: Added a few sentences about
218            the Fix Border Color option when generating classes.
219    
220    2003-07-30  Jonathan Coles   <[email protected]>
221    
222            * Thuban/Model/classgen.py: Add docstrings. Rename specific
223            Ramp instances to use lower_case_style.
224    
225            * Thuban/UI/classgen.py: Use renamed Ramp instances.
226            
227            * Thuban/UI/classifier.py: Add docstrings.
228    
229            * Thuban/UI/dock.py: Add docstrings.
230    
231            * test/test_classgen.py: Use renamed Ramp instances.
232    
233    2003-07-30  Bernhard Herzog  <[email protected]>
234    
235            * Thuban/Lib/connector.py (QueueingPublisher): Removed. This class
236            was never used in Thuban.
237    
238    2003-07-30  Bernhard Herzog  <[email protected]>
239    
240            * Thuban/UI/join.py (JoinDialog.__init__): Use the table's Title()
241            method directly instead of going through the transient_table
242            method. This faster because transient_table may force the copy of
243            a DBF file into the transient database and setting a table's title
244            doesnm't affect the title of the associated transient table, so
245            this fixes RT #2042
246    
247            * Thuban/UI/main.py (__version__): Don't import the already
248            removed show_exception_dialog.
249    
250    2003-07-29  Jonathan Coles   <[email protected]>
251    
252            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
253            Put back this method and remove the equivalent function since we
254            are setting the exception hook from within this class (OnInit).
255    
256    2003-07-29  Jonathan Coles   <[email protected]>
257    
258            * Doc/manual/images/5_2_custom_ramp.png,
259            Doc/manual/images/5_2_quantiles.png,
260            Doc/manual/images/5_2_uniform_dist.png,
261            Doc/manual/images/5_2_unique_values.png,
262            Doc/manual/images/8_int_error.png: New screen shots.
263    
264            * Doc/manual/thuban-manual.xml: Fixed typos and wording, clarified
265            some points, and added more screen shots.
266    
267    2003-07-29  Bernhard Herzog  <[email protected]>
268    
269            * Thuban/Model/data.py: Remove the now unused import of warnings
270    
271    2003-07-29  Bernhard Herzog  <[email protected]>
272    
273            * Thuban/Model/data.py (SimpleStore): Removed. This class has been
274            deprecated since before the 0.8 release and isn't used in Thuban
275            itself anymore.
276    
277            * Thuban/Model/transientdb.py: Remove some unnecessary imports
278    
279    2003-07-29  Jonathan Coles   <[email protected]>
280    
281            * Thuban/UI/application.py (ThubanApplication.OnInit): set the
282            python exception hook here so that we are sure to catch any
283            Thuban exception that happen during initialization.
284    
285            * Thuban/UI/main.py (main): Don't set the exception hook here,
286            it will get set in ThubanApplication.OnInit.
287    
288    2003-07-29  Jonathan Coles   <[email protected]>
289                                                                                
290            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
291            Removed and called it show_exception_dialog() so that the exception
292            handler can be set before the class is created.
293                                                                                
294            * Thuban/UI/main.py (main): Install the exception handler before
295            a ThubanApplication is created.
296                                                                                    
297    2003-07-29  Bernhard Herzog  <[email protected]>
298    
299            * po/it.po: New. Italian translation by Maurizio Napolitano
300    
301            * po/ru.po: New. Russian translation by Alex Shevlakov
302    
303    2003-07-29  Frank Koormann   <[email protected]>
304    
305            * Doc/manual/thuban-manual.xml: Extended section on supported
306            projections.
307            
308    2003-07-29  Frank Koormann   <[email protected]>
309    
310            * Doc/manual/thuban-manual.xml: gaspell-checked.
311    
312    2003-07-29  Jonathan Coles   <[email protected]>
313    
314            * Doc/manual/images/3_5_legend.png: Added border to improve look
315            on white background.
316    
317    2003-07-29  Jonathan Coles   <[email protected]>
318    
319            * Doc/manual/thuban-manual.xml: Fixed grammar and typos. Added
320            descriptions for the legend toolbar.
321    
322            * Doc/manual/images/4_2_raster_layer_properties.png: Removed
323            cursor from dialog box.
324    
325    2003-07-28  Jonathan Coles   <[email protected]>
326    
327            * Doc/manual/thuban-manual.xml: More screenshots and more chapters.
328    
329            * Doc/manual/images/2_4_session_tree.png,
330            Doc/manual/images/3_5_legend.png, Doc/manual/images/3_rename_map.png,
331            Doc/manual/images/4_2_layer_properties.png,
332            Doc/manual/images/4_2_raster_layer_properties.png,
333            Doc/manual/images/5_3_genclass.png,
334            Doc/manual/images/5_classification.png,
335            Doc/manual/images/6_projection.png,
336            Doc/manual/images/7_1_table_view.png,
337            Doc/manual/images/7_2_5_join.png: New screenshots.
338    
339    2003-07-24  Jonathan Coles   <[email protected]>
340    
341            * Doc/manual/thuban-manual.xml: Chapter on Projection Management.
342    
343    2003-07-24  Jonathan Coles   <[email protected]>
344    
345            * Doc/manual/thuban-manual.xml: Added EPS images and wrote
346            chapter on Layer Management.
347    
348            * Doc/manual/Makefile: New. Makefile to generate all formats for the
349            manual and images.
350    
351    2003-07-24  Bernhard Herzog  <[email protected]>
352    
353            * Thuban/Model/range.py, Thuban/version.py: Remove the #! line as
354            it annoys lintian which warns about these files not being
355            executable. The #1 isn't necessary here since if you absolutely
356            must execute them you can always say "python <filename>".
357    
358            * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Remove
359            superfluous code to set brush and pen for point shapes
360    
361            * Thuban/UI/viewport.py: Remove commented out code that wouldn't
362            belong in viewport anyway
363    
364    2003-07-24  Frank Koormann   <[email protected]>
365    
366            * Doc/manual/thuban-manual.xml: Added section on table management.
367    
368    2003-07-24  Bernhard Herzog  <[email protected]>
369    
370            * test/runtests.py (main): Recognize the long "verbose" option
371            correctly.
372    
373    2003-07-22  Jonathan Coles   <[email protected]>
374    
375            * Doc/manual/thuban-manual.xml: Continue to write first revision
376            of the manual.
377    
378            * Thuban/UI/renderer.py (MapRenderer.render_map): Wrap method
379            with Begin/EndDrawing() calls to ensure we aren't doing to
380            many updates to the dc during rendering.
381            (ScreenRenderer.draw_shape_layer): self.draw_point_shape takes
382            a pen and brush argument so they need to be passed to the function.
383    
384            * Thuban/UI/viewport.py (ViewPort.calc_min_max_scales): New.
385            Calculates the minimum and maximum scale values. Factored out
386            of set_view_transform so that it could be used to zoom all the
387            way into a single point.
388            (ViewPort.set_view_transform): Call calc_min_max_scales().
389            (ViewPort.FitSelectedToWindow): Zoom to the maximum scale
390            if only a single point is selected.
391    
392            * Doc/manual/images/1_2_legend_close.png,
393            Doc/manual/images/1_2_legend_dock.png,
394            Doc/manual/images/1_2_mainwindow.png,
395            Doc/manual/images/1_2_mainwindow.ps,
396            Doc/manual/images/1_2_mainwindow.sk,
397            Doc/manual/images/3_2_fullextent.png,
398            Doc/manual/images/3_2_fulllayerextent.png,
399            Doc/manual/images/3_2_fullshapeextent.png,
400            Doc/manual/images/3_2_pan.png,
401            Doc/manual/images/3_2_zoomin.png,
402            Doc/manual/images/3_2_zoomout.png,
403            Doc/manual/images/3_3_identify.png,
404            Doc/manual/images/3_3_label.png,
405            Doc/manual/images/3_5_invisible.png,
406            Doc/manual/images/3_5_movedown.png,
407            Doc/manual/images/3_5_moveup.png,
408            Doc/manual/images/3_5_props.png,
409            Doc/manual/images/3_5_tobottom.png,
410            Doc/manual/images/3_5_totop.png,
411            Doc/manual/images/3_5_visible.png: New. Images for the documentation.
412    
413    2003-07-18  Bernhard Herzog  <[email protected]>
414    
415            * Thuban/UI/messages.py (MAP_REPLACED): New message.
416    
417            * Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED
418            after the new map has been assigned
419    
420            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages):
421            Delegate MAP_REPLACED to the canvas too
422            (MainWindow.prepare_new_session): Removed. Thanks to the new
423            MAP_REPLACED message it's no longer needed
424            (MainWindow.OpenSession, MainWindow.NewSession):
425            prepare_new_session has been removed.
426    
427            * Thuban/UI/classifier.py (Classifier.__init__): Subscribe to
428            MAP_REPLACED so that we can close the dialog if a new map is set.
429            (Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED
430            (Classifier.map_replaced): Handle MAP_REPLACED by closing the
431            dialog
432    
433            * test/test_viewport.py (SimpleViewPortTest)
434            (SimpleViewPortTest.test_default_size): Add doc-strings
435            (ViewPortTest.setUp): Bind map to self.map so we can use it in
436            tests. Subscribe to MAP_REPLACED messages too.
437            (ViewPortTest.tearDown): No need to explicitly unsubscribe
438            (ViewPortTest.test_set_map): New test for the SetMap method.
439    
440    2003-07-18  Bernhard Herzog  <[email protected]>
441    
442            * test/test_viewport.py (SimpleViewPortTest.test_default_size):
443            Move this test from ViewPortTest.setUp to this new separate test
444            case. setUp is not the place for the actual tests.
445            (ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
446            more of the test from setUp to the new test test_inital_settings.
447            (ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
448            (ViewPortTest.test_proj_conv): Split test_proj_conv into
449            test_win_to_proj and test_proj_to_win and make the tests easier to
450            understand
451            (ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
452            (ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
453            (ViewPortTest.test_unprojected_rect_around_point)
454            (ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
455            Reformat to increase readability.
456    
457    2003-07-18  Bernhard Herzog  <[email protected]>
458    
459            * Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.
460    
461    2003-07-18  Bernhard Herzog  <[email protected]>
462    
463            * test/runtests.py: The test suite can now be run without an X
464            connection. To make sure this remains true, remove the DISPLAY
465            environment variable so that an error occurs if the wxGTK is
466            imported accidentally
467    
468    2003-07-18  Bernhard Herzog  <[email protected]>
469    
470            * Thuban/UI/viewport.py: Remove unused imports
471    
472            * Thuban/UI/view.py: Remove unused imports
473    
474    2003-07-18  Bernhard Herzog  <[email protected]>
475    
476            * test/test_export.py Remove unused imports. The OutputTransform
477            function is now in viewport.py and is called output_transform
478            (TestScalebar.test_output_transform)
479            (TestScalebar.test_OutputTransform): Renamed to
480            test_output_transform and updated to use output_transform instead
481            of OutputTransform
482    
483            * Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
484            renamed.
485            (MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
486            renamed to output_transform
487    
488            * Thuban/UI/viewport.py (OutputTransform, output_transform):
489            Rename to output_transform
490    
491    2003-07-18  Bernhard Herzog  <[email protected]>
492    
493            * Thuban/Model/layer.py (Layer.__init__): Rename
494            classificationField to classificatin_column and init it here so
495            that it can be used in SetClassificationColumn
496            (Layer.GetClassificationColumn, Layer.GetClassificationField):
497            Rename to GetClassificationColumn.
498            (Layer.SetClassificationColumn, Layer.SetClassificationField):
499            Rename to SetClassificationColumn and issue a LAYER_CHANGED
500            message if the column changes.
501            (Layer._classification_changed, Layer.ClassChanged): Rename to
502            _classification_changed. Update the callers.
503            (Layer.SetShapeStore): Further field->column renames.
504    
505            * Thuban/Model/load.py (SessionLoader.start_classification)
506            (SessionLoader.start_clpoint): Updates because of
507            field->column method name changes in the Layer class
508    
509            * Thuban/Model/save.py (SessionSaver.write_classification): Updates
510            because of field->column method name changes in the Layer class
511    
512            * Thuban/UI/classifier.py (Classifier.__init__)
513            (Classifier._OnTry, Classifier._OnRevert): Updates because of
514            field->column method name changes in the Layer class
515    
516            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
517            because of field->column method name changes in the Layer class
518    
519            * Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
520            of field->column method name changes in the Layer class
521    
522            * test/test_save.py (SaveSessionTest.testClassifiedLayer)
523            (SaveSessionTest.testClassifiedLayer): Update because of
524            field->column method name changes in the Layer class
525    
526            * test/test_layer.py (SetShapeStoreTests.setUp)
527            (SetShapeStoreTests.test_sanity): Update because of field->column
528            method name changes in the Layer class
529            (TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
530            (TestLayerModification.test_sanity)
531            (TestLayerModification.test_initial_settings): remove unsued code
532            and rename to test_sanity.
533            (TestLayerModification.test_set_classification): New test for
534            SetClassification and SetClassificationField.
535    
536    2003-07-18  Bernhard Herzog  <[email protected]>
537    
538            * test/test_classgen.py (TestFixedRamp.test): Extend test to check
539            the non-fixed values as well. The old test would have accepted a
540            fixed ramp that only returnes the fixed properties
541    
542    2003-07-17  Jonathan Coles   <[email protected]>
543    
544            * Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
545            shots for the manual. The XCF file is the source image and
546            has additional layers to support changes.
547    
548            * Doc/manual/thuban-manual.xml: Wrote an initial Introduction.
549    
550            * Thuban/UI/classifier.py (Classifier.__BuildClassification):
551            Return both the new class and the field name.
552    
553            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't
554            fit the map to the window as this changes any zoom level that
555            the user may have set.
556    
557    2003-07-16  Jonathan Coles   <[email protected]>
558    
559            * Thuban/Model/classgen.py (generate_singletons,
560            generate_uniform_distribution, generate_quantiles): Remove
561            fixes parameter, but maintain the same functionality by having
562            the calling function pass a FixedRamp object for the ramp.
563            (FixedRamp): New. Adapts a ramp to have fixed property values.
564    
565            * Thuban/Model/classification.py: Use new CLASS_CHANGED message.
566            (Classification): Inherit from Publisher.
567            (Classification.__init__): Remove the layer parameter.
568            Classifications no longer need to have a parent layer.
569            (Classification.GetField, Classification.GetFieldType,
570            Classification.SetFieldInfo): Removed. The field name is stored
571            in the layer, and the type can be retreived by calling
572            Layer.GetFieldType().
573            (Classification._set_layer, Classification.GetLayer): Removed.
574            Classifications no longer have a parent layer.
575    
576            * Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
577            classification.
578            (Layer.SetShapeStore): Reset the classification first while
579            we still have the old shape store to work with.
580            (Layer.GetClassificationField, Layer.SetClassificationField):
581            New. Method for getting/setting the field to classify on.
582            (Layer.SetClassification): Simplified now that the layer
583            simply has to hold a reference to the classification and not
584            tell the classification who owns it.
585            Fixes RTbug #2023.
586    
587            * Thuban/Model/load.py (SessionLoader.start_classification):
588            Set the field name on the layer, not the classification.
589    
590            * Thuban/Model/messages.py: Add CLASS_CHANGED for when a
591            classification is modified.
592    
593            * Thuban/Model/save.py (SessionSaver.write_classification):
594            Get the field name and type from the layer.
595    
596            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
597            parameter records to rows and add docstring. Fixes RTbug #1997.
598    
599            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
600            ramp when we need to fix certain values of a ramp rather than
601            using the old fixes parameter. Fixes RTbug #2024.
602    
603            * Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
604            parameter.
605            (ClassTable.Reset): Add fieldType parameter and use it, rather
606            than asking the classification.
607            (Classifier.__init__): Remember the original class's field
608            and ask the layer for the field type, rather than the classification.
609            (Classifier.__SetGridTable): Retrieve the field and field type
610            for the table because they are not in the classification.
611            (Classifier._OnTry, Classifier._OnRevert): Set the classification
612            field on the layer in addition to the classification itself.
613    
614            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
615            classification field from layer.
616    
617            * Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
618            classification field from layer. Split up tests and remove
619            *-imports. Fixes RTbug #1992.
620    
621            * test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.
622    
623            * test/test_classification.py
624            (TestClassification.test_classification): Remove tests for methods
625            that no longer exist.
626    
627            * test/test_layer.py (SetShapeStoreTests.setUp): Classification
628            __init__ no longer has a field parameter, use SetClassificationField.
629            (SetShapeStoreTests.test_sanity): Use layer object to get class
630            field info.
631    
632            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
633            SetClassificationField on layer to set class field info.
634    
635            * test/test_viewport.py: Renamed from test/test_view.py.
636    
637    2003-07-16  Jan-Oliver Wagner <[email protected]>
638    
639            * Doc/manual/thuban-manual.xml: Added authors and an initial
640            coarse structure.
641    
642    2003-07-15  Bernhard Herzog  <[email protected]>
643    
644            * test/support.py (FloatComparisonMixin): This is a mix-in class
645            and therefore should not be derived from any other class.
646    
647            * test/test_range.py (RangeTest): FloatComparisonMixin is a
648            mix-in, so derive from TestCase as well.
649    
650    2003-07-15  Bernhard Herzog  <[email protected]>
651    
652            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
653            draw_func handling a bit to remove one layer of indirection. This
654            makes the renderer about 10% faster in the non-classifying case
655            and the code a bit cleaner
656            (MapRenderer.draw_point_shape): Add the pen and brush parameters
657            and set them in the dc. Now the draw_point_shape method and
658            wxproj's draw_polygon_shape function have basically the same
659            signature so that both can be directly used as draw_func
660    
661    2003-07-15  Bernhard Herzog  <[email protected]>
662    
663            * Thuban/Model/save.py (SessionSaver.write_classification): Encode
664            string values (in addition to the labels) as UTF 8
665    
666            * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
667            values if the field type is string
668    
669            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
670            saving a session with non-ascii string classification values.
671    
672            * test/test_load.py (TestClassification.file_contents)
673            (TestClassification.test): Check for non-ascii values in string
674            classifications
675    
676    2003-07-14  Jonathan Coles   <[email protected]>
677    
678            * test/test_view.py: New. Tests for ViewPort.
679    
680    2003-07-14  Frank Koormann   <[email protected]>
681    
682            * Thuban/Model/load.py (SessionLoader.start_map): Encode map
683            title to latin1.  Fixes https://intevation.de/rt/webrt?serial_num=2013
684    
685            * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
686            unicode strings from session file: session title, map title and
687            projection name.
688            
689    2003-07-10  Jonathan Coles   <[email protected]>
690    
691            * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
692            drag_stop, not drag_move when the mouse is released.
693    
694    2003-07-10  Jonathan Coles   <[email protected]>
695    
696            The most important part of this is the seperation of view.py into
697            two pieces. viewport.py now has a class called ViewPort which
698            contains all the non-wx parts of view.py and can therefore be
699            tested. view.py contains only the wx-specific parts and is fairly
700            simple.
701    
702            * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
703            RTTbug #1992.
704            * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
705            RTTbug #1992.
706    
707            * Thuban/Model/classgen.py (generate_singletons,
708            generate_uniform_distribution, generate_quantiles):
709            Added 'fixes' parameter so that property attributes can
710            be held constant over the generated classification groups.
711            (CustomRamp.GetProperties): Remove unused variables.
712    
713            * Thuban/Model/map.py (Map.SetProjection): Send the old
714            projection as an argument to listeners of the MAP_PROJECTION_CHANGED
715            event.
716    
717            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
718            parameter which is a list of records that restricts which
719            records are saved. Fixes RTbug #1997.
720    
721            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
722            Port exception dialog from GREAT-ER. Fixes RTbug #1993.
723    
724            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
725            to allow the user to fix line color/width on generated groups.
726            (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
727            functions to optionally fix group properties.
728    
729            * Thuban/UI/main.py (main): Set exception hook to the
730            ShowExceptionDialog. Fixes RTbug #1993.
731    
732            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
733            the table window when it is selectd to be shown.
734    
735            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
736            Export Selection button and move the export buttons underneath
737            the table.
738            (QueryTableFrame.UpdateStatusText): Added event argument so
739            that it can respond to grid selection events. The status text
740            is now updated even when the table is not associated with a
741            layer as was previously assumed.
742            (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
743            UpdateStatusText responds to these events.
744            (QueryTableFrame.OnSaveAs): Renamed to doExport.
745            (QueryTableFrame.doExport): Helper function that saves the
746            entire table, or selected rows, to a file.
747            (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
748            Respond to export button events and call doExport.
749    
750            * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
751            the function doesn't return NULL without first setting a Python
752            Error.
753    
754            * test/runtests.py (main): Only print "Unknown option" for
755            unsupported options.
756    
757            * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
758            optional epsilon argument to specify floating point accuracy.
759            (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
760            for each item test.
761    
762            * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
763            tests for saving selected records.
764    
765            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
766            tests for saving selected records.
767    
768            * test/test_map.py (TestMapWithContents.test_set_projection):
769            MAP_PROJECTION_CHANGED events send the old projection.
770    
771            * test/test_session.py
772            (TestSessionWithContent.test_forward_map_projection):
773            MAP_PROJECTION_CHANGED events send the old projection.
774    
775            * test/test_table.py (TableTest): Update tests to use non-deprecated
776            functions.
777    
778    2003-07-08  Bernhard Herzog  <[email protected]>
779    
780            * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
781            constants in the column objects are the standard ones defined in
782            the table module.
783    
784            * test/test_transientdb.py
785            (TestTransientTable.test_transienttable_to_dbf): New. Test whether
786            exporting transient tables as DBF works. This should catch the bug
787            just fixed in TransientTableBase.Width.
788    
789    2003-07-08  Bernhard Herzog  <[email protected]>
790    
791            * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
792            interpolated colors correctly.
793    
794            * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
795            New. Test case for the fix in classgen.py
796    
797    2003-07-08  Bernhard Herzog  <[email protected]>
798    
799            * test/runtests.py (main): Make the default output less verbose
800            and add a verbosity option (-v) to get the old output
801    
802    2003-07-08  Bernhard Herzog  <[email protected]>
803    
804            * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
805            0.9.
806    
807            * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
808            New. Return the join type
809    
810            * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
811            DTD
812            (SessionSaver.write_data_containers): Save the join type for
813            joined tables
814    
815            * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
816            namespace
817            (SessionLoader.start_jointable): Handle the jointype attribute
818    
819            * test/test_load_0_8.py: New. Effectively a copy of test_load.py
820            as of Thuban 0.8. These are now tests to determine whether Thuban
821            can still read files generated by Thuban 0.8
822    
823            * test/test_load.py (LoadSessionTest.dtd)
824            (TestSingleLayer.file_contents)
825            (TestLayerVisibility.file_contents, TestLabels.file_contents)
826            (TestLayerProjection.file_contents)
827            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
828            (TestJoinedTable.file_contents)
829            (TestLoadError.file_contents): Update for new DTD
830            (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
831            for new join type attribute
832    
833            * test/test_save.py (SaveSessionTest.dtd)
834            (SaveSessionTest.testEmptySession)
835            (SaveSessionTest.testSingleLayer)
836            (SaveSessionTest.testLayerProjection)
837            (SaveSessionTest.testRasterLayer)
838            (SaveSessionTest.testClassifiedLayer)
839            (SaveSessionTest.test_dbf_table)
840            (SaveSessionTest.test_joined_table): Update for new DTD
841            (SaveSessionTest.test_joined_table): Add test for new join type
842            attribute
843    
844    2003-07-04  Bernhard Herzog  <[email protected]>
845    
846            * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
847            function for table_to_dbf
848            (table_to_dbf): Deal with names longer than the 10 character limit
849    
850            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
851            doc-string
852            (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
853            long column names
854    
855    2003-07-03  Bernhard Herzog  <[email protected]>
856    
857            * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
858    
859    2003-07-03  Bernhard Herzog  <[email protected]>
860    
861            * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
862            for the Thuban manual and README with some basic information about
863            the manual
864    
865    2003-07-03  Bernhard Herzog  <[email protected]>
866    
867            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
868            Update doc-string
869            (TransientJoinedTable.create): Do not modify the column objects of
870            the input tables in place and copy all columns of the input tables
871            into the joined table after all.
872    
873            * test/test_transientdb.py
874            (TestTransientTable.test_transient_joined_table_same_column_name):
875            Update to reflect the new behavior
876            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
877            Update to reflect the new behavior
878            (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
879            New test case for a bug which modified the column objects in place
880    
881    2003-07-02  Jonathan Coles   <[email protected]>
882    
883            * Thuban/Model/classgen.py (generate_singletons,
884            generate_uniform_distribution, generate_quantiles,
885            GenQuantiles0): Make sure maxValue isn't less than
886            one, otherwise we could divide by zero.
887    
888            * test/test_classgen.py (ClassGenTest.doClassRangeTest,
889            ClassGenTest.doClassSingleTest): Call doBoundsTest to
890            check the end classification groups against the
891            proper property values.
892            (ClassGenTest.doBoundsTest): New. Checks the first and
893            last classification groups to make sure their properties
894            are the correct upper and lower bounds for a color ramp.
895    
896    2003-07-02  Jonathan Coles   <[email protected]>
897    
898            * Thuban/Model/classgen.py (generate_singletons,
899            generate_uniform_distribution, generate_quantiles,
900            GenQuantiles0): The denominator was one to high when
901            calculating the index for the ramp causing the index
902            to never to reach one.
903    
904    2003-07-02  Jonathan Coles   <[email protected]>
905    
906            Changed the singature of ClassGroupRange.__init__ and
907            ClassGroupRange.SetRange() so that the min/max values are
908            passed as a tuple. This makes a better calling scheme for
909            when a Range object is passed instead.
910    
911            * Thuban/Model/classgen.py: Fixed parameters to
912            ClassGroupRange constructor.
913    
914            * Thuban/Model/classification.py (ClassGroupRange.__init__):
915            Consolidate the min/max parameters into a single _range which
916            can either be a tuple or a Range object.
917            (ClassGroupRange.SetRange): Consolidate the min/max parameters
918            into a single _range which can either be a tuple or a Range object.
919    
920            * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
921            call to ClassGroupRange constructor to use a tuple.
922    
923            * Thuban/Model/layer.py (Layer.SetClassification): Switch
924            the classification instance variable to the new class
925            before calling _set_layer otherwise subscribers to a
926            LAYER_CHANGED event will not see any difference.
927    
928            * test/test_classification.py: Fix tests of ClassGroupRange
929            so that they use the new signature.
930    
931            * test/test_load.py: Fix use of ClassGroupRange so that it
932            uses the new signature.
933    
934            * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
935            uses the new signature.
936    
937            * test/test_save.py: Fix use of ClassGroupRange so that it
938            uses the new signature.
939    
940    
941    2003-07-01  Jonathan Coles   <[email protected]>
942    
943            * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
944            Import used objects/class from color.
945            (generate_singletons): We don't
946            need the numGroups parameter anymore because we are using
947            the new ramps with GetProperties().
948            (generate_uniform_distribution): Use new ramp method
949            GetProperties().
950            (generate_quantiles, GenQuantiles0): Use new ramp method
951            GetProperties().
952            (CustomRamp.SetNumGroups): Removed. The ramps now map
953            a value from 0 to 1 to class properties so the number
954            of groups is not needed ahead of time.
955            (CustomRamp.next): Removed. CustomRamp does not support
956            interation anymore.
957            (CustomRamp.GetProperties): Returns a ClassGroupProperties
958            object based on the index value from 0 to 1 that is
959            passed to it.
960            (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
961            Made into instances of Monochromatic class instread of
962            deriving from it.
963            (HotToCold.SetNumGroups): Removed. See CustomRamp.
964            (HotToCold.next): Removed. See CustomRamp.
965    
966            * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
967            (Classification.SetField, Classification.SetFieldType):
968            Replaced with SetFieldInfo.
969            (Classification.SetFieldInfo): New. Does a better job of
970            what SetField and SetFieldType used to do by combining
971            their function since they should really always be done
972            at the same time.
973            (Classification.SetLayer): Renamed to _set_layer.
974            (Classification._set_layer): Should only be called from
975            Layer's SetClassification. This does not cause a recursive
976            call as SetLayer did because we know that Layer knows about
977            the classification.
978    
979            * Thuban/Model/color.py: Fixes RTbug #1971.
980            (_Transparent): Renamed from Transparent so it doesn't
981            conflict with the module variable.
982            (Transparent, Black): Renamed from Color.Transparent,
983            Color.Black so they are not class variables.
984    
985            * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
986            (Layer.Destroy): We don't need to call SetClassification
987            anymore to clear out the back reference in the classifcation
988            to the layer. It's better to set it to None using _set_layer,
989            and we won't be creating another clas object too.
990            (Layer.SetClassification): Classification._set_layer is not
991            recursive so remove all the locking variables. Also clean
992            up the code so that it remains unchanged if something fails.
993    
994            * Thuban/Model/load.py: Fixes RTbug #1971.
995            (SessionLoader.start_classification): Call
996            Classification.SetFieldInfo().
997    
998            * Thuban/Model/save.py: Removed import of Color which wasn't
999            being used.
1000    
1001            * Thuban/UI/classgen.py: Fixes RTbug #1972.
1002            (ClassGenDialog.__init__): Color ramps are now instances
1003            already so we don't need to create any new objects.
1004            (ClassGenDialog.OnOK): Check for numGroups is no longer
1005            necessary because we never use it.
1006    
1007            * Thuban/UI/classifier.py: Fixes RTbug #1971.
1008            (Classifier.__BuildClassification, Classifier.__SetGridTable):
1009            Call Classification.SetFieldInfo() instead of SetFieldType.
1010    
1011            * Thuban/UI/renderer.py: Fixes RTbug #1971.
1012    
1013            * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
1014            (MapCanvas.__init__): Subscribe to the idle time event. Set
1015            background color to white.
1016            (MapCanvas.OnPaint): Set a flag indicating that we should
1017            render the map during idle time. If we already have a bitmap
1018            just draw it now.
1019            (MapCanvas.OnIdle): New. Render the map only during idle time.
1020            This also fixes a problem with the busy cursor under gtk.
1021    
1022            * test/test_classgen.py (ClassGenTest.test_generate_singletons):
1023            Fix calls to generate_singletons because the signature changed.
1024    
1025            * test/test_classification.py: Fix color references and
1026            change calls to Classification.[SetField|SetFieldType] to
1027            SetFieldInfo.
1028    
1029            * test/test_load.py: Fix color references.
1030    
1031            * test/test_load_0_2.py: Fix color references.
1032    
1033            * test/test_save.py (SaveSessionTest.testClassifiedLayer):
1034            Change calls to Classification.[SetField|SetFieldType] to
1035            SetFieldInfo.
1036    
1037    2003-07-01  Frank Koormann   <[email protected]>
1038    
1039            MERGE from the greater-ms3 branch.
1040    
1041            * test/test_transientdb.py
1042            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
1043            New. Test join of two tables with partly equal column names.
1044    
1045            * Thuban/Model/transientdb.py (TransientJoinedTable.create):
1046            If duplicates in left and right tables column names are found,
1047            append '_' (underscores) to the name until it is unique.
1048            Create always new internal names for the resulting table and reference
1049            columns in the join statement with <table>.<column>
1050    
1051    2003-07-01  Bernhard Herzog  <[email protected]>
1052    
1053            * test/test_transientdb.py
1054            (TestTransientTable.test_transient_joined_table_same_column_name):
1055            New. Test whether joining on columns with the same names in both
1056            tables works.
1057            
1058            * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
1059            sure to use the right internal names even when joining on field
1060            with the same names in both tables. Also, detect duplicate names
1061            in the joined table correctly.
1062    
1063    2003-07-01  Frank Koormann   <[email protected]>
1064    
1065            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
1066            Reverse List of layers to render in same order as in desktop legend.
1067    
1068    2003-06-30  Jonathan Coles   <[email protected]>
1069    
1070            * Thuban/version.py (make_tuple): Takes a version string
1071            and splits it into a tuple of at most three integers.
1072            Used make_tuple() to make tuple versions of the version
1073            numbers.
1074    
1075            * Thuban/UI/about.py: Add Thuban email addresses.
1076    
1077    2003-06-30  Jonathan Coles   <[email protected]>
1078    
1079            * Thuban/version.py: SQLite/PySQLite version dependencies
1080            were too high.
1081    
1082    2003-06-30  Jonathan Coles   <[email protected]>
1083    
1084            * Thuban/version.py: Update version to 0.8.1
1085            
1086            * MANIFEST.in: Added Projections so that default.proj is
1087            included.
1088    
1089    2003-06-26  Jonathan Coles   <[email protected]>
1090    
1091            New About box with lots more information including library
1092            versions and credits. More/better version checking before
1093            Thuban starts.
1094    
1095            * Thuban/UI/about.py: New. New About box that displays
1096            library version information and credits.
1097    
1098            * Thuban/version.py: Added new 'versions' dictionary which
1099            contains the verions of various libraries which are checked
1100            when the module loads.
1101            (verify_versions): Check all version numbers and returns
1102            a list of errors.
1103    
1104            * Thuban/UI/classifier.py (Classifier.__EnableButtons):
1105            Reset the status of the buttons as the situation warrants,
1106            but in a better more reliable way by not relying on the
1107            current status to determine what needs to change.
1108    
1109            * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
1110            (verify_versions): Remove most of the code since it is
1111            now in Thuban.version.verify_versions.o
1112    
1113            * Thuban/UI/mainwindow.py (MainWindow.About): Call new
1114            About box in Thuban.UI.about.
1115    
1116            * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
1117            Returns the version of gdal library being used as a string.
1118    
1119            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
1120            Removed.
1121            (get_proj_version): Return the version of PROJ that the file
1122            was compiled with.
1123            (get_gtk_version): Return th version of GTK that the file
1124            was compiled with.
1125    
1126    2003-06-25  Jonathan Coles   <[email protected]>
1127    
1128            * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
1129            of the SelectPropertiesDialog should be self so the window
1130            appears on top.
1131            (ClassGroupPropertiesCtrl.DoEdit): The parent
1132            of the SelectPropertiesDialog should be self so the window
1133            appears on top.
1134    
1135            * Thuban/UI/resource.py: Cleaned up how we determine file
1136            extensions.
1137            (GetImageResource): Return an wxImage from our Resources.
1138    
1139    2003-06-24  Jonathan Coles   <[email protected]>
1140    
1141            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
1142            Check that a layer has a classification before trying
1143            to get it. Raster layers don't have classifications.
1144    
1145    2003-06-23  Jonathan Coles   <[email protected]>
1146            
1147            * setup.py: Add Resources/XML to resource list.
1148        
1149    2003-06-23  Jonathan Coles   <[email protected]>
1150    
1151            * setup.cfg: Fix copyright dates
1152        
1153    2003-06-23  Jonathan Coles   <[email protected]>
1154    
1155            * MANIFEST.in: Update with Resources/XML
1156    
1157            * setup.py: Don't include Locale resources yet as we don't
1158            have any and it causes problems building the distribution
1159            for Windows. Update version to 0.8.0.
1160    
1161            * Doc/thuban.dtd: Removed since it is now in Resources/XML.
1162    
1163            * Thuban/UI/mainwindow.py: Add blank line at the end because
1164            file was not being read correctly building the Windows
1165            distribution.
1166    
1167    2003-06-23  Jonathan Coles   <[email protected]>
1168    
1169            * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
1170    
1171            * Thuban/version.py: Temporarily update longversion for
1172            the 0.8 release so that it doesn't have the cvs revision.
1173    
1174    2003-06-23  Jonathan Coles   <[email protected]>
1175    
1176            * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
1177            to make sure that we don't create reentrant possibilities with
1178            wxYield.
1179    
1180            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
1181            directly to avoid the wxSafeYield() call which generates an
1182            OnPaint event causing infinite recursion. Don't try to catch
1183            exception anymore. This was for before there were limits on map
1184            scaling.
1185    
1186    2003-06-23  Bernhard Herzog  <[email protected]>
1187    
1188            Bug fix for RT #1961:
1189    
1190            * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
1191            Register DerivedShapestores with the session
1192    
1193            * Thuban/Model/session.py (Session.Tables): Make sure each table
1194            is only listed once.
1195    
1196            * test/test_load.py (TestJoinedTable.test): Add check_format call.
1197            Update file contents to match the one written out.
1198    
1199    2003-06-20  Bernhard Herzog  <[email protected]>
1200    
1201            * test/xmlsupport.py (SaxEventLister.startElementNS)
1202            (SaxEventLister.endElementNS): Do not include the qname. Python
1203            2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
1204            is (presumably incorrectly) None, whereas it's a string with the
1205            element name in the later versions.
1206    
1207            * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
1208            (TestEventList.test_even_list_namespace): Update tests to reflect
1209            the new behaviour
1210            (TestEventList.test_even_list_id_normalization): Fix doc-string
1211    
1212    2003-06-20  Jonathan Coles   <[email protected]>
1213    
1214            * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
1215            by deriving classes to determine if that layer supports shapes.
1216            (Layer): Override HasShapes and return true.
1217    
1218            * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
1219            instead of a direct call to wx[Begin|End]CusyCursor().
1220            (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
1221            table data.
1222    
1223            * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
1224            New. Wrappers around the wxWindows functions that allow us to
1225            make additional calls such as wxYield which gives the native
1226            system a chance to update the cursor correctly.
1227    
1228            * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
1229            instead of a direct call to wx[Begin|End]CusyCursor().
1230    
1231            * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
1232            instead of a direct call to wx[Begin|End]CusyCursor().
1233            (MapCanvas.find_shape_at): Check if the current search layer
1234            support shapes, otherwise go on to the next layer.
1235    
1236            * test/test_layer.py: Add tests in each type of layer for
1237            HasClassification() and HasShapes()
1238    
1239    2003-06-20  Jonathan Coles   <[email protected]>
1240    
1241            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
1242            turning on the busy cursor to allow the system to change the
1243            cursor before we begin painting. This fixes a problem that
1244            was occuring only under GTK. Fixes RTbug #1840.
1245    
1246    2003-06-20  Bernhard Herzog  <[email protected]>
1247    
1248            * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
1249            version.
1250    
1251            * Thuban/Model/save.py (sort_data_stores): New. Make topological
1252            sort of the data sources so they can be written with sources that
1253            data sources that depend on other data sources come after the
1254            sources they depend on.
1255            (SessionSaver.__init__): Add idmap instance variable to map from
1256            objects to the ids used in the file.
1257            (SessionSaver.get_id, SessionSaver.define_id)
1258            (SessionSaver.has_id): New. Methods to manage the idmap
1259            (SessionSaver.write): Use thuban-0.8.dtd
1260            (SessionSaver.write_session): Add a namespace on the session and
1261            write out the data sources before the maps.
1262            (SessionSaver.write_data_containers): New. Write the data
1263            containers.
1264            (SessionSaver.write_layer): Layer elements now refer to a
1265            shapestore and don't contain filenames anymore.
1266    
1267            * Thuban/Model/load.py (LoadError): Exception class to raise when
1268            errors in the files are discovered
1269            (SessionLoader.__init__): Define dispatchers for elements with a
1270            thuban-0.8 namespace too.
1271            (SessionLoader.check_attrs): New helper method to check and
1272            convert attributes
1273            (AttrDesc): New. Helper class for SessionLoader.check_attrs
1274            (SessionLoader.start_fileshapesource)
1275            (SessionLoader.start_derivedshapesource)
1276            (SessionLoader.start_filetable, SessionLoader.start_jointable):
1277            Handlers for the new elements in the new fileformat
1278            (SessionLoader.start_layer): Handle the shapestore attribute in
1279            addition to filename.
1280            (SessionLoader.start_table, SessionLoader.end_table): Removed.
1281            They were never used in the old formats and aren't needed for the
1282            new.
1283    
1284            * Thuban/Model/session.py (Session.DataContainers): New method to
1285            return all "data containers", i.e. shapestores and tables
1286    
1287            * test/xmlsupport.py (SaxEventLister.__init__)
1288            (SaxEventLister.startElementNS, sax_eventlist): Add support to
1289            normalize IDs.
1290    
1291            * test/test_xmlsupport.py
1292            (TestEventList.test_even_list_id_normalization): New test case for
1293            id normalization
1294    
1295            * test/test_load.py (LoadSessionTest.check_format): Use ID
1296            normalization
1297            (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
1298            class atrributes used for ID normalization
1299            (TestSingleLayer, TestLayerVisibility, TestLabels.test)
1300            (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
1301            file format
1302            (TestJoinedTable): New test for loading sessions with joined
1303            tables.
1304            (TestLoadError): New. Test whether missing required attributes
1305            cause a LoadError.
1306    
1307            * test/test_save.py (SaveSessionTest.thubanids)
1308            (SaveSessionTest.thubanidrefs): New class attributes for ID
1309            normalization in .thuban files.
1310            (SaveSessionTest.compare_xml): Use id-normalization.
1311            (SaveSessionTest.testEmptySession)
1312            (SaveSessionTest.testLayerProjection)
1313            (SaveSessionTest.testRasterLayer)
1314            (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
1315            (SaveSessionTest.testLayerProjection): The filename used was the
1316            same as for testSingleLayer. Use a different one.
1317            (SaveSessionTest.test_dbf_table)
1318            (SaveSessionTest.test_joined_table): New test cases for saving the
1319            new data sources structures.
1320            (TestStoreSort, MockDataStore): Classes to test the sorting of the
1321            data stores for writing.
1322    
1323            * test/runtests.py: Add CVS keywords
1324    
1325    2003-06-20  Jonathan Coles   <[email protected]>
1326    
1327            * test/test_session.py
1328            (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
1329            Use the cultural_landmark-point.dbf file for the store so that
1330            the table rows and shape count match.
1331    
1332    2003-06-20  Jonathan Coles   <[email protected]>
1333    
1334            * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
1335            an exception if the number of shapes is different from the
1336            number of rows in the table. Address RTbug #1933.
1337    
1338            * test/test_layer.py (TestLayer.test_derived_store): Add
1339            a test for the new exception in DerivedShapeStore.__init__.
1340    
1341            * test/support.py (FloatTestCase): Removed since there is
1342            already FloatComparisonMixin. Fixes RTbug #1954.
1343            (FloatComparisonMixin.assertFloatEqual): Include test for
1344            infinity that was part of FloatTestCase.
1345    
1346            * test/test_range.py (RangeTest): Inherit from
1347            support.FloatComparisonMixin now that we don't have
1348            support.FloatTestCase.
1349    
1350    2003-06-20  Bernhard Herzog  <[email protected]>
1351    
1352            * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
1353            the implementation in xmlsupport instead.
1354            (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
1355    
1356            * test/test_proj.py: Import sax_eventlist from xmlsupport instead
1357            of test_save
1358    
1359    2003-06-20  Bernhard Herzog  <[email protected]>
1360    
1361            * test/test_load.py (LoadSessionTest.check_format): New helper
1362            method to make sure the test files we load might have been written
1363            by the current thuban version.
1364            (ClassificationTest.TestLayers, TestSingleLayer.test)
1365            (TestLayerVisibility.test, TestClassification.test)
1366            (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
1367            Add check_format() calls and fix the thuban data to match the data
1368            that would be written by saving the session loaded from it.
1369    
1370            * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
1371            the same class and function in test_save.
1372    
1373            * test/test_xmlsupport.py (TestEventList): New. test cases for
1374            sax_eventlist
1375    
1376    2003-06-20  Bernhard Herzog  <[email protected]>
1377    
1378            * Resources/XML/thuban.dtd: Add comment about which versions of
1379            Thuban are covered by this DTD
1380            (map): Fix content model for layers and raster layers. There can
1381            be any number or layers and raster layers in any order.
1382    
1383    2003-06-20  Jonathan Coles   <[email protected]>
1384    
1385            This is mainly about fixing RTbug #1949.
1386    
1387            * Thuban/Model/classification.py: Remove "from __future__"
1388            import statement since python 2.2 is the earliest supported
1389            version.
1390    
1391            * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
1392            Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
1393            depending on the units this projection *forwards* into.
1394    
1395            * Thuban/Model/save.py (SessionSaver.write_classification):
1396            Remove unnecessary use of lambdas and nested functions.
1397    
1398            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
1399            adjustment here if the map projection uses degrees.
1400    
1401            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
1402            scale adjust code since it is now done before calling
1403            this method. Don't do anything if the map projection
1404            is None.
1405    
1406    2003-06-19  Bernhard Herzog  <[email protected]>
1407    
1408            Move version specific load tests to their own file.
1409    
1410            * test/test_load.py: Expand the doc-string to explain a bit how to
1411            handle file format changes.
1412            (TestClassification.test): Update the docstring as this test is
1413            not about Thuban 0.2 anymore.
1414    
1415            * test/test_load_0_2.py: New file with the load tests for thuban
1416            files created with Thuban 0.2 and earlier.
1417    
1418    2003-06-19  Bernhard Herzog  <[email protected]>
1419    
1420            Add XML validation to some of the tests. Validation will only be
1421            done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
1422            To make the DTD available to the test cases it's moved into
1423            Resources/XML
1424    
1425            * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
1426            for versions up to and including 0.2. Two slight changes: added an
1427            encoding specification and fixed the comment which refered to
1428            GRASS, not Thuban
1429    
1430            * test/xmlsupport.py: New support module for tests involving XML.
1431            Currently there's a mix-in class for XML validation.
1432    
1433            * test/test_xmlsupport.py: New. Tests for the xmlsupport module
1434    
1435            * test/test_save.py (SaveSessionTest): Derive from ValidationTest
1436            so that we can validate the
1437            (SaveSessionTest.testEmptySession)
1438            (SaveSessionTest.testSingleLayer)
1439            (SaveSessionTest.testSingleLayer)
1440            (SaveSessionTest.testLayerProjection)
1441            (SaveSessionTest.testRasterLayer)
1442            (SaveSessionTest.testClassifiedLayer): Validate the generated XML
1443    
1444            * test/runtests.py (main): Call print_additional_summary instead
1445            of print_garbage_information
1446    
1447            * test/support.py (resource_dir): New function to return the
1448            "Resource" subdirectory
1449            (print_additional_summary): New function to combine several
1450            summary functions
1451            (run_tests): Use print_additional_summary instead of calling
1452            print_garbage_information directly
1453    
1454    2003-06-19  Bernhard Herzog  <[email protected]>
1455    
1456            * Doc/thuban.dtd (classification): Correct the content model of
1457            the classification element.
1458            (projection): Add the "name" attribute
1459    
1460    2003-06-19  Frank Koormann   <[email protected]>
1461    
1462            MERGE from the greater-ms3 branch.
1463    
1464            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
1465            scale if projection is latlong to get better estimate.
1466    
1467            Fix problem of hidden properties dialog under windows after double
1468            click on layer tree:
1469            The tree control always gets an Expanded / Collapsed event after
1470            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
1471            raises the already displayed window.
1472    
1473            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
1474            raiseProperties initialized to prevent endless loops
1475            (LegendTree._OnItemActivated): Depending on self.raiseProperties
1476            simply raise the properties or open the dialog and issue a second
1477            event.
1478    
1479    2003-06-18  Jonathan Coles   <[email protected]>
1480    
1481            * setup.py: Fix a few problems that occured under Windows.
1482    
1483    2003-06-18  Jonathan Coles   <[email protected]>
1484    
1485            When Thuban loaded the map was redrawn twice because the
1486            legend was being opened after the mainwindow was created
1487            and not during its creation. This meant the map was drawn
1488            initially and then had to be redrawn when the legend
1489            caused the display to change. Now the legend is opened
1490            in the mainwindow constructor which resolves this issue.
1491    
1492            Also, although we were checking for the existence of
1493            gdal and gdalwarp modules, the gdalwarp extension was
1494            still being compiled (which may fail if the system doesn't
1495            have gdal installed). the build_ext command to setup.py
1496            now accepts the flags --with-gdal and --without-gdal.
1497            If --without-gdal is specified setup.py will try to
1498            use the gdal parameters specified by gdal-config. Under
1499            windows, those parameters have to be set in setup.py
1500            as with proj4 an wxWindows.
1501    
1502            * setup.py: Use a list instead of seperate variables for
1503            extension parameters so we can create a generic function
1504            that runs an appropriate *-config script.
1505            (run_cs_script): Renamed from run_wx_script and modified
1506            to accept a second argument which is a list of lists to
1507            be filled in by the values returned from running the command.
1508            (thuban_build_ext): New. Extends the build_ext command and
1509            provides the options --with-gdal/--without-gdal which then
1510            optionally includes the gdalwarp extension.
1511    
1512            * Thuban/Model/resource.py: First check if we can import
1513            the gdalwarp Thuban extension before checking for gdal.
1514            Also added some comments.
1515            
1516            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
1517            the map is None which may be the case if none has been loaded
1518            yet.
1519    
1520            * Thuban/UI/main.py (main): Remove call to ShowLegend.
1521    
1522            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
1523    
1524            * Thuban/UI/renderer.py: Check for gdal support before importing
1525            gdalwarp.
1526            (MapRenderer.render_map): Only try to optimize if we have gdal
1527            support otherwise nothing will get drawn.
1528    
1529            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
1530            during startup before a map has been created. Check if map is None
1531            before using it and do nothing if it is.
1532    
1533    2003-06-17  Jonathan Coles   <[email protected]>
1534    
1535            Fix the problem with raster layers under Windows that caused
1536            Thuban to crash. The view should respond to layer projection
1537            changed events to update the display. Changes to a projection
1538            should not cause the map to be set to full extent.
1539            
1540            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
1541            current_map_proj to remember the current map projection so that
1542            when the projection changes we know what the previous projection
1543            was.
1544            (MapCanvas.SetMap): Unsubscribe and subscribe to
1545            LAYER_PROJECTION_CHANGED events.
1546            (MapCanvas.projection_changed): Split into two methods that respond
1547            to map and layer projection changes.
1548            (MapCanvas.map_projection_changed): New. Takes the current view and
1549            projects it using the new projection. This does not cause the
1550            map to be redrawn at full extent.
1551            (MapCanvas.layer_projection_changed): New. Cause a redraw which
1552            will draw each layer in its new projection.
1553            
1554            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
1555            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
1556            under Windows.
1557            
1558            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
1559            to twice sizeof(void*) because there are two digits for each
1560            hex byte.
1561    
1562    2003-06-16  Bernhard Herzog  <[email protected]>
1563    
1564            Update to the layer interface: Direct access to the table,
1565            shapetable, shapefile and filename attributes is now actively
1566            deprecated by issuing deprecation warnings for all places where
1567            this happens.
1568    
1569            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
1570            to the instance variables table, shapetable, shapefile and
1571            filename via __getattr__ so that we can issue a deprecation
1572            warning.
1573            (Layer.SetShapeStore): Don't set the deprecated instance variables
1574            any more
1575            (Layer.SetShapeStore): Don't use deprecated layer instance
1576            variables
1577            (Layer.Destroy): No need to explicitly remove the instance
1578            variables any more
1579            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
1580            instance variables
1581    
1582            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
1583            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
1584            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
1585            use deprecated layer instance variables
1586    
1587            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
1588            deprecated layer instance variables
1589    
1590            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
1591            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
1592            instance variables
1593    
1594            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
1595            deprecated layer instance variables
1596    
1597            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
1598            deprecated layer instance variables
1599    
1600            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
1601            deprecated layer instance variables
1602    
1603            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
1604            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
1605            variables
1606    
1607            * test/runtests.py (main): Turn Thuban's deprecation warnings into
1608            errors so that they're cought by the tests
1609    
1610            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
1611            layer instance variables
1612    
1613    2003-06-16  Jonathan Coles   <[email protected]>
1614    
1615            Fix a problem under Windows whereby if the user double-clicks on a
1616            layer in the legend that tree item will expand or collapse as well
1617            as open the layer properties dialog. The state of the tree item
1618            should not be affected.
1619    
1620            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
1621            preventExpandCollapse and subscribe to expanding and collapsing
1622            events.
1623            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
1624            collapsing events and will veto the event if it has been triggered
1625            by the user double clicking on a layer.
1626            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
1627            that an expanding/collapsing event should be vetoed.
1628    
1629    2003-06-13  Bernhard Herzog  <[email protected]>
1630    
1631            * Thuban/UI/classifier.py (Classifier.OnClose)
1632            (Classifier.map_layers_removed)
1633            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
1634            in OnClose and not in map_layers_removed or
1635            layer_shapestore_replaced to make sure it always happens when the
1636            dialog is closed
1637    
1638    2003-06-13  Jonathan Coles   <[email protected]>
1639    
1640            This puts back a fix for Windows where a panel is needed so that
1641            the background of the table view appears correctly.
1642    
1643            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
1644            object that can be used by derived classes to place any
1645            controls (including the grid) onto.
1646            (QueryTableFrame.__init__): Use the panel as the parent window
1647            for all the controls. Reparent the grid so that the panel is
1648            the parent. Call UpdateStatusText() to correctly initialize
1649            the status bar.
1650    
1651    2003-06-13  Jonathan Coles   <[email protected]>
1652    
1653            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
1654            from wxFrame (as opposed to wxDialog like the other classes)
1655            but otherwise behaves like the other classes. This is needed
1656            for the TableView which isn't really a dialog and needs to
1657            have a status bar and control buttons.
1658    
1659            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
1660            instance variable to keep track of how many rows are selected.
1661            Subscribe once to the the events we are interested in.
1662            (ThubanGrid.OnRangeSelect): Only handle event if event handling
1663            hasn't been turned off.
1664            (ThubanGrid.OnSelectCell): Only handle event if event handling
1665            hasn't been turned off.
1666            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
1667            as an event listener (which changes the event handler stack)
1668            simply set an instance variable to False. This is checked in
1669            the event handlers.
1670            (ThubanGrid.GetNumberSelected): Return the number of currently
1671            selected rows.
1672            (TableFrame): Inherit from ThubanFrame so we can have a
1673            status bar and control buttons.
1674            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
1675            Explicitly set which items are selected in the operator choice and
1676            action choice so there is always a valid selection. Fixes RTbug #1941.
1677            Subscribe to grid cell selection events so we can update the
1678            status bar.
1679            (QueryTableFrame.UpdateStatusText): Update the status bar with
1680            how many rows are in the grid, how many columns, and how many
1681            rows are selected.
1682            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
1683            Call UpdateStatusText when cells are (de)selected.
1684            (QueryTableFrame.OnQuery): Use the string value in the value
1685            combo if either the selected item index is 0 or if the string
1686            cannot be found in the predefined list (this happens if the
1687            user changes the text). Fixes RTbug #1940.
1688            Only turn off the grid event listeners if there a query comes
1689            back with a none empty list of ids. in the case that the list
1690            is empty this causes a grid.ClearSelection() call to actually
1691            clear the grid selection which causes the selected items in
1692            the map to be deselected. Fixes RTbug #1939.
1693    
1694            * test/test_save.py (XMLWriterTest.Encode): Check return values.
1695            Fixes RTbug #1851.
1696    
1697    2003-06-13  Bernhard Herzog  <[email protected]>
1698    
1699            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
1700            self.selected_shape with the current selection to make sure the
1701            contents of the dialog are up to date when it's shown for the
1702            first time.
1703            The dialog used to work without this by luck. The recent fix to
1704            the connector module 'broke' a 'feature' the identify view was
1705            relying on, i.e that subscribing to a message in response to
1706            receiving a message of that type would mean that the new
1707            subscriber would also be called for the same message.
1708            
1709    2003-06-12  Jonathan Coles   <[email protected]>
1710    
1711            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
1712            the image is rendered. Fixes RTbug #1937.
1713    
1714    2003-06-12  Jonathan Coles   <[email protected]>
1715    
1716            * Thuban/Lib/fileutil.py: As is done under Windows, create the
1717            user directory if it doesn't exist on a posix system.
1718            Fixes RTbug #1815.
1719    
1720            * Thuban/Model/resource.py (get_user_proj_files): Moved the
1721            called to get_application_dir here, so that the directory
1722            will only be called if this method is invoked.
1723    
1724            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
1725            the projfilepath if no projection is selected.
1726    
1727    2003-06-12  Jonathan Coles   <[email protected]>
1728    
1729            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
1730            the scalebar if the current map has no projection set.
1731    
1732            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
1733            projfilepath label to just the basename of the projection file
1734            rather than include the entire path.
1735    
1736            * Thuban/Model/resource.py: Fix missed proj functions that
1737            needed to be renamed.
1738    
1739    2003-06-12  Jonathan Coles   <[email protected]>
1740    
1741            * Thuban/Model/classification.py: Removed assert statements that
1742            tested if the variable was an instance of Color.
1743    
1744            * Thuban/Model/color.py (Color): Remove commented code that isn't
1745            used.
1746            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
1747            Fixes RTbug #1835.
1748            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
1749            Needed now that the class doesn't inherit from Color.
1750    
1751    2003-06-12  Jonathan Coles   <[email protected]>
1752    
1753            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
1754            check unicode strings.
1755    
1756            * test/test_layer.py: Check for existence of gdal.
1757    
1758    2003-06-12  Jonathan Coles   <[email protected]>
1759        
1760            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
1761            that was in load.py
1762    
1763            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
1764            that was in save.py
1765    
1766    2003-06-12  Jonathan Coles   <[email protected]>
1767    
1768            This is largely a collection of bug fixes. We also handle the
1769            case where gdal is not on the system. The XMLReader and XMLWriter
1770            classes were moved into there own files to resolve some circular
1771            import references and because they shouldn't really be in the
1772            file that is dediciated to reading/writing session files since
1773            they are also used elsewhere.
1774    
1775            * Thuban/Model/classgen.py: Renamed functions to follow the
1776            function_names_with_underscores style. Fixes RTbug #1903.
1777            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
1778    
1779            * Thuban/Model/layer.py: Import gdal only if it available.
1780            (RasterLayer): Handle the case where the gdal library is unavailable.
1781            Addresses RTbug #1877.
1782    
1783            * Thuban/Model/load.py (XMLReader): Moved into seperate file
1784            xmlreader.py.
1785    
1786    2003-06-12  Jonathan Coles   <[email protected]>
1787    
1788            This is largely a collection of bug fixes. We also handle the
1789            case where gdal is not on the system. The XMLReader and XMLWriter
1790            classes were moved into there own files to resolve some circular
1791            import references and because they shouldn't really be in the
1792            file that is dediciated to reading/writing session files since
1793            they are also used elsewhere.
1794    
1795            * Thuban/Model/classgen.py: Renamed functions to follow the
1796            function_names_with_underscores style. Fixes RTbug #1903.
1797            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
1798    
1799            * Thuban/Model/layer.py: Import gdal only if it available.
1800            (RasterLayer): Handle the case where the gdal library is unavailable.
1801            Addresses RTbug #1877.
1802    
1803            * Thuban/Model/load.py (XMLReader): Moved into seperate file
1804            xmlreader.py.
1805    
1806            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
1807            file xmlwriter.py.
1808    
1809            * Thuban/Model/resource.py: Renamed functions to following the
1810            function_names_with_underscores style.
1811            (has_gdal_support): New function that returns true if the gdal
1812            library is available. Addresses RTbug #1877.
1813    
1814            * Thuban/UI/application.py (ThubanApplication.OpenSession):
1815            Display a message box if the gdal library is not available, but
1816            only if there are any layers that would use it. Addresses RTbug #1877.
1817    
1818            * Thuban/UI/classgen.py: Use renamed projection resource functions.
1819            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
1820            when using integers versus floats.
1821    
1822            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
1823            determine if the "Add Image Layer" menu option should be
1824            greyed out or not. Addresses RTbug #1877.
1825    
1826            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
1827    
1828            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
1829            optimize if a raster layer is visible. Fixes RTbug #1931.
1830            Only draw the raster layer if the gdal library is available.
1831            Addresses RTbug #1877.
1832    
1833            * test/test_classgen.py: Add tests for generate_singletons,
1834            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
1835            (test_calculate_quantiles): Fix some tests to catch the new
1836            ValueError that is raised.
1837    
1838            * test/test_proj.py: Use renamed projection resource functions.
1839    
1840            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
1841            test for saving classified layers. Fixes RTbug #1902.
1842            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
1843    
1844    2003-06-12  Jan-Oliver Wagner <[email protected]>
1845    
1846            Fix for http://intevation.de/rt/webrt?serial_num=1900.
1847    
1848            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
1849    
1850            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
1851            multiplechoicedialog.py rather than from the wxPython library.
1852    
1853    2003-06-11  Frank Koormann  <[email protected]>
1854    
1855            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
1856            update.
1857    
1858    2003-06-11  Frank Koormann  <[email protected]>
1859    
1860            * Thuban/Lib/fileutil.py (get_application_dir): New function to
1861            determine the absolute .thuban/thuban directory under
1862            "posix" (os.expanduser) and "nt" (read AppData registry key).
1863    
1864            * Thuban/Model/resource.py: Use get_application_dir
1865    
1866            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1867            Use get_application_dir.
1868    
1869    2003-06-10  Bernhard Herzog  <[email protected]>
1870    
1871            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
1872            the messages MAP_LAYERS_REMOVED messages
1873            (LayerTableFrame.OnClose): Unsubscribe from it.
1874            (LayerTableFrame.map_layers_removed): New. Receiver for
1875            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
1876            dialog is showing is removed.
1877    
1878    2003-06-10  Bernhard Herzog  <[email protected]>
1879    
1880            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
1881            of the receivers list so that unsubscribing in a receiver doesn't
1882            modify it while iterating over it.
1883    
1884            * test/test_connector.py
1885            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
1886            unsubscribing in a receiver works correctly. See docstring for
1887            details
1888    
1889    2003-06-10  Bernhard Herzog  <[email protected]>
1890    
1891            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
1892            message.
1893    
1894            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
1895            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
1896            LAYER_CHANGED will still be sent if the classification changes.
1897    
1898            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
1899            parameter so we can subscribe to some of its messages
1900            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
1901            and the layer's LAYER_SHAPESTORE_REPLACED
1902            (Classifier.unsubscribe_messages): New. Unsubscribe from message
1903            subscribed to in __init__
1904            (Classifier.map_layers_removed)
1905            (Classifier.layer_shapestore_replaced): receivers for the messages
1906            subscribed to in __init__. Unsubscribe and close the dialog
1907    
1908            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
1909            the map to the Classifier dialog
1910    
1911            * test/test_layer.py (SetShapeStoreTests): Derive from
1912            SubscriberMixin as well so we can test messages
1913            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
1914            messages
1915            (SetShapeStoreTests.tearDown): Clear the messages again
1916            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
1917            for the modified flag too
1918            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
1919            to check whether SetShapeStore sets the modified flag
1920            (SetShapeStoreTests.test_set_shape_store_different_field_name)
1921            (SetShapeStoreTests.test_set_shape_store_same_field)
1922            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
1923            Add tests for the messages. This checks both the new
1924            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
1925    
1926    2003-06-06  Jan-Oliver Wagner <[email protected]>
1927    
1928            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
1929            the menu items.
1930    
1931    2003-06-05  Frank Koormann  <[email protected]>
1932    
1933            * Thuban/UI/identifyview.py (IdentifyView.__init__):
1934            Layout reimplemented without panel. Make life easier to fit the list
1935            in the dialog.
1936    
1937    2003-06-05  Frank Koormann  <[email protected]>
1938    
1939            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
1940            once on initialisation (Former implementation resulted in multiple
1941            entries for each projection).
1942            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
1943            if set, select the projection found under the specified name. This
1944            overwrites any other selection estimate.
1945            Removed projchoice filling from this method.
1946            (ProjFrame._OnSave, ProjFrame._OnAddToList):
1947            Updated call of ProjFrame.__FillAvailList
1948            (LCCPanel._DoLayout): Moved parameter controls in more common order.
1949    
1950            * Resources/Projections/defaults.proj: Extended defaults representing
1951            various common European projections.
1952    
1953    2003-06-05  Frank Koormann  <[email protected]>
1954    
1955            * Thuban/UI/identifyview.py (IdentifyView.__init__):
1956            Use ListCtrl instead of GridCtrl
1957    
1958            * Thuban/Model/resource.py:
1959            Guess location of .thuban directory from tempdir parent directory.
1960    
1961            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1962            Guess location of .thuban directory from tempdir parent directory.
1963    
1964    2003-06-04  Bernhard Herzog  <[email protected]>
1965    
1966            Do not cache the values returned by the tree widget's
1967            GetFirstChild and GetNextChild methods because it led to lots of
1968            segfaults. The new way requires more brute force but is more
1969            reliable.
1970    
1971            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
1972            variable layer2id
1973            (LegendTree.find_layer): New method to do with brute force what
1974            layer2id tried to accomplish
1975            (LegendTree._OnMsgLayerChanged)
1976            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
1977            Use find_layer instead of layer2id
1978            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
1979            update layer2id anymore
1980            (LegendTree._OnMsgMapLayersRemoved)
1981            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
1982    
1983    2003-06-03  Thomas Koester  <[email protected]>
1984    
1985            * Thuban/Model/classgen.py (GenQuantiles0): New function.
1986    
1987    2003-06-02  Bernhard Herzog  <[email protected]>
1988    
1989            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
1990            New commands.
1991            (main_menu): Add the new commands.
1992            (MainWindow.TableRename): New. Implementation of the table_rename
1993            command.
1994            (MainWindow.RenameLayer): New. Implementation of the layer_rename
1995            command.
1996    
1997            * Thuban/Model/session.py (Session.AddTable): call self.changed to
1998            set the modified flag
1999    
2000            * test/test_session.py (TestSessionSimple.test_add_table): Test
2001            whether the modified flag is set properly
2002    
2003            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
2004            instead of issue so that the modified flags get updated.
2005    
2006            * test/test_base.py (SomeTitledObject): Derive from Modifiable
2007            instead of Publisher to reflect reality better and to accomodate
2008            the fact that SetTitle now calls changed instead of issue
2009    
2010    2003-06-02  Bernhard Herzog  <[email protected]>
2011    
2012            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
2013            acquisition has to happen before the try in a try-finally.
2014    
2015    2003-06-02  Bernhard Herzog  <[email protected]>
2016    
2017            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
2018            possible that a layer is removed that is not currently selected in
2019            the legend so don't check for this.
2020    
2021    2003-05-30  Bernhard Herzog  <[email protected]>
2022    
2023            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
2024            variables to None that have direct or indirect references to
2025            shapefiles or dbf files to make sure that they do go away and the
2026            files are closed.
2027    
2028    2003-05-30  Bernhard Herzog  <[email protected]>
2029    
2030            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
2031            availImgListIndices when a new image list is created
2032            
2033    2003-05-30  Bernhard Herzog  <[email protected]>
2034    
2035            * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
2036            changing_selection to indicate whether the LegendTree code itself
2037            is currently changing the selection
2038            (LegendTree.normalize_selection): New method to normalize the
2039            selection by selecting the layer item even if the user clicked on
2040            the classification.
2041            (LegendTree._OnSelChanged): normalize the selection. This works
2042            around a bug in wx which doesn't keep track of the selection
2043            properly when subtrees are deleted.
2044    
2045    2003-05-30  Bernhard Herzog  <[email protected]>
2046    
2047            * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
2048            maximum and minimum scale factors.
2049    
2050            * test/test_classgen.py (ClassGenTest.test): Update to reflect the
2051            changes in classgen.py
2052    
2053    2003-05-30  Jonathan Coles   <[email protected]>
2054    
2055            * Thuban/Model/classgen.py: Remove ClassGenerator class but make
2056            all the methods functions. Fixes RTBug #1903.
2057    
2058            * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
2059            to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
2060            RTBug #1907.
2061    
2062            * Thuban/UI/classgen.py: Use classgen functions that were part
2063            of the ClassGenerator class. Put try/finally blocks around
2064            code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
2065            RTBug #1904.
2066    
2067            * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
2068    
2069            * Thuban/UI/legend.py: The legend was cleared and repopulated any
2070            time something changed which caused some state to be lost such
2071            as which children were expanded or collapsed. Fixes RTBug #1901.
2072            (LegendTree._OnMsgMapLayersAdded): Add only new layers.
2073            (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
2074            the legend but not in the map.
2075            (LegendTree.__FillTree): Move main functionality out into smaller
2076            methods that can be used by other methods.
2077            (LegendTree.__FillTreeLayer): Reuse old slots in the image list
2078            if they are available.
2079            (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
2080            that we override the wxTreeCtrl method. Iterate over children
2081            and call __RemoveLayer.
2082            (LegendTree.__AddLayer): New. Add a new layer to the legend.
2083            (LegendTree.__RemoveLayer): Remove a layer from the legend.
2084            (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
2085            Should only be called with the id of a layer branch.
2086            (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
2087            Returns the root item or creates one if necessary.
2088    
2089            * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
2090            ProjectRasterFile with tuple arguments instead of strings.
2091    
2092            * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
2093            with try/finally. Fixes RTBug #1904.
2094    
2095            * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
2096            with try/finally. Fixes RTBug #1904.
2097            (MapCanvas.FitSelectedToWindow): If a single point is selected
2098            simply center it on the display. Fixes RTBug #1849.
2099    
2100            * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
2101            to be compiled as a standalone app. Now the code can only be
2102            called from Python which simplifies the parameter passing.
2103            (ProjectRasterFile): Handle Python arguments. Remove code that
2104            checks for a destination dataset. Add more clean up code.
2105    
2106            * test/test_map.py (TestMapWithContents.test_raise_layer_top,
2107            TestMapWithContents.test_lower_layer_bottom):
2108            Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
2109            Fixes RTBug #1907.
2110    
2111            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
2112            extent to the map when the legend is toggled. Fixes RTBug #1881.
2113    
2114    2003-05-29  Jan-Oliver Wagner <[email protected]>
2115    
2116            * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
2117            unsubscribes all that is subcribed in __init__.
2118    
2119    2003-05-28  Bernhard Herzog  <[email protected]>
2120    
2121            * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
2122            (MainWindow.CanDuplicateLayer): New methods to implement the
2123            Layer/Duplicate command.
2124            (layer_duplicate command): New.
2125            (main_menu): Add layer_duplicate to the Layer menu.
2126    
2127    2003-05-28  Bernhard Herzog  <[email protected]>
2128    
2129            * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
2130            renderer so that NULL/None values get displayed differently (by a
2131            gray rectangle).
2132            (TableGrid.__init__): Override the default renderers
2133    
2134    2003-05-28  Bernhard Herzog  <[email protected]>
2135    
2136            * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
2137            classification to "None" if the type of the field has changed.
2138    
2139            * test/test_layer.py (SetShapeStoreTests): New. Class with a few
2140            test for the Layer.SetShapeStore method
2141    
2142    2003-05-28  Jan-Oliver Wagner <[email protected]>
2143    
2144            * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
2145            does not necessarily have a filename).
2146    
2147    2003-05-28  Jan-Oliver Wagner <[email protected]>
2148    
2149            * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
2150            sort the selection list for the dialog.
2151    
2152    2003-05-28  Frank Koormann  <[email protected]>
2153    
2154            * extensions/thuban/wxproj.cpp
2155            (project_point): Removed cast to int for projected point coordinates.
2156            (shape_centroid): Return last point if all polygon vertices fall
2157            to one point.
2158    
2159    2003-05-28  Bernhard Herzog  <[email protected]>
2160    
2161            * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
2162            with layers that don't have shapestores, i.e. raster layers.
2163    
2164    2003-05-28  Bernhard Herzog  <[email protected]>
2165    
2166            * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
2167            when determining the title from the filename.
2168    
2169            * test/test_dbf_table.py (TestDBFTable.test_title): Update to
2170            reflect changes in the way the title is derived from the filename
2171    
2172    2003-05-28  Frank Koormann  <[email protected]>
2173    
2174            * Thuban/UI/mainwindow.py (MainWindow.TableShow):
2175            Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
2176    
2177    2003-05-27  Bernhard Herzog  <[email protected]>
2178    
2179            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
2180            delegate SelectedLayer.
2181            (MainWindow.LayerUnjoinTable): Implement.
2182            (_can_unjoin): New. Helper function for the sensitivity of the
2183            layer/unjoin command.
2184    
2185            * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
2186            (DerivedShapeStore.OrigShapeStore): New. Return the original
2187            shapestore. Used to figure out how to unjoin.
2188            (DerivedShapeStore.Shapefile): Fix a typo.
2189    
2190    2003-05-27  Bernhard Herzog  <[email protected]>
2191    
2192            * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
2193            well
2194            (JoinDialog.__init__): Use the layer parameter and only build the
2195            left choice when a layer is given
2196            (JoinDialog.OnJoin): Handle layer joins as well
2197            (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
2198            that the user selects the "Select..." item. The sensitivitly
2199            updating is now in update_sensitivity
2200            (JoinDialog.y): New method to refactor the sensitivity update of
2201            the join button into its own method.
2202    
2203            * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
2204    
2205    2003-05-27  Bernhard Herzog  <[email protected]>
2206    
2207            * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
2208            iff there are unreferenced tables in the session
2209    
2210    2003-05-27  Bernhard Herzog  <[email protected]>
2211    
2212            * Thuban/Model/messages.py (TABLE_REMOVED): New message.
2213    
2214            * Thuban/Model/session.py (Session.UnreferencedTables): New method
2215            to return tables that are not referenced by other tables or shape
2216            stores and can be removed.
2217            (Session.RemoveTable): Issue a TABLE_REMOVED message after
2218            removing the table
2219    
2220            * Thuban/UI/mainwindow.py: Remove unused imports
2221            (MainWindow.TableClose): Implement.
2222    
2223            * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
2224            messages so that the frame will be automatically closed when a new
2225            session is opened or the table is removed.
2226            (TableFrame.OnClose): Unsubscribe the Subscriptions made in
2227            __init__
2228            (TableFrame.close_on_session_replaced)
2229            (TableFrame.close_on_table_removed): New. Subscribers that close
2230            the window
2231    
2232            * test/test_session.py (TestSessionMessages.test_remove_table)
2233            (TestSessionSimple.test_remove_table): Move the test to
2234            TestSessionSimple and add test for the TABLE_REMOVED message
2235            (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
2236            (TestSessionSimple.test_unreferenced_tables) New. Test for the
2237            UnreferencedTables method.
2238            (UnreferencedTablesTests): New. Class with some more sophisticated
2239            tests for UnreferencedTables.
2240    
2241    2003-05-27  Frank Koormann  <[email protected]>
2242    
2243            * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
2244            display has some unwanted side effects. Removed again.
2245    
2246    2003-05-27  Frank Koormann  <[email protected]>
2247    
2248            * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
2249    
2250            * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
2251    
2252    2003-05-27  Jan-Oliver Wagner <[email protected]>
2253    
2254            * test/test_menu.py (MenuTest.test): Added test for
2255            Menu.RemoveItem().
2256    
2257            * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
2258            the menu.
2259    
2260    2003-05-27  Frank Koormann  <[email protected]>
2261            
2262            Nonmodal dialogs without parent (i.e. they can fall behind the main
2263            window)
2264    
2265            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
2266            all dialogs in the dialogs dictionary and the canvas.
2267    
2268            * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
2269            parent, i.e. can fall behind other windows.
2270            (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
2271            dictionary before removing it.
2272    
2273            * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
2274    
2275            * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
2276            * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
2277            * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
2278    
2279    2003-05-27  Bernhard Herzog  <[email protected]>
2280    
2281            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
2282            tableview dialog
2283            (MainWindow.TableShow): Use ShowTableView to open the dialogs.
2284            Also, don't use the table's titles as the dialog names. The titles
2285            aren't guaranteed to be unique.
2286            (MainWindow.TableOpen): Open a table view dialog after opening the
2287            table
2288    
2289    2003-05-27  Bernhard Herzog  <[email protected]>
2290    
2291            * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
2292            effect can be achieved by simply closing the window showing the
2293            table.
2294            (MainWindow.TableHide): Removed.
2295            (main_menu): Removed "table_hide"
2296    
2297    2003-05-27  Frank Koormann  <[email protected]>
2298    
2299            Fix legend tree display problems under Win32
2300    
2301            * Thuban/UI/legend.py:  BMP_SIZE_W = 15
2302            (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
2303            (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
2304    
2305            * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
2306    
2307    2003-05-27  Jan-Oliver Wagner <[email protected]>
2308    
2309            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
2310            'after' now allows to insert separators almost anywhere in the menu.
2311    
2312    2003-05-27  Frank Koormann  <[email protected]>
2313    
2314            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
2315            "S" of selection box label to hint on hot key (Alt-S). Works under
2316            Win32 but is ignored under GTK.
2317    
2318    2003-05-26  Frank Koormann  <[email protected]>
2319    
2320            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
2321            Center Choices.
2322    
2323    2003-05-26  Bernhard Herzog  <[email protected]>
2324    
2325            Remove the Precision methods again. They're too DBF specific to be
2326            part of the table interface and they're only used in table_to_dbf
2327            anyway.
2328            
2329            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
2330            fixed precision of 12 for doubles.
2331            (TransientTableBase.Precision): Removed
2332            (AutoTransientTable.Width): Delegate to self.table.
2333    
2334            * Thuban/Model/table.py (DBFTable.Precision)
2335            (MemoryTable.Precision): Removed.
2336            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
2337            (table_to_dbf): Use a fixed precision of 12 for floats unless the
2338            column object specifies something else.
2339    
2340            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
2341            test for table_to_dbf
2342    
2343    2003-05-26  Bernhard Herzog  <[email protected]>
2344    
2345            * test/test_transientdb.py
2346            (TestTransientTable.run_iceland_political_tests): Fix a comment.
2347    
2348    2003-05-26  Bernhard Herzog  <[email protected]>
2349    
2350            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
2351            implementation. Mark parts of the file format strings for
2352            localization.
2353    
2354            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
2355            file and add the table to the tables managed by the session
2356    
2357            * test/test_session.py (TestSessionSimple.test_open_table_file):
2358            New. test case for OpenTableFile
2359    
2360    2003-05-26  Jan-Oliver Wagner <[email protected]>
2361    
2362            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
2363            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
2364            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
2365            Replace the true/false of wxWindows by True/False of Python 2.2.1.
2366    
2367    2003-05-26  Jan-Oliver Wagner <[email protected]>
2368    
2369            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
2370            already a selection present, update the grid accordingly.
2371    
2372            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
2373            resizeable and increase its initial size.
2374    
2375    2003-05-26  Frank Koormann  <[email protected]>
2376    
2377            Table export functionality
2378    
2379            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
2380            Return width (in characters) for a column.
2381            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
2382            (table_to_dbf): Write table to dbf file.
2383            (table_to_csv): Write table to csv file.
2384    
2385            * Thuban/Model/transientdb.py (TransientTableBase.Width,
2386            TransientTableBase.Precision): Return column width and precision.
2387    
2388            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
2389            or table_to_csv depending on file selection.
2390    
2391            * test/test_dbf_table.py:
2392            Test table_to_dbf (extension of former part of test).
2393    
2394            * test/test_csv_table.py:
2395            Test table_to_csv.
2396    
2397    2003-05-23  Jan-Oliver Wagner <[email protected]>
2398    
2399            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
2400            Use QueryTableFrame instead of TableFrame.
2401    
2402            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
2403            table window with 'Layer Table:' instead of 'Table:'.
2404    
2405    2003-05-23  Jan-Oliver Wagner <[email protected]>
2406    
2407            Give all tables a title via mix-in TitledObject.LayerShowTable
2408    
2409            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
2410            only if it exists.
2411    
2412            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
2413            and call its init-method with a default title. Remove Title() method.
2414    
2415            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
2416            AutoTransientTable): mix-in TitledObject and call its init-method with
2417            a default title. Remove Title() method.
2418    
2419    2003-05-23  Bernhard Herzog  <[email protected]>
2420    
2421            * Thuban/Model/session.py (Session.AddShapeStore): Define
2422            AddShapeStore analogously to AddTable.
2423    
2424            * test/test_session.py (TestSessionSimple.test_add_shapestore):
2425            New. Test for AddShapeStore
2426    
2427    2003-05-23  Jan-Oliver Wagner <[email protected]>
2428    
2429            Introducing QueryTableFrame and a very coarse ShowTable implementation.
2430    
2431            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
2432            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
2433            The latter implements the selection GUI without dependency on a layer.
2434            LayerTableFrame now is derived from QueryTableFrame and connects
2435            to a layer.
2436    
2437            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
2438            implementation that still needs work.
2439    
2440            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
2441    
2442    2003-05-22  Frank Koormann  <[email protected]>
2443    
2444            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
2445            Added "outer_join = False" as optional parameter.
2446            (TransientJoinedTable.create): If outer join is true, perform a
2447            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
2448            the left table. Records not matching are filled with 0 / None.
2449    
2450            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
2451            (JoinDialog.OnJoin): Consider outer join check box.
2452    
2453    2003-05-22  Bernhard Herzog  <[email protected]>
2454    
2455            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
2456            somewhat safer way. Storing the traceback in a local variable can
2457            lead to memory leaks
2458    
2459    2003-05-22  Bernhard Herzog  <[email protected]>
2460    
2461            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
2462            the wxMessageDialog's Destroy() method.
2463    
2464    2003-05-22  Frank Koormann  <[email protected]>
2465    
2466            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
2467            TransientTable.Title()
2468    
2469    2003-05-22  Frank Koormann  <[email protected]>
2470    
2471            Join Dialog, initial version.
2472    
2473            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
2474    
2475            * Thuban/UI/join.py (JoinDialog): Functional implementation of
2476            former framework. Renamed Table1/Table2 to LeftTable/RightTable
2477            in all occurences.
2478    
2479            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
2480            Typo fixed.
2481    
2482    2003-05-22  Bernhard Herzog  <[email protected]>
2483    
2484            Give the tables titles so that the GUI can display more meaningful
2485            names. For now the titles are fixed but depend on e.g. filenames
2486            or the titles of the joined tables.
2487    
2488            * Thuban/Model/transientdb.py (TransientTable.Title)
2489            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
2490    
2491            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
2492    
2493            * test/test_transientdb.py
2494            (TestTransientTable.test_auto_transient_table_title): New. Test
2495            for the Title method
2496            (TestTransientTable.test_transient_joined_table)
2497            (TestTransientTable.test_transient_table): Add test for the Title
2498            methods
2499    
2500            * test/test_memory_table.py (TestMemoryTable.test_title): New.
2501            Test for the Title method
2502    
2503            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
2504            the Title method
2505    
2506    2003-05-22  Bernhard Herzog  <[email protected]>
2507    
2508            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
2509            Provide a better way to destroy the layers
2510            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
2511            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
2512            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
2513            the new way to destroy the layers.
2514            (TestLayer.test_derived_store): New. Test for using a layer with a
2515            DerivedShapeStore
2516    
2517            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
2518            filename if the shape store actually has one.
2519    
2520    2003-05-22  Bernhard Herzog  <[email protected]>
2521    
2522            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
2523            for the filename
2524    
2525            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
2526            for the FileName method
2527            (TestDBFTableWriting.test_write): Fix spelling of filename
2528    
2529    2003-05-22  Thomas Koester  <[email protected]>
2530    
2531            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
2532            from SciParam that now really is immutable.
2533    
2534    2003-05-22  Frank Koormann  <[email protected]>
2535    
2536            Layer Top/Bottom placement added to legend.
2537    
2538            * Thuban/UI/legend.py
2539            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
2540            bound to tool events.
2541            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
2542            New, methods binding the event methods with the map methods.
2543    
2544            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
2545            layer at top/bottom of layer stack.
2546    
2547            * Resources/Bitmaps/top_layer.xpm: New button icon.
2548    
2549            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
2550    
2551  2003-05-22  Bernhard Herzog  <[email protected]>  2003-05-22  Bernhard Herzog  <[email protected]>
2552    
2553          * Thuban/Model/session.py (Session.RemoveTable): New method to          * Thuban/Model/session.py (Session.RemoveTable): New method to

Legend:
Removed from v.988  
changed lines
  Added in v.1561

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26