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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26