/[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 924 by frank, Mon May 19 09:12:42 2003 UTC revision 1380 by bh, Tue Jul 8 13:23:31 2003 UTC
# Line 1  Line 1 
1    2003-07-08  Bernhard Herzog  <[email protected]>
2    
3            * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
4            interpolated colors correctly.
5    
6            * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
7            New. Test case for the fix in classgen.py
8    
9    2003-07-08  Bernhard Herzog  <[email protected]>
10    
11            * test/runtests.py (main): Make the default output less verbose
12            and add a verbosity option (-v) to get the old output
13    
14    2003-07-08  Bernhard Herzog  <[email protected]>
15    
16            * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
17            0.9.
18    
19            * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
20            New. Return the join type
21    
22            * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
23            DTD
24            (SessionSaver.write_data_containers): Save the join type for
25            joined tables
26    
27            * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
28            namespace
29            (SessionLoader.start_jointable): Handle the jointype attribute
30    
31            * test/test_load_0_8.py: New. Effectively a copy of test_load.py
32            as of Thuban 0.8. These are now tests to determine whether Thuban
33            can still read files generated by Thuban 0.8
34    
35            * test/test_load.py (LoadSessionTest.dtd)
36            (TestSingleLayer.file_contents)
37            (TestLayerVisibility.file_contents, TestLabels.file_contents)
38            (TestLayerProjection.file_contents)
39            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
40            (TestJoinedTable.file_contents)
41            (TestLoadError.file_contents): Update for new DTD
42            (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
43            for new join type attribute
44    
45            * test/test_save.py (SaveSessionTest.dtd)
46            (SaveSessionTest.testEmptySession)
47            (SaveSessionTest.testSingleLayer)
48            (SaveSessionTest.testLayerProjection)
49            (SaveSessionTest.testRasterLayer)
50            (SaveSessionTest.testClassifiedLayer)
51            (SaveSessionTest.test_dbf_table)
52            (SaveSessionTest.test_joined_table): Update for new DTD
53            (SaveSessionTest.test_joined_table): Add test for new join type
54            attribute
55    
56    2003-07-04  Bernhard Herzog  <[email protected]>
57    
58            * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
59            function for table_to_dbf
60            (table_to_dbf): Deal with names longer than the 10 character limit
61    
62            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
63            doc-string
64            (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
65            long column names
66    
67    2003-07-03  Bernhard Herzog  <[email protected]>
68    
69            * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
70    
71    2003-07-03  Bernhard Herzog  <[email protected]>
72    
73            * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
74            for the Thuban manual and README with some basic information about
75            the manual
76    
77    2003-07-03  Bernhard Herzog  <[email protected]>
78    
79            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
80            Update doc-string
81            (TransientJoinedTable.create): Do not modify the column objects of
82            the input tables in place and copy all columns of the input tables
83            into the joined table after all.
84    
85            * test/test_transientdb.py
86            (TestTransientTable.test_transient_joined_table_same_column_name):
87            Update to reflect the new behavior
88            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
89            Update to reflect the new behavior
90            (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
91            New test case for a bug which modified the column objects in place
92    
93    2003-07-02  Jonathan Coles   <[email protected]>
94    
95            * Thuban/Model/classgen.py (generate_singletons,
96            generate_uniform_distribution, generate_quantiles,
97            GenQuantiles0): Make sure maxValue isn't less than
98            one, otherwise we could divide by zero.
99    
100            * test/test_classgen.py (ClassGenTest.doClassRangeTest,
101            ClassGenTest.doClassSingleTest): Call doBoundsTest to
102            check the end classification groups against the
103            proper property values.
104            (ClassGenTest.doBoundsTest): New. Checks the first and
105            last classification groups to make sure their properties
106            are the correct upper and lower bounds for a color ramp.
107    
108    2003-07-02  Jonathan Coles   <[email protected]>
109    
110            * Thuban/Model/classgen.py (generate_singletons,
111            generate_uniform_distribution, generate_quantiles,
112            GenQuantiles0): The denominator was one to high when
113            calculating the index for the ramp causing the index
114            to never to reach one.
115    
116    2003-07-02  Jonathan Coles   <[email protected]>
117    
118            Changed the singature of ClassGroupRange.__init__ and
119            ClassGroupRange.SetRange() so that the min/max values are
120            passed as a tuple. This makes a better calling scheme for
121            when a Range object is passed instead.
122    
123            * Thuban/Model/classgen.py: Fixed parameters to
124            ClassGroupRange constructor.
125    
126            * Thuban/Model/classification.py (ClassGroupRange.__init__):
127            Consolidate the min/max parameters into a single _range which
128            can either be a tuple or a Range object.
129            (ClassGroupRange.SetRange): Consolidate the min/max parameters
130            into a single _range which can either be a tuple or a Range object.
131    
132            * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
133            call to ClassGroupRange constructor to use a tuple.
134    
135            * Thuban/Model/layer.py (Layer.SetClassification): Switch
136            the classification instance variable to the new class
137            before calling _set_layer otherwise subscribers to a
138            LAYER_CHANGED event will not see any difference.
139    
140            * test/test_classification.py: Fix tests of ClassGroupRange
141            so that they use the new signature.
142    
143            * test/test_load.py: Fix use of ClassGroupRange so that it
144            uses the new signature.
145    
146            * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
147            uses the new signature.
148    
149            * test/test_save.py: Fix use of ClassGroupRange so that it
150            uses the new signature.
151    
152    
153    2003-07-01  Jonathan Coles   <[email protected]>
154    
155            * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
156            Import used objects/class from color.
157            (generate_singletons): We don't
158            need the numGroups parameter anymore because we are using
159            the new ramps with GetProperties().
160            (generate_uniform_distribution): Use new ramp method
161            GetProperties().
162            (generate_quantiles, GenQuantiles0): Use new ramp method
163            GetProperties().
164            (CustomRamp.SetNumGroups): Removed. The ramps now map
165            a value from 0 to 1 to class properties so the number
166            of groups is not needed ahead of time.
167            (CustomRamp.next): Removed. CustomRamp does not support
168            interation anymore.
169            (CustomRamp.GetProperties): Returns a ClassGroupProperties
170            object based on the index value from 0 to 1 that is
171            passed to it.
172            (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
173            Made into instances of Monochromatic class instread of
174            deriving from it.
175            (HotToCold.SetNumGroups): Removed. See CustomRamp.
176            (HotToCold.next): Removed. See CustomRamp.
177    
178            * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
179            (Classification.SetField, Classification.SetFieldType):
180            Replaced with SetFieldInfo.
181            (Classification.SetFieldInfo): New. Does a better job of
182            what SetField and SetFieldType used to do by combining
183            their function since they should really always be done
184            at the same time.
185            (Classification.SetLayer): Renamed to _set_layer.
186            (Classification._set_layer): Should only be called from
187            Layer's SetClassification. This does not cause a recursive
188            call as SetLayer did because we know that Layer knows about
189            the classification.
190    
191            * Thuban/Model/color.py: Fixes RTbug #1971.
192            (_Transparent): Renamed from Transparent so it doesn't
193            conflict with the module variable.
194            (Transparent, Black): Renamed from Color.Transparent,
195            Color.Black so they are not class variables.
196    
197            * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
198            (Layer.Destroy): We don't need to call SetClassification
199            anymore to clear out the back reference in the classifcation
200            to the layer. It's better to set it to None using _set_layer,
201            and we won't be creating another clas object too.
202            (Layer.SetClassification): Classification._set_layer is not
203            recursive so remove all the locking variables. Also clean
204            up the code so that it remains unchanged if something fails.
205    
206            * Thuban/Model/load.py: Fixes RTbug #1971.
207            (SessionLoader.start_classification): Call
208            Classification.SetFieldInfo().
209    
210            * Thuban/Model/save.py: Removed import of Color which wasn't
211            being used.
212    
213            * Thuban/UI/classgen.py: Fixes RTbug #1972.
214            (ClassGenDialog.__init__): Color ramps are now instances
215            already so we don't need to create any new objects.
216            (ClassGenDialog.OnOK): Check for numGroups is no longer
217            necessary because we never use it.
218    
219            * Thuban/UI/classifier.py: Fixes RTbug #1971.
220            (Classifier.__BuildClassification, Classifier.__SetGridTable):
221            Call Classification.SetFieldInfo() instead of SetFieldType.
222    
223            * Thuban/UI/renderer.py: Fixes RTbug #1971.
224    
225            * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
226            (MapCanvas.__init__): Subscribe to the idle time event. Set
227            background color to white.
228            (MapCanvas.OnPaint): Set a flag indicating that we should
229            render the map during idle time. If we already have a bitmap
230            just draw it now.
231            (MapCanvas.OnIdle): New. Render the map only during idle time.
232            This also fixes a problem with the busy cursor under gtk.
233    
234            * test/test_classgen.py (ClassGenTest.test_generate_singletons):
235            Fix calls to generate_singletons because the signature changed.
236    
237            * test/test_classification.py: Fix color references and
238            change calls to Classification.[SetField|SetFieldType] to
239            SetFieldInfo.
240    
241            * test/test_load.py: Fix color references.
242    
243            * test/test_load_0_2.py: Fix color references.
244    
245            * test/test_save.py (SaveSessionTest.testClassifiedLayer):
246            Change calls to Classification.[SetField|SetFieldType] to
247            SetFieldInfo.
248    
249    2003-07-01  Frank Koormann   <[email protected]>
250    
251            MERGE from the greater-ms3 branch.
252    
253            * test/test_transientdb.py
254            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
255            New. Test join of two tables with partly equal column names.
256    
257            * Thuban/Model/transientdb.py (TransientJoinedTable.create):
258            If duplicates in left and right tables column names are found,
259            append '_' (underscores) to the name until it is unique.
260            Create always new internal names for the resulting table and reference
261            columns in the join statement with <table>.<column>
262    
263    2003-07-01  Bernhard Herzog  <[email protected]>
264    
265            * test/test_transientdb.py
266            (TestTransientTable.test_transient_joined_table_same_column_name):
267            New. Test whether joining on columns with the same names in both
268            tables works.
269            
270            * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
271            sure to use the right internal names even when joining on field
272            with the same names in both tables. Also, detect duplicate names
273            in the joined table correctly.
274    
275    2003-07-01  Frank Koormann   <[email protected]>
276    
277            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
278            Reverse List of layers to render in same order as in desktop legend.
279    
280    2003-06-30  Jonathan Coles   <[email protected]>
281    
282            * Thuban/version.py (make_tuple): Takes a version string
283            and splits it into a tuple of at most three integers.
284            Used make_tuple() to make tuple versions of the version
285            numbers.
286    
287            * Thuban/UI/about.py: Add Thuban email addresses.
288    
289    2003-06-30  Jonathan Coles   <[email protected]>
290    
291            * Thuban/version.py: SQLite/PySQLite version dependencies
292            were too high.
293    
294    2003-06-30  Jonathan Coles   <[email protected]>
295    
296            * Thuban/version.py: Update version to 0.8.1
297            
298            * MANIFEST.in: Added Projections so that default.proj is
299            included.
300    
301    2003-06-26  Jonathan Coles   <[email protected]>
302    
303            New About box with lots more information including library
304            versions and credits. More/better version checking before
305            Thuban starts.
306    
307            * Thuban/UI/about.py: New. New About box that displays
308            library version information and credits.
309    
310            * Thuban/version.py: Added new 'versions' dictionary which
311            contains the verions of various libraries which are checked
312            when the module loads.
313            (verify_versions): Check all version numbers and returns
314            a list of errors.
315    
316            * Thuban/UI/classifier.py (Classifier.__EnableButtons):
317            Reset the status of the buttons as the situation warrants,
318            but in a better more reliable way by not relying on the
319            current status to determine what needs to change.
320    
321            * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
322            (verify_versions): Remove most of the code since it is
323            now in Thuban.version.verify_versions.o
324    
325            * Thuban/UI/mainwindow.py (MainWindow.About): Call new
326            About box in Thuban.UI.about.
327    
328            * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
329            Returns the version of gdal library being used as a string.
330    
331            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
332            Removed.
333            (get_proj_version): Return the version of PROJ that the file
334            was compiled with.
335            (get_gtk_version): Return th version of GTK that the file
336            was compiled with.
337    
338    2003-06-25  Jonathan Coles   <[email protected]>
339    
340            * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
341            of the SelectPropertiesDialog should be self so the window
342            appears on top.
343            (ClassGroupPropertiesCtrl.DoEdit): The parent
344            of the SelectPropertiesDialog should be self so the window
345            appears on top.
346    
347            * Thuban/UI/resource.py: Cleaned up how we determine file
348            extensions.
349            (GetImageResource): Return an wxImage from our Resources.
350    
351    2003-06-24  Jonathan Coles   <[email protected]>
352    
353            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
354            Check that a layer has a classification before trying
355            to get it. Raster layers don't have classifications.
356    
357    2003-06-23  Jonathan Coles   <[email protected]>
358            
359            * setup.py: Add Resources/XML to resource list.
360        
361    2003-06-23  Jonathan Coles   <[email protected]>
362    
363            * setup.cfg: Fix copyright dates
364        
365    2003-06-23  Jonathan Coles   <[email protected]>
366    
367            * MANIFEST.in: Update with Resources/XML
368    
369            * setup.py: Don't include Locale resources yet as we don't
370            have any and it causes problems building the distribution
371            for Windows. Update version to 0.8.0.
372    
373            * Doc/thuban.dtd: Removed since it is now in Resources/XML.
374    
375            * Thuban/UI/mainwindow.py: Add blank line at the end because
376            file was not being read correctly building the Windows
377            distribution.
378    
379    2003-06-23  Jonathan Coles   <[email protected]>
380    
381            * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
382    
383            * Thuban/version.py: Temporarily update longversion for
384            the 0.8 release so that it doesn't have the cvs revision.
385    
386    2003-06-23  Jonathan Coles   <[email protected]>
387    
388            * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
389            to make sure that we don't create reentrant possibilities with
390            wxYield.
391    
392            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
393            directly to avoid the wxSafeYield() call which generates an
394            OnPaint event causing infinite recursion. Don't try to catch
395            exception anymore. This was for before there were limits on map
396            scaling.
397    
398    2003-06-23  Bernhard Herzog  <[email protected]>
399    
400            Bug fix for RT #1961:
401    
402            * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
403            Register DerivedShapestores with the session
404    
405            * Thuban/Model/session.py (Session.Tables): Make sure each table
406            is only listed once.
407    
408            * test/test_load.py (TestJoinedTable.test): Add check_format call.
409            Update file contents to match the one written out.
410    
411    2003-06-20  Bernhard Herzog  <[email protected]>
412    
413            * test/xmlsupport.py (SaxEventLister.startElementNS)
414            (SaxEventLister.endElementNS): Do not include the qname. Python
415            2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
416            is (presumably incorrectly) None, whereas it's a string with the
417            element name in the later versions.
418    
419            * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
420            (TestEventList.test_even_list_namespace): Update tests to reflect
421            the new behaviour
422            (TestEventList.test_even_list_id_normalization): Fix doc-string
423    
424    2003-06-20  Jonathan Coles   <[email protected]>
425    
426            * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
427            by deriving classes to determine if that layer supports shapes.
428            (Layer): Override HasShapes and return true.
429    
430            * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
431            instead of a direct call to wx[Begin|End]CusyCursor().
432            (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
433            table data.
434    
435            * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
436            New. Wrappers around the wxWindows functions that allow us to
437            make additional calls such as wxYield which gives the native
438            system a chance to update the cursor correctly.
439    
440            * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
441            instead of a direct call to wx[Begin|End]CusyCursor().
442    
443            * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
444            instead of a direct call to wx[Begin|End]CusyCursor().
445            (MapCanvas.find_shape_at): Check if the current search layer
446            support shapes, otherwise go on to the next layer.
447    
448            * test/test_layer.py: Add tests in each type of layer for
449            HasClassification() and HasShapes()
450    
451    2003-06-20  Jonathan Coles   <[email protected]>
452    
453            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
454            turning on the busy cursor to allow the system to change the
455            cursor before we begin painting. This fixes a problem that
456            was occuring only under GTK. Fixes RTbug #1840.
457    
458    2003-06-20  Bernhard Herzog  <[email protected]>
459    
460            * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
461            version.
462    
463            * Thuban/Model/save.py (sort_data_stores): New. Make topological
464            sort of the data sources so they can be written with sources that
465            data sources that depend on other data sources come after the
466            sources they depend on.
467            (SessionSaver.__init__): Add idmap instance variable to map from
468            objects to the ids used in the file.
469            (SessionSaver.get_id, SessionSaver.define_id)
470            (SessionSaver.has_id): New. Methods to manage the idmap
471            (SessionSaver.write): Use thuban-0.8.dtd
472            (SessionSaver.write_session): Add a namespace on the session and
473            write out the data sources before the maps.
474            (SessionSaver.write_data_containers): New. Write the data
475            containers.
476            (SessionSaver.write_layer): Layer elements now refer to a
477            shapestore and don't contain filenames anymore.
478    
479            * Thuban/Model/load.py (LoadError): Exception class to raise when
480            errors in the files are discovered
481            (SessionLoader.__init__): Define dispatchers for elements with a
482            thuban-0.8 namespace too.
483            (SessionLoader.check_attrs): New helper method to check and
484            convert attributes
485            (AttrDesc): New. Helper class for SessionLoader.check_attrs
486            (SessionLoader.start_fileshapesource)
487            (SessionLoader.start_derivedshapesource)
488            (SessionLoader.start_filetable, SessionLoader.start_jointable):
489            Handlers for the new elements in the new fileformat
490            (SessionLoader.start_layer): Handle the shapestore attribute in
491            addition to filename.
492            (SessionLoader.start_table, SessionLoader.end_table): Removed.
493            They were never used in the old formats and aren't needed for the
494            new.
495    
496            * Thuban/Model/session.py (Session.DataContainers): New method to
497            return all "data containers", i.e. shapestores and tables
498    
499            * test/xmlsupport.py (SaxEventLister.__init__)
500            (SaxEventLister.startElementNS, sax_eventlist): Add support to
501            normalize IDs.
502    
503            * test/test_xmlsupport.py
504            (TestEventList.test_even_list_id_normalization): New test case for
505            id normalization
506    
507            * test/test_load.py (LoadSessionTest.check_format): Use ID
508            normalization
509            (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
510            class atrributes used for ID normalization
511            (TestSingleLayer, TestLayerVisibility, TestLabels.test)
512            (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
513            file format
514            (TestJoinedTable): New test for loading sessions with joined
515            tables.
516            (TestLoadError): New. Test whether missing required attributes
517            cause a LoadError.
518    
519            * test/test_save.py (SaveSessionTest.thubanids)
520            (SaveSessionTest.thubanidrefs): New class attributes for ID
521            normalization in .thuban files.
522            (SaveSessionTest.compare_xml): Use id-normalization.
523            (SaveSessionTest.testEmptySession)
524            (SaveSessionTest.testLayerProjection)
525            (SaveSessionTest.testRasterLayer)
526            (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
527            (SaveSessionTest.testLayerProjection): The filename used was the
528            same as for testSingleLayer. Use a different one.
529            (SaveSessionTest.test_dbf_table)
530            (SaveSessionTest.test_joined_table): New test cases for saving the
531            new data sources structures.
532            (TestStoreSort, MockDataStore): Classes to test the sorting of the
533            data stores for writing.
534    
535            * test/runtests.py: Add CVS keywords
536    
537    2003-06-20  Jonathan Coles   <[email protected]>
538    
539            * test/test_session.py
540            (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
541            Use the cultural_landmark-point.dbf file for the store so that
542            the table rows and shape count match.
543    
544    2003-06-20  Jonathan Coles   <[email protected]>
545    
546            * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
547            an exception if the number of shapes is different from the
548            number of rows in the table. Address RTbug #1933.
549    
550            * test/test_layer.py (TestLayer.test_derived_store): Add
551            a test for the new exception in DerivedShapeStore.__init__.
552    
553            * test/support.py (FloatTestCase): Removed since there is
554            already FloatComparisonMixin. Fixes RTbug #1954.
555            (FloatComparisonMixin.assertFloatEqual): Include test for
556            infinity that was part of FloatTestCase.
557    
558            * test/test_range.py (RangeTest): Inherit from
559            support.FloatComparisonMixin now that we don't have
560            support.FloatTestCase.
561    
562    2003-06-20  Bernhard Herzog  <[email protected]>
563    
564            * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
565            the implementation in xmlsupport instead.
566            (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
567    
568            * test/test_proj.py: Import sax_eventlist from xmlsupport instead
569            of test_save
570    
571    2003-06-20  Bernhard Herzog  <[email protected]>
572    
573            * test/test_load.py (LoadSessionTest.check_format): New helper
574            method to make sure the test files we load might have been written
575            by the current thuban version.
576            (ClassificationTest.TestLayers, TestSingleLayer.test)
577            (TestLayerVisibility.test, TestClassification.test)
578            (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
579            Add check_format() calls and fix the thuban data to match the data
580            that would be written by saving the session loaded from it.
581    
582            * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
583            the same class and function in test_save.
584    
585            * test/test_xmlsupport.py (TestEventList): New. test cases for
586            sax_eventlist
587    
588    2003-06-20  Bernhard Herzog  <[email protected]>
589    
590            * Resources/XML/thuban.dtd: Add comment about which versions of
591            Thuban are covered by this DTD
592            (map): Fix content model for layers and raster layers. There can
593            be any number or layers and raster layers in any order.
594    
595    2003-06-20  Jonathan Coles   <[email protected]>
596    
597            This is mainly about fixing RTbug #1949.
598    
599            * Thuban/Model/classification.py: Remove "from __future__"
600            import statement since python 2.2 is the earliest supported
601            version.
602    
603            * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
604            Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
605            depending on the units this projection *forwards* into.
606    
607            * Thuban/Model/save.py (SessionSaver.write_classification):
608            Remove unnecessary use of lambdas and nested functions.
609    
610            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
611            adjustment here if the map projection uses degrees.
612    
613            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
614            scale adjust code since it is now done before calling
615            this method. Don't do anything if the map projection
616            is None.
617    
618    2003-06-19  Bernhard Herzog  <[email protected]>
619    
620            Move version specific load tests to their own file.
621    
622            * test/test_load.py: Expand the doc-string to explain a bit how to
623            handle file format changes.
624            (TestClassification.test): Update the docstring as this test is
625            not about Thuban 0.2 anymore.
626    
627            * test/test_load_0_2.py: New file with the load tests for thuban
628            files created with Thuban 0.2 and earlier.
629    
630    2003-06-19  Bernhard Herzog  <[email protected]>
631    
632            Add XML validation to some of the tests. Validation will only be
633            done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
634            To make the DTD available to the test cases it's moved into
635            Resources/XML
636    
637            * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
638            for versions up to and including 0.2. Two slight changes: added an
639            encoding specification and fixed the comment which refered to
640            GRASS, not Thuban
641    
642            * test/xmlsupport.py: New support module for tests involving XML.
643            Currently there's a mix-in class for XML validation.
644    
645            * test/test_xmlsupport.py: New. Tests for the xmlsupport module
646    
647            * test/test_save.py (SaveSessionTest): Derive from ValidationTest
648            so that we can validate the
649            (SaveSessionTest.testEmptySession)
650            (SaveSessionTest.testSingleLayer)
651            (SaveSessionTest.testSingleLayer)
652            (SaveSessionTest.testLayerProjection)
653            (SaveSessionTest.testRasterLayer)
654            (SaveSessionTest.testClassifiedLayer): Validate the generated XML
655    
656            * test/runtests.py (main): Call print_additional_summary instead
657            of print_garbage_information
658    
659            * test/support.py (resource_dir): New function to return the
660            "Resource" subdirectory
661            (print_additional_summary): New function to combine several
662            summary functions
663            (run_tests): Use print_additional_summary instead of calling
664            print_garbage_information directly
665    
666    2003-06-19  Bernhard Herzog  <[email protected]>
667    
668            * Doc/thuban.dtd (classification): Correct the content model of
669            the classification element.
670            (projection): Add the "name" attribute
671    
672    2003-06-19  Frank Koormann   <[email protected]>
673    
674            MERGE from the greater-ms3 branch.
675    
676            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
677            scale if projection is latlong to get better estimate.
678    
679            Fix problem of hidden properties dialog under windows after double
680            click on layer tree:
681            The tree control always gets an Expanded / Collapsed event after
682            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
683            raises the already displayed window.
684    
685            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
686            raiseProperties initialized to prevent endless loops
687            (LegendTree._OnItemActivated): Depending on self.raiseProperties
688            simply raise the properties or open the dialog and issue a second
689            event.
690    
691    2003-06-18  Jonathan Coles   <[email protected]>
692    
693            * setup.py: Fix a few problems that occured under Windows.
694    
695    2003-06-18  Jonathan Coles   <[email protected]>
696    
697            When Thuban loaded the map was redrawn twice because the
698            legend was being opened after the mainwindow was created
699            and not during its creation. This meant the map was drawn
700            initially and then had to be redrawn when the legend
701            caused the display to change. Now the legend is opened
702            in the mainwindow constructor which resolves this issue.
703    
704            Also, although we were checking for the existence of
705            gdal and gdalwarp modules, the gdalwarp extension was
706            still being compiled (which may fail if the system doesn't
707            have gdal installed). the build_ext command to setup.py
708            now accepts the flags --with-gdal and --without-gdal.
709            If --without-gdal is specified setup.py will try to
710            use the gdal parameters specified by gdal-config. Under
711            windows, those parameters have to be set in setup.py
712            as with proj4 an wxWindows.
713    
714            * setup.py: Use a list instead of seperate variables for
715            extension parameters so we can create a generic function
716            that runs an appropriate *-config script.
717            (run_cs_script): Renamed from run_wx_script and modified
718            to accept a second argument which is a list of lists to
719            be filled in by the values returned from running the command.
720            (thuban_build_ext): New. Extends the build_ext command and
721            provides the options --with-gdal/--without-gdal which then
722            optionally includes the gdalwarp extension.
723    
724            * Thuban/Model/resource.py: First check if we can import
725            the gdalwarp Thuban extension before checking for gdal.
726            Also added some comments.
727            
728            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
729            the map is None which may be the case if none has been loaded
730            yet.
731    
732            * Thuban/UI/main.py (main): Remove call to ShowLegend.
733    
734            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
735    
736            * Thuban/UI/renderer.py: Check for gdal support before importing
737            gdalwarp.
738            (MapRenderer.render_map): Only try to optimize if we have gdal
739            support otherwise nothing will get drawn.
740    
741            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
742            during startup before a map has been created. Check if map is None
743            before using it and do nothing if it is.
744    
745    2003-06-17  Jonathan Coles   <[email protected]>
746    
747            Fix the problem with raster layers under Windows that caused
748            Thuban to crash. The view should respond to layer projection
749            changed events to update the display. Changes to a projection
750            should not cause the map to be set to full extent.
751            
752            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
753            current_map_proj to remember the current map projection so that
754            when the projection changes we know what the previous projection
755            was.
756            (MapCanvas.SetMap): Unsubscribe and subscribe to
757            LAYER_PROJECTION_CHANGED events.
758            (MapCanvas.projection_changed): Split into two methods that respond
759            to map and layer projection changes.
760            (MapCanvas.map_projection_changed): New. Takes the current view and
761            projects it using the new projection. This does not cause the
762            map to be redrawn at full extent.
763            (MapCanvas.layer_projection_changed): New. Cause a redraw which
764            will draw each layer in its new projection.
765            
766            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
767            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
768            under Windows.
769            
770            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
771            to twice sizeof(void*) because there are two digits for each
772            hex byte.
773    
774    2003-06-16  Bernhard Herzog  <[email protected]>
775    
776            Update to the layer interface: Direct access to the table,
777            shapetable, shapefile and filename attributes is now actively
778            deprecated by issuing deprecation warnings for all places where
779            this happens.
780    
781            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
782            to the instance variables table, shapetable, shapefile and
783            filename via __getattr__ so that we can issue a deprecation
784            warning.
785            (Layer.SetShapeStore): Don't set the deprecated instance variables
786            any more
787            (Layer.SetShapeStore): Don't use deprecated layer instance
788            variables
789            (Layer.Destroy): No need to explicitly remove the instance
790            variables any more
791            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
792            instance variables
793    
794            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
795            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
796            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
797            use deprecated layer instance variables
798    
799            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
800            deprecated layer instance variables
801    
802            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
803            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
804            instance variables
805    
806            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
807            deprecated layer instance variables
808    
809            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
810            deprecated layer instance variables
811    
812            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
813            deprecated layer instance variables
814    
815            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
816            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
817            variables
818    
819            * test/runtests.py (main): Turn Thuban's deprecation warnings into
820            errors so that they're cought by the tests
821    
822            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
823            layer instance variables
824    
825    2003-06-16  Jonathan Coles   <[email protected]>
826    
827            Fix a problem under Windows whereby if the user double-clicks on a
828            layer in the legend that tree item will expand or collapse as well
829            as open the layer properties dialog. The state of the tree item
830            should not be affected.
831    
832            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
833            preventExpandCollapse and subscribe to expanding and collapsing
834            events.
835            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
836            collapsing events and will veto the event if it has been triggered
837            by the user double clicking on a layer.
838            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
839            that an expanding/collapsing event should be vetoed.
840    
841    2003-06-13  Bernhard Herzog  <[email protected]>
842    
843            * Thuban/UI/classifier.py (Classifier.OnClose)
844            (Classifier.map_layers_removed)
845            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
846            in OnClose and not in map_layers_removed or
847            layer_shapestore_replaced to make sure it always happens when the
848            dialog is closed
849    
850    2003-06-13  Jonathan Coles   <[email protected]>
851    
852            This puts back a fix for Windows where a panel is needed so that
853            the background of the table view appears correctly.
854    
855            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
856            object that can be used by derived classes to place any
857            controls (including the grid) onto.
858            (QueryTableFrame.__init__): Use the panel as the parent window
859            for all the controls. Reparent the grid so that the panel is
860            the parent. Call UpdateStatusText() to correctly initialize
861            the status bar.
862    
863    2003-06-13  Jonathan Coles   <[email protected]>
864    
865            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
866            from wxFrame (as opposed to wxDialog like the other classes)
867            but otherwise behaves like the other classes. This is needed
868            for the TableView which isn't really a dialog and needs to
869            have a status bar and control buttons.
870    
871            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
872            instance variable to keep track of how many rows are selected.
873            Subscribe once to the the events we are interested in.
874            (ThubanGrid.OnRangeSelect): Only handle event if event handling
875            hasn't been turned off.
876            (ThubanGrid.OnSelectCell): Only handle event if event handling
877            hasn't been turned off.
878            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
879            as an event listener (which changes the event handler stack)
880            simply set an instance variable to False. This is checked in
881            the event handlers.
882            (ThubanGrid.GetNumberSelected): Return the number of currently
883            selected rows.
884            (TableFrame): Inherit from ThubanFrame so we can have a
885            status bar and control buttons.
886            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
887            Explicitly set which items are selected in the operator choice and
888            action choice so there is always a valid selection. Fixes RTbug #1941.
889            Subscribe to grid cell selection events so we can update the
890            status bar.
891            (QueryTableFrame.UpdateStatusText): Update the status bar with
892            how many rows are in the grid, how many columns, and how many
893            rows are selected.
894            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
895            Call UpdateStatusText when cells are (de)selected.
896            (QueryTableFrame.OnQuery): Use the string value in the value
897            combo if either the selected item index is 0 or if the string
898            cannot be found in the predefined list (this happens if the
899            user changes the text). Fixes RTbug #1940.
900            Only turn off the grid event listeners if there a query comes
901            back with a none empty list of ids. in the case that the list
902            is empty this causes a grid.ClearSelection() call to actually
903            clear the grid selection which causes the selected items in
904            the map to be deselected. Fixes RTbug #1939.
905    
906            * test/test_save.py (XMLWriterTest.Encode): Check return values.
907            Fixes RTbug #1851.
908    
909    2003-06-13  Bernhard Herzog  <[email protected]>
910    
911            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
912            self.selected_shape with the current selection to make sure the
913            contents of the dialog are up to date when it's shown for the
914            first time.
915            The dialog used to work without this by luck. The recent fix to
916            the connector module 'broke' a 'feature' the identify view was
917            relying on, i.e that subscribing to a message in response to
918            receiving a message of that type would mean that the new
919            subscriber would also be called for the same message.
920            
921    2003-06-12  Jonathan Coles   <[email protected]>
922    
923            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
924            the image is rendered. Fixes RTbug #1937.
925    
926    2003-06-12  Jonathan Coles   <[email protected]>
927    
928            * Thuban/Lib/fileutil.py: As is done under Windows, create the
929            user directory if it doesn't exist on a posix system.
930            Fixes RTbug #1815.
931    
932            * Thuban/Model/resource.py (get_user_proj_files): Moved the
933            called to get_application_dir here, so that the directory
934            will only be called if this method is invoked.
935    
936            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
937            the projfilepath if no projection is selected.
938    
939    2003-06-12  Jonathan Coles   <[email protected]>
940    
941            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
942            the scalebar if the current map has no projection set.
943    
944            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
945            projfilepath label to just the basename of the projection file
946            rather than include the entire path.
947    
948            * Thuban/Model/resource.py: Fix missed proj functions that
949            needed to be renamed.
950    
951    2003-06-12  Jonathan Coles   <[email protected]>
952    
953            * Thuban/Model/classification.py: Removed assert statements that
954            tested if the variable was an instance of Color.
955    
956            * Thuban/Model/color.py (Color): Remove commented code that isn't
957            used.
958            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
959            Fixes RTbug #1835.
960            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
961            Needed now that the class doesn't inherit from Color.
962    
963    2003-06-12  Jonathan Coles   <[email protected]>
964    
965            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
966            check unicode strings.
967    
968            * test/test_layer.py: Check for existence of gdal.
969    
970    2003-06-12  Jonathan Coles   <[email protected]>
971        
972            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
973            that was in load.py
974    
975            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
976            that was in save.py
977    
978    2003-06-12  Jonathan Coles   <[email protected]>
979    
980            This is largely a collection of bug fixes. We also handle the
981            case where gdal is not on the system. The XMLReader and XMLWriter
982            classes were moved into there own files to resolve some circular
983            import references and because they shouldn't really be in the
984            file that is dediciated to reading/writing session files since
985            they are also used elsewhere.
986    
987            * Thuban/Model/classgen.py: Renamed functions to follow the
988            function_names_with_underscores style. Fixes RTbug #1903.
989            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
990    
991            * Thuban/Model/layer.py: Import gdal only if it available.
992            (RasterLayer): Handle the case where the gdal library is unavailable.
993            Addresses RTbug #1877.
994    
995            * Thuban/Model/load.py (XMLReader): Moved into seperate file
996            xmlreader.py.
997    
998    2003-06-12  Jonathan Coles   <[email protected]>
999    
1000            This is largely a collection of bug fixes. We also handle the
1001            case where gdal is not on the system. The XMLReader and XMLWriter
1002            classes were moved into there own files to resolve some circular
1003            import references and because they shouldn't really be in the
1004            file that is dediciated to reading/writing session files since
1005            they are also used elsewhere.
1006    
1007            * Thuban/Model/classgen.py: Renamed functions to follow the
1008            function_names_with_underscores style. Fixes RTbug #1903.
1009            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
1010    
1011            * Thuban/Model/layer.py: Import gdal only if it available.
1012            (RasterLayer): Handle the case where the gdal library is unavailable.
1013            Addresses RTbug #1877.
1014    
1015            * Thuban/Model/load.py (XMLReader): Moved into seperate file
1016            xmlreader.py.
1017    
1018            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
1019            file xmlwriter.py.
1020    
1021            * Thuban/Model/resource.py: Renamed functions to following the
1022            function_names_with_underscores style.
1023            (has_gdal_support): New function that returns true if the gdal
1024            library is available. Addresses RTbug #1877.
1025    
1026            * Thuban/UI/application.py (ThubanApplication.OpenSession):
1027            Display a message box if the gdal library is not available, but
1028            only if there are any layers that would use it. Addresses RTbug #1877.
1029    
1030            * Thuban/UI/classgen.py: Use renamed projection resource functions.
1031            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
1032            when using integers versus floats.
1033    
1034            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
1035            determine if the "Add Image Layer" menu option should be
1036            greyed out or not. Addresses RTbug #1877.
1037    
1038            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
1039    
1040            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
1041            optimize if a raster layer is visible. Fixes RTbug #1931.
1042            Only draw the raster layer if the gdal library is available.
1043            Addresses RTbug #1877.
1044    
1045            * test/test_classgen.py: Add tests for generate_singletons,
1046            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
1047            (test_calculate_quantiles): Fix some tests to catch the new
1048            ValueError that is raised.
1049    
1050            * test/test_proj.py: Use renamed projection resource functions.
1051    
1052            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
1053            test for saving classified layers. Fixes RTbug #1902.
1054            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
1055    
1056    2003-06-12  Jan-Oliver Wagner <[email protected]>
1057    
1058            Fix for http://intevation.de/rt/webrt?serial_num=1900.
1059    
1060            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
1061    
1062            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
1063            multiplechoicedialog.py rather than from the wxPython library.
1064    
1065    2003-06-11  Frank Koormann  <[email protected]>
1066    
1067            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
1068            update.
1069    
1070    2003-06-11  Frank Koormann  <[email protected]>
1071    
1072            * Thuban/Lib/fileutil.py (get_application_dir): New function to
1073            determine the absolute .thuban/thuban directory under
1074            "posix" (os.expanduser) and "nt" (read AppData registry key).
1075    
1076            * Thuban/Model/resource.py: Use get_application_dir
1077    
1078            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1079            Use get_application_dir.
1080    
1081    2003-06-10  Bernhard Herzog  <[email protected]>
1082    
1083            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
1084            the messages MAP_LAYERS_REMOVED messages
1085            (LayerTableFrame.OnClose): Unsubscribe from it.
1086            (LayerTableFrame.map_layers_removed): New. Receiver for
1087            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
1088            dialog is showing is removed.
1089    
1090    2003-06-10  Bernhard Herzog  <[email protected]>
1091    
1092            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
1093            of the receivers list so that unsubscribing in a receiver doesn't
1094            modify it while iterating over it.
1095    
1096            * test/test_connector.py
1097            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
1098            unsubscribing in a receiver works correctly. See docstring for
1099            details
1100    
1101    2003-06-10  Bernhard Herzog  <[email protected]>
1102    
1103            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
1104            message.
1105    
1106            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
1107            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
1108            LAYER_CHANGED will still be sent if the classification changes.
1109    
1110            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
1111            parameter so we can subscribe to some of its messages
1112            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
1113            and the layer's LAYER_SHAPESTORE_REPLACED
1114            (Classifier.unsubscribe_messages): New. Unsubscribe from message
1115            subscribed to in __init__
1116            (Classifier.map_layers_removed)
1117            (Classifier.layer_shapestore_replaced): receivers for the messages
1118            subscribed to in __init__. Unsubscribe and close the dialog
1119    
1120            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
1121            the map to the Classifier dialog
1122    
1123            * test/test_layer.py (SetShapeStoreTests): Derive from
1124            SubscriberMixin as well so we can test messages
1125            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
1126            messages
1127            (SetShapeStoreTests.tearDown): Clear the messages again
1128            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
1129            for the modified flag too
1130            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
1131            to check whether SetShapeStore sets the modified flag
1132            (SetShapeStoreTests.test_set_shape_store_different_field_name)
1133            (SetShapeStoreTests.test_set_shape_store_same_field)
1134            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
1135            Add tests for the messages. This checks both the new
1136            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
1137    
1138    2003-06-06  Jan-Oliver Wagner <[email protected]>
1139    
1140            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
1141            the menu items.
1142    
1143    2003-06-05  Frank Koormann  <[email protected]>
1144    
1145            * Thuban/UI/identifyview.py (IdentifyView.__init__):
1146            Layout reimplemented without panel. Make life easier to fit the list
1147            in the dialog.
1148    
1149    2003-06-05  Frank Koormann  <[email protected]>
1150    
1151            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
1152            once on initialisation (Former implementation resulted in multiple
1153            entries for each projection).
1154            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
1155            if set, select the projection found under the specified name. This
1156            overwrites any other selection estimate.
1157            Removed projchoice filling from this method.
1158            (ProjFrame._OnSave, ProjFrame._OnAddToList):
1159            Updated call of ProjFrame.__FillAvailList
1160            (LCCPanel._DoLayout): Moved parameter controls in more common order.
1161    
1162            * Resources/Projections/defaults.proj: Extended defaults representing
1163            various common European projections.
1164    
1165    2003-06-05  Frank Koormann  <[email protected]>
1166    
1167            * Thuban/UI/identifyview.py (IdentifyView.__init__):
1168            Use ListCtrl instead of GridCtrl
1169    
1170            * Thuban/Model/resource.py:
1171            Guess location of .thuban directory from tempdir parent directory.
1172    
1173            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1174            Guess location of .thuban directory from tempdir parent directory.
1175    
1176    2003-06-04  Bernhard Herzog  <[email protected]>
1177    
1178            Do not cache the values returned by the tree widget's
1179            GetFirstChild and GetNextChild methods because it led to lots of
1180            segfaults. The new way requires more brute force but is more
1181            reliable.
1182    
1183            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
1184            variable layer2id
1185            (LegendTree.find_layer): New method to do with brute force what
1186            layer2id tried to accomplish
1187            (LegendTree._OnMsgLayerChanged)
1188            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
1189            Use find_layer instead of layer2id
1190            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
1191            update layer2id anymore
1192            (LegendTree._OnMsgMapLayersRemoved)
1193            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
1194    
1195    2003-06-03  Thomas Koester  <[email protected]>
1196    
1197            * Thuban/Model/classgen.py (GenQuantiles0): New function.
1198    
1199    2003-06-02  Bernhard Herzog  <[email protected]>
1200    
1201            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
1202            New commands.
1203            (main_menu): Add the new commands.
1204            (MainWindow.TableRename): New. Implementation of the table_rename
1205            command.
1206            (MainWindow.RenameLayer): New. Implementation of the layer_rename
1207            command.
1208    
1209            * Thuban/Model/session.py (Session.AddTable): call self.changed to
1210            set the modified flag
1211    
1212            * test/test_session.py (TestSessionSimple.test_add_table): Test
1213            whether the modified flag is set properly
1214    
1215            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
1216            instead of issue so that the modified flags get updated.
1217    
1218            * test/test_base.py (SomeTitledObject): Derive from Modifiable
1219            instead of Publisher to reflect reality better and to accomodate
1220            the fact that SetTitle now calls changed instead of issue
1221    
1222    2003-06-02  Bernhard Herzog  <[email protected]>
1223    
1224            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
1225            acquisition has to happen before the try in a try-finally.
1226    
1227    2003-06-02  Bernhard Herzog  <[email protected]>
1228    
1229            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
1230            possible that a layer is removed that is not currently selected in
1231            the legend so don't check for this.
1232    
1233    2003-05-30  Bernhard Herzog  <[email protected]>
1234    
1235            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
1236            variables to None that have direct or indirect references to
1237            shapefiles or dbf files to make sure that they do go away and the
1238            files are closed.
1239    
1240    2003-05-30  Bernhard Herzog  <[email protected]>
1241    
1242            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
1243            availImgListIndices when a new image list is created
1244            
1245    2003-05-30  Bernhard Herzog  <[email protected]>
1246    
1247            * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
1248            changing_selection to indicate whether the LegendTree code itself
1249            is currently changing the selection
1250            (LegendTree.normalize_selection): New method to normalize the
1251            selection by selecting the layer item even if the user clicked on
1252            the classification.
1253            (LegendTree._OnSelChanged): normalize the selection. This works
1254            around a bug in wx which doesn't keep track of the selection
1255            properly when subtrees are deleted.
1256    
1257    2003-05-30  Bernhard Herzog  <[email protected]>
1258    
1259            * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
1260            maximum and minimum scale factors.
1261    
1262            * test/test_classgen.py (ClassGenTest.test): Update to reflect the
1263            changes in classgen.py
1264    
1265    2003-05-30  Jonathan Coles   <[email protected]>
1266    
1267            * Thuban/Model/classgen.py: Remove ClassGenerator class but make
1268            all the methods functions. Fixes RTBug #1903.
1269    
1270            * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
1271            to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
1272            RTBug #1907.
1273    
1274            * Thuban/UI/classgen.py: Use classgen functions that were part
1275            of the ClassGenerator class. Put try/finally blocks around
1276            code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
1277            RTBug #1904.
1278    
1279            * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
1280    
1281            * Thuban/UI/legend.py: The legend was cleared and repopulated any
1282            time something changed which caused some state to be lost such
1283            as which children were expanded or collapsed. Fixes RTBug #1901.
1284            (LegendTree._OnMsgMapLayersAdded): Add only new layers.
1285            (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
1286            the legend but not in the map.
1287            (LegendTree.__FillTree): Move main functionality out into smaller
1288            methods that can be used by other methods.
1289            (LegendTree.__FillTreeLayer): Reuse old slots in the image list
1290            if they are available.
1291            (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
1292            that we override the wxTreeCtrl method. Iterate over children
1293            and call __RemoveLayer.
1294            (LegendTree.__AddLayer): New. Add a new layer to the legend.
1295            (LegendTree.__RemoveLayer): Remove a layer from the legend.
1296            (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
1297            Should only be called with the id of a layer branch.
1298            (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
1299            Returns the root item or creates one if necessary.
1300    
1301            * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
1302            ProjectRasterFile with tuple arguments instead of strings.
1303    
1304            * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
1305            with try/finally. Fixes RTBug #1904.
1306    
1307            * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
1308            with try/finally. Fixes RTBug #1904.
1309            (MapCanvas.FitSelectedToWindow): If a single point is selected
1310            simply center it on the display. Fixes RTBug #1849.
1311    
1312            * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
1313            to be compiled as a standalone app. Now the code can only be
1314            called from Python which simplifies the parameter passing.
1315            (ProjectRasterFile): Handle Python arguments. Remove code that
1316            checks for a destination dataset. Add more clean up code.
1317    
1318            * test/test_map.py (TestMapWithContents.test_raise_layer_top,
1319            TestMapWithContents.test_lower_layer_bottom):
1320            Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
1321            Fixes RTBug #1907.
1322    
1323            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
1324            extent to the map when the legend is toggled. Fixes RTBug #1881.
1325    
1326    2003-05-29  Jan-Oliver Wagner <[email protected]>
1327    
1328            * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
1329            unsubscribes all that is subcribed in __init__.
1330    
1331    2003-05-28  Bernhard Herzog  <[email protected]>
1332    
1333            * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
1334            (MainWindow.CanDuplicateLayer): New methods to implement the
1335            Layer/Duplicate command.
1336            (layer_duplicate command): New.
1337            (main_menu): Add layer_duplicate to the Layer menu.
1338    
1339    2003-05-28  Bernhard Herzog  <[email protected]>
1340    
1341            * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
1342            renderer so that NULL/None values get displayed differently (by a
1343            gray rectangle).
1344            (TableGrid.__init__): Override the default renderers
1345    
1346    2003-05-28  Bernhard Herzog  <[email protected]>
1347    
1348            * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
1349            classification to "None" if the type of the field has changed.
1350    
1351            * test/test_layer.py (SetShapeStoreTests): New. Class with a few
1352            test for the Layer.SetShapeStore method
1353    
1354    2003-05-28  Jan-Oliver Wagner <[email protected]>
1355    
1356            * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
1357            does not necessarily have a filename).
1358    
1359    2003-05-28  Jan-Oliver Wagner <[email protected]>
1360    
1361            * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
1362            sort the selection list for the dialog.
1363    
1364    2003-05-28  Frank Koormann  <[email protected]>
1365    
1366            * extensions/thuban/wxproj.cpp
1367            (project_point): Removed cast to int for projected point coordinates.
1368            (shape_centroid): Return last point if all polygon vertices fall
1369            to one point.
1370    
1371    2003-05-28  Bernhard Herzog  <[email protected]>
1372    
1373            * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
1374            with layers that don't have shapestores, i.e. raster layers.
1375    
1376    2003-05-28  Bernhard Herzog  <[email protected]>
1377    
1378            * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
1379            when determining the title from the filename.
1380    
1381            * test/test_dbf_table.py (TestDBFTable.test_title): Update to
1382            reflect changes in the way the title is derived from the filename
1383    
1384    2003-05-28  Frank Koormann  <[email protected]>
1385    
1386            * Thuban/UI/mainwindow.py (MainWindow.TableShow):
1387            Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
1388    
1389    2003-05-27  Bernhard Herzog  <[email protected]>
1390    
1391            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
1392            delegate SelectedLayer.
1393            (MainWindow.LayerUnjoinTable): Implement.
1394            (_can_unjoin): New. Helper function for the sensitivity of the
1395            layer/unjoin command.
1396    
1397            * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
1398            (DerivedShapeStore.OrigShapeStore): New. Return the original
1399            shapestore. Used to figure out how to unjoin.
1400            (DerivedShapeStore.Shapefile): Fix a typo.
1401    
1402    2003-05-27  Bernhard Herzog  <[email protected]>
1403    
1404            * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
1405            well
1406            (JoinDialog.__init__): Use the layer parameter and only build the
1407            left choice when a layer is given
1408            (JoinDialog.OnJoin): Handle layer joins as well
1409            (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
1410            that the user selects the "Select..." item. The sensitivitly
1411            updating is now in update_sensitivity
1412            (JoinDialog.y): New method to refactor the sensitivity update of
1413            the join button into its own method.
1414    
1415            * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
1416    
1417    2003-05-27  Bernhard Herzog  <[email protected]>
1418    
1419            * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
1420            iff there are unreferenced tables in the session
1421    
1422    2003-05-27  Bernhard Herzog  <[email protected]>
1423    
1424            * Thuban/Model/messages.py (TABLE_REMOVED): New message.
1425    
1426            * Thuban/Model/session.py (Session.UnreferencedTables): New method
1427            to return tables that are not referenced by other tables or shape
1428            stores and can be removed.
1429            (Session.RemoveTable): Issue a TABLE_REMOVED message after
1430            removing the table
1431    
1432            * Thuban/UI/mainwindow.py: Remove unused imports
1433            (MainWindow.TableClose): Implement.
1434    
1435            * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
1436            messages so that the frame will be automatically closed when a new
1437            session is opened or the table is removed.
1438            (TableFrame.OnClose): Unsubscribe the Subscriptions made in
1439            __init__
1440            (TableFrame.close_on_session_replaced)
1441            (TableFrame.close_on_table_removed): New. Subscribers that close
1442            the window
1443    
1444            * test/test_session.py (TestSessionMessages.test_remove_table)
1445            (TestSessionSimple.test_remove_table): Move the test to
1446            TestSessionSimple and add test for the TABLE_REMOVED message
1447            (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
1448            (TestSessionSimple.test_unreferenced_tables) New. Test for the
1449            UnreferencedTables method.
1450            (UnreferencedTablesTests): New. Class with some more sophisticated
1451            tests for UnreferencedTables.
1452    
1453    2003-05-27  Frank Koormann  <[email protected]>
1454    
1455            * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
1456            display has some unwanted side effects. Removed again.
1457    
1458    2003-05-27  Frank Koormann  <[email protected]>
1459    
1460            * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
1461    
1462            * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
1463    
1464    2003-05-27  Jan-Oliver Wagner <[email protected]>
1465    
1466            * test/test_menu.py (MenuTest.test): Added test for
1467            Menu.RemoveItem().
1468    
1469            * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
1470            the menu.
1471    
1472    2003-05-27  Frank Koormann  <[email protected]>
1473            
1474            Nonmodal dialogs without parent (i.e. they can fall behind the main
1475            window)
1476    
1477            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
1478            all dialogs in the dialogs dictionary and the canvas.
1479    
1480            * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
1481            parent, i.e. can fall behind other windows.
1482            (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
1483            dictionary before removing it.
1484    
1485            * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
1486    
1487            * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
1488            * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
1489            * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
1490    
1491    2003-05-27  Bernhard Herzog  <[email protected]>
1492    
1493            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
1494            tableview dialog
1495            (MainWindow.TableShow): Use ShowTableView to open the dialogs.
1496            Also, don't use the table's titles as the dialog names. The titles
1497            aren't guaranteed to be unique.
1498            (MainWindow.TableOpen): Open a table view dialog after opening the
1499            table
1500    
1501    2003-05-27  Bernhard Herzog  <[email protected]>
1502    
1503            * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
1504            effect can be achieved by simply closing the window showing the
1505            table.
1506            (MainWindow.TableHide): Removed.
1507            (main_menu): Removed "table_hide"
1508    
1509    2003-05-27  Frank Koormann  <[email protected]>
1510    
1511            Fix legend tree display problems under Win32
1512    
1513            * Thuban/UI/legend.py:  BMP_SIZE_W = 15
1514            (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
1515            (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
1516    
1517            * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
1518    
1519    2003-05-27  Jan-Oliver Wagner <[email protected]>
1520    
1521            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
1522            'after' now allows to insert separators almost anywhere in the menu.
1523    
1524    2003-05-27  Frank Koormann  <[email protected]>
1525    
1526            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
1527            "S" of selection box label to hint on hot key (Alt-S). Works under
1528            Win32 but is ignored under GTK.
1529    
1530    2003-05-26  Frank Koormann  <[email protected]>
1531    
1532            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
1533            Center Choices.
1534    
1535    2003-05-26  Bernhard Herzog  <[email protected]>
1536    
1537            Remove the Precision methods again. They're too DBF specific to be
1538            part of the table interface and they're only used in table_to_dbf
1539            anyway.
1540            
1541            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
1542            fixed precision of 12 for doubles.
1543            (TransientTableBase.Precision): Removed
1544            (AutoTransientTable.Width): Delegate to self.table.
1545    
1546            * Thuban/Model/table.py (DBFTable.Precision)
1547            (MemoryTable.Precision): Removed.
1548            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
1549            (table_to_dbf): Use a fixed precision of 12 for floats unless the
1550            column object specifies something else.
1551    
1552            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
1553            test for table_to_dbf
1554    
1555    2003-05-26  Bernhard Herzog  <[email protected]>
1556    
1557            * test/test_transientdb.py
1558            (TestTransientTable.run_iceland_political_tests): Fix a comment.
1559    
1560    2003-05-26  Bernhard Herzog  <[email protected]>
1561    
1562            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
1563            implementation. Mark parts of the file format strings for
1564            localization.
1565    
1566            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
1567            file and add the table to the tables managed by the session
1568    
1569            * test/test_session.py (TestSessionSimple.test_open_table_file):
1570            New. test case for OpenTableFile
1571    
1572    2003-05-26  Jan-Oliver Wagner <[email protected]>
1573    
1574            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
1575            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
1576            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
1577            Replace the true/false of wxWindows by True/False of Python 2.2.1.
1578    
1579    2003-05-26  Jan-Oliver Wagner <[email protected]>
1580    
1581            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
1582            already a selection present, update the grid accordingly.
1583    
1584            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
1585            resizeable and increase its initial size.
1586    
1587    2003-05-26  Frank Koormann  <[email protected]>
1588    
1589            Table export functionality
1590    
1591            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
1592            Return width (in characters) for a column.
1593            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
1594            (table_to_dbf): Write table to dbf file.
1595            (table_to_csv): Write table to csv file.
1596    
1597            * Thuban/Model/transientdb.py (TransientTableBase.Width,
1598            TransientTableBase.Precision): Return column width and precision.
1599    
1600            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
1601            or table_to_csv depending on file selection.
1602    
1603            * test/test_dbf_table.py:
1604            Test table_to_dbf (extension of former part of test).
1605    
1606            * test/test_csv_table.py:
1607            Test table_to_csv.
1608    
1609    2003-05-23  Jan-Oliver Wagner <[email protected]>
1610    
1611            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
1612            Use QueryTableFrame instead of TableFrame.
1613    
1614            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
1615            table window with 'Layer Table:' instead of 'Table:'.
1616    
1617    2003-05-23  Jan-Oliver Wagner <[email protected]>
1618    
1619            Give all tables a title via mix-in TitledObject.LayerShowTable
1620    
1621            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
1622            only if it exists.
1623    
1624            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
1625            and call its init-method with a default title. Remove Title() method.
1626    
1627            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
1628            AutoTransientTable): mix-in TitledObject and call its init-method with
1629            a default title. Remove Title() method.
1630    
1631    2003-05-23  Bernhard Herzog  <[email protected]>
1632    
1633            * Thuban/Model/session.py (Session.AddShapeStore): Define
1634            AddShapeStore analogously to AddTable.
1635    
1636            * test/test_session.py (TestSessionSimple.test_add_shapestore):
1637            New. Test for AddShapeStore
1638    
1639    2003-05-23  Jan-Oliver Wagner <[email protected]>
1640    
1641            Introducing QueryTableFrame and a very coarse ShowTable implementation.
1642    
1643            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
1644            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
1645            The latter implements the selection GUI without dependency on a layer.
1646            LayerTableFrame now is derived from QueryTableFrame and connects
1647            to a layer.
1648    
1649            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
1650            implementation that still needs work.
1651    
1652            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
1653    
1654    2003-05-22  Frank Koormann  <[email protected]>
1655    
1656            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
1657            Added "outer_join = False" as optional parameter.
1658            (TransientJoinedTable.create): If outer join is true, perform a
1659            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
1660            the left table. Records not matching are filled with 0 / None.
1661    
1662            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
1663            (JoinDialog.OnJoin): Consider outer join check box.
1664    
1665    2003-05-22  Bernhard Herzog  <[email protected]>
1666    
1667            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
1668            somewhat safer way. Storing the traceback in a local variable can
1669            lead to memory leaks
1670    
1671    2003-05-22  Bernhard Herzog  <[email protected]>
1672    
1673            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
1674            the wxMessageDialog's Destroy() method.
1675    
1676    2003-05-22  Frank Koormann  <[email protected]>
1677    
1678            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
1679            TransientTable.Title()
1680    
1681    2003-05-22  Frank Koormann  <[email protected]>
1682    
1683            Join Dialog, initial version.
1684    
1685            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
1686    
1687            * Thuban/UI/join.py (JoinDialog): Functional implementation of
1688            former framework. Renamed Table1/Table2 to LeftTable/RightTable
1689            in all occurences.
1690    
1691            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
1692            Typo fixed.
1693    
1694    2003-05-22  Bernhard Herzog  <[email protected]>
1695    
1696            Give the tables titles so that the GUI can display more meaningful
1697            names. For now the titles are fixed but depend on e.g. filenames
1698            or the titles of the joined tables.
1699    
1700            * Thuban/Model/transientdb.py (TransientTable.Title)
1701            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
1702    
1703            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
1704    
1705            * test/test_transientdb.py
1706            (TestTransientTable.test_auto_transient_table_title): New. Test
1707            for the Title method
1708            (TestTransientTable.test_transient_joined_table)
1709            (TestTransientTable.test_transient_table): Add test for the Title
1710            methods
1711    
1712            * test/test_memory_table.py (TestMemoryTable.test_title): New.
1713            Test for the Title method
1714    
1715            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
1716            the Title method
1717    
1718    2003-05-22  Bernhard Herzog  <[email protected]>
1719    
1720            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
1721            Provide a better way to destroy the layers
1722            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
1723            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1724            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
1725            the new way to destroy the layers.
1726            (TestLayer.test_derived_store): New. Test for using a layer with a
1727            DerivedShapeStore
1728    
1729            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
1730            filename if the shape store actually has one.
1731    
1732    2003-05-22  Bernhard Herzog  <[email protected]>
1733    
1734            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
1735            for the filename
1736    
1737            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
1738            for the FileName method
1739            (TestDBFTableWriting.test_write): Fix spelling of filename
1740    
1741    2003-05-22  Thomas Koester  <[email protected]>
1742    
1743            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
1744            from SciParam that now really is immutable.
1745    
1746    2003-05-22  Frank Koormann  <[email protected]>
1747    
1748            Layer Top/Bottom placement added to legend.
1749    
1750            * Thuban/UI/legend.py
1751            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
1752            bound to tool events.
1753            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
1754            New, methods binding the event methods with the map methods.
1755    
1756            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
1757            layer at top/bottom of layer stack.
1758    
1759            * Resources/Bitmaps/top_layer.xpm: New button icon.
1760    
1761            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
1762    
1763    2003-05-22  Bernhard Herzog  <[email protected]>
1764    
1765            * Thuban/Model/session.py (Session.RemoveTable): New method to
1766            remove tables
1767    
1768            * test/test_session.py (TestSessionSimple.test_remove_table): New.
1769            Test for RemoveTable
1770    
1771    2003-05-22  Thomas Koester  <[email protected]>
1772    
1773            * Thuban/Model/classgen.py: Added short module doc string and CVS id.
1774            (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
1775    
1776    2003-05-22  Bernhard Herzog  <[email protected]>
1777    
1778            Implement a way to discover dependencies between tables and
1779            shapestores.
1780    
1781            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
1782            (TransientJoinedTable.Dependencies)
1783            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
1784            interface
1785            (TransientJoinedTable.__init__): Keep tack of the original table
1786            objects in addition to the corresponding transient tables.
1787    
1788            * Thuban/Model/table.py (DBFTable.Dependencies)
1789            (MemoryTable.Dependencies): New. Implement the dependencies
1790            interface
1791    
1792            * Thuban/Model/data.py (ShapeTable): New. Helper class for
1793            ShapefileStore
1794            (ShapefileStore.__init__): Use ShapeTable instead of
1795            AutoTransientTable
1796            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
1797            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
1798            methods for filename and type
1799            (ShapefileStore.Dependencies): New. Implement the dependencies
1800            interface
1801            (DerivedShapeStore): New class to replace SimpleStore. The main
1802            difference to SimpleStore is that it depends not on a shapefile
1803            but another shapestore which expresses the dependencies a bit
1804            better
1805            (SimpleStore.__init__): Add deprecation warning.
1806    
1807            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
1808            Test for the Dependencies method.
1809    
1810            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
1811            New. Test for the Dependencies method.
1812    
1813            * test/test_transientdb.py
1814            (TestTransientTable.test_auto_transient_table_dependencies): New.
1815            Test for the Dependencies method.
1816            (TestTransientTable.test_transient_joined_table): Add test for the
1817            Dependencies method.
1818    
1819            * test/test_session.py (TestSessionSimple.setUp)
1820            (TestSessionSimple.tearDown): New. Implement a better way to
1821            destroy the sessions.
1822            (TestSessionSimple.test_initial_state)
1823            (TestSessionSimple.test_add_table): Bind session to self.session
1824            so that it's destroyed by tearDown
1825            (TestSessionSimple.test_open_shapefile): New. Test for
1826            OpenShapefile and the object it returns
1827    
1828    2003-05-22  Bernhard Herzog  <[email protected]>
1829    
1830            * Thuban/Model/session.py (Session.AddTable): New method to
1831            register tables with the session.
1832            (Session.Tables): Return the tables registered with AddTable too.
1833    
1834            * test/test_session.py (TestSessionSimple.test_add_table): New.
1835            Test case for the AddTable method
1836    
1837    2003-05-22  Frank Koormann  <[email protected]>
1838    
1839            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
1840            lower right corner, center labels for selections, initialize controls
1841            in reasonable order for keyboard navigation.
1842    
1843            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
1844            (ProjFrame.__DoOnProjAvail): Determine position of current projection
1845            using the wxListBox.FindString() method. Still a problem (#1886)
1846    
1847            * Thuban/UI/classifier.py
1848            (Classifier.__init__, SelectPropertiesDialog.__init__)
1849    
1850            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
1851            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
1852            different classification types from here to __init__.
1853            (GenUniquePanel.__init__): Set the column width of the first field
1854            in the Field ListCtrl to the full width.
1855    
1856            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
1857            Button to 'Export'. Center Buttons in Selection Box, set Focus to
1858            Grid.
1859            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
1860            changes focus to the Selection when pressing "Alt-S".
1861    
1862            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
1863            the text if not visible. The italic font sometimes exceeds the
1864            rendering area.
1865    
1866    2003-05-21  Jonathan Coles   <[email protected]>
1867    
1868            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
1869            to OnClose so that Thuban closes correctly.
1870    
1871            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
1872            DockFrame.OnClose, not DockFrame._OnClose.
1873    
1874    2003-05-21  Jonathan Coles   <[email protected]>
1875    
1876            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
1877            references to 'inf' and use new Range __init__ to pass floats
1878            directly rather than converting them to strings first.
1879            Fixes RTBug #1876.
1880    
1881            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
1882            Use new Range ___init__ to pass floats.
1883    
1884            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
1885            filename is a valid image file. Throw IOError otherwise.
1886    
1887            * Thuban/Model/range.py: Brought over new Range from SciParam that
1888            is immutable and has an __init__ which can accept floats.
1889    
1890            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
1891            into try block. AddLayer doesn't throw any exceptions anymore.
1892            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
1893            try block.
1894    
1895            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
1896            the first item in choices. Fixes RTBug #1882.
1897    
1898            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
1899            has gone to 0 which is a serious problem. abort.
1900            (MapRenderer.draw_raster_layer): Catch IOError seperately and
1901            print the error from GDAL.
1902    
1903            * Thuban/UI/tableview.py (TableGrid.__init__): Call
1904            ToggleEventListeners to turn on listening.
1905            (TableGrid.ToggleEventListeners): New. Turns event listening on
1906            and off so as to prevent excessive messages.
1907            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
1908            to suppress excessive messages when selecting many rows.
1909            Fixes RTBug #1880.
1910    
1911            * Thuban/UI/view.py: Added checks against if scale == 0. This
1912            is a serious problem that can occur when an image without
1913            geo data is loading and causes the map projection bounds to
1914            go to infinity. Right now, the solution is to simply try
1915            to recover.
1916    
1917            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
1918            to set the MFILEReceiver attributes even if the data is NULL.
1919    
1920            * extensions/thuban/gdalwarp.cpp: Improved the error handling
1921            and passed GDAL messages back up to the Python layer. Also
1922            tried to fix some memory leaks that were present in the original
1923            utility but didn't matter because the program aborted.
1924    
1925            * test/test_range.py: Copied over tests from SciParam. Removed
1926            tests against importing. Fixes RTBug #1867.
1927    
1928    2003-05-21  Bernhard Herzog  <[email protected]>
1929    
1930            * test/test_load.py: Remove unused imports and restructure the
1931            test code
1932            (LoadSessionTest): Split into one class for each test and turn
1933            LoadSessionTest itself into the base class for all such session
1934            tests.
1935            (ClassificationTest): New base class for load tests that test
1936            classifications
1937            (TestSingleLayer, TestLayerVisibility, TestClassification)
1938            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
1939            for the individual tests
1940    
1941            * test/support.py (FileLoadTestCase.filename): New base class for
1942            file loading tests
1943    
1944    2003-05-21  Jan-Oliver Wagner <[email protected]>
1945    
1946            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
1947            Mercator' to 'UTM Zone 32' as a more convenient example.
1948            Added 'Gauss Krueger Zone 6'.
1949    
1950            * Data/iceland_sample_raster.thuban: political polygon now
1951            filled transparent to have the raster image visible at once.
1952    
1953    2003-05-21  Frank Koormann  <[email protected]>
1954    
1955            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
1956            OnClose() to keep in sync with extensions. Internally Thuban
1957            still uses "underscored" names.
1958    
1959    2003-05-20  Jonathan Coles   <[email protected]>
1960    
1961            This puts back Raster layer support. These layers support projections
1962            through the GDAL library. Currently, the CVS version is being used.
1963            There are no Debian packages available although this may change soon.
1964            A GDAL driver was extended to support writing to memory rather to
1965            files.
1966    
1967            There is still some work that needs to be done, such as some error
1968            handling when loading invalid images or when there is a problem
1969            projecting the image. This putback simply checks in the majority
1970            of the work.
1971    
1972            * setup.py: Add gdalwarp library extension.
1973    
1974            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
1975            Defaults to False, but can be overridden by subclasses if they
1976            support classification.
1977            (RasterLayer): New. Defines a new layer that represents an
1978            image.
1979    
1980            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
1981            tag handler.
1982            (SessionLoader.start_layer): Encode the filename.
1983            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
1984            New. Supports reading a rasterlayer tag.
1985    
1986            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
1987    
1988            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
1989            get a string in Latin1. If we get such as string convert it to
1990            unicode first, otherwise leave if alone before encoding.
1991            (SessionSaver.write_layer): Add support for writing both Layers
1992            and RasterLayers.
1993    
1994            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
1995            The right argument may not be a string, it could also be a Column.
1996    
1997            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
1998            Make initial window size 600x400. Fixes RTBug #1872.
1999    
2000            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
2001            the dialog is constructed so that we can support layers that
2002            do not have classifications.
2003            (Classifier._OnTry): Only build a classification if the layer
2004            supports one.
2005    
2006            * Thuban/UI/legend.py: Change all checks that a layer is an
2007            instance of Layer into checks against BaseLayer.
2008            (LegendTree.__FillTreeLayer): Only add children to a branch if
2009            the layer supports classification.
2010    
2011            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
2012            MainWindow.OpenSession): Don't proceed with an action if the
2013            user chooses Cancel when they are asked to save changes.
2014            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
2015            user to select an image file. Create a new RasterLayer and add
2016            it to the map.
2017    
2018            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
2019            for rendering RasterLayer layers.
2020            (MapRenderer.draw_raster_layer): Actually method that calls
2021            the GDALWarp python wrapper and constructs an image from the
2022            data returned.
2023    
2024            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
2025            Choices symbols to match those used in the table query method.
2026            Replace deprecated method calls on table with new method names.
2027    
2028            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
2029            how small the scale can get. This still needs more testing.
2030    
2031            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
2032            Provides a driver to output in .bmp format.
2033    
2034            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
2035            New. Provides IO routines which write to memory, rather than a file.
2036    
2037            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
2038            of the gdalwarp utility provided in GDAL. Added function calls
2039            that can be accessed from python.
2040    
2041            * Data/iceland_sample_raster.thuban: New. Sample file that uses
2042            a raster layer.
2043    
2044            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
2045            layer image data.
2046    
2047            * Doc/thuban.dtd: Added rasterlayer attribute definition.
2048    
2049            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
2050            tests associated with the raster layer code.
2051    
2052            * test/test_transientdb.py
2053            (TestTransientTable.test_auto_transient_table_query): Added a test
2054            for using a Column object as the "right" parameter to a query.
2055    
2056    2003-05-19  Frank Koormann  <[email protected]>
2057    
2058            * Thuban/version.py (get_changelog_date):
2059            Catch exceptions if ChangeLog does not exist.
2060    
2061            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
2062    
2063  2003-05-19  Frank Koormann  <[email protected]>  2003-05-19  Frank Koormann  <[email protected]>
2064    
2065          Extended version information for Thuban          Extended version information for Thuban

Legend:
Removed from v.924  
changed lines
  Added in v.1380

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26