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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26