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

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

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

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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26