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

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

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

revision 766 by bh, Tue Apr 29 12:42:27 2003 UTC revision 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]>  2003-04-29  Bernhard Herzog  <[email protected]>
2908    
2909          Next step of table implementation. Introduce a transient database          Next step of table implementation. Introduce a transient database
# Line 51  Line 2957 
2957          once. Plus it introduces a reference cycle that keeps can keep the          once. Plus it introduces a reference cycle that keeps can keep the
2958          session object alive for a long time.          session object alive for a long time.
2959    
2960  2003-04-25  Jonathan Coles   <[email protected]>  2003-04-29  Jonathan Coles   <[email protected]>
2961    
2962          * Thuban/Model/proj.py (Projection): Removed Set*() methods to make          * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
2963          Projection an immutable item. Fixes RTbug #1825.          Projection an immutable item. Fixes RTbug #1825.

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26