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

Legend:
Removed from v.595  
changed lines
  Added in v.1420

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26