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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26