/[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 172 by bh, Tue May 14 14:16:37 2002 UTC revision 1424 by jan, Wed Jul 16 09:52:49 2003 UTC
# Line 1  Line 1 
1    2003-07-16  Jan-Oliver Wagner <[email protected]>
2    
3            * Doc/manual/thuban-manual.xml: Added authors and an initial
4            coarse structure.
5    
6    2003-07-15  Bernhard Herzog  <[email protected]>
7    
8            * test/support.py (FloatComparisonMixin): This is a mix-in class
9            and therefore should not be derived from any other class.
10    
11            * test/test_range.py (RangeTest): FloatComparisonMixin is a
12            mix-in, so derive from TestCase as well.
13    
14    2003-07-15  Bernhard Herzog  <[email protected]>
15    
16            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
17            draw_func handling a bit to remove one layer of indirection. This
18            makes the renderer about 10% faster in the non-classifying case
19            and the code a bit cleaner
20            (MapRenderer.draw_point_shape): Add the pen and brush parameters
21            and set them in the dc. Now the draw_point_shape method and
22            wxproj's draw_polygon_shape function have basically the same
23            signature so that both can be directly used as draw_func
24    
25    2003-07-15  Bernhard Herzog  <[email protected]>
26    
27            * Thuban/Model/save.py (SessionSaver.write_classification): Encode
28            string values (in addition to the labels) as UTF 8
29    
30            * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
31            values if the field type is string
32    
33            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
34            saving a session with non-ascii string classification values.
35    
36            * test/test_load.py (TestClassification.file_contents)
37            (TestClassification.test): Check for non-ascii values in string
38            classifications
39    
40    2003-07-14  Jonathan Coles   <[email protected]>
41    
42            * test/test_view.py: New. Tests for ViewPort.
43    
44    2003-07-14  Frank Koormann   <[email protected]>
45    
46            * Thuban/Model/load.py (SessionLoader.start_map): Encode map
47            title to latin1.  Fixes https://intevation.de/rt/webrt?serial_num=2013
48    
49            * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
50            unicode strings from session file: session title, map title and
51            projection name.
52            
53    2003-07-10  Jonathan Coles   <[email protected]>
54    
55            * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
56            drag_stop, not drag_move when the mouse is released.
57    
58    2003-07-10  Jonathan Coles   <[email protected]>
59    
60            The most important part of this is the seperation of view.py into
61            two pieces. viewport.py now has a class called ViewPort which
62            contains all the non-wx parts of view.py and can therefore be
63            tested. view.py contains only the wx-specific parts and is fairly
64            simple.
65    
66            * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
67            RTTbug #1992.
68            * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
69            RTTbug #1992.
70    
71            * Thuban/Model/classgen.py (generate_singletons,
72            generate_uniform_distribution, generate_quantiles):
73            Added 'fixes' parameter so that property attributes can
74            be held constant over the generated classification groups.
75            (CustomRamp.GetProperties): Remove unused variables.
76    
77            * Thuban/Model/map.py (Map.SetProjection): Send the old
78            projection as an argument to listeners of the MAP_PROJECTION_CHANGED
79            event.
80    
81            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
82            parameter which is a list of records that restricts which
83            records are saved. Fixes RTbug #1997.
84    
85            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
86            Port exception dialog from GREAT-ER. Fixes RTbug #1993.
87    
88            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
89            to allow the user to fix line color/width on generated groups.
90            (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
91            functions to optionally fix group properties.
92    
93            * Thuban/UI/main.py (main): Set exception hook to the
94            ShowExceptionDialog. Fixes RTbug #1993.
95    
96            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
97            the table window when it is selectd to be shown.
98    
99            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
100            Export Selection button and move the export buttons underneath
101            the table.
102            (QueryTableFrame.UpdateStatusText): Added event argument so
103            that it can respond to grid selection events. The status text
104            is now updated even when the table is not associated with a
105            layer as was previously assumed.
106            (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
107            UpdateStatusText responds to these events.
108            (QueryTableFrame.OnSaveAs): Renamed to doExport.
109            (QueryTableFrame.doExport): Helper function that saves the
110            entire table, or selected rows, to a file.
111            (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
112            Respond to export button events and call doExport.
113    
114            * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
115            the function doesn't return NULL without first setting a Python
116            Error.
117    
118            * test/runtests.py (main): Only print "Unknown option" for
119            unsupported options.
120    
121            * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
122            optional epsilon argument to specify floating point accuracy.
123            (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
124            for each item test.
125    
126            * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
127            tests for saving selected records.
128    
129            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
130            tests for saving selected records.
131    
132            * test/test_map.py (TestMapWithContents.test_set_projection):
133            MAP_PROJECTION_CHANGED events send the old projection.
134    
135            * test/test_session.py
136            (TestSessionWithContent.test_forward_map_projection):
137            MAP_PROJECTION_CHANGED events send the old projection.
138    
139            * test/test_table.py (TableTest): Update tests to use non-deprecated
140            functions.
141    
142    2003-07-08  Bernhard Herzog  <[email protected]>
143    
144            * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
145            constants in the column objects are the standard ones defined in
146            the table module.
147    
148            * test/test_transientdb.py
149            (TestTransientTable.test_transienttable_to_dbf): New. Test whether
150            exporting transient tables as DBF works. This should catch the bug
151            just fixed in TransientTableBase.Width.
152    
153    2003-07-08  Bernhard Herzog  <[email protected]>
154    
155            * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
156            interpolated colors correctly.
157    
158            * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
159            New. Test case for the fix in classgen.py
160    
161    2003-07-08  Bernhard Herzog  <[email protected]>
162    
163            * test/runtests.py (main): Make the default output less verbose
164            and add a verbosity option (-v) to get the old output
165    
166    2003-07-08  Bernhard Herzog  <[email protected]>
167    
168            * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
169            0.9.
170    
171            * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
172            New. Return the join type
173    
174            * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
175            DTD
176            (SessionSaver.write_data_containers): Save the join type for
177            joined tables
178    
179            * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
180            namespace
181            (SessionLoader.start_jointable): Handle the jointype attribute
182    
183            * test/test_load_0_8.py: New. Effectively a copy of test_load.py
184            as of Thuban 0.8. These are now tests to determine whether Thuban
185            can still read files generated by Thuban 0.8
186    
187            * test/test_load.py (LoadSessionTest.dtd)
188            (TestSingleLayer.file_contents)
189            (TestLayerVisibility.file_contents, TestLabels.file_contents)
190            (TestLayerProjection.file_contents)
191            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
192            (TestJoinedTable.file_contents)
193            (TestLoadError.file_contents): Update for new DTD
194            (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
195            for new join type attribute
196    
197            * test/test_save.py (SaveSessionTest.dtd)
198            (SaveSessionTest.testEmptySession)
199            (SaveSessionTest.testSingleLayer)
200            (SaveSessionTest.testLayerProjection)
201            (SaveSessionTest.testRasterLayer)
202            (SaveSessionTest.testClassifiedLayer)
203            (SaveSessionTest.test_dbf_table)
204            (SaveSessionTest.test_joined_table): Update for new DTD
205            (SaveSessionTest.test_joined_table): Add test for new join type
206            attribute
207    
208    2003-07-04  Bernhard Herzog  <[email protected]>
209    
210            * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
211            function for table_to_dbf
212            (table_to_dbf): Deal with names longer than the 10 character limit
213    
214            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
215            doc-string
216            (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
217            long column names
218    
219    2003-07-03  Bernhard Herzog  <[email protected]>
220    
221            * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
222    
223    2003-07-03  Bernhard Herzog  <[email protected]>
224    
225            * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
226            for the Thuban manual and README with some basic information about
227            the manual
228    
229    2003-07-03  Bernhard Herzog  <[email protected]>
230    
231            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
232            Update doc-string
233            (TransientJoinedTable.create): Do not modify the column objects of
234            the input tables in place and copy all columns of the input tables
235            into the joined table after all.
236    
237            * test/test_transientdb.py
238            (TestTransientTable.test_transient_joined_table_same_column_name):
239            Update to reflect the new behavior
240            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
241            Update to reflect the new behavior
242            (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
243            New test case for a bug which modified the column objects in place
244    
245    2003-07-02  Jonathan Coles   <[email protected]>
246    
247            * Thuban/Model/classgen.py (generate_singletons,
248            generate_uniform_distribution, generate_quantiles,
249            GenQuantiles0): Make sure maxValue isn't less than
250            one, otherwise we could divide by zero.
251    
252            * test/test_classgen.py (ClassGenTest.doClassRangeTest,
253            ClassGenTest.doClassSingleTest): Call doBoundsTest to
254            check the end classification groups against the
255            proper property values.
256            (ClassGenTest.doBoundsTest): New. Checks the first and
257            last classification groups to make sure their properties
258            are the correct upper and lower bounds for a color ramp.
259    
260    2003-07-02  Jonathan Coles   <[email protected]>
261    
262            * Thuban/Model/classgen.py (generate_singletons,
263            generate_uniform_distribution, generate_quantiles,
264            GenQuantiles0): The denominator was one to high when
265            calculating the index for the ramp causing the index
266            to never to reach one.
267    
268    2003-07-02  Jonathan Coles   <[email protected]>
269    
270            Changed the singature of ClassGroupRange.__init__ and
271            ClassGroupRange.SetRange() so that the min/max values are
272            passed as a tuple. This makes a better calling scheme for
273            when a Range object is passed instead.
274    
275            * Thuban/Model/classgen.py: Fixed parameters to
276            ClassGroupRange constructor.
277    
278            * Thuban/Model/classification.py (ClassGroupRange.__init__):
279            Consolidate the min/max parameters into a single _range which
280            can either be a tuple or a Range object.
281            (ClassGroupRange.SetRange): Consolidate the min/max parameters
282            into a single _range which can either be a tuple or a Range object.
283    
284            * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
285            call to ClassGroupRange constructor to use a tuple.
286    
287            * Thuban/Model/layer.py (Layer.SetClassification): Switch
288            the classification instance variable to the new class
289            before calling _set_layer otherwise subscribers to a
290            LAYER_CHANGED event will not see any difference.
291    
292            * test/test_classification.py: Fix tests of ClassGroupRange
293            so that they use the new signature.
294    
295            * test/test_load.py: Fix use of ClassGroupRange so that it
296            uses the new signature.
297    
298            * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
299            uses the new signature.
300    
301            * test/test_save.py: Fix use of ClassGroupRange so that it
302            uses the new signature.
303    
304    
305    2003-07-01  Jonathan Coles   <[email protected]>
306    
307            * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
308            Import used objects/class from color.
309            (generate_singletons): We don't
310            need the numGroups parameter anymore because we are using
311            the new ramps with GetProperties().
312            (generate_uniform_distribution): Use new ramp method
313            GetProperties().
314            (generate_quantiles, GenQuantiles0): Use new ramp method
315            GetProperties().
316            (CustomRamp.SetNumGroups): Removed. The ramps now map
317            a value from 0 to 1 to class properties so the number
318            of groups is not needed ahead of time.
319            (CustomRamp.next): Removed. CustomRamp does not support
320            interation anymore.
321            (CustomRamp.GetProperties): Returns a ClassGroupProperties
322            object based on the index value from 0 to 1 that is
323            passed to it.
324            (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
325            Made into instances of Monochromatic class instread of
326            deriving from it.
327            (HotToCold.SetNumGroups): Removed. See CustomRamp.
328            (HotToCold.next): Removed. See CustomRamp.
329    
330            * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
331            (Classification.SetField, Classification.SetFieldType):
332            Replaced with SetFieldInfo.
333            (Classification.SetFieldInfo): New. Does a better job of
334            what SetField and SetFieldType used to do by combining
335            their function since they should really always be done
336            at the same time.
337            (Classification.SetLayer): Renamed to _set_layer.
338            (Classification._set_layer): Should only be called from
339            Layer's SetClassification. This does not cause a recursive
340            call as SetLayer did because we know that Layer knows about
341            the classification.
342    
343            * Thuban/Model/color.py: Fixes RTbug #1971.
344            (_Transparent): Renamed from Transparent so it doesn't
345            conflict with the module variable.
346            (Transparent, Black): Renamed from Color.Transparent,
347            Color.Black so they are not class variables.
348    
349            * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
350            (Layer.Destroy): We don't need to call SetClassification
351            anymore to clear out the back reference in the classifcation
352            to the layer. It's better to set it to None using _set_layer,
353            and we won't be creating another clas object too.
354            (Layer.SetClassification): Classification._set_layer is not
355            recursive so remove all the locking variables. Also clean
356            up the code so that it remains unchanged if something fails.
357    
358            * Thuban/Model/load.py: Fixes RTbug #1971.
359            (SessionLoader.start_classification): Call
360            Classification.SetFieldInfo().
361    
362            * Thuban/Model/save.py: Removed import of Color which wasn't
363            being used.
364    
365            * Thuban/UI/classgen.py: Fixes RTbug #1972.
366            (ClassGenDialog.__init__): Color ramps are now instances
367            already so we don't need to create any new objects.
368            (ClassGenDialog.OnOK): Check for numGroups is no longer
369            necessary because we never use it.
370    
371            * Thuban/UI/classifier.py: Fixes RTbug #1971.
372            (Classifier.__BuildClassification, Classifier.__SetGridTable):
373            Call Classification.SetFieldInfo() instead of SetFieldType.
374    
375            * Thuban/UI/renderer.py: Fixes RTbug #1971.
376    
377            * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
378            (MapCanvas.__init__): Subscribe to the idle time event. Set
379            background color to white.
380            (MapCanvas.OnPaint): Set a flag indicating that we should
381            render the map during idle time. If we already have a bitmap
382            just draw it now.
383            (MapCanvas.OnIdle): New. Render the map only during idle time.
384            This also fixes a problem with the busy cursor under gtk.
385    
386            * test/test_classgen.py (ClassGenTest.test_generate_singletons):
387            Fix calls to generate_singletons because the signature changed.
388    
389            * test/test_classification.py: Fix color references and
390            change calls to Classification.[SetField|SetFieldType] to
391            SetFieldInfo.
392    
393            * test/test_load.py: Fix color references.
394    
395            * test/test_load_0_2.py: Fix color references.
396    
397            * test/test_save.py (SaveSessionTest.testClassifiedLayer):
398            Change calls to Classification.[SetField|SetFieldType] to
399            SetFieldInfo.
400    
401    2003-07-01  Frank Koormann   <[email protected]>
402    
403            MERGE from the greater-ms3 branch.
404    
405            * test/test_transientdb.py
406            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
407            New. Test join of two tables with partly equal column names.
408    
409            * Thuban/Model/transientdb.py (TransientJoinedTable.create):
410            If duplicates in left and right tables column names are found,
411            append '_' (underscores) to the name until it is unique.
412            Create always new internal names for the resulting table and reference
413            columns in the join statement with <table>.<column>
414    
415    2003-07-01  Bernhard Herzog  <[email protected]>
416    
417            * test/test_transientdb.py
418            (TestTransientTable.test_transient_joined_table_same_column_name):
419            New. Test whether joining on columns with the same names in both
420            tables works.
421            
422            * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
423            sure to use the right internal names even when joining on field
424            with the same names in both tables. Also, detect duplicate names
425            in the joined table correctly.
426    
427    2003-07-01  Frank Koormann   <[email protected]>
428    
429            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
430            Reverse List of layers to render in same order as in desktop legend.
431    
432    2003-06-30  Jonathan Coles   <[email protected]>
433    
434            * Thuban/version.py (make_tuple): Takes a version string
435            and splits it into a tuple of at most three integers.
436            Used make_tuple() to make tuple versions of the version
437            numbers.
438    
439            * Thuban/UI/about.py: Add Thuban email addresses.
440    
441    2003-06-30  Jonathan Coles   <[email protected]>
442    
443            * Thuban/version.py: SQLite/PySQLite version dependencies
444            were too high.
445    
446    2003-06-30  Jonathan Coles   <[email protected]>
447    
448            * Thuban/version.py: Update version to 0.8.1
449            
450            * MANIFEST.in: Added Projections so that default.proj is
451            included.
452    
453    2003-06-26  Jonathan Coles   <[email protected]>
454    
455            New About box with lots more information including library
456            versions and credits. More/better version checking before
457            Thuban starts.
458    
459            * Thuban/UI/about.py: New. New About box that displays
460            library version information and credits.
461    
462            * Thuban/version.py: Added new 'versions' dictionary which
463            contains the verions of various libraries which are checked
464            when the module loads.
465            (verify_versions): Check all version numbers and returns
466            a list of errors.
467    
468            * Thuban/UI/classifier.py (Classifier.__EnableButtons):
469            Reset the status of the buttons as the situation warrants,
470            but in a better more reliable way by not relying on the
471            current status to determine what needs to change.
472    
473            * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
474            (verify_versions): Remove most of the code since it is
475            now in Thuban.version.verify_versions.o
476    
477            * Thuban/UI/mainwindow.py (MainWindow.About): Call new
478            About box in Thuban.UI.about.
479    
480            * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
481            Returns the version of gdal library being used as a string.
482    
483            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
484            Removed.
485            (get_proj_version): Return the version of PROJ that the file
486            was compiled with.
487            (get_gtk_version): Return th version of GTK that the file
488            was compiled with.
489    
490    2003-06-25  Jonathan Coles   <[email protected]>
491    
492            * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
493            of the SelectPropertiesDialog should be self so the window
494            appears on top.
495            (ClassGroupPropertiesCtrl.DoEdit): The parent
496            of the SelectPropertiesDialog should be self so the window
497            appears on top.
498    
499            * Thuban/UI/resource.py: Cleaned up how we determine file
500            extensions.
501            (GetImageResource): Return an wxImage from our Resources.
502    
503    2003-06-24  Jonathan Coles   <[email protected]>
504    
505            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
506            Check that a layer has a classification before trying
507            to get it. Raster layers don't have classifications.
508    
509    2003-06-23  Jonathan Coles   <[email protected]>
510            
511            * setup.py: Add Resources/XML to resource list.
512        
513    2003-06-23  Jonathan Coles   <[email protected]>
514    
515            * setup.cfg: Fix copyright dates
516        
517    2003-06-23  Jonathan Coles   <[email protected]>
518    
519            * MANIFEST.in: Update with Resources/XML
520    
521            * setup.py: Don't include Locale resources yet as we don't
522            have any and it causes problems building the distribution
523            for Windows. Update version to 0.8.0.
524    
525            * Doc/thuban.dtd: Removed since it is now in Resources/XML.
526    
527            * Thuban/UI/mainwindow.py: Add blank line at the end because
528            file was not being read correctly building the Windows
529            distribution.
530    
531    2003-06-23  Jonathan Coles   <[email protected]>
532    
533            * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
534    
535            * Thuban/version.py: Temporarily update longversion for
536            the 0.8 release so that it doesn't have the cvs revision.
537    
538    2003-06-23  Jonathan Coles   <[email protected]>
539    
540            * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
541            to make sure that we don't create reentrant possibilities with
542            wxYield.
543    
544            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
545            directly to avoid the wxSafeYield() call which generates an
546            OnPaint event causing infinite recursion. Don't try to catch
547            exception anymore. This was for before there were limits on map
548            scaling.
549    
550    2003-06-23  Bernhard Herzog  <[email protected]>
551    
552            Bug fix for RT #1961:
553    
554            * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
555            Register DerivedShapestores with the session
556    
557            * Thuban/Model/session.py (Session.Tables): Make sure each table
558            is only listed once.
559    
560            * test/test_load.py (TestJoinedTable.test): Add check_format call.
561            Update file contents to match the one written out.
562    
563    2003-06-20  Bernhard Herzog  <[email protected]>
564    
565            * test/xmlsupport.py (SaxEventLister.startElementNS)
566            (SaxEventLister.endElementNS): Do not include the qname. Python
567            2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
568            is (presumably incorrectly) None, whereas it's a string with the
569            element name in the later versions.
570    
571            * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
572            (TestEventList.test_even_list_namespace): Update tests to reflect
573            the new behaviour
574            (TestEventList.test_even_list_id_normalization): Fix doc-string
575    
576    2003-06-20  Jonathan Coles   <[email protected]>
577    
578            * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
579            by deriving classes to determine if that layer supports shapes.
580            (Layer): Override HasShapes and return true.
581    
582            * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
583            instead of a direct call to wx[Begin|End]CusyCursor().
584            (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
585            table data.
586    
587            * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
588            New. Wrappers around the wxWindows functions that allow us to
589            make additional calls such as wxYield which gives the native
590            system a chance to update the cursor correctly.
591    
592            * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
593            instead of a direct call to wx[Begin|End]CusyCursor().
594    
595            * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
596            instead of a direct call to wx[Begin|End]CusyCursor().
597            (MapCanvas.find_shape_at): Check if the current search layer
598            support shapes, otherwise go on to the next layer.
599    
600            * test/test_layer.py: Add tests in each type of layer for
601            HasClassification() and HasShapes()
602    
603    2003-06-20  Jonathan Coles   <[email protected]>
604    
605            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
606            turning on the busy cursor to allow the system to change the
607            cursor before we begin painting. This fixes a problem that
608            was occuring only under GTK. Fixes RTbug #1840.
609    
610    2003-06-20  Bernhard Herzog  <[email protected]>
611    
612            * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
613            version.
614    
615            * Thuban/Model/save.py (sort_data_stores): New. Make topological
616            sort of the data sources so they can be written with sources that
617            data sources that depend on other data sources come after the
618            sources they depend on.
619            (SessionSaver.__init__): Add idmap instance variable to map from
620            objects to the ids used in the file.
621            (SessionSaver.get_id, SessionSaver.define_id)
622            (SessionSaver.has_id): New. Methods to manage the idmap
623            (SessionSaver.write): Use thuban-0.8.dtd
624            (SessionSaver.write_session): Add a namespace on the session and
625            write out the data sources before the maps.
626            (SessionSaver.write_data_containers): New. Write the data
627            containers.
628            (SessionSaver.write_layer): Layer elements now refer to a
629            shapestore and don't contain filenames anymore.
630    
631            * Thuban/Model/load.py (LoadError): Exception class to raise when
632            errors in the files are discovered
633            (SessionLoader.__init__): Define dispatchers for elements with a
634            thuban-0.8 namespace too.
635            (SessionLoader.check_attrs): New helper method to check and
636            convert attributes
637            (AttrDesc): New. Helper class for SessionLoader.check_attrs
638            (SessionLoader.start_fileshapesource)
639            (SessionLoader.start_derivedshapesource)
640            (SessionLoader.start_filetable, SessionLoader.start_jointable):
641            Handlers for the new elements in the new fileformat
642            (SessionLoader.start_layer): Handle the shapestore attribute in
643            addition to filename.
644            (SessionLoader.start_table, SessionLoader.end_table): Removed.
645            They were never used in the old formats and aren't needed for the
646            new.
647    
648            * Thuban/Model/session.py (Session.DataContainers): New method to
649            return all "data containers", i.e. shapestores and tables
650    
651            * test/xmlsupport.py (SaxEventLister.__init__)
652            (SaxEventLister.startElementNS, sax_eventlist): Add support to
653            normalize IDs.
654    
655            * test/test_xmlsupport.py
656            (TestEventList.test_even_list_id_normalization): New test case for
657            id normalization
658    
659            * test/test_load.py (LoadSessionTest.check_format): Use ID
660            normalization
661            (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
662            class atrributes used for ID normalization
663            (TestSingleLayer, TestLayerVisibility, TestLabels.test)
664            (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
665            file format
666            (TestJoinedTable): New test for loading sessions with joined
667            tables.
668            (TestLoadError): New. Test whether missing required attributes
669            cause a LoadError.
670    
671            * test/test_save.py (SaveSessionTest.thubanids)
672            (SaveSessionTest.thubanidrefs): New class attributes for ID
673            normalization in .thuban files.
674            (SaveSessionTest.compare_xml): Use id-normalization.
675            (SaveSessionTest.testEmptySession)
676            (SaveSessionTest.testLayerProjection)
677            (SaveSessionTest.testRasterLayer)
678            (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
679            (SaveSessionTest.testLayerProjection): The filename used was the
680            same as for testSingleLayer. Use a different one.
681            (SaveSessionTest.test_dbf_table)
682            (SaveSessionTest.test_joined_table): New test cases for saving the
683            new data sources structures.
684            (TestStoreSort, MockDataStore): Classes to test the sorting of the
685            data stores for writing.
686    
687            * test/runtests.py: Add CVS keywords
688    
689    2003-06-20  Jonathan Coles   <[email protected]>
690    
691            * test/test_session.py
692            (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
693            Use the cultural_landmark-point.dbf file for the store so that
694            the table rows and shape count match.
695    
696    2003-06-20  Jonathan Coles   <[email protected]>
697    
698            * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
699            an exception if the number of shapes is different from the
700            number of rows in the table. Address RTbug #1933.
701    
702            * test/test_layer.py (TestLayer.test_derived_store): Add
703            a test for the new exception in DerivedShapeStore.__init__.
704    
705            * test/support.py (FloatTestCase): Removed since there is
706            already FloatComparisonMixin. Fixes RTbug #1954.
707            (FloatComparisonMixin.assertFloatEqual): Include test for
708            infinity that was part of FloatTestCase.
709    
710            * test/test_range.py (RangeTest): Inherit from
711            support.FloatComparisonMixin now that we don't have
712            support.FloatTestCase.
713    
714    2003-06-20  Bernhard Herzog  <[email protected]>
715    
716            * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
717            the implementation in xmlsupport instead.
718            (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
719    
720            * test/test_proj.py: Import sax_eventlist from xmlsupport instead
721            of test_save
722    
723    2003-06-20  Bernhard Herzog  <[email protected]>
724    
725            * test/test_load.py (LoadSessionTest.check_format): New helper
726            method to make sure the test files we load might have been written
727            by the current thuban version.
728            (ClassificationTest.TestLayers, TestSingleLayer.test)
729            (TestLayerVisibility.test, TestClassification.test)
730            (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
731            Add check_format() calls and fix the thuban data to match the data
732            that would be written by saving the session loaded from it.
733    
734            * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
735            the same class and function in test_save.
736    
737            * test/test_xmlsupport.py (TestEventList): New. test cases for
738            sax_eventlist
739    
740    2003-06-20  Bernhard Herzog  <[email protected]>
741    
742            * Resources/XML/thuban.dtd: Add comment about which versions of
743            Thuban are covered by this DTD
744            (map): Fix content model for layers and raster layers. There can
745            be any number or layers and raster layers in any order.
746    
747    2003-06-20  Jonathan Coles   <[email protected]>
748    
749            This is mainly about fixing RTbug #1949.
750    
751            * Thuban/Model/classification.py: Remove "from __future__"
752            import statement since python 2.2 is the earliest supported
753            version.
754    
755            * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
756            Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
757            depending on the units this projection *forwards* into.
758    
759            * Thuban/Model/save.py (SessionSaver.write_classification):
760            Remove unnecessary use of lambdas and nested functions.
761    
762            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
763            adjustment here if the map projection uses degrees.
764    
765            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
766            scale adjust code since it is now done before calling
767            this method. Don't do anything if the map projection
768            is None.
769    
770    2003-06-19  Bernhard Herzog  <[email protected]>
771    
772            Move version specific load tests to their own file.
773    
774            * test/test_load.py: Expand the doc-string to explain a bit how to
775            handle file format changes.
776            (TestClassification.test): Update the docstring as this test is
777            not about Thuban 0.2 anymore.
778    
779            * test/test_load_0_2.py: New file with the load tests for thuban
780            files created with Thuban 0.2 and earlier.
781    
782    2003-06-19  Bernhard Herzog  <[email protected]>
783    
784            Add XML validation to some of the tests. Validation will only be
785            done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
786            To make the DTD available to the test cases it's moved into
787            Resources/XML
788    
789            * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
790            for versions up to and including 0.2. Two slight changes: added an
791            encoding specification and fixed the comment which refered to
792            GRASS, not Thuban
793    
794            * test/xmlsupport.py: New support module for tests involving XML.
795            Currently there's a mix-in class for XML validation.
796    
797            * test/test_xmlsupport.py: New. Tests for the xmlsupport module
798    
799            * test/test_save.py (SaveSessionTest): Derive from ValidationTest
800            so that we can validate the
801            (SaveSessionTest.testEmptySession)
802            (SaveSessionTest.testSingleLayer)
803            (SaveSessionTest.testSingleLayer)
804            (SaveSessionTest.testLayerProjection)
805            (SaveSessionTest.testRasterLayer)
806            (SaveSessionTest.testClassifiedLayer): Validate the generated XML
807    
808            * test/runtests.py (main): Call print_additional_summary instead
809            of print_garbage_information
810    
811            * test/support.py (resource_dir): New function to return the
812            "Resource" subdirectory
813            (print_additional_summary): New function to combine several
814            summary functions
815            (run_tests): Use print_additional_summary instead of calling
816            print_garbage_information directly
817    
818    2003-06-19  Bernhard Herzog  <[email protected]>
819    
820            * Doc/thuban.dtd (classification): Correct the content model of
821            the classification element.
822            (projection): Add the "name" attribute
823    
824    2003-06-19  Frank Koormann   <[email protected]>
825    
826            MERGE from the greater-ms3 branch.
827    
828            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
829            scale if projection is latlong to get better estimate.
830    
831            Fix problem of hidden properties dialog under windows after double
832            click on layer tree:
833            The tree control always gets an Expanded / Collapsed event after
834            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
835            raises the already displayed window.
836    
837            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
838            raiseProperties initialized to prevent endless loops
839            (LegendTree._OnItemActivated): Depending on self.raiseProperties
840            simply raise the properties or open the dialog and issue a second
841            event.
842    
843    2003-06-18  Jonathan Coles   <[email protected]>
844    
845            * setup.py: Fix a few problems that occured under Windows.
846    
847    2003-06-18  Jonathan Coles   <[email protected]>
848    
849            When Thuban loaded the map was redrawn twice because the
850            legend was being opened after the mainwindow was created
851            and not during its creation. This meant the map was drawn
852            initially and then had to be redrawn when the legend
853            caused the display to change. Now the legend is opened
854            in the mainwindow constructor which resolves this issue.
855    
856            Also, although we were checking for the existence of
857            gdal and gdalwarp modules, the gdalwarp extension was
858            still being compiled (which may fail if the system doesn't
859            have gdal installed). the build_ext command to setup.py
860            now accepts the flags --with-gdal and --without-gdal.
861            If --without-gdal is specified setup.py will try to
862            use the gdal parameters specified by gdal-config. Under
863            windows, those parameters have to be set in setup.py
864            as with proj4 an wxWindows.
865    
866            * setup.py: Use a list instead of seperate variables for
867            extension parameters so we can create a generic function
868            that runs an appropriate *-config script.
869            (run_cs_script): Renamed from run_wx_script and modified
870            to accept a second argument which is a list of lists to
871            be filled in by the values returned from running the command.
872            (thuban_build_ext): New. Extends the build_ext command and
873            provides the options --with-gdal/--without-gdal which then
874            optionally includes the gdalwarp extension.
875    
876            * Thuban/Model/resource.py: First check if we can import
877            the gdalwarp Thuban extension before checking for gdal.
878            Also added some comments.
879            
880            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
881            the map is None which may be the case if none has been loaded
882            yet.
883    
884            * Thuban/UI/main.py (main): Remove call to ShowLegend.
885    
886            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
887    
888            * Thuban/UI/renderer.py: Check for gdal support before importing
889            gdalwarp.
890            (MapRenderer.render_map): Only try to optimize if we have gdal
891            support otherwise nothing will get drawn.
892    
893            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
894            during startup before a map has been created. Check if map is None
895            before using it and do nothing if it is.
896    
897    2003-06-17  Jonathan Coles   <[email protected]>
898    
899            Fix the problem with raster layers under Windows that caused
900            Thuban to crash. The view should respond to layer projection
901            changed events to update the display. Changes to a projection
902            should not cause the map to be set to full extent.
903            
904            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
905            current_map_proj to remember the current map projection so that
906            when the projection changes we know what the previous projection
907            was.
908            (MapCanvas.SetMap): Unsubscribe and subscribe to
909            LAYER_PROJECTION_CHANGED events.
910            (MapCanvas.projection_changed): Split into two methods that respond
911            to map and layer projection changes.
912            (MapCanvas.map_projection_changed): New. Takes the current view and
913            projects it using the new projection. This does not cause the
914            map to be redrawn at full extent.
915            (MapCanvas.layer_projection_changed): New. Cause a redraw which
916            will draw each layer in its new projection.
917            
918            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
919            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
920            under Windows.
921            
922            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
923            to twice sizeof(void*) because there are two digits for each
924            hex byte.
925    
926    2003-06-16  Bernhard Herzog  <[email protected]>
927    
928            Update to the layer interface: Direct access to the table,
929            shapetable, shapefile and filename attributes is now actively
930            deprecated by issuing deprecation warnings for all places where
931            this happens.
932    
933            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
934            to the instance variables table, shapetable, shapefile and
935            filename via __getattr__ so that we can issue a deprecation
936            warning.
937            (Layer.SetShapeStore): Don't set the deprecated instance variables
938            any more
939            (Layer.SetShapeStore): Don't use deprecated layer instance
940            variables
941            (Layer.Destroy): No need to explicitly remove the instance
942            variables any more
943            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
944            instance variables
945    
946            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
947            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
948            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
949            use deprecated layer instance variables
950    
951            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
952            deprecated layer instance variables
953    
954            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
955            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
956            instance variables
957    
958            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
959            deprecated layer instance variables
960    
961            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
962            deprecated layer instance variables
963    
964            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
965            deprecated layer instance variables
966    
967            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
968            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
969            variables
970    
971            * test/runtests.py (main): Turn Thuban's deprecation warnings into
972            errors so that they're cought by the tests
973    
974            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
975            layer instance variables
976    
977    2003-06-16  Jonathan Coles   <[email protected]>
978    
979            Fix a problem under Windows whereby if the user double-clicks on a
980            layer in the legend that tree item will expand or collapse as well
981            as open the layer properties dialog. The state of the tree item
982            should not be affected.
983    
984            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
985            preventExpandCollapse and subscribe to expanding and collapsing
986            events.
987            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
988            collapsing events and will veto the event if it has been triggered
989            by the user double clicking on a layer.
990            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
991            that an expanding/collapsing event should be vetoed.
992    
993    2003-06-13  Bernhard Herzog  <[email protected]>
994    
995            * Thuban/UI/classifier.py (Classifier.OnClose)
996            (Classifier.map_layers_removed)
997            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
998            in OnClose and not in map_layers_removed or
999            layer_shapestore_replaced to make sure it always happens when the
1000            dialog is closed
1001    
1002    2003-06-13  Jonathan Coles   <[email protected]>
1003    
1004            This puts back a fix for Windows where a panel is needed so that
1005            the background of the table view appears correctly.
1006    
1007            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
1008            object that can be used by derived classes to place any
1009            controls (including the grid) onto.
1010            (QueryTableFrame.__init__): Use the panel as the parent window
1011            for all the controls. Reparent the grid so that the panel is
1012            the parent. Call UpdateStatusText() to correctly initialize
1013            the status bar.
1014    
1015    2003-06-13  Jonathan Coles   <[email protected]>
1016    
1017            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
1018            from wxFrame (as opposed to wxDialog like the other classes)
1019            but otherwise behaves like the other classes. This is needed
1020            for the TableView which isn't really a dialog and needs to
1021            have a status bar and control buttons.
1022    
1023            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
1024            instance variable to keep track of how many rows are selected.
1025            Subscribe once to the the events we are interested in.
1026            (ThubanGrid.OnRangeSelect): Only handle event if event handling
1027            hasn't been turned off.
1028            (ThubanGrid.OnSelectCell): Only handle event if event handling
1029            hasn't been turned off.
1030            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
1031            as an event listener (which changes the event handler stack)
1032            simply set an instance variable to False. This is checked in
1033            the event handlers.
1034            (ThubanGrid.GetNumberSelected): Return the number of currently
1035            selected rows.
1036            (TableFrame): Inherit from ThubanFrame so we can have a
1037            status bar and control buttons.
1038            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
1039            Explicitly set which items are selected in the operator choice and
1040            action choice so there is always a valid selection. Fixes RTbug #1941.
1041            Subscribe to grid cell selection events so we can update the
1042            status bar.
1043            (QueryTableFrame.UpdateStatusText): Update the status bar with
1044            how many rows are in the grid, how many columns, and how many
1045            rows are selected.
1046            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
1047            Call UpdateStatusText when cells are (de)selected.
1048            (QueryTableFrame.OnQuery): Use the string value in the value
1049            combo if either the selected item index is 0 or if the string
1050            cannot be found in the predefined list (this happens if the
1051            user changes the text). Fixes RTbug #1940.
1052            Only turn off the grid event listeners if there a query comes
1053            back with a none empty list of ids. in the case that the list
1054            is empty this causes a grid.ClearSelection() call to actually
1055            clear the grid selection which causes the selected items in
1056            the map to be deselected. Fixes RTbug #1939.
1057    
1058            * test/test_save.py (XMLWriterTest.Encode): Check return values.
1059            Fixes RTbug #1851.
1060    
1061    2003-06-13  Bernhard Herzog  <[email protected]>
1062    
1063            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
1064            self.selected_shape with the current selection to make sure the
1065            contents of the dialog are up to date when it's shown for the
1066            first time.
1067            The dialog used to work without this by luck. The recent fix to
1068            the connector module 'broke' a 'feature' the identify view was
1069            relying on, i.e that subscribing to a message in response to
1070            receiving a message of that type would mean that the new
1071            subscriber would also be called for the same message.
1072            
1073    2003-06-12  Jonathan Coles   <[email protected]>
1074    
1075            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
1076            the image is rendered. Fixes RTbug #1937.
1077    
1078    2003-06-12  Jonathan Coles   <[email protected]>
1079    
1080            * Thuban/Lib/fileutil.py: As is done under Windows, create the
1081            user directory if it doesn't exist on a posix system.
1082            Fixes RTbug #1815.
1083    
1084            * Thuban/Model/resource.py (get_user_proj_files): Moved the
1085            called to get_application_dir here, so that the directory
1086            will only be called if this method is invoked.
1087    
1088            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
1089            the projfilepath if no projection is selected.
1090    
1091    2003-06-12  Jonathan Coles   <[email protected]>
1092    
1093            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
1094            the scalebar if the current map has no projection set.
1095    
1096            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
1097            projfilepath label to just the basename of the projection file
1098            rather than include the entire path.
1099    
1100            * Thuban/Model/resource.py: Fix missed proj functions that
1101            needed to be renamed.
1102    
1103    2003-06-12  Jonathan Coles   <[email protected]>
1104    
1105            * Thuban/Model/classification.py: Removed assert statements that
1106            tested if the variable was an instance of Color.
1107    
1108            * Thuban/Model/color.py (Color): Remove commented code that isn't
1109            used.
1110            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
1111            Fixes RTbug #1835.
1112            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
1113            Needed now that the class doesn't inherit from Color.
1114    
1115    2003-06-12  Jonathan Coles   <[email protected]>
1116    
1117            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
1118            check unicode strings.
1119    
1120            * test/test_layer.py: Check for existence of gdal.
1121    
1122    2003-06-12  Jonathan Coles   <[email protected]>
1123        
1124            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
1125            that was in load.py
1126    
1127            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
1128            that was in save.py
1129    
1130    2003-06-12  Jonathan Coles   <[email protected]>
1131    
1132            This is largely a collection of bug fixes. We also handle the
1133            case where gdal is not on the system. The XMLReader and XMLWriter
1134            classes were moved into there own files to resolve some circular
1135            import references and because they shouldn't really be in the
1136            file that is dediciated to reading/writing session files since
1137            they are also used elsewhere.
1138    
1139            * Thuban/Model/classgen.py: Renamed functions to follow the
1140            function_names_with_underscores style. Fixes RTbug #1903.
1141            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
1142    
1143            * Thuban/Model/layer.py: Import gdal only if it available.
1144            (RasterLayer): Handle the case where the gdal library is unavailable.
1145            Addresses RTbug #1877.
1146    
1147            * Thuban/Model/load.py (XMLReader): Moved into seperate file
1148            xmlreader.py.
1149    
1150    2003-06-12  Jonathan Coles   <[email protected]>
1151    
1152            This is largely a collection of bug fixes. We also handle the
1153            case where gdal is not on the system. The XMLReader and XMLWriter
1154            classes were moved into there own files to resolve some circular
1155            import references and because they shouldn't really be in the
1156            file that is dediciated to reading/writing session files since
1157            they are also used elsewhere.
1158    
1159            * Thuban/Model/classgen.py: Renamed functions to follow the
1160            function_names_with_underscores style. Fixes RTbug #1903.
1161            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
1162    
1163            * Thuban/Model/layer.py: Import gdal only if it available.
1164            (RasterLayer): Handle the case where the gdal library is unavailable.
1165            Addresses RTbug #1877.
1166    
1167            * Thuban/Model/load.py (XMLReader): Moved into seperate file
1168            xmlreader.py.
1169    
1170            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
1171            file xmlwriter.py.
1172    
1173            * Thuban/Model/resource.py: Renamed functions to following the
1174            function_names_with_underscores style.
1175            (has_gdal_support): New function that returns true if the gdal
1176            library is available. Addresses RTbug #1877.
1177    
1178            * Thuban/UI/application.py (ThubanApplication.OpenSession):
1179            Display a message box if the gdal library is not available, but
1180            only if there are any layers that would use it. Addresses RTbug #1877.
1181    
1182            * Thuban/UI/classgen.py: Use renamed projection resource functions.
1183            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
1184            when using integers versus floats.
1185    
1186            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
1187            determine if the "Add Image Layer" menu option should be
1188            greyed out or not. Addresses RTbug #1877.
1189    
1190            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
1191    
1192            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
1193            optimize if a raster layer is visible. Fixes RTbug #1931.
1194            Only draw the raster layer if the gdal library is available.
1195            Addresses RTbug #1877.
1196    
1197            * test/test_classgen.py: Add tests for generate_singletons,
1198            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
1199            (test_calculate_quantiles): Fix some tests to catch the new
1200            ValueError that is raised.
1201    
1202            * test/test_proj.py: Use renamed projection resource functions.
1203    
1204            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
1205            test for saving classified layers. Fixes RTbug #1902.
1206            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
1207    
1208    2003-06-12  Jan-Oliver Wagner <[email protected]>
1209    
1210            Fix for http://intevation.de/rt/webrt?serial_num=1900.
1211    
1212            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
1213    
1214            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
1215            multiplechoicedialog.py rather than from the wxPython library.
1216    
1217    2003-06-11  Frank Koormann  <[email protected]>
1218    
1219            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
1220            update.
1221    
1222    2003-06-11  Frank Koormann  <[email protected]>
1223    
1224            * Thuban/Lib/fileutil.py (get_application_dir): New function to
1225            determine the absolute .thuban/thuban directory under
1226            "posix" (os.expanduser) and "nt" (read AppData registry key).
1227    
1228            * Thuban/Model/resource.py: Use get_application_dir
1229    
1230            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1231            Use get_application_dir.
1232    
1233    2003-06-10  Bernhard Herzog  <[email protected]>
1234    
1235            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
1236            the messages MAP_LAYERS_REMOVED messages
1237            (LayerTableFrame.OnClose): Unsubscribe from it.
1238            (LayerTableFrame.map_layers_removed): New. Receiver for
1239            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
1240            dialog is showing is removed.
1241    
1242    2003-06-10  Bernhard Herzog  <[email protected]>
1243    
1244            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
1245            of the receivers list so that unsubscribing in a receiver doesn't
1246            modify it while iterating over it.
1247    
1248            * test/test_connector.py
1249            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
1250            unsubscribing in a receiver works correctly. See docstring for
1251            details
1252    
1253    2003-06-10  Bernhard Herzog  <[email protected]>
1254    
1255            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
1256            message.
1257    
1258            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
1259            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
1260            LAYER_CHANGED will still be sent if the classification changes.
1261    
1262            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
1263            parameter so we can subscribe to some of its messages
1264            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
1265            and the layer's LAYER_SHAPESTORE_REPLACED
1266            (Classifier.unsubscribe_messages): New. Unsubscribe from message
1267            subscribed to in __init__
1268            (Classifier.map_layers_removed)
1269            (Classifier.layer_shapestore_replaced): receivers for the messages
1270            subscribed to in __init__. Unsubscribe and close the dialog
1271    
1272            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
1273            the map to the Classifier dialog
1274    
1275            * test/test_layer.py (SetShapeStoreTests): Derive from
1276            SubscriberMixin as well so we can test messages
1277            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
1278            messages
1279            (SetShapeStoreTests.tearDown): Clear the messages again
1280            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
1281            for the modified flag too
1282            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
1283            to check whether SetShapeStore sets the modified flag
1284            (SetShapeStoreTests.test_set_shape_store_different_field_name)
1285            (SetShapeStoreTests.test_set_shape_store_same_field)
1286            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
1287            Add tests for the messages. This checks both the new
1288            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
1289    
1290    2003-06-06  Jan-Oliver Wagner <[email protected]>
1291    
1292            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
1293            the menu items.
1294    
1295    2003-06-05  Frank Koormann  <[email protected]>
1296    
1297            * Thuban/UI/identifyview.py (IdentifyView.__init__):
1298            Layout reimplemented without panel. Make life easier to fit the list
1299            in the dialog.
1300    
1301    2003-06-05  Frank Koormann  <[email protected]>
1302    
1303            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
1304            once on initialisation (Former implementation resulted in multiple
1305            entries for each projection).
1306            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
1307            if set, select the projection found under the specified name. This
1308            overwrites any other selection estimate.
1309            Removed projchoice filling from this method.
1310            (ProjFrame._OnSave, ProjFrame._OnAddToList):
1311            Updated call of ProjFrame.__FillAvailList
1312            (LCCPanel._DoLayout): Moved parameter controls in more common order.
1313    
1314            * Resources/Projections/defaults.proj: Extended defaults representing
1315            various common European projections.
1316    
1317    2003-06-05  Frank Koormann  <[email protected]>
1318    
1319            * Thuban/UI/identifyview.py (IdentifyView.__init__):
1320            Use ListCtrl instead of GridCtrl
1321    
1322            * Thuban/Model/resource.py:
1323            Guess location of .thuban directory from tempdir parent directory.
1324    
1325            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1326            Guess location of .thuban directory from tempdir parent directory.
1327    
1328    2003-06-04  Bernhard Herzog  <[email protected]>
1329    
1330            Do not cache the values returned by the tree widget's
1331            GetFirstChild and GetNextChild methods because it led to lots of
1332            segfaults. The new way requires more brute force but is more
1333            reliable.
1334    
1335            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
1336            variable layer2id
1337            (LegendTree.find_layer): New method to do with brute force what
1338            layer2id tried to accomplish
1339            (LegendTree._OnMsgLayerChanged)
1340            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
1341            Use find_layer instead of layer2id
1342            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
1343            update layer2id anymore
1344            (LegendTree._OnMsgMapLayersRemoved)
1345            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
1346    
1347    2003-06-03  Thomas Koester  <[email protected]>
1348    
1349            * Thuban/Model/classgen.py (GenQuantiles0): New function.
1350    
1351    2003-06-02  Bernhard Herzog  <[email protected]>
1352    
1353            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
1354            New commands.
1355            (main_menu): Add the new commands.
1356            (MainWindow.TableRename): New. Implementation of the table_rename
1357            command.
1358            (MainWindow.RenameLayer): New. Implementation of the layer_rename
1359            command.
1360    
1361            * Thuban/Model/session.py (Session.AddTable): call self.changed to
1362            set the modified flag
1363    
1364            * test/test_session.py (TestSessionSimple.test_add_table): Test
1365            whether the modified flag is set properly
1366    
1367            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
1368            instead of issue so that the modified flags get updated.
1369    
1370            * test/test_base.py (SomeTitledObject): Derive from Modifiable
1371            instead of Publisher to reflect reality better and to accomodate
1372            the fact that SetTitle now calls changed instead of issue
1373    
1374    2003-06-02  Bernhard Herzog  <[email protected]>
1375    
1376            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
1377            acquisition has to happen before the try in a try-finally.
1378    
1379    2003-06-02  Bernhard Herzog  <[email protected]>
1380    
1381            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
1382            possible that a layer is removed that is not currently selected in
1383            the legend so don't check for this.
1384    
1385    2003-05-30  Bernhard Herzog  <[email protected]>
1386    
1387            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
1388            variables to None that have direct or indirect references to
1389            shapefiles or dbf files to make sure that they do go away and the
1390            files are closed.
1391    
1392    2003-05-30  Bernhard Herzog  <[email protected]>
1393    
1394            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
1395            availImgListIndices when a new image list is created
1396            
1397    2003-05-30  Bernhard Herzog  <[email protected]>
1398    
1399            * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
1400            changing_selection to indicate whether the LegendTree code itself
1401            is currently changing the selection
1402            (LegendTree.normalize_selection): New method to normalize the
1403            selection by selecting the layer item even if the user clicked on
1404            the classification.
1405            (LegendTree._OnSelChanged): normalize the selection. This works
1406            around a bug in wx which doesn't keep track of the selection
1407            properly when subtrees are deleted.
1408    
1409    2003-05-30  Bernhard Herzog  <[email protected]>
1410    
1411            * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
1412            maximum and minimum scale factors.
1413    
1414            * test/test_classgen.py (ClassGenTest.test): Update to reflect the
1415            changes in classgen.py
1416    
1417    2003-05-30  Jonathan Coles   <[email protected]>
1418    
1419            * Thuban/Model/classgen.py: Remove ClassGenerator class but make
1420            all the methods functions. Fixes RTBug #1903.
1421    
1422            * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
1423            to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
1424            RTBug #1907.
1425    
1426            * Thuban/UI/classgen.py: Use classgen functions that were part
1427            of the ClassGenerator class. Put try/finally blocks around
1428            code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
1429            RTBug #1904.
1430    
1431            * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
1432    
1433            * Thuban/UI/legend.py: The legend was cleared and repopulated any
1434            time something changed which caused some state to be lost such
1435            as which children were expanded or collapsed. Fixes RTBug #1901.
1436            (LegendTree._OnMsgMapLayersAdded): Add only new layers.
1437            (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
1438            the legend but not in the map.
1439            (LegendTree.__FillTree): Move main functionality out into smaller
1440            methods that can be used by other methods.
1441            (LegendTree.__FillTreeLayer): Reuse old slots in the image list
1442            if they are available.
1443            (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
1444            that we override the wxTreeCtrl method. Iterate over children
1445            and call __RemoveLayer.
1446            (LegendTree.__AddLayer): New. Add a new layer to the legend.
1447            (LegendTree.__RemoveLayer): Remove a layer from the legend.
1448            (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
1449            Should only be called with the id of a layer branch.
1450            (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
1451            Returns the root item or creates one if necessary.
1452    
1453            * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
1454            ProjectRasterFile with tuple arguments instead of strings.
1455    
1456            * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
1457            with try/finally. Fixes RTBug #1904.
1458    
1459            * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
1460            with try/finally. Fixes RTBug #1904.
1461            (MapCanvas.FitSelectedToWindow): If a single point is selected
1462            simply center it on the display. Fixes RTBug #1849.
1463    
1464            * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
1465            to be compiled as a standalone app. Now the code can only be
1466            called from Python which simplifies the parameter passing.
1467            (ProjectRasterFile): Handle Python arguments. Remove code that
1468            checks for a destination dataset. Add more clean up code.
1469    
1470            * test/test_map.py (TestMapWithContents.test_raise_layer_top,
1471            TestMapWithContents.test_lower_layer_bottom):
1472            Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
1473            Fixes RTBug #1907.
1474    
1475            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
1476            extent to the map when the legend is toggled. Fixes RTBug #1881.
1477    
1478    2003-05-29  Jan-Oliver Wagner <[email protected]>
1479    
1480            * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
1481            unsubscribes all that is subcribed in __init__.
1482    
1483    2003-05-28  Bernhard Herzog  <[email protected]>
1484    
1485            * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
1486            (MainWindow.CanDuplicateLayer): New methods to implement the
1487            Layer/Duplicate command.
1488            (layer_duplicate command): New.
1489            (main_menu): Add layer_duplicate to the Layer menu.
1490    
1491    2003-05-28  Bernhard Herzog  <[email protected]>
1492    
1493            * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
1494            renderer so that NULL/None values get displayed differently (by a
1495            gray rectangle).
1496            (TableGrid.__init__): Override the default renderers
1497    
1498    2003-05-28  Bernhard Herzog  <[email protected]>
1499    
1500            * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
1501            classification to "None" if the type of the field has changed.
1502    
1503            * test/test_layer.py (SetShapeStoreTests): New. Class with a few
1504            test for the Layer.SetShapeStore method
1505    
1506    2003-05-28  Jan-Oliver Wagner <[email protected]>
1507    
1508            * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
1509            does not necessarily have a filename).
1510    
1511    2003-05-28  Jan-Oliver Wagner <[email protected]>
1512    
1513            * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
1514            sort the selection list for the dialog.
1515    
1516    2003-05-28  Frank Koormann  <[email protected]>
1517    
1518            * extensions/thuban/wxproj.cpp
1519            (project_point): Removed cast to int for projected point coordinates.
1520            (shape_centroid): Return last point if all polygon vertices fall
1521            to one point.
1522    
1523    2003-05-28  Bernhard Herzog  <[email protected]>
1524    
1525            * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
1526            with layers that don't have shapestores, i.e. raster layers.
1527    
1528    2003-05-28  Bernhard Herzog  <[email protected]>
1529    
1530            * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
1531            when determining the title from the filename.
1532    
1533            * test/test_dbf_table.py (TestDBFTable.test_title): Update to
1534            reflect changes in the way the title is derived from the filename
1535    
1536    2003-05-28  Frank Koormann  <[email protected]>
1537    
1538            * Thuban/UI/mainwindow.py (MainWindow.TableShow):
1539            Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
1540    
1541    2003-05-27  Bernhard Herzog  <[email protected]>
1542    
1543            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
1544            delegate SelectedLayer.
1545            (MainWindow.LayerUnjoinTable): Implement.
1546            (_can_unjoin): New. Helper function for the sensitivity of the
1547            layer/unjoin command.
1548    
1549            * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
1550            (DerivedShapeStore.OrigShapeStore): New. Return the original
1551            shapestore. Used to figure out how to unjoin.
1552            (DerivedShapeStore.Shapefile): Fix a typo.
1553    
1554    2003-05-27  Bernhard Herzog  <[email protected]>
1555    
1556            * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
1557            well
1558            (JoinDialog.__init__): Use the layer parameter and only build the
1559            left choice when a layer is given
1560            (JoinDialog.OnJoin): Handle layer joins as well
1561            (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
1562            that the user selects the "Select..." item. The sensitivitly
1563            updating is now in update_sensitivity
1564            (JoinDialog.y): New method to refactor the sensitivity update of
1565            the join button into its own method.
1566    
1567            * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
1568    
1569    2003-05-27  Bernhard Herzog  <[email protected]>
1570    
1571            * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
1572            iff there are unreferenced tables in the session
1573    
1574    2003-05-27  Bernhard Herzog  <[email protected]>
1575    
1576            * Thuban/Model/messages.py (TABLE_REMOVED): New message.
1577    
1578            * Thuban/Model/session.py (Session.UnreferencedTables): New method
1579            to return tables that are not referenced by other tables or shape
1580            stores and can be removed.
1581            (Session.RemoveTable): Issue a TABLE_REMOVED message after
1582            removing the table
1583    
1584            * Thuban/UI/mainwindow.py: Remove unused imports
1585            (MainWindow.TableClose): Implement.
1586    
1587            * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
1588            messages so that the frame will be automatically closed when a new
1589            session is opened or the table is removed.
1590            (TableFrame.OnClose): Unsubscribe the Subscriptions made in
1591            __init__
1592            (TableFrame.close_on_session_replaced)
1593            (TableFrame.close_on_table_removed): New. Subscribers that close
1594            the window
1595    
1596            * test/test_session.py (TestSessionMessages.test_remove_table)
1597            (TestSessionSimple.test_remove_table): Move the test to
1598            TestSessionSimple and add test for the TABLE_REMOVED message
1599            (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
1600            (TestSessionSimple.test_unreferenced_tables) New. Test for the
1601            UnreferencedTables method.
1602            (UnreferencedTablesTests): New. Class with some more sophisticated
1603            tests for UnreferencedTables.
1604    
1605    2003-05-27  Frank Koormann  <[email protected]>
1606    
1607            * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
1608            display has some unwanted side effects. Removed again.
1609    
1610    2003-05-27  Frank Koormann  <[email protected]>
1611    
1612            * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
1613    
1614            * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
1615    
1616    2003-05-27  Jan-Oliver Wagner <[email protected]>
1617    
1618            * test/test_menu.py (MenuTest.test): Added test for
1619            Menu.RemoveItem().
1620    
1621            * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
1622            the menu.
1623    
1624    2003-05-27  Frank Koormann  <[email protected]>
1625            
1626            Nonmodal dialogs without parent (i.e. they can fall behind the main
1627            window)
1628    
1629            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
1630            all dialogs in the dialogs dictionary and the canvas.
1631    
1632            * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
1633            parent, i.e. can fall behind other windows.
1634            (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
1635            dictionary before removing it.
1636    
1637            * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
1638    
1639            * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
1640            * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
1641            * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
1642    
1643    2003-05-27  Bernhard Herzog  <[email protected]>
1644    
1645            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
1646            tableview dialog
1647            (MainWindow.TableShow): Use ShowTableView to open the dialogs.
1648            Also, don't use the table's titles as the dialog names. The titles
1649            aren't guaranteed to be unique.
1650            (MainWindow.TableOpen): Open a table view dialog after opening the
1651            table
1652    
1653    2003-05-27  Bernhard Herzog  <[email protected]>
1654    
1655            * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
1656            effect can be achieved by simply closing the window showing the
1657            table.
1658            (MainWindow.TableHide): Removed.
1659            (main_menu): Removed "table_hide"
1660    
1661    2003-05-27  Frank Koormann  <[email protected]>
1662    
1663            Fix legend tree display problems under Win32
1664    
1665            * Thuban/UI/legend.py:  BMP_SIZE_W = 15
1666            (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
1667            (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
1668    
1669            * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
1670    
1671    2003-05-27  Jan-Oliver Wagner <[email protected]>
1672    
1673            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
1674            'after' now allows to insert separators almost anywhere in the menu.
1675    
1676    2003-05-27  Frank Koormann  <[email protected]>
1677    
1678            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
1679            "S" of selection box label to hint on hot key (Alt-S). Works under
1680            Win32 but is ignored under GTK.
1681    
1682    2003-05-26  Frank Koormann  <[email protected]>
1683    
1684            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
1685            Center Choices.
1686    
1687    2003-05-26  Bernhard Herzog  <[email protected]>
1688    
1689            Remove the Precision methods again. They're too DBF specific to be
1690            part of the table interface and they're only used in table_to_dbf
1691            anyway.
1692            
1693            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
1694            fixed precision of 12 for doubles.
1695            (TransientTableBase.Precision): Removed
1696            (AutoTransientTable.Width): Delegate to self.table.
1697    
1698            * Thuban/Model/table.py (DBFTable.Precision)
1699            (MemoryTable.Precision): Removed.
1700            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
1701            (table_to_dbf): Use a fixed precision of 12 for floats unless the
1702            column object specifies something else.
1703    
1704            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
1705            test for table_to_dbf
1706    
1707    2003-05-26  Bernhard Herzog  <[email protected]>
1708    
1709            * test/test_transientdb.py
1710            (TestTransientTable.run_iceland_political_tests): Fix a comment.
1711    
1712    2003-05-26  Bernhard Herzog  <[email protected]>
1713    
1714            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
1715            implementation. Mark parts of the file format strings for
1716            localization.
1717    
1718            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
1719            file and add the table to the tables managed by the session
1720    
1721            * test/test_session.py (TestSessionSimple.test_open_table_file):
1722            New. test case for OpenTableFile
1723    
1724    2003-05-26  Jan-Oliver Wagner <[email protected]>
1725    
1726            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
1727            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
1728            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
1729            Replace the true/false of wxWindows by True/False of Python 2.2.1.
1730    
1731    2003-05-26  Jan-Oliver Wagner <[email protected]>
1732    
1733            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
1734            already a selection present, update the grid accordingly.
1735    
1736            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
1737            resizeable and increase its initial size.
1738    
1739    2003-05-26  Frank Koormann  <[email protected]>
1740    
1741            Table export functionality
1742    
1743            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
1744            Return width (in characters) for a column.
1745            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
1746            (table_to_dbf): Write table to dbf file.
1747            (table_to_csv): Write table to csv file.
1748    
1749            * Thuban/Model/transientdb.py (TransientTableBase.Width,
1750            TransientTableBase.Precision): Return column width and precision.
1751    
1752            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
1753            or table_to_csv depending on file selection.
1754    
1755            * test/test_dbf_table.py:
1756            Test table_to_dbf (extension of former part of test).
1757    
1758            * test/test_csv_table.py:
1759            Test table_to_csv.
1760    
1761    2003-05-23  Jan-Oliver Wagner <[email protected]>
1762    
1763            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
1764            Use QueryTableFrame instead of TableFrame.
1765    
1766            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
1767            table window with 'Layer Table:' instead of 'Table:'.
1768    
1769    2003-05-23  Jan-Oliver Wagner <[email protected]>
1770    
1771            Give all tables a title via mix-in TitledObject.LayerShowTable
1772    
1773            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
1774            only if it exists.
1775    
1776            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
1777            and call its init-method with a default title. Remove Title() method.
1778    
1779            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
1780            AutoTransientTable): mix-in TitledObject and call its init-method with
1781            a default title. Remove Title() method.
1782    
1783    2003-05-23  Bernhard Herzog  <[email protected]>
1784    
1785            * Thuban/Model/session.py (Session.AddShapeStore): Define
1786            AddShapeStore analogously to AddTable.
1787    
1788            * test/test_session.py (TestSessionSimple.test_add_shapestore):
1789            New. Test for AddShapeStore
1790    
1791    2003-05-23  Jan-Oliver Wagner <[email protected]>
1792    
1793            Introducing QueryTableFrame and a very coarse ShowTable implementation.
1794    
1795            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
1796            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
1797            The latter implements the selection GUI without dependency on a layer.
1798            LayerTableFrame now is derived from QueryTableFrame and connects
1799            to a layer.
1800    
1801            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
1802            implementation that still needs work.
1803    
1804            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
1805    
1806    2003-05-22  Frank Koormann  <[email protected]>
1807    
1808            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
1809            Added "outer_join = False" as optional parameter.
1810            (TransientJoinedTable.create): If outer join is true, perform a
1811            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
1812            the left table. Records not matching are filled with 0 / None.
1813    
1814            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
1815            (JoinDialog.OnJoin): Consider outer join check box.
1816    
1817    2003-05-22  Bernhard Herzog  <[email protected]>
1818    
1819            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
1820            somewhat safer way. Storing the traceback in a local variable can
1821            lead to memory leaks
1822    
1823    2003-05-22  Bernhard Herzog  <[email protected]>
1824    
1825            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
1826            the wxMessageDialog's Destroy() method.
1827    
1828    2003-05-22  Frank Koormann  <[email protected]>
1829    
1830            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
1831            TransientTable.Title()
1832    
1833    2003-05-22  Frank Koormann  <[email protected]>
1834    
1835            Join Dialog, initial version.
1836    
1837            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
1838    
1839            * Thuban/UI/join.py (JoinDialog): Functional implementation of
1840            former framework. Renamed Table1/Table2 to LeftTable/RightTable
1841            in all occurences.
1842    
1843            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
1844            Typo fixed.
1845    
1846    2003-05-22  Bernhard Herzog  <[email protected]>
1847    
1848            Give the tables titles so that the GUI can display more meaningful
1849            names. For now the titles are fixed but depend on e.g. filenames
1850            or the titles of the joined tables.
1851    
1852            * Thuban/Model/transientdb.py (TransientTable.Title)
1853            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
1854    
1855            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
1856    
1857            * test/test_transientdb.py
1858            (TestTransientTable.test_auto_transient_table_title): New. Test
1859            for the Title method
1860            (TestTransientTable.test_transient_joined_table)
1861            (TestTransientTable.test_transient_table): Add test for the Title
1862            methods
1863    
1864            * test/test_memory_table.py (TestMemoryTable.test_title): New.
1865            Test for the Title method
1866    
1867            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
1868            the Title method
1869    
1870    2003-05-22  Bernhard Herzog  <[email protected]>
1871    
1872            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
1873            Provide a better way to destroy the layers
1874            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
1875            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1876            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
1877            the new way to destroy the layers.
1878            (TestLayer.test_derived_store): New. Test for using a layer with a
1879            DerivedShapeStore
1880    
1881            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
1882            filename if the shape store actually has one.
1883    
1884    2003-05-22  Bernhard Herzog  <[email protected]>
1885    
1886            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
1887            for the filename
1888    
1889            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
1890            for the FileName method
1891            (TestDBFTableWriting.test_write): Fix spelling of filename
1892    
1893    2003-05-22  Thomas Koester  <[email protected]>
1894    
1895            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
1896            from SciParam that now really is immutable.
1897    
1898    2003-05-22  Frank Koormann  <[email protected]>
1899    
1900            Layer Top/Bottom placement added to legend.
1901    
1902            * Thuban/UI/legend.py
1903            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
1904            bound to tool events.
1905            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
1906            New, methods binding the event methods with the map methods.
1907    
1908            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
1909            layer at top/bottom of layer stack.
1910    
1911            * Resources/Bitmaps/top_layer.xpm: New button icon.
1912    
1913            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
1914    
1915    2003-05-22  Bernhard Herzog  <[email protected]>
1916    
1917            * Thuban/Model/session.py (Session.RemoveTable): New method to
1918            remove tables
1919    
1920            * test/test_session.py (TestSessionSimple.test_remove_table): New.
1921            Test for RemoveTable
1922    
1923    2003-05-22  Thomas Koester  <[email protected]>
1924    
1925            * Thuban/Model/classgen.py: Added short module doc string and CVS id.
1926            (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
1927    
1928    2003-05-22  Bernhard Herzog  <[email protected]>
1929    
1930            Implement a way to discover dependencies between tables and
1931            shapestores.
1932    
1933            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
1934            (TransientJoinedTable.Dependencies)
1935            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
1936            interface
1937            (TransientJoinedTable.__init__): Keep tack of the original table
1938            objects in addition to the corresponding transient tables.
1939    
1940            * Thuban/Model/table.py (DBFTable.Dependencies)
1941            (MemoryTable.Dependencies): New. Implement the dependencies
1942            interface
1943    
1944            * Thuban/Model/data.py (ShapeTable): New. Helper class for
1945            ShapefileStore
1946            (ShapefileStore.__init__): Use ShapeTable instead of
1947            AutoTransientTable
1948            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
1949            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
1950            methods for filename and type
1951            (ShapefileStore.Dependencies): New. Implement the dependencies
1952            interface
1953            (DerivedShapeStore): New class to replace SimpleStore. The main
1954            difference to SimpleStore is that it depends not on a shapefile
1955            but another shapestore which expresses the dependencies a bit
1956            better
1957            (SimpleStore.__init__): Add deprecation warning.
1958    
1959            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
1960            Test for the Dependencies method.
1961    
1962            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
1963            New. Test for the Dependencies method.
1964    
1965            * test/test_transientdb.py
1966            (TestTransientTable.test_auto_transient_table_dependencies): New.
1967            Test for the Dependencies method.
1968            (TestTransientTable.test_transient_joined_table): Add test for the
1969            Dependencies method.
1970    
1971            * test/test_session.py (TestSessionSimple.setUp)
1972            (TestSessionSimple.tearDown): New. Implement a better way to
1973            destroy the sessions.
1974            (TestSessionSimple.test_initial_state)
1975            (TestSessionSimple.test_add_table): Bind session to self.session
1976            so that it's destroyed by tearDown
1977            (TestSessionSimple.test_open_shapefile): New. Test for
1978            OpenShapefile and the object it returns
1979    
1980    2003-05-22  Bernhard Herzog  <[email protected]>
1981    
1982            * Thuban/Model/session.py (Session.AddTable): New method to
1983            register tables with the session.
1984            (Session.Tables): Return the tables registered with AddTable too.
1985    
1986            * test/test_session.py (TestSessionSimple.test_add_table): New.
1987            Test case for the AddTable method
1988    
1989    2003-05-22  Frank Koormann  <[email protected]>
1990    
1991            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
1992            lower right corner, center labels for selections, initialize controls
1993            in reasonable order for keyboard navigation.
1994    
1995            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
1996            (ProjFrame.__DoOnProjAvail): Determine position of current projection
1997            using the wxListBox.FindString() method. Still a problem (#1886)
1998    
1999            * Thuban/UI/classifier.py
2000            (Classifier.__init__, SelectPropertiesDialog.__init__)
2001    
2002            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
2003            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
2004            different classification types from here to __init__.
2005            (GenUniquePanel.__init__): Set the column width of the first field
2006            in the Field ListCtrl to the full width.
2007    
2008            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
2009            Button to 'Export'. Center Buttons in Selection Box, set Focus to
2010            Grid.
2011            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
2012            changes focus to the Selection when pressing "Alt-S".
2013    
2014            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
2015            the text if not visible. The italic font sometimes exceeds the
2016            rendering area.
2017    
2018    2003-05-21  Jonathan Coles   <[email protected]>
2019    
2020            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
2021            to OnClose so that Thuban closes correctly.
2022    
2023            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
2024            DockFrame.OnClose, not DockFrame._OnClose.
2025    
2026    2003-05-21  Jonathan Coles   <[email protected]>
2027    
2028            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
2029            references to 'inf' and use new Range __init__ to pass floats
2030            directly rather than converting them to strings first.
2031            Fixes RTBug #1876.
2032    
2033            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
2034            Use new Range ___init__ to pass floats.
2035    
2036            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
2037            filename is a valid image file. Throw IOError otherwise.
2038    
2039            * Thuban/Model/range.py: Brought over new Range from SciParam that
2040            is immutable and has an __init__ which can accept floats.
2041    
2042            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
2043            into try block. AddLayer doesn't throw any exceptions anymore.
2044            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
2045            try block.
2046    
2047            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
2048            the first item in choices. Fixes RTBug #1882.
2049    
2050            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
2051            has gone to 0 which is a serious problem. abort.
2052            (MapRenderer.draw_raster_layer): Catch IOError seperately and
2053            print the error from GDAL.
2054    
2055            * Thuban/UI/tableview.py (TableGrid.__init__): Call
2056            ToggleEventListeners to turn on listening.
2057            (TableGrid.ToggleEventListeners): New. Turns event listening on
2058            and off so as to prevent excessive messages.
2059            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
2060            to suppress excessive messages when selecting many rows.
2061            Fixes RTBug #1880.
2062    
2063            * Thuban/UI/view.py: Added checks against if scale == 0. This
2064            is a serious problem that can occur when an image without
2065            geo data is loading and causes the map projection bounds to
2066            go to infinity. Right now, the solution is to simply try
2067            to recover.
2068    
2069            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
2070            to set the MFILEReceiver attributes even if the data is NULL.
2071    
2072            * extensions/thuban/gdalwarp.cpp: Improved the error handling
2073            and passed GDAL messages back up to the Python layer. Also
2074            tried to fix some memory leaks that were present in the original
2075            utility but didn't matter because the program aborted.
2076    
2077            * test/test_range.py: Copied over tests from SciParam. Removed
2078            tests against importing. Fixes RTBug #1867.
2079    
2080    2003-05-21  Bernhard Herzog  <[email protected]>
2081    
2082            * test/test_load.py: Remove unused imports and restructure the
2083            test code
2084            (LoadSessionTest): Split into one class for each test and turn
2085            LoadSessionTest itself into the base class for all such session
2086            tests.
2087            (ClassificationTest): New base class for load tests that test
2088            classifications
2089            (TestSingleLayer, TestLayerVisibility, TestClassification)
2090            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
2091            for the individual tests
2092    
2093            * test/support.py (FileLoadTestCase.filename): New base class for
2094            file loading tests
2095    
2096    2003-05-21  Jan-Oliver Wagner <[email protected]>
2097    
2098            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
2099            Mercator' to 'UTM Zone 32' as a more convenient example.
2100            Added 'Gauss Krueger Zone 6'.
2101    
2102            * Data/iceland_sample_raster.thuban: political polygon now
2103            filled transparent to have the raster image visible at once.
2104    
2105    2003-05-21  Frank Koormann  <[email protected]>
2106    
2107            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
2108            OnClose() to keep in sync with extensions. Internally Thuban
2109            still uses "underscored" names.
2110    
2111    2003-05-20  Jonathan Coles   <[email protected]>
2112    
2113            This puts back Raster layer support. These layers support projections
2114            through the GDAL library. Currently, the CVS version is being used.
2115            There are no Debian packages available although this may change soon.
2116            A GDAL driver was extended to support writing to memory rather to
2117            files.
2118    
2119            There is still some work that needs to be done, such as some error
2120            handling when loading invalid images or when there is a problem
2121            projecting the image. This putback simply checks in the majority
2122            of the work.
2123    
2124            * setup.py: Add gdalwarp library extension.
2125    
2126            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
2127            Defaults to False, but can be overridden by subclasses if they
2128            support classification.
2129            (RasterLayer): New. Defines a new layer that represents an
2130            image.
2131    
2132            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
2133            tag handler.
2134            (SessionLoader.start_layer): Encode the filename.
2135            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
2136            New. Supports reading a rasterlayer tag.
2137    
2138            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
2139    
2140            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
2141            get a string in Latin1. If we get such as string convert it to
2142            unicode first, otherwise leave if alone before encoding.
2143            (SessionSaver.write_layer): Add support for writing both Layers
2144            and RasterLayers.
2145    
2146            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
2147            The right argument may not be a string, it could also be a Column.
2148    
2149            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
2150            Make initial window size 600x400. Fixes RTBug #1872.
2151    
2152            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
2153            the dialog is constructed so that we can support layers that
2154            do not have classifications.
2155            (Classifier._OnTry): Only build a classification if the layer
2156            supports one.
2157    
2158            * Thuban/UI/legend.py: Change all checks that a layer is an
2159            instance of Layer into checks against BaseLayer.
2160            (LegendTree.__FillTreeLayer): Only add children to a branch if
2161            the layer supports classification.
2162    
2163            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
2164            MainWindow.OpenSession): Don't proceed with an action if the
2165            user chooses Cancel when they are asked to save changes.
2166            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
2167            user to select an image file. Create a new RasterLayer and add
2168            it to the map.
2169    
2170            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
2171            for rendering RasterLayer layers.
2172            (MapRenderer.draw_raster_layer): Actually method that calls
2173            the GDALWarp python wrapper and constructs an image from the
2174            data returned.
2175    
2176            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
2177            Choices symbols to match those used in the table query method.
2178            Replace deprecated method calls on table with new method names.
2179    
2180            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
2181            how small the scale can get. This still needs more testing.
2182    
2183            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
2184            Provides a driver to output in .bmp format.
2185    
2186            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
2187            New. Provides IO routines which write to memory, rather than a file.
2188    
2189            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
2190            of the gdalwarp utility provided in GDAL. Added function calls
2191            that can be accessed from python.
2192    
2193            * Data/iceland_sample_raster.thuban: New. Sample file that uses
2194            a raster layer.
2195    
2196            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
2197            layer image data.
2198    
2199            * Doc/thuban.dtd: Added rasterlayer attribute definition.
2200    
2201            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
2202            tests associated with the raster layer code.
2203    
2204            * test/test_transientdb.py
2205            (TestTransientTable.test_auto_transient_table_query): Added a test
2206            for using a Column object as the "right" parameter to a query.
2207    
2208    2003-05-19  Frank Koormann  <[email protected]>
2209    
2210            * Thuban/version.py (get_changelog_date):
2211            Catch exceptions if ChangeLog does not exist.
2212    
2213            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
2214    
2215    2003-05-19  Frank Koormann  <[email protected]>
2216    
2217            Extended version information for Thuban
2218    
2219            * Thuban/version.py: New, version information for Thuban: Last
2220            modification date and last ChangeLog entry date.
2221    
2222            * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
2223            information: Display Thuban, wxPython and Python version.
2224    
2225    2003-05-16  Bernhard Herzog  <[email protected]>
2226    
2227            * Thuban/Model/save.py: Remove some unused imports including the
2228            __future__ import for nested_scopes as Thuban relies on Python 2.2
2229            now.
2230            (XMLWriter.encode): Remove the special case for a None argument.
2231            In the saver encode is always called with a string argument.
2232    
2233    2003-05-16  Bernhard Herzog  <[email protected]>
2234    
2235            * Thuban/UI/__init__.py: Remove the work-around for the locale bug
2236            in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
2237            of the bug was that e.g. float("1.2") would fail. Thuban now
2238            requires 2.4.x.
2239            
2240    2003-05-16  Frank Koormann   <[email protected]>
2241    
2242            Printing enhancement and WMF export (under Win32)
2243    
2244            * Thuban/UI/renderer.py (ExportRenderer): New, derived from
2245            ScreenRenderer. Renders Map, Legend and Scalebar for export.
2246            (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
2247            PrintRender.
2248    
2249            * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
2250            to fullfil information needed for PrinterRenderer.
2251            (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
2252            (MapCanvas.Print): Adapted to new MapPrintout.
2253            (OutputTransform): General calculations to transform from canvas
2254            coordinates to export/printing devices.
2255    
2256            * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
2257            new method_command to call ExportMap, with platform dependency (only
2258            __WXMSW__)
2259      
2260            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
2261            of scalebar drawing area as new parameters.
2262            
2263            * Thuban/Model/scalebar.py (roundInterval): round long instead of int
2264    
2265            * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
2266            Update to extended scalebar.DrawScalebar header.
2267    
2268            * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
2269    
2270            * test/test_scalebar.py: Made test executable as standalone.
2271    
2272    2003-05-16  Bernhard Herzog  <[email protected]>
2273    
2274            * Thuban/Model/table.py (Table): Remove this compatibility alias
2275            for DBFTable.
2276    
2277            * test/test_table.py: Import DBFTable as Table because that alias
2278            doesn't exist anymore.
2279    
2280            * Thuban/UI/classgen.py: Remove some unused imports
2281    
2282    2003-05-14  Jonathan Coles   <[email protected]>
2283    
2284            * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
2285            Fix docstring.
2286            (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
2287            (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
2288            values of the supplied range to determine the beginning and end
2289            bounds of the generated classes.
2290    
2291            * Thuban/Model/range.py (Range.number_re): Now accepts floats that
2292            do not have a leading 0 (.5 is now accepted as well as 0.5).
2293    
2294            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
2295            call to ClassGenerator.GenUniformDistribution.
2296    
2297            * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
2298            layout bug with the 'Projection' label.
2299    
2300            * test/support.py (FloatTestCase): New. Needed for the Range tests.
2301    
2302            * test/test_range.py: New. Imported from SciParam.
2303    
2304    2003-05-12  Jonathan Coles   <[email protected]>
2305    
2306            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
2307            to table.UniqueValues() with calls that retrieve all the values
2308            from the table. This will need to be replaced by a method on table
2309            which can simply return the list (perhaps more efficiently).
2310    
2311    2003-05-12  Jonathan Coles   <[email protected]>
2312    
2313            The return value of ClassGenerator.CalculateQuantiles has changed.
2314            Refer to the documentation for details.
2315    
2316            * test/test_classgen.py: Modified Quantile tests to use the
2317            new return values.
2318    
2319            * Thuban/Model/classgen.py
2320            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
2321            use new return values from CalculateQuantiles to produce the correct
2322            range bounds in the Classification.
2323            (ClassGenerator.CalculateQuantiles): Add more comments describing
2324            the return values and parameters. Make minor adjustments to improve
2325            the legibility of the code. Fix problem with adjusted not being set
2326            in most cases.
2327    
2328    2003-05-12  Frank Koormann <[email protected]>
2329            
2330            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
2331            and latin1. Fixes #1851 finally.
2332    
2333    2003-05-09  Jonathan Coles   <[email protected]>
2334    
2335            * test/test_classgen.py: New. Tests the Quantile algorithm.
2336    
2337            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
2338            Clean up debugging statement, add comments, fix a small bug in the
2339            returned adjusted percentiles.
2340            
2341    2003-05-09  Jonathan Coles   <[email protected]>
2342    
2343            Introduces Range class from SciParam into the ClassGroupRange class,
2344            and such ranges can now be saved and loaded from disk.
2345    
2346            Quantiles are now available in the Classification Generator.
2347    
2348            Initial support for building Queries on a table. Doesn't do anything
2349            but run some tests.
2350    
2351            * Thuban/Model/classification.py: Explicit imports.
2352            (ClassGroupRange): Use the Range class to store the underlying
2353            range information. The interface remains the same, except for
2354            GetRange(), and you can also supply a Range object as the min
2355            parameter to SetRange or __init__.
2356    
2357            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
2358            string appropriately for use in Thuban. Fixes RTbug #1851.
2359            (SessionLoader.end_projection): Handle the context of the
2360            projection tag a bit better by looking at what objects are not
2361            None. There was an assumption that a projection tag for a map
2362            could occur before any layers.
2363            (SessionLoader.start_clrange): Provide backward compatibility for
2364            reading min/max values as well as the new range parameter.
2365    
2366            * Thuban/Model/map.py: Explicit imports.
2367    
2368            * Thuban/Model/resource.py: Import _.
2369            (ProjFileSaver.write): write header using projfile.dtd.
2370    
2371            * Thuban/Model/save.py: Explicit imports.
2372            (XMLWriter.encode): New. Encode the given string from a format
2373            used by Thuban into UTF-8. Fixes RTbug #1851.
2374    
2375            * Thuban/UI/classgen.py: Explicit imports.
2376            (ClassGenDialog.__init__): Clean up the code and add support
2377            for Quantiles.
2378            (ClassGenDialog.OnOK): Add support for Quantiles.
2379            (GenQuantilesPanel): New. Input panel for Quantiles.
2380            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
2381            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
2382    
2383            * Thuban/Model/classgen.py: New. Contains all the classes named above.
2384    
2385            * Thuban/UI/classifier.py: Explicit imports.
2386            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
2387            ClassTable.SetValueAsCustom): Reworked to use new Range class.
2388    
2389            * Thuban/UI/legend.py: Explicit imports.
2390    
2391            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
2392            a Table menu and associated method calls.
2393            (MainWindow.choose_color): Removed. No longer needed.
2394    
2395            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
2396            should be disabled if no projection is selected in the available
2397            list.
2398    
2399            * Thuban/UI/renderer.py: Explicit imports.
2400    
2401            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
2402            with correctly selecting the rows and issuing the right events.
2403            Be sure to call Skip() to allow the grid to do some of its own
2404            handling which allows the rows to actually be selected.
2405            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
2406            selecting multiple shapes.
2407            (LayerTableFrame): Support for building Queries.
2408            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
2409    
2410            * Thuban/UI/tree.py: Explicit imports.
2411    
2412            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
2413            table view can call it.
2414    
2415            * test/test_classification.py: Explicit imports.
2416            (TestClassification.test_ClassGroupRange): Fix test for new
2417            Range class.
2418    
2419            * Doc/thuban.dtd: Add range parameter for clrange.
2420    
2421            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
2422            object in ClassGroupRange, and also uesd for inputting ranges in
2423            the classifer table and elsewhere.
2424    
2425            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
2426            yet.
2427    
2428    2003-05-09  Frank Koormann <[email protected]>
2429    
2430            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
2431    
2432    2003-05-08  Frank Koormann <[email protected]>
2433    
2434            Coding style updates
2435    
2436            * test/test_scalebar.py: Replaced tab indentation by spaces.
2437    
2438            * Thuban/UI/scalebar.py: Explicit imports.
2439    
2440    2003-05-08  Frank Koormann <[email protected]>
2441    
2442            * Thuban/UI/scalebar.py
2443            (ScaleBar.DrawScalebar): Format string bug fixed.
2444    
2445    2003-05-08  Frank Koormann <[email protected]>
2446    
2447            Reorganization of scalebar component (no wx in Thuban/Model)
2448    
2449            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
2450            (deriveInterval):
2451            Calculate scalebar interval and unit which fits in width for scale.
2452            (roundInterval): Round float.
2453    
2454            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
2455    
2456            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
2457    
2458            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
2459    
2460    2003-05-08  Frank Koormann <[email protected]>
2461    
2462            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
2463            Initialize ScaleBar with canvas.map
2464    
2465            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
2466            round intervals to display smarter lengths
2467            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
2468            layer. If the maps has no projection applied grey the scalebar.
2469    
2470    2003-05-07  Frank Koormann <[email protected]>
2471            
2472            Basic Scalebar features added.
2473    
2474            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
2475    
2476            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
2477            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
2478            and the renderer.
2479    
2480            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
2481    
2482            * Thuban/UI/messages.py: SCALE_CHANGED added.
2483    
2484    2003-05-07  Bernhard Herzog  <[email protected]>
2485    
2486            * Thuban/Model/session.py (Session.__init__): New instance
2487            variable shapestores to hold a list of all open shapestore objects
2488            (Session.ShapeStores): New. Accessor method for the shapestores
2489            list.
2490            (Session._add_shapestore, Session._clean_weak_store_refs): New.
2491            Internal methods to maintain the shapestores list.
2492            (Session.Tables): New. Return all tables open in the session.
2493            (Session.OpenShapefile): Insert the new ShapeStore into the
2494            shapestores list.
2495    
2496            * test/test_session.py (TestSessionSimple.test_initial_state): Add
2497            tests for ShapeStores and Tables
2498            (TestSessionWithContent.test_shape_stores)
2499            (TestSessionWithContent.test_tables): New. Test cases for
2500            ShapeStores and Tables
2501    
2502    2003-05-07  Bernhard Herzog  <[email protected]>
2503    
2504            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
2505            Add comments about the optimizations used.
2506            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
2507            Implement the ReadValue table interface method.
2508    
2509            * test/test_transientdb.py
2510            (TestTransientTable.run_iceland_political_tests)
2511            (TestTransientTable.test_transient_joined_table): Add tests for
2512            ReadValue
2513    
2514    2003-05-07  Frank Koormann <[email protected]>
2515    
2516            * Resources/Bitmaps/fulllayerextent.xpm,
2517            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
2518            new icons.
2519    
2520    2003-05-06  Bernhard Herzog  <[email protected]>
2521    
2522            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
2523            New. Simply delegate to the transient table's version.
2524    
2525            * test/test_transientdb.py
2526            (TestTransientTable.test_auto_transient_table_query): New. Test
2527            case for AutoTransientTable's SimpleQuery
2528    
2529    2003-05-06  Bernhard Herzog  <[email protected]>
2530    
2531            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
2532            Implement a simple query method for the query dialog
2533            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
2534            the row index or shapeid.
2535            (TransientTable.create): Insert the right value of the row index
2536            (TransientJoinedTable.create): Copy the row index of the left
2537            table to the joined result table
2538    
2539            * test/test_transientdb.py
2540            (TestTransientTable.test_transient_table_read_twice): Fix
2541            doc-string
2542            (TestTransientTable.test_transient_table_query): New. Test for the
2543            SimpleQuery method
2544    
2545    2003-05-06  Bernhard Herzog  <[email protected]>
2546    
2547            Convert all table users to use the new table interface. This only
2548            covers Thuban itself, not GREAT-ER or other applications built on
2549            Thuban yet, so the compatibility interface stays in place for the
2550            time being but it now issues DeprecationWarnings.
2551    
2552            Finally, the new Table interface has a new method, HasColumn.
2553    
2554            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
2555            issue deprecation warnings when they're. The warnings refer to the
2556            caller of the method.
2557            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
2558            for the deprecation warnings
2559    
2560            * test/test_table.py: Ignore the deprecation warnings for the old
2561            table in the tests in this module. The purpose of the tests is to
2562            test the old interface, after all.
2563    
2564            * test/test_transientdb.py
2565            (TestTransientTable.run_iceland_political_tests): Use the
2566            constants for the types. Add a test for HasColumn
2567            (TestTransientTable.test_transient_joined_table): Adapt to new
2568            table interface. Add a test for HasColumn
2569            (TestTransientTable.test_transient_table_read_twice): Adapt to new
2570            table interface
2571    
2572            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
2573            Adapt to new table interface
2574    
2575            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
2576            new table interface
2577    
2578            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
2579            (RecordTable.SetTable): Adapt to new table interface
2580    
2581            * Thuban/UI/classifier.py (Classifier.__init__)
2582            (Classifier.__init__): Adapt to new table interface
2583    
2584            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
2585            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
2586            to new table interface
2587    
2588            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
2589            (AutoTransientTable.HasColumn): Implement the new table interface
2590            method
2591            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
2592            (AutoTransientTable.UniqueValues): Adapt to new table interface
2593    
2594            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
2595            Adapt to new table interface
2596    
2597            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
2598            simplify opening shapefiles a bit easier.
2599            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
2600            (TestLayer.test_point_layer): Use the new helper method
2601            (TestLayer.test_get_field_type): New. Test for the GetFieldType
2602            method
2603    
2604            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
2605            the new table method
2606    
2607            * test/test_memory_table.py (TestMemoryTable.test_has_column):
2608            Test for the new table method HasColumn
2609    
2610    2003-05-06  Jonathan Coles   <[email protected]>
2611    
2612            Addresses the "Selection Extent" wish of RTbug #1787.
2613    
2614            * Resources/Bitmaps/fulllayerextent.xpm,
2615            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
2616            extent. These are just place holders for the real bitmaps.
2617    
2618            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
2619            calculate the bounding box once (the first time compute_bbox() is
2620            called).
2621            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
2622            the bounding box for the shapes in lat/long coordinates.
2623    
2624            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
2625            option.
2626            (MainWindow.has_selected_shapes): New. Returns true if there are
2627            any selected shapes.
2628            (MainWindow.FullSelectionExtent): New. Calls
2629            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
2630            (_has_selected_shapes): New. Returns true if there are any
2631            selected shapes.
2632    
2633            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
2634            true if there are any selected shapes.
2635    
2636            * Thuban/UI/view.py (MapCanvas): Added delegated method
2637            HasSelectedShapes.
2638            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
2639            shapes on the canvas using the map projection (if any).
2640    
2641            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
2642            for Layer.ShapesBoundingBox().
2643    
2644    2003-05-06  Bernhard Herzog  <[email protected]>
2645    
2646            * Resources/Projections/defaults.proj: Fix spelling of Mercator
2647    
2648    2003-05-05  Jonathan Coles   <[email protected]>
2649    
2650            Addresses the "Full Layer Extent" wish of RTbug #1787.
2651    
2652            * Resources/Projections/defaults.proj: Added UK National Grid.
2653    
2654            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
2655            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
2656            when the user selects the menu option.
2657    
2658            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
2659            scales the given layer on the canvas using the map projection.
2660    
2661    2003-05-05  Bernhard Herzog  <[email protected]>
2662    
2663            Convert the table implementations to a new table interface. All
2664            tables use a common mixin class to provide backwards compatibility
2665            until all table users have been updated.
2666    
2667            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
2668            provide backwards compatibility for table classes implementing the
2669            new interface
2670            (DBFTable, MemoryTable): Implement the new table interface. Use
2671            OldTableInterfaceMixin as base for compatibility
2672            (DBFColumn, MemoryColumn): New. Column description for DBFTable
2673            and MemoryTable resp.
2674    
2675            * test/test_dbf_table.py: New. Test cases for the DBFTable with
2676            the new table interface.
2677    
2678            * test/test_memory_table.py: New. Test cases for the MemoryTable
2679            with the new table interface.
2680    
2681            * test/test_table.py: Document the all tests in this file as only
2682            for backwards compatibility. The equivalent tests for the new
2683            interface are in test_memory_table.py and test_dbf_table.py
2684            (MemoryTableTest.test_read): field_info should be returning tuples
2685            with four items
2686            (MemoryTableTest.test_write): Make doc-string a more precise.
2687    
2688            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
2689            table interface. Derive from from OldTableInterfaceMixin for
2690            compatibility.
2691            (TransientTableBase.create): New intance variable column_map to
2692            map from names and indices to column objects
2693            (TransientTable.create): Use the new table interface of the input
2694            table
2695            (AutoTransientTable): Convert to new table interface. Derive from
2696            from OldTableInterfaceMixin for compatibility.
2697            (AutoTransientTable.write_record): Removed. It's not implemented
2698            yet and we still have to decide how to handle writing with the new
2699            table and data framework.
2700    
2701            * test/test_transientdb.py
2702            (TestTransientTable.run_iceland_political_tests)
2703            (TestTransientTable.test_transient_joined_table): Use the new
2704            table interface
2705    
2706    2003-05-05  Jonathan Coles   <[email protected]>
2707    
2708            This is namely a collection of UI updates to improve user interactivity.
2709            Tabbing between controls now exists and you can use ESC to close dialog
2710            boxes; ENTER will active the default button.
2711    
2712            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
2713            order that the controls are created so that tabbing works correctly.
2714            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
2715            wxDialog can handle the default button correctly.
2716            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
2717            same reasons as for OnOK.
2718            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
2719            when we ask the table for the maximum/minimum values of a field
2720            which could take a very long time.
2721    
2722            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
2723            order that the controls are created so that tabbing works correctly.
2724            (SelectPropertiesDialog.__init__): Rearrange the order that the
2725            controls are created so that tabbing works correctly.
2726    
2727            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
2728            to derive from a wxDialog but behave like the original implementation
2729            which was derived from a wxFrame. wxDialog provides useful key
2730            handling functionality like ESC calling OnCancel and ENTER calling
2731            OnOK which is lost with wxFrame.
2732    
2733            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
2734            new dialogs.
2735    
2736            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
2737            order that the controls are created so that tabbing works correctly.
2738            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
2739            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
2740            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
2741            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
2742            can provide the "UK National Grid" as a default projection.
2743            (UTMPanel.__init__): Rearrange the order that the controls are
2744            created so that tabbing works correctly.
2745    
2746    2003-05-05  Bernhard Herzog  <[email protected]>
2747    
2748            * extensions/thuban/wxproj.cpp: Fix some of the comments.
2749            (project_point): If a map projection but no layer projection is
2750            given, convert degrees to radians before applying the map
2751            projection.
2752    
2753            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
2754            (TableGrid.allow_messages): New methods to make it possible to
2755            inhibit message sending.
2756            (TableGrid.issue): Only send the message if not inhibited.
2757            (LayerTableGrid.select_shape): Use the new methods to make sure
2758            that no ROW_SELECTED message is sent while we're updating the
2759            selected rows to match the selected shapes.
2760    
2761    2003-05-02  Jan-Oliver Wagner <[email protected]>
2762    
2763            Implementation of MemoryTable.
2764    
2765            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
2766            implementation that operates on a list of tuples. All of the data
2767            are kept in the memory.
2768    
2769            * test/test_table.py (MemoryTableTest): New.
2770    
2771            * test/test_transientdb.py (SimpleTable): Removed.
2772            (TestTransientTable.test_transient_joined_table,
2773            (TestTransientTable.test_transient_table_read_twice): Replaced
2774            SimpleTable by MemoryTable.
2775    
2776    2003-04-30  Jonathan Coles   <[email protected]>
2777    
2778            * Data/iceland_sample.thuban: Now contains correct projections
2779            for each of the layers.
2780    
2781            * Resources/Projections/defaults.proj: Geographic projection
2782            contains unit conversion parameter.
2783    
2784    2003-04-30  Jonathan Coles   <[email protected]>
2785    
2786            The most important part of this putback is the projection changes.
2787            It should now be possible to specify the projection that a layer
2788            is in and then specify a different projection for the map. The
2789            projection dialog has an extra parameter for a geographic projection
2790            which lets the user select if the input is in degrees or radians.
2791    
2792            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
2793            to say that the parameter is a tuple of unprojected
2794            points (which is what the callers to this method were assuming).
2795            Also, since the points are unprojected we need to projected them.
2796    
2797            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
2798            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
2799            groups are selected, move the layer up/down. Fixes RTbug #1833.
2800    
2801            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
2802    
2803            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
2804            parameter in call to SetClientData.
2805            (GeoPanel): Add support for selecting the units that the
2806            source data is in (Radians or Degrees).
2807    
2808            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
2809            the rendering loop by reducing the number of if's, removing the
2810            unnecessary try/except block, and checking if the old group
2811            is the same as the new one (which happens a lot if there is
2812            no classification, or lots of shapes are in the same group).
2813    
2814            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
2815            around the redraw routine to try to catch problems that the user
2816            may create by selecting invalid projections for the data set and
2817            map. Clears the display if there are any problems and prints the
2818            error.
2819            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
2820            rectangle.
2821    
2822            * extensions/thuban/wxproj.cpp (project_point): First invert the
2823            supplied point (which should be in projected coordinates) using
2824            the layer's projection and then project the point using the
2825            map's projection.
2826            (project_points): Use project_point() to project each point.
2827    
2828    2003-04-30  Jan-Oliver Wagner <[email protected]>
2829    
2830            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
2831            don't set the Classification to None if the classfication field
2832            is None (ie only a DEFAULT).
2833    
2834    2003-04-30  Bernhard Herzog  <[email protected]>
2835    
2836            * Thuban/UI/view.py: Fix some typos.
2837    
2838            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
2839            not pop up the dialog if the selection becomes empty (this could
2840            happen if e.g. a new selection is opened while the identify tool
2841            is active and dialog had been closed)
2842    
2843    2003-04-30  Bernhard Herzog  <[email protected]>
2844    
2845            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
2846            instance variable read_record_last_result
2847            (TransientTableBase.read_record): Make sure reading the same
2848            record twice works. The implementation uses the new instance
2849            variable read_record_last_result
2850    
2851            * test/test_transientdb.py
2852            (TestTransientTable.test_transient_table_read_twice): New test
2853            case for the above bug-fix.
2854    
2855    2003-04-29  Jonathan Coles   <[email protected]>
2856    
2857            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
2858    
2859            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
2860    
2861            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
2862            (ClassTable.SetValueAsCustom): Rename keyword argument in
2863            ClassGroup* constructors to match argument name.
2864    
2865    2003-04-29  Bernhard Herzog  <[email protected]>
2866    
2867            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
2868            transient DB if it exists to make sure it doesn't leave a journal
2869            file in the temp directory.
2870    
2871            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
2872            self.conn to None after closing the connection to make sure it's
2873            not closed twice
2874    
2875    2003-04-29  Jonathan Coles   <[email protected]>
2876    
2877            Add a visible parameter in the layer XML tag. The default value is
2878            "true". If anything other than "false" is specified we also assume
2879            "true". Addresses RTbug #1025.
2880    
2881            * Doc/thuban.dtd: Add visible parameter to a layer.
2882    
2883            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
2884            of visible from 1 to True.
2885            (Layer.__init__): Change default value of visible from 1 to True.
2886    
2887            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
2888            parameter.
2889    
2890            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
2891            parameter.
2892    
2893            * test/test_load.py: Add new test data contents_test_visible.
2894            (LoadSessionTest.setUp): save test data.
2895            (LoadSessionTest.testLayerVisibility): Test if the visible flag
2896            is loaded correctly.
2897    
2898            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
2899            for saving an invisible layer.
2900    
2901    2003-04-29  Jonathan Coles   <[email protected]>
2902    
2903            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
2904            legend dialog box and tell it to change its map to the one
2905            supplied to SetMap(). Fixes RTbug #1770.
2906    
2907    2003-04-29  Bernhard Herzog  <[email protected]>
2908    
2909            Next step of table implementation. Introduce a transient database
2910            using SQLite that some of the data is copied to on demand. This
2911            allows us to do joins and other operations that require an index
2912            for good performance with reasonable efficiency. Thuban now needs
2913            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
2914            haven't tested that.
2915            
2916            * Thuban/Model/transientdb.py: New. Transient database
2917            implementation.
2918    
2919            * test/test_transientdb.py: New. Tests for the transient DB
2920            classes.
2921    
2922            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
2923            classes to help automatically remove temporary files and
2924            directories.
2925            (Session.__init__): New instance variables temp_dir for the
2926            temporary directory and transient_db for the SQLite database
2927            (Session.temp_directory): New. Create a temporary directory if not
2928            yet done and return its name. Use AutoRemoveDir to have it
2929            automatically deleted
2930            (Session.TransientDB): Instantiate the transient database if not
2931            done yet and return it.
2932    
2933            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
2934            AutoTransientTable so that data is copied to the transient DB on
2935            demand.
2936            (SimpleStore): New class that simply combines a table and a
2937            shapefile
2938    
2939            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
2940            DBFTable and update its doc-string to reflect the fact that this
2941            is only the table interface to a DBF file. Table is now an alias
2942            for DBFTable for temporary backwards compatibility.
2943    
2944            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
2945            the last reference to the session goes away so that the temporary
2946            files are removed properly.
2947    
2948            * test/test_load.py (LoadSessionTest.tearDown): Remove the
2949            reference to the session to make sure the temporary files are
2950            removed.
2951    
2952    2003-04-29  Bernhard Herzog  <[email protected]>
2953    
2954            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
2955            the __parser instance variable into a normal local variable in
2956            read. It's only used there and read will never be called more than
2957            once. Plus it introduces a reference cycle that keeps can keep the
2958            session object alive for a long time.
2959    
2960    2003-04-29  Jonathan Coles   <[email protected]>
2961    
2962            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
2963            Projection an immutable item. Fixes RTbug #1825.
2964            (Projection.__init__): Initialize instance variables here.
2965            (ProjFile.Replace): New. Replace the given projection object with
2966            the new projection object. This solves the problem of needing the
2967            mutator Projection.SetProjection() in the ProjFrame class and
2968            allows a projection to change parameters without changing its
2969            location in the file.
2970    
2971            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
2972            be of type wxSAVE and should verify overwriting a file.
2973    
2974            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
2975            ProjFile.Replace() method instead of the mutator
2976            Projection.SetProjection(). Also requires that we reassign the
2977            client data to the new projection.
2978    
2979            * test/test_proj.py (TestProjection.test): Test GetName() and
2980            GetAllParameters()
2981            (TestProjFile.test): Remove tests for Set*() methods. Add tests
2982            for Replace().
2983    
2984    2003-04-25  Jonathan Coles   <[email protected]>
2985    
2986            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
2987            to save the name of the projection.
2988    
2989            * test/test_save.py (SaveSessionTest.testLayerProjection): New
2990            test to verify layer projections are saved correctly.
2991    
2992    2003-04-25  Jonathan Coles   <[email protected]>
2993    
2994            * Thuban/Model/proj.py (Projection.SetName): Set the name
2995            to "Unknown" if name is None.
2996            (Projection.SetAllParameters): New. Set the projection's
2997            parameter list to the one supplied.
2998            (Projection.SetProjection): New. Set the projection's
2999            properties to those of the supplied Projection.
3000    
3001            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
3002            the dialog title to include the map's title.
3003            (MainWindow.LayerProjection): Set the dialog title to include
3004            the layer's title.
3005    
3006            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
3007            error dialogs into a single method call.
3008            (ProjFrame.__VerifyButtons): Add more states to check.
3009            (ProjFrame.__GetProjection): Return the current state of an
3010            edited projection or None.
3011            (ProjFrame.__FillAvailList): Remove checks for states that
3012            shouldn't exist.
3013            (ProjFrame._OnNew): Clear all selected items and supply
3014            a projection panel if necessary.
3015    
3016            * test/test_proj.py (TestProjFile.test): Add tests for
3017            ProjFile.SetAllParameters, ProjFile.SetProjection,
3018            ProjFile.SetName.
3019    
3020    2003-04-25  Jonathan Coles   <[email protected]>
3021    
3022            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
3023            takes an optional argument to select the current projection.
3024            This does not guarantee that the item is visible due to
3025            limited wxWindows functionality. Fixes RTBug #1821.
3026    
3027    2003-04-25  Jonathan Coles   <[email protected]>
3028    
3029            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
3030            the projection name and use it when constructing the Projection
3031            object.
3032    
3033            * Thuban/Model/proj.py (Projection.__init__): Change the default
3034            value for 'name' to None and then test if name is equal to None
3035            in the body of the constructor. This way the caller doesn't have to
3036            know what the default value should be. Namely, useful in load.py
3037            where we have to pick a default value if the 'name' parameter
3038            doesn't exist in the XML file.
3039    
3040            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
3041            Tests a file where a layer has a projection.
3042    
3043    2003-04-25  Jonathan Coles   <[email protected]>
3044    
3045            * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
3046            tree for projection information.
3047    
3048            * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
3049            XMLReader.GetFileName.
3050            (SessionLoader): Added support for loading projection tags that
3051            appear inside a layer.
3052    
3053            * Thuban/Model/proj.py (ProjFile): Document the class. Move
3054            back to using a list because the order of the projections in
3055            the file is important to maintain. Fixes RTbug #1817.
3056    
3057            * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
3058            to ProjFile.GetFilename.
3059    
3060            * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
3061            information.
3062    
3063            * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
3064            ProjFrame._OnSaveAs. Removed old dead code from previous
3065            implementation.
3066            (ProjFrame._OnExport): Add support for exporting more than one
3067            projection to a single file.
3068            (ProjFrame.__FillAvailList): use string formatting (% operator)
3069            to build strings that are (partly) translated. Fixes RTbug #1818.
3070    
3071            * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
3072            class.
3073    
3074    2003-04-24  Bernhard Herzog  <[email protected]>
3075    
3076            * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
3077    
3078            * po/fr.po: New. French translation by Daniel Calvelo Aros
3079    
3080            * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
3081            empty strings.
3082    
3083    2003-04-24  Jonathan Coles   <[email protected]>
3084    
3085            * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
3086            implement the interface that the ProjFrame dialog expects.
3087    
3088            * Thuban/Model/proj.py (Projection.SetName): New. Allows the
3089            name of the projection to be changed.
3090            (ProjFile): Use a dictionary instead of a list so that removing
3091            projections is easier and we are sure about uniqueness.
3092            (ProjFile.Remove): Remove the given projection object.
3093    
3094            * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
3095            Return a list with only one projection file instead of searching for
3096            any projection file. This simplifies many things if the user can
3097            only have one system file and one user file.
3098    
3099            * Thuban/UI/classgen.py: Change all references to
3100            genCombo to genChoice.
3101    
3102            * Thuban/UI/mainwindow.py: Add a Projection option under the
3103            layer menu.
3104            (MainWindow.LayerProjection): New. Open up a projection window
3105            for a layer.
3106    
3107            * Thuban/UI/projdialog.py: Large changes to how the dialog is
3108            laid out. Use three panels instead of one. One for the list of
3109            projections, one for the edit controls, and one for the buttons.
3110            Fixed resizing problems so that the dialog resizes correctly
3111            when the projection panel changes. Added import/export, save, and
3112            new buttons/functionality.
3113    
3114    2003-04-24  Bernhard Herzog  <[email protected]>
3115    
3116            First step towards table management. Introduce a simple data
3117            abstraction so that we replace the data a layer uses more easily
3118            in the next step.
3119    
3120            * Thuban/Model/data.py: New file with a simple data abstraction
3121            that bundles shapefile and dbffile into one object.
3122    
3123            * Thuban/Model/session.py (Session.OpenShapefile): New method to
3124            open shapefiles and return a shape store object
3125    
3126            * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
3127            object instead of a shapefile filename. This introduces a new
3128            instance variable store holding the datastore. For intermediate
3129            backwards compatibility keep the old instance variables.
3130            (open_shapefile): Removed. No longer needed with the shape store.
3131            (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
3132            get the shape store used by a layer.
3133            (Layer.Destroy): No need to explicitly destroy the shapefile or
3134            table anymore.
3135    
3136            * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
3137            (MainWindow.AddLayer): Use the session's OpenShapefile method to
3138            open shapefiles
3139    
3140            * Thuban/Model/load.py (ProcessSession.start_layer): Use the
3141            session's OpenShapefile method to open shapefiles
3142    
3143            * test/test_classification.py
3144            (TestClassification.test_classification): Use the session's
3145            OpenShapefile method to open shapefiles and build the filename in
3146            a more platform independed way
3147    
3148            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
3149            Implement to have a session to use in the tests
3150            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
3151            (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
3152            session's OpenShapefile method to open shapefiles
3153            (TestLayerLegend.setUp): Instantiate a session so that we can use
3154            it to open shapefiles.
3155            (TestLayerLegend.tearDown): Make sure that all references to
3156            layers and session are removed otherwise we may get a resource
3157            leak
3158    
3159            * test/test_map.py (TestMapAddLayer.test_add_layer)
3160            (TestMapWithContents.setUp): Instantiate a session so that we can
3161            use it to open shapefiles.
3162            (TestMapWithContents.tearDown): Make sure that all references to
3163            layers, maps and sessions are removed otherwise we may get a
3164            resource leak
3165            ("__main__"): use support.run_tests() so that more info about
3166            uncollected garbage is printed
3167    
3168            * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
3169            session's OpenShapefile method to open shapefiles
3170            ("__main__"): use support.run_tests() so that more info about
3171            uncollected garbage is printed
3172    
3173            * test/test_selection.py (TestSelection.tearDown): Make sure that
3174            all references to the session and the selection are removed
3175            otherwise we may get a resource leak
3176            (TestSelection.get_layer): Instantiate a session so that we can
3177            use it to open shapefiles.
3178            ("__main__"): use support.run_tests() so that more info about
3179            uncollected garbage is printed
3180    
3181            * test/test_session.py (TestSessionBase.tearDown)
3182            (TestSessionWithContent.tearDown): Make sure that all references
3183            to the session and layers are removed otherwise we may get a
3184            resource leak
3185            (TestSessionWithContent.setUp): Use the session's OpenShapefile
3186            method to open shapefiles
3187    
3188    2003-04-24  Jonathan Coles   <[email protected]>
3189    
3190            * Thuban/Model/load.py (XMLReader.read): Should have been checking
3191            if the file_or_filename object had the 'read' attribute.
3192    
3193    2003-04-23  Jonathan Coles   <[email protected]>
3194    
3195            * Thuban/Model/resource.py: Fixes RTbug #1813.
3196            (ReadProjFile): Add documentation about which exceptions are raised.
3197            Always pass the exceptions up to the caller.
3198            (GetProjFiles): If the directory can't be read return an empty list.
3199            If any of the proj files can't be read skip that file and go
3200            on to the next one.
3201    
3202            * test/test_proj.py: Added test cases to handle nonexistent files,
3203            unreadable files, and files that don't parse correctly.
3204    
3205    2003-04-23  Jonathan Coles   <[email protected]>
3206    
3207            Projection dialog. Allows the user to select from a list
3208            of projection templates and optionally edit them and save new ones.
3209    
3210            * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
3211            (ProjPanel): Base class for projection specific panels.
3212            (TMPanel): Projection panel for Transverse Mercartor.
3213            (UTMPanel): Projection panel for Universal Transverse Mercartor.
3214            (LCCPanel): Projection panel for Lambert Conic Conformal.
3215            (GeoPanel): Projetion panel for Geographic Projection.
3216    
3217    2003-04-23  Jonathan Coles   <[email protected]>
3218    
3219            * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
3220            promote symmetry. There now exists XMLReader and XMLWriter.
3221            (XMLReader.read): New. Call to read the given file descriptor or
3222            filename.
3223            (XMLReader.close): New. Make sure the file is closed.
3224            (XMLReader.GetFileName): New. Return just the file name that is being
3225            read from.
3226            (XMLReader.GetDirectory): New. Return just the directory of the file
3227            that is being read.
3228            (XMLReader.AddDispatchers): New. Take a dictionary which contains
3229            the names of functions to call as the XML tree is parsed.
3230            (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
3231            (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
3232            (SessionLoader): Removed class variables start_dispatcher and
3233            end_dispatcher since this functionality is now part of a class
3234            instance. Fixes RTbug #1808.
3235            (SessionLoader.__init__): Add dispatcher functions.
3236            (load_xmlfile): Code was moved into the XMLReader.read().
3237            (load_session): Use modified SessionLoader.
3238    
3239            * Thuban/Model/map.py (Map.GetProjection): New. Returns the
3240            map's projection.
3241    
3242            * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
3243            GetAllParameters.
3244            (Projection.GetParameter): Returns the value for the given parameter.
3245    
3246            * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
3247            (GetProjFiles): Renamed from GetProjections. Now returns a list
3248            of ProjFile objects.
3249            (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
3250            a list of ProjFile objects whose files are not user defined.
3251            (GetUserProjFiles): Renamed from GetUserProjections. Returns a
3252            list of ProjFile objects whose files are user defined.
3253            (ProjFileReader): Extend new XMLReader.
3254    
3255            * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
3256            promote symmetry.
3257    
3258            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
3259            control instead of a wxComboBox. wxChoice controls do not generate
3260            events as the uses highlights possible choices which fixes problems
3261            with resizing the dialog when the use selects an option.
3262    
3263            * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
3264            control instead of a wxComboBox.
3265    
3266            * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
3267            dialog.
3268    
3269            * test/test_proj.py (TestProjection.test): New tests for GetParameter
3270            method.
3271    
3272    2003-04-22  Bernhard Herzog  <[email protected]>
3273    
3274            * Thuban/UI/mainwindow.py: Remove some unused imports and global
3275            constants
3276    
3277            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
3278            (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
3279    
3280    2003-04-17  Bernhard Herzog  <[email protected]>
3281    
3282            * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
3283            (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
3284            anymore.
3285            (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
3286            (Layer.ShapeType, Layer.Shape): No need to call
3287            self.open_shapefile since it's always called in __init__
3288    
3289            * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
3290            In wxPython 2.4 there's no need to extend MainLoop anymore since
3291            wxPython itself makes sure OnExit is called.
3292    
3293    2003-04-16  Jonathan Coles   <[email protected]>
3294    
3295            Initial putback of projection management code. Includes new
3296            classes to read and write projection files. The current load
3297            and save classes were abstracted a bit so they could be reused.
3298            The Projection class was extended to provide new methods and
3299            have a name.
3300    
3301            * Thuban/Model/load.py (XMLProcessor): New. Contains all the
3302            general XML reading methods that were part of ProcessSession.
3303    
3304            * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
3305            name.
3306            (ProjFile): New. Represents a file that contains projection
3307            information.
3308    
3309            * Thuban/Model/resource.py: New. Contains general utilities
3310            for read and writing projection files.
3311    
3312            * Thuban/Model/save.py (XMLSaver): New. Contains all the
3313            general XML writing methods that were part of SessionSaver.
3314            (SessionSaver): Renamed from Saver.
3315    
3316            * test/test_proj.py: New test cases for the projection
3317            file read and write functions.
3318    
3319    2003-04-16  Jonathan Coles   <[email protected]>
3320    
3321            * Thuban/Model/classification.py: Use repr() around values
3322            in the ClassGroup*.__repr__() methods so it is clearer when
3323            a value is a string and when it is a number.
3324    
3325            * test/test_load.py: Rework the classification test to test
3326            that we can load old files.
3327            (testLabels): Test a file where the groups have labels.
3328    
3329    2003-04-16  Bernhard Herzog  <[email protected]>
3330    
3331            Safer implementation of the performance enhancements of the
3332            low-level renderer:
3333            
3334            * extensions/thuban/wxproj.cpp (extract_projection)
3335            (extract_pointer): Rename extract_projection to extract_pointer
3336            and redefine its purpose to return the pointer stored in a CObject
3337            returned by the object's cobject method. Update all callers.
3338            (s_draw_info, free_draw_info, draw_polygon_init): Implement the
3339            handling of these low-level parameters so that each s_draw_info
3340            instance is handled as a CObject at python level that also
3341            contains real references to the actual python objects which
3342            contain the values in the struct. Add free_draw_info as the
3343            destructor.
3344            (draw_polygon_shape): Add the py_draw_info parameter which must a
3345            cobject containing an s_draw_info pointer.
3346    
3347            * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
3348            method to instantiat the low-level render parameter
3349            (MapRenderer.draw_shape_layer): Use the new method. Remove some
3350            commented out code.
3351            (MapRenderer.draw_polygon_shape): Make the first parameter not the
3352            layer but the low-level render parameter
3353            (ScreenRenderer.draw_shape_layer): Use the low-level render
3354            parameter.
3355    
3356    2003-04-15  Jonathan Coles   <[email protected]>
3357    
3358            * Thuban/Model/classification.py: Implemented __repr__ for
3359            the ClassGroup* classes to make debugging a bit easier.
3360            (ClassGroup.SetLabel): Check that the string is an instance
3361            of StringTypes not StringType. Accounts for Unicode strings.
3362    
3363            * Thuban/Model/color.py: Implemented __repr__ to make
3364            debugging a bit easier.
3365    
3366            * Thuban/Model/save.py (Saver.write_classification): Need to
3367            save the group label.
3368    
3369            * test/test_load.py (testClassification): New. Loads the
3370            iceland_sample_test.thuban file and checks if it was loaded
3371            correctly.
3372    
3373    2003-04-15  Jonathan Coles   <[email protected]>
3374    
3375            * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
3376            to improve rendering performance by initializing the variables
3377            that are not change each time draw_polygon_shape() is called.
3378            The values are stored in a global struct draw_info.
3379            (draw_polygon_shape): Removed initialization code that is
3380            now in draw_polygon_init().
3381    
3382            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
3383            drawing initialization call to draw_polygon_init()
3384            (MapRenderer.draw_polygon_shape): Use new signature of
3385            draw_polygon_shape.
3386    
3387            * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
3388            weirdness by setting the range to (1, maxint).
3389    
3390            * Thuban/Model/classification.py (ClassGroupProperties): Make
3391            instance variables private and optimize comparison operator
3392            by first checking if the color references are the same.
3393            (ClassGroupSingleton): Make instance variables private.
3394            (ClassGroupRange): Make instance variables private.
3395    
3396            * HOWTO-Release: Filled in missing steps for releasing packages.
3397    
3398    2003-04-15  Bernhard Herzog  <[email protected]>
3399    
3400            First stab at internationalized messages:
3401    
3402            * Thuban/__init__.py (_): Implement the translation function for
3403            real using the python gettext module.
3404    
3405            * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
3406            translate empty strings.
3407    
3408            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
3409            Add a missing space to a warning message
3410    
3411            * po/README: New. Notes about the management of the translation
3412            files.
3413    
3414            * po/Makefile: New. Makefile to help manage the translation files.
3415    
3416            * po/es.po: New. Spanish translation by Daniel Calvelo Aros
3417    
3418            * MANIFEST.in: Include the *.mo files in Resources/Locale and the
3419            translations and support files in po/
3420    
3421            * setup.py (data_files): Add the *.mo files to the data_files too
3422    
3423            * README: Add note about the translations when building from CVS
3424    
3425    2003-04-14  Jonathan Coles   <[email protected]>
3426    
3427            * Thuban/UI/dock.py: Fixes some window resizing problems most
3428            noticable under windows. Always assume the button bitmaps will
3429            be there. Code clean up.
3430            (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
3431            images for the dock/undock button to the same images.
3432            Work around for RTbug #1801.
3433    
3434            * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
3435            be allowed to grow within the sizer. Fixes a bug under Windows
3436            where the toolbar wasn't being drawn.
3437    
3438    2003-04-14  Frank Koormann   <[email protected]>
3439    
3440            * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
3441            Updated design to try to make the button functionality more
3442            transparent.
3443    
3444    2003-04-14  Jonathan Coles   <[email protected]>
3445    
3446            * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
3447            finalize the intialization of the panel.
3448    
3449            * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
3450            creation of the panel. Should be the last thing called in the
3451            initializer of a subclass.
3452    
3453            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
3454            set the current selections in the combo boxes. This is needed
3455            under Windows.
3456    
3457            * Thuban/UI/classifier.py (Classifier.__init__): Add a top
3458            level panel to the dialog so that the background colors are
3459            consistent under Windows.
3460    
3461    2003-04-11  Jonathan Coles   <[email protected]>
3462    
3463            * Thuban/UI/classgen.py: Change color ramps to start at white
3464            not black.
3465    
3466            * Thuban/UI/legend.py: Enable/disable the legend buttons when
3467            the legend changes. Fixes RTbug #1793.
3468    
3469            * test/test_classification.py: Added test for copying of
3470            classifications.
3471    
3472    2003-04-11  Jonathan Coles   <[email protected]>
3473    
3474            * Thuban/UI/resource.py: New. Centralize the loading of resources
3475            such as bitmaps.
3476    
3477            * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
3478            added images to the move buttons, added 'reverse' button.
3479            (CustomRampPanel.__init__): Added images to the move buttons.
3480            (GreyRamp): New. Generates a ramp from white to black.
3481            (HotToColdRamp): New. Generates a ramp from cold to hot colors.
3482    
3483            * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
3484            ID_PROPERTY_*.
3485            (Classifier.__init__): Minor changes to the layout.
3486            (Classifier._OnTitleChanged): Listen for when the user edits the
3487            title and update the dialog's title and the layer's title.
3488    
3489            * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
3490    
3491            * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
3492            (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
3493            if the layer's title changes.
3494    
3495            * Thuban/UI/mainwindow.py: Added new menu item and associated code
3496            to open a dialog to rename the map.
3497            (MainWindow): Use new resource class to import bitmaps.
3498    
3499    2003-04-11  Jonathan Coles   <[email protected]>
3500    
3501            * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
3502            Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
3503            Resources/Bitmaps/group_use_none.xpm,
3504            Resources/Bitmaps/group_use_not.xpm,
3505            Resources/Bitmaps/hide_layer.xpm,
3506            Resources/Bitmaps/layer_properties.xpm,
3507            Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
3508            Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
3509            New.
3510    
3511    2003-04-10  Jonathan Coles   <[email protected]>
3512    
3513            * Thuban/Model/classification.py: (ClassGroupRange.__init__):
3514            Should pass group to ClassGroup constructor.
3515    
3516    2003-04-10  Jonathan Coles   <[email protected]>
3517    
3518            * Thuban/Model/classification.py: (ClassGroup): Move all the common
3519            methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
3520            here. Implement SetVisible(), IsVisible().
3521            (ClassGroup.__init__): Add group parameter which acts as a copy
3522            constructor.
3523    
3524            * Thuban/UI/classifier.py (ClassTable): Add a new column for the
3525            "Visible" check boxes.
3526            (Classifier): Rename the buttons and refactor the code to match
3527            the new labels.
3528    
3529            * Thuban/UI/legend.py: Classify button is now called "Properties".
3530            Refactored the code to change variable names.
3531            (LegendTree.__FillTreeLayer): Only list a group if it is visible.
3532    
3533            * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
3534            MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
3535            renamed to MainWindow.LayerEditProperties.
3536            (MainWindow.ToggleLegend): Don't include map name in legend title.
3537            (MainWindow.SetMap): Added the map name to the window title.
3538            (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
3539            MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
3540            Functionality is found in the layer properties dialog.
3541    
3542            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
3543            draw visible groups.
3544    
3545    2003-04-09  Jonathan Coles   <[email protected]>
3546    
3547            * Thuban/UI/classgen.py: Modifications to allow simple
3548            addition and selection of new color schemes.
3549            (MonochromaticRamp): New. Generates a ramp between two colors.
3550            (RedRamp): New. Generates a ramp of all red.
3551            (GreenRamp): New. Generates a ramp of all green.
3552            (BlueRamp): New. Generates a ramp of all blue.
3553    
3554    2003-04-09  Jonathan Coles   <[email protected]>
3555    
3556            * Thuban/Model/classification.py (Classification.__deepcopy__):
3557            Need to copy over field and fieldType attributes.
3558    
3559            * Thuban/Model/table.py (Table.field_range): New. Retrive the
3560            maximum and minimum values over the entire table for a given
3561            field.
3562            (Table.GetUniqueValues): New. Retrieve all the unique values
3563            in the table for a given field.
3564    
3565            * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
3566            (GenUniquePanel): New. Controls to allow the user to select
3567            which unique field values they would like in the classification.
3568            (CustomRampPanel): Code that was in ClassGenDialog that allows
3569            the user to select the properties for a custom ramp.
3570            (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
3571    
3572            * Thuban/UI/classifier.py: Removed a lot of debugging code.
3573            (Classifier._SetClassification): Callback method so that the
3574            class generator can set the classification in the grid.
3575            (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
3576            editing of a group properties class into a wxWindows control.
3577    
3578            * Thuban/UI/dock.py: It was decided that if the user closes
3579            a dockable window the window should simply hide itself. That
3580            way if the user wants to show the dock again it appears in the
3581            same place as it was when it was closed.
3582            (DockableWindow.Destroy): Call renamed method OnDockDestroy().
3583            (DockableWindow._OnButtonClose): Hide the window instead of
3584            destroying it.
3585            (DockableWindow._OnClose): Hide the window instead of
3586            destroying it.
3587    
3588            * Thuban/UI/legend.py (LegendTree): Use a private method to
3589            consistently set the font and style of the text. Fixes RTbug #1786.
3590    
3591            * Thuban/UI/mainwindow.py: Import just the Classifier class.
3592    
3593    2003-04-07  Bernhard Herzog  <[email protected]>
3594    
3595            * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
3596            to the map module
3597    
3598    2003-04-07  Bernhard Herzog  <[email protected]>
3599    
3600            * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
3601            favor of ToggleSessionTree
3602            (MainWindow.ToggleSessionTree): New method to toggle visibility of
3603            the session tree.
3604            (MainWindow.SessionTreeShown): New method to return whether the
3605            session tree is currently shown.
3606            (MainWindow.ToggleLegend): New method to toggle visibility of the
3607            legend
3608            (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
3609            LegendShown
3610            (MainWindow.LegendShown): New method to return whether the legend
3611            is currently shown.
3612            (_method_command): Add checked parameter so we can define check
3613            menu items
3614            (_has_tree_window_shown, _has_legend_shown): Use the appropriate
3615            mainwindow methods.
3616            (show_session_tree, show_legend commands): Removed.
3617            (toggle_session_tree, toggle_legend commands): New commands to
3618            toggle the visibility of the dialogs
3619    
3620    2003-04-07  Jonathan Coles   <[email protected]>
3621    
3622            * Thuban/UI/classgen.py: Fix Windows problem.
3623    
3624            * Thuban/UI/dock.py: Fix Windows problem.
3625    
3626            * Thuban/UI/mainwindow.py: Use False instead of false.
3627            (MainWindow.ShowLegend): Remove unnecessary switch parameter.
3628    
3629    2003-04-07  Jonathan Coles   <[email protected]>
3630    
3631            Since we now say that the order of the groups in a classification
3632            matters, it makes sense to be able to manipulate that order. Most
3633            of the changes to Thuban/Model/classification.py are to that end.
3634    
3635            * Thuban/Model/classification.py (Classification.AppendGroup,
3636            Classification.InsertGroup, Classification.ReplaceGroup,
3637            Classification.RemoveGroup, Classification.GetGroup): Do as the
3638            names imply.
3639            (Classification.FindGroup): This was called GetGroup, but GetGroup
3640            takes an index, while FindGroup takes a value.
3641            (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
3642            REFERENCE. Currently there is a cyclic reference between the layer
3643            and its classification. If the classification doesn't need to know
3644            its owning layer we can change this, since it may make sense to be
3645            able to use the same classification with different layers.
3646    
3647            * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
3648    
3649            * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
3650            not AddGroup()
3651    
3652            * Thuban/UI/classifier.py: Now that we can depend on the order in
3653            a Classification and have methods to manipulate that order we don't
3654            need to use our own data structures in the grid. We can simply make
3655            the grid/table access the information they need from a copy of
3656            the classification object.
3657            (Classifier._OnCloseBtn): Event handler for when the user clicks
3658            'Close'. This is needed so if the user applies changes and then
3659            continues to change the table the user has the option of discarding
3660            the most recent changes and keeping what they applied.
3661    
3662            * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
3663            into the same group.
3664    
3665            * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
3666            with a really old version of proj, PJ_VERSION won't even be defined.
3667            If it isn't defined then just compile so that the function always
3668            returns Py_False.
3669    
3670            * test/test_classification.py: Fix tests to use the renamed methods.
3671            Still need to write tests for the new methods.
3672    
3673    2003-04-04  Jonathan Coles   <[email protected]>
3674    
3675            * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
3676            call to SetSelection out of the method and before the call
3677            to __SelectField in __init__. This prevents a recursion of events
3678            when _OnFieldSelect is triggered by the user.
3679    
3680    2003-04-04  Jonathan Coles   <[email protected]>
3681    
3682            * Thuban/Model/classification.py: Rename Color.None to
3683            Color.Transparent.
3684            (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
3685            Don't bother copying the color, since Colors are immutable.
3686    
3687            * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
3688            Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
3689            Thuban/UI/renderer.py, Thuban/UI/view.py:
3690            Rename Color.None to Color.Transparent.
3691        
3692            * test/test_classification.py, test/test_load.py: Rename Color.None
3693            to Color.Transparent.
3694    
3695    2003-04-04  Jonathan Coles   <[email protected]>
3696    
3697            * Thuban/Model/classification.py: Fix assert calls.
3698            (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
3699            Copy the color parameter rather than hold onto a reference.
3700    
3701            * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
3702            the color object.
3703            (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
3704            are sure there exists only one refernce to Color.None in the system.
3705            This allows us to use 'is' rather than the comparision functions.
3706            
3707            * Thuban/Model/save.py: Fix assert calls.
3708            
3709            * Thuban/UI/classifier.py: Fix assert calls.
3710            (ClassGrid._OnCellDClick): Call up to the classifier to open the
3711            dialog to edit the groups properties.
3712            (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
3713            correctly if a cell is resized.
3714            (ClassTable.SetClassification): New. Changes the classification
3715            that is in the table.
3716            (ClassTable.__SetRow): Allow groups to be prepended.
3717            (Classifier): New code for opening the EditProperties and
3718            GenerateRanges dialogs.
3719            (SelectPropertiesDialog.__GetColor): Only set the color in the
3720            color dialog if the current color is not None.
3721            
3722            * Thuban/UI/dock.py: Fix assert calls.
3723            
3724            * Thuban/UI/legend.py: Fix assert calls.
3725            
3726            * Thuban/UI/renderer.py: Fix assert calls.
3727            
3728            * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
3729            classifications.
3730            (GenRangePanel): Panel specific to range generation.
3731            (GenSingletonPanel): Panel specific to singleton generation.
3732            (ClassGenerator): Class responsible for actually generating
3733            the classification from the data gathered in the dialog box.
3734            (PropertyRamp): Generates properties whose values range from
3735            a starting property to an ending property.
3736    
3737    2003-04-03  Bernhard Herzog  <[email protected]>
3738    
3739            * test/support.py (print_garbage_information): New function that
3740            prints information about still connected messages and memory
3741            leaks.
3742            (run_suite): Removed.
3743            (run_tests): New function for use as a replacement of
3744            unittest.main in the test_* files. This one calls
3745            print_garbage_information at the end.
3746    
3747            * test/runtests.py (main): Use support.print_garbage_information
3748    
3749            * test/test_layer.py: Use support.run_tests instead of
3750            unittest.main so we get memory leak information
3751            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
3752            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
3753            (TestLayerLegend.test_visibility): Call the layer's Destroy method
3754            to fix a memory leak.
3755    
3756            * test/test_classification.py: Use support.run_tests instead of
3757            unittest.main so we get memory leak information
3758            (TestClassification.test_classification): Call the layer's Destroy
3759            method to fix a memory leak.
3760    
3761    2003-04-02  Bernhard Herzog  <[email protected]>
3762    
3763            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
3764            Handle the reference counts of the return value and errors in
3765            PyArg_ParseTuple correctly.
3766    
3767            * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
3768            sure the filename is absolute to avoid problems when saving the
3769            session again
3770    
3771            * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
3772    
3773    2003-04-01  Jonathan Coles   <[email protected]>
3774    
3775            *  Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
3776            that there actually are points in the returned list of points
3777            before trying to index into the list. The list may be empty if
3778            the shape is a Null Shape.
3779    
3780    2003-04-01  Bernhard Herzog  <[email protected]>
3781    
3782            * test/test_map.py: Don't use from <module> import *
3783    
3784    2003-04-01  Jonathan Coles   <[email protected]>
3785    
3786            * Thuban/Model/session.py: Use LAYER_CHANGED instead of
3787            LAYER_LEGEND_CHANGED
3788    
3789            * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
3790            self.Destroy() to close the window after yesterday's changes.
3791    
3792            * test/test_map.py, test/test_session.py: Fix messages that
3793            are sent from maps and layers.
3794    
3795    2003-03-31  Jonathan Coles   <[email protected]>
3796    
3797            * Thuban/UI/classifier.py: Commented out some debugging statements.
3798            (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
3799            RTbug #1769.
3800    
3801            * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
3802            position (although position doesn't work yet under GTK).
3803            (DockableWindow.Destroy): New. Called when the window must be
3804            closed. Namely needed when the DockFrame closes and must close
3805            its children.
3806            (DockFrame): Listen for EVT_CLOSE and destroy all children.
3807    
3808            * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
3809            when then window is told to close.
3810            (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
3811            comment in source for more info.
3812    
3813            * Thuban/UI/main.py: Show the legend by default when Thuban starts.
3814    
3815            * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
3816            symmetry with other such methods.
3817            (MainWindow.ShowLegend): Show the legend docked by default.
3818    
3819    2003-03-28  Jonathan Coles   <[email protected]>
3820    
3821            * Thuban/UI/classifier.py: Support for highlighting a specific
3822            group within the grid when the classification dialog is opened.
3823            Also contains a lot of debugging printouts which will later
3824            be removed.
3825    
3826            * Thuban/UI/dock.py: Complete rework on the dock code so that
3827            that it is fairly removed from the rest of the Thuban application.
3828            It is easy to add new docks which the rest of the program having
3829            to be aware of them.
3830    
3831            * Thuban/UI/legend.py: Modifications to support selecting a
3832            specific group in the classification dialog. Changed how layers
3833            are drawn when the layer is visible/invisible.
3834    
3835            * Thuban/UI/mainwindow.py: Removed legend specific code and
3836            replaced it with calls to the new dock code.
3837    
3838            * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
3839            to check if scale > 0. Trying to track down a divide by zero.
3840    
3841    2003-03-26  Jonathan Coles   <[email protected]>
3842    
3843            * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
3844            (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
3845            now part of DockableWindow.
3846            (LegendPanel.DoOnSelChanged): Select the current layer in the
3847            map.
3848            (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
3849            with the selected layer and/or group.
3850    
3851    2003-03-26  Jonathan Coles   <[email protected]>
3852    
3853            This putback contains the code for dockable windows. There is
3854            no support in wxWindows as of this date for windows that can
3855            attach themselves to other windows.
3856    
3857            The current model contains a DockableWindow which has a parent
3858            window for when it is detached and a dock window that it puts
3859            its contents in when it is docked. The contents of a DockableWindow
3860            must be a DockPanel. DockPanel itself derives from wxPanel.
3861    
3862            * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
3863            message, not a LAYER_LEGEND_CHANGED message.
3864    
3865            * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
3866    
3867            * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
3868            as one of the style properties for the fieldTypeText item to
3869            be sure that its size is correct when the text changes.
3870    
3871            * Thuban/UI/dock.py: New. Classes for the DockPanel and
3872            DockableWindow.
3873    
3874            * Thuban/UI/legend.py: Added some more buttons and made the
3875            LegendPanel a DockPanel.
3876    
3877            * Thuban/UI/mainwindow.py: Added sash windows to the main window
3878            and supporting functions for manipulating the sashes.
3879            (MainWindow.ShowLegend): Create a DockableWindow with the
3880            LegendPanel as the contents.
3881    
3882            * Thuban/UI/messages.py: Added DOCKABLE_* messages
3883    
3884            * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
3885            not LAYER_LEGEND_CHANGED, messages.
3886    
3887    2003-03-25  Jonathan Coles   <[email protected]>
3888    
3889            * setup.py: Added custom script bdist_rpm_build_script so that
3890            when the rpm is built the path to wx-config is correct.
3891    
3892            * setup.cfg: Added line saying to use the custom build script
3893    
3894    2003-03-20  Jonathan Coles   <[email protected]>
3895    
3896            Initial implementation of the Legend.
3897    
3898            * Thuban/UI/legend.py: New. Creates a window that shows the map's
3899            Legend information and allows the user to add/modify classifications
3900            and how the layers are drawn on the map.
3901    
3902            * setup.py: New command 'build_docs' which currently uses
3903            happydoc to generate html documentation for Thuban.
3904    
3905            * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
3906            Returns a string which is appropriately describes the group.
3907    
3908            * Thuban/Model/layer.py (Layer.SetClassification): Generate a
3909            LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
3910    
3911            * Thuban/Model/map.py (Map): Rename messages and use new, more
3912            specific, messages.
3913    
3914            * Thuban/Model/messages.py: New message to indicate that a layer's
3915            data has changed (LAYER_CHANGED). New map messages to indicate
3916            when layers have been added/removed/changed or if the stacking order
3917            of the layers has changed.
3918    
3919            * Thuban/Model/session.py: Rename and use new messages.
3920    
3921            * Thuban/UI/classifier.py: Remember if any changes have actually
3922            been applied so that if the dialog is cancelled without an application
3923            of changes we don't have to set a new classification.
3924            (ClassDataPreviewer): Pulled out the window specific code and put it
3925            ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
3926            symbols on any DC.
3927            
3928            * Thuban/UI/mainwindow.py: New code to open the legend.
3929    
3930            * Thuban/UI/view.py: Use new message names.
3931    
3932    2003-03-19  Jonathan Coles   <[email protected]>
3933    
3934            * Thuban/UI/main.py (verify_versions): New. Checks the versions
3935            of Python, wxPython, and some other libraries.
3936    
3937            * extensions/thuban/wxproj.cpp (check_version): Checks the given
3938            version against what wxproj was compiled with.
3939            (check_version_gtk): If wxproj was compiled with gtk then check
3940            the given version against the version of the gtk library
3941            currently being used.
3942    
3943    2003-03-14  Bernhard Herzog  <[email protected]>
3944    
3945            * test/test_command.py: Run the tests when the module is run as a
3946            script
3947    
3948    2003-03-14  Bernhard Herzog  <[email protected]>
3949    
3950            Implement selection of multiple selected shapes in the same layer:
3951    
3952            - Introduce a new class to hold the selection. This basically
3953              replaces the interactor which was nothing more than the
3954              selection anyway. A major difference is of course that the new
3955              selection class supports multiple selected shapes in one layer
3956            
3957            - Move the object that represents the selection from the
3958              application to the canvas. The canvas is a better place than the
3959              application because the selection represents which shapes and
3960              layer of the map displayed by the canvas are selected and
3961              affects how the map is drawn.
3962    
3963            - Make the selection and its messages publicly available through
3964              the mainwindow.
3965    
3966            - The non-modal dialogs do not get a reference to the interactor
3967              anymore as they can simply refer to their parent, the
3968              mainwindow, for the what the interactor had to offer.
3969    
3970            * Thuban/UI/selection.py: New module with a class to represent the
3971            selection.
3972    
3973            * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
3974            these unused messages
3975    
3976            * Thuban/UI/application.py (ThubanApplication.OnInit)
3977            (ThubanApplication.OnExit, ThubanApplication.SetSession): The
3978            interactor is gone now.
3979            (ThubanApplication.CreateMainWindow): There is no interactor
3980            anymore so we pass None as the interactor argument for now for
3981            compatibility.
3982    
3983            * Thuban/UI/view.py (MapCanvas.delegated_messages)
3984            (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
3985            Unsubscribe, delegate messages according to the delegated_messages
3986            class variable.
3987            (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
3988            attributes from instance variables as described with the
3989            delegated_methods class variable.
3990            (MapCanvas.__init__): New instance variable selection holding the
3991            current selection
3992            (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
3993            pass them on to the renderer
3994            (MapCanvas.SetMap): Clear the selection when a different map is
3995            selected.
3996            (MapCanvas.shape_selected): Simple force a complete redraw. The
3997            selection class now takes care of only issueing SHAPES_SELECTED
3998            messages when the set of selected shapes actually does change.
3999            (MapCanvas.SelectShapeAt): The selection is now managed in
4000            self.selection
4001    
4002            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
4003            (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
4004            Unsubscribe, delegate messages according to the delegated_messages
4005            class variable.
4006            (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
4007            attributes from instance variables as described with the
4008            delegated_methods class variable.
4009            (MainWindow.__init__): The interactor as ivar is gone. The
4010            parameter is still there for compatibility. The selection messages
4011            now come from the canvas.
4012            (MainWindow.current_layer, MainWindow.has_selected_layer):
4013            Delegate to the the canvas.
4014            (MainWindow.LayerShowTable, MainWindow.Classify)
4015            (MainWindow.identify_view_on_demand): The dialogs don't need the
4016            interactor parameter anymore.
4017    
4018            * Thuban/UI/tableview.py (TableFrame.__init__)
4019            (LayerTableFrame.__init__, LayerTableFrame.OnClose)
4020            (LayerTableFrame.row_selected): The interactor is gone. It's job
4021            from the dialog's point of view is now done by the mainwindow,
4022            i.e. the parent. Subscribe to SHAPES_SELECTED instead
4023            of SELECTED_SHAPE
4024            
4025            * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
4026            is gone. It's job from the dialog's point of view is now done by
4027            the mainwindow, i.e. the parent.
4028            
4029            * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
4030            gone. It's job from the dialog's point of view is now done by the
4031            mainwindow, i.e. the parent.
4032    
4033            * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
4034            gone. It's job from the dialog's point of view is now done by the
4035            mainwindow, i.e. the parent.
4036            (SessionTreeCtrl.__init__): New parameter mainwindow which is
4037            stored as self.mainwindow. The mainwindow is need so that the tree
4038            can still subscribe to the selection messages.
4039            (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
4040            (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
4041            selection is now accessible through the mainwindow. Subscribe to
4042            SHAPES_SELECTED instead of SELECTED_SHAPE
4043    
4044            * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
4045            SHAPES_SELECTED message now.
4046            (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
4047            so deal with multiple shapes
4048            (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
4049            gone. It's job from the dialog's point of view is now done by the
4050            mainwindow, i.e. the parent.
4051    
4052            * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
4053            parameter is now a list of shape ids.
4054            (RecordTable.SetTable): The second parameter is now a list of
4055            indices.
4056    
4057            * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
4058            selected_shape parameter and ivar to selected_shapes. It's now a
4059            list of shape ids.
4060            (MapRenderer.draw_label_layer): Deal with multiple selected
4061            shapes. Rearrange the code a bit so that the setup and shape type
4062            distinctions are only executed once.
4063    
4064            * test/test_selection.py: Test cases for the selection class
4065    
4066    2003-03-11  Jonathan Coles   <[email protected]>
4067    
4068            * Thuban/Model/load.py: Temporary fix so that the xml reader
4069            doesn't cause Thuban to crash.
4070    
4071            * Thuban/Model/layer.py: Handle the cyclic references between
4072            a layer and its classification better, and be sure to disconnect
4073            the classification from the layer when the layer is destroyed
4074            so that we don't maintain a cyclic reference that may not be
4075            garbage collected.
4076    
4077            * Thuban/Model/classification.py: See comment for layer.py.
4078    
4079    2003-03-12  Jan-Oliver Wagner <[email protected]>
4080    
4081            * HOWTO-Release: New. Information on the steps for releasing
4082            a new version of Thuban.
4083    
4084    2003-03-11  Jonathan Coles   <[email protected]>
4085    
4086            * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
4087            Use True instead of true.
4088            (Classifier): Should have a single panel in which all the controls lie.
4089    
4090            * Thuban/UI/proj4dialog.py: Add normal border.
4091    
4092            * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
4093    
4094            * Thuban/UI/mainwindow.py: Use True instead of true.
4095    
4096            * setup.py: Update some definitions to use wxWindows2.4 files
4097    
4098            * Data/iceland_sample_class.thuban: Fixed file so that the
4099            field_type information is present.
4100    
4101    2003-03-10  Jonathan Coles   <[email protected]>
4102    
4103            * Thuban/UI/classifier.py (Classifier.__init__): Make the
4104            field type label grow so that when the text changes the
4105            size is updated correctly. This may be a wxWindows bug.
4106    
4107    2003-03-10  Jonathan Coles   <[email protected]>
4108    
4109            * Thuban/UI/application.py: Changed SESSION_CHANGED to
4110            SESSION_REPLACED.
4111    
4112            * Thuban/UI/classifier.py: Wrap text with _().
4113            (ClassGrid.CreateTable): Set dimensions and size hints here,
4114            instead of in Reset, so we only set the size once.
4115    
4116            * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
4117    
4118            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
4119            Call Close() instead of Shutdown().
4120    
4121            * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
4122    
4123            * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
4124            Go back to using OnClose() instead of Shutdown().
4125    
4126    2003-03-10  Jonathan Coles   <[email protected]>
4127    
4128            * Thuban/UI/classifier.py (Classifier): SelectField() needed
4129            to know the old field index as well as the new one.
4130    
4131    2003-03-10  Jonathan Coles   <[email protected]>
4132    
4133            * Thuban/UI/classifier.py (Classifier): Use __SelectField()
4134            to correctly set the table information and call this from
4135            __init__ and from _OnFieldSelect so that all the information
4136            is up to date when the dialog opens and when a field is changed.
4137    
4138    2003-03-10  Jonathan Coles   <[email protected]>
4139    
4140            * Thuban/Model/classification.py (Classification): Don't use
4141            layer's message function directly, use the ClassChanged() method
4142            when then classification changes. SetField/SetFieldType/SetLayer
4143            must keep the information about field name and field type in
4144            sync when an owning layer is set or removed.
4145    
4146            * Thuban/Model/layer.py: Added ClassChanged() so that the
4147            classification can tell the layer when its data has changed.
4148            (Layer.SetClassification): Accepts None as an arguement to
4149            remove the current classification and correctly handles
4150            adding a new classification.
4151    
4152            * Thuban/Model/load.py: Comment out print statement
4153    
4154            * test/test_classification.py, test/test_save.py: New and
4155            improved tests.
4156    
4157    2003-03-07  Jonathan Coles   <[email protected]>
4158    
4159            * Thuban/Model/classification.py: Implemented __copy__ and
4160            __deepcopy__ for ClassGroup* and ClassGroupProperites so
4161            they can easily be copied by the classifier dialog.
4162            (ClassGroupProperites.__init__): The default line color should
4163            have been Color.Black.
4164    
4165            * Thuban/UI/classifier.py: Setting and Getting table values now
4166            uses a consistent set of functions.
4167            (Classifier): Now non-modal. Has field type label which changes
4168            as the field changes. Keep track of buttons in a list so that
4169            we can enable/disable the buttons when the None field is selected.
4170            (SelectPropertiesDialog): Add buttons to make the colors transparent.
4171    
4172            * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
4173            does what OnClose did, but can be called by the application to
4174            close a window. Needed when a session changes, and we have to
4175            close the classifier windows.
4176    
4177            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
4178            Shuts down open dialogs. Used when a new session is created
4179            or a session is opened.
4180            (MainWindow.SaveSession): Should only call application.SaveSession()
4181            if we don't call SaveSessionAs first.
4182            (MainWindow.Classify): Allow different classifier dialogs for
4183            different layers.
4184    
4185            * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
4186            the parent class handle it. Add Shutdown() to unsubscibe from
4187            event notification and call the parent Shutdown(). This was
4188            necessary so the application can close the tree window.
4189    
4190    2003-03-06  Jonathan Coles   <[email protected]>
4191    
4192            * Thuban/Model/classification.py: Minor documentation changes,
4193            Addition of __eq__ and __ne__ methods.
4194            (Classification.SetLayer): prevent recursion between this method
4195            and Layer.SetClassification().
4196    
4197            * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
4198    
4199            * Thuban/Model/layer.py (SetClassification): prevent recursion
4200            between this method and Classification.SetLayer().
4201    
4202            * test/test_classification.py, test/test_load.py,
4203            test/test_session.py: Fixed and added tests for the classification
4204            classes.
4205    
4206    2003-03-06  Bernhard Herzog  <[email protected]>
4207    
4208            * Thuban/UI/classifier.py (ClassGrid.__init__)
4209            (ClassGrid.CreateTable): Move the SetSelectionMode call to
4210            CreateTable because otherwise it triggers an assertion in
4211            wxPython/wxGTK 2.4.
4212    
4213    2003-03-05  Jonathan Coles   <[email protected]>
4214    
4215            * Thuban/common.py: Move FIELDTYPE constants back to table.py.
4216    
4217            * Thuban/Model/load.py: import FIELDTYPE constants from table.
4218    
4219            * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
4220    
4221            * Thuban/Model/table.py: Put FIELDTYPE constants back.
4222    
4223    2003-03-05  Jonathan Coles   <[email protected]>
4224    
4225            * Thuban/UI/classifier.py: Added class documentation.
4226            Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
4227            Store just the groups in the table and generate the other
4228            column information when it is requested. Add "None" field
4229            to pull-down to select no classification.
4230    
4231            * Thuban/common.py: Moved FIELDTYPE constants from table.py
4232            (Str2Num): Only catch ValueError exceptions.
4233    
4234            * Thuban/Model/classification.py: Class documentation. Renaming
4235            of methods with Stroke to Line. Groups are stored in a single
4236            list with the default as the first element. Groups are searched
4237            in the order they appear in the list.
4238    
4239            * Thuban/Model/color.py: Documentation.
4240    
4241            * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
4242            the kind of data represented by a field.
4243    
4244            * Thuban/Model/load.py (ProcessSession): Use proper string
4245            conversion function; fixes RTbug #1713.
4246    
4247            * Thuban/Model/save.py (Saver): Store field type information.
4248    
4249            * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
4250            (Table): Add field_info_by_name() to retrieve field information
4251            by specifying the field name, not the number.
4252    
4253            * Thuban/UI/mainwindow.py: Function name changes.
4254    
4255            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
4256            get the layer classification once. Don't try to classify
4257            values when the field is None: just use the default properties.
4258    
4259            * Thuban/UI/view.py: Function name changes.
4260    
4261            * Doc/thuban.dtd: Add field_type attribute to a classification.
4262    
4263    2003-03-04  Bernhard Herzog  <[email protected]>
4264    
4265            * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
4266            the fill and stroke layer attributes optional with suitable
4267            default values. Add the stroke_width layer attribute. Use correct
4268            syntax for empty elements. Make the attribute list for labels
4269            refer to the label element.
4270    
4271    2003-03-04  Bernhard Herzog  <[email protected]>
4272    
4273            * setup.py (thuban_build_py.build): Add a comment about distutils in
4274            Python 2.3 containing some of the functionality we implement in
4275            setup.py ourselves.
4276    
4277            * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
4278            before the selection mode. Doing it the other way round triggers
4279            an assertion in wxWindows.
4280    
4281            * Thuban/Model/save.py (escape): Fix typo in doc-string
4282    
4283            * Thuban/Model/classification.py: Remove unnecessary wxPython
4284            import
4285    
4286    2003-03-04  Jonathan Coles   <[email protected]>
4287    
4288            * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
4289            Parameter 'value' should default to None.
4290    
4291            * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
4292            the class attribute __classification is now private.
4293    
4294            * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
4295            Classifier to ClassGrid. Added support for removing selected rows,
4296            which including code for keeping track of when cells are selected,
4297            and deselected.
4298            (ClassTable): Support for added/removing rows. Fixed a problem
4299            with __ParseInput whereby it would not allow strings (only numbers)
4300            to be entered.
4301            (Classifier): Added button and supporting code for removing
4302            selected rows.
4303    
4304    2003-02-27  Jonathan Coles   <[email protected]>
4305    
4306            * Thuban/common.py: Moved color conversion functions into
4307            Thuban/UI/common.py.
4308            (Str2Num): Now converts the float (not the string) to a long/int
4309            so that an exception isn't thrown.
4310    
4311            * Thuban/UI/common.py: Common functions used in several UI modules
4312    
4313            * Thuban/Model/classification.py: Changed the class hierarchy
4314            so that a Classification consists of Groups which return
4315            Properties when a value matches a Group.
4316    
4317            * Thuban/Model/layer.py: Fixed name resolution problem.
4318    
4319            * Thuban/Model/load.py: Use new Classification and Group functions.
4320    
4321            * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
4322            failure.
4323            (Saver.write_classification): Use new Classification and Group
4324            functions.
4325    
4326            * Thuban/UI/classifier.py: Changes to use new Classification and Group
4327            functions. Fix to create a tuple with a single value instead of
4328            simply returning the value.
4329    
4330            * Thuban/UI/renderer.py: Use new Classification and Group functions.
4331            Use common.py functions.
4332    
4333            * Thuban/UI/tree.py: Use common.py functions.
4334            
4335            * test/test_classification.py: Use new Classification and Group
4336            classes.
4337    
4338    2003-02-24  Jonathan Coles   <[email protected]>
4339    
4340            * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
4341            functions from Thuban color objects to wxWindow colour objects.
4342    
4343            * Thuban/Model/classification.py (Classification): Renamed
4344            GetProperties() to GetClassData(). Used the new iterator
4345            in TreeInfo().
4346            (ClassIterator): Iterator implementation to iterate over the
4347            ClassData objects in a classification object.
4348    
4349            * Thuban/Model/save.py (Saver.write_classificaton): Uses
4350            the new iterator to save the classification information.
4351    
4352            * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
4353            for changing the stroke and fill colors and previewing the
4354            changes.
4355    
4356            * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
4357            MainWindow.SaveSessionAs): Text string changes so the dialogs
4358            have more meaningful titles.
4359    
4360            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
4361            Classification method name from GetProperties to GetClassData.
4362    
4363            * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
4364            instead of accessing now non-existent class variables.
4365    
4366    2003-02-24  Bernhard Herzog  <[email protected]>
4367    
4368            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
4369            unneeded Shape() call. Rendering is substantially faster without
4370            it and it avoids some problems with broken shape files.
4371    
4372    2003-02-20  Frank Koormann   <[email protected]>
4373    
4374            Force minimal size of identify and label dialogs. The autosizing
4375            looked too ugly.
4376    
4377            * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
4378            * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
4379            Set size of listctrl.
4380            * Thuban/UI/identifyview.py (IdentifyView.__init__):
4381            Set size of dialog.
4382    
4383    2003-02-19  Jonathan Coles   <[email protected]>
4384    
4385            * test/test_classification.py, test/test_layer.py,
4386            test/test_load.py, test/test_map.py, test/test_session.py:
4387            Updated the tests to use the new functions that are in the
4388            respective classes.
4389    
4390            * Thuban/Model/classification.py (Classification):
4391            Uses the new ClassData* classes. Modification messages are
4392            passed up to the parent layer (if it exists).
4393            (ClassData): New class to encapsulate the common data in each
4394            classification property.
4395            (ClassDataDefault): Represents the Default class. data.
4396            (ClassDataPoint): Represents a single class. data point
4397            (ClassDataRange): Represents a class. range
4398            (ClassDataMap): Represents a class. map (unused).
4399    
4400            * Thuban/Model/color.py: Added Color.None to represent something
4401            with no color. Color.Black represents the color black.
4402            (NoColor): Helper class derived from Color to represent something
4403            with no color.
4404    
4405            * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
4406            stroke_width attributes. Made the 'classification' attribute private.
4407            New methods for setting/getting the classification.
4408    
4409            * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
4410            to get the classifcation and use the new ClassData* classes to
4411            hold the classification data. Use Str2Num to convert numbers
4412            properly.
4413    
4414            * Thuban/Model/save.py (Saver): Use new Color and Classification
4415            methods
4416    
4417            * Thuban/UI/classifier.py (ClassGrid): New class to represent a
4418            custom grid.
4419            (ClassTable): Support for editing Values and Labels and for
4420            changing what type (point or range) of data is stored in each
4421            property based on how the user enters the data.
4422            (Classifier): Support for saving the new classifications and
4423            launching the dialog to edit a property.
4424            (SelectPropertiesDialog): New class for editing the visual
4425            properties of a classification (stroke color, width, and fill color)
4426            (ClassPreviewer): Took the Draw method from ClassRenderer and
4427            made most of it into this new class. Intend to use this class in
4428            the SelectPropertiesDialog for previewing changes.
4429    
4430            * Thuban/UI/renderer.py: Use new Color and Classification methods.
4431    
4432            * Thuban/UI/tree.py: Formatting changes.
4433    
4434            * Doc/thuban.dtd: Add 'label' element
4435    
4436            * Thuban/common.py: New. Contains common routines used throughout
4437            the code.
4438            (Str2Num): Takes a string and converts it to the "best" type of
4439            number.
4440    
4441    2003-02-14  Bernhard Herzog  <[email protected]>
4442    
4443            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
4444            dragging flag is always set to 0 even when the tool implementation
4445            raises an exception
4446    
4447    2003-02-11  Bernhard Herzog  <[email protected]>
4448    
4449            * Thuban/UI/application.py (ThubanApplication.splash_screen): New
4450            method to create a splash screen.
4451            (ThubanApplication.ShowMainWindow): New. Show the main window.
4452            Needed so the splash screen can display the mainwindow
4453            (ThubanApplication.OnInit): Call the
4454            new splash_screen method to determine whether the application
4455            should display a splash screen. If it displays a splash screen do
4456            not immediately show the main window.
4457    
4458    2003-02-11  Jonathan Coles  <[email protected]>
4459    
4460            * Thuban/Model/classification.py: Added import line to fix
4461            feature conflicts between running on python2.2 and python2.1.
4462    
4463            * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
4464            onto the clinfo parameter, so removed the deepcopy().
4465    
4466    2003-02-10  Jonathan Coles  <[email protected]>
4467    
4468            * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
4469            Added element_open variable to track opening and closing of tags
4470            so that tags that don't span more than one line are closed with
4471            /> instead of </tag_name>. Use the GetDefault*() methods of
4472            the Classification class.
4473    
4474            * Thuban/Model/classification.py (Classificaton): Added set and
4475            get methods for the default data. The class also takes a layer
4476            reference so that modification messages can be sent. Fixed the
4477            methods to use the new ClassData class.
4478            (ClassData): New class to encapsulate the classification data
4479    
4480            * Thuban/Model/layer.py (Layer): Remove the
4481            Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
4482            SetDefault*() methods on the layer's classification object.
4483            (Layer.__init__): Use the new SetDefault*() methods in the
4484            Classification class.
4485    
4486            * Thuban/Model/load.py (ProcessSession): Use the new ClassData
4487            object instead of a dictionary.
4488    
4489            * Thuban/UI/classifier.py (ClassRenderer): New class to
4490            draw the classifications in the dialog box's table.
4491            (Classifier): Modified to use the ClassRenderer class.
4492    
4493            * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
4494            methods of the Classification class.
4495    
4496            * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
4497            of the ClassData class.
4498    
4499            * test/test_classification.py, test/test_layer.py,
4500            test/test_map.py, test/test_session.py: Fix the tests to work
4501            with the above code changes.
4502    
4503    2003-02-03  Jonathan Coles  <[email protected]>
4504    
4505            * Thuban/Model/classification.py (Classification): Added getNull()
4506            to return the NullData reference
4507    
4508            * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
4509            Layer.SetStrokeWidth): Modified these functions to change the
4510            null data in the classification rather than keep these values
4511            directly in the Layer class. Menu options to change these values
4512            work again.
4513    
4514    2003-01-28  Jonathan Coles  <[email protected]>
4515    
4516            * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
4517            Fixed crashing problem on some systems. Dialog box shows
4518            classification data.
4519    
4520            * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
4521            Colors in the tree view.
4522    
4523            * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
4524            the tree info for classifications. Commented out unnecessary lines.
4525    
4526            * Thuban/Model/classification.py (Classification.TreeInfo): New
4527            function to add information about the classification into the
4528            tree view.
4529    
4530    2003-01-27  Jan-Oliver Wagner <[email protected]>
4531    
4532            * Thuban/__init__.py (_): New.
4533    
4534            * Thuban/Model/classification.py, Thuban/Model/extension.py,
4535            Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
4536            Thuban/Model/session.py, Thuban/UI/application.py,
4537            Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
4538            Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
4539            Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
4540            Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
4541            Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
4542    
4543    2003-01-27  Jonathan Coles  <[email protected]>
4544    
4545            * Thuban/Model/layer.py: Classification initialization calls.
4546    
4547            * Thuban/Model/classification.py: Created class to encapsulate
4548            a layer classification. Supports specific data points and
4549            ranges.
4550    
4551            * Thuban/Model/load.py: Added support for loading classification
4552            information.
4553    
4554            * Thuban/Model/save.py: Added support for saving classification
4555            information.
4556    
4557            * Thuban/UI/classifier.py: Initial class for a dialog box for
4558            specifying classification information.
4559    
4560            * Thuban/UI/mainwindows.py: Support for opening the classifier
4561            dialog.
4562    
4563            * Thuban/UI/renderer.py: Support for drawing a layer with the
4564            classification information.
4565    
4566            * Data/iceland_sample_class.thuban: iceland_sample with
4567            classification data.
4568    
4569            * test/test_classification: Tests for the Classification class.
4570    
4571    2002-12-09  Bernhard Herzog  <[email protected]>
4572    
4573            * test/test_command.py: New. Tests for the command classes.
4574    
4575            * Thuban/UI/command.py (ToolCommand): New class for tool commands.
4576            (Command.IsTool): New method to distinguish between command
4577            switching tools and other commands.
4578    
4579            * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
4580            the tool to avoid direct assignments to instance variables
4581            (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
4582            (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
4583            change the tool
4584    
4585            * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
4586            active tool's command turns insensitive, disable the tool.
4587            (_tool_command): Use the new ToolCommand class
4588    
4589            * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
4590            SelectTool method to change the tool
4591            (iconfile): Use the ToolCommand class
4592    
4593    2002-12-03  Bernhard Herzog  <[email protected]>
4594    
4595            * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
4596            the case of selected items that are not children of Layers or Maps
4597            properly. Previously this bug would trigger an assertion in
4598            wxWindows.
4599    
4600    2002-11-06  Frank Koormann  <[email protected]>
4601    
4602            * Thuban/UI/mainwindow.py: Altered the order of tools in the
4603            toolbar: First now are all navigation tools (Zoom In/Out, Pan,
4604            Full Extent).
4605    
4606    2002-10-23  Bernhard Herzog  <[email protected]>
4607    
4608            * setup.py (setup call): version now 0.1.3
4609    
4610            * MANIFEST.in: Add the files in test/
4611    
4612            * test/README: Add note about tests requiring the iceland data
4613    
4614            * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
4615            copyright notice.
4616    
4617    2002-10-18  Bernhard Herzog  <[email protected]>
4618    
4619            * test/test_map.py
4620            (TestMapWithContents.test_projected_bounding_box): Use an explicit
4621            epsilon.
4622    
4623            * test/support.py (FloatComparisonMixin.assertFloatEqual)
4624            (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
4625            message if the assertion fails and don't return the return value
4626            of self.assert_. In assertFloatSeqEqual the return meant that not
4627            all items of the sequence were compared.
4628    
4629    2002-09-20  Bernhard Herzog  <[email protected]>
4630    
4631            * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
4632    
4633            * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
4634    
4635            * test/test_map.py (TestMapWithContents.test_tree_info): Create
4636            the string with the bounding box on the fly because of platform
4637            differences in the way %g is handled.
4638    
4639            * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
4640            DBFfile too because Thuban layers can't yet cope missing DBF
4641            files.
4642    
4643    2002-09-20  Bernhard Herzog  <[email protected]>
4644    
4645            * test/test_menu.py: Use initthuban instead of
4646            add_thuban_dir_to_path to initialize Thuban.
4647    
4648            * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
4649            Mixin class for float comparisons
4650            (SubscriberMixin): New. Mixin class to test messages sent through
4651            the Connector class
4652    
4653            * test/README: Fix a typo and add the -v flag to the command for
4654            individual tests
4655    
4656            * test/test_session.py: New. Test cases for Thuban.Model.session
4657    
4658            * test/test_proj.py: New. Test cases for Thuban.Model.proj
4659    
4660            * test/test_map.py: New. Test cases for Thuban.Model.map
4661    
4662            * test/test_layer.py: New. Test cases for Thuban.Model.layer
4663    
4664            * test/test_label.py: New. Test cases for Thuban.Model.label
4665    
4666            * test/test_connector.py: New. Test cases for Thuban.Lib.connector
4667    
4668            * test/test_color.py: New. Test cases for Thuban.Model.color
4669    
4670            * test/test_base.py: New. Test cases for Thuban.Model.base
4671    
4672    2002-09-13  Bernhard Herzog  <[email protected]>
4673    
4674            * Thuban/Model/session.py (Session.forwarded_channels): Forward
4675            the CHANGED channel too.
4676    
4677            * Thuban/Model/map.py (Map.forwarded_channels): Forward the
4678            CHANGED channel too.
4679            (Map.__init__): Call the Modifiable constructor as well.
4680    
4681            * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
4682            event if the modified flag changes.
4683            (Modifiable.changed): Tweak the doc-string.
4684    
4685            * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
4686            (MainWindow.set_position_text): Put the code that puts the text
4687            with the mouse position into the status bar into the new method
4688            set_position_text so that it can overwritten in derived classes.
4689    
4690    2002-09-12  Bernhard Herzog  <[email protected]>
4691    
4692            * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
4693            message box on the main window.
4694    
4695    2002-09-11  Bernhard Herzog  <[email protected]>
4696    
4697            * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
4698            the 'E' because it's less likely to interfere with other menu
4699            entries.
4700            (MainWindow.build_menu): remove an incorrect comment.
4701    
4702    2002-09-10  Bernhard Herzog  <[email protected]>
4703    
4704            * Thuban/UI/mainwindow.py (MainWindow.Map): New.
4705            (_tool_command): Add sensitive parameter
4706            (_has_visible_map): Sensitivity callback to tools and other
4707            commands that require a visible map. Use it in map_zoom_in_tool,
4708            map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
4709            and map_full_extent
4710    
4711    2002-09-06  Bernhard Herzog  <[email protected]>
4712    
4713            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
4714            VIEW_POSITION
4715    
4716    2002-09-04  Frank Koormann  <[email protected]>
4717    
4718            * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
4719    
4720    2002-09-02  Bernhard Herzog  <[email protected]>
4721    
4722            * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
4723            wxWindows already and our implementation doesn't work correctly
4724            with wxGTK 2.3:
4725            (MapCanvas.__init__): Remove the instance variable
4726            (MapCanvas.OnPaint): Always call do_redraw when there's a map to
4727            be drawin
4728            (MapCanvas.OnIdle): Removed.
4729    
4730            * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
4731            a parameter to determine the size of the rectangle.
4732            (MapCanvas.find_shape_at): Create the box around the point on a
4733            layer by layer basis and make the size depend on the shape type.
4734            This solves a problem with the selection of point shapes at the
4735            border of the layer's bounding box
4736    
4737    2002-08-30  Bernhard Herzog  <[email protected]>
4738    
4739            * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
4740            for the sensitivity  of remove layer.
4741            (_can_remove_layer): New. Sensitivity callback for remove layer
4742            (Command layer_remove): Use _can_remove_layer
4743    
4744            * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
4745            determine whether a given layer can be deleted.
4746    
4747            * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
4748            (MapCanvas.do_redraw): Get rid of the unused update_region
4749            instance variable
4750    
4751            * Thuban/UI/view.py: Add/update some doc-strings.
4752    
4753            * test/: new subdirectory with a bunch of unit tests.
4754    
4755            * test/README, test/test_table.py, test/test_save.py,
4756            test/test_menu.py, test/test_load.py: Initial set of tests and
4757            brief instructions on how to run them
4758    
4759    2002-08-29  Bernhard Herzog  <[email protected]>
4760    
4761            * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
4762            arcs with multiple parts.
4763    
4764            * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
4765            Handle degenrate rectangles.
4766    
4767            * Thuban/Model/table.py: Make writing records work correctly:
4768            (Table.__init__): Keep track of whether the DBF is open for
4769            writing
4770            (Table.write_record): Open the DBF file for writing when necessary
4771    
4772    2002-08-27  Bernhard Herzog  <[email protected]>
4773    
4774            * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
4775            dbf files only for reading by default. Use a new writable dbf
4776            object for writing.
4777    
4778    2002-08-26  Bernhard Herzog  <[email protected]>
4779    
4780            * Thuban/UI/mainwindow.py: Refactor the context creation:
4781            (MainWindow.Context): New method to return a context
4782            (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
4783            new method
4784    
4785            * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
4786            layer table specific code from TableGrid into LayerTableGrid
4787            (TableFrame, LayerTableFrame): Split the layer table specific code
4788            from TableFrame into LayerTableFrame
4789            (LayerTableGrid.select_shape): Remove a debug print
4790    
4791            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
4792            LayerTableFrame
4793    
4794    2002-08-23  Bernhard Herzog  <[email protected]>
4795    
4796            * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
4797            absolute filename.
4798    
4799    2002-08-22  Bernhard Herzog  <[email protected]>
4800    
4801            * Thuban/Model/table.py (Table.write_record): New method to write
4802            records.
4803            (Table.__init__): Open the DBF file for writing too.
4804    
4805            * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
4806            into the underlying table.
4807    
4808            * extensions/shapelib/shapefil.h (DBFCommit),
4809            extensions/shapelib/dbfopen.c (DBFCommit): New API function to
4810            commit any changes made to the DBF file.
4811    
4812            * Thuban/UI/mainwindow.py (make_check_current_tool)
4813            (_tool_command): Put the code that generates the "checked"
4814            callback into a separate function so that we can reuse it
4815            elsewhere
4816    
4817            * Thuban/Model/save.py (Saver): New class to handle serializing a
4818            session into an XML file. The main reason to introduce a class is
4819            that applications built on Thuban can derive from it so that they
4820            can save additional information in a session file.
4821            (save_session): Delegate almost all the work to the Saver class.
4822            Rename the filename argument to file because it may be a file like
4823            object now.
4824    
4825            * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
4826            code. Remove the little test code which would be executed when the
4827            module is run as a script which didn't work anymore since it can't
4828            import the other Thuban modules.
4829            (ProcessSession, load_session): Refactor the ProcessSession to
4830            have one method for each element start and end tag so that derived
4831            classes can easily override the processing of individual tags.
4832            Also, always parse with namespaces enabled because applications
4833            built on top of Thuban will likely use namespaces if they extend
4834            the session file format.
4835    
4836    2002-08-21  Bernhard Herzog  <[email protected]>
4837    
4838            * setup.py (ThubanInstall.run): Don't repr install_lib_orig
4839            because thubaninit_contents will do it for us.
4840    
4841    2002-08-16  Jan-Oliver Wagner <[email protected]>
4842    
4843            * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
4844            tree window already open
4845    
4846    2002-08-15  Bernhard Herzog  <[email protected]>
4847    
4848            * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
4849            with self.
4850    
4851            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
4852            when we have actually captured it.
4853    
4854            * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
4855            shapefile and destroy the table.
4856    
4857            * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
4858    
4859    2002-08-14  Bernhard Herzog  <[email protected]>
4860    
4861            * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
4862            instance variable columns
4863            (RecordTable.GetTypeName): row and col may be negative in some
4864            cases.
4865    
4866            * setup.py (InstallLocal.initialize_options)
4867            (InstallLocal.finalize_options, InstallLocal.user_options): New
4868            option create-init-file to build a thubaninit.py when running
4869            install_local
4870            (InstallLocal.run): Create the thubaninit.py module when requested
4871            (thubaninit_contents): Split the template into several parts and
4872            create a new function thubaninit_contents that creates the
4873            contents of a thubaninit module.
4874            (ThubanInstall.run): Use the new function to create the thubaninit
4875            module.
4876    
4877    2002-07-30  Bernhard Herzog  <[email protected]>
4878    
4879            * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
4880            cleanup.
4881            (ThubanApplication.MainLoop): Extend to automatically call OnExit.
4882    
4883            * Thuban/Model/session.py (Session.Destroy): Don't bypass the
4884            direct base class' Destroy method.
4885    
4886            * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
4887            layers.
4888            (Map.Destroy): Destroy the label_layer as well and call the
4889            inherited Desatroymethod first so that no more messages are
4890            issued.
4891            (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
4892            message if the stacking order actually has changed. Add
4893            doc-strings.
4894            (Map.BoundingBox): Correct the doc-string.
4895            (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
4896            (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
4897    
4898            * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
4899            all labels.
4900    
4901    2002-07-29  Bernhard Herzog  <[email protected]>
4902    
4903            * Thuban/Model/map.py (Map.subscribe_layer_channels)
4904            (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
4905            to a layer's channels into separate methods.
4906            (Map.RemoveLayer, Map.AddLayer): Call the new methods
4907            (Map.Destroy): Unsubscribe from a layer's channels before
4908            destroying it.
4909    
4910            * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
4911            selected_layer parameter to searched_layer which is the layer to
4912            search in.
4913            (MapCanvas.SelectShapeAt): New parameter layer to restrict the
4914            search to that layer. Return the selected layer and shape.
4915    
4916            * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
4917            typo
4918    
4919    2002-07-24  Bernhard Herzog  <[email protected]>
4920    
4921            * Thuban/UI/application.py (ThubanApplication.create_session):
4922            Extend the doc string.
4923            (ThubanApplication.subscribe_session)
4924            (ThubanApplication.unsubscribe_session): New methods to
4925            subscribe/unsubscribe to/from session channels.
4926            (ThubanApplication.SetSession): Call the new methods here.
4927            (ThubanApplication.maps_changed, ThubanApplication.set_map):
4928            Renamed set_map to maps_changed. Its now a subscriber for
4929            MAPS_CHANGED.
4930    
4931            * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
4932            x-coordinate in case of simple clicks
4933    
4934            * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
4935            don't pass it as a parameter
4936    
4937            * Thuban/Model/session.py (Session.RemoveMap): New
4938    
4939            * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
4940            window size into a parameter.
4941    
4942    2002-07-23  Bernhard Herzog  <[email protected]>
4943    
4944            * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
4945            just commands.
4946    
4947            * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
4948            parameter list a bit to allow setting the window title and the
4949            initial message in the status bar. Update the callers.
4950    
4951            * Thuban/UI/application.py (ThubanApplication.OnInit)
4952            (ThubanApplication.CreateMainWindow): Put the mainwindow
4953            instantiation into a separate method so that it can be overridden
4954            by a subclass.
4955    
4956    2002-07-19  Bernhard Herzog  <[email protected]>
4957    
4958            * Thuban/Model/session.py: Issue a CHANGED message every time
4959            another changed message is issued to make it easier to get
4960            notified of changes.
4961            (Session): Update the doc string
4962            (Session.forward): Issue changed-events as CHANGED as well.
4963            (Session.changed): Overwrite the inherited version to issue
4964            CHANGED events as well.
4965    
4966            * Thuban/UI/tree.py: We can now simply subscribe to the session's
4967            CHANGED channel to be informed of changes.
4968            (SessionTreeCtrl.session_channels): Not needed any longer.
4969            (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
4970            Only have to (un)subscribe CHANGED
4971    
4972            * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
4973    
4974            * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
4975            for the wxPython locale bug to __init__.py so that it's
4976            automatically executed by anybody using UI code from Thuban.
4977    
4978    2002-07-18  Bernhard Herzog  <[email protected]>
4979    
4980            * Thuban/UI/main.py (main): app no longer needs to be global
4981    
4982            * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
4983            as parameter and store it in an instance variable
4984            (MainWindow.invoke_command, MainWindow.update_command_ui)
4985            (MainWindow.save_modified_session, MainWindow.NewSession)
4986            (MainWindow.OpenSession, MainWindow.SaveSession)
4987            (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
4988            application object.
4989    
4990            * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
4991            the main window with self.
4992    
4993            * Thuban/UI/context.py: New module with the context class
4994    
4995            * Thuban/UI/command.py (Command): Update doc string.
4996    
4997            * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
4998            MainWindow.update_command_ui): Pass an instance of the context
4999            class to the command's methods
5000            (check_current_tool, call_method): Handle the new context
5001            implementation
5002    
5003            * Examples/simple_extensions/simple_tool.py (simple_tool,
5004            check_simple_tool): Handle the new context implementation
5005    
5006            * Examples/simple_extensions/simple_command.py (simple_command):
5007            Handle the new context implementation. Update the comments about
5008            the context.
5009    
5010            * Thuban/UI/application.py (ThubanApplication.SetSession): Add
5011            doc-string
5012            (ThubanApplication.Session): New method to return the session
5013            object
5014    
5015            * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
5016            interactor's selected_layer may not be a layer of the current
5017            session when the tree is updated while a new session is being set.
5018    
5019    2002-07-17  Bernhard Herzog  <[email protected]>
5020    
5021            * Thuban/UI/tree.py (color_string): Removed. No longer used.
5022            (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
5023            update_tree into update_tree and add_items. The tree now uses a
5024            more generic way to display the contents of the tree.
5025            (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
5026    
5027            * Thuban/Model/layer.py (Layer.TreeInfo),
5028            Thuban/Model/extension.py (Extension.TreeInfo),
5029            Thuban/Model/map.py (Map.TreeInfo),
5030            Thuban/Model/session.py (Session.TreeInfo):
5031            Add TreeInfo methods to implement the new tree view update scheme
5032    
5033    2002-07-16  Bernhard Herzog  <[email protected]>
5034    
5035            * Thuban/UI/application.py: Don't use "import from" for the
5036            MainWindow. It can't always be resolved.
5037            (ThubanApplication.OnInit): change reference to MainWindow
5038            accordingly.
5039    
5040            * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
5041            completely
5042    
5043    2002-07-10  Bernhard Herzog  <[email protected]>
5044    
5045            * setup.py (create_init_module): New configurable variable whose
5046            default depends on the platform we're running on.
5047            (ThubanInstall.initialize_options): Initialize
5048            self.create_init_module from the global create_init_module
5049            (ThubanInstall.user_options): indictate that the options
5050            create-init-module and init-module-dir have arguments.
5051    
5052            * setup.py: In the setup call change the version number to include
5053            cvs.
5054    
5055            * MANIFEST.in: Add the files in Examples
5056    
5057    2002-07-09  Bernhard Herzog  <[email protected]>
5058    
5059            * setup.py: In the setup call, use the thuban homepage as the
5060            value of the url parameter.
5061    
5062            * Examples: New subdirectory for examples.
5063    
5064            * Examples/simple_extensions/simple_tool.xpm,
5065            Examples/simple_extensions/simple_tool.py,
5066            Examples/simple_extensions/simple_command.py,
5067            Examples/simple_extensions/README: Simple examples showing how to
5068            add new commands and tools.
5069    
5070            * setup.cfg (bdist_rpm): Add the default value for prefix and tell
5071            bdist_rpm that we also have an install script.
5072            (bdist_inno): Add 2002 to the copyright notice.
5073    
5074            * setup.py: Create a file in python's site-packages directory to
5075            make installation of Thuban as a library easier.
5076            (ThubanInstall.user_options): Add two new options,
5077            create-init-module and init-module-dir
5078            (ThubanInstall.expand_with_pure_python_dirs): New method to expand
5079            filenames for installation in the default directories.
5080            (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
5081            the inherited methods to capture some filenames before they're
5082            transformed too much by distutils.
5083            (ThubanInstall.run): Create the init module if requested.
5084            (ThubanInstall.thuban_init_filename): New method to return the
5085            full name of the init module.
5086            (ThubanInstall.get_outputs): Append the filename of the init
5087            module.
5088    
5089    2002-07-08  Bernhard Herzog  <[email protected]>
5090    
5091            * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
5092            handle the prefix properly which means that the default for the
5093            installation prefix should be /usr for RPMs and /usr/local when
5094            doing a normal source install.
5095            (bdist_rpm_install_script): Script to override the default install
5096            commands in the specfile generated by the bdist_rpm command.
5097            (thuban_bdist_rpm.user_options): Add a prefix option
5098            (thuban_bdist_rpm.initialize_options): Init the prefix option.
5099            Create the script files for the spec files as empty files here
5100            (thuban_bdist_rpm._make_spec_file): Override the inherited method
5101            to fill the script files with content.
5102    
5103            * Thuban/Model/save.py (relative_filename): Wrapper around
5104            Thuban.Lib.fileutil.relative_filename that accepts an empty dir
5105            argument. save_session now automatically uses this version,
5106            solving a problem when saving to a relative filename.
5107    
5108            * setup.py: In the setup call, make sure that the library
5109            directories are under $prefix/lib not directly under $prefix.
5110    
5111    2002-06-20  Jan-Oliver Wagner <[email protected]>
5112    
5113            * Thuban/Model/extension.py: new module to handle extension objects.
5114            * Thuban/Model/messages.py: new messages for extensions.
5115            * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
5116            Session.AddExtension): new for handling extensions.
5117            Also some other minor changes to round up extension handling.
5118            * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
5119            of Extension titles and title and names of its objects.
5120    
5121    2002-05-29  Bernhard Herzog  <[email protected]>
5122    
5123            * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
5124            the events for a command.
5125            (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
5126            Call bind_command_events to bind the events. add_toolbar_command
5127            can now bind events too so that it's possible to have commands
5128            that are only available through the toolbar.
5129            (MainWindow.init_ids): New instance variable events_bound to keep
5130            track of for which commands events have been bound.
5131    
5132    2002-05-28  Bernhard Herzog  <[email protected]>
5133    
5134            * Thuban/UI/menu.py: New module to build and manage menus.
5135    
5136            * Thuban/UI/mainwindow.py: Remove some unused imports.
5137            (MainWindow.__init__, main_menu): move the definition of the main
5138            menu from __init__ to the Menu instance main_menu.
5139            (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
5140            build the menu bar and sub-menus from a menu description.
5141    
5142            * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
5143            startup file
5144            (ThubanApplication.read_startup_files): New method to run
5145            ~/.thuban/thubanstart.py
5146    
5147            * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
5148            Move the toolbar definition to the Menu instance main_toolbar.
5149            (MainWindow.build_toolbar): New method to build the toolbar
5150            similar to the build_menu methods
5151    
5152    2002-05-23  Bernhard Herzog  <[email protected]>
5153    
5154            * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
5155            layer_outline_color. Fix it in the definition of the command too.
5156    
5157            * Thuban/UI/command.py (Command): Fix typo in doc string
5158    
5159    2002-05-22  Bernhard Herzog  <[email protected]>
5160    
5161            * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
5162            in the docstring
5163    
5164    2002-05-15  Bernhard Herzog  <[email protected]>
5165    
5166            * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
5167            when the shapefile is empty.
5168            (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
5169            now return None for empty shapefiles. Update doc-strings.
5170    
5171            * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
5172            the layer's bbox being None.
5173    
5174            * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
5175            layer's bbox being None.
5176    
5177            * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
5178            necessary.
5179            (MapCanvas.__init__): New instance variables, last_selected_layer
5180            and last_selected_shape to determine how the selection has
5181            changed.
5182    
5183            * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
5184            AutoSizeColumns because it will cause a traversal of the entire
5185            table which for large .dbf files will take a very long time.
5186    
5187  2002-05-14  Bernhard Herzog  <[email protected]>  2002-05-14  Bernhard Herzog  <[email protected]>
5188    
5189          * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better          * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
# Line 151  Line 5337 
5337          * Thuban/UI/messages.py (VIEW_POSITION): New message for the          * Thuban/UI/messages.py (VIEW_POSITION): New message for the
5338          position in the statusbar          position in the statusbar
5339    
5340  2002-04-26      Frank Koormann <[email protected]>  2002-04-26  Frank Koormann <[email protected]>
5341    
5342          * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data          * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
5343    
5344  2002-04-24      Frank Koormann <[email protected]>  2002-04-24  Frank Koormann <[email protected]>
5345            
5346          * Resources/Bitmaps/identify.xpm: shadow added          * Resources/Bitmaps/identify.xpm: shadow added
5347    
5348          * Resources/Bitmaps/fullextent.xpm: new          * Resources/Bitmaps/fullextent.xpm: new
           
 2002-04-22      Jan-Oliver Wagner <[email protected]>  
5349    
5350          * Thuban/UI/tree.py (update_tree): added test for None on map bounding box  2002-04-22  Jan-Oliver Wagner <[email protected]>
5351    
5352            * Thuban/UI/tree.py (update_tree): added test for None on map bounding
5353            box
5354    
5355  2002-04-21      Jan-Oliver Wagner <[email protected]>  2002-04-21  Jan-Oliver Wagner <[email protected]>
5356    
5357          * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new          * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
5358    
5359          * Thuban/UI/tree.py (update_tree): added added map extent          * Thuban/UI/tree.py (update_tree): added added map extent
5360    
5361          * Thuban/UI/mainwindow.py (_method_command): extended by parameter          * Thuban/UI/mainwindow.py (_method_command): extended by parameter
5362          icon; added map_full_extend as tool          icon; added map_full_extend as tool
5363    
5364  2002-04-19      Jan-Oliver Wagner <[email protected]>  2002-04-19  Jan-Oliver Wagner <[email protected]>
5365    
5366          * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for          * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
5367          saving _new_ sessions          saving _new_ sessions
# Line 276  Line 5463 
5463    
5464          * setup.py: increase version number to 0.1          * setup.py: increase version number to 0.1
5465          (data_dist): New command class for data distribution          (data_dist): New command class for data distribution
           
5466    
5467  2001-09-14  Bernhard Herzog  <[email protected]>  2001-09-14  Bernhard Herzog  <[email protected]>
5468    
5469          * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):          * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
5470          Handle the case of no layer (i.e. layer is None) properly.          Handle the case of no layer (i.e. layer is None) properly.
5471    
5472          * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):          * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
5473          Set the initial selection of the combo boxes to reflect the          Set the initial selection of the combo boxes to reflect the
5474          projection we're starting with in a way that works on windows,          projection we're starting with in a way that works on windows,
5475          too.          too.
# Line 393  Line 5579 
5579          (MainWindow.identify_view_on_demand): Store the interactor in an          (MainWindow.identify_view_on_demand): Store the interactor in an
5580          instvar and use that reference instead of going through main.app          instvar and use that reference instead of going through main.app
5581    
5582          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
5583          * Thuban/UI/application.py (ThubanApplication.OnInit):          * Thuban/UI/application.py (ThubanApplication.OnInit):
5584          * Thuban/UI/main.py (main): Create the session tree view in main          * Thuban/UI/main.py (main): Create the session tree view in main
5585          with the new mainwindow method ShowSessionTree and not directly          with the new mainwindow method ShowSessionTree and not directly
5586          the application's OnInit method          the application's OnInit method
# Line 410  Line 5596 
5596          layer to the tableview dialog.          layer to the tableview dialog.
5597    
5598          * Thuban/UI/tableview.py: Add some doc-strings          * Thuban/UI/tableview.py: Add some doc-strings
5599          (TableGrid):          (TableGrid):
5600          (TableGrid.OnRangeSelect):          (TableGrid.OnRangeSelect):
5601          (TableGrid.OnSelectCell):          (TableGrid.OnSelectCell):
5602          (TableFrame.__init__):          (TableFrame.__init__):
# Line 477  Line 5663 
5663  2001-09-05  Bernhard Herzog  <[email protected]>  2001-09-05  Bernhard Herzog  <[email protected]>
5664    
5665          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
5666            
5667          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
5668          interactor to pass through to the MapCanvas          interactor to pass through to the MapCanvas
5669            
5670          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
5671          argument to the MainWindow constructor to get rid of the ugly hack          argument to the MainWindow constructor to get rid of the ugly hack
5672          that made main.app available early just so that the mapcanvas          that made main.app available early just so that the mapcanvas
# Line 527  Line 5713 
5713          (ThubanInstall.run): Remove the leading install root from the          (ThubanInstall.run): Remove the leading install root from the
5714          script filename if an install root was specified and use the new          script filename if an install root was specified and use the new
5715          link_file method          link_file method
5716            
5717          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
5718          the window when the first layer is added to the map.          the window when the first layer is added to the map.
5719    
# Line 564  Line 5750 
5750          (InnoIconItem): Helper class for bdist_inno          (InnoIconItem): Helper class for bdist_inno
5751          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
5752          this together with the appropriate parameters, to the setup call.          this together with the appropriate parameters, to the setup call.
5753            
5754          * setup.cfg (bdist_inno): added new section for the inno setup          * setup.cfg (bdist_inno): added new section for the inno setup
5755          installer          installer
5756    

Legend:
Removed from v.172  
changed lines
  Added in v.1424

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26