/[thuban]/branches/WIP-pyshapelib-bramz/ChangeLog
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26