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

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

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

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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26