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

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

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

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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26