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

Legend:
Removed from v.634  
changed lines
  Added in v.1411

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26