/[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 55 by bh, Tue Sep 11 11:45:27 2001 UTC revision 1449 by jonathan, Thu Jul 17 14:59:59 2003 UTC
# Line 1  Line 1 
1    2003-07-17  Jonathan Coles   <[email protected]>
2    
3            * Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
4            shots for the manual. The XCF file is the source image and
5            has additional layers to support changes.
6    
7            * Doc/manual/thuban-manual.xml: Wrote an initial Introduction.
8    
9            * Thuban/UI/classifier.py (Classifier.__BuildClassification):
10            Return both the new class and the field name.
11    
12            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't
13            fit the map to the window as this changes any zoom level that
14            the user may have set.
15    
16    2003-07-16  Jonathan Coles   <[email protected]>
17    
18            * Thuban/Model/classgen.py (generate_singletons,
19            generate_uniform_distribution, generate_quantiles): Remove
20            fixes parameter, but maintain the same functionality by having
21            the calling function pass a FixedRamp object for the ramp.
22            (FixedRamp): New. Adapts a ramp to have fixed property values.
23    
24            * Thuban/Model/classification.py: Use new CLASS_CHANGED message.
25            (Classification): Inherit from Publisher.
26            (Classification.__init__): Remove the layer parameter.
27            Classifications no longer need to have a parent layer.
28            (Classification.GetField, Classification.GetFieldType,
29            Classification.SetFieldInfo): Removed. The field name is stored
30            in the layer, and the type can be retreived by calling
31            Layer.GetFieldType().
32            (Classification._set_layer, Classification.GetLayer): Removed.
33            Classifications no longer have a parent layer.
34    
35            * Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
36            classification.
37            (Layer.SetShapeStore): Reset the classification first while
38            we still have the old shape store to work with.
39            (Layer.GetClassificationField, Layer.SetClassificationField):
40            New. Method for getting/setting the field to classify on.
41            (Layer.SetClassification): Simplified now that the layer
42            simply has to hold a reference to the classification and not
43            tell the classification who owns it.
44            Fixes RTbug #2023.
45    
46            * Thuban/Model/load.py (SessionLoader.start_classification):
47            Set the field name on the layer, not the classification.
48    
49            * Thuban/Model/messages.py: Add CLASS_CHANGED for when a
50            classification is modified.
51    
52            * Thuban/Model/save.py (SessionSaver.write_classification):
53            Get the field name and type from the layer.
54    
55            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
56            parameter records to rows and add docstring. Fixes RTbug #1997.
57    
58            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
59            ramp when we need to fix certain values of a ramp rather than
60            using the old fixes parameter. Fixes RTbug #2024.
61    
62            * Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
63            parameter.
64            (ClassTable.Reset): Add fieldType parameter and use it, rather
65            than asking the classification.
66            (Classifier.__init__): Remember the original class's field
67            and ask the layer for the field type, rather than the classification.
68            (Classifier.__SetGridTable): Retrieve the field and field type
69            for the table because they are not in the classification.
70            (Classifier._OnTry, Classifier._OnRevert): Set the classification
71            field on the layer in addition to the classification itself.
72    
73            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
74            classification field from layer.
75    
76            * Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
77            classification field from layer. Split up tests and remove
78            *-imports. Fixes RTbug #1992.
79    
80            * test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.
81    
82            * test/test_classification.py
83            (TestClassification.test_classification): Remove tests for methods
84            that no longer exist.
85    
86            * test/test_layer.py (SetShapeStoreTests.setUp): Classification
87            __init__ no longer has a field parameter, use SetClassificationField.
88            (SetShapeStoreTests.test_sanity): Use layer object to get class
89            field info.
90    
91            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
92            SetClassificationField on layer to set class field info.
93    
94            * test/test_viewport.py: Renamed from test/test_view.py.
95    
96    2003-07-16  Jan-Oliver Wagner <[email protected]>
97    
98            * Doc/manual/thuban-manual.xml: Added authors and an initial
99            coarse structure.
100    
101    2003-07-15  Bernhard Herzog  <[email protected]>
102    
103            * test/support.py (FloatComparisonMixin): This is a mix-in class
104            and therefore should not be derived from any other class.
105    
106            * test/test_range.py (RangeTest): FloatComparisonMixin is a
107            mix-in, so derive from TestCase as well.
108    
109    2003-07-15  Bernhard Herzog  <[email protected]>
110    
111            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
112            draw_func handling a bit to remove one layer of indirection. This
113            makes the renderer about 10% faster in the non-classifying case
114            and the code a bit cleaner
115            (MapRenderer.draw_point_shape): Add the pen and brush parameters
116            and set them in the dc. Now the draw_point_shape method and
117            wxproj's draw_polygon_shape function have basically the same
118            signature so that both can be directly used as draw_func
119    
120    2003-07-15  Bernhard Herzog  <[email protected]>
121    
122            * Thuban/Model/save.py (SessionSaver.write_classification): Encode
123            string values (in addition to the labels) as UTF 8
124    
125            * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
126            values if the field type is string
127    
128            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
129            saving a session with non-ascii string classification values.
130    
131            * test/test_load.py (TestClassification.file_contents)
132            (TestClassification.test): Check for non-ascii values in string
133            classifications
134    
135    2003-07-14  Jonathan Coles   <[email protected]>
136    
137            * test/test_view.py: New. Tests for ViewPort.
138    
139    2003-07-14  Frank Koormann   <[email protected]>
140    
141            * Thuban/Model/load.py (SessionLoader.start_map): Encode map
142            title to latin1.  Fixes https://intevation.de/rt/webrt?serial_num=2013
143    
144            * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
145            unicode strings from session file: session title, map title and
146            projection name.
147            
148    2003-07-10  Jonathan Coles   <[email protected]>
149    
150            * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
151            drag_stop, not drag_move when the mouse is released.
152    
153    2003-07-10  Jonathan Coles   <[email protected]>
154    
155            The most important part of this is the seperation of view.py into
156            two pieces. viewport.py now has a class called ViewPort which
157            contains all the non-wx parts of view.py and can therefore be
158            tested. view.py contains only the wx-specific parts and is fairly
159            simple.
160    
161            * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
162            RTTbug #1992.
163            * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
164            RTTbug #1992.
165    
166            * Thuban/Model/classgen.py (generate_singletons,
167            generate_uniform_distribution, generate_quantiles):
168            Added 'fixes' parameter so that property attributes can
169            be held constant over the generated classification groups.
170            (CustomRamp.GetProperties): Remove unused variables.
171    
172            * Thuban/Model/map.py (Map.SetProjection): Send the old
173            projection as an argument to listeners of the MAP_PROJECTION_CHANGED
174            event.
175    
176            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
177            parameter which is a list of records that restricts which
178            records are saved. Fixes RTbug #1997.
179    
180            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
181            Port exception dialog from GREAT-ER. Fixes RTbug #1993.
182    
183            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
184            to allow the user to fix line color/width on generated groups.
185            (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
186            functions to optionally fix group properties.
187    
188            * Thuban/UI/main.py (main): Set exception hook to the
189            ShowExceptionDialog. Fixes RTbug #1993.
190    
191            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
192            the table window when it is selectd to be shown.
193    
194            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
195            Export Selection button and move the export buttons underneath
196            the table.
197            (QueryTableFrame.UpdateStatusText): Added event argument so
198            that it can respond to grid selection events. The status text
199            is now updated even when the table is not associated with a
200            layer as was previously assumed.
201            (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
202            UpdateStatusText responds to these events.
203            (QueryTableFrame.OnSaveAs): Renamed to doExport.
204            (QueryTableFrame.doExport): Helper function that saves the
205            entire table, or selected rows, to a file.
206            (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
207            Respond to export button events and call doExport.
208    
209            * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
210            the function doesn't return NULL without first setting a Python
211            Error.
212    
213            * test/runtests.py (main): Only print "Unknown option" for
214            unsupported options.
215    
216            * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
217            optional epsilon argument to specify floating point accuracy.
218            (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
219            for each item test.
220    
221            * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
222            tests for saving selected records.
223    
224            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
225            tests for saving selected records.
226    
227            * test/test_map.py (TestMapWithContents.test_set_projection):
228            MAP_PROJECTION_CHANGED events send the old projection.
229    
230            * test/test_session.py
231            (TestSessionWithContent.test_forward_map_projection):
232            MAP_PROJECTION_CHANGED events send the old projection.
233    
234            * test/test_table.py (TableTest): Update tests to use non-deprecated
235            functions.
236    
237    2003-07-08  Bernhard Herzog  <[email protected]>
238    
239            * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
240            constants in the column objects are the standard ones defined in
241            the table module.
242    
243            * test/test_transientdb.py
244            (TestTransientTable.test_transienttable_to_dbf): New. Test whether
245            exporting transient tables as DBF works. This should catch the bug
246            just fixed in TransientTableBase.Width.
247    
248    2003-07-08  Bernhard Herzog  <[email protected]>
249    
250            * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
251            interpolated colors correctly.
252    
253            * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
254            New. Test case for the fix in classgen.py
255    
256    2003-07-08  Bernhard Herzog  <[email protected]>
257    
258            * test/runtests.py (main): Make the default output less verbose
259            and add a verbosity option (-v) to get the old output
260    
261    2003-07-08  Bernhard Herzog  <[email protected]>
262    
263            * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
264            0.9.
265    
266            * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
267            New. Return the join type
268    
269            * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
270            DTD
271            (SessionSaver.write_data_containers): Save the join type for
272            joined tables
273    
274            * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
275            namespace
276            (SessionLoader.start_jointable): Handle the jointype attribute
277    
278            * test/test_load_0_8.py: New. Effectively a copy of test_load.py
279            as of Thuban 0.8. These are now tests to determine whether Thuban
280            can still read files generated by Thuban 0.8
281    
282            * test/test_load.py (LoadSessionTest.dtd)
283            (TestSingleLayer.file_contents)
284            (TestLayerVisibility.file_contents, TestLabels.file_contents)
285            (TestLayerProjection.file_contents)
286            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
287            (TestJoinedTable.file_contents)
288            (TestLoadError.file_contents): Update for new DTD
289            (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
290            for new join type attribute
291    
292            * test/test_save.py (SaveSessionTest.dtd)
293            (SaveSessionTest.testEmptySession)
294            (SaveSessionTest.testSingleLayer)
295            (SaveSessionTest.testLayerProjection)
296            (SaveSessionTest.testRasterLayer)
297            (SaveSessionTest.testClassifiedLayer)
298            (SaveSessionTest.test_dbf_table)
299            (SaveSessionTest.test_joined_table): Update for new DTD
300            (SaveSessionTest.test_joined_table): Add test for new join type
301            attribute
302    
303    2003-07-04  Bernhard Herzog  <[email protected]>
304    
305            * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
306            function for table_to_dbf
307            (table_to_dbf): Deal with names longer than the 10 character limit
308    
309            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
310            doc-string
311            (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
312            long column names
313    
314    2003-07-03  Bernhard Herzog  <[email protected]>
315    
316            * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
317    
318    2003-07-03  Bernhard Herzog  <[email protected]>
319    
320            * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
321            for the Thuban manual and README with some basic information about
322            the manual
323    
324    2003-07-03  Bernhard Herzog  <[email protected]>
325    
326            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
327            Update doc-string
328            (TransientJoinedTable.create): Do not modify the column objects of
329            the input tables in place and copy all columns of the input tables
330            into the joined table after all.
331    
332            * test/test_transientdb.py
333            (TestTransientTable.test_transient_joined_table_same_column_name):
334            Update to reflect the new behavior
335            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
336            Update to reflect the new behavior
337            (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
338            New test case for a bug which modified the column objects in place
339    
340    2003-07-02  Jonathan Coles   <[email protected]>
341    
342            * Thuban/Model/classgen.py (generate_singletons,
343            generate_uniform_distribution, generate_quantiles,
344            GenQuantiles0): Make sure maxValue isn't less than
345            one, otherwise we could divide by zero.
346    
347            * test/test_classgen.py (ClassGenTest.doClassRangeTest,
348            ClassGenTest.doClassSingleTest): Call doBoundsTest to
349            check the end classification groups against the
350            proper property values.
351            (ClassGenTest.doBoundsTest): New. Checks the first and
352            last classification groups to make sure their properties
353            are the correct upper and lower bounds for a color ramp.
354    
355    2003-07-02  Jonathan Coles   <[email protected]>
356    
357            * Thuban/Model/classgen.py (generate_singletons,
358            generate_uniform_distribution, generate_quantiles,
359            GenQuantiles0): The denominator was one to high when
360            calculating the index for the ramp causing the index
361            to never to reach one.
362    
363    2003-07-02  Jonathan Coles   <[email protected]>
364    
365            Changed the singature of ClassGroupRange.__init__ and
366            ClassGroupRange.SetRange() so that the min/max values are
367            passed as a tuple. This makes a better calling scheme for
368            when a Range object is passed instead.
369    
370            * Thuban/Model/classgen.py: Fixed parameters to
371            ClassGroupRange constructor.
372    
373            * Thuban/Model/classification.py (ClassGroupRange.__init__):
374            Consolidate the min/max parameters into a single _range which
375            can either be a tuple or a Range object.
376            (ClassGroupRange.SetRange): Consolidate the min/max parameters
377            into a single _range which can either be a tuple or a Range object.
378    
379            * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
380            call to ClassGroupRange constructor to use a tuple.
381    
382            * Thuban/Model/layer.py (Layer.SetClassification): Switch
383            the classification instance variable to the new class
384            before calling _set_layer otherwise subscribers to a
385            LAYER_CHANGED event will not see any difference.
386    
387            * test/test_classification.py: Fix tests of ClassGroupRange
388            so that they use the new signature.
389    
390            * test/test_load.py: Fix use of ClassGroupRange so that it
391            uses the new signature.
392    
393            * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
394            uses the new signature.
395    
396            * test/test_save.py: Fix use of ClassGroupRange so that it
397            uses the new signature.
398    
399    
400    2003-07-01  Jonathan Coles   <[email protected]>
401    
402            * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
403            Import used objects/class from color.
404            (generate_singletons): We don't
405            need the numGroups parameter anymore because we are using
406            the new ramps with GetProperties().
407            (generate_uniform_distribution): Use new ramp method
408            GetProperties().
409            (generate_quantiles, GenQuantiles0): Use new ramp method
410            GetProperties().
411            (CustomRamp.SetNumGroups): Removed. The ramps now map
412            a value from 0 to 1 to class properties so the number
413            of groups is not needed ahead of time.
414            (CustomRamp.next): Removed. CustomRamp does not support
415            interation anymore.
416            (CustomRamp.GetProperties): Returns a ClassGroupProperties
417            object based on the index value from 0 to 1 that is
418            passed to it.
419            (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
420            Made into instances of Monochromatic class instread of
421            deriving from it.
422            (HotToCold.SetNumGroups): Removed. See CustomRamp.
423            (HotToCold.next): Removed. See CustomRamp.
424    
425            * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
426            (Classification.SetField, Classification.SetFieldType):
427            Replaced with SetFieldInfo.
428            (Classification.SetFieldInfo): New. Does a better job of
429            what SetField and SetFieldType used to do by combining
430            their function since they should really always be done
431            at the same time.
432            (Classification.SetLayer): Renamed to _set_layer.
433            (Classification._set_layer): Should only be called from
434            Layer's SetClassification. This does not cause a recursive
435            call as SetLayer did because we know that Layer knows about
436            the classification.
437    
438            * Thuban/Model/color.py: Fixes RTbug #1971.
439            (_Transparent): Renamed from Transparent so it doesn't
440            conflict with the module variable.
441            (Transparent, Black): Renamed from Color.Transparent,
442            Color.Black so they are not class variables.
443    
444            * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
445            (Layer.Destroy): We don't need to call SetClassification
446            anymore to clear out the back reference in the classifcation
447            to the layer. It's better to set it to None using _set_layer,
448            and we won't be creating another clas object too.
449            (Layer.SetClassification): Classification._set_layer is not
450            recursive so remove all the locking variables. Also clean
451            up the code so that it remains unchanged if something fails.
452    
453            * Thuban/Model/load.py: Fixes RTbug #1971.
454            (SessionLoader.start_classification): Call
455            Classification.SetFieldInfo().
456    
457            * Thuban/Model/save.py: Removed import of Color which wasn't
458            being used.
459    
460            * Thuban/UI/classgen.py: Fixes RTbug #1972.
461            (ClassGenDialog.__init__): Color ramps are now instances
462            already so we don't need to create any new objects.
463            (ClassGenDialog.OnOK): Check for numGroups is no longer
464            necessary because we never use it.
465    
466            * Thuban/UI/classifier.py: Fixes RTbug #1971.
467            (Classifier.__BuildClassification, Classifier.__SetGridTable):
468            Call Classification.SetFieldInfo() instead of SetFieldType.
469    
470            * Thuban/UI/renderer.py: Fixes RTbug #1971.
471    
472            * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
473            (MapCanvas.__init__): Subscribe to the idle time event. Set
474            background color to white.
475            (MapCanvas.OnPaint): Set a flag indicating that we should
476            render the map during idle time. If we already have a bitmap
477            just draw it now.
478            (MapCanvas.OnIdle): New. Render the map only during idle time.
479            This also fixes a problem with the busy cursor under gtk.
480    
481            * test/test_classgen.py (ClassGenTest.test_generate_singletons):
482            Fix calls to generate_singletons because the signature changed.
483    
484            * test/test_classification.py: Fix color references and
485            change calls to Classification.[SetField|SetFieldType] to
486            SetFieldInfo.
487    
488            * test/test_load.py: Fix color references.
489    
490            * test/test_load_0_2.py: Fix color references.
491    
492            * test/test_save.py (SaveSessionTest.testClassifiedLayer):
493            Change calls to Classification.[SetField|SetFieldType] to
494            SetFieldInfo.
495    
496    2003-07-01  Frank Koormann   <[email protected]>
497    
498            MERGE from the greater-ms3 branch.
499    
500            * test/test_transientdb.py
501            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
502            New. Test join of two tables with partly equal column names.
503    
504            * Thuban/Model/transientdb.py (TransientJoinedTable.create):
505            If duplicates in left and right tables column names are found,
506            append '_' (underscores) to the name until it is unique.
507            Create always new internal names for the resulting table and reference
508            columns in the join statement with <table>.<column>
509    
510    2003-07-01  Bernhard Herzog  <[email protected]>
511    
512            * test/test_transientdb.py
513            (TestTransientTable.test_transient_joined_table_same_column_name):
514            New. Test whether joining on columns with the same names in both
515            tables works.
516            
517            * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
518            sure to use the right internal names even when joining on field
519            with the same names in both tables. Also, detect duplicate names
520            in the joined table correctly.
521    
522    2003-07-01  Frank Koormann   <[email protected]>
523    
524            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
525            Reverse List of layers to render in same order as in desktop legend.
526    
527    2003-06-30  Jonathan Coles   <[email protected]>
528    
529            * Thuban/version.py (make_tuple): Takes a version string
530            and splits it into a tuple of at most three integers.
531            Used make_tuple() to make tuple versions of the version
532            numbers.
533    
534            * Thuban/UI/about.py: Add Thuban email addresses.
535    
536    2003-06-30  Jonathan Coles   <[email protected]>
537    
538            * Thuban/version.py: SQLite/PySQLite version dependencies
539            were too high.
540    
541    2003-06-30  Jonathan Coles   <[email protected]>
542    
543            * Thuban/version.py: Update version to 0.8.1
544            
545            * MANIFEST.in: Added Projections so that default.proj is
546            included.
547    
548    2003-06-26  Jonathan Coles   <[email protected]>
549    
550            New About box with lots more information including library
551            versions and credits. More/better version checking before
552            Thuban starts.
553    
554            * Thuban/UI/about.py: New. New About box that displays
555            library version information and credits.
556    
557            * Thuban/version.py: Added new 'versions' dictionary which
558            contains the verions of various libraries which are checked
559            when the module loads.
560            (verify_versions): Check all version numbers and returns
561            a list of errors.
562    
563            * Thuban/UI/classifier.py (Classifier.__EnableButtons):
564            Reset the status of the buttons as the situation warrants,
565            but in a better more reliable way by not relying on the
566            current status to determine what needs to change.
567    
568            * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
569            (verify_versions): Remove most of the code since it is
570            now in Thuban.version.verify_versions.o
571    
572            * Thuban/UI/mainwindow.py (MainWindow.About): Call new
573            About box in Thuban.UI.about.
574    
575            * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
576            Returns the version of gdal library being used as a string.
577    
578            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
579            Removed.
580            (get_proj_version): Return the version of PROJ that the file
581            was compiled with.
582            (get_gtk_version): Return th version of GTK that the file
583            was compiled with.
584    
585    2003-06-25  Jonathan Coles   <[email protected]>
586    
587            * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
588            of the SelectPropertiesDialog should be self so the window
589            appears on top.
590            (ClassGroupPropertiesCtrl.DoEdit): The parent
591            of the SelectPropertiesDialog should be self so the window
592            appears on top.
593    
594            * Thuban/UI/resource.py: Cleaned up how we determine file
595            extensions.
596            (GetImageResource): Return an wxImage from our Resources.
597    
598    2003-06-24  Jonathan Coles   <[email protected]>
599    
600            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
601            Check that a layer has a classification before trying
602            to get it. Raster layers don't have classifications.
603    
604    2003-06-23  Jonathan Coles   <[email protected]>
605            
606            * setup.py: Add Resources/XML to resource list.
607        
608    2003-06-23  Jonathan Coles   <[email protected]>
609    
610            * setup.cfg: Fix copyright dates
611        
612    2003-06-23  Jonathan Coles   <[email protected]>
613    
614            * MANIFEST.in: Update with Resources/XML
615    
616            * setup.py: Don't include Locale resources yet as we don't
617            have any and it causes problems building the distribution
618            for Windows. Update version to 0.8.0.
619    
620            * Doc/thuban.dtd: Removed since it is now in Resources/XML.
621    
622            * Thuban/UI/mainwindow.py: Add blank line at the end because
623            file was not being read correctly building the Windows
624            distribution.
625    
626    2003-06-23  Jonathan Coles   <[email protected]>
627    
628            * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
629    
630            * Thuban/version.py: Temporarily update longversion for
631            the 0.8 release so that it doesn't have the cvs revision.
632    
633    2003-06-23  Jonathan Coles   <[email protected]>
634    
635            * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
636            to make sure that we don't create reentrant possibilities with
637            wxYield.
638    
639            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
640            directly to avoid the wxSafeYield() call which generates an
641            OnPaint event causing infinite recursion. Don't try to catch
642            exception anymore. This was for before there were limits on map
643            scaling.
644    
645    2003-06-23  Bernhard Herzog  <[email protected]>
646    
647            Bug fix for RT #1961:
648    
649            * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
650            Register DerivedShapestores with the session
651    
652            * Thuban/Model/session.py (Session.Tables): Make sure each table
653            is only listed once.
654    
655            * test/test_load.py (TestJoinedTable.test): Add check_format call.
656            Update file contents to match the one written out.
657    
658    2003-06-20  Bernhard Herzog  <[email protected]>
659    
660            * test/xmlsupport.py (SaxEventLister.startElementNS)
661            (SaxEventLister.endElementNS): Do not include the qname. Python
662            2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
663            is (presumably incorrectly) None, whereas it's a string with the
664            element name in the later versions.
665    
666            * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
667            (TestEventList.test_even_list_namespace): Update tests to reflect
668            the new behaviour
669            (TestEventList.test_even_list_id_normalization): Fix doc-string
670    
671    2003-06-20  Jonathan Coles   <[email protected]>
672    
673            * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
674            by deriving classes to determine if that layer supports shapes.
675            (Layer): Override HasShapes and return true.
676    
677            * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
678            instead of a direct call to wx[Begin|End]CusyCursor().
679            (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
680            table data.
681    
682            * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
683            New. Wrappers around the wxWindows functions that allow us to
684            make additional calls such as wxYield which gives the native
685            system a chance to update the cursor correctly.
686    
687            * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
688            instead of a direct call to wx[Begin|End]CusyCursor().
689    
690            * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
691            instead of a direct call to wx[Begin|End]CusyCursor().
692            (MapCanvas.find_shape_at): Check if the current search layer
693            support shapes, otherwise go on to the next layer.
694    
695            * test/test_layer.py: Add tests in each type of layer for
696            HasClassification() and HasShapes()
697    
698    2003-06-20  Jonathan Coles   <[email protected]>
699    
700            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
701            turning on the busy cursor to allow the system to change the
702            cursor before we begin painting. This fixes a problem that
703            was occuring only under GTK. Fixes RTbug #1840.
704    
705    2003-06-20  Bernhard Herzog  <[email protected]>
706    
707            * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
708            version.
709    
710            * Thuban/Model/save.py (sort_data_stores): New. Make topological
711            sort of the data sources so they can be written with sources that
712            data sources that depend on other data sources come after the
713            sources they depend on.
714            (SessionSaver.__init__): Add idmap instance variable to map from
715            objects to the ids used in the file.
716            (SessionSaver.get_id, SessionSaver.define_id)
717            (SessionSaver.has_id): New. Methods to manage the idmap
718            (SessionSaver.write): Use thuban-0.8.dtd
719            (SessionSaver.write_session): Add a namespace on the session and
720            write out the data sources before the maps.
721            (SessionSaver.write_data_containers): New. Write the data
722            containers.
723            (SessionSaver.write_layer): Layer elements now refer to a
724            shapestore and don't contain filenames anymore.
725    
726            * Thuban/Model/load.py (LoadError): Exception class to raise when
727            errors in the files are discovered
728            (SessionLoader.__init__): Define dispatchers for elements with a
729            thuban-0.8 namespace too.
730            (SessionLoader.check_attrs): New helper method to check and
731            convert attributes
732            (AttrDesc): New. Helper class for SessionLoader.check_attrs
733            (SessionLoader.start_fileshapesource)
734            (SessionLoader.start_derivedshapesource)
735            (SessionLoader.start_filetable, SessionLoader.start_jointable):
736            Handlers for the new elements in the new fileformat
737            (SessionLoader.start_layer): Handle the shapestore attribute in
738            addition to filename.
739            (SessionLoader.start_table, SessionLoader.end_table): Removed.
740            They were never used in the old formats and aren't needed for the
741            new.
742    
743            * Thuban/Model/session.py (Session.DataContainers): New method to
744            return all "data containers", i.e. shapestores and tables
745    
746            * test/xmlsupport.py (SaxEventLister.__init__)
747            (SaxEventLister.startElementNS, sax_eventlist): Add support to
748            normalize IDs.
749    
750            * test/test_xmlsupport.py
751            (TestEventList.test_even_list_id_normalization): New test case for
752            id normalization
753    
754            * test/test_load.py (LoadSessionTest.check_format): Use ID
755            normalization
756            (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
757            class atrributes used for ID normalization
758            (TestSingleLayer, TestLayerVisibility, TestLabels.test)
759            (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
760            file format
761            (TestJoinedTable): New test for loading sessions with joined
762            tables.
763            (TestLoadError): New. Test whether missing required attributes
764            cause a LoadError.
765    
766            * test/test_save.py (SaveSessionTest.thubanids)
767            (SaveSessionTest.thubanidrefs): New class attributes for ID
768            normalization in .thuban files.
769            (SaveSessionTest.compare_xml): Use id-normalization.
770            (SaveSessionTest.testEmptySession)
771            (SaveSessionTest.testLayerProjection)
772            (SaveSessionTest.testRasterLayer)
773            (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
774            (SaveSessionTest.testLayerProjection): The filename used was the
775            same as for testSingleLayer. Use a different one.
776            (SaveSessionTest.test_dbf_table)
777            (SaveSessionTest.test_joined_table): New test cases for saving the
778            new data sources structures.
779            (TestStoreSort, MockDataStore): Classes to test the sorting of the
780            data stores for writing.
781    
782            * test/runtests.py: Add CVS keywords
783    
784    2003-06-20  Jonathan Coles   <[email protected]>
785    
786            * test/test_session.py
787            (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
788            Use the cultural_landmark-point.dbf file for the store so that
789            the table rows and shape count match.
790    
791    2003-06-20  Jonathan Coles   <[email protected]>
792    
793            * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
794            an exception if the number of shapes is different from the
795            number of rows in the table. Address RTbug #1933.
796    
797            * test/test_layer.py (TestLayer.test_derived_store): Add
798            a test for the new exception in DerivedShapeStore.__init__.
799    
800            * test/support.py (FloatTestCase): Removed since there is
801            already FloatComparisonMixin. Fixes RTbug #1954.
802            (FloatComparisonMixin.assertFloatEqual): Include test for
803            infinity that was part of FloatTestCase.
804    
805            * test/test_range.py (RangeTest): Inherit from
806            support.FloatComparisonMixin now that we don't have
807            support.FloatTestCase.
808    
809    2003-06-20  Bernhard Herzog  <[email protected]>
810    
811            * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
812            the implementation in xmlsupport instead.
813            (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
814    
815            * test/test_proj.py: Import sax_eventlist from xmlsupport instead
816            of test_save
817    
818    2003-06-20  Bernhard Herzog  <[email protected]>
819    
820            * test/test_load.py (LoadSessionTest.check_format): New helper
821            method to make sure the test files we load might have been written
822            by the current thuban version.
823            (ClassificationTest.TestLayers, TestSingleLayer.test)
824            (TestLayerVisibility.test, TestClassification.test)
825            (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
826            Add check_format() calls and fix the thuban data to match the data
827            that would be written by saving the session loaded from it.
828    
829            * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
830            the same class and function in test_save.
831    
832            * test/test_xmlsupport.py (TestEventList): New. test cases for
833            sax_eventlist
834    
835    2003-06-20  Bernhard Herzog  <[email protected]>
836    
837            * Resources/XML/thuban.dtd: Add comment about which versions of
838            Thuban are covered by this DTD
839            (map): Fix content model for layers and raster layers. There can
840            be any number or layers and raster layers in any order.
841    
842    2003-06-20  Jonathan Coles   <[email protected]>
843    
844            This is mainly about fixing RTbug #1949.
845    
846            * Thuban/Model/classification.py: Remove "from __future__"
847            import statement since python 2.2 is the earliest supported
848            version.
849    
850            * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
851            Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
852            depending on the units this projection *forwards* into.
853    
854            * Thuban/Model/save.py (SessionSaver.write_classification):
855            Remove unnecessary use of lambdas and nested functions.
856    
857            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
858            adjustment here if the map projection uses degrees.
859    
860            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
861            scale adjust code since it is now done before calling
862            this method. Don't do anything if the map projection
863            is None.
864    
865    2003-06-19  Bernhard Herzog  <[email protected]>
866    
867            Move version specific load tests to their own file.
868    
869            * test/test_load.py: Expand the doc-string to explain a bit how to
870            handle file format changes.
871            (TestClassification.test): Update the docstring as this test is
872            not about Thuban 0.2 anymore.
873    
874            * test/test_load_0_2.py: New file with the load tests for thuban
875            files created with Thuban 0.2 and earlier.
876    
877    2003-06-19  Bernhard Herzog  <[email protected]>
878    
879            Add XML validation to some of the tests. Validation will only be
880            done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
881            To make the DTD available to the test cases it's moved into
882            Resources/XML
883    
884            * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
885            for versions up to and including 0.2. Two slight changes: added an
886            encoding specification and fixed the comment which refered to
887            GRASS, not Thuban
888    
889            * test/xmlsupport.py: New support module for tests involving XML.
890            Currently there's a mix-in class for XML validation.
891    
892            * test/test_xmlsupport.py: New. Tests for the xmlsupport module
893    
894            * test/test_save.py (SaveSessionTest): Derive from ValidationTest
895            so that we can validate the
896            (SaveSessionTest.testEmptySession)
897            (SaveSessionTest.testSingleLayer)
898            (SaveSessionTest.testSingleLayer)
899            (SaveSessionTest.testLayerProjection)
900            (SaveSessionTest.testRasterLayer)
901            (SaveSessionTest.testClassifiedLayer): Validate the generated XML
902    
903            * test/runtests.py (main): Call print_additional_summary instead
904            of print_garbage_information
905    
906            * test/support.py (resource_dir): New function to return the
907            "Resource" subdirectory
908            (print_additional_summary): New function to combine several
909            summary functions
910            (run_tests): Use print_additional_summary instead of calling
911            print_garbage_information directly
912    
913    2003-06-19  Bernhard Herzog  <[email protected]>
914    
915            * Doc/thuban.dtd (classification): Correct the content model of
916            the classification element.
917            (projection): Add the "name" attribute
918    
919    2003-06-19  Frank Koormann   <[email protected]>
920    
921            MERGE from the greater-ms3 branch.
922    
923            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
924            scale if projection is latlong to get better estimate.
925    
926            Fix problem of hidden properties dialog under windows after double
927            click on layer tree:
928            The tree control always gets an Expanded / Collapsed event after
929            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
930            raises the already displayed window.
931    
932            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
933            raiseProperties initialized to prevent endless loops
934            (LegendTree._OnItemActivated): Depending on self.raiseProperties
935            simply raise the properties or open the dialog and issue a second
936            event.
937    
938    2003-06-18  Jonathan Coles   <[email protected]>
939    
940            * setup.py: Fix a few problems that occured under Windows.
941    
942    2003-06-18  Jonathan Coles   <[email protected]>
943    
944            When Thuban loaded the map was redrawn twice because the
945            legend was being opened after the mainwindow was created
946            and not during its creation. This meant the map was drawn
947            initially and then had to be redrawn when the legend
948            caused the display to change. Now the legend is opened
949            in the mainwindow constructor which resolves this issue.
950    
951            Also, although we were checking for the existence of
952            gdal and gdalwarp modules, the gdalwarp extension was
953            still being compiled (which may fail if the system doesn't
954            have gdal installed). the build_ext command to setup.py
955            now accepts the flags --with-gdal and --without-gdal.
956            If --without-gdal is specified setup.py will try to
957            use the gdal parameters specified by gdal-config. Under
958            windows, those parameters have to be set in setup.py
959            as with proj4 an wxWindows.
960    
961            * setup.py: Use a list instead of seperate variables for
962            extension parameters so we can create a generic function
963            that runs an appropriate *-config script.
964            (run_cs_script): Renamed from run_wx_script and modified
965            to accept a second argument which is a list of lists to
966            be filled in by the values returned from running the command.
967            (thuban_build_ext): New. Extends the build_ext command and
968            provides the options --with-gdal/--without-gdal which then
969            optionally includes the gdalwarp extension.
970    
971            * Thuban/Model/resource.py: First check if we can import
972            the gdalwarp Thuban extension before checking for gdal.
973            Also added some comments.
974            
975            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
976            the map is None which may be the case if none has been loaded
977            yet.
978    
979            * Thuban/UI/main.py (main): Remove call to ShowLegend.
980    
981            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
982    
983            * Thuban/UI/renderer.py: Check for gdal support before importing
984            gdalwarp.
985            (MapRenderer.render_map): Only try to optimize if we have gdal
986            support otherwise nothing will get drawn.
987    
988            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
989            during startup before a map has been created. Check if map is None
990            before using it and do nothing if it is.
991    
992    2003-06-17  Jonathan Coles   <[email protected]>
993    
994            Fix the problem with raster layers under Windows that caused
995            Thuban to crash. The view should respond to layer projection
996            changed events to update the display. Changes to a projection
997            should not cause the map to be set to full extent.
998            
999            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
1000            current_map_proj to remember the current map projection so that
1001            when the projection changes we know what the previous projection
1002            was.
1003            (MapCanvas.SetMap): Unsubscribe and subscribe to
1004            LAYER_PROJECTION_CHANGED events.
1005            (MapCanvas.projection_changed): Split into two methods that respond
1006            to map and layer projection changes.
1007            (MapCanvas.map_projection_changed): New. Takes the current view and
1008            projects it using the new projection. This does not cause the
1009            map to be redrawn at full extent.
1010            (MapCanvas.layer_projection_changed): New. Cause a redraw which
1011            will draw each layer in its new projection.
1012            
1013            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
1014            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
1015            under Windows.
1016            
1017            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
1018            to twice sizeof(void*) because there are two digits for each
1019            hex byte.
1020    
1021    2003-06-16  Bernhard Herzog  <[email protected]>
1022    
1023            Update to the layer interface: Direct access to the table,
1024            shapetable, shapefile and filename attributes is now actively
1025            deprecated by issuing deprecation warnings for all places where
1026            this happens.
1027    
1028            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
1029            to the instance variables table, shapetable, shapefile and
1030            filename via __getattr__ so that we can issue a deprecation
1031            warning.
1032            (Layer.SetShapeStore): Don't set the deprecated instance variables
1033            any more
1034            (Layer.SetShapeStore): Don't use deprecated layer instance
1035            variables
1036            (Layer.Destroy): No need to explicitly remove the instance
1037            variables any more
1038            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
1039            instance variables
1040    
1041            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
1042            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
1043            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
1044            use deprecated layer instance variables
1045    
1046            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
1047            deprecated layer instance variables
1048    
1049            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
1050            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
1051            instance variables
1052    
1053            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
1054            deprecated layer instance variables
1055    
1056            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
1057            deprecated layer instance variables
1058    
1059            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
1060            deprecated layer instance variables
1061    
1062            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
1063            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
1064            variables
1065    
1066            * test/runtests.py (main): Turn Thuban's deprecation warnings into
1067            errors so that they're cought by the tests
1068    
1069            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
1070            layer instance variables
1071    
1072    2003-06-16  Jonathan Coles   <[email protected]>
1073    
1074            Fix a problem under Windows whereby if the user double-clicks on a
1075            layer in the legend that tree item will expand or collapse as well
1076            as open the layer properties dialog. The state of the tree item
1077            should not be affected.
1078    
1079            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
1080            preventExpandCollapse and subscribe to expanding and collapsing
1081            events.
1082            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
1083            collapsing events and will veto the event if it has been triggered
1084            by the user double clicking on a layer.
1085            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
1086            that an expanding/collapsing event should be vetoed.
1087    
1088    2003-06-13  Bernhard Herzog  <[email protected]>
1089    
1090            * Thuban/UI/classifier.py (Classifier.OnClose)
1091            (Classifier.map_layers_removed)
1092            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
1093            in OnClose and not in map_layers_removed or
1094            layer_shapestore_replaced to make sure it always happens when the
1095            dialog is closed
1096    
1097    2003-06-13  Jonathan Coles   <[email protected]>
1098    
1099            This puts back a fix for Windows where a panel is needed so that
1100            the background of the table view appears correctly.
1101    
1102            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
1103            object that can be used by derived classes to place any
1104            controls (including the grid) onto.
1105            (QueryTableFrame.__init__): Use the panel as the parent window
1106            for all the controls. Reparent the grid so that the panel is
1107            the parent. Call UpdateStatusText() to correctly initialize
1108            the status bar.
1109    
1110    2003-06-13  Jonathan Coles   <[email protected]>
1111    
1112            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
1113            from wxFrame (as opposed to wxDialog like the other classes)
1114            but otherwise behaves like the other classes. This is needed
1115            for the TableView which isn't really a dialog and needs to
1116            have a status bar and control buttons.
1117    
1118            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
1119            instance variable to keep track of how many rows are selected.
1120            Subscribe once to the the events we are interested in.
1121            (ThubanGrid.OnRangeSelect): Only handle event if event handling
1122            hasn't been turned off.
1123            (ThubanGrid.OnSelectCell): Only handle event if event handling
1124            hasn't been turned off.
1125            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
1126            as an event listener (which changes the event handler stack)
1127            simply set an instance variable to False. This is checked in
1128            the event handlers.
1129            (ThubanGrid.GetNumberSelected): Return the number of currently
1130            selected rows.
1131            (TableFrame): Inherit from ThubanFrame so we can have a
1132            status bar and control buttons.
1133            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
1134            Explicitly set which items are selected in the operator choice and
1135            action choice so there is always a valid selection. Fixes RTbug #1941.
1136            Subscribe to grid cell selection events so we can update the
1137            status bar.
1138            (QueryTableFrame.UpdateStatusText): Update the status bar with
1139            how many rows are in the grid, how many columns, and how many
1140            rows are selected.
1141            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
1142            Call UpdateStatusText when cells are (de)selected.
1143            (QueryTableFrame.OnQuery): Use the string value in the value
1144            combo if either the selected item index is 0 or if the string
1145            cannot be found in the predefined list (this happens if the
1146            user changes the text). Fixes RTbug #1940.
1147            Only turn off the grid event listeners if there a query comes
1148            back with a none empty list of ids. in the case that the list
1149            is empty this causes a grid.ClearSelection() call to actually
1150            clear the grid selection which causes the selected items in
1151            the map to be deselected. Fixes RTbug #1939.
1152    
1153            * test/test_save.py (XMLWriterTest.Encode): Check return values.
1154            Fixes RTbug #1851.
1155    
1156    2003-06-13  Bernhard Herzog  <[email protected]>
1157    
1158            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
1159            self.selected_shape with the current selection to make sure the
1160            contents of the dialog are up to date when it's shown for the
1161            first time.
1162            The dialog used to work without this by luck. The recent fix to
1163            the connector module 'broke' a 'feature' the identify view was
1164            relying on, i.e that subscribing to a message in response to
1165            receiving a message of that type would mean that the new
1166            subscriber would also be called for the same message.
1167            
1168    2003-06-12  Jonathan Coles   <[email protected]>
1169    
1170            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
1171            the image is rendered. Fixes RTbug #1937.
1172    
1173    2003-06-12  Jonathan Coles   <[email protected]>
1174    
1175            * Thuban/Lib/fileutil.py: As is done under Windows, create the
1176            user directory if it doesn't exist on a posix system.
1177            Fixes RTbug #1815.
1178    
1179            * Thuban/Model/resource.py (get_user_proj_files): Moved the
1180            called to get_application_dir here, so that the directory
1181            will only be called if this method is invoked.
1182    
1183            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
1184            the projfilepath if no projection is selected.
1185    
1186    2003-06-12  Jonathan Coles   <[email protected]>
1187    
1188            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
1189            the scalebar if the current map has no projection set.
1190    
1191            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
1192            projfilepath label to just the basename of the projection file
1193            rather than include the entire path.
1194    
1195            * Thuban/Model/resource.py: Fix missed proj functions that
1196            needed to be renamed.
1197    
1198    2003-06-12  Jonathan Coles   <[email protected]>
1199    
1200            * Thuban/Model/classification.py: Removed assert statements that
1201            tested if the variable was an instance of Color.
1202    
1203            * Thuban/Model/color.py (Color): Remove commented code that isn't
1204            used.
1205            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
1206            Fixes RTbug #1835.
1207            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
1208            Needed now that the class doesn't inherit from Color.
1209    
1210    2003-06-12  Jonathan Coles   <[email protected]>
1211    
1212            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
1213            check unicode strings.
1214    
1215            * test/test_layer.py: Check for existence of gdal.
1216    
1217    2003-06-12  Jonathan Coles   <[email protected]>
1218        
1219            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
1220            that was in load.py
1221    
1222            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
1223            that was in save.py
1224    
1225    2003-06-12  Jonathan Coles   <[email protected]>
1226    
1227            This is largely a collection of bug fixes. We also handle the
1228            case where gdal is not on the system. The XMLReader and XMLWriter
1229            classes were moved into there own files to resolve some circular
1230            import references and because they shouldn't really be in the
1231            file that is dediciated to reading/writing session files since
1232            they are also used elsewhere.
1233    
1234            * Thuban/Model/classgen.py: Renamed functions to follow the
1235            function_names_with_underscores style. Fixes RTbug #1903.
1236            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
1237    
1238            * Thuban/Model/layer.py: Import gdal only if it available.
1239            (RasterLayer): Handle the case where the gdal library is unavailable.
1240            Addresses RTbug #1877.
1241    
1242            * Thuban/Model/load.py (XMLReader): Moved into seperate file
1243            xmlreader.py.
1244    
1245    2003-06-12  Jonathan Coles   <[email protected]>
1246    
1247            This is largely a collection of bug fixes. We also handle the
1248            case where gdal is not on the system. The XMLReader and XMLWriter
1249            classes were moved into there own files to resolve some circular
1250            import references and because they shouldn't really be in the
1251            file that is dediciated to reading/writing session files since
1252            they are also used elsewhere.
1253    
1254            * Thuban/Model/classgen.py: Renamed functions to follow the
1255            function_names_with_underscores style. Fixes RTbug #1903.
1256            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
1257    
1258            * Thuban/Model/layer.py: Import gdal only if it available.
1259            (RasterLayer): Handle the case where the gdal library is unavailable.
1260            Addresses RTbug #1877.
1261    
1262            * Thuban/Model/load.py (XMLReader): Moved into seperate file
1263            xmlreader.py.
1264    
1265            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
1266            file xmlwriter.py.
1267    
1268            * Thuban/Model/resource.py: Renamed functions to following the
1269            function_names_with_underscores style.
1270            (has_gdal_support): New function that returns true if the gdal
1271            library is available. Addresses RTbug #1877.
1272    
1273            * Thuban/UI/application.py (ThubanApplication.OpenSession):
1274            Display a message box if the gdal library is not available, but
1275            only if there are any layers that would use it. Addresses RTbug #1877.
1276    
1277            * Thuban/UI/classgen.py: Use renamed projection resource functions.
1278            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
1279            when using integers versus floats.
1280    
1281            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
1282            determine if the "Add Image Layer" menu option should be
1283            greyed out or not. Addresses RTbug #1877.
1284    
1285            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
1286    
1287            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
1288            optimize if a raster layer is visible. Fixes RTbug #1931.
1289            Only draw the raster layer if the gdal library is available.
1290            Addresses RTbug #1877.
1291    
1292            * test/test_classgen.py: Add tests for generate_singletons,
1293            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
1294            (test_calculate_quantiles): Fix some tests to catch the new
1295            ValueError that is raised.
1296    
1297            * test/test_proj.py: Use renamed projection resource functions.
1298    
1299            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
1300            test for saving classified layers. Fixes RTbug #1902.
1301            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
1302    
1303    2003-06-12  Jan-Oliver Wagner <[email protected]>
1304    
1305            Fix for http://intevation.de/rt/webrt?serial_num=1900.
1306    
1307            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
1308    
1309            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
1310            multiplechoicedialog.py rather than from the wxPython library.
1311    
1312    2003-06-11  Frank Koormann  <[email protected]>
1313    
1314            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
1315            update.
1316    
1317    2003-06-11  Frank Koormann  <[email protected]>
1318    
1319            * Thuban/Lib/fileutil.py (get_application_dir): New function to
1320            determine the absolute .thuban/thuban directory under
1321            "posix" (os.expanduser) and "nt" (read AppData registry key).
1322    
1323            * Thuban/Model/resource.py: Use get_application_dir
1324    
1325            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1326            Use get_application_dir.
1327    
1328    2003-06-10  Bernhard Herzog  <[email protected]>
1329    
1330            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
1331            the messages MAP_LAYERS_REMOVED messages
1332            (LayerTableFrame.OnClose): Unsubscribe from it.
1333            (LayerTableFrame.map_layers_removed): New. Receiver for
1334            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
1335            dialog is showing is removed.
1336    
1337    2003-06-10  Bernhard Herzog  <[email protected]>
1338    
1339            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
1340            of the receivers list so that unsubscribing in a receiver doesn't
1341            modify it while iterating over it.
1342    
1343            * test/test_connector.py
1344            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
1345            unsubscribing in a receiver works correctly. See docstring for
1346            details
1347    
1348    2003-06-10  Bernhard Herzog  <[email protected]>
1349    
1350            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
1351            message.
1352    
1353            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
1354            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
1355            LAYER_CHANGED will still be sent if the classification changes.
1356    
1357            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
1358            parameter so we can subscribe to some of its messages
1359            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
1360            and the layer's LAYER_SHAPESTORE_REPLACED
1361            (Classifier.unsubscribe_messages): New. Unsubscribe from message
1362            subscribed to in __init__
1363            (Classifier.map_layers_removed)
1364            (Classifier.layer_shapestore_replaced): receivers for the messages
1365            subscribed to in __init__. Unsubscribe and close the dialog
1366    
1367            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
1368            the map to the Classifier dialog
1369    
1370            * test/test_layer.py (SetShapeStoreTests): Derive from
1371            SubscriberMixin as well so we can test messages
1372            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
1373            messages
1374            (SetShapeStoreTests.tearDown): Clear the messages again
1375            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
1376            for the modified flag too
1377            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
1378            to check whether SetShapeStore sets the modified flag
1379            (SetShapeStoreTests.test_set_shape_store_different_field_name)
1380            (SetShapeStoreTests.test_set_shape_store_same_field)
1381            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
1382            Add tests for the messages. This checks both the new
1383            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
1384    
1385    2003-06-06  Jan-Oliver Wagner <[email protected]>
1386    
1387            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
1388            the menu items.
1389    
1390    2003-06-05  Frank Koormann  <[email protected]>
1391    
1392            * Thuban/UI/identifyview.py (IdentifyView.__init__):
1393            Layout reimplemented without panel. Make life easier to fit the list
1394            in the dialog.
1395    
1396    2003-06-05  Frank Koormann  <[email protected]>
1397    
1398            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
1399            once on initialisation (Former implementation resulted in multiple
1400            entries for each projection).
1401            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
1402            if set, select the projection found under the specified name. This
1403            overwrites any other selection estimate.
1404            Removed projchoice filling from this method.
1405            (ProjFrame._OnSave, ProjFrame._OnAddToList):
1406            Updated call of ProjFrame.__FillAvailList
1407            (LCCPanel._DoLayout): Moved parameter controls in more common order.
1408    
1409            * Resources/Projections/defaults.proj: Extended defaults representing
1410            various common European projections.
1411    
1412    2003-06-05  Frank Koormann  <[email protected]>
1413    
1414            * Thuban/UI/identifyview.py (IdentifyView.__init__):
1415            Use ListCtrl instead of GridCtrl
1416    
1417            * Thuban/Model/resource.py:
1418            Guess location of .thuban directory from tempdir parent directory.
1419    
1420            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1421            Guess location of .thuban directory from tempdir parent directory.
1422    
1423    2003-06-04  Bernhard Herzog  <[email protected]>
1424    
1425            Do not cache the values returned by the tree widget's
1426            GetFirstChild and GetNextChild methods because it led to lots of
1427            segfaults. The new way requires more brute force but is more
1428            reliable.
1429    
1430            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
1431            variable layer2id
1432            (LegendTree.find_layer): New method to do with brute force what
1433            layer2id tried to accomplish
1434            (LegendTree._OnMsgLayerChanged)
1435            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
1436            Use find_layer instead of layer2id
1437            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
1438            update layer2id anymore
1439            (LegendTree._OnMsgMapLayersRemoved)
1440            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
1441    
1442    2003-06-03  Thomas Koester  <[email protected]>
1443    
1444            * Thuban/Model/classgen.py (GenQuantiles0): New function.
1445    
1446    2003-06-02  Bernhard Herzog  <[email protected]>
1447    
1448            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
1449            New commands.
1450            (main_menu): Add the new commands.
1451            (MainWindow.TableRename): New. Implementation of the table_rename
1452            command.
1453            (MainWindow.RenameLayer): New. Implementation of the layer_rename
1454            command.
1455    
1456            * Thuban/Model/session.py (Session.AddTable): call self.changed to
1457            set the modified flag
1458    
1459            * test/test_session.py (TestSessionSimple.test_add_table): Test
1460            whether the modified flag is set properly
1461    
1462            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
1463            instead of issue so that the modified flags get updated.
1464    
1465            * test/test_base.py (SomeTitledObject): Derive from Modifiable
1466            instead of Publisher to reflect reality better and to accomodate
1467            the fact that SetTitle now calls changed instead of issue
1468    
1469    2003-06-02  Bernhard Herzog  <[email protected]>
1470    
1471            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
1472            acquisition has to happen before the try in a try-finally.
1473    
1474    2003-06-02  Bernhard Herzog  <[email protected]>
1475    
1476            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
1477            possible that a layer is removed that is not currently selected in
1478            the legend so don't check for this.
1479    
1480    2003-05-30  Bernhard Herzog  <[email protected]>
1481    
1482            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
1483            variables to None that have direct or indirect references to
1484            shapefiles or dbf files to make sure that they do go away and the
1485            files are closed.
1486    
1487    2003-05-30  Bernhard Herzog  <[email protected]>
1488    
1489            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
1490            availImgListIndices when a new image list is created
1491            
1492    2003-05-30  Bernhard Herzog  <[email protected]>
1493    
1494            * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
1495            changing_selection to indicate whether the LegendTree code itself
1496            is currently changing the selection
1497            (LegendTree.normalize_selection): New method to normalize the
1498            selection by selecting the layer item even if the user clicked on
1499            the classification.
1500            (LegendTree._OnSelChanged): normalize the selection. This works
1501            around a bug in wx which doesn't keep track of the selection
1502            properly when subtrees are deleted.
1503    
1504    2003-05-30  Bernhard Herzog  <[email protected]>
1505    
1506            * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
1507            maximum and minimum scale factors.
1508    
1509            * test/test_classgen.py (ClassGenTest.test): Update to reflect the
1510            changes in classgen.py
1511    
1512    2003-05-30  Jonathan Coles   <[email protected]>
1513    
1514            * Thuban/Model/classgen.py: Remove ClassGenerator class but make
1515            all the methods functions. Fixes RTBug #1903.
1516    
1517            * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
1518            to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
1519            RTBug #1907.
1520    
1521            * Thuban/UI/classgen.py: Use classgen functions that were part
1522            of the ClassGenerator class. Put try/finally blocks around
1523            code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
1524            RTBug #1904.
1525    
1526            * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
1527    
1528            * Thuban/UI/legend.py: The legend was cleared and repopulated any
1529            time something changed which caused some state to be lost such
1530            as which children were expanded or collapsed. Fixes RTBug #1901.
1531            (LegendTree._OnMsgMapLayersAdded): Add only new layers.
1532            (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
1533            the legend but not in the map.
1534            (LegendTree.__FillTree): Move main functionality out into smaller
1535            methods that can be used by other methods.
1536            (LegendTree.__FillTreeLayer): Reuse old slots in the image list
1537            if they are available.
1538            (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
1539            that we override the wxTreeCtrl method. Iterate over children
1540            and call __RemoveLayer.
1541            (LegendTree.__AddLayer): New. Add a new layer to the legend.
1542            (LegendTree.__RemoveLayer): Remove a layer from the legend.
1543            (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
1544            Should only be called with the id of a layer branch.
1545            (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
1546            Returns the root item or creates one if necessary.
1547    
1548            * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
1549            ProjectRasterFile with tuple arguments instead of strings.
1550    
1551            * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
1552            with try/finally. Fixes RTBug #1904.
1553    
1554            * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
1555            with try/finally. Fixes RTBug #1904.
1556            (MapCanvas.FitSelectedToWindow): If a single point is selected
1557            simply center it on the display. Fixes RTBug #1849.
1558    
1559            * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
1560            to be compiled as a standalone app. Now the code can only be
1561            called from Python which simplifies the parameter passing.
1562            (ProjectRasterFile): Handle Python arguments. Remove code that
1563            checks for a destination dataset. Add more clean up code.
1564    
1565            * test/test_map.py (TestMapWithContents.test_raise_layer_top,
1566            TestMapWithContents.test_lower_layer_bottom):
1567            Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
1568            Fixes RTBug #1907.
1569    
1570            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
1571            extent to the map when the legend is toggled. Fixes RTBug #1881.
1572    
1573    2003-05-29  Jan-Oliver Wagner <[email protected]>
1574    
1575            * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
1576            unsubscribes all that is subcribed in __init__.
1577    
1578    2003-05-28  Bernhard Herzog  <[email protected]>
1579    
1580            * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
1581            (MainWindow.CanDuplicateLayer): New methods to implement the
1582            Layer/Duplicate command.
1583            (layer_duplicate command): New.
1584            (main_menu): Add layer_duplicate to the Layer menu.
1585    
1586    2003-05-28  Bernhard Herzog  <[email protected]>
1587    
1588            * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
1589            renderer so that NULL/None values get displayed differently (by a
1590            gray rectangle).
1591            (TableGrid.__init__): Override the default renderers
1592    
1593    2003-05-28  Bernhard Herzog  <[email protected]>
1594    
1595            * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
1596            classification to "None" if the type of the field has changed.
1597    
1598            * test/test_layer.py (SetShapeStoreTests): New. Class with a few
1599            test for the Layer.SetShapeStore method
1600    
1601    2003-05-28  Jan-Oliver Wagner <[email protected]>
1602    
1603            * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
1604            does not necessarily have a filename).
1605    
1606    2003-05-28  Jan-Oliver Wagner <[email protected]>
1607    
1608            * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
1609            sort the selection list for the dialog.
1610    
1611    2003-05-28  Frank Koormann  <[email protected]>
1612    
1613            * extensions/thuban/wxproj.cpp
1614            (project_point): Removed cast to int for projected point coordinates.
1615            (shape_centroid): Return last point if all polygon vertices fall
1616            to one point.
1617    
1618    2003-05-28  Bernhard Herzog  <[email protected]>
1619    
1620            * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
1621            with layers that don't have shapestores, i.e. raster layers.
1622    
1623    2003-05-28  Bernhard Herzog  <[email protected]>
1624    
1625            * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
1626            when determining the title from the filename.
1627    
1628            * test/test_dbf_table.py (TestDBFTable.test_title): Update to
1629            reflect changes in the way the title is derived from the filename
1630    
1631    2003-05-28  Frank Koormann  <[email protected]>
1632    
1633            * Thuban/UI/mainwindow.py (MainWindow.TableShow):
1634            Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
1635    
1636    2003-05-27  Bernhard Herzog  <[email protected]>
1637    
1638            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
1639            delegate SelectedLayer.
1640            (MainWindow.LayerUnjoinTable): Implement.
1641            (_can_unjoin): New. Helper function for the sensitivity of the
1642            layer/unjoin command.
1643    
1644            * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
1645            (DerivedShapeStore.OrigShapeStore): New. Return the original
1646            shapestore. Used to figure out how to unjoin.
1647            (DerivedShapeStore.Shapefile): Fix a typo.
1648    
1649    2003-05-27  Bernhard Herzog  <[email protected]>
1650    
1651            * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
1652            well
1653            (JoinDialog.__init__): Use the layer parameter and only build the
1654            left choice when a layer is given
1655            (JoinDialog.OnJoin): Handle layer joins as well
1656            (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
1657            that the user selects the "Select..." item. The sensitivitly
1658            updating is now in update_sensitivity
1659            (JoinDialog.y): New method to refactor the sensitivity update of
1660            the join button into its own method.
1661    
1662            * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
1663    
1664    2003-05-27  Bernhard Herzog  <[email protected]>
1665    
1666            * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
1667            iff there are unreferenced tables in the session
1668    
1669    2003-05-27  Bernhard Herzog  <[email protected]>
1670    
1671            * Thuban/Model/messages.py (TABLE_REMOVED): New message.
1672    
1673            * Thuban/Model/session.py (Session.UnreferencedTables): New method
1674            to return tables that are not referenced by other tables or shape
1675            stores and can be removed.
1676            (Session.RemoveTable): Issue a TABLE_REMOVED message after
1677            removing the table
1678    
1679            * Thuban/UI/mainwindow.py: Remove unused imports
1680            (MainWindow.TableClose): Implement.
1681    
1682            * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
1683            messages so that the frame will be automatically closed when a new
1684            session is opened or the table is removed.
1685            (TableFrame.OnClose): Unsubscribe the Subscriptions made in
1686            __init__
1687            (TableFrame.close_on_session_replaced)
1688            (TableFrame.close_on_table_removed): New. Subscribers that close
1689            the window
1690    
1691            * test/test_session.py (TestSessionMessages.test_remove_table)
1692            (TestSessionSimple.test_remove_table): Move the test to
1693            TestSessionSimple and add test for the TABLE_REMOVED message
1694            (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
1695            (TestSessionSimple.test_unreferenced_tables) New. Test for the
1696            UnreferencedTables method.
1697            (UnreferencedTablesTests): New. Class with some more sophisticated
1698            tests for UnreferencedTables.
1699    
1700    2003-05-27  Frank Koormann  <[email protected]>
1701    
1702            * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
1703            display has some unwanted side effects. Removed again.
1704    
1705    2003-05-27  Frank Koormann  <[email protected]>
1706    
1707            * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
1708    
1709            * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
1710    
1711    2003-05-27  Jan-Oliver Wagner <[email protected]>
1712    
1713            * test/test_menu.py (MenuTest.test): Added test for
1714            Menu.RemoveItem().
1715    
1716            * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
1717            the menu.
1718    
1719    2003-05-27  Frank Koormann  <[email protected]>
1720            
1721            Nonmodal dialogs without parent (i.e. they can fall behind the main
1722            window)
1723    
1724            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
1725            all dialogs in the dialogs dictionary and the canvas.
1726    
1727            * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
1728            parent, i.e. can fall behind other windows.
1729            (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
1730            dictionary before removing it.
1731    
1732            * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
1733    
1734            * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
1735            * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
1736            * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
1737    
1738    2003-05-27  Bernhard Herzog  <[email protected]>
1739    
1740            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
1741            tableview dialog
1742            (MainWindow.TableShow): Use ShowTableView to open the dialogs.
1743            Also, don't use the table's titles as the dialog names. The titles
1744            aren't guaranteed to be unique.
1745            (MainWindow.TableOpen): Open a table view dialog after opening the
1746            table
1747    
1748    2003-05-27  Bernhard Herzog  <[email protected]>
1749    
1750            * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
1751            effect can be achieved by simply closing the window showing the
1752            table.
1753            (MainWindow.TableHide): Removed.
1754            (main_menu): Removed "table_hide"
1755    
1756    2003-05-27  Frank Koormann  <[email protected]>
1757    
1758            Fix legend tree display problems under Win32
1759    
1760            * Thuban/UI/legend.py:  BMP_SIZE_W = 15
1761            (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
1762            (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
1763    
1764            * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
1765    
1766    2003-05-27  Jan-Oliver Wagner <[email protected]>
1767    
1768            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
1769            'after' now allows to insert separators almost anywhere in the menu.
1770    
1771    2003-05-27  Frank Koormann  <[email protected]>
1772    
1773            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
1774            "S" of selection box label to hint on hot key (Alt-S). Works under
1775            Win32 but is ignored under GTK.
1776    
1777    2003-05-26  Frank Koormann  <[email protected]>
1778    
1779            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
1780            Center Choices.
1781    
1782    2003-05-26  Bernhard Herzog  <[email protected]>
1783    
1784            Remove the Precision methods again. They're too DBF specific to be
1785            part of the table interface and they're only used in table_to_dbf
1786            anyway.
1787            
1788            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
1789            fixed precision of 12 for doubles.
1790            (TransientTableBase.Precision): Removed
1791            (AutoTransientTable.Width): Delegate to self.table.
1792    
1793            * Thuban/Model/table.py (DBFTable.Precision)
1794            (MemoryTable.Precision): Removed.
1795            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
1796            (table_to_dbf): Use a fixed precision of 12 for floats unless the
1797            column object specifies something else.
1798    
1799            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
1800            test for table_to_dbf
1801    
1802    2003-05-26  Bernhard Herzog  <[email protected]>
1803    
1804            * test/test_transientdb.py
1805            (TestTransientTable.run_iceland_political_tests): Fix a comment.
1806    
1807    2003-05-26  Bernhard Herzog  <[email protected]>
1808    
1809            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
1810            implementation. Mark parts of the file format strings for
1811            localization.
1812    
1813            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
1814            file and add the table to the tables managed by the session
1815    
1816            * test/test_session.py (TestSessionSimple.test_open_table_file):
1817            New. test case for OpenTableFile
1818    
1819    2003-05-26  Jan-Oliver Wagner <[email protected]>
1820    
1821            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
1822            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
1823            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
1824            Replace the true/false of wxWindows by True/False of Python 2.2.1.
1825    
1826    2003-05-26  Jan-Oliver Wagner <[email protected]>
1827    
1828            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
1829            already a selection present, update the grid accordingly.
1830    
1831            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
1832            resizeable and increase its initial size.
1833    
1834    2003-05-26  Frank Koormann  <[email protected]>
1835    
1836            Table export functionality
1837    
1838            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
1839            Return width (in characters) for a column.
1840            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
1841            (table_to_dbf): Write table to dbf file.
1842            (table_to_csv): Write table to csv file.
1843    
1844            * Thuban/Model/transientdb.py (TransientTableBase.Width,
1845            TransientTableBase.Precision): Return column width and precision.
1846    
1847            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
1848            or table_to_csv depending on file selection.
1849    
1850            * test/test_dbf_table.py:
1851            Test table_to_dbf (extension of former part of test).
1852    
1853            * test/test_csv_table.py:
1854            Test table_to_csv.
1855    
1856    2003-05-23  Jan-Oliver Wagner <[email protected]>
1857    
1858            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
1859            Use QueryTableFrame instead of TableFrame.
1860    
1861            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
1862            table window with 'Layer Table:' instead of 'Table:'.
1863    
1864    2003-05-23  Jan-Oliver Wagner <[email protected]>
1865    
1866            Give all tables a title via mix-in TitledObject.LayerShowTable
1867    
1868            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
1869            only if it exists.
1870    
1871            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
1872            and call its init-method with a default title. Remove Title() method.
1873    
1874            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
1875            AutoTransientTable): mix-in TitledObject and call its init-method with
1876            a default title. Remove Title() method.
1877    
1878    2003-05-23  Bernhard Herzog  <[email protected]>
1879    
1880            * Thuban/Model/session.py (Session.AddShapeStore): Define
1881            AddShapeStore analogously to AddTable.
1882    
1883            * test/test_session.py (TestSessionSimple.test_add_shapestore):
1884            New. Test for AddShapeStore
1885    
1886    2003-05-23  Jan-Oliver Wagner <[email protected]>
1887    
1888            Introducing QueryTableFrame and a very coarse ShowTable implementation.
1889    
1890            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
1891            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
1892            The latter implements the selection GUI without dependency on a layer.
1893            LayerTableFrame now is derived from QueryTableFrame and connects
1894            to a layer.
1895    
1896            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
1897            implementation that still needs work.
1898    
1899            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
1900    
1901    2003-05-22  Frank Koormann  <[email protected]>
1902    
1903            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
1904            Added "outer_join = False" as optional parameter.
1905            (TransientJoinedTable.create): If outer join is true, perform a
1906            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
1907            the left table. Records not matching are filled with 0 / None.
1908    
1909            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
1910            (JoinDialog.OnJoin): Consider outer join check box.
1911    
1912    2003-05-22  Bernhard Herzog  <[email protected]>
1913    
1914            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
1915            somewhat safer way. Storing the traceback in a local variable can
1916            lead to memory leaks
1917    
1918    2003-05-22  Bernhard Herzog  <[email protected]>
1919    
1920            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
1921            the wxMessageDialog's Destroy() method.
1922    
1923    2003-05-22  Frank Koormann  <[email protected]>
1924    
1925            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
1926            TransientTable.Title()
1927    
1928    2003-05-22  Frank Koormann  <[email protected]>
1929    
1930            Join Dialog, initial version.
1931    
1932            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
1933    
1934            * Thuban/UI/join.py (JoinDialog): Functional implementation of
1935            former framework. Renamed Table1/Table2 to LeftTable/RightTable
1936            in all occurences.
1937    
1938            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
1939            Typo fixed.
1940    
1941    2003-05-22  Bernhard Herzog  <[email protected]>
1942    
1943            Give the tables titles so that the GUI can display more meaningful
1944            names. For now the titles are fixed but depend on e.g. filenames
1945            or the titles of the joined tables.
1946    
1947            * Thuban/Model/transientdb.py (TransientTable.Title)
1948            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
1949    
1950            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
1951    
1952            * test/test_transientdb.py
1953            (TestTransientTable.test_auto_transient_table_title): New. Test
1954            for the Title method
1955            (TestTransientTable.test_transient_joined_table)
1956            (TestTransientTable.test_transient_table): Add test for the Title
1957            methods
1958    
1959            * test/test_memory_table.py (TestMemoryTable.test_title): New.
1960            Test for the Title method
1961    
1962            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
1963            the Title method
1964    
1965    2003-05-22  Bernhard Herzog  <[email protected]>
1966    
1967            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
1968            Provide a better way to destroy the layers
1969            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
1970            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1971            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
1972            the new way to destroy the layers.
1973            (TestLayer.test_derived_store): New. Test for using a layer with a
1974            DerivedShapeStore
1975    
1976            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
1977            filename if the shape store actually has one.
1978    
1979    2003-05-22  Bernhard Herzog  <[email protected]>
1980    
1981            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
1982            for the filename
1983    
1984            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
1985            for the FileName method
1986            (TestDBFTableWriting.test_write): Fix spelling of filename
1987    
1988    2003-05-22  Thomas Koester  <[email protected]>
1989    
1990            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
1991            from SciParam that now really is immutable.
1992    
1993    2003-05-22  Frank Koormann  <[email protected]>
1994    
1995            Layer Top/Bottom placement added to legend.
1996    
1997            * Thuban/UI/legend.py
1998            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
1999            bound to tool events.
2000            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
2001            New, methods binding the event methods with the map methods.
2002    
2003            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
2004            layer at top/bottom of layer stack.
2005    
2006            * Resources/Bitmaps/top_layer.xpm: New button icon.
2007    
2008            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
2009    
2010    2003-05-22  Bernhard Herzog  <[email protected]>
2011    
2012            * Thuban/Model/session.py (Session.RemoveTable): New method to
2013            remove tables
2014    
2015            * test/test_session.py (TestSessionSimple.test_remove_table): New.
2016            Test for RemoveTable
2017    
2018    2003-05-22  Thomas Koester  <[email protected]>
2019    
2020            * Thuban/Model/classgen.py: Added short module doc string and CVS id.
2021            (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
2022    
2023    2003-05-22  Bernhard Herzog  <[email protected]>
2024    
2025            Implement a way to discover dependencies between tables and
2026            shapestores.
2027    
2028            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
2029            (TransientJoinedTable.Dependencies)
2030            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
2031            interface
2032            (TransientJoinedTable.__init__): Keep tack of the original table
2033            objects in addition to the corresponding transient tables.
2034    
2035            * Thuban/Model/table.py (DBFTable.Dependencies)
2036            (MemoryTable.Dependencies): New. Implement the dependencies
2037            interface
2038    
2039            * Thuban/Model/data.py (ShapeTable): New. Helper class for
2040            ShapefileStore
2041            (ShapefileStore.__init__): Use ShapeTable instead of
2042            AutoTransientTable
2043            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
2044            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
2045            methods for filename and type
2046            (ShapefileStore.Dependencies): New. Implement the dependencies
2047            interface
2048            (DerivedShapeStore): New class to replace SimpleStore. The main
2049            difference to SimpleStore is that it depends not on a shapefile
2050            but another shapestore which expresses the dependencies a bit
2051            better
2052            (SimpleStore.__init__): Add deprecation warning.
2053    
2054            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
2055            Test for the Dependencies method.
2056    
2057            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
2058            New. Test for the Dependencies method.
2059    
2060            * test/test_transientdb.py
2061            (TestTransientTable.test_auto_transient_table_dependencies): New.
2062            Test for the Dependencies method.
2063            (TestTransientTable.test_transient_joined_table): Add test for the
2064            Dependencies method.
2065    
2066            * test/test_session.py (TestSessionSimple.setUp)
2067            (TestSessionSimple.tearDown): New. Implement a better way to
2068            destroy the sessions.
2069            (TestSessionSimple.test_initial_state)
2070            (TestSessionSimple.test_add_table): Bind session to self.session
2071            so that it's destroyed by tearDown
2072            (TestSessionSimple.test_open_shapefile): New. Test for
2073            OpenShapefile and the object it returns
2074    
2075    2003-05-22  Bernhard Herzog  <[email protected]>
2076    
2077            * Thuban/Model/session.py (Session.AddTable): New method to
2078            register tables with the session.
2079            (Session.Tables): Return the tables registered with AddTable too.
2080    
2081            * test/test_session.py (TestSessionSimple.test_add_table): New.
2082            Test case for the AddTable method
2083    
2084    2003-05-22  Frank Koormann  <[email protected]>
2085    
2086            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
2087            lower right corner, center labels for selections, initialize controls
2088            in reasonable order for keyboard navigation.
2089    
2090            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
2091            (ProjFrame.__DoOnProjAvail): Determine position of current projection
2092            using the wxListBox.FindString() method. Still a problem (#1886)
2093    
2094            * Thuban/UI/classifier.py
2095            (Classifier.__init__, SelectPropertiesDialog.__init__)
2096    
2097            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
2098            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
2099            different classification types from here to __init__.
2100            (GenUniquePanel.__init__): Set the column width of the first field
2101            in the Field ListCtrl to the full width.
2102    
2103            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
2104            Button to 'Export'. Center Buttons in Selection Box, set Focus to
2105            Grid.
2106            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
2107            changes focus to the Selection when pressing "Alt-S".
2108    
2109            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
2110            the text if not visible. The italic font sometimes exceeds the
2111            rendering area.
2112    
2113    2003-05-21  Jonathan Coles   <[email protected]>
2114    
2115            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
2116            to OnClose so that Thuban closes correctly.
2117    
2118            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
2119            DockFrame.OnClose, not DockFrame._OnClose.
2120    
2121    2003-05-21  Jonathan Coles   <[email protected]>
2122    
2123            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
2124            references to 'inf' and use new Range __init__ to pass floats
2125            directly rather than converting them to strings first.
2126            Fixes RTBug #1876.
2127    
2128            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
2129            Use new Range ___init__ to pass floats.
2130    
2131            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
2132            filename is a valid image file. Throw IOError otherwise.
2133    
2134            * Thuban/Model/range.py: Brought over new Range from SciParam that
2135            is immutable and has an __init__ which can accept floats.
2136    
2137            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
2138            into try block. AddLayer doesn't throw any exceptions anymore.
2139            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
2140            try block.
2141    
2142            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
2143            the first item in choices. Fixes RTBug #1882.
2144    
2145            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
2146            has gone to 0 which is a serious problem. abort.
2147            (MapRenderer.draw_raster_layer): Catch IOError seperately and
2148            print the error from GDAL.
2149    
2150            * Thuban/UI/tableview.py (TableGrid.__init__): Call
2151            ToggleEventListeners to turn on listening.
2152            (TableGrid.ToggleEventListeners): New. Turns event listening on
2153            and off so as to prevent excessive messages.
2154            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
2155            to suppress excessive messages when selecting many rows.
2156            Fixes RTBug #1880.
2157    
2158            * Thuban/UI/view.py: Added checks against if scale == 0. This
2159            is a serious problem that can occur when an image without
2160            geo data is loading and causes the map projection bounds to
2161            go to infinity. Right now, the solution is to simply try
2162            to recover.
2163    
2164            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
2165            to set the MFILEReceiver attributes even if the data is NULL.
2166    
2167            * extensions/thuban/gdalwarp.cpp: Improved the error handling
2168            and passed GDAL messages back up to the Python layer. Also
2169            tried to fix some memory leaks that were present in the original
2170            utility but didn't matter because the program aborted.
2171    
2172            * test/test_range.py: Copied over tests from SciParam. Removed
2173            tests against importing. Fixes RTBug #1867.
2174    
2175    2003-05-21  Bernhard Herzog  <[email protected]>
2176    
2177            * test/test_load.py: Remove unused imports and restructure the
2178            test code
2179            (LoadSessionTest): Split into one class for each test and turn
2180            LoadSessionTest itself into the base class for all such session
2181            tests.
2182            (ClassificationTest): New base class for load tests that test
2183            classifications
2184            (TestSingleLayer, TestLayerVisibility, TestClassification)
2185            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
2186            for the individual tests
2187    
2188            * test/support.py (FileLoadTestCase.filename): New base class for
2189            file loading tests
2190    
2191    2003-05-21  Jan-Oliver Wagner <[email protected]>
2192    
2193            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
2194            Mercator' to 'UTM Zone 32' as a more convenient example.
2195            Added 'Gauss Krueger Zone 6'.
2196    
2197            * Data/iceland_sample_raster.thuban: political polygon now
2198            filled transparent to have the raster image visible at once.
2199    
2200    2003-05-21  Frank Koormann  <[email protected]>
2201    
2202            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
2203            OnClose() to keep in sync with extensions. Internally Thuban
2204            still uses "underscored" names.
2205    
2206    2003-05-20  Jonathan Coles   <[email protected]>
2207    
2208            This puts back Raster layer support. These layers support projections
2209            through the GDAL library. Currently, the CVS version is being used.
2210            There are no Debian packages available although this may change soon.
2211            A GDAL driver was extended to support writing to memory rather to
2212            files.
2213    
2214            There is still some work that needs to be done, such as some error
2215            handling when loading invalid images or when there is a problem
2216            projecting the image. This putback simply checks in the majority
2217            of the work.
2218    
2219            * setup.py: Add gdalwarp library extension.
2220    
2221            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
2222            Defaults to False, but can be overridden by subclasses if they
2223            support classification.
2224            (RasterLayer): New. Defines a new layer that represents an
2225            image.
2226    
2227            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
2228            tag handler.
2229            (SessionLoader.start_layer): Encode the filename.
2230            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
2231            New. Supports reading a rasterlayer tag.
2232    
2233            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
2234    
2235            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
2236            get a string in Latin1. If we get such as string convert it to
2237            unicode first, otherwise leave if alone before encoding.
2238            (SessionSaver.write_layer): Add support for writing both Layers
2239            and RasterLayers.
2240    
2241            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
2242            The right argument may not be a string, it could also be a Column.
2243    
2244            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
2245            Make initial window size 600x400. Fixes RTBug #1872.
2246    
2247            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
2248            the dialog is constructed so that we can support layers that
2249            do not have classifications.
2250            (Classifier._OnTry): Only build a classification if the layer
2251            supports one.
2252    
2253            * Thuban/UI/legend.py: Change all checks that a layer is an
2254            instance of Layer into checks against BaseLayer.
2255            (LegendTree.__FillTreeLayer): Only add children to a branch if
2256            the layer supports classification.
2257    
2258            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
2259            MainWindow.OpenSession): Don't proceed with an action if the
2260            user chooses Cancel when they are asked to save changes.
2261            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
2262            user to select an image file. Create a new RasterLayer and add
2263            it to the map.
2264    
2265            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
2266            for rendering RasterLayer layers.
2267            (MapRenderer.draw_raster_layer): Actually method that calls
2268            the GDALWarp python wrapper and constructs an image from the
2269            data returned.
2270    
2271            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
2272            Choices symbols to match those used in the table query method.
2273            Replace deprecated method calls on table with new method names.
2274    
2275            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
2276            how small the scale can get. This still needs more testing.
2277    
2278            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
2279            Provides a driver to output in .bmp format.
2280    
2281            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
2282            New. Provides IO routines which write to memory, rather than a file.
2283    
2284            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
2285            of the gdalwarp utility provided in GDAL. Added function calls
2286            that can be accessed from python.
2287    
2288            * Data/iceland_sample_raster.thuban: New. Sample file that uses
2289            a raster layer.
2290    
2291            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
2292            layer image data.
2293    
2294            * Doc/thuban.dtd: Added rasterlayer attribute definition.
2295    
2296            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
2297            tests associated with the raster layer code.
2298    
2299            * test/test_transientdb.py
2300            (TestTransientTable.test_auto_transient_table_query): Added a test
2301            for using a Column object as the "right" parameter to a query.
2302    
2303    2003-05-19  Frank Koormann  <[email protected]>
2304    
2305            * Thuban/version.py (get_changelog_date):
2306            Catch exceptions if ChangeLog does not exist.
2307    
2308            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
2309    
2310    2003-05-19  Frank Koormann  <[email protected]>
2311    
2312            Extended version information for Thuban
2313    
2314            * Thuban/version.py: New, version information for Thuban: Last
2315            modification date and last ChangeLog entry date.
2316    
2317            * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
2318            information: Display Thuban, wxPython and Python version.
2319    
2320    2003-05-16  Bernhard Herzog  <[email protected]>
2321    
2322            * Thuban/Model/save.py: Remove some unused imports including the
2323            __future__ import for nested_scopes as Thuban relies on Python 2.2
2324            now.
2325            (XMLWriter.encode): Remove the special case for a None argument.
2326            In the saver encode is always called with a string argument.
2327    
2328    2003-05-16  Bernhard Herzog  <[email protected]>
2329    
2330            * Thuban/UI/__init__.py: Remove the work-around for the locale bug
2331            in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
2332            of the bug was that e.g. float("1.2") would fail. Thuban now
2333            requires 2.4.x.
2334            
2335    2003-05-16  Frank Koormann   <[email protected]>
2336    
2337            Printing enhancement and WMF export (under Win32)
2338    
2339            * Thuban/UI/renderer.py (ExportRenderer): New, derived from
2340            ScreenRenderer. Renders Map, Legend and Scalebar for export.
2341            (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
2342            PrintRender.
2343    
2344            * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
2345            to fullfil information needed for PrinterRenderer.
2346            (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
2347            (MapCanvas.Print): Adapted to new MapPrintout.
2348            (OutputTransform): General calculations to transform from canvas
2349            coordinates to export/printing devices.
2350    
2351            * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
2352            new method_command to call ExportMap, with platform dependency (only
2353            __WXMSW__)
2354      
2355            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
2356            of scalebar drawing area as new parameters.
2357            
2358            * Thuban/Model/scalebar.py (roundInterval): round long instead of int
2359    
2360            * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
2361            Update to extended scalebar.DrawScalebar header.
2362    
2363            * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
2364    
2365            * test/test_scalebar.py: Made test executable as standalone.
2366    
2367    2003-05-16  Bernhard Herzog  <[email protected]>
2368    
2369            * Thuban/Model/table.py (Table): Remove this compatibility alias
2370            for DBFTable.
2371    
2372            * test/test_table.py: Import DBFTable as Table because that alias
2373            doesn't exist anymore.
2374    
2375            * Thuban/UI/classgen.py: Remove some unused imports
2376    
2377    2003-05-14  Jonathan Coles   <[email protected]>
2378    
2379            * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
2380            Fix docstring.
2381            (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
2382            (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
2383            values of the supplied range to determine the beginning and end
2384            bounds of the generated classes.
2385    
2386            * Thuban/Model/range.py (Range.number_re): Now accepts floats that
2387            do not have a leading 0 (.5 is now accepted as well as 0.5).
2388    
2389            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
2390            call to ClassGenerator.GenUniformDistribution.
2391    
2392            * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
2393            layout bug with the 'Projection' label.
2394    
2395            * test/support.py (FloatTestCase): New. Needed for the Range tests.
2396    
2397            * test/test_range.py: New. Imported from SciParam.
2398    
2399    2003-05-12  Jonathan Coles   <[email protected]>
2400    
2401            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
2402            to table.UniqueValues() with calls that retrieve all the values
2403            from the table. This will need to be replaced by a method on table
2404            which can simply return the list (perhaps more efficiently).
2405    
2406    2003-05-12  Jonathan Coles   <[email protected]>
2407    
2408            The return value of ClassGenerator.CalculateQuantiles has changed.
2409            Refer to the documentation for details.
2410    
2411            * test/test_classgen.py: Modified Quantile tests to use the
2412            new return values.
2413    
2414            * Thuban/Model/classgen.py
2415            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
2416            use new return values from CalculateQuantiles to produce the correct
2417            range bounds in the Classification.
2418            (ClassGenerator.CalculateQuantiles): Add more comments describing
2419            the return values and parameters. Make minor adjustments to improve
2420            the legibility of the code. Fix problem with adjusted not being set
2421            in most cases.
2422    
2423    2003-05-12  Frank Koormann <[email protected]>
2424            
2425            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
2426            and latin1. Fixes #1851 finally.
2427    
2428    2003-05-09  Jonathan Coles   <[email protected]>
2429    
2430            * test/test_classgen.py: New. Tests the Quantile algorithm.
2431    
2432            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
2433            Clean up debugging statement, add comments, fix a small bug in the
2434            returned adjusted percentiles.
2435            
2436    2003-05-09  Jonathan Coles   <[email protected]>
2437    
2438            Introduces Range class from SciParam into the ClassGroupRange class,
2439            and such ranges can now be saved and loaded from disk.
2440    
2441            Quantiles are now available in the Classification Generator.
2442    
2443            Initial support for building Queries on a table. Doesn't do anything
2444            but run some tests.
2445    
2446            * Thuban/Model/classification.py: Explicit imports.
2447            (ClassGroupRange): Use the Range class to store the underlying
2448            range information. The interface remains the same, except for
2449            GetRange(), and you can also supply a Range object as the min
2450            parameter to SetRange or __init__.
2451    
2452            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
2453            string appropriately for use in Thuban. Fixes RTbug #1851.
2454            (SessionLoader.end_projection): Handle the context of the
2455            projection tag a bit better by looking at what objects are not
2456            None. There was an assumption that a projection tag for a map
2457            could occur before any layers.
2458            (SessionLoader.start_clrange): Provide backward compatibility for
2459            reading min/max values as well as the new range parameter.
2460    
2461            * Thuban/Model/map.py: Explicit imports.
2462    
2463            * Thuban/Model/resource.py: Import _.
2464            (ProjFileSaver.write): write header using projfile.dtd.
2465    
2466            * Thuban/Model/save.py: Explicit imports.
2467            (XMLWriter.encode): New. Encode the given string from a format
2468            used by Thuban into UTF-8. Fixes RTbug #1851.
2469    
2470            * Thuban/UI/classgen.py: Explicit imports.
2471            (ClassGenDialog.__init__): Clean up the code and add support
2472            for Quantiles.
2473            (ClassGenDialog.OnOK): Add support for Quantiles.
2474            (GenQuantilesPanel): New. Input panel for Quantiles.
2475            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
2476            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
2477    
2478            * Thuban/Model/classgen.py: New. Contains all the classes named above.
2479    
2480            * Thuban/UI/classifier.py: Explicit imports.
2481            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
2482            ClassTable.SetValueAsCustom): Reworked to use new Range class.
2483    
2484            * Thuban/UI/legend.py: Explicit imports.
2485    
2486            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
2487            a Table menu and associated method calls.
2488            (MainWindow.choose_color): Removed. No longer needed.
2489    
2490            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
2491            should be disabled if no projection is selected in the available
2492            list.
2493    
2494            * Thuban/UI/renderer.py: Explicit imports.
2495    
2496            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
2497            with correctly selecting the rows and issuing the right events.
2498            Be sure to call Skip() to allow the grid to do some of its own
2499            handling which allows the rows to actually be selected.
2500            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
2501            selecting multiple shapes.
2502            (LayerTableFrame): Support for building Queries.
2503            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
2504    
2505            * Thuban/UI/tree.py: Explicit imports.
2506    
2507            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
2508            table view can call it.
2509    
2510            * test/test_classification.py: Explicit imports.
2511            (TestClassification.test_ClassGroupRange): Fix test for new
2512            Range class.
2513    
2514            * Doc/thuban.dtd: Add range parameter for clrange.
2515    
2516            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
2517            object in ClassGroupRange, and also uesd for inputting ranges in
2518            the classifer table and elsewhere.
2519    
2520            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
2521            yet.
2522    
2523    2003-05-09  Frank Koormann <[email protected]>
2524    
2525            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
2526    
2527    2003-05-08  Frank Koormann <[email protected]>
2528    
2529            Coding style updates
2530    
2531            * test/test_scalebar.py: Replaced tab indentation by spaces.
2532    
2533            * Thuban/UI/scalebar.py: Explicit imports.
2534    
2535    2003-05-08  Frank Koormann <[email protected]>
2536    
2537            * Thuban/UI/scalebar.py
2538            (ScaleBar.DrawScalebar): Format string bug fixed.
2539    
2540    2003-05-08  Frank Koormann <[email protected]>
2541    
2542            Reorganization of scalebar component (no wx in Thuban/Model)
2543    
2544            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
2545            (deriveInterval):
2546            Calculate scalebar interval and unit which fits in width for scale.
2547            (roundInterval): Round float.
2548    
2549            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
2550    
2551            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
2552    
2553            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
2554    
2555    2003-05-08  Frank Koormann <[email protected]>
2556    
2557            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
2558            Initialize ScaleBar with canvas.map
2559    
2560            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
2561            round intervals to display smarter lengths
2562            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
2563            layer. If the maps has no projection applied grey the scalebar.
2564    
2565    2003-05-07  Frank Koormann <[email protected]>
2566            
2567            Basic Scalebar features added.
2568    
2569            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
2570    
2571            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
2572            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
2573            and the renderer.
2574    
2575            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
2576    
2577            * Thuban/UI/messages.py: SCALE_CHANGED added.
2578    
2579    2003-05-07  Bernhard Herzog  <[email protected]>
2580    
2581            * Thuban/Model/session.py (Session.__init__): New instance
2582            variable shapestores to hold a list of all open shapestore objects
2583            (Session.ShapeStores): New. Accessor method for the shapestores
2584            list.
2585            (Session._add_shapestore, Session._clean_weak_store_refs): New.
2586            Internal methods to maintain the shapestores list.
2587            (Session.Tables): New. Return all tables open in the session.
2588            (Session.OpenShapefile): Insert the new ShapeStore into the
2589            shapestores list.
2590    
2591            * test/test_session.py (TestSessionSimple.test_initial_state): Add
2592            tests for ShapeStores and Tables
2593            (TestSessionWithContent.test_shape_stores)
2594            (TestSessionWithContent.test_tables): New. Test cases for
2595            ShapeStores and Tables
2596    
2597    2003-05-07  Bernhard Herzog  <[email protected]>
2598    
2599            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
2600            Add comments about the optimizations used.
2601            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
2602            Implement the ReadValue table interface method.
2603    
2604            * test/test_transientdb.py
2605            (TestTransientTable.run_iceland_political_tests)
2606            (TestTransientTable.test_transient_joined_table): Add tests for
2607            ReadValue
2608    
2609    2003-05-07  Frank Koormann <[email protected]>
2610    
2611            * Resources/Bitmaps/fulllayerextent.xpm,
2612            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
2613            new icons.
2614    
2615    2003-05-06  Bernhard Herzog  <[email protected]>
2616    
2617            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
2618            New. Simply delegate to the transient table's version.
2619    
2620            * test/test_transientdb.py
2621            (TestTransientTable.test_auto_transient_table_query): New. Test
2622            case for AutoTransientTable's SimpleQuery
2623    
2624    2003-05-06  Bernhard Herzog  <[email protected]>
2625    
2626            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
2627            Implement a simple query method for the query dialog
2628            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
2629            the row index or shapeid.
2630            (TransientTable.create): Insert the right value of the row index
2631            (TransientJoinedTable.create): Copy the row index of the left
2632            table to the joined result table
2633    
2634            * test/test_transientdb.py
2635            (TestTransientTable.test_transient_table_read_twice): Fix
2636            doc-string
2637            (TestTransientTable.test_transient_table_query): New. Test for the
2638            SimpleQuery method
2639    
2640    2003-05-06  Bernhard Herzog  <[email protected]>
2641    
2642            Convert all table users to use the new table interface. This only
2643            covers Thuban itself, not GREAT-ER or other applications built on
2644            Thuban yet, so the compatibility interface stays in place for the
2645            time being but it now issues DeprecationWarnings.
2646    
2647            Finally, the new Table interface has a new method, HasColumn.
2648    
2649            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
2650            issue deprecation warnings when they're. The warnings refer to the
2651            caller of the method.
2652            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
2653            for the deprecation warnings
2654    
2655            * test/test_table.py: Ignore the deprecation warnings for the old
2656            table in the tests in this module. The purpose of the tests is to
2657            test the old interface, after all.
2658    
2659            * test/test_transientdb.py
2660            (TestTransientTable.run_iceland_political_tests): Use the
2661            constants for the types. Add a test for HasColumn
2662            (TestTransientTable.test_transient_joined_table): Adapt to new
2663            table interface. Add a test for HasColumn
2664            (TestTransientTable.test_transient_table_read_twice): Adapt to new
2665            table interface
2666    
2667            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
2668            Adapt to new table interface
2669    
2670            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
2671            new table interface
2672    
2673            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
2674            (RecordTable.SetTable): Adapt to new table interface
2675    
2676            * Thuban/UI/classifier.py (Classifier.__init__)
2677            (Classifier.__init__): Adapt to new table interface
2678    
2679            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
2680            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
2681            to new table interface
2682    
2683            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
2684            (AutoTransientTable.HasColumn): Implement the new table interface
2685            method
2686            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
2687            (AutoTransientTable.UniqueValues): Adapt to new table interface
2688    
2689            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
2690            Adapt to new table interface
2691    
2692            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
2693            simplify opening shapefiles a bit easier.
2694            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
2695            (TestLayer.test_point_layer): Use the new helper method
2696            (TestLayer.test_get_field_type): New. Test for the GetFieldType
2697            method
2698    
2699            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
2700            the new table method
2701    
2702            * test/test_memory_table.py (TestMemoryTable.test_has_column):
2703            Test for the new table method HasColumn
2704    
2705    2003-05-06  Jonathan Coles   <[email protected]>
2706    
2707            Addresses the "Selection Extent" wish of RTbug #1787.
2708    
2709            * Resources/Bitmaps/fulllayerextent.xpm,
2710            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
2711            extent. These are just place holders for the real bitmaps.
2712    
2713            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
2714            calculate the bounding box once (the first time compute_bbox() is
2715            called).
2716            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
2717            the bounding box for the shapes in lat/long coordinates.
2718    
2719            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
2720            option.
2721            (MainWindow.has_selected_shapes): New. Returns true if there are
2722            any selected shapes.
2723            (MainWindow.FullSelectionExtent): New. Calls
2724            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
2725            (_has_selected_shapes): New. Returns true if there are any
2726            selected shapes.
2727    
2728            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
2729            true if there are any selected shapes.
2730    
2731            * Thuban/UI/view.py (MapCanvas): Added delegated method
2732            HasSelectedShapes.
2733            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
2734            shapes on the canvas using the map projection (if any).
2735    
2736            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
2737            for Layer.ShapesBoundingBox().
2738    
2739    2003-05-06  Bernhard Herzog  <[email protected]>
2740    
2741            * Resources/Projections/defaults.proj: Fix spelling of Mercator
2742    
2743    2003-05-05  Jonathan Coles   <[email protected]>
2744    
2745            Addresses the "Full Layer Extent" wish of RTbug #1787.
2746    
2747            * Resources/Projections/defaults.proj: Added UK National Grid.
2748    
2749            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
2750            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
2751            when the user selects the menu option.
2752    
2753            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
2754            scales the given layer on the canvas using the map projection.
2755    
2756    2003-05-05  Bernhard Herzog  <[email protected]>
2757    
2758            Convert the table implementations to a new table interface. All
2759            tables use a common mixin class to provide backwards compatibility
2760            until all table users have been updated.
2761    
2762            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
2763            provide backwards compatibility for table classes implementing the
2764            new interface
2765            (DBFTable, MemoryTable): Implement the new table interface. Use
2766            OldTableInterfaceMixin as base for compatibility
2767            (DBFColumn, MemoryColumn): New. Column description for DBFTable
2768            and MemoryTable resp.
2769    
2770            * test/test_dbf_table.py: New. Test cases for the DBFTable with
2771            the new table interface.
2772    
2773            * test/test_memory_table.py: New. Test cases for the MemoryTable
2774            with the new table interface.
2775    
2776            * test/test_table.py: Document the all tests in this file as only
2777            for backwards compatibility. The equivalent tests for the new
2778            interface are in test_memory_table.py and test_dbf_table.py
2779            (MemoryTableTest.test_read): field_info should be returning tuples
2780            with four items
2781            (MemoryTableTest.test_write): Make doc-string a more precise.
2782    
2783            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
2784            table interface. Derive from from OldTableInterfaceMixin for
2785            compatibility.
2786            (TransientTableBase.create): New intance variable column_map to
2787            map from names and indices to column objects
2788            (TransientTable.create): Use the new table interface of the input
2789            table
2790            (AutoTransientTable): Convert to new table interface. Derive from
2791            from OldTableInterfaceMixin for compatibility.
2792            (AutoTransientTable.write_record): Removed. It's not implemented
2793            yet and we still have to decide how to handle writing with the new
2794            table and data framework.
2795    
2796            * test/test_transientdb.py
2797            (TestTransientTable.run_iceland_political_tests)
2798            (TestTransientTable.test_transient_joined_table): Use the new
2799            table interface
2800    
2801    2003-05-05  Jonathan Coles   <[email protected]>
2802    
2803            This is namely a collection of UI updates to improve user interactivity.
2804            Tabbing between controls now exists and you can use ESC to close dialog
2805            boxes; ENTER will active the default button.
2806    
2807            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
2808            order that the controls are created so that tabbing works correctly.
2809            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
2810            wxDialog can handle the default button correctly.
2811            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
2812            same reasons as for OnOK.
2813            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
2814            when we ask the table for the maximum/minimum values of a field
2815            which could take a very long time.
2816    
2817            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
2818            order that the controls are created so that tabbing works correctly.
2819            (SelectPropertiesDialog.__init__): Rearrange the order that the
2820            controls are created so that tabbing works correctly.
2821    
2822            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
2823            to derive from a wxDialog but behave like the original implementation
2824            which was derived from a wxFrame. wxDialog provides useful key
2825            handling functionality like ESC calling OnCancel and ENTER calling
2826            OnOK which is lost with wxFrame.
2827    
2828            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
2829            new dialogs.
2830    
2831            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
2832            order that the controls are created so that tabbing works correctly.
2833            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
2834            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
2835            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
2836            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
2837            can provide the "UK National Grid" as a default projection.
2838            (UTMPanel.__init__): Rearrange the order that the controls are
2839            created so that tabbing works correctly.
2840    
2841    2003-05-05  Bernhard Herzog  <[email protected]>
2842    
2843            * extensions/thuban/wxproj.cpp: Fix some of the comments.
2844            (project_point): If a map projection but no layer projection is
2845            given, convert degrees to radians before applying the map
2846            projection.
2847    
2848            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
2849            (TableGrid.allow_messages): New methods to make it possible to
2850            inhibit message sending.
2851            (TableGrid.issue): Only send the message if not inhibited.
2852            (LayerTableGrid.select_shape): Use the new methods to make sure
2853            that no ROW_SELECTED message is sent while we're updating the
2854            selected rows to match the selected shapes.
2855    
2856    2003-05-02  Jan-Oliver Wagner <[email protected]>
2857    
2858            Implementation of MemoryTable.
2859    
2860            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
2861            implementation that operates on a list of tuples. All of the data
2862            are kept in the memory.
2863    
2864            * test/test_table.py (MemoryTableTest): New.
2865    
2866            * test/test_transientdb.py (SimpleTable): Removed.
2867            (TestTransientTable.test_transient_joined_table,
2868            (TestTransientTable.test_transient_table_read_twice): Replaced
2869            SimpleTable by MemoryTable.
2870    
2871    2003-04-30  Jonathan Coles   <[email protected]>
2872    
2873            * Data/iceland_sample.thuban: Now contains correct projections
2874            for each of the layers.
2875    
2876            * Resources/Projections/defaults.proj: Geographic projection
2877            contains unit conversion parameter.
2878    
2879    2003-04-30  Jonathan Coles   <[email protected]>
2880    
2881            The most important part of this putback is the projection changes.
2882            It should now be possible to specify the projection that a layer
2883            is in and then specify a different projection for the map. The
2884            projection dialog has an extra parameter for a geographic projection
2885            which lets the user select if the input is in degrees or radians.
2886    
2887            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
2888            to say that the parameter is a tuple of unprojected
2889            points (which is what the callers to this method were assuming).
2890            Also, since the points are unprojected we need to projected them.
2891    
2892            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
2893            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
2894            groups are selected, move the layer up/down. Fixes RTbug #1833.
2895    
2896            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
2897    
2898            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
2899            parameter in call to SetClientData.
2900            (GeoPanel): Add support for selecting the units that the
2901            source data is in (Radians or Degrees).
2902    
2903            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
2904            the rendering loop by reducing the number of if's, removing the
2905            unnecessary try/except block, and checking if the old group
2906            is the same as the new one (which happens a lot if there is
2907            no classification, or lots of shapes are in the same group).
2908    
2909            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
2910            around the redraw routine to try to catch problems that the user
2911            may create by selecting invalid projections for the data set and
2912            map. Clears the display if there are any problems and prints the
2913            error.
2914            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
2915            rectangle.
2916    
2917            * extensions/thuban/wxproj.cpp (project_point): First invert the
2918            supplied point (which should be in projected coordinates) using
2919            the layer's projection and then project the point using the
2920            map's projection.
2921            (project_points): Use project_point() to project each point.
2922    
2923    2003-04-30  Jan-Oliver Wagner <[email protected]>
2924    
2925            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
2926            don't set the Classification to None if the classfication field
2927            is None (ie only a DEFAULT).
2928    
2929    2003-04-30  Bernhard Herzog  <[email protected]>
2930    
2931            * Thuban/UI/view.py: Fix some typos.
2932    
2933            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
2934            not pop up the dialog if the selection becomes empty (this could
2935            happen if e.g. a new selection is opened while the identify tool
2936            is active and dialog had been closed)
2937    
2938    2003-04-30  Bernhard Herzog  <[email protected]>
2939    
2940            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
2941            instance variable read_record_last_result
2942            (TransientTableBase.read_record): Make sure reading the same
2943            record twice works. The implementation uses the new instance
2944            variable read_record_last_result
2945    
2946            * test/test_transientdb.py
2947            (TestTransientTable.test_transient_table_read_twice): New test
2948            case for the above bug-fix.
2949    
2950    2003-04-29  Jonathan Coles   <[email protected]>
2951    
2952            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
2953    
2954            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
2955    
2956            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
2957            (ClassTable.SetValueAsCustom): Rename keyword argument in
2958            ClassGroup* constructors to match argument name.
2959    
2960    2003-04-29  Bernhard Herzog  <[email protected]>
2961    
2962            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
2963            transient DB if it exists to make sure it doesn't leave a journal
2964            file in the temp directory.
2965    
2966            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
2967            self.conn to None after closing the connection to make sure it's
2968            not closed twice
2969    
2970    2003-04-29  Jonathan Coles   <[email protected]>
2971    
2972            Add a visible parameter in the layer XML tag. The default value is
2973            "true". If anything other than "false" is specified we also assume
2974            "true". Addresses RTbug #1025.
2975    
2976            * Doc/thuban.dtd: Add visible parameter to a layer.
2977    
2978            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
2979            of visible from 1 to True.
2980            (Layer.__init__): Change default value of visible from 1 to True.
2981    
2982            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
2983            parameter.
2984    
2985            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
2986            parameter.
2987    
2988            * test/test_load.py: Add new test data contents_test_visible.
2989            (LoadSessionTest.setUp): save test data.
2990            (LoadSessionTest.testLayerVisibility): Test if the visible flag
2991            is loaded correctly.
2992    
2993            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
2994            for saving an invisible layer.
2995    
2996    2003-04-29  Jonathan Coles   <[email protected]>
2997    
2998            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
2999            legend dialog box and tell it to change its map to the one
3000            supplied to SetMap(). Fixes RTbug #1770.
3001    
3002    2003-04-29  Bernhard Herzog  <[email protected]>
3003    
3004            Next step of table implementation. Introduce a transient database
3005            using SQLite that some of the data is copied to on demand. This
3006            allows us to do joins and other operations that require an index
3007            for good performance with reasonable efficiency. Thuban now needs
3008            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
3009            haven't tested that.
3010            
3011            * Thuban/Model/transientdb.py: New. Transient database
3012            implementation.
3013    
3014            * test/test_transientdb.py: New. Tests for the transient DB
3015            classes.
3016    
3017            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
3018            classes to help automatically remove temporary files and
3019            directories.
3020            (Session.__init__): New instance variables temp_dir for the
3021            temporary directory and transient_db for the SQLite database
3022            (Session.temp_directory): New. Create a temporary directory if not
3023            yet done and return its name. Use AutoRemoveDir to have it
3024            automatically deleted
3025            (Session.TransientDB): Instantiate the transient database if not
3026            done yet and return it.
3027    
3028            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
3029            AutoTransientTable so that data is copied to the transient DB on
3030            demand.
3031            (SimpleStore): New class that simply combines a table and a
3032            shapefile
3033    
3034            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
3035            DBFTable and update its doc-string to reflect the fact that this
3036            is only the table interface to a DBF file. Table is now an alias
3037            for DBFTable for temporary backwards compatibility.
3038    
3039            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
3040            the last reference to the session goes away so that the temporary
3041            files are removed properly.
3042    
3043            * test/test_load.py (LoadSessionTest.tearDown): Remove the
3044            reference to the session to make sure the temporary files are
3045            removed.
3046    
3047    2003-04-29  Bernhard Herzog  <[email protected]>
3048    
3049            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
3050            the __parser instance variable into a normal local variable in
3051            read. It's only used there and read will never be called more than
3052            once. Plus it introduces a reference cycle that keeps can keep the
3053            session object alive for a long time.
3054    
3055    2003-04-29  Jonathan Coles   <[email protected]>
3056    
3057            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
3058            Projection an immutable item. Fixes RTbug #1825.
3059            (Projection.__init__): Initialize instance variables here.
3060            (ProjFile.Replace): New. Replace the given projection object with
3061            the new projection object. This solves the problem of needing the
3062            mutator Projection.SetProjection() in the ProjFrame class and
3063            allows a projection to change parameters without changing its
3064            location in the file.
3065    
3066            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
3067            be of type wxSAVE and should verify overwriting a file.
3068    
3069            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
3070            ProjFile.Replace() method instead of the mutator
3071            Projection.SetProjection(). Also requires that we reassign the
3072            client data to the new projection.
3073    
3074            * test/test_proj.py (TestProjection.test): Test GetName() and
3075            GetAllParameters()
3076            (TestProjFile.test): Remove tests for Set*() methods. Add tests
3077            for Replace().
3078    
3079    2003-04-25  Jonathan Coles   <[email protected]>
3080    
3081            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
3082            to save the name of the projection.
3083    
3084            * test/test_save.py (SaveSessionTest.testLayerProjection): New
3085            test to verify layer projections are saved correctly.
3086    
3087    2003-04-25  Jonathan Coles   <[email protected]>
3088    
3089            * Thuban/Model/proj.py (Projection.SetName): Set the name
3090            to "Unknown" if name is None.
3091            (Projection.SetAllParameters): New. Set the projection's
3092            parameter list to the one supplied.
3093            (Projection.SetProjection): New. Set the projection's
3094            properties to those of the supplied Projection.
3095    
3096            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
3097            the dialog title to include the map's title.
3098            (MainWindow.LayerProjection): Set the dialog title to include
3099            the layer's title.
3100    
3101            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
3102            error dialogs into a single method call.
3103            (ProjFrame.__VerifyButtons): Add more states to check.
3104            (ProjFrame.__GetProjection): Return the current state of an
3105            edited projection or None.
3106            (ProjFrame.__FillAvailList): Remove checks for states that
3107            shouldn't exist.
3108            (ProjFrame._OnNew): Clear all selected items and supply
3109            a projection panel if necessary.
3110    
3111            * test/test_proj.py (TestProjFile.test): Add tests for
3112            ProjFile.SetAllParameters, ProjFile.SetProjection,
3113            ProjFile.SetName.
3114    
3115    2003-04-25  Jonathan Coles   <[email protected]>
3116    
3117            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
3118            takes an optional argument to select the current projection.
3119            This does not guarantee that the item is visible due to
3120            limited wxWindows functionality. Fixes RTBug #1821.
3121    
3122    2003-04-25  Jonathan Coles   <[email protected]>
3123    
3124            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
3125            the projection name and use it when constructing the Projection
3126            object.
3127    
3128            * Thuban/Model/proj.py (Projection.__init__): Change the default
3129            value for 'name' to None and then test if name is equal to None
3130            in the body of the constructor. This way the caller doesn't have to
3131            know what the default value should be. Namely, useful in load.py
3132            where we have to pick a default value if the 'name' parameter
3133            doesn't exist in the XML file.
3134    
3135            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
3136            Tests a file where a layer has a projection.
3137    
3138    2003-04-25  Jonathan Coles   <[email protected]>
3139    
3140            * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
3141            tree for projection information.
3142    
3143            * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
3144            XMLReader.GetFileName.
3145            (SessionLoader): Added support for loading projection tags that
3146            appear inside a layer.
3147    
3148            * Thuban/Model/proj.py (ProjFile): Document the class. Move
3149            back to using a list because the order of the projections in
3150            the file is important to maintain. Fixes RTbug #1817.
3151    
3152            * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
3153            to ProjFile.GetFilename.
3154    
3155            * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
3156            information.
3157    
3158            * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
3159            ProjFrame._OnSaveAs. Removed old dead code from previous
3160            implementation.
3161            (ProjFrame._OnExport): Add support for exporting more than one
3162            projection to a single file.
3163            (ProjFrame.__FillAvailList): use string formatting (% operator)
3164            to build strings that are (partly) translated. Fixes RTbug #1818.
3165    
3166            * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
3167            class.
3168    
3169    2003-04-24  Bernhard Herzog  <[email protected]>
3170    
3171            * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
3172    
3173            * po/fr.po: New. French translation by Daniel Calvelo Aros
3174    
3175            * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
3176            empty strings.
3177    
3178    2003-04-24  Jonathan Coles   <[email protected]>
3179    
3180            * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
3181            implement the interface that the ProjFrame dialog expects.
3182    
3183            * Thuban/Model/proj.py (Projection.SetName): New. Allows the
3184            name of the projection to be changed.
3185            (ProjFile): Use a dictionary instead of a list so that removing
3186            projections is easier and we are sure about uniqueness.
3187            (ProjFile.Remove): Remove the given projection object.
3188    
3189            * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
3190            Return a list with only one projection file instead of searching for
3191            any projection file. This simplifies many things if the user can
3192            only have one system file and one user file.
3193    
3194            * Thuban/UI/classgen.py: Change all references to
3195            genCombo to genChoice.
3196    
3197            * Thuban/UI/mainwindow.py: Add a Projection option under the
3198            layer menu.
3199            (MainWindow.LayerProjection): New. Open up a projection window
3200            for a layer.
3201    
3202            * Thuban/UI/projdialog.py: Large changes to how the dialog is
3203            laid out. Use three panels instead of one. One for the list of
3204            projections, one for the edit controls, and one for the buttons.
3205            Fixed resizing problems so that the dialog resizes correctly
3206            when the projection panel changes. Added import/export, save, and
3207            new buttons/functionality.
3208    
3209    2003-04-24  Bernhard Herzog  <[email protected]>
3210    
3211            First step towards table management. Introduce a simple data
3212            abstraction so that we replace the data a layer uses more easily
3213            in the next step.
3214    
3215            * Thuban/Model/data.py: New file with a simple data abstraction
3216            that bundles shapefile and dbffile into one object.
3217    
3218            * Thuban/Model/session.py (Session.OpenShapefile): New method to
3219            open shapefiles and return a shape store object
3220    
3221            * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
3222            object instead of a shapefile filename. This introduces a new
3223            instance variable store holding the datastore. For intermediate
3224            backwards compatibility keep the old instance variables.
3225            (open_shapefile): Removed. No longer needed with the shape store.
3226            (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
3227            get the shape store used by a layer.
3228            (Layer.Destroy): No need to explicitly destroy the shapefile or
3229            table anymore.
3230    
3231            * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
3232            (MainWindow.AddLayer): Use the session's OpenShapefile method to
3233            open shapefiles
3234    
3235            * Thuban/Model/load.py (ProcessSession.start_layer): Use the
3236            session's OpenShapefile method to open shapefiles
3237    
3238            * test/test_classification.py
3239            (TestClassification.test_classification): Use the session's
3240            OpenShapefile method to open shapefiles and build the filename in
3241            a more platform independed way
3242    
3243            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
3244            Implement to have a session to use in the tests
3245            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
3246            (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
3247            session's OpenShapefile method to open shapefiles
3248            (TestLayerLegend.setUp): Instantiate a session so that we can use
3249            it to open shapefiles.
3250            (TestLayerLegend.tearDown): Make sure that all references to
3251            layers and session are removed otherwise we may get a resource
3252            leak
3253    
3254            * test/test_map.py (TestMapAddLayer.test_add_layer)
3255            (TestMapWithContents.setUp): Instantiate a session so that we can
3256            use it to open shapefiles.
3257            (TestMapWithContents.tearDown): Make sure that all references to
3258            layers, maps and sessions are removed otherwise we may get a
3259            resource leak
3260            ("__main__"): use support.run_tests() so that more info about
3261            uncollected garbage is printed
3262    
3263            * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
3264            session's OpenShapefile method to open shapefiles
3265            ("__main__"): use support.run_tests() so that more info about
3266            uncollected garbage is printed
3267    
3268            * test/test_selection.py (TestSelection.tearDown): Make sure that
3269            all references to the session and the selection are removed
3270            otherwise we may get a resource leak
3271            (TestSelection.get_layer): Instantiate a session so that we can
3272            use it to open shapefiles.
3273            ("__main__"): use support.run_tests() so that more info about
3274            uncollected garbage is printed
3275    
3276            * test/test_session.py (TestSessionBase.tearDown)
3277            (TestSessionWithContent.tearDown): Make sure that all references
3278            to the session and layers are removed otherwise we may get a
3279            resource leak
3280            (TestSessionWithContent.setUp): Use the session's OpenShapefile
3281            method to open shapefiles
3282    
3283    2003-04-24  Jonathan Coles   <[email protected]>
3284    
3285            * Thuban/Model/load.py (XMLReader.read): Should have been checking
3286            if the file_or_filename object had the 'read' attribute.
3287    
3288    2003-04-23  Jonathan Coles   <[email protected]>
3289    
3290            * Thuban/Model/resource.py: Fixes RTbug #1813.
3291            (ReadProjFile): Add documentation about which exceptions are raised.
3292            Always pass the exceptions up to the caller.
3293            (GetProjFiles): If the directory can't be read return an empty list.
3294            If any of the proj files can't be read skip that file and go
3295            on to the next one.
3296    
3297            * test/test_proj.py: Added test cases to handle nonexistent files,
3298            unreadable files, and files that don't parse correctly.
3299    
3300    2003-04-23  Jonathan Coles   <[email protected]>
3301    
3302            Projection dialog. Allows the user to select from a list
3303            of projection templates and optionally edit them and save new ones.
3304    
3305            * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
3306            (ProjPanel): Base class for projection specific panels.
3307            (TMPanel): Projection panel for Transverse Mercartor.
3308            (UTMPanel): Projection panel for Universal Transverse Mercartor.
3309            (LCCPanel): Projection panel for Lambert Conic Conformal.
3310            (GeoPanel): Projetion panel for Geographic Projection.
3311    
3312    2003-04-23  Jonathan Coles   <[email protected]>
3313    
3314            * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
3315            promote symmetry. There now exists XMLReader and XMLWriter.
3316            (XMLReader.read): New. Call to read the given file descriptor or
3317            filename.
3318            (XMLReader.close): New. Make sure the file is closed.
3319            (XMLReader.GetFileName): New. Return just the file name that is being
3320            read from.
3321            (XMLReader.GetDirectory): New. Return just the directory of the file
3322            that is being read.
3323            (XMLReader.AddDispatchers): New. Take a dictionary which contains
3324            the names of functions to call as the XML tree is parsed.
3325            (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
3326            (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
3327            (SessionLoader): Removed class variables start_dispatcher and
3328            end_dispatcher since this functionality is now part of a class
3329            instance. Fixes RTbug #1808.
3330            (SessionLoader.__init__): Add dispatcher functions.
3331            (load_xmlfile): Code was moved into the XMLReader.read().
3332            (load_session): Use modified SessionLoader.
3333    
3334            * Thuban/Model/map.py (Map.GetProjection): New. Returns the
3335            map's projection.
3336    
3337            * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
3338            GetAllParameters.
3339            (Projection.GetParameter): Returns the value for the given parameter.
3340    
3341            * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
3342            (GetProjFiles): Renamed from GetProjections. Now returns a list
3343            of ProjFile objects.
3344            (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
3345            a list of ProjFile objects whose files are not user defined.
3346            (GetUserProjFiles): Renamed from GetUserProjections. Returns a
3347            list of ProjFile objects whose files are user defined.
3348            (ProjFileReader): Extend new XMLReader.
3349    
3350            * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
3351            promote symmetry.
3352    
3353            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
3354            control instead of a wxComboBox. wxChoice controls do not generate
3355            events as the uses highlights possible choices which fixes problems
3356            with resizing the dialog when the use selects an option.
3357    
3358            * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
3359            control instead of a wxComboBox.
3360    
3361            * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
3362            dialog.
3363    
3364            * test/test_proj.py (TestProjection.test): New tests for GetParameter
3365            method.
3366    
3367    2003-04-22  Bernhard Herzog  <[email protected]>
3368    
3369            * Thuban/UI/mainwindow.py: Remove some unused imports and global
3370            constants
3371    
3372            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
3373            (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
3374    
3375    2003-04-17  Bernhard Herzog  <[email protected]>
3376    
3377            * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
3378            (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
3379            anymore.
3380            (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
3381            (Layer.ShapeType, Layer.Shape): No need to call
3382            self.open_shapefile since it's always called in __init__
3383    
3384            * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
3385            In wxPython 2.4 there's no need to extend MainLoop anymore since
3386            wxPython itself makes sure OnExit is called.
3387    
3388    2003-04-16  Jonathan Coles   <[email protected]>
3389    
3390            Initial putback of projection management code. Includes new
3391            classes to read and write projection files. The current load
3392            and save classes were abstracted a bit so they could be reused.
3393            The Projection class was extended to provide new methods and
3394            have a name.
3395    
3396            * Thuban/Model/load.py (XMLProcessor): New. Contains all the
3397            general XML reading methods that were part of ProcessSession.
3398    
3399            * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
3400            name.
3401            (ProjFile): New. Represents a file that contains projection
3402            information.
3403    
3404            * Thuban/Model/resource.py: New. Contains general utilities
3405            for read and writing projection files.
3406    
3407            * Thuban/Model/save.py (XMLSaver): New. Contains all the
3408            general XML writing methods that were part of SessionSaver.
3409            (SessionSaver): Renamed from Saver.
3410    
3411            * test/test_proj.py: New test cases for the projection
3412            file read and write functions.
3413    
3414    2003-04-16  Jonathan Coles   <[email protected]>
3415    
3416            * Thuban/Model/classification.py: Use repr() around values
3417            in the ClassGroup*.__repr__() methods so it is clearer when
3418            a value is a string and when it is a number.
3419    
3420            * test/test_load.py: Rework the classification test to test
3421            that we can load old files.
3422            (testLabels): Test a file where the groups have labels.
3423    
3424    2003-04-16  Bernhard Herzog  <[email protected]>
3425    
3426            Safer implementation of the performance enhancements of the
3427            low-level renderer:
3428            
3429            * extensions/thuban/wxproj.cpp (extract_projection)
3430            (extract_pointer): Rename extract_projection to extract_pointer
3431            and redefine its purpose to return the pointer stored in a CObject
3432            returned by the object's cobject method. Update all callers.
3433            (s_draw_info, free_draw_info, draw_polygon_init): Implement the
3434            handling of these low-level parameters so that each s_draw_info
3435            instance is handled as a CObject at python level that also
3436            contains real references to the actual python objects which
3437            contain the values in the struct. Add free_draw_info as the
3438            destructor.
3439            (draw_polygon_shape): Add the py_draw_info parameter which must a
3440            cobject containing an s_draw_info pointer.
3441    
3442            * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
3443            method to instantiat the low-level render parameter
3444            (MapRenderer.draw_shape_layer): Use the new method. Remove some
3445            commented out code.
3446            (MapRenderer.draw_polygon_shape): Make the first parameter not the
3447            layer but the low-level render parameter
3448            (ScreenRenderer.draw_shape_layer): Use the low-level render
3449            parameter.
3450    
3451    2003-04-15  Jonathan Coles   <[email protected]>
3452    
3453            * Thuban/Model/classification.py: Implemented __repr__ for
3454            the ClassGroup* classes to make debugging a bit easier.
3455            (ClassGroup.SetLabel): Check that the string is an instance
3456            of StringTypes not StringType. Accounts for Unicode strings.
3457    
3458            * Thuban/Model/color.py: Implemented __repr__ to make
3459            debugging a bit easier.
3460    
3461            * Thuban/Model/save.py (Saver.write_classification): Need to
3462            save the group label.
3463    
3464            * test/test_load.py (testClassification): New. Loads the
3465            iceland_sample_test.thuban file and checks if it was loaded
3466            correctly.
3467    
3468    2003-04-15  Jonathan Coles   <[email protected]>
3469    
3470            * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
3471            to improve rendering performance by initializing the variables
3472            that are not change each time draw_polygon_shape() is called.
3473            The values are stored in a global struct draw_info.
3474            (draw_polygon_shape): Removed initialization code that is
3475            now in draw_polygon_init().
3476    
3477            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
3478            drawing initialization call to draw_polygon_init()
3479            (MapRenderer.draw_polygon_shape): Use new signature of
3480            draw_polygon_shape.
3481    
3482            * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
3483            weirdness by setting the range to (1, maxint).
3484    
3485            * Thuban/Model/classification.py (ClassGroupProperties): Make
3486            instance variables private and optimize comparison operator
3487            by first checking if the color references are the same.
3488            (ClassGroupSingleton): Make instance variables private.
3489            (ClassGroupRange): Make instance variables private.
3490    
3491            * HOWTO-Release: Filled in missing steps for releasing packages.
3492    
3493    2003-04-15  Bernhard Herzog  <[email protected]>
3494    
3495            First stab at internationalized messages:
3496    
3497            * Thuban/__init__.py (_): Implement the translation function for
3498            real using the python gettext module.
3499    
3500            * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
3501            translate empty strings.
3502    
3503            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
3504            Add a missing space to a warning message
3505    
3506            * po/README: New. Notes about the management of the translation
3507            files.
3508    
3509            * po/Makefile: New. Makefile to help manage the translation files.
3510    
3511            * po/es.po: New. Spanish translation by Daniel Calvelo Aros
3512    
3513            * MANIFEST.in: Include the *.mo files in Resources/Locale and the
3514            translations and support files in po/
3515    
3516            * setup.py (data_files): Add the *.mo files to the data_files too
3517    
3518            * README: Add note about the translations when building from CVS
3519    
3520    2003-04-14  Jonathan Coles   <[email protected]>
3521    
3522            * Thuban/UI/dock.py: Fixes some window resizing problems most
3523            noticable under windows. Always assume the button bitmaps will
3524            be there. Code clean up.
3525            (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
3526            images for the dock/undock button to the same images.
3527            Work around for RTbug #1801.
3528    
3529            * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
3530            be allowed to grow within the sizer. Fixes a bug under Windows
3531            where the toolbar wasn't being drawn.
3532    
3533    2003-04-14  Frank Koormann   <[email protected]>
3534    
3535            * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
3536            Updated design to try to make the button functionality more
3537            transparent.
3538    
3539    2003-04-14  Jonathan Coles   <[email protected]>
3540    
3541            * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
3542            finalize the intialization of the panel.
3543    
3544            * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
3545            creation of the panel. Should be the last thing called in the
3546            initializer of a subclass.
3547    
3548            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
3549            set the current selections in the combo boxes. This is needed
3550            under Windows.
3551    
3552            * Thuban/UI/classifier.py (Classifier.__init__): Add a top
3553            level panel to the dialog so that the background colors are
3554            consistent under Windows.
3555    
3556    2003-04-11  Jonathan Coles   <[email protected]>
3557    
3558            * Thuban/UI/classgen.py: Change color ramps to start at white
3559            not black.
3560    
3561            * Thuban/UI/legend.py: Enable/disable the legend buttons when
3562            the legend changes. Fixes RTbug #1793.
3563    
3564            * test/test_classification.py: Added test for copying of
3565            classifications.
3566    
3567    2003-04-11  Jonathan Coles   <[email protected]>
3568    
3569            * Thuban/UI/resource.py: New. Centralize the loading of resources
3570            such as bitmaps.
3571    
3572            * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
3573            added images to the move buttons, added 'reverse' button.
3574            (CustomRampPanel.__init__): Added images to the move buttons.
3575            (GreyRamp): New. Generates a ramp from white to black.
3576            (HotToColdRamp): New. Generates a ramp from cold to hot colors.
3577    
3578            * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
3579            ID_PROPERTY_*.
3580            (Classifier.__init__): Minor changes to the layout.
3581            (Classifier._OnTitleChanged): Listen for when the user edits the
3582            title and update the dialog's title and the layer's title.
3583    
3584            * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
3585    
3586            * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
3587            (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
3588            if the layer's title changes.
3589    
3590            * Thuban/UI/mainwindow.py: Added new menu item and associated code
3591            to open a dialog to rename the map.
3592            (MainWindow): Use new resource class to import bitmaps.
3593    
3594    2003-04-11  Jonathan Coles   <[email protected]>
3595    
3596            * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
3597            Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
3598            Resources/Bitmaps/group_use_none.xpm,
3599            Resources/Bitmaps/group_use_not.xpm,
3600            Resources/Bitmaps/hide_layer.xpm,
3601            Resources/Bitmaps/layer_properties.xpm,
3602            Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
3603            Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
3604            New.
3605    
3606    2003-04-10  Jonathan Coles   <[email protected]>
3607    
3608            * Thuban/Model/classification.py: (ClassGroupRange.__init__):
3609            Should pass group to ClassGroup constructor.
3610    
3611    2003-04-10  Jonathan Coles   <[email protected]>
3612    
3613            * Thuban/Model/classification.py: (ClassGroup): Move all the common
3614            methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
3615            here. Implement SetVisible(), IsVisible().
3616            (ClassGroup.__init__): Add group parameter which acts as a copy
3617            constructor.
3618    
3619            * Thuban/UI/classifier.py (ClassTable): Add a new column for the
3620            "Visible" check boxes.
3621            (Classifier): Rename the buttons and refactor the code to match
3622            the new labels.
3623    
3624            * Thuban/UI/legend.py: Classify button is now called "Properties".
3625            Refactored the code to change variable names.
3626            (LegendTree.__FillTreeLayer): Only list a group if it is visible.
3627    
3628            * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
3629            MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
3630            renamed to MainWindow.LayerEditProperties.
3631            (MainWindow.ToggleLegend): Don't include map name in legend title.
3632            (MainWindow.SetMap): Added the map name to the window title.
3633            (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
3634            MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
3635            Functionality is found in the layer properties dialog.
3636    
3637            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
3638            draw visible groups.
3639    
3640    2003-04-09  Jonathan Coles   <[email protected]>
3641    
3642            * Thuban/UI/classgen.py: Modifications to allow simple
3643            addition and selection of new color schemes.
3644            (MonochromaticRamp): New. Generates a ramp between two colors.
3645            (RedRamp): New. Generates a ramp of all red.
3646            (GreenRamp): New. Generates a ramp of all green.
3647            (BlueRamp): New. Generates a ramp of all blue.
3648    
3649    2003-04-09  Jonathan Coles   <[email protected]>
3650    
3651            * Thuban/Model/classification.py (Classification.__deepcopy__):
3652            Need to copy over field and fieldType attributes.
3653    
3654            * Thuban/Model/table.py (Table.field_range): New. Retrive the
3655            maximum and minimum values over the entire table for a given
3656            field.
3657            (Table.GetUniqueValues): New. Retrieve all the unique values
3658            in the table for a given field.
3659    
3660            * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
3661            (GenUniquePanel): New. Controls to allow the user to select
3662            which unique field values they would like in the classification.
3663            (CustomRampPanel): Code that was in ClassGenDialog that allows
3664            the user to select the properties for a custom ramp.
3665            (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
3666    
3667            * Thuban/UI/classifier.py: Removed a lot of debugging code.
3668            (Classifier._SetClassification): Callback method so that the
3669            class generator can set the classification in the grid.
3670            (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
3671            editing of a group properties class into a wxWindows control.
3672    
3673            * Thuban/UI/dock.py: It was decided that if the user closes
3674            a dockable window the window should simply hide itself. That
3675            way if the user wants to show the dock again it appears in the
3676            same place as it was when it was closed.
3677            (DockableWindow.Destroy): Call renamed method OnDockDestroy().
3678            (DockableWindow._OnButtonClose): Hide the window instead of
3679            destroying it.
3680            (DockableWindow._OnClose): Hide the window instead of
3681            destroying it.
3682    
3683            * Thuban/UI/legend.py (LegendTree): Use a private method to
3684            consistently set the font and style of the text. Fixes RTbug #1786.
3685    
3686            * Thuban/UI/mainwindow.py: Import just the Classifier class.
3687    
3688    2003-04-07  Bernhard Herzog  <[email protected]>
3689    
3690            * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
3691            to the map module
3692    
3693    2003-04-07  Bernhard Herzog  <[email protected]>
3694    
3695            * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
3696            favor of ToggleSessionTree
3697            (MainWindow.ToggleSessionTree): New method to toggle visibility of
3698            the session tree.
3699            (MainWindow.SessionTreeShown): New method to return whether the
3700            session tree is currently shown.
3701            (MainWindow.ToggleLegend): New method to toggle visibility of the
3702            legend
3703            (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
3704            LegendShown
3705            (MainWindow.LegendShown): New method to return whether the legend
3706            is currently shown.
3707            (_method_command): Add checked parameter so we can define check
3708            menu items
3709            (_has_tree_window_shown, _has_legend_shown): Use the appropriate
3710            mainwindow methods.
3711            (show_session_tree, show_legend commands): Removed.
3712            (toggle_session_tree, toggle_legend commands): New commands to
3713            toggle the visibility of the dialogs
3714    
3715    2003-04-07  Jonathan Coles   <[email protected]>
3716    
3717            * Thuban/UI/classgen.py: Fix Windows problem.
3718    
3719            * Thuban/UI/dock.py: Fix Windows problem.
3720    
3721            * Thuban/UI/mainwindow.py: Use False instead of false.
3722            (MainWindow.ShowLegend): Remove unnecessary switch parameter.
3723    
3724    2003-04-07  Jonathan Coles   <[email protected]>
3725    
3726            Since we now say that the order of the groups in a classification
3727            matters, it makes sense to be able to manipulate that order. Most
3728            of the changes to Thuban/Model/classification.py are to that end.
3729    
3730            * Thuban/Model/classification.py (Classification.AppendGroup,
3731            Classification.InsertGroup, Classification.ReplaceGroup,
3732            Classification.RemoveGroup, Classification.GetGroup): Do as the
3733            names imply.
3734            (Classification.FindGroup): This was called GetGroup, but GetGroup
3735            takes an index, while FindGroup takes a value.
3736            (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
3737            REFERENCE. Currently there is a cyclic reference between the layer
3738            and its classification. If the classification doesn't need to know
3739            its owning layer we can change this, since it may make sense to be
3740            able to use the same classification with different layers.
3741    
3742            * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
3743    
3744            * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
3745            not AddGroup()
3746    
3747            * Thuban/UI/classifier.py: Now that we can depend on the order in
3748            a Classification and have methods to manipulate that order we don't
3749            need to use our own data structures in the grid. We can simply make
3750            the grid/table access the information they need from a copy of
3751            the classification object.
3752            (Classifier._OnCloseBtn): Event handler for when the user clicks
3753            'Close'. This is needed so if the user applies changes and then
3754            continues to change the table the user has the option of discarding
3755            the most recent changes and keeping what they applied.
3756    
3757            * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
3758            into the same group.
3759    
3760            * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
3761            with a really old version of proj, PJ_VERSION won't even be defined.
3762            If it isn't defined then just compile so that the function always
3763            returns Py_False.
3764    
3765            * test/test_classification.py: Fix tests to use the renamed methods.
3766            Still need to write tests for the new methods.
3767    
3768    2003-04-04  Jonathan Coles   <[email protected]>
3769    
3770            * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
3771            call to SetSelection out of the method and before the call
3772            to __SelectField in __init__. This prevents a recursion of events
3773            when _OnFieldSelect is triggered by the user.
3774    
3775    2003-04-04  Jonathan Coles   <[email protected]>
3776    
3777            * Thuban/Model/classification.py: Rename Color.None to
3778            Color.Transparent.
3779            (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
3780            Don't bother copying the color, since Colors are immutable.
3781    
3782            * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
3783            Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
3784            Thuban/UI/renderer.py, Thuban/UI/view.py:
3785            Rename Color.None to Color.Transparent.
3786        
3787            * test/test_classification.py, test/test_load.py: Rename Color.None
3788            to Color.Transparent.
3789    
3790    2003-04-04  Jonathan Coles   <[email protected]>
3791    
3792            * Thuban/Model/classification.py: Fix assert calls.
3793            (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
3794            Copy the color parameter rather than hold onto a reference.
3795    
3796            * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
3797            the color object.
3798            (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
3799            are sure there exists only one refernce to Color.None in the system.
3800            This allows us to use 'is' rather than the comparision functions.
3801            
3802            * Thuban/Model/save.py: Fix assert calls.
3803            
3804            * Thuban/UI/classifier.py: Fix assert calls.
3805            (ClassGrid._OnCellDClick): Call up to the classifier to open the
3806            dialog to edit the groups properties.
3807            (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
3808            correctly if a cell is resized.
3809            (ClassTable.SetClassification): New. Changes the classification
3810            that is in the table.
3811            (ClassTable.__SetRow): Allow groups to be prepended.
3812            (Classifier): New code for opening the EditProperties and
3813            GenerateRanges dialogs.
3814            (SelectPropertiesDialog.__GetColor): Only set the color in the
3815            color dialog if the current color is not None.
3816            
3817            * Thuban/UI/dock.py: Fix assert calls.
3818            
3819            * Thuban/UI/legend.py: Fix assert calls.
3820            
3821            * Thuban/UI/renderer.py: Fix assert calls.
3822            
3823            * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
3824            classifications.
3825            (GenRangePanel): Panel specific to range generation.
3826            (GenSingletonPanel): Panel specific to singleton generation.
3827            (ClassGenerator): Class responsible for actually generating
3828            the classification from the data gathered in the dialog box.
3829            (PropertyRamp): Generates properties whose values range from
3830            a starting property to an ending property.
3831    
3832    2003-04-03  Bernhard Herzog  <[email protected]>
3833    
3834            * test/support.py (print_garbage_information): New function that
3835            prints information about still connected messages and memory
3836            leaks.
3837            (run_suite): Removed.
3838            (run_tests): New function for use as a replacement of
3839            unittest.main in the test_* files. This one calls
3840            print_garbage_information at the end.
3841    
3842            * test/runtests.py (main): Use support.print_garbage_information
3843    
3844            * test/test_layer.py: Use support.run_tests instead of
3845            unittest.main so we get memory leak information
3846            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
3847            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
3848            (TestLayerLegend.test_visibility): Call the layer's Destroy method
3849            to fix a memory leak.
3850    
3851            * test/test_classification.py: Use support.run_tests instead of
3852            unittest.main so we get memory leak information
3853            (TestClassification.test_classification): Call the layer's Destroy
3854            method to fix a memory leak.
3855    
3856    2003-04-02  Bernhard Herzog  <[email protected]>
3857    
3858            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
3859            Handle the reference counts of the return value and errors in
3860            PyArg_ParseTuple correctly.
3861    
3862            * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
3863            sure the filename is absolute to avoid problems when saving the
3864            session again
3865    
3866            * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
3867    
3868    2003-04-01  Jonathan Coles   <[email protected]>
3869    
3870            *  Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
3871            that there actually are points in the returned list of points
3872            before trying to index into the list. The list may be empty if
3873            the shape is a Null Shape.
3874    
3875    2003-04-01  Bernhard Herzog  <[email protected]>
3876    
3877            * test/test_map.py: Don't use from <module> import *
3878    
3879    2003-04-01  Jonathan Coles   <[email protected]>
3880    
3881            * Thuban/Model/session.py: Use LAYER_CHANGED instead of
3882            LAYER_LEGEND_CHANGED
3883    
3884            * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
3885            self.Destroy() to close the window after yesterday's changes.
3886    
3887            * test/test_map.py, test/test_session.py: Fix messages that
3888            are sent from maps and layers.
3889    
3890    2003-03-31  Jonathan Coles   <[email protected]>
3891    
3892            * Thuban/UI/classifier.py: Commented out some debugging statements.
3893            (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
3894            RTbug #1769.
3895    
3896            * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
3897            position (although position doesn't work yet under GTK).
3898            (DockableWindow.Destroy): New. Called when the window must be
3899            closed. Namely needed when the DockFrame closes and must close
3900            its children.
3901            (DockFrame): Listen for EVT_CLOSE and destroy all children.
3902    
3903            * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
3904            when then window is told to close.
3905            (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
3906            comment in source for more info.
3907    
3908            * Thuban/UI/main.py: Show the legend by default when Thuban starts.
3909    
3910            * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
3911            symmetry with other such methods.
3912            (MainWindow.ShowLegend): Show the legend docked by default.
3913    
3914    2003-03-28  Jonathan Coles   <[email protected]>
3915    
3916            * Thuban/UI/classifier.py: Support for highlighting a specific
3917            group within the grid when the classification dialog is opened.
3918            Also contains a lot of debugging printouts which will later
3919            be removed.
3920    
3921            * Thuban/UI/dock.py: Complete rework on the dock code so that
3922            that it is fairly removed from the rest of the Thuban application.
3923            It is easy to add new docks which the rest of the program having
3924            to be aware of them.
3925    
3926            * Thuban/UI/legend.py: Modifications to support selecting a
3927            specific group in the classification dialog. Changed how layers
3928            are drawn when the layer is visible/invisible.
3929    
3930            * Thuban/UI/mainwindow.py: Removed legend specific code and
3931            replaced it with calls to the new dock code.
3932    
3933            * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
3934            to check if scale > 0. Trying to track down a divide by zero.
3935    
3936    2003-03-26  Jonathan Coles   <[email protected]>
3937    
3938            * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
3939            (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
3940            now part of DockableWindow.
3941            (LegendPanel.DoOnSelChanged): Select the current layer in the
3942            map.
3943            (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
3944            with the selected layer and/or group.
3945    
3946    2003-03-26  Jonathan Coles   <[email protected]>
3947    
3948            This putback contains the code for dockable windows. There is
3949            no support in wxWindows as of this date for windows that can
3950            attach themselves to other windows.
3951    
3952            The current model contains a DockableWindow which has a parent
3953            window for when it is detached and a dock window that it puts
3954            its contents in when it is docked. The contents of a DockableWindow
3955            must be a DockPanel. DockPanel itself derives from wxPanel.
3956    
3957            * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
3958            message, not a LAYER_LEGEND_CHANGED message.
3959    
3960            * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
3961    
3962            * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
3963            as one of the style properties for the fieldTypeText item to
3964            be sure that its size is correct when the text changes.
3965    
3966            * Thuban/UI/dock.py: New. Classes for the DockPanel and
3967            DockableWindow.
3968    
3969            * Thuban/UI/legend.py: Added some more buttons and made the
3970            LegendPanel a DockPanel.
3971    
3972            * Thuban/UI/mainwindow.py: Added sash windows to the main window
3973            and supporting functions for manipulating the sashes.
3974            (MainWindow.ShowLegend): Create a DockableWindow with the
3975            LegendPanel as the contents.
3976    
3977            * Thuban/UI/messages.py: Added DOCKABLE_* messages
3978    
3979            * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
3980            not LAYER_LEGEND_CHANGED, messages.
3981    
3982    2003-03-25  Jonathan Coles   <[email protected]>
3983    
3984            * setup.py: Added custom script bdist_rpm_build_script so that
3985            when the rpm is built the path to wx-config is correct.
3986    
3987            * setup.cfg: Added line saying to use the custom build script
3988    
3989    2003-03-20  Jonathan Coles   <[email protected]>
3990    
3991            Initial implementation of the Legend.
3992    
3993            * Thuban/UI/legend.py: New. Creates a window that shows the map's
3994            Legend information and allows the user to add/modify classifications
3995            and how the layers are drawn on the map.
3996    
3997            * setup.py: New command 'build_docs' which currently uses
3998            happydoc to generate html documentation for Thuban.
3999    
4000            * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
4001            Returns a string which is appropriately describes the group.
4002    
4003            * Thuban/Model/layer.py (Layer.SetClassification): Generate a
4004            LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
4005    
4006            * Thuban/Model/map.py (Map): Rename messages and use new, more
4007            specific, messages.
4008    
4009            * Thuban/Model/messages.py: New message to indicate that a layer's
4010            data has changed (LAYER_CHANGED). New map messages to indicate
4011            when layers have been added/removed/changed or if the stacking order
4012            of the layers has changed.
4013    
4014            * Thuban/Model/session.py: Rename and use new messages.
4015    
4016            * Thuban/UI/classifier.py: Remember if any changes have actually
4017            been applied so that if the dialog is cancelled without an application
4018            of changes we don't have to set a new classification.
4019            (ClassDataPreviewer): Pulled out the window specific code and put it
4020            ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
4021            symbols on any DC.
4022            
4023            * Thuban/UI/mainwindow.py: New code to open the legend.
4024    
4025            * Thuban/UI/view.py: Use new message names.
4026    
4027    2003-03-19  Jonathan Coles   <[email protected]>
4028    
4029            * Thuban/UI/main.py (verify_versions): New. Checks the versions
4030            of Python, wxPython, and some other libraries.
4031    
4032            * extensions/thuban/wxproj.cpp (check_version): Checks the given
4033            version against what wxproj was compiled with.
4034            (check_version_gtk): If wxproj was compiled with gtk then check
4035            the given version against the version of the gtk library
4036            currently being used.
4037    
4038    2003-03-14  Bernhard Herzog  <[email protected]>
4039    
4040            * test/test_command.py: Run the tests when the module is run as a
4041            script
4042    
4043    2003-03-14  Bernhard Herzog  <[email protected]>
4044    
4045            Implement selection of multiple selected shapes in the same layer:
4046    
4047            - Introduce a new class to hold the selection. This basically
4048              replaces the interactor which was nothing more than the
4049              selection anyway. A major difference is of course that the new
4050              selection class supports multiple selected shapes in one layer
4051            
4052            - Move the object that represents the selection from the
4053              application to the canvas. The canvas is a better place than the
4054              application because the selection represents which shapes and
4055              layer of the map displayed by the canvas are selected and
4056              affects how the map is drawn.
4057    
4058            - Make the selection and its messages publicly available through
4059              the mainwindow.
4060    
4061            - The non-modal dialogs do not get a reference to the interactor
4062              anymore as they can simply refer to their parent, the
4063              mainwindow, for the what the interactor had to offer.
4064    
4065            * Thuban/UI/selection.py: New module with a class to represent the
4066            selection.
4067    
4068            * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
4069            these unused messages
4070    
4071            * Thuban/UI/application.py (ThubanApplication.OnInit)
4072            (ThubanApplication.OnExit, ThubanApplication.SetSession): The
4073            interactor is gone now.
4074            (ThubanApplication.CreateMainWindow): There is no interactor
4075            anymore so we pass None as the interactor argument for now for
4076            compatibility.
4077    
4078            * Thuban/UI/view.py (MapCanvas.delegated_messages)
4079            (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
4080            Unsubscribe, delegate messages according to the delegated_messages
4081            class variable.
4082            (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
4083            attributes from instance variables as described with the
4084            delegated_methods class variable.
4085            (MapCanvas.__init__): New instance variable selection holding the
4086            current selection
4087            (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
4088            pass them on to the renderer
4089            (MapCanvas.SetMap): Clear the selection when a different map is
4090            selected.
4091            (MapCanvas.shape_selected): Simple force a complete redraw. The
4092            selection class now takes care of only issueing SHAPES_SELECTED
4093            messages when the set of selected shapes actually does change.
4094            (MapCanvas.SelectShapeAt): The selection is now managed in
4095            self.selection
4096    
4097            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
4098            (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
4099            Unsubscribe, delegate messages according to the delegated_messages
4100            class variable.
4101            (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
4102            attributes from instance variables as described with the
4103            delegated_methods class variable.
4104            (MainWindow.__init__): The interactor as ivar is gone. The
4105            parameter is still there for compatibility. The selection messages
4106            now come from the canvas.
4107            (MainWindow.current_layer, MainWindow.has_selected_layer):
4108            Delegate to the the canvas.
4109            (MainWindow.LayerShowTable, MainWindow.Classify)
4110            (MainWindow.identify_view_on_demand): The dialogs don't need the
4111            interactor parameter anymore.
4112    
4113            * Thuban/UI/tableview.py (TableFrame.__init__)
4114            (LayerTableFrame.__init__, LayerTableFrame.OnClose)
4115            (LayerTableFrame.row_selected): The interactor is gone. It's job
4116            from the dialog's point of view is now done by the mainwindow,
4117            i.e. the parent. Subscribe to SHAPES_SELECTED instead
4118            of SELECTED_SHAPE
4119            
4120            * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
4121            is gone. It's job from the dialog's point of view is now done by
4122            the mainwindow, i.e. the parent.
4123            
4124            * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
4125            gone. It's job from the dialog's point of view is now done by the
4126            mainwindow, i.e. the parent.
4127    
4128            * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
4129            gone. It's job from the dialog's point of view is now done by the
4130            mainwindow, i.e. the parent.
4131            (SessionTreeCtrl.__init__): New parameter mainwindow which is
4132            stored as self.mainwindow. The mainwindow is need so that the tree
4133            can still subscribe to the selection messages.
4134            (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
4135            (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
4136            selection is now accessible through the mainwindow. Subscribe to
4137            SHAPES_SELECTED instead of SELECTED_SHAPE
4138    
4139            * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
4140            SHAPES_SELECTED message now.
4141            (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
4142            so deal with multiple shapes
4143            (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
4144            gone. It's job from the dialog's point of view is now done by the
4145            mainwindow, i.e. the parent.
4146    
4147            * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
4148            parameter is now a list of shape ids.
4149            (RecordTable.SetTable): The second parameter is now a list of
4150            indices.
4151    
4152            * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
4153            selected_shape parameter and ivar to selected_shapes. It's now a
4154            list of shape ids.
4155            (MapRenderer.draw_label_layer): Deal with multiple selected
4156            shapes. Rearrange the code a bit so that the setup and shape type
4157            distinctions are only executed once.
4158    
4159            * test/test_selection.py: Test cases for the selection class
4160    
4161    2003-03-11  Jonathan Coles   <[email protected]>
4162    
4163            * Thuban/Model/load.py: Temporary fix so that the xml reader
4164            doesn't cause Thuban to crash.
4165    
4166            * Thuban/Model/layer.py: Handle the cyclic references between
4167            a layer and its classification better, and be sure to disconnect
4168            the classification from the layer when the layer is destroyed
4169            so that we don't maintain a cyclic reference that may not be
4170            garbage collected.
4171    
4172            * Thuban/Model/classification.py: See comment for layer.py.
4173    
4174    2003-03-12  Jan-Oliver Wagner <[email protected]>
4175    
4176            * HOWTO-Release: New. Information on the steps for releasing
4177            a new version of Thuban.
4178    
4179    2003-03-11  Jonathan Coles   <[email protected]>
4180    
4181            * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
4182            Use True instead of true.
4183            (Classifier): Should have a single panel in which all the controls lie.
4184    
4185            * Thuban/UI/proj4dialog.py: Add normal border.
4186    
4187            * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
4188    
4189            * Thuban/UI/mainwindow.py: Use True instead of true.
4190    
4191            * setup.py: Update some definitions to use wxWindows2.4 files
4192    
4193            * Data/iceland_sample_class.thuban: Fixed file so that the
4194            field_type information is present.
4195    
4196    2003-03-10  Jonathan Coles   <[email protected]>
4197    
4198            * Thuban/UI/classifier.py (Classifier.__init__): Make the
4199            field type label grow so that when the text changes the
4200            size is updated correctly. This may be a wxWindows bug.
4201    
4202    2003-03-10  Jonathan Coles   <[email protected]>
4203    
4204            * Thuban/UI/application.py: Changed SESSION_CHANGED to
4205            SESSION_REPLACED.
4206    
4207            * Thuban/UI/classifier.py: Wrap text with _().
4208            (ClassGrid.CreateTable): Set dimensions and size hints here,
4209            instead of in Reset, so we only set the size once.
4210    
4211            * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
4212    
4213            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
4214            Call Close() instead of Shutdown().
4215    
4216            * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
4217    
4218            * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
4219            Go back to using OnClose() instead of Shutdown().
4220    
4221    2003-03-10  Jonathan Coles   <[email protected]>
4222    
4223            * Thuban/UI/classifier.py (Classifier): SelectField() needed
4224            to know the old field index as well as the new one.
4225    
4226    2003-03-10  Jonathan Coles   <[email protected]>
4227    
4228            * Thuban/UI/classifier.py (Classifier): Use __SelectField()
4229            to correctly set the table information and call this from
4230            __init__ and from _OnFieldSelect so that all the information
4231            is up to date when the dialog opens and when a field is changed.
4232    
4233    2003-03-10  Jonathan Coles   <[email protected]>
4234    
4235            * Thuban/Model/classification.py (Classification): Don't use
4236            layer's message function directly, use the ClassChanged() method
4237            when then classification changes. SetField/SetFieldType/SetLayer
4238            must keep the information about field name and field type in
4239            sync when an owning layer is set or removed.
4240    
4241            * Thuban/Model/layer.py: Added ClassChanged() so that the
4242            classification can tell the layer when its data has changed.
4243            (Layer.SetClassification): Accepts None as an arguement to
4244            remove the current classification and correctly handles
4245            adding a new classification.
4246    
4247            * Thuban/Model/load.py: Comment out print statement
4248    
4249            * test/test_classification.py, test/test_save.py: New and
4250            improved tests.
4251    
4252    2003-03-07  Jonathan Coles   <[email protected]>
4253    
4254            * Thuban/Model/classification.py: Implemented __copy__ and
4255            __deepcopy__ for ClassGroup* and ClassGroupProperites so
4256            they can easily be copied by the classifier dialog.
4257            (ClassGroupProperites.__init__): The default line color should
4258            have been Color.Black.
4259    
4260            * Thuban/UI/classifier.py: Setting and Getting table values now
4261            uses a consistent set of functions.
4262            (Classifier): Now non-modal. Has field type label which changes
4263            as the field changes. Keep track of buttons in a list so that
4264            we can enable/disable the buttons when the None field is selected.
4265            (SelectPropertiesDialog): Add buttons to make the colors transparent.
4266    
4267            * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
4268            does what OnClose did, but can be called by the application to
4269            close a window. Needed when a session changes, and we have to
4270            close the classifier windows.
4271    
4272            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
4273            Shuts down open dialogs. Used when a new session is created
4274            or a session is opened.
4275            (MainWindow.SaveSession): Should only call application.SaveSession()
4276            if we don't call SaveSessionAs first.
4277            (MainWindow.Classify): Allow different classifier dialogs for
4278            different layers.
4279    
4280            * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
4281            the parent class handle it. Add Shutdown() to unsubscibe from
4282            event notification and call the parent Shutdown(). This was
4283            necessary so the application can close the tree window.
4284    
4285    2003-03-06  Jonathan Coles   <[email protected]>
4286    
4287            * Thuban/Model/classification.py: Minor documentation changes,
4288            Addition of __eq__ and __ne__ methods.
4289            (Classification.SetLayer): prevent recursion between this method
4290            and Layer.SetClassification().
4291    
4292            * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
4293    
4294            * Thuban/Model/layer.py (SetClassification): prevent recursion
4295            between this method and Classification.SetLayer().
4296    
4297            * test/test_classification.py, test/test_load.py,
4298            test/test_session.py: Fixed and added tests for the classification
4299            classes.
4300    
4301    2003-03-06  Bernhard Herzog  <[email protected]>
4302    
4303            * Thuban/UI/classifier.py (ClassGrid.__init__)
4304            (ClassGrid.CreateTable): Move the SetSelectionMode call to
4305            CreateTable because otherwise it triggers an assertion in
4306            wxPython/wxGTK 2.4.
4307    
4308    2003-03-05  Jonathan Coles   <[email protected]>
4309    
4310            * Thuban/common.py: Move FIELDTYPE constants back to table.py.
4311    
4312            * Thuban/Model/load.py: import FIELDTYPE constants from table.
4313    
4314            * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
4315    
4316            * Thuban/Model/table.py: Put FIELDTYPE constants back.
4317    
4318    2003-03-05  Jonathan Coles   <[email protected]>
4319    
4320            * Thuban/UI/classifier.py: Added class documentation.
4321            Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
4322            Store just the groups in the table and generate the other
4323            column information when it is requested. Add "None" field
4324            to pull-down to select no classification.
4325    
4326            * Thuban/common.py: Moved FIELDTYPE constants from table.py
4327            (Str2Num): Only catch ValueError exceptions.
4328    
4329            * Thuban/Model/classification.py: Class documentation. Renaming
4330            of methods with Stroke to Line. Groups are stored in a single
4331            list with the default as the first element. Groups are searched
4332            in the order they appear in the list.
4333    
4334            * Thuban/Model/color.py: Documentation.
4335    
4336            * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
4337            the kind of data represented by a field.
4338    
4339            * Thuban/Model/load.py (ProcessSession): Use proper string
4340            conversion function; fixes RTbug #1713.
4341    
4342            * Thuban/Model/save.py (Saver): Store field type information.
4343    
4344            * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
4345            (Table): Add field_info_by_name() to retrieve field information
4346            by specifying the field name, not the number.
4347    
4348            * Thuban/UI/mainwindow.py: Function name changes.
4349    
4350            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
4351            get the layer classification once. Don't try to classify
4352            values when the field is None: just use the default properties.
4353    
4354            * Thuban/UI/view.py: Function name changes.
4355    
4356            * Doc/thuban.dtd: Add field_type attribute to a classification.
4357    
4358    2003-03-04  Bernhard Herzog  <[email protected]>
4359    
4360            * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
4361            the fill and stroke layer attributes optional with suitable
4362            default values. Add the stroke_width layer attribute. Use correct
4363            syntax for empty elements. Make the attribute list for labels
4364            refer to the label element.
4365    
4366    2003-03-04  Bernhard Herzog  <[email protected]>
4367    
4368            * setup.py (thuban_build_py.build): Add a comment about distutils in
4369            Python 2.3 containing some of the functionality we implement in
4370            setup.py ourselves.
4371    
4372            * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
4373            before the selection mode. Doing it the other way round triggers
4374            an assertion in wxWindows.
4375    
4376            * Thuban/Model/save.py (escape): Fix typo in doc-string
4377    
4378            * Thuban/Model/classification.py: Remove unnecessary wxPython
4379            import
4380    
4381    2003-03-04  Jonathan Coles   <[email protected]>
4382    
4383            * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
4384            Parameter 'value' should default to None.
4385    
4386            * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
4387            the class attribute __classification is now private.
4388    
4389            * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
4390            Classifier to ClassGrid. Added support for removing selected rows,
4391            which including code for keeping track of when cells are selected,
4392            and deselected.
4393            (ClassTable): Support for added/removing rows. Fixed a problem
4394            with __ParseInput whereby it would not allow strings (only numbers)
4395            to be entered.
4396            (Classifier): Added button and supporting code for removing
4397            selected rows.
4398    
4399    2003-02-27  Jonathan Coles   <[email protected]>
4400    
4401            * Thuban/common.py: Moved color conversion functions into
4402            Thuban/UI/common.py.
4403            (Str2Num): Now converts the float (not the string) to a long/int
4404            so that an exception isn't thrown.
4405    
4406            * Thuban/UI/common.py: Common functions used in several UI modules
4407    
4408            * Thuban/Model/classification.py: Changed the class hierarchy
4409            so that a Classification consists of Groups which return
4410            Properties when a value matches a Group.
4411    
4412            * Thuban/Model/layer.py: Fixed name resolution problem.
4413    
4414            * Thuban/Model/load.py: Use new Classification and Group functions.
4415    
4416            * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
4417            failure.
4418            (Saver.write_classification): Use new Classification and Group
4419            functions.
4420    
4421            * Thuban/UI/classifier.py: Changes to use new Classification and Group
4422            functions. Fix to create a tuple with a single value instead of
4423            simply returning the value.
4424    
4425            * Thuban/UI/renderer.py: Use new Classification and Group functions.
4426            Use common.py functions.
4427    
4428            * Thuban/UI/tree.py: Use common.py functions.
4429            
4430            * test/test_classification.py: Use new Classification and Group
4431            classes.
4432    
4433    2003-02-24  Jonathan Coles   <[email protected]>
4434    
4435            * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
4436            functions from Thuban color objects to wxWindow colour objects.
4437    
4438            * Thuban/Model/classification.py (Classification): Renamed
4439            GetProperties() to GetClassData(). Used the new iterator
4440            in TreeInfo().
4441            (ClassIterator): Iterator implementation to iterate over the
4442            ClassData objects in a classification object.
4443    
4444            * Thuban/Model/save.py (Saver.write_classificaton): Uses
4445            the new iterator to save the classification information.
4446    
4447            * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
4448            for changing the stroke and fill colors and previewing the
4449            changes.
4450    
4451            * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
4452            MainWindow.SaveSessionAs): Text string changes so the dialogs
4453            have more meaningful titles.
4454    
4455            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
4456            Classification method name from GetProperties to GetClassData.
4457    
4458            * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
4459            instead of accessing now non-existent class variables.
4460    
4461    2003-02-24  Bernhard Herzog  <[email protected]>
4462    
4463            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
4464            unneeded Shape() call. Rendering is substantially faster without
4465            it and it avoids some problems with broken shape files.
4466    
4467    2003-02-20  Frank Koormann   <[email protected]>
4468    
4469            Force minimal size of identify and label dialogs. The autosizing
4470            looked too ugly.
4471    
4472            * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
4473            * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
4474            Set size of listctrl.
4475            * Thuban/UI/identifyview.py (IdentifyView.__init__):
4476            Set size of dialog.
4477    
4478    2003-02-19  Jonathan Coles   <[email protected]>
4479    
4480            * test/test_classification.py, test/test_layer.py,
4481            test/test_load.py, test/test_map.py, test/test_session.py:
4482            Updated the tests to use the new functions that are in the
4483            respective classes.
4484    
4485            * Thuban/Model/classification.py (Classification):
4486            Uses the new ClassData* classes. Modification messages are
4487            passed up to the parent layer (if it exists).
4488            (ClassData): New class to encapsulate the common data in each
4489            classification property.
4490            (ClassDataDefault): Represents the Default class. data.
4491            (ClassDataPoint): Represents a single class. data point
4492            (ClassDataRange): Represents a class. range
4493            (ClassDataMap): Represents a class. map (unused).
4494    
4495            * Thuban/Model/color.py: Added Color.None to represent something
4496            with no color. Color.Black represents the color black.
4497            (NoColor): Helper class derived from Color to represent something
4498            with no color.
4499    
4500            * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
4501            stroke_width attributes. Made the 'classification' attribute private.
4502            New methods for setting/getting the classification.
4503    
4504            * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
4505            to get the classifcation and use the new ClassData* classes to
4506            hold the classification data. Use Str2Num to convert numbers
4507            properly.
4508    
4509            * Thuban/Model/save.py (Saver): Use new Color and Classification
4510            methods
4511    
4512            * Thuban/UI/classifier.py (ClassGrid): New class to represent a
4513            custom grid.
4514            (ClassTable): Support for editing Values and Labels and for
4515            changing what type (point or range) of data is stored in each
4516            property based on how the user enters the data.
4517            (Classifier): Support for saving the new classifications and
4518            launching the dialog to edit a property.
4519            (SelectPropertiesDialog): New class for editing the visual
4520            properties of a classification (stroke color, width, and fill color)
4521            (ClassPreviewer): Took the Draw method from ClassRenderer and
4522            made most of it into this new class. Intend to use this class in
4523            the SelectPropertiesDialog for previewing changes.
4524    
4525            * Thuban/UI/renderer.py: Use new Color and Classification methods.
4526    
4527            * Thuban/UI/tree.py: Formatting changes.
4528    
4529            * Doc/thuban.dtd: Add 'label' element
4530    
4531            * Thuban/common.py: New. Contains common routines used throughout
4532            the code.
4533            (Str2Num): Takes a string and converts it to the "best" type of
4534            number.
4535    
4536    2003-02-14  Bernhard Herzog  <[email protected]>
4537    
4538            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
4539            dragging flag is always set to 0 even when the tool implementation
4540            raises an exception
4541    
4542    2003-02-11  Bernhard Herzog  <[email protected]>
4543    
4544            * Thuban/UI/application.py (ThubanApplication.splash_screen): New
4545            method to create a splash screen.
4546            (ThubanApplication.ShowMainWindow): New. Show the main window.
4547            Needed so the splash screen can display the mainwindow
4548            (ThubanApplication.OnInit): Call the
4549            new splash_screen method to determine whether the application
4550            should display a splash screen. If it displays a splash screen do
4551            not immediately show the main window.
4552    
4553    2003-02-11  Jonathan Coles  <[email protected]>
4554    
4555            * Thuban/Model/classification.py: Added import line to fix
4556            feature conflicts between running on python2.2 and python2.1.
4557    
4558            * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
4559            onto the clinfo parameter, so removed the deepcopy().
4560    
4561    2003-02-10  Jonathan Coles  <[email protected]>
4562    
4563            * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
4564            Added element_open variable to track opening and closing of tags
4565            so that tags that don't span more than one line are closed with
4566            /> instead of </tag_name>. Use the GetDefault*() methods of
4567            the Classification class.
4568    
4569            * Thuban/Model/classification.py (Classificaton): Added set and
4570            get methods for the default data. The class also takes a layer
4571            reference so that modification messages can be sent. Fixed the
4572            methods to use the new ClassData class.
4573            (ClassData): New class to encapsulate the classification data
4574    
4575            * Thuban/Model/layer.py (Layer): Remove the
4576            Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
4577            SetDefault*() methods on the layer's classification object.
4578            (Layer.__init__): Use the new SetDefault*() methods in the
4579            Classification class.
4580    
4581            * Thuban/Model/load.py (ProcessSession): Use the new ClassData
4582            object instead of a dictionary.
4583    
4584            * Thuban/UI/classifier.py (ClassRenderer): New class to
4585            draw the classifications in the dialog box's table.
4586            (Classifier): Modified to use the ClassRenderer class.
4587    
4588            * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
4589            methods of the Classification class.
4590    
4591            * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
4592            of the ClassData class.
4593    
4594            * test/test_classification.py, test/test_layer.py,
4595            test/test_map.py, test/test_session.py: Fix the tests to work
4596            with the above code changes.
4597    
4598    2003-02-03  Jonathan Coles  <[email protected]>
4599    
4600            * Thuban/Model/classification.py (Classification): Added getNull()
4601            to return the NullData reference
4602    
4603            * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
4604            Layer.SetStrokeWidth): Modified these functions to change the
4605            null data in the classification rather than keep these values
4606            directly in the Layer class. Menu options to change these values
4607            work again.
4608    
4609    2003-01-28  Jonathan Coles  <[email protected]>
4610    
4611            * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
4612            Fixed crashing problem on some systems. Dialog box shows
4613            classification data.
4614    
4615            * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
4616            Colors in the tree view.
4617    
4618            * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
4619            the tree info for classifications. Commented out unnecessary lines.
4620    
4621            * Thuban/Model/classification.py (Classification.TreeInfo): New
4622            function to add information about the classification into the
4623            tree view.
4624    
4625    2003-01-27  Jan-Oliver Wagner <[email protected]>
4626    
4627            * Thuban/__init__.py (_): New.
4628    
4629            * Thuban/Model/classification.py, Thuban/Model/extension.py,
4630            Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
4631            Thuban/Model/session.py, Thuban/UI/application.py,
4632            Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
4633            Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
4634            Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
4635            Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
4636            Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
4637    
4638    2003-01-27  Jonathan Coles  <[email protected]>
4639    
4640            * Thuban/Model/layer.py: Classification initialization calls.
4641    
4642            * Thuban/Model/classification.py: Created class to encapsulate
4643            a layer classification. Supports specific data points and
4644            ranges.
4645    
4646            * Thuban/Model/load.py: Added support for loading classification
4647            information.
4648    
4649            * Thuban/Model/save.py: Added support for saving classification
4650            information.
4651    
4652            * Thuban/UI/classifier.py: Initial class for a dialog box for
4653            specifying classification information.
4654    
4655            * Thuban/UI/mainwindows.py: Support for opening the classifier
4656            dialog.
4657    
4658            * Thuban/UI/renderer.py: Support for drawing a layer with the
4659            classification information.
4660    
4661            * Data/iceland_sample_class.thuban: iceland_sample with
4662            classification data.
4663    
4664            * test/test_classification: Tests for the Classification class.
4665    
4666    2002-12-09  Bernhard Herzog  <[email protected]>
4667    
4668            * test/test_command.py: New. Tests for the command classes.
4669    
4670            * Thuban/UI/command.py (ToolCommand): New class for tool commands.
4671            (Command.IsTool): New method to distinguish between command
4672            switching tools and other commands.
4673    
4674            * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
4675            the tool to avoid direct assignments to instance variables
4676            (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
4677            (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
4678            change the tool
4679    
4680            * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
4681            active tool's command turns insensitive, disable the tool.
4682            (_tool_command): Use the new ToolCommand class
4683    
4684            * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
4685            SelectTool method to change the tool
4686            (iconfile): Use the ToolCommand class
4687    
4688    2002-12-03  Bernhard Herzog  <[email protected]>
4689    
4690            * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
4691            the case of selected items that are not children of Layers or Maps
4692            properly. Previously this bug would trigger an assertion in
4693            wxWindows.
4694    
4695    2002-11-06  Frank Koormann  <[email protected]>
4696    
4697            * Thuban/UI/mainwindow.py: Altered the order of tools in the
4698            toolbar: First now are all navigation tools (Zoom In/Out, Pan,
4699            Full Extent).
4700    
4701    2002-10-23  Bernhard Herzog  <[email protected]>
4702    
4703            * setup.py (setup call): version now 0.1.3
4704    
4705            * MANIFEST.in: Add the files in test/
4706    
4707            * test/README: Add note about tests requiring the iceland data
4708    
4709            * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
4710            copyright notice.
4711    
4712    2002-10-18  Bernhard Herzog  <[email protected]>
4713    
4714            * test/test_map.py
4715            (TestMapWithContents.test_projected_bounding_box): Use an explicit
4716            epsilon.
4717    
4718            * test/support.py (FloatComparisonMixin.assertFloatEqual)
4719            (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
4720            message if the assertion fails and don't return the return value
4721            of self.assert_. In assertFloatSeqEqual the return meant that not
4722            all items of the sequence were compared.
4723    
4724    2002-09-20  Bernhard Herzog  <[email protected]>
4725    
4726            * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
4727    
4728            * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
4729    
4730            * test/test_map.py (TestMapWithContents.test_tree_info): Create
4731            the string with the bounding box on the fly because of platform
4732            differences in the way %g is handled.
4733    
4734            * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
4735            DBFfile too because Thuban layers can't yet cope missing DBF
4736            files.
4737    
4738    2002-09-20  Bernhard Herzog  <[email protected]>
4739    
4740            * test/test_menu.py: Use initthuban instead of
4741            add_thuban_dir_to_path to initialize Thuban.
4742    
4743            * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
4744            Mixin class for float comparisons
4745            (SubscriberMixin): New. Mixin class to test messages sent through
4746            the Connector class
4747    
4748            * test/README: Fix a typo and add the -v flag to the command for
4749            individual tests
4750    
4751            * test/test_session.py: New. Test cases for Thuban.Model.session
4752    
4753            * test/test_proj.py: New. Test cases for Thuban.Model.proj
4754    
4755            * test/test_map.py: New. Test cases for Thuban.Model.map
4756    
4757            * test/test_layer.py: New. Test cases for Thuban.Model.layer
4758    
4759            * test/test_label.py: New. Test cases for Thuban.Model.label
4760    
4761            * test/test_connector.py: New. Test cases for Thuban.Lib.connector
4762    
4763            * test/test_color.py: New. Test cases for Thuban.Model.color
4764    
4765            * test/test_base.py: New. Test cases for Thuban.Model.base
4766    
4767    2002-09-13  Bernhard Herzog  <[email protected]>
4768    
4769            * Thuban/Model/session.py (Session.forwarded_channels): Forward
4770            the CHANGED channel too.
4771    
4772            * Thuban/Model/map.py (Map.forwarded_channels): Forward the
4773            CHANGED channel too.
4774            (Map.__init__): Call the Modifiable constructor as well.
4775    
4776            * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
4777            event if the modified flag changes.
4778            (Modifiable.changed): Tweak the doc-string.
4779    
4780            * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
4781            (MainWindow.set_position_text): Put the code that puts the text
4782            with the mouse position into the status bar into the new method
4783            set_position_text so that it can overwritten in derived classes.
4784    
4785    2002-09-12  Bernhard Herzog  <[email protected]>
4786    
4787            * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
4788            message box on the main window.
4789    
4790    2002-09-11  Bernhard Herzog  <[email protected]>
4791    
4792            * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
4793            the 'E' because it's less likely to interfere with other menu
4794            entries.
4795            (MainWindow.build_menu): remove an incorrect comment.
4796    
4797    2002-09-10  Bernhard Herzog  <[email protected]>
4798    
4799            * Thuban/UI/mainwindow.py (MainWindow.Map): New.
4800            (_tool_command): Add sensitive parameter
4801            (_has_visible_map): Sensitivity callback to tools and other
4802            commands that require a visible map. Use it in map_zoom_in_tool,
4803            map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
4804            and map_full_extent
4805    
4806    2002-09-06  Bernhard Herzog  <[email protected]>
4807    
4808            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
4809            VIEW_POSITION
4810    
4811    2002-09-04  Frank Koormann  <[email protected]>
4812    
4813            * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
4814    
4815    2002-09-02  Bernhard Herzog  <[email protected]>
4816    
4817            * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
4818            wxWindows already and our implementation doesn't work correctly
4819            with wxGTK 2.3:
4820            (MapCanvas.__init__): Remove the instance variable
4821            (MapCanvas.OnPaint): Always call do_redraw when there's a map to
4822            be drawin
4823            (MapCanvas.OnIdle): Removed.
4824    
4825            * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
4826            a parameter to determine the size of the rectangle.
4827            (MapCanvas.find_shape_at): Create the box around the point on a
4828            layer by layer basis and make the size depend on the shape type.
4829            This solves a problem with the selection of point shapes at the
4830            border of the layer's bounding box
4831    
4832    2002-08-30  Bernhard Herzog  <[email protected]>
4833    
4834            * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
4835            for the sensitivity  of remove layer.
4836            (_can_remove_layer): New. Sensitivity callback for remove layer
4837            (Command layer_remove): Use _can_remove_layer
4838    
4839            * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
4840            determine whether a given layer can be deleted.
4841    
4842            * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
4843            (MapCanvas.do_redraw): Get rid of the unused update_region
4844            instance variable
4845    
4846            * Thuban/UI/view.py: Add/update some doc-strings.
4847    
4848            * test/: new subdirectory with a bunch of unit tests.
4849    
4850            * test/README, test/test_table.py, test/test_save.py,
4851            test/test_menu.py, test/test_load.py: Initial set of tests and
4852            brief instructions on how to run them
4853    
4854    2002-08-29  Bernhard Herzog  <[email protected]>
4855    
4856            * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
4857            arcs with multiple parts.
4858    
4859            * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
4860            Handle degenrate rectangles.
4861    
4862            * Thuban/Model/table.py: Make writing records work correctly:
4863            (Table.__init__): Keep track of whether the DBF is open for
4864            writing
4865            (Table.write_record): Open the DBF file for writing when necessary
4866    
4867    2002-08-27  Bernhard Herzog  <[email protected]>
4868    
4869            * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
4870            dbf files only for reading by default. Use a new writable dbf
4871            object for writing.
4872    
4873    2002-08-26  Bernhard Herzog  <[email protected]>
4874    
4875            * Thuban/UI/mainwindow.py: Refactor the context creation:
4876            (MainWindow.Context): New method to return a context
4877            (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
4878            new method
4879    
4880            * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
4881            layer table specific code from TableGrid into LayerTableGrid
4882            (TableFrame, LayerTableFrame): Split the layer table specific code
4883            from TableFrame into LayerTableFrame
4884            (LayerTableGrid.select_shape): Remove a debug print
4885    
4886            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
4887            LayerTableFrame
4888    
4889    2002-08-23  Bernhard Herzog  <[email protected]>
4890    
4891            * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
4892            absolute filename.
4893    
4894    2002-08-22  Bernhard Herzog  <[email protected]>
4895    
4896            * Thuban/Model/table.py (Table.write_record): New method to write
4897            records.
4898            (Table.__init__): Open the DBF file for writing too.
4899    
4900            * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
4901            into the underlying table.
4902    
4903            * extensions/shapelib/shapefil.h (DBFCommit),
4904            extensions/shapelib/dbfopen.c (DBFCommit): New API function to
4905            commit any changes made to the DBF file.
4906    
4907            * Thuban/UI/mainwindow.py (make_check_current_tool)
4908            (_tool_command): Put the code that generates the "checked"
4909            callback into a separate function so that we can reuse it
4910            elsewhere
4911    
4912            * Thuban/Model/save.py (Saver): New class to handle serializing a
4913            session into an XML file. The main reason to introduce a class is
4914            that applications built on Thuban can derive from it so that they
4915            can save additional information in a session file.
4916            (save_session): Delegate almost all the work to the Saver class.
4917            Rename the filename argument to file because it may be a file like
4918            object now.
4919    
4920            * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
4921            code. Remove the little test code which would be executed when the
4922            module is run as a script which didn't work anymore since it can't
4923            import the other Thuban modules.
4924            (ProcessSession, load_session): Refactor the ProcessSession to
4925            have one method for each element start and end tag so that derived
4926            classes can easily override the processing of individual tags.
4927            Also, always parse with namespaces enabled because applications
4928            built on top of Thuban will likely use namespaces if they extend
4929            the session file format.
4930    
4931    2002-08-21  Bernhard Herzog  <[email protected]>
4932    
4933            * setup.py (ThubanInstall.run): Don't repr install_lib_orig
4934            because thubaninit_contents will do it for us.
4935    
4936    2002-08-16  Jan-Oliver Wagner <[email protected]>
4937    
4938            * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
4939            tree window already open
4940    
4941    2002-08-15  Bernhard Herzog  <[email protected]>
4942    
4943            * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
4944            with self.
4945    
4946            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
4947            when we have actually captured it.
4948    
4949            * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
4950            shapefile and destroy the table.
4951    
4952            * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
4953    
4954    2002-08-14  Bernhard Herzog  <[email protected]>
4955    
4956            * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
4957            instance variable columns
4958            (RecordTable.GetTypeName): row and col may be negative in some
4959            cases.
4960    
4961            * setup.py (InstallLocal.initialize_options)
4962            (InstallLocal.finalize_options, InstallLocal.user_options): New
4963            option create-init-file to build a thubaninit.py when running
4964            install_local
4965            (InstallLocal.run): Create the thubaninit.py module when requested
4966            (thubaninit_contents): Split the template into several parts and
4967            create a new function thubaninit_contents that creates the
4968            contents of a thubaninit module.
4969            (ThubanInstall.run): Use the new function to create the thubaninit
4970            module.
4971    
4972    2002-07-30  Bernhard Herzog  <[email protected]>
4973    
4974            * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
4975            cleanup.
4976            (ThubanApplication.MainLoop): Extend to automatically call OnExit.
4977    
4978            * Thuban/Model/session.py (Session.Destroy): Don't bypass the
4979            direct base class' Destroy method.
4980    
4981            * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
4982            layers.
4983            (Map.Destroy): Destroy the label_layer as well and call the
4984            inherited Desatroymethod first so that no more messages are
4985            issued.
4986            (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
4987            message if the stacking order actually has changed. Add
4988            doc-strings.
4989            (Map.BoundingBox): Correct the doc-string.
4990            (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
4991            (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
4992    
4993            * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
4994            all labels.
4995    
4996    2002-07-29  Bernhard Herzog  <[email protected]>
4997    
4998            * Thuban/Model/map.py (Map.subscribe_layer_channels)
4999            (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
5000            to a layer's channels into separate methods.
5001            (Map.RemoveLayer, Map.AddLayer): Call the new methods
5002            (Map.Destroy): Unsubscribe from a layer's channels before
5003            destroying it.
5004    
5005            * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
5006            selected_layer parameter to searched_layer which is the layer to
5007            search in.
5008            (MapCanvas.SelectShapeAt): New parameter layer to restrict the
5009            search to that layer. Return the selected layer and shape.
5010    
5011            * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
5012            typo
5013    
5014    2002-07-24  Bernhard Herzog  <[email protected]>
5015    
5016            * Thuban/UI/application.py (ThubanApplication.create_session):
5017            Extend the doc string.
5018            (ThubanApplication.subscribe_session)
5019            (ThubanApplication.unsubscribe_session): New methods to
5020            subscribe/unsubscribe to/from session channels.
5021            (ThubanApplication.SetSession): Call the new methods here.
5022            (ThubanApplication.maps_changed, ThubanApplication.set_map):
5023            Renamed set_map to maps_changed. Its now a subscriber for
5024            MAPS_CHANGED.
5025    
5026            * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
5027            x-coordinate in case of simple clicks
5028    
5029            * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
5030            don't pass it as a parameter
5031    
5032            * Thuban/Model/session.py (Session.RemoveMap): New
5033    
5034            * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
5035            window size into a parameter.
5036    
5037    2002-07-23  Bernhard Herzog  <[email protected]>
5038    
5039            * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
5040            just commands.
5041    
5042            * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
5043            parameter list a bit to allow setting the window title and the
5044            initial message in the status bar. Update the callers.
5045    
5046            * Thuban/UI/application.py (ThubanApplication.OnInit)
5047            (ThubanApplication.CreateMainWindow): Put the mainwindow
5048            instantiation into a separate method so that it can be overridden
5049            by a subclass.
5050    
5051    2002-07-19  Bernhard Herzog  <[email protected]>
5052    
5053            * Thuban/Model/session.py: Issue a CHANGED message every time
5054            another changed message is issued to make it easier to get
5055            notified of changes.
5056            (Session): Update the doc string
5057            (Session.forward): Issue changed-events as CHANGED as well.
5058            (Session.changed): Overwrite the inherited version to issue
5059            CHANGED events as well.
5060    
5061            * Thuban/UI/tree.py: We can now simply subscribe to the session's
5062            CHANGED channel to be informed of changes.
5063            (SessionTreeCtrl.session_channels): Not needed any longer.
5064            (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
5065            Only have to (un)subscribe CHANGED
5066    
5067            * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
5068    
5069            * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
5070            for the wxPython locale bug to __init__.py so that it's
5071            automatically executed by anybody using UI code from Thuban.
5072    
5073    2002-07-18  Bernhard Herzog  <[email protected]>
5074    
5075            * Thuban/UI/main.py (main): app no longer needs to be global
5076    
5077            * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
5078            as parameter and store it in an instance variable
5079            (MainWindow.invoke_command, MainWindow.update_command_ui)
5080            (MainWindow.save_modified_session, MainWindow.NewSession)
5081            (MainWindow.OpenSession, MainWindow.SaveSession)
5082            (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
5083            application object.
5084    
5085            * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
5086            the main window with self.
5087    
5088            * Thuban/UI/context.py: New module with the context class
5089    
5090            * Thuban/UI/command.py (Command): Update doc string.
5091    
5092            * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
5093            MainWindow.update_command_ui): Pass an instance of the context
5094            class to the command's methods
5095            (check_current_tool, call_method): Handle the new context
5096            implementation
5097    
5098            * Examples/simple_extensions/simple_tool.py (simple_tool,
5099            check_simple_tool): Handle the new context implementation
5100    
5101            * Examples/simple_extensions/simple_command.py (simple_command):
5102            Handle the new context implementation. Update the comments about
5103            the context.
5104    
5105            * Thuban/UI/application.py (ThubanApplication.SetSession): Add
5106            doc-string
5107            (ThubanApplication.Session): New method to return the session
5108            object
5109    
5110            * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
5111            interactor's selected_layer may not be a layer of the current
5112            session when the tree is updated while a new session is being set.
5113    
5114    2002-07-17  Bernhard Herzog  <[email protected]>
5115    
5116            * Thuban/UI/tree.py (color_string): Removed. No longer used.
5117            (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
5118            update_tree into update_tree and add_items. The tree now uses a
5119            more generic way to display the contents of the tree.
5120            (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
5121    
5122            * Thuban/Model/layer.py (Layer.TreeInfo),
5123            Thuban/Model/extension.py (Extension.TreeInfo),
5124            Thuban/Model/map.py (Map.TreeInfo),
5125            Thuban/Model/session.py (Session.TreeInfo):
5126            Add TreeInfo methods to implement the new tree view update scheme
5127    
5128    2002-07-16  Bernhard Herzog  <[email protected]>
5129    
5130            * Thuban/UI/application.py: Don't use "import from" for the
5131            MainWindow. It can't always be resolved.
5132            (ThubanApplication.OnInit): change reference to MainWindow
5133            accordingly.
5134    
5135            * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
5136            completely
5137    
5138    2002-07-10  Bernhard Herzog  <[email protected]>
5139    
5140            * setup.py (create_init_module): New configurable variable whose
5141            default depends on the platform we're running on.
5142            (ThubanInstall.initialize_options): Initialize
5143            self.create_init_module from the global create_init_module
5144            (ThubanInstall.user_options): indictate that the options
5145            create-init-module and init-module-dir have arguments.
5146    
5147            * setup.py: In the setup call change the version number to include
5148            cvs.
5149    
5150            * MANIFEST.in: Add the files in Examples
5151    
5152    2002-07-09  Bernhard Herzog  <[email protected]>
5153    
5154            * setup.py: In the setup call, use the thuban homepage as the
5155            value of the url parameter.
5156    
5157            * Examples: New subdirectory for examples.
5158    
5159            * Examples/simple_extensions/simple_tool.xpm,
5160            Examples/simple_extensions/simple_tool.py,
5161            Examples/simple_extensions/simple_command.py,
5162            Examples/simple_extensions/README: Simple examples showing how to
5163            add new commands and tools.
5164    
5165            * setup.cfg (bdist_rpm): Add the default value for prefix and tell
5166            bdist_rpm that we also have an install script.
5167            (bdist_inno): Add 2002 to the copyright notice.
5168    
5169            * setup.py: Create a file in python's site-packages directory to
5170            make installation of Thuban as a library easier.
5171            (ThubanInstall.user_options): Add two new options,
5172            create-init-module and init-module-dir
5173            (ThubanInstall.expand_with_pure_python_dirs): New method to expand
5174            filenames for installation in the default directories.
5175            (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
5176            the inherited methods to capture some filenames before they're
5177            transformed too much by distutils.
5178            (ThubanInstall.run): Create the init module if requested.
5179            (ThubanInstall.thuban_init_filename): New method to return the
5180            full name of the init module.
5181            (ThubanInstall.get_outputs): Append the filename of the init
5182            module.
5183    
5184    2002-07-08  Bernhard Herzog  <[email protected]>
5185    
5186            * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
5187            handle the prefix properly which means that the default for the
5188            installation prefix should be /usr for RPMs and /usr/local when
5189            doing a normal source install.
5190            (bdist_rpm_install_script): Script to override the default install
5191            commands in the specfile generated by the bdist_rpm command.
5192            (thuban_bdist_rpm.user_options): Add a prefix option
5193            (thuban_bdist_rpm.initialize_options): Init the prefix option.
5194            Create the script files for the spec files as empty files here
5195            (thuban_bdist_rpm._make_spec_file): Override the inherited method
5196            to fill the script files with content.
5197    
5198            * Thuban/Model/save.py (relative_filename): Wrapper around
5199            Thuban.Lib.fileutil.relative_filename that accepts an empty dir
5200            argument. save_session now automatically uses this version,
5201            solving a problem when saving to a relative filename.
5202    
5203            * setup.py: In the setup call, make sure that the library
5204            directories are under $prefix/lib not directly under $prefix.
5205    
5206    2002-06-20  Jan-Oliver Wagner <[email protected]>
5207    
5208            * Thuban/Model/extension.py: new module to handle extension objects.
5209            * Thuban/Model/messages.py: new messages for extensions.
5210            * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
5211            Session.AddExtension): new for handling extensions.
5212            Also some other minor changes to round up extension handling.
5213            * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
5214            of Extension titles and title and names of its objects.
5215    
5216    2002-05-29  Bernhard Herzog  <[email protected]>
5217    
5218            * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
5219            the events for a command.
5220            (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
5221            Call bind_command_events to bind the events. add_toolbar_command
5222            can now bind events too so that it's possible to have commands
5223            that are only available through the toolbar.
5224            (MainWindow.init_ids): New instance variable events_bound to keep
5225            track of for which commands events have been bound.
5226    
5227    2002-05-28  Bernhard Herzog  <[email protected]>
5228    
5229            * Thuban/UI/menu.py: New module to build and manage menus.
5230    
5231            * Thuban/UI/mainwindow.py: Remove some unused imports.
5232            (MainWindow.__init__, main_menu): move the definition of the main
5233            menu from __init__ to the Menu instance main_menu.
5234            (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
5235            build the menu bar and sub-menus from a menu description.
5236    
5237            * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
5238            startup file
5239            (ThubanApplication.read_startup_files): New method to run
5240            ~/.thuban/thubanstart.py
5241    
5242            * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
5243            Move the toolbar definition to the Menu instance main_toolbar.
5244            (MainWindow.build_toolbar): New method to build the toolbar
5245            similar to the build_menu methods
5246    
5247    2002-05-23  Bernhard Herzog  <[email protected]>
5248    
5249            * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
5250            layer_outline_color. Fix it in the definition of the command too.
5251    
5252            * Thuban/UI/command.py (Command): Fix typo in doc string
5253    
5254    2002-05-22  Bernhard Herzog  <[email protected]>
5255    
5256            * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
5257            in the docstring
5258    
5259    2002-05-15  Bernhard Herzog  <[email protected]>
5260    
5261            * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
5262            when the shapefile is empty.
5263            (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
5264            now return None for empty shapefiles. Update doc-strings.
5265    
5266            * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
5267            the layer's bbox being None.
5268    
5269            * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
5270            layer's bbox being None.
5271    
5272            * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
5273            necessary.
5274            (MapCanvas.__init__): New instance variables, last_selected_layer
5275            and last_selected_shape to determine how the selection has
5276            changed.
5277    
5278            * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
5279            AutoSizeColumns because it will cause a traversal of the entire
5280            table which for large .dbf files will take a very long time.
5281    
5282    2002-05-14  Bernhard Herzog  <[email protected]>
5283    
5284            * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
5285            maximum depth for the tree than shapelib does by default.
5286    
5287    2002-05-10  Bernhard Herzog  <[email protected]>
5288    
5289            * setup.py (py_modules): The shptree modules doesn't have a
5290            wrapper, so don't include it in the py_modules
5291    
5292    2002-05-08  Bernhard Herzog  <[email protected]>
5293    
5294            * extensions/shapelib/shptree.c (compare_ints): Make arguments
5295            const void * as in the qsort prototype
5296            (SHPTreeFindLikelyShapes): Remove some unused variables.
5297    
5298            * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
5299            maintains to redraw the window during a drag.
5300            (MapCanvas.unprojected_rect_around_point): New method to determine
5301            a small region around a point for hit-testing.
5302            (MapCanvas.find_shape_at): Only test the shapes in a small region
5303            around the point.
5304    
5305            * setup.py: Increment the version to 0.1.2
5306    
5307            * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
5308            debug print and set session to None after unsubscribing
5309    
5310    2002-05-07  Bernhard Herzog  <[email protected]>
5311    
5312            * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
5313            the file to have a .thuban extension.
5314    
5315            * Thuban/UI/tree.py (session_channels): New class constant with
5316            all the session channels to subscribe to to update the tree
5317            (SessionTreeCtrl.session_changed): Remember the session so that we
5318            can unsubscribe properly. Use the new class constant to
5319            unsubscribe from the old session and subscribe to the new one.
5320            (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
5321            subscriptions of the SessionTreeCtrl.
5322            (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
5323    
5324            * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
5325            Session Tree" command to the file menu.
5326    
5327            * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
5328            as update_region to the renderer.
5329    
5330            * Thuban/UI/renderer.py
5331            (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
5332            update box is now directly a tuple, not a wxRect anymore.
5333    
5334            * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
5335            prints.
5336    
5337    2002-05-07  Bernhard Herzog  <[email protected]>
5338    
5339            * setup.py: Add the shptree extension module. See
5340            extensions/pyshapelib/ChangeLog for more details.
5341    
5342            * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
5343            extensions/shapelib/dbfopen.c: Really update to the versions of
5344            shapelib 1.2.9. For some reason it wasn't really done on
5345            2002-04-11.
5346    
5347            * extensions/shapelib/shptree.c: Modified version of shptree.c of
5348            shapelib 1.2.9. The only real difference is the use of qsort
5349            instead of a bubble sort implementation
5350    
5351            * Thuban/Model/layer.py (Layer.__init__): New instance variable
5352            shapetree to hold the shapelib quadtree for the shapefile
5353            (Layer.open_shapefile): Create the quad tree.
5354            (Layer.ShapesInRegion): New method to return the ids of shapes in
5355            a given region using the quad tree.
5356    
5357            * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
5358            comment
5359            (draw_polygon_shape): Accept both arcs and polygons.
5360            (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
5361            the api.
5362    
5363            * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
5364            return the shape ids to be rendered in a given layer.
5365            (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
5366            ids. Use draw_polygon_shape to draw arc shapes as well.
5367            (ScreenRenderer.RenderMap): New parameter for the rectangle that
5368            has to be updated
5369            (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
5370            calling it's ShapesInRegion method.
5371    
5372            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
5373            update_region for the update region.
5374            (MapCanvas.OnPaint): Maintain the update region
5375            (MapCanvas.do_redraw): Pass the bounding box of the update_region
5376            to the renderer when drawing the bitmap. Reset the update_region.
5377    
5378    2002-05-03  Bernhard Herzog  <[email protected]>
5379    
5380            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
5381            MainWindow.OpenSession): Change the file extension of the session
5382            files to .thuban
5383    
5384            * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
5385            Move the map channels to be forwarded by the session into the
5386            class constant with forwarded_channels. Also add
5387            LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
5388            forwarded_channels
5389    
5390            * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
5391            typo and some rewording).
5392    
5393    2002-05-02  Bernhard Herzog  <[email protected]>
5394    
5395            * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
5396            around to speed up most redraws:
5397            (MapCanvas.__init__): New instance variable bitmap which holds the
5398            bitmap
5399            (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
5400            self.bitmap to draw.
5401            (MapCanvas.full_redraw): New method to force a full redraw
5402            including the bitmap
5403            (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
5404            make sure the bitmap is redrawn.
5405            (MapCanvas.projection_changed, MapCanvas.set_view_transform,
5406            MapCanvas.shape_selected): Call full_redraw instead of readraw to
5407            make sure the bitmap is redrawn.
5408            (MapCanvas.OnSize): New method to handle size events so that the
5409            bitmap can be redrawn.
5410    
5411    2002-04-29  Bernhard Herzog  <[email protected]>
5412    
5413            * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
5414            canvas' VIEW_POSITION event
5415            (MainWindow.view_position_changed): Handler for VIEW_POSITION.
5416            Update the text in the status-bar accordingly.
5417    
5418            * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
5419            (MapCanvas.__del__): Implement because Publisher.__del__ has to be
5420            called.
5421            (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
5422            current_position
5423            (MapCanvas.set_current_position): New method to set
5424            current_position. Issue a VIEW_POSITION event
5425            (MapCanvas.CurrentPosition): New public method to return the value
5426            of current_position. Should be called when the VIEW_POSITION event
5427            is processed.
5428            (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
5429            Update the position.
5430            (MapCanvas.OnLeaveWindow): Set the position to None.
5431    
5432            * Thuban/UI/messages.py (VIEW_POSITION): New message for the
5433            position in the statusbar
5434    
5435    2002-04-26  Frank Koormann <[email protected]>
5436    
5437            * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
5438    
5439    2002-04-24  Frank Koormann <[email protected]>
5440    
5441            * Resources/Bitmaps/identify.xpm: shadow added
5442    
5443            * Resources/Bitmaps/fullextent.xpm: new
5444    
5445    2002-04-22  Jan-Oliver Wagner <[email protected]>
5446    
5447            * Thuban/UI/tree.py (update_tree): added test for None on map bounding
5448            box
5449    
5450    2002-04-21  Jan-Oliver Wagner <[email protected]>
5451    
5452            * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
5453    
5454            * Thuban/UI/tree.py (update_tree): added added map extent
5455    
5456            * Thuban/UI/mainwindow.py (_method_command): extended by parameter
5457            icon; added map_full_extend as tool
5458    
5459    2002-04-19  Jan-Oliver Wagner <[email protected]>
5460    
5461            * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
5462            saving _new_ sessions
5463    
5464            * Thuban/Model/session.py (create_empty_session): new session
5465            don't have a filename (set to None)
5466    
5467            * Thuban/UI/tree.py (update_tree): added filename and modified flag
5468    
5469            * Thuban/Model/load.py (ProcessSession): convert projection
5470            parameters from unicode to regular string
5471    
5472            * Data/iceland_sample.session: Added UTM Zone 26 projection.
5473    
5474    2002-04-11  Bernhard Herzog  <[email protected]>
5475    
5476            * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
5477            extensions/shapelib/dbfopen.c: Update to the versions of shapelib
5478            1.2.9
5479    
5480            * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
5481            the pyshapelib directoy into the list of include dirs, so that
5482            pyshapelib_api.h can be found.
5483    
5484            * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
5485            holds the pyshapelib C-API
5486            (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
5487            pyshapelib_api to access the shapelib functions.
5488            (initwxproj): Import the c_api from the shapelib module and
5489            initialize pyshapelib_api.
5490    
5491    2002-04-04  Bernhard Herzog  <[email protected]>
5492    
5493            * setup.py (thuban_bdist_rpm.initialize_options): Use
5494            initialize_options to create the scripts for the rpm.
5495    
5496            * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
5497    
5498    2002-04-03  Bernhard Herzog  <[email protected]>
5499    
5500            * setup.py: Increment version to 0.1.1
5501    
5502            * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
5503            Layer" and "Remove Layer" commands from the layer menu to the map
5504            menu
5505    
5506    2002-02-15  Bernhard Herzog  <[email protected]>
5507    
5508            * Thuban/Model/layer.py (Layer.Shape): list append only takes one
5509            argument (python <= 1.5.2 erroneously accepted multiuple
5510            arguments)
5511    
5512    2002-02-04  Bernhard Herzog  <[email protected]>
5513    
5514            * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
5515            RecordGrid in the identifyview.
5516            (IdentifyView.__init__): Use IdentifyGridCtrl instead of
5517            IdentifyListCtrl. The grid allows editing of the values.
5518    
5519            * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
5520            implementing a grid for a single row of a thuban table.
5521    
5522            * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
5523            layers by default. Easier to use than the previous default of only
5524            searching through the select layer which meant that if no layer
5525            was selected, you couldn't select a shape.
5526    
5527            * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
5528    
5529            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
5530            stroke_width attribute
5531    
5532            * Thuban/Model/save.py (save_session): Write the new stroke_width
5533            attribute
5534    
5535            * Thuban/Model/load.py (ProcessSession.startElement): Read the
5536            stroke_width attribute
5537    
5538            * Thuban/Model/layer.py (Layer.__init__): New parameter and
5539            instance variable stroke_width
5540            (Layer.SetStrokeWidth): Set the stroke_width.
5541    
5542    2002-02-01  Bernhard Herzog  <[email protected]>
5543    
5544            * extensions/thuban/wxproj.cpp (project_points): Fix two
5545            off-by-one errors in the last loop that joins the various parts
5546            together.
5547    
5548    2002-01-14  Bernhard Herzog  <[email protected]>
5549    
5550            * setup.py (data_dist.make_distribution): Fix some typos
5551    
5552    2001-09-18  Bernhard Herzog  <[email protected]>
5553    
5554            * README: Slight tweaking in preparation for the 0.1 release
5555    
5556            * setup.cfg: Add section for sdist to create both tgz and zip
5557            archives
5558    
5559            * setup.py: increase version number to 0.1
5560            (data_dist): New command class for data distribution
5561    
5562    2001-09-14  Bernhard Herzog  <[email protected]>
5563    
5564            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
5565            Handle the case of no layer (i.e. layer is None) properly.
5566    
5567            * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
5568            Set the initial selection of the combo boxes to reflect the
5569            projection we're starting with in a way that works on windows,
5570            too.
5571    
5572            * Thuban/Lib/connector.py (Connector.print_connections): Print the
5573            puiblisher's ids in hex to make it easier to compare them to the
5574            standard repr of python methods
5575    
5576            * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
5577            messages
5578    
5579    2001-09-13  Bernhard Herzog  <[email protected]>
5580    
5581            * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
5582            deselect the layer if no layer is selected
5583    
5584            * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
5585            idle time when there actually is something to draw. If there's
5586            nothing to draw simply clear the window
5587            (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
5588            (MapCanvas.SetMap): force a redraw in all cases because
5589            FitMapToWindow doesn't always do it.
5590            (MapCanvas.ZoomFactor): Add an optional parameter, center, to
5591            specify the point to move into the center of the window
5592            (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
5593            dragged, zoon in/out by a factor of 2
5594            (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
5595            index, i.e. reversed drawing order) so that objects appearing to
5596            be in from of others are selected first. This is probably mostly
5597            relevant for point shapes where the symbols used may overlap
5598    
5599            * Thuban/Model/session.py (create_empty_session): Unset the
5600            modified bit before returning it
5601    
5602            * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
5603            create_empty_session session to create the new, empty session.
5604    
5605            * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
5606            the tool bitmaps.
5607            (MainWindow.OnClose, MainWindow.save_modified_session): Separate
5608            the code that asks whether the session should be saved into the
5609            new method save_modified_session.
5610            (MainWindow.OpenSession, MainWindow.NewSession): Use the new
5611            method to save modified session here too.
5612    
5613  2001-09-11  Bernhard Herzog  <[email protected]>  2001-09-11  Bernhard Herzog  <[email protected]>
5614    
5615          * setup.py (InnoIconItem): fix typo          * setup.py (InnoIconItem): fix typo
# Line 62  Line 5674 
5674          (MainWindow.identify_view_on_demand): Store the interactor in an          (MainWindow.identify_view_on_demand): Store the interactor in an
5675          instvar and use that reference instead of going through main.app          instvar and use that reference instead of going through main.app
5676    
5677          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
5678          * Thuban/UI/application.py (ThubanApplication.OnInit):          * Thuban/UI/application.py (ThubanApplication.OnInit):
5679          * Thuban/UI/main.py (main): Create the session tree view in main          * Thuban/UI/main.py (main): Create the session tree view in main
5680          with the new mainwindow method ShowSessionTree and not directly          with the new mainwindow method ShowSessionTree and not directly
5681          the application's OnInit method          the application's OnInit method
# Line 79  Line 5691 
5691          layer to the tableview dialog.          layer to the tableview dialog.
5692    
5693          * Thuban/UI/tableview.py: Add some doc-strings          * Thuban/UI/tableview.py: Add some doc-strings
5694          (TableGrid):          (TableGrid):
5695          (TableGrid.OnRangeSelect):          (TableGrid.OnRangeSelect):
5696          (TableGrid.OnSelectCell):          (TableGrid.OnSelectCell):
5697          (TableFrame.__init__):          (TableFrame.__init__):
# Line 146  Line 5758 
5758  2001-09-05  Bernhard Herzog  <[email protected]>  2001-09-05  Bernhard Herzog  <[email protected]>
5759    
5760          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
5761            
5762          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
5763          interactor to pass through to the MapCanvas          interactor to pass through to the MapCanvas
5764            
5765          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
5766          argument to the MainWindow constructor to get rid of the ugly hack          argument to the MainWindow constructor to get rid of the ugly hack
5767          that made main.app available early just so that the mapcanvas          that made main.app available early just so that the mapcanvas
# Line 196  Line 5808 
5808          (ThubanInstall.run): Remove the leading install root from the          (ThubanInstall.run): Remove the leading install root from the
5809          script filename if an install root was specified and use the new          script filename if an install root was specified and use the new
5810          link_file method          link_file method
5811            
5812          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
5813          the window when the first layer is added to the map.          the window when the first layer is added to the map.
5814    
# Line 233  Line 5845 
5845          (InnoIconItem): Helper class for bdist_inno          (InnoIconItem): Helper class for bdist_inno
5846          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
5847          this together with the appropriate parameters, to the setup call.          this together with the appropriate parameters, to the setup call.
5848            
5849          * setup.cfg (bdist_inno): added new section for the inno setup          * setup.cfg (bdist_inno): added new section for the inno setup
5850          installer          installer
5851    

Legend:
Removed from v.55  
changed lines
  Added in v.1449

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26