/[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 1862 by jan, Fri Oct 24 16:03:40 2003 UTC
# Line 1  Line 1 
1    2003-10-24  Jan-Oliver Wagner <[email protected]>
2    
3            * Thuban/Model/proj.py (Projection.GetProjectedUnits): Added 'longlat'
4            as alias for 'latlong'.
5    
6            * Thuban/UI/projdialog.py (ProjFrame.__init__): Added 'longlat'
7            as alias for 'latlong'.
8    
9    2003-10-24  Jan-Oliver Wagner <[email protected]>
10    
11            * Thuban/UI/projdialog.py (ProjFrame.proj_selection_changed): Set
12            the projection even for the UnknownPanel.
13            (UnknownProjPanel.__init__): Define the text and create the textctrl
14            widget.
15            (UnknownProjPanel._DoLayout): Replaced static text widget by the
16            textctrl created in __init__.
17            (UnknownProjPanel.SetProjection): Set the text for the text ctrl
18            including the parameters of the projection.
19            
20    2003-10-24  Jan-Oliver Wagner <[email protected]>
21    
22            * Resources/Projections/epsg.proj: New. This is a list of
23            EPSG codes with parameters for proj. The list has been
24            generated using devtools/create_epsg.py based on the
25            file nad/epsg of the proj 4.4.7 package. Four projection
26            definitions have been deleted as they are not accepted by proj:
27            "CH1903+ / LV95", "Bern 1898 (Bern) / LV03C", "CH1903 / LV03"
28            and "HD72 / EOV".
29    
30    2003-10-22  Bernhard Herzog  <[email protected]>
31    
32            Some more tweaks to the projection dialog which should fix RT
33            #1886.
34    
35            * Thuban/UI/projlist.py (ProjectionList.Destroy): Unsubscribe from
36            the ProjFile's messages and call the base class methods correctly
37            (ProjectionList.SelectProjection): Set the wxLIST_STATE_FOCUSED
38            flag on the newly selected item too. Otherwise some other item is
39            focused and the first time the focus is moved with the keyboard
40            the selection moves in unexpected ways.
41    
42            * Thuban/UI/projdialog.py (ProjFrame.__init__): Do not set the
43            focus on the OK button, only on the projection list. That way the
44            list really has the focus initially
45            (ProjFrame.OnClose): Call the projection list's Destroy method to
46            make it unsubscribe all messages
47    
48    2003-10-21  Bernhard Herzog  <[email protected]>
49    
50            Rework the projection dialog to fix a few bugs, including RT 2166
51            and most of 2168
52    
53            * Thuban/UI/projlist.py: New. The class ProjectionList is a
54            special wxListCtrl to show a list of projections in a more MVC
55            fashion
56    
57            * Thuban/UI/projdialog.py (ProjFrame): Substantial changes
58            throughout the class. The main change is to use the ProjectionList
59            class instead of a normal wxListBox. Also, add an explicit
60            "Unknown" projection to the projection choice control.
61            (ProjPanel.__init__): Add an "unknown" ellipsoid
62            (TMPanel.__init__, LCCPanel.__init__): Tweak the order of
63            instantiation of the panel's controls to make the tab-order more
64            natural
65    
66    2003-10-21  Bernhard Herzog  <[email protected]>
67    
68            * test/test_load.py (TestSingleLayer.file_contents)
69            (TestSingleLayer.test): Add non-ascii characters to the titles of
70            session, map and layer. This is effectively a port of the
71            TestUnicodeStrings test in test_load_0_8.py which for some reason
72            was only added there.
73    
74            * test/test_load_0_9.py (TestSingleLayer.file_contents)
75            (TestSingleLayer.test): Same as in test_load.py: add non-ascii
76            characters to the titles of session, map and layer,.
77    
78    2003-10-21  Bernhard Herzog  <[email protected]>
79    
80            Add EPSG projection handling to .thuban files
81    
82            * test/test_save.py (SaveSessionTest.dtd)
83            (SaveSessionTest.testEmptySession)
84            (SaveSessionTest.testLayerProjection)
85            (SaveSessionTest.testRasterLayer)
86            (SaveSessionTest.testClassifiedLayer)
87            (SaveSessionTest.test_dbf_table)
88            (SaveSessionTest.test_joined_table)
89            (SaveSessionTest.test_save_postgis): Update to 1.0-dev namespace
90            (SaveSessionTest.testSingleLayer): Update to 1.0-dev namespace and
91            use a and epsg projection to test saving them
92    
93            * test/test_load.py (LoadSessionTest.dtd): Update to 1.0-dev
94            namespace
95            (TestLayerVisibility.file_contents, TestLabels.file_contents)
96            (TestLayerProjection.file_contents)
97            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
98            (TestPostGISLayer.file_contents)
99            (TestPostGISLayerPassword.file_contents)
100            (TestLoadError.file_contents, TestLoadError.test): Update to use
101            1.0-dev namespace
102            (TestSingleLayer.file_contents, TestSingleLayer.test): Update to
103            use 1.0-dev namespace and use an EPSG projection to test whether
104            loading it works
105    
106            * test/test_load_0_9.py: New. Effectively a copy of test_load.py
107            as of Thuban 0.9. These are now tests to determine whether Thuban
108            can still read files generated by Thuban 0.9
109    
110            * Thuban/Model/save.py (SessionSaver.write)
111            (SessionSaver.write_session): Use the 1.0 dtd and 1.0-dev
112            namespace
113            (SessionSaver.write_projection): Write the projection's epsg
114            attribute
115    
116            * Thuban/Model/load.py (SessionLoader.__init__): Also accept the
117            thuban-1.0-dev.dtd namespace
118            (SessionLoader.check_attrs): Allow a callable object as conversion
119            too
120            (SessionLoader.start_projection, SessionLoader.end_projection)
121            (SessionLoader.start_parameter): Handle the epsg attribute and
122            rename a few instance variables to lower case
123    
124            * Resources/XML/thuban-1.0.dtd: New. Only difference to
125            thuban-0.9.dtd is the epsg attribute for projections.
126    
127    2003-10-21  Bernhard Herzog  <[email protected]>
128    
129            * test/runtests.py (main): Let the user specify which tests to run
130            on the command line
131    
132            * test/support.py (ThubanTestResult.getDescription): Override to
133            give a better short description. The description can be used as a
134            parameter to run_tests to run that particular test in isolation.
135    
136    2003-10-21  Frank Koormann   <[email protected]>
137    
138            Popup menu for legend. Scheduled for the 1.2 release this was too
139            simple to implement: The popup menu is bound to the legend tree, while
140            the events are hanlded by its anchestor, the legend panel. This
141            allows reuse of all the event handlers already implemented for the
142            legend toolbar buttons.
143    
144            * Thuban/UI/legend.py (LegendPanel.__init__): EVT_MENU macros
145            to add handlers for the events issued by the popup menu.
146            (LegendPanel._OnToggleVisibility): Handler for toggling layer
147            visibility event
148            (LegendPanel._OnProjection): Handler for layer projection event.
149            (LegendTree.__init__): Added EVT_TREE_ITEM_RIGHT_CLICK
150            (LegendTree._OnRightClick): Event handler for right click, select item
151            and pop up menu.
152            (LegendTree.ToggleVisibility): Toggle layer visibility
153            (LegendTree.LayerProjection): Raise layer projection dialog for
154            current layer.
155    
156    2003-10-21  Bernhard Herzog  <[email protected]>
157    
158            * Resources/Projections/defaults.proj: Use correct DOCTYPE
159            declaration. The top-level element is projectionlist not projfile
160    
161    2003-10-20  Bernhard Herzog  <[email protected]>
162    
163            * Thuban/UI/projdialog.py (ProjFrame.write_proj_file): New. helper
164            method to write a projfile and display a busy cursor and error
165            dialogs.
166            (ProjFrame._OnSave, ProjFrame._OnAddToList, ProjFrame._OnImport)
167            (ProjFrame._OnExport, ProjFrame._OnRemove): Use write_proj_file
168            (ProjFrame.__FillAvailList): Translate "<None>" too and display a
169            busy cursor while loading the user and system prj files.
170    
171    2003-10-16  Bernhard Herzog  <[email protected]>
172    
173            * Thuban/Model/resource.py (projfile_cache): Introduce a cache for
174            ProjFile objects
175            (clear_proj_file_cache): New function to clear the cache. Mainly
176            useful for use by the test suite
177            (read_proj_file): Use the cache.
178    
179            * test/test_proj.py (TestProjFile): Clarify the doc-string
180            (ProjFileReadTests): Update doc-string
181            (ProjFileReadTests.test_get_system_proj_file): Check whether the
182            system proj files is cached.
183            (ProjFileLoadTestCase): New base class for the proj file tests
184            derived from support.FileLoadTestCase to provide some common
185            behavior.
186            (TestLoadingProjFile)
187            (TestLoadingProjFileWithEmptyProjectionlist.file_contents)
188            (TestProjFileWithInvalidParameters.file_contents): Derive from
189            ProjFileLoadTestCase
190            (TestLoadingProjFile.test_caching): New. Test whether the cache
191            works
192    
193    2003-10-16      Silke Reimer    <[email protected]>
194    
195            * debian/*: New directory with configuration files for building a thuban
196              deb-package.
197    
198    2003-10-14  Bernhard Herzog  <[email protected]>
199    
200            * test/test_proj.py: Execute support.run_tests when run as
201            __main__ so that missing unsubscribes are detected
202            (TestProjFile.tearDown): Destroy the proj_file properly
203    
204    2003-10-14  Bernhard Herzog  <[email protected]>
205    
206            * Thuban/Model/messages.py (PROJECTION_ADDED)
207            (PROJECTION_REPLACED, PROJECTION_REMOVED): New message types for
208            the ProjFile objects
209    
210            * Thuban/Model/proj.py (ProjFile): Derive from Publisher so we can
211            easily send messages when the projections change
212            (ProjFile.Add, ProjFile.Remove, ProjFile.Replace): Issue messages
213            when the change was successful
214    
215            * test/test_proj.py (TestProjFile.setUp): Subscribe to some of the
216            proj file messages
217            (TestProjFile.test_add_remove)
218            (TestProjFile.test_remove_non_existing)
219            (TestProjFile.test_replace)
220            (TestProjFile.test_replace_non_existing): Test whether the right
221            messages are sent
222    
223    2003-10-14  Bernhard Herzog  <[email protected]>
224    
225            * test/test_proj.py (TestProjFile.test): Refactor into several
226            tests
227            (TestProjFile.test_add_remove)
228            (TestProjFile.test_remove_non_existing)
229            (TestProjFile.test_replace)
230            (TestProjFile.test_replace_non_existing): Some of the new
231            individual test cases
232            (TestProjFileSimple): New class for the rest of the test cases
233            that came out of the refactoring
234            (ProjFileTest): Derive from xmlsupport.ValidationTest so that the
235            derived classes don't have to
236    
237    2003-10-13  Bernhard Herzog  <[email protected]>
238    
239            Add an optional EPSG code to the projection objects and extend the
240            .proj file format accordingly.
241    
242            * Resources/XML/projfile.dtd (element projection): Add epsg
243            attribute
244    
245            * Thuban/Model/proj.py (Projection.__init__): New parameter and
246            instance variable epsg. Update doc-string
247            (Projection.EPSGCode, Projection.Label): New methods to provide
248            access to EPSG code and a label for use in dialogs
249    
250            * Thuban/Model/resource.py (ProjFileReader.start_projection)
251            (ProjFileReader.end_projection, ProjFileSaver.write_projfile):
252            Handle the epsg code attribute when reading or writing proj files
253    
254            * Thuban/UI/projdialog.py (ProjFrame._OnSave)
255            (ProjFrame._OnAddToList, ProjFrame.__DoOnProjAvail)
256            (ProjFrame.__FillAvailList): Use the projection's Label method to
257            get the string for the list box
258    
259            * test/test_proj.py (TestProjection.test_label)
260            (TestProjection.test_label_epsg)
261            (TestProjection.test_epsgcode_for_non_epsg_projection)
262            (TestProjection.test_epsgcode_for_real_epsg_projection): New tests
263            for the label and EPSGCode methods
264            (WriteProjFileTests.doTestWrite, WriteProjFileTests.test_write)
265            (WriteProjFileTests.test_write_empty_file): Create the ProjFile
266            objects in the test cases and put the expected contents into the
267            test case methods too. Update doTestWrite accordingly
268            (TestLoadingProjFile)
269            (TestLoadingProjFileWithEmptyProjectionlist): New classes with the
270            read tests from TestProjFile.
271            (TestProjFile.doTestRead, TestProjFile.testRead): Removed. These
272            tests are now in the new classes.
273            (sample_projfile, sample_projfile_data)
274            (sample_projfile2, sample_projfile_data2): Removed. Not used
275            anymore.
276            (TestProjFile.test_read_unreadable_file): No need to reset the
277            permissions at the end anymore since we use a unique filename
278    
279    2003-10-13  Bernhard Herzog  <[email protected]>
280    
281            * test/test_proj.py: Some more refactoring of the test cases
282            (ProjFileTest): New base class for the proj file tests.
283            (TestProjFile): Derive from ProjFileTest
284            (TestProjFile.test_read_unreadable_file)
285            (TestProjFile.test_read_empty_file, TestProjFile.doTestRead): Use
286            the new filename method to get a unique filename
287            (TestProjFile.doTestWrite, TestProjFile.testWrite): Removed.
288            (WriteProjFileTests): New class for proj file write tests.
289            Contains the write test that were in TestProjFile originally.
290    
291    2003-10-13  Bernhard Herzog  <[email protected]>
292    
293            * test/test_proj.py (TestProjFile.testRead)
294            (TestProjFile.test_read_non_existing_file)
295            (TestProjFile.test_read_unreadable_file)
296            (TestProjFile.test_read_empty_file): Split into several methods.
297    
298    2003-10-10  Bernhard Herzog  <[email protected]>
299    
300            * Thuban/UI/sizers.py: New file with custom sizers.
301    
302            * Thuban/UI/projdialog.py (ProjFrame.build_dialog): Instantiate
303            all projection type specific panels and put them into a
304            NotebookLikeSizer. This way the dialog doesn't change its size
305            when a different projection is selected
306            (ProjFrame.__init__): Rename projection_panels
307            projection_panel_defs and reuse projection_panels for a list of
308            the instantiated panels.
309            (ProjFrame._show_proj_panel, ProjFrame.__DoOnProjAvail)
310            (ProjFrame.__DoOnProjChoice): Changes due to the new handling of
311            the panels
312            (UnknownProjPanel._DoLayout): Place the newlines in the message
313            differently to make the panel narrower.
314            (TMPanel._DoLayout): Layout the parameters in one column.
315    
316    2003-10-10  Bernhard Herzog  <[email protected]>
317    
318            * Thuban/UI/projdialog.py (ProjFrame.build_dialog): New method
319            that contains all the setup for the dialog's widgets, layout and
320            event handling.
321            (__): Call build_dialog to build the dialog.
322            (ProjFrame.__set_properties, ProjFrame.__do_layout): Removed.
323            Their functionality is now in build_dialog
324            (ProjFrame.__VerifyButtons, ProjFrame.__VerifyButtons)
325            (ProjFrame.__DoOnProjAvail, ProjFrame.__DoOnProjAvail)
326            (ProjFrame.__DoOnProjChoice): Small updates due to slightly
327            different widget names and hierarchy introduced with build_dialog.
328    
329    2003-10-10  Bernhard Herzog  <[email protected]>
330    
331            * README: Fix typo.
332    
333    2003-10-09  Bernhard Herzog  <[email protected]>
334    
335            * Thuban/Model/proj.py (ProjFile.Add): Do not check whether the
336            projection is already in the list. This is *a lot* faster when
337            loading files with hundreds of projections since it saves a linear
338            search. OTOH this will allow adding the same projection to the
339            user.proj file multiple times in the projection dialog but we'll
340            deal with that later
341    
342    2003-10-09  Jan-Oliver Wagner <[email protected]>
343    
344            * devtools: New. Directory for developer tools that are not intended
345            for the regular user.
346    
347            * devtools/create_epsg.py: New. Convert the epsg file of proj into
348            a python .proj file.
349    
350    2003-10-09  Bernhard Herzog  <[email protected]>
351    
352            * test/test_proj.py
353            (TestProjection.test_get_parameter_without_equals_sign): New. Test
354            whether GetParameter handles parameters without "=" sign correctly
355    
356            * Thuban/Model/proj.py (Projection.GetParameter): Handle
357            parameters that do not contain a "=". Update the doc-string
358    
359    2003-10-08  Bernhard Herzog  <[email protected]>
360    
361            * Thuban/UI/projdialog.py (ProjFrame.__set_properties): Remove the
362            length limit on the projname text control
363    
364    2003-10-08  Bernhard Herzog  <[email protected]>
365    
366            * test/test_proj.py (TestProjection.test_get_projection_units_geo)
367            (TestProjection.test_get_projection_units_normal): New. Tests for
368            the Projection.GetProjectedUnits method
369    
370    2003-10-08  Jan-Oliver Wagner <[email protected]>
371    
372            * Thuban/Model/resource.py (get_user_proj_file): small bug-fix:
373            Added missing 'val' parameter.
374    
375    2003-10-08  Bernhard Herzog  <[email protected]>
376    
377            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): When the
378            projection type of the currently selected projection is not known,
379            i.e. there's no panel for it, use the UnknownProjPanel
380            (ProjFrame.__DoOnProjChoice, ProjFrame._show_proj_panel): Split
381            the actual replacing of the proj panel into the new method
382            _show_proj_panel.
383            (UnknownProjPanel): Add doc-string.
384            (UnknownProjPanel._DoLayout): Insert a newline into the text so
385            that the panel is not so wide.
386    
387    2003-10-08  Bernhard Herzog  <[email protected]>
388    
389            * Thuban/Model/resource.py (read_proj_file): Return the warnings
390            too. Update the doc-string
391            (get_proj_files): Removed. It wasn't used anywhere
392            (get_system_proj_files, get_system_proj_file): Rename to
393            get_system_proj_file and return the ProjFile object and not a list
394            of ProjFile objects. Update the callers.
395            (get_user_proj_files, get_user_proj_file): Rename to
396            get_user_proj_file return the ProjFile object and not a list of
397            ProjFile objects. Update the callers.
398            (ProjFileReader.__init__): New instance variable for the warnings.
399            Rename the __pf ivar to projfile. Update the methods referring to
400            __pf
401            (ProjFileReader.end_projection): Catch any errors raised when
402            instantiating the projection and record that as an error. The
403            projection will not be in the final ProjFile object.
404            (ProjFileReader.GetWarnings): New method to return the warnings.
405    
406            * Thuban/UI/projdialog.py (ProjFrame.show_warnings): New method to
407            show the warnings from the projfile reader
408            (ProjFrame._OnImport): Deal with any warnings returned by
409            read_proj_file
410            (ProjFrame.__FillAvailList): Deal with any warnings returned by
411            get_system_proj_file or get_user_proj_file.
412    
413            * test/test_proj.py (TestProjFile.doTestRead): Check the warnings.
414            (TestProjFileWithInvalidParameters.file_contents): New test cases
415            to test whether read_proj_file handles invalid projection
416            parameters correctly
417            (TestProjFile.test_get_system_proj_file): New. Simple test for
418            resource.get_system_proj_file
419    
420    2003-10-07  Bernhard Herzog  <[email protected]>
421    
422            * test/test_derivedshapestore.py
423            (TestDerivedShapeStoreExceptions.tearDown): Clear the session
424            properly so that the temporary directories get deleted correctly
425    
426    2003-10-06  Bernhard Herzog  <[email protected]>
427    
428            Handle the title changes in a proper MVC way.
429    
430            * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
431            canvas' TITLE_CHANGED messages
432            (MainWindow.update_title): New. Update the main window's title
433            (MainWindow.__SetTitle): Removed. Use update_title instead.
434            (MainWindow.SetMap): Use update_title instead of __SetTitle
435            (MainWindow.RenameMap): Do change the window title explicitly
436            here. That's handled in a proper MVC way now.
437            (MainWindow.title_changed): New. Subscriber for the TITLE_CHANGED
438            messages
439    
440            * Thuban/Lib/connector.py (Conduit): New class to help classes
441            that forward messages
442    
443            * Thuban/UI/viewport.py: Forward the map's TITLE_CHANGED messages
444            (ViewPort): Derive from Conduit instead of Publisher
445            (ViewPort.Subscribe, ViewPort.Unsubscribe): Use the new base class
446            when calling the inherited versions
447            (ViewPort._subscribe_map, ViewPort._unsubscribe_map): New helper
448            methods to subscribe and unsubscribe map messages
449            (ViewPort.SetMap, ViewPort.Destroy): Use the new helper methods to
450            handle the map subscriptions
451            (ViewPort.Map, ViewPort.map_projection_changed)
452            (ViewPort.layer_projection_changed): Add or update doc-strings
453    
454            * test/test_connector.py (TestPublisher.test_issue_simple): Fix
455            typo
456            (MyConduit): Helper class for the Conduit test.
457            (TestConduit): Test cases for Conduit
458    
459            * test/test_connector.py: Use support.run_tests as main.
460    
461            * test/test_viewport.py (ViewPortTest.setUp): Also subscribe to
462            the TITLE_CHANGED messages
463            (ViewPortTest.test_forwarding_title_changed): New test to check
464            whether the viewport forwards the map's TITLE_CHANGED messages
465            (TestViewportWithPostGIS.tearDown): Call the map's Destroy method
466            after the port's because the latter may require a still functional
467            map.
468    
469    2003-10-06  Bernhard Herzog  <[email protected]>
470    
471            * Thuban/UI/application.py (ThubanApplication.maps_changed): Add
472            doc-string
473    
474    2003-10-06  Bernhard Herzog  <[email protected]>
475    
476            * test/test_viewport.py (ViewPortTest.setUp)
477            (SimpleViewPortTest.test_init_with_size): Move the test for the
478            initial size as a constructor parameter from ViewPortTest.setUp
479            method to a new separate test in SimpleViewPortTest.
480    
481    2003-10-06  Bernhard Herzog  <[email protected]>
482    
483            * test/test_viewport.py (MockView): New class derived from
484            ViewPort with a mock implementation of GetTextExtent to be used in
485            the test cases
486            (ViewPortTest.setUp): Use MockView instead of ViewPort
487    
488            * Thuban/UI/viewport.py (ViewPort.GetTextExtent): Turn this method
489            into what would be a "pure virtual function" in C++: always raise
490            NotImplementedError. Mock implementations for test cases don't
491            belong into the real code
492    
493    2003-10-02  Bernhard Herzog  <[email protected]>
494    
495            * test/test_layer.py (TestLayer.test_empty_layer): Explicitly
496            close the dbf file we create so that it's contents have been
497            written properly.
498    
499            * libraries/shapelib/shptree.c, libraries/shapelib/shpopen.c,
500            libraries/shapelib/shapefil.h, libraries/shapelib/dbfopen.c:
501            Update to shapelib 1.2.10
502    
503    2003-10-01  Jan-Oliver Wagner <[email protected]>
504    
505            * Thuban/UI/tree.py, Thuban/UI/main.py: Remove the #! line as
506            it annoys lintian which warns about these files not being
507            executable. The #! isn't necessary here since if you absolutely
508            must execute them you can always say "python <filename>".
509    
510    2003-09-26  Bernhard Herzog  <[email protected]>
511    
512            * Thuban/Model/classgen.py (GenQuantiles0): Removed since it's
513            only used in GREAT-ER but not used in Thuban itself. When GREAT-ER
514            is ported to a newer the import will fail, so it should be noticed
515            immediately that this function is gone.
516            Fixes RT#1919
517    
518    2003-09-26  Bernhard Herzog  <[email protected]>
519    
520            Add a DTD for the projection files and make thuban write valid
521            projection files
522    
523            * Resources/XML/projfile.dtd: New. DTD for thuban's projection
524            files
525    
526            * Thuban/Model/resource.py (ProjFileSaver.write): Use
527            'projectionlist' as the name in the document type declaration so
528            that it matches the element type of the root element.
529    
530            * test/test_proj.py (sample_projfile, sample_projfile2): Use
531            'projectionlist' as the name in the document type declaration just
532            as it is done now in the files thuban would write
533            (sample_projfile, sample_projfile_data): Fix spelling of
534            "Mercator"
535            (TestProjFile.doTestWrite): Validate the written and the expected
536            XML data
537            (TestProjFile): Derive from ValidationTest so that we can run xml
538            validation tests
539    
540    2003-09-24  Bernhard Herzog  <[email protected]>
541    
542            * Thuban/UI/renderer.py (ExportRenderer.render_legend): Do not
543            modify the list returned by map.Layers() in place since it is the
544            actual list of layers used by the map.
545    
546    2003-09-23  Jan-Oliver Wagner <[email protected]>
547    
548            * Doc/manual/thuban-manual.xml: Added subsection to chapter
549            Extensions to describe the extensions coming with the Thuban
550            standard package (gns2shp and importAPR).
551    
552    2003-09-23  Bernhard Herzog  <[email protected]>
553    
554            * libraries/thuban/wxproj.cpp (project_point): if there's an
555            inverse but no forward projection, convert to degrees after
556            applying the inverse projection. Fixes RT#2096
557    
558            * test/test_wxproj.py: New. Test cases for wxproj.so. One test
559            implicitly tests for the fix to RT#2096
560    
561            * test/support.py (FloatComparisonMixin.assertFloatSeqEqual):
562            Check that the sequences have the same lengths
563    
564            * Resources/Projections/defaults.proj (Geographic projection): Use
565            a much more precise value for the to_meter attribute.
566    
567    2003-09-22  Bernhard Herzog  <[email protected]>
568    
569            * test/support.py (initthuban): Make sure to unset the LANG env.
570            var. so that tests that compare translated strings work. Solves RT
571            #2094
572    
573    2003-09-22  Jan-Oliver Wagner <[email protected]>
574    
575            Small improvement of APR import.
576    
577            * Extensions/importAPR/test/test_apr.py (aprTest.test_LClass):
578            Added tests for text-ranges.
579    
580            * Extensions/importAPR/apr.py (APR_LClass.GetThubanRange): Now
581            returns a string object if the range is based on text.
582    
583            * Extensions/importAPR/importAPR.py (import_apr_dialog): Unified
584            range retrieval.
585    
586    2003-09-22  Jan-Oliver Wagner <[email protected]>
587    
588            Initial version of the importAPR extension which is in
589            experimental state.
590    
591            * /Extensions/importAPR/, /Extensions/importAPR/samples/,
592            /Extensions/importAPR/test/: New directories.
593    
594            * /Extensions/importAPR/samples/README: New: Howto load the samples.
595    
596            * /Extensions/importAPR/samples/iceland.apr: New: A sample APR
597            file which refers to the Thuban Iceland demo data.
598    
599            * /Extensions/importAPR/test/README: New: Howto execute the tests.
600    
601            * /Extensions/importAPR/test/test_apr.py: New: Tests for APR classes.
602    
603            * /Extensions/importAPR/apr.py: New: Classes for ArcView Objects
604            as in '.apr'-files.
605    
606            * /Extensions/importAPR/odb.py: New: Classes for generic ArcView
607            ODB Objects as in '.apr', '.avl' and other files.
608    
609            * /Extensions/importAPR/__init__.py: New: Init to make this
610            directory a package.
611    
612            * /Extensions/importAPR/importAPR.py: New: Import a ArcView
613            project file (.apr) and convert it to Thuban.
614    
615    2003-09-22  Jan-Oliver Wagner <[email protected]>
616    
617            * Extensions/gns2shp.gns2shp.py: The main module of gns2shp.
618    
619    2003-09-19  Jan-Oliver Wagner <[email protected]>
620    
621            * Doc/manual/thuban-manual.xml: Extended section 'Installation'
622            with description on RPM installation and RPM binary package
623            creation.
624    
625    2003-09-18  Bernhard Herzog  <[email protected]>
626    
627            * setup.py (data_files): Only add the mo files if the Locales
628            directory actually exists, so that setup.py works with a fresh CVS
629            checkout
630    
631    2003-09-12  Jan-Oliver Wagner <[email protected]>
632    
633            * Examples/simple_extensions/simple_tool.py: bugfix: Tool is now
634            in viewport, not anymore in view
635    
636    2003-09-04  Jan-Oliver Wagner <[email protected]>
637    
638            Introducing first Extension (gns2shp).
639    
640            * Extensions, Extensions/gns2shp, Extensions/gns2shp/test: New.
641    
642            * Extensions/__init__.py: New. init to make this dir a package.
643    
644            * Extensions/gns2shp/__init__.py: New. init to make this dir a package.
645    
646            * Extensions/gns2shp/test/README: New. some info on this test directory.
647    
648            * Extensions/gns2shp/test/ls.txt: New. test data set (Liechtenstein).
649    
650            * Extensions/gns2shp/test/test_gns2shp.py: New. Test for correct creation
651            of Shapefile from GNS text file format
652    
653    2003-09-03  Jan-Oliver Wagner <[email protected]>
654    
655            Fix/workaround for bug #2019:
656            https://intevation.de/rt/webrt?serial_num=2019
657    
658            * Thuban/UI/identifyview.py (IdentifyView.ID_STOP): New.
659            (IdentifyView.__init__): Added another button that allows to
660            stop the identify mode.
661            (IdentifyView.OnStop): New. Stops the identify mode.
662    
663    2003-09-03  Jan-Oliver Wagner <[email protected]>
664    
665            Introducing a new exception dialog that allows to exit the
666            application immediately.
667            This fixes bug #2060: https://intevation.de/rt/webrt?serial_num=2060
668    
669            * Thuban/UI/exceptiondialog.py: New. A special exception dialog.
670    
671            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
672            Made strings available to translations. Exchanged the simple
673            ScrolledMessageDialog by the new ExceptionDialog.
674    
675    2003-09-01  Bernhard Herzog  <[email protected]>
676    
677            * NEWS: New. Summary of changes and release notes.
678    
679            * MANIFEST.in: Add NEWS
680    
681    2003-09-01  Bernhard Herzog  <[email protected]>
682    
683            * MANIFEST.in: Correct the include statement for the mo-files and
684            include the documentation too.
685    
686            * setup.py (data_files): Add the .mo files
687            (setup call): Up to version 0.9.0
688    
689    2003-09-01  Bernhard Herzog  <[email protected]>
690    
691            * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Change the
692            parameter list to just parent and session
693            (ChooseDBTableDialog.__set_properties): Removed. Setting the
694            selection of empty list boxes is not allowed (and produces C++
695            assertion errors) and the rest of the setup is better done in
696            __init__ anyway.
697            (ChooseDBTableDialog.OnCancel, ChooseDBTableDialog.OnOK)
698            (ChooseDBTableDialog.OnLBDClick, DBDialog.OnOK): Use the Python
699            builtins True/False for booleans to avoid warnings from wxPython
700    
701            * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Adapt to new
702            ChooseDBTableDialog constructor parameters.
703    
704    2003-09-01  Bernhard Herzog  <[email protected]>
705    
706            * Thuban/Model/postgisdb.py
707            (PostGISTable): Extend doc-string
708            (PostGISTable._fetch_table_information): Set the column index
709            correctly, pretending ignored columns don't exist.
710    
711            * test/test_postgis_db.py (TestPostGISIgnoredColumns): New tests
712            for postgis tables with data types not yet supported by thuban.
713    
714    2003-08-29  Bernhard Herzog  <[email protected]>
715    
716            * HOWTO-Release: Tweak item about running the tests.
717    
718    2003-08-29  Jan-Oliver Wagner <[email protected]>
719    
720            * /Doc/manual/thuban-manual.xml: updated to version 1.0pre2.
721    
722    2003-08-29  Bernhard Herzog  <[email protected]>
723    
724            Add some missing parameters to projections. Proj complains about
725            them on windows but for some reason not on Linux.
726    
727            * test/test_save.py (SaveSessionTest.testLayerProjection): Add
728            missing required projection parameters
729    
730            * test/test_proj.py (TestProjFile.test): Add missing required
731            projection parameters
732    
733            * test/test_load_0_8.py (TestLayerProjection.file_contents)
734            (TestLayerProjection.test): Add missing required projection
735            parameters and tests for them
736    
737            * test/test_load.py (TestLayerProjection.file_contents)
738            (TestLayerProjection.test): Add missing required projection
739            parameters and tests for them
740    
741            * test/test_layer.py (TestLayer.test_base_layer): Add missing
742            required projection parameters
743    
744    2003-08-29  Bernhard Herzog  <[email protected]>
745    
746            * libraries/pyprojection/Projection.i: Use pj_get_errno_ref to
747            access the pj_errno because directly accessing pj_errno doesn't
748            work on windows if the proj library is in a DLL
749    
750            * libraries/pyprojection/Projection_wrap.c: Update from Projection.i
751    
752    2003-08-28  Bernhard Herzog  <[email protected]>
753    
754            * test/test_proj.py: Import things from Thuban after calling
755            initthuban
756    
757            * test/test_load.py (LoadSessionTest.filenames): New class
758            variable with the filename attributes to normalize
759            (LoadSessionTest.check_format): Pass self.filenames to
760            sax_eventlist to normalize the filename attributes
761    
762            * test/xmlsupport.py: Add cvs keywords
763            (SaxEventLister.__init__): New parameter filenames which indicates
764            attributes that contain filenames
765            (SaxEventLister.startElementNS): Normalize the filename attributes
766            with os.path.normpath
767            (sax_eventlist): New parameter filenames to pass through to
768            SaxEventLister
769    
770            * test/test_derivedshapestore.py: Make this file callable as a
771            program to execute the tests
772            (TestDerivedShapeStoreExceptions.test_table_with_wrong_size): Bind
773            the session to self.session so that it gets destroyed properly
774    
775            * test/test_layer.py (TestLayer.tearDown): Call the session's
776            Destroy method
777    
778            * test/test_map.py (TestMapBase.tearDown): Destroy self.session
779            too if it exists
780            (TestMapAddLayer.test_add_layer): Bind the session to self.session
781            so that it gets destroyed properly
782    
783            * test/postgissupport.py (reason_for_not_running_tests): Add a
784            test for the existence of popen2.Popen4.
785    
786            * test/test_save.py (SaveSessionTest.tearDown): New. Provide a
787            reliable way to destroy the sessions created in the test cases
788            (SaveSessionTest.test_dbf_table): Bind the session to self.session
789            so that it gets destroyed properly
790            (SaveSessionTest.testLayerProjection): Bind the session to
791            self.session so that it gets destroyed properly
792    
793            * test/test_session.py (UnreferencedTablesTests.tearDown): Make
794            sure that the session is destroyed properly
795    
796            * test/test_shapefilestore.py: Make this callable as a program to
797            execute the tests
798    
799            * test/test_scalebar.py: Remove unnecessary import of _ from
800            Thuban
801    
802            * test/support.py (print_garbage_information): Call initthuban
803            here because it may be called indirectly from test cases that test
804            test support modules which do not use anything from thuban itself
805            (ThubanTestProgram.runTests): Remove unnecessary debug print
806    
807    2003-08-28  Bernhard Herzog  <[email protected]>
808    
809            * Thuban/version.py (longversion): Update to 0.9
810    
811            * Thuban/UI/mainwindow.py: Remove some unused imports
812    
813            * README: Add section about required additional software. Add date
814            and revision CVS keywords
815    
816            * HOWTO-Release: Add item about the translations. Add date and
817            revision CVs keywords and change formatting to match README a bit
818            better
819    
820            * po/de.po: Update for 0.9
821    
822            * test/README: Tweak the wording a little because many tests are
823            not really unittest.
824    
825    2003-08-27  Bernhard Herzog  <[email protected]>
826    
827            As preparation for the 0.9 release, switch thuban files to a
828            non-dev namespace
829    
830            * Thuban/Model/save.py (SessionSaver.write_session): Write files
831            with the http://thuban.intevation.org/dtds/thuban-0.9.dtd
832            namespace
833    
834            * Thuban/Model/load.py (SessionLoader.__init__): Accept the
835            http://thuban.intevation.org/dtds/thuban-0.9.dtd namespace too
836    
837            * test/test_save.py (SaveSessionTest.dtd)
838            (SaveSessionTest.testEmptySession)
839            (SaveSessionTest.testSingleLayer)
840            (SaveSessionTest.testLayerProjection)
841            (SaveSessionTest.testRasterLayer)
842            (SaveSessionTest.testClassifiedLayer)
843            (SaveSessionTest.test_dbf_table)
844            (SaveSessionTest.test_joined_table)
845            (SaveSessionTest.test_save_postgis): Update for new namespace
846    
847            * test/test_load.py (LoadSessionTest.dtd, TestSingleLayer)
848            (TestLayerVisibility.file_contents, TestLabels.file_contents)
849            (TestLayerProjection.file_contents)
850            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
851            (TestPostGISLayer.file_contents)
852            (TestPostGISLayerPassword.file_contents)
853            (TestLoadError.file_contents, TestLoadError.test): Update for new
854            namespace
855    
856    2003-08-27  Bernhard Herzog  <[email protected]>
857    
858            Make the table interface distinguish between row ids (an integer
859            that uniquely identifies a row) and row ordinals (a simple row
860            count from 0 to NumRows() - 1)
861    
862            * Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
863            (PostGISTable.RowOrdinalToId): New methods to conver between row
864            ids and row ordinals
865            (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
866            parameter row_is_ordinal to indicate whether the row parameter is
867            the row id or the ordinal
868    
869            * Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
870            (TransientTableBase.RowOrdinalToId)
871            (AutoTransientTable.RowIdToOrdinal)
872            (AutoTransientTable.RowOrdinalToId): Same new methods as in
873            PostGISTable.
874            (TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
875            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
876            Same new parameter as in PostGISTable.
877    
878            * Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
879            (DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
880            (MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
881            (DBFTable.ReadValue, DBFTable.ReadRowAsDict)
882            (MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
883            parameter as in PostGISTable.
884    
885            * Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
886            (DataTable.RowOrdinalToId): New methods to convert between row ids
887            and row ordinals.
888            (TableGrid.SelectRowById): New method to select a row based on its
889            ID as opposed to its ordinal
890            (DataTable.GetValue, TableGrid.OnRangeSelect)
891            (TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
892            (QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
893            (LayerTableFrame.__init__): Convert between row ids and row
894            ordinals as appropriate
895    
896            * test/postgissupport.py (PostGISDatabase.__init__): Add
897            doc-string.
898            (PostGISDatabase.initdb): The optional third item in a tuple in
899            tables is now a (key, value) list with additional arguments to
900            pass to upload_shapefile
901            (upload_shapefile): New parameter gid_offset to allow gids that
902            are not the same as the shapeids in the shapefile
903            (PostgreSQLServer.get_default_static_data_db): Use the new
904            gid_offset to make the gids in landmarks 1000 higher than the
905            shapeids in the shapefile
906    
907            * test/test_viewport.py
908            (TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
909            new shapeids in the landmarks table
910    
911            * test/test_transientdb.py
912            (TestTransientTable.run_iceland_political_tests)
913            (TestTransientTable.test_transient_joined_table): Add tests for
914            the new table methods and new keywords arguments.
915    
916            * test/test_postgis_db.py
917            (TestPostGISTable.test_read_row_as_dict_row_count_mode)
918            (TestPostGISTable.test_read_value_row_count_mode)
919            (TestPostGISTable.test_row_id_to_ordinal)
920            (TestPostGISTable.test_row_oridnal_to_id): New test for the new
921            table methods and the new arguments
922            (TestPostGISShapestorePoint.test_shapes_in_region)
923            (TestPostGISShapestorePoint.test_shape_raw_data)
924            (TestPostGISShapestorePoint.test_shape_points)
925            (TestPostGISShapestorePoint.test_shape_shapeid)
926            (TestPostGISShapestorePoint.test_all_shapes)
927            (TestPostGISTable.test_simple_query)
928            (TestPostGISTable.test_simple_query)
929            (TestPostGISTable.test_simple_query)
930            (TestPostGISTable.test_read_value)
931            (TestPostGISTable.test_read_row_as_dict): Adapt to the new
932            shapeids in the landmarks table
933    
934            * test/test_memory_table.py
935            (TestMemoryTable.test_read_row_as_dict_row_count_mode)
936            (TestMemoryTable.test_read_value_row_count_mode)
937            (TestMemoryTable.test_row_id_to_ordinal)
938            (TestMemoryTable.test_row_oridnal_to_id): New test for the new
939            table methods and the new arguments
940    
941            * test/test_dbf_table.py
942            (TestDBFTable.test_read_row_as_dict_row_count_mode)
943            (TestDBFTable.test_read_value_row_count_mode)
944            (TestDBFTable.test_row_id_to_ordinal)
945            (TestDBFTable.test_row_oridnal_to_id): New test for the new table
946            methods and the new arguments
947    
948    2003-08-26  Bernhard Herzog  <[email protected]>
949    
950            * Thuban/Model/postgisdb.py (PostGISShapeStore.BoundingBox): Use a
951            more postgis specific but much faster method to get the bounding
952            box
953    
954    2003-08-26  Bernhard Herzog  <[email protected]>
955    
956            * Thuban/Model/postgisdb.py (PostGISTable.Title)
957            (PostGISShapeStore.AllShapes): Add these missing methods.
958            (PostGISShapeStore.ShapesInRegion): No need to raise
959            StopIteration. We can simply return
960    
961            * test/test_postgis_db.py (TestPostGISTable.test_title)
962            (TestPostGISShapestorePoint.test_all_shapes): New tests for the
963            new methods
964    
965    2003-08-25  Bernhard Herzog  <[email protected]>
966    
967            * Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON.
968    
969            * test/test_postgis_db.py (PolygonTests): New class containing
970            those tests from TestPostGISShapestorePolygon that can also be
971            used to test MUTLIPOLYGON tables
972            (TestPostGISShapestorePolygon): Most tests are now in PolygonTests
973            so derive from that
974            (TestPostGISShapestoreMultiPolygon): New class with tests for
975            MUTLIPOLYGON tables
976    
977            * test/postgissupport.py (PostGISDatabase.initdb): Allow the
978            tables argument to have tuples with three items to override the
979            WKT type used.
980            (PostgreSQLServer.get_default_static_data_db): Use the above to
981            create a polygon table with MUTLIPOLYGONs
982            (point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon)
983            (arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to
984            coords_to*
985            (coords_to_multipolygon): New. Convert to MUTLIPOLYGON
986            (wkt_converter): New. Map WKT types to converters
987            (upload_shapefile): New parameter force_wkt_type to use a
988            different WKT type than the default
989    
990    2003-08-25  Bernhard Herzog  <[email protected]>
991    
992            * Thuban/UI/application.py
993            (ThubanApplication.run_db_param_dialog): New. Suitable as a
994            db_connection_callback. Main difference is that the dialog run
995            from this method doesn't have a parent so it can be used even when
996            there is no main window
997            (ThubanApplication.OpenSession): Use self.run_db_param_dialog if
998            no db_connection_callback was given. This way the dialog pops up
999            even when the .thuban file was given as a command line parameter.
1000    
1001    2003-08-25  Bernhard Herzog  <[email protected]>
1002    
1003            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse
1004            before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs
1005            which leads to an effectively frozen X session because the user
1006            can only interact with the dialog but the mouse is still grabbed
1007            by the canvas.
1008            Also, call the tool's Hide method before MouseLeftUp because
1009            MouseLeftUp may change the tool's coordinates.
1010    
1011    2003-08-25  Bernhard Herzog  <[email protected]>
1012    
1013            * Thuban/UI/application.py (ThubanApplication.OpenSession): Catch
1014            LoadCancelled exceptions and handle them by returning immediately.
1015    
1016    2003-08-25  Bernhard Herzog  <[email protected]>
1017    
1018            GUI part of loading sessions with postgis connections which may
1019            require user interaction to get passwords or updated parameters
1020    
1021            * Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a
1022            bit nucer and be more generic.
1023            (DBFrame.OnAdd): Adapt to new DBDialog interface
1024    
1025            * Thuban/UI/application.py (ThubanApplication.OpenSession): New
1026            optional parameter db_connection_callback which is passed to
1027            load_session.
1028    
1029            * Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New.
1030            Suitable as a db_connection_callback
1031            (MainWindow.OpenSession): Use self.run_db_param_dialog as the
1032            db_connection_callback of the application's OpenSession method
1033    
1034    
1035    2003-08-25  Bernhard Herzog  <[email protected]>
1036    
1037            Basic loading of sessions containing postgis connections:
1038    
1039            * Thuban/Model/load.py (LoadError): Add doc-string
1040            (LoadCancelled): New exception class to indicate a cancelled load
1041            (SessionLoader.__init__): Add the db_connection_callback parameter
1042            which will be used by the loader to get updated parameters and a
1043            password for a database connection
1044            (SessionLoader.__init__): Add the new XML elements to the
1045            dispatchers dictionary
1046            (SessionLoader.check_attrs): Two new conversions, ascii to convert
1047            to a byte-string object and idref as a generic id reference
1048            (SessionLoader.start_dbconnection)
1049            (SessionLoader.start_dbshapesource): New. Handlers for the new XML
1050            elements
1051            (load_session): Add the db_connection_callback to pass through the
1052            SessionLoader
1053    
1054            * test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword):
1055            New classes to test loading of sessions with postgis database
1056            connections.
1057    
1058    2003-08-25  Bernhard Herzog  <[email protected]>
1059    
1060            * Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and
1061            replace it and the comment with __BuildDate__ by the Source: and
1062            Id: cvs keywords as used in the other files.
1063    
1064    2003-08-25  Bernhard Herzog  <[email protected]>
1065    
1066            * Thuban/Model/load.py (SessionLoader.check_attrs): Raise a
1067            LoadError when a required attribute is missing. The code used to
1068            be commented out for some reason, but probably should have been
1069            active.
1070    
1071            * test/test_load.py (TestLoadError.test): Test the message in the
1072            LoadError too to make sure it really is about the missing
1073            attribute
1074    
1075    2003-08-22  Bernhard Herzog  <[email protected]>
1076    
1077            * test/test_save.py (SaveSessionTest.test_dbf_table)
1078            (SaveSessionTest.test_joined_table): Add XML validation tests.
1079    
1080    2003-08-22  Bernhard Herzog  <[email protected]>
1081    
1082            Implement saving a session with a postgis connection
1083    
1084            * Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New
1085            elements for database connections and shapestores using db
1086            connections
1087            (session): Add the dbconnections to the content model
1088    
1089            * Thuban/Model/save.py (SessionSaver.write_db_connections): New.
1090            Write the db connections
1091            (SessionSaver.write_session): Call write_db_connections to write
1092            the connection before the data sources
1093            (SessionSaver.write_data_containers): Handle postgis shapestores
1094    
1095            * test/test_save.py (SaveSessionTest.thubanids)
1096            (SaveSessionTest.thubanidrefs): Update for new DTD
1097            (SaveSessionTest.test_save_postgis): New. Test saving a session
1098            with postgis connections
1099    
1100            * Thuban/Model/postgisdb.py (PostGISTable.DBConnection)
1101            (PostGISTable.TableName): New accessor methods for the connection
1102            and table name
1103    
1104            * test/test_postgis_db.py (TestPostGISTable.test_dbconn)
1105            (TestPostGISTable.test_dbname): New methods to test the new
1106            PostGISConnection methods
1107    
1108    2003-08-22  Bernhard Herzog  <[email protected]>
1109    
1110            * Thuban/Model/postgisdb.py (ConnectionError): New exception class
1111            for exceptions occurring when establishing a Database connection
1112            (PostGISConnection.connect): Catch psycopg.OperationalError during
1113            connects and raise ConnectionError.
1114    
1115            * test/test_postgis_db.py (TestPostgisDBExceptions): New class for
1116            tests for database exceptions
1117    
1118    2003-08-22  Bernhard Herzog  <[email protected]>
1119    
1120            Prepare the test suite for tests with required authentication
1121    
1122            * test/postgissupport.py (PostgreSQLServer.__init__): Add instance
1123            variables with two predefined users/passwords, one for the admin
1124            and one for a non-privileged user.
1125            (PostgreSQLServer.createdb): Pass the admin name to initdb and add
1126            the non-privileged user to the database and set the admin password
1127            (PostgreSQLServer.wait_for_postmaster): Use the admin user name.
1128            Better error reporting
1129            (PostgreSQLServer.connection_params)
1130            (PostgreSQLServer.connection_string): New methods to return
1131            information about how to connect to the server
1132            (PostgreSQLServer.execute_sql): New. Convenience method to execute
1133            SQL statements
1134            (PostgreSQLServer.require_authentication): Toggle whether the
1135            server requires authentication
1136            (PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New.
1137            Add or alter users
1138            (PostGISDatabase.initdb): Pass the admin name one the
1139            subprocesses' command lines. Grant select rights on
1140            geometry_columns to everybody.
1141            (upload_shapefile): Use the admin name and password when
1142            connecting. Grant select rights on the new table to everybody.
1143    
1144            * test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the
1145            server's new methods to get the connection parameters.
1146    
1147            * test/test_postgis_session.py (TestSessionWithPostGIS.setUp)
1148            (TestSessionWithPostGIS.test_remove_dbconn_exception): Use the
1149            server's new methods to get the connection parameters.
1150    
1151            * test/test_postgis_db.py
1152            (TestPostGISConnection.test_gis_tables_empty)
1153            (TestPostGISConnection.test_gis_tables_non_empty)
1154            (PostGISStaticTests.setUp): Use the server's new methods to get
1155            the connection parameters.
1156    
1157    2003-08-22  Bernhard Herzog  <[email protected]>
1158    
1159            * Thuban/UI/about.py (About.__init__): Add the psycopg version.
1160    
1161            * Thuban/version.py: Add psycopg version
1162    
1163            * Thuban/Model/postgisdb.py (psycopg_version): New. Return the
1164            version of the psycopg module
1165    
1166    2003-08-22  Bernhard Herzog  <[email protected]>
1167    
1168            * Thuban/UI/dbdialog.py (DBPwdDlg): Removed because it's not used.
1169            (DBFrame.OnEdit): Removed because it's not used and wouldn't work
1170            at the moment. The functionality should probably be implemented
1171            some time, though.
1172            (DBFrame.OnRemove): Display a message if the connection can't be
1173            removed because it's still in use.
1174    
1175    2003-08-22  Jan-Oliver Wagner <[email protected]>
1176    
1177            * Thuban/UI/about.py (About.__init__): split up the huge about
1178            text into elements/lists for easier translation. This fixes bug
1179            https://intevation.de/rt/webrt?serial_num=2058
1180            Also, made some forgotten string available for the i18n.
1181    
1182    2003-08-21  Bernhard Herzog  <[email protected]>
1183    
1184            Make postgis support really optional including insensitive menu
1185            items.
1186    
1187            * Thuban/Model/postgisdb.py (has_postgis_support): New. Return
1188            whether the postgis is supported.
1189    
1190            * Thuban/UI/dbdialog.py: Put the psycopg import into try..except
1191            to make postgis support optional
1192    
1193            * Thuban/UI/mainwindow.py (_has_postgis_support): New. Context
1194            version of Thuban.Model.postgisdb.has_postgis_support
1195            (database_management command): Make it only sensitive if postgis
1196            is supported.
1197    
1198    2003-08-21  Jan-Oliver Wagner <[email protected]>
1199    
1200            * Doc/manual/thuban-manual.xml: Added CVS revision for rev-history.
1201            (section Adding and Removing Layers): Added text and described
1202            multi-selection.
1203            (chapter Extensions): New.
1204    
1205    2003-08-21  Jan-Oliver Wagner <[email protected]>
1206    
1207            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Changed dialog
1208            settings to allow multiple files to load into the map.
1209            Also reduced selection to *.shp as a default.
1210    
1211    2003-08-20  Bernhard Herzog  <[email protected]>
1212    
1213            Add dialogs and commands to open database connections and add
1214            database layers.
1215    
1216            * Thuban/UI/mainwindow.py (MainWindow.DatabaseManagement): New
1217            method to open the database connection management dialog
1218            (MainWindow.AddDBLayer): New method to add a layer from a database
1219            (_has_dbconnections): New helper function to use for sensitivity
1220            (database_management command, layer_add_db command): New commands
1221            that call the above new methods.
1222            (main_menu): Add the new commands to the menu.
1223    
1224            * Thuban/Model/postgisdb.py (PostGISConnection.__init__)
1225            (PostGISConnection.connect): Establish the actual connection in a
1226            separate method and call it in __init__. This makes it easier to
1227            override the behavior in test cases
1228            (PostGISConnection.BriefDescription): New method to return a brief
1229            description for use in dialogs.
1230    
1231            * test/test_postgis_db.py (NonConnection): DB connection that
1232            doesn't actually connect
1233            (TestBriefDescription): New class with tests for the new
1234            BriefDescription method
1235    
1236    2003-08-19  Jan-Oliver Wagner <[email protected]>
1237    
1238            Moved anything from extensions to libraries.
1239    
1240            * libraries: New.
1241    
1242            * libraries/ pyprojection, pyshapelib, shapelib, thuban: New.
1243    
1244            * libraries/pyprojection/ LICENSE, MANIFEST.in, Projection.i,
1245            Projection.py, Projection_wrap.c, setup.py, swighelp.txt: These files have
1246            been moved here from thuban/extensions/pyprojection/
1247            See there in the Attic for the older history.
1248    
1249            * libraries/pyshapelib/ COPYING, ChangeLog, NEWS, README, dbflib.i,
1250            dbflib.py, dbflib_wrap.c, pyshapelib_api.h, pytest.py, setup.py,
1251            shapelib.i, shapelib.py, shapelib_wrap.c, shptreemodule.c: These files
1252            have been moved here from thuban/extensions/pyshapelib/
1253            See there in the Attic for the older history.
1254    
1255            * libraries/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: These
1256            files have been moved here from thuban/extensions/shapelib/
1257            See there in the Attic for the older history.
1258    
1259            * libraries/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
1260            gdalwarp.cpp, wxproj.cpp: These files have been moved here from
1261            thuban/extensions/thuban/
1262            See there in the Attic for the older history.
1263    
1264            * MANIFEST.in, setup.cfg, setup.py: renamed extensions to libraries.
1265    
1266            * extensions/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
1267            gdalwarp.cpp, wxproj.cpp: Moved to libraries/thuban.
1268    
1269            * extensions/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c:
1270            Moved to libraries/shapelib.
1271    
1272            * extensions/pyshapelib/ COPYING, NEWS, dbflib.py, pytest.py,
1273            shapelib.py, README, dbflib_wrap.c, setup.py, shapelib_wrap.c,
1274            ChangeLog, dbflib.i, pyshapelib_api.h, shapelib.i, shptreemodule.c:
1275            Moved to libraries/pyshapelib.
1276    
1277            * extensions/pyprojection/ MANIFEST.in, Projection.py, setup.py,
1278            LICENSE, Projection.i, Projection_wrap.c, swighelp.txt:
1279            Moved to libraries/pyprojection.
1280    
1281            * extensions/ pyprojection, pyshapelib, shapelib, thuban: Removed.
1282    
1283            * extensions: Removed.
1284    
1285    2003-08-19  Bernhard Herzog  <[email protected]>
1286    
1287            * test/test_viewport.py (ViewPortTest): We don't use the
1288            facilities of FileTestMixin so don't derive from it.
1289            (TestViewportWithPostGIS): New class with tests for using a
1290            viewport on a map with postgis layers.
1291    
1292    2003-08-19  Bernhard Herzog  <[email protected]>
1293    
1294            Add the db connection management to the session.
1295    
1296            * Thuban/Model/session.py (Session.__init__): New instance
1297            variable db_connections
1298            (Session.AddDBConnection, Session.DBConnections)
1299            (Session.HasDBConnections, Session.CanRemoveDBConnection)
1300            (Session.RemoveDBConnection): New methods to manage and query the
1301            db connections managed by the session
1302            (Session.OpenDBShapeStore): New method to open a shapestore from a
1303            db connection
1304    
1305            * Thuban/Model/messages.py (DBCONN_REMOVED, DBCONN_ADDED): New
1306            messages for the db connection handling in the session
1307    
1308            * test/test_postgis_session.py: New. test cases for the session's
1309            db connection handling with postgis connections
1310    
1311    2003-08-19  Bernhard Herzog  <[email protected]>
1312    
1313            Add very basic postgis database support and the corresponding test
1314            cases. The test cases require a PostgreSQL + postgis installation
1315            but no existing database. The database will be created
1316            automatically by the test cases
1317    
1318            * test/README: Add note about skipped tests and the requirements
1319            of the postgis tests.
1320    
1321            * Thuban/Model/postgisdb.py: New. Basic postgis database support.
1322    
1323            * test/test_postgis_db.py: New. Test cases for the postgis
1324            support.
1325    
1326            * Thuban/Model/wellknowntext.py: New. Parser for well-known-text
1327            format
1328    
1329            * test/test_wellknowntext.py: New. Test cases for the
1330            wellknowntext parser
1331    
1332            * test/postgissupport.py: New. Support module for tests involving
1333            a postgis database.
1334    
1335            * test/support.py (execute_as_testsuite): Shut down the postmaster
1336            if it's still running after the tests
1337    
1338            * Thuban/Model/data.py (RAW_WKT): New constant for raw data in
1339            well known text format
1340    
1341    2003-08-19  Jan-Oliver Wagner <[email protected]>
1342    
1343            * Examples/simple_extensions/hello_world.py: New. Raises a Hello World
1344            message dialog.
1345    
1346    2003-08-18  Bernhard Herzog  <[email protected]>
1347    
1348            * test/support.py (ThubanTestResult.printErrors): Indent the
1349            reason for the skips in the output to make it a bit more readable.
1350            (execute_as_testsuite): New helper function to run a test suite
1351            and print some more information.
1352            (run_tests): Use execute_as_testsuite to run the tests
1353    
1354            * test/runtests.py (main): Use execute_as_testsuite to run the
1355            tests
1356    
1357    2003-08-18  Bernhard Herzog  <[email protected]>
1358    
1359            Fix some bugs in Thuban and the test suite that were uncovered by
1360            changes introduced in Python 2.3:
1361    
1362            * Thuban/Model/table.py (DBFTable.__init__): Make sure the
1363            filename is an absolute name
1364    
1365            * Thuban/Model/layer.py (RasterLayer.__init__): Make sure the
1366            filename is an absolute name
1367    
1368            * test/test_save.py (SaveSessionTest.testRasterLayer): Use a
1369            unique filename to save to and use the correct relative filename
1370            in the expected output.
1371            (SaveSessionTest.test_dbf_table): Use the correct relative
1372            filename in the expected output.
1373    
1374            * test/test_layer.py (TestLayer.test_raster_layer): Update the
1375            test to check whether the filename is absolute.
1376    
1377    2003-08-18  Jan-Oliver Wagner <[email protected]>
1378    
1379            * Thuban/UI/about.py (About.__init__): Added Silke Reimer.
1380    
1381    2003-08-15  Bernhard Herzog  <[email protected]>
1382    
1383            Change the way shapes are returned by a shape store. The
1384            ShapesInRegion method returns an iterator over actual shape
1385            objects instead of a list of shape ids.
1386    
1387            * Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
1388            id.
1389            (ShapefileStore.ShapesInRegion): Return an iterator over the
1390            shapes which yields shape objects instead of returning a list of
1391            shape ids
1392            (ShapefileStore.AllShapes): New. Return an iterator over all
1393            shapes in the shape store
1394            (DerivedShapeStore.AllShapes): New. Like in ShapefileStore
1395    
1396            * Thuban/Model/layer.py (Layer.ShapesInRegion): Update
1397            doc-string.
1398    
1399            * Thuban/UI/baserenderer.py
1400            (BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
1401            layer_shapes and make it return an iterator containg shapes
1402            instead of a list of ids.
1403            (BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
1404            layer_shapes() change
1405    
1406            * Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
1407            (ScreenRenderer.layer_shapes): Rename as in BaseRenderer
1408    
1409            * Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
1410            changes in the ShapesInRegion return value.
1411            (ViewPort._get_hit_tester): Remove commented out code
1412    
1413            * test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
1414            new return value.
1415            (SimpleShapeStore.AllShapes): New. Implement this method too.
1416    
1417            * test/test_layer.py (TestLayer.test_arc_layer)
1418            (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
1419            (TestLayer.test_point_layer_with_projection)
1420            (TestLayer.test_derived_store): Adapt to changes in the
1421            ShapesInRegion return value.
1422    
1423            * test/test_shapefilestore.py
1424            (TestShapefileStoreArc.test_shapes_in_region)
1425            (TestShapefileStorePolygon.test_shapes_in_region)
1426            (TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
1427            in the ShapesInRegion return value.
1428            (TestShapefileStorePoint.test_all_shapes)
1429            (TestShapefileStoreArc.test_shape_shapeid): New tests for the new
1430            methods
1431    
1432            * test/test_derivedshapestore.py
1433            (TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
1434            the ShapesInRegion return value.
1435            (TestDerivedShapeStore.test_all_shapes)
1436            (TestDerivedShapeStore.test_shape_shapeid): New tests for the new
1437            methods
1438    
1439    2003-08-15  Bernhard Herzog  <[email protected]>
1440    
1441            Make the renderers deal correctly with raw vs. python level
1442            representation of shape geometries
1443    
1444            * Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer):
1445            Return a flag useraw in addition to the callable and the parameter
1446            to indicate whether the callable can deal with the raw shape data
1447            or uses the higher level python lists of coordinates. The callable
1448            now should accept either the raw data or the return value of the
1449            shape's Points() method.
1450            (BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer
1451            change
1452            (BaseRenderer.projected_points): Instead of the shape id use the
1453            points list as parameter.
1454            (BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape)
1455            (BaseRenderer.draw_point_shape): Adapt to projected_points()
1456            change and accept the points list as parameter instead of the
1457            shape id.
1458    
1459            * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return
1460            the useraw flag as required by the BaseRenderer
1461            (ScreenRenderer.draw_shape_layer): Adapt to low-level renderer
1462            changes.
1463    
1464            * test/test_baserenderer.py
1465            (TestBaseRenderer.test_point_with_classification): New test for
1466            rendering a map with classifications.
1467    
1468    2003-08-15  Bernhard Herzog  <[email protected]>
1469    
1470            * Thuban/UI/viewport.py (ViewPort.find_shape_at)
1471            (ViewPort._find_shape_in_layer, ViewPort._find_shape_in_layer)
1472            (ViewPort._get_hit_tester, ViewPort.projected_points)
1473            (ViewPort._hit_point, ViewPort._hit_arc, ViewPort._hit_polygon)
1474            (ViewPort._find_label_at): Split the find_shape_at method into
1475            several new methods and use the functions in the hit-test module.
1476    
1477            * Thuban/UI/hittest.py: New module with Python-level hit-testing
1478            functions
1479    
1480            * test/test_hittest.py: New. Test for the new hittest module
1481    
1482    2003-08-15  Bernhard Herzog  <[email protected]>
1483    
1484            * Thuban/Model/layer.py (Layer.ShapesInRegion): Apply the layer
1485            projection to all corners of the bounding box to get a better
1486            approximation of the projected bounding box
1487    
1488            * test/test_layer.py (TestLayer.test_point_layer_with_projection):
1489            New. Test coordinate handling of a layer with a projection.
1490            Catches the bug fixed in Layer.ShapesInRegion
1491    
1492    2003-08-15  Bernhard Herzog  <[email protected]>
1493    
1494            Move some of the mock objects in test_baserenderer into their own
1495            module so they can easily be used from other tests
1496    
1497            * test/mockgeo.py: New test helper module with some mock objects
1498            for geometry related things like shapes, shapestores and
1499            projections.
1500    
1501            * test/test_mockgeo.py: New. Tests for the new helper module
1502    
1503            * test/test_baserenderer.py: Some of the mock-objects are in
1504            mockgeo now.
1505    
1506    2003-08-12  Jan-Oliver Wagner <[email protected]>
1507    
1508            * Thuban/UI/about.py (About.__init__): Added Bj�rn Broscheit.
1509    
1510    2003-08-12  Bernhard Herzog  <[email protected]>
1511    
1512            * po/de.po: New. German translations by Bjoern Broscheit
1513    
1514    2003-08-12  Bernhard Herzog  <[email protected]>
1515    
1516            * Thuban/UI/projdialog.py (UnknownProjPanel._DoLayout): Translated
1517            strings have to be one string literal.
1518    
1519    2003-08-11  Bernhard Herzog  <[email protected]>
1520    
1521            * test/support.py (FloatComparisonMixin.assertPointListEquals):
1522            New. This method was used in various derived classes, but it's
1523            better to have it here.
1524    
1525            * test/test_shapefilestore.py
1526            (ShapefileStoreTests.assertPointListEquals): Removed. It's now in
1527            FloatComparisonMixin
1528    
1529            * test/test_layer.py (TestLayer.assertPointListEquals): Removed.
1530            It's now in FloatComparisonMixin
1531    
1532            * test/test_derivedshapestore.py
1533            (TestDerivedShapeStore.assertPointListEquals): Removed. It's now
1534            in FloatComparisonMixin
1535    
1536    2003-08-11  Bernhard Herzog  <[email protected]>
1537    
1538            * Thuban/UI/join.py (JoinDialog.OnJoin): Add missing space to
1539            error message
1540    
1541    2003-08-08  Jan-Oliver Wagner <[email protected]>
1542    
1543            * Doc/manual/thuban-manual.xml: Now use authorgroup. Added revhistory
1544            with version number.
1545            Changed title to reflect version number of Thuban.
1546    
1547    2003-08-08  Jan-Oliver Wagner <[email protected]>
1548    
1549            * Thuban/UI/about.py (About.__init__): Reworked the hall of fame. Now
1550            the list corresponds to the "About" web page.
1551    
1552    2003-08-08  Bernhard Herzog  <[email protected]>
1553    
1554            * Thuban/UI/projdialog.py (UTMProposeZoneDialog.dialogLayout):
1555            Make sure translated strings are recognized as one string literal.
1556    
1557            * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog.dialogLayout):
1558            Make sure translated strings are recognized as one string literal.
1559    
1560            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Make sure
1561            translated strings are recognized as one string literal.
1562    
1563            * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
1564            sure translated strings are recognized as one string literal.
1565    
1566    2003-08-07  Bernhard Herzog  <[email protected]>
1567    
1568            * Thuban/Model/data.py (DerivedShapeStore.RawShapeFormat): New.
1569            Simply delegates to the original shapestore.
1570    
1571            * test/test_derivedshapestore.py
1572            (TestDerivedShapeStore.test_raw_format): New. Test case for
1573            DerivedShapeStore.RawShapeFormat
1574    
1575    2003-08-07  Bernhard Herzog  <[email protected]>
1576    
1577            Add raw data interface to shape objects.
1578    
1579            * Thuban/Model/data.py (ShapefileShape, Shape): Rname the shape
1580            class to ShapefileShape which now holds shapefile specific
1581            information.
1582            (ShapefileShape.compute_bbox): Simplified to not cache any
1583            information. The way this method is used that shouldn't matter
1584            performance wise.
1585            (ShapefileShape.RawData): New. Return the shapeid which is the raw
1586            data format for shapes from shapefiles.
1587            (ShapefileStore.RawShapeFormat): New. Return the raw datatype used
1588            in the shape objects returned by a shapestore. For a
1589            ShapefileStore this is always RAW_SHAPEFILE.
1590            (RAW_PYTHON, RAW_SHAPEFILE): Constants for the RawShapeFormat
1591            method.
1592    
1593            * test/test_shapefilestore.py
1594            (TestShapefileStore.test_raw_format): New test to test the raw
1595            format feature of shapes.
1596    
1597            * Thuban/Model/layer.py: Remove the unused import of Shape from
1598            data. It was only there for interface compatibility but it's not
1599            used inside of Thuban and the generic Shape class has gone away.
1600    
1601            * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Check
1602            the raw data format and only use an optimized version of its a
1603            shapefile.
1604    
1605    2003-08-07  Bernhard Herzog  <[email protected]>
1606    
1607            * test/test_baserenderer.py (SimpleShape): Shape class for the
1608            tests.
1609            (SimpleShapeStore.Shape): Use SimpleShape instead of
1610            Thuban.Model.data.Shape to make the tests independed of the coming
1611            changes.
1612    
1613    2003-08-07  Bernhard Herzog  <[email protected]>
1614    
1615            * test/support.py (SkipTest, ThubanTestResult, ThubanTestRunner)
1616            (ThubanTestProgram): New classes that extend the respective
1617            classes from unittest. These new version support skipping tests
1618            under certain expected conditions. In the Thuban test suite we
1619            uses this for tests that require the optional gdal support.
1620            (run_tests): Use ThubanTestProgram instead of the unittest.main()
1621    
1622            * test/runtests.py (main): Use the new ThubanTestRunner instead of
1623            the normal one from unittest
1624    
1625            * test/test_layer.py (TestLayer.test_raster_layer): If this test
1626            is not run because gdal support isn't available report this to the
1627            runner.
1628    
1629            * test/test_baserenderer.py
1630            (TestBaseRenderer.test_raster_no_projection): Do not run this test
1631            if gdal support isn't available and report this to the runner.
1632    
1633    2003-08-06  Bernhard Herzog  <[email protected]>
1634    
1635            Rearrange the renderers a bit, partly in preparation for changes
1636            required for the postgis merge, partly to make it more testable.
1637            Also make the representation of coordinates in Shapes more
1638            consistent.
1639    
1640            * Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
1641            this class is now in BaseRenderer. This class is now practically
1642            only a specialization of BaseRenderer for rendering to an actual
1643            wx DC.
1644            (ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
1645            to get the shapetype specific rendering functions.
1646    
1647            * Thuban/UI/baserenderer.py: New file with the basic rendering
1648            logic. The code in this file is completely independend of wx.
1649            (BaseRenderer): Class with the basic rendering logic
1650    
1651            * test/test_baserenderer.py: New. Test cases for BaseRenderer
1652    
1653            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
1654            error_on_redraw to guard agains endless loops and stack overflows
1655            when there's a bug in the rendering code that raises exceptions.
1656            (MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
1657            rendering into a separate method _do_redraw so that error handling
1658            is a bit easier. When an exception occurs, set error_on_redraw to
1659            true. When it's true on entry to OnIdle do nothing and return
1660            immediately.
1661    
1662            * Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a
1663            Shape object will always have the coordinates as a list of list of
1664            coordinate pairs (tuples).
1665            (Shape.compute_bbox): Adapt to new representation.
1666    
1667            * Thuban/UI/viewport.py (ViewPort.find_shape_at)
1668            (ViewPort.LabelShapeAt): Adapt to new coordinate representation in
1669            Shape objects.
1670    
1671            * test/test_shapefilestore.py
1672            (ShapefileStoreTests.assertFloatTuplesEqual)
1673            (ShapefileStoreTests.assertPointListEquals): Rename to
1674            assertPointListEquals and change purpose to checking equality of
1675            the lists returned by Shape.Points().
1676            (TestShapefileStoreArc.test_shape)
1677            (TestShapefileStorePolygon.test_shape)
1678            (TestShapefileStorePoint.test_shape): Use the new
1679            assertPointListEquals instead of assertFloatTuplesEqual
1680    
1681            * test/test_layer.py (TestLayer.assertFloatTuplesEqual)
1682            (TestLayer.assertPointListEquals): Rename to assertPointListEquals
1683            and change purpose to checking equality of the lists returned by
1684            Shape.Points().
1685            (TestLayer.test_arc_layer, TestLayer.test_arc_layer)
1686            (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
1687            (TestLayer.test_derived_store): Use the new assertPointListEquals
1688            instead of assertFloatTuplesEqual
1689    
1690            * test/test_derivedshapestore.py
1691            (TestDerivedShapeStore.assertFloatTuplesEqual)
1692            (TestDerivedShapeStore.assertPointListEquals): Rename to
1693            assertPointListEquals and change purpose to checking equality of
1694            the lists returned by Shape.Points().
1695            (TestDerivedShapeStore.test_shape): Use the new
1696            assertPointListEquals instead of assertFloatTuplesEqual
1697    
1698    2003-08-06  Jan-Oliver Wagner <[email protected]>
1699    
1700            * Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for
1701            a bounding box. A dialog is raised in case, no bounding box
1702            is found. This fixes bug #2043:
1703            https://intevation.de/rt/webrt?serial_num=2043
1704    
1705    2003-08-05  Bernhard Herzog  <[email protected]>
1706    
1707            * Thuban/Model/color.py (Color.__repr__): Make the repr of a color
1708            object look like a Color instantiation. Formerly it looked like a
1709            tuple.
1710    
1711            * test/test_color.py (TestColor.test_repr)
1712            (TestColor.test_equality, TestColor.test_inequality): New. test
1713            some more apects of the Color class
1714            (TestTransparent.test_repr, TestTransparent.test_hex)
1715            (TestTransparent.test_equality): New. Test cases for the
1716            Transparent object.
1717    
1718    2003-08-04  Jan-Oliver Wagner <[email protected]>
1719    
1720            * Doc/manual/thuban-manual.xml: a number of small improvements.
1721            The resulting file is the version submitted for GREAT-ER II.
1722    
1723    2003-08-01  Bernhard Herzog  <[email protected]>
1724    
1725            * Thuban/UI/resource.py, Thuban/UI/projdialog.py,
1726            Thuban/UI/join.py, Thuban/UI/classgen.py, Thuban/UI/about.py,
1727            Thuban/Model/resource.py: Insert cvs keywords and doc-strings.
1728    
1729            * Thuban/UI/common.py: Insert cvs keywords and doc-strings.
1730            (Color2wxColour, wxColour2Color, ThubanBeginBusyCursor)
1731            (ThubanEndBusyCursor): Add doc-strings
1732    
1733    2003-08-01  Bernhard Herzog  <[email protected]>
1734    
1735            First step towards PostGIS integration. More abstraction by movin
1736            more code from the layer to the shapestore. More methods of the
1737            layer are now simply delegated to the equivalent method of the
1738            shapestore. The SHAPETYPE_* constants are now in data not in
1739            layer.
1740    
1741            * Thuban/Model/data.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
1742            (SHAPETYPE_POINT, Shape): Move these constants and classes from
1743            layer.py to data.py
1744            (ShapefileStore.__init__): More Initialization for the new methods
1745            and functionality.
1746            (ShapefileStore.ShapeType, ShapefileStore.NumShapes)
1747            (ShapefileStore.BoundingBox, ShapefileStore.ShapesInRegion)
1748            (ShapefileStore.Shape): New methods that were formerly implemented
1749            in the layer.
1750            (DerivedShapeStore.Shape, DerivedShapeStore.ShapesInRegion)
1751            (DerivedShapeStore.ShapeType, DerivedShapeStore.NumShapes)
1752            (DerivedShapeStore.BoundingBox): New. DerivedShapeStore
1753            equivalents of the new shape methods. These versions are simply
1754            delegated to the original shapstore.
1755    
1756            * Thuban/Model/layer.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
1757            (SHAPETYPE_POINT, Shape): Removed. They're now in data.py
1758            (Layer.SetShapeStore): Removed the initializatin of instance
1759            variables that were needed for the stuff that's now in
1760            ShapefileStore
1761            (Layer.BoundingBox, Layer.NumShapes, Layer.ShapeType)
1762            (Layer.Shape, Layer.ShapesInRegion): Simply delegate to the
1763            shapestore.
1764    
1765            * Thuban/UI/classifier.py, Thuban/UI/renderer.py,
1766            Thuban/UI/viewport.py: Import the SHAPETYPE_* constants from data
1767            instead of layer.
1768    
1769            * test/test_shapefilestore.py: New. Tests for ShapefileStore.
1770    
1771            * test/test_derivedshapestore.py: New. Tests for DerivedShapeStore.
1772    
1773            * test/test_layer.py: Import the SHAPETYPE_* constants from data
1774            instead of layer.
1775            (TestLayer.test_derived_store): Remove the test for the exception
1776            when instantiating the DerivedShapeStore with an incompatible
1777            table which is now in test_derivedshapestore.py. Add some more
1778            tests of the layer methods to determine whether they work for a
1779            DerivedShapeStore as well.
1780    
1781    2003-07-31  Jonathan Coles   <[email protected]>
1782    
1783            * Doc/manual/thuban-manual.xml: Fix the list of required packages
1784            by just listing the name and where they can be found.
1785    
1786    2003-07-31  Frank Koormann   <[email protected]>
1787    
1788            * Doc/manual/thuban-manual.xml:
1789            Changed the screenshot elements to figure.
1790            Changed some variablelist elements to itemizedlist.
1791            Added section on GDAL formats.
1792    
1793    2003-07-31  Jonathan Coles   <[email protected]>
1794    
1795            * Doc/manual/thuban-manual.xml: Added a few sentences about
1796            the Fix Border Color option when generating classes.
1797    
1798    2003-07-30  Jonathan Coles   <[email protected]>
1799    
1800            * Thuban/Model/classgen.py: Add docstrings. Rename specific
1801            Ramp instances to use lower_case_style.
1802    
1803            * Thuban/UI/classgen.py: Use renamed Ramp instances.
1804            
1805            * Thuban/UI/classifier.py: Add docstrings.
1806    
1807            * Thuban/UI/dock.py: Add docstrings.
1808    
1809            * test/test_classgen.py: Use renamed Ramp instances.
1810    
1811    2003-07-30  Bernhard Herzog  <[email protected]>
1812    
1813            * Thuban/Lib/connector.py (QueueingPublisher): Removed. This class
1814            was never used in Thuban.
1815    
1816    2003-07-30  Bernhard Herzog  <[email protected]>
1817    
1818            * Thuban/UI/join.py (JoinDialog.__init__): Use the table's Title()
1819            method directly instead of going through the transient_table
1820            method. This faster because transient_table may force the copy of
1821            a DBF file into the transient database and setting a table's title
1822            doesnm't affect the title of the associated transient table, so
1823            this fixes RT #2042
1824    
1825            * Thuban/UI/main.py (__version__): Don't import the already
1826            removed show_exception_dialog.
1827    
1828    2003-07-29  Jonathan Coles   <[email protected]>
1829    
1830            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
1831            Put back this method and remove the equivalent function since we
1832            are setting the exception hook from within this class (OnInit).
1833    
1834    2003-07-29  Jonathan Coles   <[email protected]>
1835    
1836            * Doc/manual/images/5_2_custom_ramp.png,
1837            Doc/manual/images/5_2_quantiles.png,
1838            Doc/manual/images/5_2_uniform_dist.png,
1839            Doc/manual/images/5_2_unique_values.png,
1840            Doc/manual/images/8_int_error.png: New screen shots.
1841    
1842            * Doc/manual/thuban-manual.xml: Fixed typos and wording, clarified
1843            some points, and added more screen shots.
1844    
1845    2003-07-29  Bernhard Herzog  <[email protected]>
1846    
1847            * Thuban/Model/data.py: Remove the now unused import of warnings
1848    
1849    2003-07-29  Bernhard Herzog  <[email protected]>
1850    
1851            * Thuban/Model/data.py (SimpleStore): Removed. This class has been
1852            deprecated since before the 0.8 release and isn't used in Thuban
1853            itself anymore.
1854    
1855            * Thuban/Model/transientdb.py: Remove some unnecessary imports
1856    
1857    2003-07-29  Jonathan Coles   <[email protected]>
1858    
1859            * Thuban/UI/application.py (ThubanApplication.OnInit): set the
1860            python exception hook here so that we are sure to catch any
1861            Thuban exception that happen during initialization.
1862    
1863            * Thuban/UI/main.py (main): Don't set the exception hook here,
1864            it will get set in ThubanApplication.OnInit.
1865    
1866    2003-07-29  Jonathan Coles   <[email protected]>
1867                                                                                
1868            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
1869            Removed and called it show_exception_dialog() so that the exception
1870            handler can be set before the class is created.
1871                                                                                
1872            * Thuban/UI/main.py (main): Install the exception handler before
1873            a ThubanApplication is created.
1874                                                                                    
1875    2003-07-29  Bernhard Herzog  <[email protected]>
1876    
1877            * po/it.po: New. Italian translation by Maurizio Napolitano
1878    
1879            * po/ru.po: New. Russian translation by Alex Shevlakov
1880    
1881    2003-07-29  Frank Koormann   <[email protected]>
1882    
1883            * Doc/manual/thuban-manual.xml: Extended section on supported
1884            projections.
1885            
1886    2003-07-29  Frank Koormann   <[email protected]>
1887    
1888            * Doc/manual/thuban-manual.xml: gaspell-checked.
1889    
1890    2003-07-29  Jonathan Coles   <[email protected]>
1891    
1892            * Doc/manual/images/3_5_legend.png: Added border to improve look
1893            on white background.
1894    
1895    2003-07-29  Jonathan Coles   <[email protected]>
1896    
1897            * Doc/manual/thuban-manual.xml: Fixed grammar and typos. Added
1898            descriptions for the legend toolbar.
1899    
1900            * Doc/manual/images/4_2_raster_layer_properties.png: Removed
1901            cursor from dialog box.
1902    
1903    2003-07-28  Jonathan Coles   <[email protected]>
1904    
1905            * Doc/manual/thuban-manual.xml: More screenshots and more chapters.
1906    
1907            * Doc/manual/images/2_4_session_tree.png,
1908            Doc/manual/images/3_5_legend.png, Doc/manual/images/3_rename_map.png,
1909            Doc/manual/images/4_2_layer_properties.png,
1910            Doc/manual/images/4_2_raster_layer_properties.png,
1911            Doc/manual/images/5_3_genclass.png,
1912            Doc/manual/images/5_classification.png,
1913            Doc/manual/images/6_projection.png,
1914            Doc/manual/images/7_1_table_view.png,
1915            Doc/manual/images/7_2_5_join.png: New screenshots.
1916    
1917    2003-07-24  Jonathan Coles   <[email protected]>
1918    
1919            * Doc/manual/thuban-manual.xml: Chapter on Projection Management.
1920    
1921    2003-07-24  Jonathan Coles   <[email protected]>
1922    
1923            * Doc/manual/thuban-manual.xml: Added EPS images and wrote
1924            chapter on Layer Management.
1925    
1926            * Doc/manual/Makefile: New. Makefile to generate all formats for the
1927            manual and images.
1928    
1929    2003-07-24  Bernhard Herzog  <[email protected]>
1930    
1931            * Thuban/Model/range.py, Thuban/version.py: Remove the #! line as
1932            it annoys lintian which warns about these files not being
1933            executable. The #! isn't necessary here since if you absolutely
1934            must execute them you can always say "python <filename>".
1935    
1936            * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Remove
1937            superfluous code to set brush and pen for point shapes
1938    
1939            * Thuban/UI/viewport.py: Remove commented out code that wouldn't
1940            belong in viewport anyway
1941    
1942    2003-07-24  Frank Koormann   <[email protected]>
1943    
1944            * Doc/manual/thuban-manual.xml: Added section on table management.
1945    
1946    2003-07-24  Bernhard Herzog  <[email protected]>
1947    
1948            * test/runtests.py (main): Recognize the long "verbose" option
1949            correctly.
1950    
1951    2003-07-22  Jonathan Coles   <[email protected]>
1952    
1953            * Doc/manual/thuban-manual.xml: Continue to write first revision
1954            of the manual.
1955    
1956            * Thuban/UI/renderer.py (MapRenderer.render_map): Wrap method
1957            with Begin/EndDrawing() calls to ensure we aren't doing to
1958            many updates to the dc during rendering.
1959            (ScreenRenderer.draw_shape_layer): self.draw_point_shape takes
1960            a pen and brush argument so they need to be passed to the function.
1961    
1962            * Thuban/UI/viewport.py (ViewPort.calc_min_max_scales): New.
1963            Calculates the minimum and maximum scale values. Factored out
1964            of set_view_transform so that it could be used to zoom all the
1965            way into a single point.
1966            (ViewPort.set_view_transform): Call calc_min_max_scales().
1967            (ViewPort.FitSelectedToWindow): Zoom to the maximum scale
1968            if only a single point is selected.
1969    
1970            * Doc/manual/images/1_2_legend_close.png,
1971            Doc/manual/images/1_2_legend_dock.png,
1972            Doc/manual/images/1_2_mainwindow.png,
1973            Doc/manual/images/1_2_mainwindow.ps,
1974            Doc/manual/images/1_2_mainwindow.sk,
1975            Doc/manual/images/3_2_fullextent.png,
1976            Doc/manual/images/3_2_fulllayerextent.png,
1977            Doc/manual/images/3_2_fullshapeextent.png,
1978            Doc/manual/images/3_2_pan.png,
1979            Doc/manual/images/3_2_zoomin.png,
1980            Doc/manual/images/3_2_zoomout.png,
1981            Doc/manual/images/3_3_identify.png,
1982            Doc/manual/images/3_3_label.png,
1983            Doc/manual/images/3_5_invisible.png,
1984            Doc/manual/images/3_5_movedown.png,
1985            Doc/manual/images/3_5_moveup.png,
1986            Doc/manual/images/3_5_props.png,
1987            Doc/manual/images/3_5_tobottom.png,
1988            Doc/manual/images/3_5_totop.png,
1989            Doc/manual/images/3_5_visible.png: New. Images for the documentation.
1990    
1991    2003-07-18  Bernhard Herzog  <[email protected]>
1992    
1993            * Thuban/UI/messages.py (MAP_REPLACED): New message.
1994    
1995            * Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED
1996            after the new map has been assigned
1997    
1998            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages):
1999            Delegate MAP_REPLACED to the canvas too
2000            (MainWindow.prepare_new_session): Removed. Thanks to the new
2001            MAP_REPLACED message it's no longer needed
2002            (MainWindow.OpenSession, MainWindow.NewSession):
2003            prepare_new_session has been removed.
2004    
2005            * Thuban/UI/classifier.py (Classifier.__init__): Subscribe to
2006            MAP_REPLACED so that we can close the dialog if a new map is set.
2007            (Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED
2008            (Classifier.map_replaced): Handle MAP_REPLACED by closing the
2009            dialog
2010    
2011            * test/test_viewport.py (SimpleViewPortTest)
2012            (SimpleViewPortTest.test_default_size): Add doc-strings
2013            (ViewPortTest.setUp): Bind map to self.map so we can use it in
2014            tests. Subscribe to MAP_REPLACED messages too.
2015            (ViewPortTest.tearDown): No need to explicitly unsubscribe
2016            (ViewPortTest.test_set_map): New test for the SetMap method.
2017    
2018    2003-07-18  Bernhard Herzog  <[email protected]>
2019    
2020            * test/test_viewport.py (SimpleViewPortTest.test_default_size):
2021            Move this test from ViewPortTest.setUp to this new separate test
2022            case. setUp is not the place for the actual tests.
2023            (ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
2024            more of the test from setUp to the new test test_inital_settings.
2025            (ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
2026            (ViewPortTest.test_proj_conv): Split test_proj_conv into
2027            test_win_to_proj and test_proj_to_win and make the tests easier to
2028            understand
2029            (ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
2030            (ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
2031            (ViewPortTest.test_unprojected_rect_around_point)
2032            (ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
2033            Reformat to increase readability.
2034    
2035    2003-07-18  Bernhard Herzog  <[email protected]>
2036    
2037            * Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.
2038    
2039    2003-07-18  Bernhard Herzog  <[email protected]>
2040    
2041            * test/runtests.py: The test suite can now be run without an X
2042            connection. To make sure this remains true, remove the DISPLAY
2043            environment variable so that an error occurs if the wxGTK is
2044            imported accidentally
2045    
2046    2003-07-18  Bernhard Herzog  <[email protected]>
2047    
2048            * Thuban/UI/viewport.py: Remove unused imports
2049    
2050            * Thuban/UI/view.py: Remove unused imports
2051    
2052    2003-07-18  Bernhard Herzog  <[email protected]>
2053    
2054            * test/test_export.py Remove unused imports. The OutputTransform
2055            function is now in viewport.py and is called output_transform
2056            (TestScalebar.test_output_transform)
2057            (TestScalebar.test_OutputTransform): Renamed to
2058            test_output_transform and updated to use output_transform instead
2059            of OutputTransform
2060    
2061            * Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
2062            renamed.
2063            (MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
2064            renamed to output_transform
2065    
2066            * Thuban/UI/viewport.py (OutputTransform, output_transform):
2067            Rename to output_transform
2068    
2069    2003-07-18  Bernhard Herzog  <[email protected]>
2070    
2071            * Thuban/Model/layer.py (Layer.__init__): Rename
2072            classificationField to classificatin_column and init it here so
2073            that it can be used in SetClassificationColumn
2074            (Layer.GetClassificationColumn, Layer.GetClassificationField):
2075            Rename to GetClassificationColumn.
2076            (Layer.SetClassificationColumn, Layer.SetClassificationField):
2077            Rename to SetClassificationColumn and issue a LAYER_CHANGED
2078            message if the column changes.
2079            (Layer._classification_changed, Layer.ClassChanged): Rename to
2080            _classification_changed. Update the callers.
2081            (Layer.SetShapeStore): Further field->column renames.
2082    
2083            * Thuban/Model/load.py (SessionLoader.start_classification)
2084            (SessionLoader.start_clpoint): Updates because of
2085            field->column method name changes in the Layer class
2086    
2087            * Thuban/Model/save.py (SessionSaver.write_classification): Updates
2088            because of field->column method name changes in the Layer class
2089    
2090            * Thuban/UI/classifier.py (Classifier.__init__)
2091            (Classifier._OnTry, Classifier._OnRevert): Updates because of
2092            field->column method name changes in the Layer class
2093    
2094            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
2095            because of field->column method name changes in the Layer class
2096    
2097            * Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
2098            of field->column method name changes in the Layer class
2099    
2100            * test/test_save.py (SaveSessionTest.testClassifiedLayer)
2101            (SaveSessionTest.testClassifiedLayer): Update because of
2102            field->column method name changes in the Layer class
2103    
2104            * test/test_layer.py (SetShapeStoreTests.setUp)
2105            (SetShapeStoreTests.test_sanity): Update because of field->column
2106            method name changes in the Layer class
2107            (TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
2108            (TestLayerModification.test_sanity)
2109            (TestLayerModification.test_initial_settings): remove unsued code
2110            and rename to test_sanity.
2111            (TestLayerModification.test_set_classification): New test for
2112            SetClassification and SetClassificationField.
2113    
2114    2003-07-18  Bernhard Herzog  <[email protected]>
2115    
2116            * test/test_classgen.py (TestFixedRamp.test): Extend test to check
2117            the non-fixed values as well. The old test would have accepted a
2118            fixed ramp that only returnes the fixed properties
2119    
2120    2003-07-17  Jonathan Coles   <[email protected]>
2121    
2122            * Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
2123            shots for the manual. The XCF file is the source image and
2124            has additional layers to support changes.
2125    
2126            * Doc/manual/thuban-manual.xml: Wrote an initial Introduction.
2127    
2128            * Thuban/UI/classifier.py (Classifier.__BuildClassification):
2129            Return both the new class and the field name.
2130    
2131            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't
2132            fit the map to the window as this changes any zoom level that
2133            the user may have set.
2134    
2135    2003-07-16  Jonathan Coles   <[email protected]>
2136    
2137            * Thuban/Model/classgen.py (generate_singletons,
2138            generate_uniform_distribution, generate_quantiles): Remove
2139            fixes parameter, but maintain the same functionality by having
2140            the calling function pass a FixedRamp object for the ramp.
2141            (FixedRamp): New. Adapts a ramp to have fixed property values.
2142    
2143            * Thuban/Model/classification.py: Use new CLASS_CHANGED message.
2144            (Classification): Inherit from Publisher.
2145            (Classification.__init__): Remove the layer parameter.
2146            Classifications no longer need to have a parent layer.
2147            (Classification.GetField, Classification.GetFieldType,
2148            Classification.SetFieldInfo): Removed. The field name is stored
2149            in the layer, and the type can be retreived by calling
2150            Layer.GetFieldType().
2151            (Classification._set_layer, Classification.GetLayer): Removed.
2152            Classifications no longer have a parent layer.
2153    
2154            * Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
2155            classification.
2156            (Layer.SetShapeStore): Reset the classification first while
2157            we still have the old shape store to work with.
2158            (Layer.GetClassificationField, Layer.SetClassificationField):
2159            New. Method for getting/setting the field to classify on.
2160            (Layer.SetClassification): Simplified now that the layer
2161            simply has to hold a reference to the classification and not
2162            tell the classification who owns it.
2163            Fixes RTbug #2023.
2164    
2165            * Thuban/Model/load.py (SessionLoader.start_classification):
2166            Set the field name on the layer, not the classification.
2167    
2168            * Thuban/Model/messages.py: Add CLASS_CHANGED for when a
2169            classification is modified.
2170    
2171            * Thuban/Model/save.py (SessionSaver.write_classification):
2172            Get the field name and type from the layer.
2173    
2174            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
2175            parameter records to rows and add docstring. Fixes RTbug #1997.
2176    
2177            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
2178            ramp when we need to fix certain values of a ramp rather than
2179            using the old fixes parameter. Fixes RTbug #2024.
2180    
2181            * Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
2182            parameter.
2183            (ClassTable.Reset): Add fieldType parameter and use it, rather
2184            than asking the classification.
2185            (Classifier.__init__): Remember the original class's field
2186            and ask the layer for the field type, rather than the classification.
2187            (Classifier.__SetGridTable): Retrieve the field and field type
2188            for the table because they are not in the classification.
2189            (Classifier._OnTry, Classifier._OnRevert): Set the classification
2190            field on the layer in addition to the classification itself.
2191    
2192            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
2193            classification field from layer.
2194    
2195            * Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
2196            classification field from layer. Split up tests and remove
2197            *-imports. Fixes RTbug #1992.
2198    
2199            * test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.
2200    
2201            * test/test_classification.py
2202            (TestClassification.test_classification): Remove tests for methods
2203            that no longer exist.
2204    
2205            * test/test_layer.py (SetShapeStoreTests.setUp): Classification
2206            __init__ no longer has a field parameter, use SetClassificationField.
2207            (SetShapeStoreTests.test_sanity): Use layer object to get class
2208            field info.
2209    
2210            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
2211            SetClassificationField on layer to set class field info.
2212    
2213            * test/test_viewport.py: Renamed from test/test_view.py.
2214    
2215    2003-07-16  Jan-Oliver Wagner <[email protected]>
2216    
2217            * Doc/manual/thuban-manual.xml: Added authors and an initial
2218            coarse structure.
2219    
2220    2003-07-15  Bernhard Herzog  <[email protected]>
2221    
2222            * test/support.py (FloatComparisonMixin): This is a mix-in class
2223            and therefore should not be derived from any other class.
2224    
2225            * test/test_range.py (RangeTest): FloatComparisonMixin is a
2226            mix-in, so derive from TestCase as well.
2227    
2228    2003-07-15  Bernhard Herzog  <[email protected]>
2229    
2230            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
2231            draw_func handling a bit to remove one layer of indirection. This
2232            makes the renderer about 10% faster in the non-classifying case
2233            and the code a bit cleaner
2234            (MapRenderer.draw_point_shape): Add the pen and brush parameters
2235            and set them in the dc. Now the draw_point_shape method and
2236            wxproj's draw_polygon_shape function have basically the same
2237            signature so that both can be directly used as draw_func
2238    
2239    2003-07-15  Bernhard Herzog  <[email protected]>
2240    
2241            * Thuban/Model/save.py (SessionSaver.write_classification): Encode
2242            string values (in addition to the labels) as UTF 8
2243    
2244            * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
2245            values if the field type is string
2246    
2247            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
2248            saving a session with non-ascii string classification values.
2249    
2250            * test/test_load.py (TestClassification.file_contents)
2251            (TestClassification.test): Check for non-ascii values in string
2252            classifications
2253    
2254    2003-07-14  Jonathan Coles   <[email protected]>
2255    
2256            * test/test_view.py: New. Tests for ViewPort.
2257    
2258    2003-07-14  Frank Koormann   <[email protected]>
2259    
2260            * Thuban/Model/load.py (SessionLoader.start_map): Encode map
2261            title to latin1.  Fixes https://intevation.de/rt/webrt?serial_num=2013
2262    
2263            * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
2264            unicode strings from session file: session title, map title and
2265            projection name.
2266            
2267    2003-07-10  Jonathan Coles   <[email protected]>
2268    
2269            * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
2270            drag_stop, not drag_move when the mouse is released.
2271    
2272    2003-07-10  Jonathan Coles   <[email protected]>
2273    
2274            The most important part of this is the seperation of view.py into
2275            two pieces. viewport.py now has a class called ViewPort which
2276            contains all the non-wx parts of view.py and can therefore be
2277            tested. view.py contains only the wx-specific parts and is fairly
2278            simple.
2279    
2280            * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
2281            RTTbug #1992.
2282            * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
2283            RTTbug #1992.
2284    
2285            * Thuban/Model/classgen.py (generate_singletons,
2286            generate_uniform_distribution, generate_quantiles):
2287            Added 'fixes' parameter so that property attributes can
2288            be held constant over the generated classification groups.
2289            (CustomRamp.GetProperties): Remove unused variables.
2290    
2291            * Thuban/Model/map.py (Map.SetProjection): Send the old
2292            projection as an argument to listeners of the MAP_PROJECTION_CHANGED
2293            event.
2294    
2295            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
2296            parameter which is a list of records that restricts which
2297            records are saved. Fixes RTbug #1997.
2298    
2299            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
2300            Port exception dialog from GREAT-ER. Fixes RTbug #1993.
2301    
2302            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
2303            to allow the user to fix line color/width on generated groups.
2304            (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
2305            functions to optionally fix group properties.
2306    
2307            * Thuban/UI/main.py (main): Set exception hook to the
2308            ShowExceptionDialog. Fixes RTbug #1993.
2309    
2310            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
2311            the table window when it is selectd to be shown.
2312    
2313            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
2314            Export Selection button and move the export buttons underneath
2315            the table.
2316            (QueryTableFrame.UpdateStatusText): Added event argument so
2317            that it can respond to grid selection events. The status text
2318            is now updated even when the table is not associated with a
2319            layer as was previously assumed.
2320            (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
2321            UpdateStatusText responds to these events.
2322            (QueryTableFrame.OnSaveAs): Renamed to doExport.
2323            (QueryTableFrame.doExport): Helper function that saves the
2324            entire table, or selected rows, to a file.
2325            (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
2326            Respond to export button events and call doExport.
2327    
2328            * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
2329            the function doesn't return NULL without first setting a Python
2330            Error.
2331    
2332            * test/runtests.py (main): Only print "Unknown option" for
2333            unsupported options.
2334    
2335            * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
2336            optional epsilon argument to specify floating point accuracy.
2337            (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
2338            for each item test.
2339    
2340            * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
2341            tests for saving selected records.
2342    
2343            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
2344            tests for saving selected records.
2345    
2346            * test/test_map.py (TestMapWithContents.test_set_projection):
2347            MAP_PROJECTION_CHANGED events send the old projection.
2348    
2349            * test/test_session.py
2350            (TestSessionWithContent.test_forward_map_projection):
2351            MAP_PROJECTION_CHANGED events send the old projection.
2352    
2353            * test/test_table.py (TableTest): Update tests to use non-deprecated
2354            functions.
2355    
2356    2003-07-08  Bernhard Herzog  <[email protected]>
2357    
2358            * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
2359            constants in the column objects are the standard ones defined in
2360            the table module.
2361    
2362            * test/test_transientdb.py
2363            (TestTransientTable.test_transienttable_to_dbf): New. Test whether
2364            exporting transient tables as DBF works. This should catch the bug
2365            just fixed in TransientTableBase.Width.
2366    
2367    2003-07-08  Bernhard Herzog  <[email protected]>
2368    
2369            * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
2370            interpolated colors correctly.
2371    
2372            * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
2373            New. Test case for the fix in classgen.py
2374    
2375    2003-07-08  Bernhard Herzog  <[email protected]>
2376    
2377            * test/runtests.py (main): Make the default output less verbose
2378            and add a verbosity option (-v) to get the old output
2379    
2380    2003-07-08  Bernhard Herzog  <[email protected]>
2381    
2382            * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
2383            0.9.
2384    
2385            * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
2386            New. Return the join type
2387    
2388            * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
2389            DTD
2390            (SessionSaver.write_data_containers): Save the join type for
2391            joined tables
2392    
2393            * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
2394            namespace
2395            (SessionLoader.start_jointable): Handle the jointype attribute
2396    
2397            * test/test_load_0_8.py: New. Effectively a copy of test_load.py
2398            as of Thuban 0.8. These are now tests to determine whether Thuban
2399            can still read files generated by Thuban 0.8
2400    
2401            * test/test_load.py (LoadSessionTest.dtd)
2402            (TestSingleLayer.file_contents)
2403            (TestLayerVisibility.file_contents, TestLabels.file_contents)
2404            (TestLayerProjection.file_contents)
2405            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
2406            (TestJoinedTable.file_contents)
2407            (TestLoadError.file_contents): Update for new DTD
2408            (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
2409            for new join type attribute
2410    
2411            * test/test_save.py (SaveSessionTest.dtd)
2412            (SaveSessionTest.testEmptySession)
2413            (SaveSessionTest.testSingleLayer)
2414            (SaveSessionTest.testLayerProjection)
2415            (SaveSessionTest.testRasterLayer)
2416            (SaveSessionTest.testClassifiedLayer)
2417            (SaveSessionTest.test_dbf_table)
2418            (SaveSessionTest.test_joined_table): Update for new DTD
2419            (SaveSessionTest.test_joined_table): Add test for new join type
2420            attribute
2421    
2422    2003-07-04  Bernhard Herzog  <[email protected]>
2423    
2424            * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
2425            function for table_to_dbf
2426            (table_to_dbf): Deal with names longer than the 10 character limit
2427    
2428            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
2429            doc-string
2430            (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
2431            long column names
2432    
2433    2003-07-03  Bernhard Herzog  <[email protected]>
2434    
2435            * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
2436    
2437    2003-07-03  Bernhard Herzog  <[email protected]>
2438    
2439            * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
2440            for the Thuban manual and README with some basic information about
2441            the manual
2442    
2443    2003-07-03  Bernhard Herzog  <[email protected]>
2444    
2445            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
2446            Update doc-string
2447            (TransientJoinedTable.create): Do not modify the column objects of
2448            the input tables in place and copy all columns of the input tables
2449            into the joined table after all.
2450    
2451            * test/test_transientdb.py
2452            (TestTransientTable.test_transient_joined_table_same_column_name):
2453            Update to reflect the new behavior
2454            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
2455            Update to reflect the new behavior
2456            (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
2457            New test case for a bug which modified the column objects in place
2458    
2459    2003-07-02  Jonathan Coles   <[email protected]>
2460    
2461            * Thuban/Model/classgen.py (generate_singletons,
2462            generate_uniform_distribution, generate_quantiles,
2463            GenQuantiles0): Make sure maxValue isn't less than
2464            one, otherwise we could divide by zero.
2465    
2466            * test/test_classgen.py (ClassGenTest.doClassRangeTest,
2467            ClassGenTest.doClassSingleTest): Call doBoundsTest to
2468            check the end classification groups against the
2469            proper property values.
2470            (ClassGenTest.doBoundsTest): New. Checks the first and
2471            last classification groups to make sure their properties
2472            are the correct upper and lower bounds for a color ramp.
2473    
2474    2003-07-02  Jonathan Coles   <[email protected]>
2475    
2476            * Thuban/Model/classgen.py (generate_singletons,
2477            generate_uniform_distribution, generate_quantiles,
2478            GenQuantiles0): The denominator was one to high when
2479            calculating the index for the ramp causing the index
2480            to never to reach one.
2481    
2482    2003-07-02  Jonathan Coles   <[email protected]>
2483    
2484            Changed the singature of ClassGroupRange.__init__ and
2485            ClassGroupRange.SetRange() so that the min/max values are
2486            passed as a tuple. This makes a better calling scheme for
2487            when a Range object is passed instead.
2488    
2489            * Thuban/Model/classgen.py: Fixed parameters to
2490            ClassGroupRange constructor.
2491    
2492            * Thuban/Model/classification.py (ClassGroupRange.__init__):
2493            Consolidate the min/max parameters into a single _range which
2494            can either be a tuple or a Range object.
2495            (ClassGroupRange.SetRange): Consolidate the min/max parameters
2496            into a single _range which can either be a tuple or a Range object.
2497    
2498            * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
2499            call to ClassGroupRange constructor to use a tuple.
2500    
2501            * Thuban/Model/layer.py (Layer.SetClassification): Switch
2502            the classification instance variable to the new class
2503            before calling _set_layer otherwise subscribers to a
2504            LAYER_CHANGED event will not see any difference.
2505    
2506            * test/test_classification.py: Fix tests of ClassGroupRange
2507            so that they use the new signature.
2508    
2509            * test/test_load.py: Fix use of ClassGroupRange so that it
2510            uses the new signature.
2511    
2512            * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
2513            uses the new signature.
2514    
2515            * test/test_save.py: Fix use of ClassGroupRange so that it
2516            uses the new signature.
2517    
2518    
2519    2003-07-01  Jonathan Coles   <[email protected]>
2520    
2521            * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
2522            Import used objects/class from color.
2523            (generate_singletons): We don't
2524            need the numGroups parameter anymore because we are using
2525            the new ramps with GetProperties().
2526            (generate_uniform_distribution): Use new ramp method
2527            GetProperties().
2528            (generate_quantiles, GenQuantiles0): Use new ramp method
2529            GetProperties().
2530            (CustomRamp.SetNumGroups): Removed. The ramps now map
2531            a value from 0 to 1 to class properties so the number
2532            of groups is not needed ahead of time.
2533            (CustomRamp.next): Removed. CustomRamp does not support
2534            interation anymore.
2535            (CustomRamp.GetProperties): Returns a ClassGroupProperties
2536            object based on the index value from 0 to 1 that is
2537            passed to it.
2538            (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
2539            Made into instances of Monochromatic class instread of
2540            deriving from it.
2541            (HotToCold.SetNumGroups): Removed. See CustomRamp.
2542            (HotToCold.next): Removed. See CustomRamp.
2543    
2544            * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
2545            (Classification.SetField, Classification.SetFieldType):
2546            Replaced with SetFieldInfo.
2547            (Classification.SetFieldInfo): New. Does a better job of
2548            what SetField and SetFieldType used to do by combining
2549            their function since they should really always be done
2550            at the same time.
2551            (Classification.SetLayer): Renamed to _set_layer.
2552            (Classification._set_layer): Should only be called from
2553            Layer's SetClassification. This does not cause a recursive
2554            call as SetLayer did because we know that Layer knows about
2555            the classification.
2556    
2557            * Thuban/Model/color.py: Fixes RTbug #1971.
2558            (_Transparent): Renamed from Transparent so it doesn't
2559            conflict with the module variable.
2560            (Transparent, Black): Renamed from Color.Transparent,
2561            Color.Black so they are not class variables.
2562    
2563            * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
2564            (Layer.Destroy): We don't need to call SetClassification
2565            anymore to clear out the back reference in the classifcation
2566            to the layer. It's better to set it to None using _set_layer,
2567            and we won't be creating another clas object too.
2568            (Layer.SetClassification): Classification._set_layer is not
2569            recursive so remove all the locking variables. Also clean
2570            up the code so that it remains unchanged if something fails.
2571    
2572            * Thuban/Model/load.py: Fixes RTbug #1971.
2573            (SessionLoader.start_classification): Call
2574            Classification.SetFieldInfo().
2575    
2576            * Thuban/Model/save.py: Removed import of Color which wasn't
2577            being used.
2578    
2579            * Thuban/UI/classgen.py: Fixes RTbug #1972.
2580            (ClassGenDialog.__init__): Color ramps are now instances
2581            already so we don't need to create any new objects.
2582            (ClassGenDialog.OnOK): Check for numGroups is no longer
2583            necessary because we never use it.
2584    
2585            * Thuban/UI/classifier.py: Fixes RTbug #1971.
2586            (Classifier.__BuildClassification, Classifier.__SetGridTable):
2587            Call Classification.SetFieldInfo() instead of SetFieldType.
2588    
2589            * Thuban/UI/renderer.py: Fixes RTbug #1971.
2590    
2591            * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
2592            (MapCanvas.__init__): Subscribe to the idle time event. Set
2593            background color to white.
2594            (MapCanvas.OnPaint): Set a flag indicating that we should
2595            render the map during idle time. If we already have a bitmap
2596            just draw it now.
2597            (MapCanvas.OnIdle): New. Render the map only during idle time.
2598            This also fixes a problem with the busy cursor under gtk.
2599    
2600            * test/test_classgen.py (ClassGenTest.test_generate_singletons):
2601            Fix calls to generate_singletons because the signature changed.
2602    
2603            * test/test_classification.py: Fix color references and
2604            change calls to Classification.[SetField|SetFieldType] to
2605            SetFieldInfo.
2606    
2607            * test/test_load.py: Fix color references.
2608    
2609            * test/test_load_0_2.py: Fix color references.
2610    
2611            * test/test_save.py (SaveSessionTest.testClassifiedLayer):
2612            Change calls to Classification.[SetField|SetFieldType] to
2613            SetFieldInfo.
2614    
2615    2003-07-01  Frank Koormann   <[email protected]>
2616    
2617            MERGE from the greater-ms3 branch.
2618    
2619            * test/test_transientdb.py
2620            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
2621            New. Test join of two tables with partly equal column names.
2622    
2623            * Thuban/Model/transientdb.py (TransientJoinedTable.create):
2624            If duplicates in left and right tables column names are found,
2625            append '_' (underscores) to the name until it is unique.
2626            Create always new internal names for the resulting table and reference
2627            columns in the join statement with <table>.<column>
2628    
2629    2003-07-01  Bernhard Herzog  <[email protected]>
2630    
2631            * test/test_transientdb.py
2632            (TestTransientTable.test_transient_joined_table_same_column_name):
2633            New. Test whether joining on columns with the same names in both
2634            tables works.
2635            
2636            * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
2637            sure to use the right internal names even when joining on field
2638            with the same names in both tables. Also, detect duplicate names
2639            in the joined table correctly.
2640    
2641    2003-07-01  Frank Koormann   <[email protected]>
2642    
2643            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
2644            Reverse List of layers to render in same order as in desktop legend.
2645    
2646    2003-06-30  Jonathan Coles   <[email protected]>
2647    
2648            * Thuban/version.py (make_tuple): Takes a version string
2649            and splits it into a tuple of at most three integers.
2650            Used make_tuple() to make tuple versions of the version
2651            numbers.
2652    
2653            * Thuban/UI/about.py: Add Thuban email addresses.
2654    
2655    2003-06-30  Jonathan Coles   <[email protected]>
2656    
2657            * Thuban/version.py: SQLite/PySQLite version dependencies
2658            were too high.
2659    
2660    2003-06-30  Jonathan Coles   <[email protected]>
2661    
2662            * Thuban/version.py: Update version to 0.8.1
2663            
2664            * MANIFEST.in: Added Projections so that default.proj is
2665            included.
2666    
2667    2003-06-26  Jonathan Coles   <[email protected]>
2668    
2669            New About box with lots more information including library
2670            versions and credits. More/better version checking before
2671            Thuban starts.
2672    
2673            * Thuban/UI/about.py: New. New About box that displays
2674            library version information and credits.
2675    
2676            * Thuban/version.py: Added new 'versions' dictionary which
2677            contains the verions of various libraries which are checked
2678            when the module loads.
2679            (verify_versions): Check all version numbers and returns
2680            a list of errors.
2681    
2682            * Thuban/UI/classifier.py (Classifier.__EnableButtons):
2683            Reset the status of the buttons as the situation warrants,
2684            but in a better more reliable way by not relying on the
2685            current status to determine what needs to change.
2686    
2687            * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
2688            (verify_versions): Remove most of the code since it is
2689            now in Thuban.version.verify_versions.o
2690    
2691            * Thuban/UI/mainwindow.py (MainWindow.About): Call new
2692            About box in Thuban.UI.about.
2693    
2694            * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
2695            Returns the version of gdal library being used as a string.
2696    
2697            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
2698            Removed.
2699            (get_proj_version): Return the version of PROJ that the file
2700            was compiled with.
2701            (get_gtk_version): Return th version of GTK that the file
2702            was compiled with.
2703    
2704    2003-06-25  Jonathan Coles   <[email protected]>
2705    
2706            * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
2707            of the SelectPropertiesDialog should be self so the window
2708            appears on top.
2709            (ClassGroupPropertiesCtrl.DoEdit): The parent
2710            of the SelectPropertiesDialog should be self so the window
2711            appears on top.
2712    
2713            * Thuban/UI/resource.py: Cleaned up how we determine file
2714            extensions.
2715            (GetImageResource): Return an wxImage from our Resources.
2716    
2717    2003-06-24  Jonathan Coles   <[email protected]>
2718    
2719            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
2720            Check that a layer has a classification before trying
2721            to get it. Raster layers don't have classifications.
2722    
2723    2003-06-23  Jonathan Coles   <[email protected]>
2724            
2725            * setup.py: Add Resources/XML to resource list.
2726        
2727    2003-06-23  Jonathan Coles   <[email protected]>
2728    
2729            * setup.cfg: Fix copyright dates
2730        
2731    2003-06-23  Jonathan Coles   <[email protected]>
2732    
2733            * MANIFEST.in: Update with Resources/XML
2734    
2735            * setup.py: Don't include Locale resources yet as we don't
2736            have any and it causes problems building the distribution
2737            for Windows. Update version to 0.8.0.
2738    
2739            * Doc/thuban.dtd: Removed since it is now in Resources/XML.
2740    
2741            * Thuban/UI/mainwindow.py: Add blank line at the end because
2742            file was not being read correctly building the Windows
2743            distribution.
2744    
2745    2003-06-23  Jonathan Coles   <[email protected]>
2746    
2747            * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
2748    
2749            * Thuban/version.py: Temporarily update longversion for
2750            the 0.8 release so that it doesn't have the cvs revision.
2751    
2752    2003-06-23  Jonathan Coles   <[email protected]>
2753    
2754            * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
2755            to make sure that we don't create reentrant possibilities with
2756            wxYield.
2757    
2758            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
2759            directly to avoid the wxSafeYield() call which generates an
2760            OnPaint event causing infinite recursion. Don't try to catch
2761            exception anymore. This was for before there were limits on map
2762            scaling.
2763    
2764    2003-06-23  Bernhard Herzog  <[email protected]>
2765    
2766            Bug fix for RT #1961:
2767    
2768            * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
2769            Register DerivedShapestores with the session
2770    
2771            * Thuban/Model/session.py (Session.Tables): Make sure each table
2772            is only listed once.
2773    
2774            * test/test_load.py (TestJoinedTable.test): Add check_format call.
2775            Update file contents to match the one written out.
2776    
2777    2003-06-20  Bernhard Herzog  <[email protected]>
2778    
2779            * test/xmlsupport.py (SaxEventLister.startElementNS)
2780            (SaxEventLister.endElementNS): Do not include the qname. Python
2781            2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
2782            is (presumably incorrectly) None, whereas it's a string with the
2783            element name in the later versions.
2784    
2785            * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
2786            (TestEventList.test_even_list_namespace): Update tests to reflect
2787            the new behaviour
2788            (TestEventList.test_even_list_id_normalization): Fix doc-string
2789    
2790    2003-06-20  Jonathan Coles   <[email protected]>
2791    
2792            * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
2793            by deriving classes to determine if that layer supports shapes.
2794            (Layer): Override HasShapes and return true.
2795    
2796            * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
2797            instead of a direct call to wx[Begin|End]CusyCursor().
2798            (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
2799            table data.
2800    
2801            * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
2802            New. Wrappers around the wxWindows functions that allow us to
2803            make additional calls such as wxYield which gives the native
2804            system a chance to update the cursor correctly.
2805    
2806            * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
2807            instead of a direct call to wx[Begin|End]CusyCursor().
2808    
2809            * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
2810            instead of a direct call to wx[Begin|End]CusyCursor().
2811            (MapCanvas.find_shape_at): Check if the current search layer
2812            support shapes, otherwise go on to the next layer.
2813    
2814            * test/test_layer.py: Add tests in each type of layer for
2815            HasClassification() and HasShapes()
2816    
2817    2003-06-20  Jonathan Coles   <[email protected]>
2818    
2819            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
2820            turning on the busy cursor to allow the system to change the
2821            cursor before we begin painting. This fixes a problem that
2822            was occuring only under GTK. Fixes RTbug #1840.
2823    
2824    2003-06-20  Bernhard Herzog  <[email protected]>
2825    
2826            * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
2827            version.
2828    
2829            * Thuban/Model/save.py (sort_data_stores): New. Make topological
2830            sort of the data sources so they can be written with sources that
2831            data sources that depend on other data sources come after the
2832            sources they depend on.
2833            (SessionSaver.__init__): Add idmap instance variable to map from
2834            objects to the ids used in the file.
2835            (SessionSaver.get_id, SessionSaver.define_id)
2836            (SessionSaver.has_id): New. Methods to manage the idmap
2837            (SessionSaver.write): Use thuban-0.8.dtd
2838            (SessionSaver.write_session): Add a namespace on the session and
2839            write out the data sources before the maps.
2840            (SessionSaver.write_data_containers): New. Write the data
2841            containers.
2842            (SessionSaver.write_layer): Layer elements now refer to a
2843            shapestore and don't contain filenames anymore.
2844    
2845            * Thuban/Model/load.py (LoadError): Exception class to raise when
2846            errors in the files are discovered
2847            (SessionLoader.__init__): Define dispatchers for elements with a
2848            thuban-0.8 namespace too.
2849            (SessionLoader.check_attrs): New helper method to check and
2850            convert attributes
2851            (AttrDesc): New. Helper class for SessionLoader.check_attrs
2852            (SessionLoader.start_fileshapesource)
2853            (SessionLoader.start_derivedshapesource)
2854            (SessionLoader.start_filetable, SessionLoader.start_jointable):
2855            Handlers for the new elements in the new fileformat
2856            (SessionLoader.start_layer): Handle the shapestore attribute in
2857            addition to filename.
2858            (SessionLoader.start_table, SessionLoader.end_table): Removed.
2859            They were never used in the old formats and aren't needed for the
2860            new.
2861    
2862            * Thuban/Model/session.py (Session.DataContainers): New method to
2863            return all "data containers", i.e. shapestores and tables
2864    
2865            * test/xmlsupport.py (SaxEventLister.__init__)
2866            (SaxEventLister.startElementNS, sax_eventlist): Add support to
2867            normalize IDs.
2868    
2869            * test/test_xmlsupport.py
2870            (TestEventList.test_even_list_id_normalization): New test case for
2871            id normalization
2872    
2873            * test/test_load.py (LoadSessionTest.check_format): Use ID
2874            normalization
2875            (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
2876            class atrributes used for ID normalization
2877            (TestSingleLayer, TestLayerVisibility, TestLabels.test)
2878            (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
2879            file format
2880            (TestJoinedTable): New test for loading sessions with joined
2881            tables.
2882            (TestLoadError): New. Test whether missing required attributes
2883            cause a LoadError.
2884    
2885            * test/test_save.py (SaveSessionTest.thubanids)
2886            (SaveSessionTest.thubanidrefs): New class attributes for ID
2887            normalization in .thuban files.
2888            (SaveSessionTest.compare_xml): Use id-normalization.
2889            (SaveSessionTest.testEmptySession)
2890            (SaveSessionTest.testLayerProjection)
2891            (SaveSessionTest.testRasterLayer)
2892            (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
2893            (SaveSessionTest.testLayerProjection): The filename used was the
2894            same as for testSingleLayer. Use a different one.
2895            (SaveSessionTest.test_dbf_table)
2896            (SaveSessionTest.test_joined_table): New test cases for saving the
2897            new data sources structures.
2898            (TestStoreSort, MockDataStore): Classes to test the sorting of the
2899            data stores for writing.
2900    
2901            * test/runtests.py: Add CVS keywords
2902    
2903    2003-06-20  Jonathan Coles   <[email protected]>
2904    
2905            * test/test_session.py
2906            (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
2907            Use the cultural_landmark-point.dbf file for the store so that
2908            the table rows and shape count match.
2909    
2910    2003-06-20  Jonathan Coles   <[email protected]>
2911    
2912            * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
2913            an exception if the number of shapes is different from the
2914            number of rows in the table. Address RTbug #1933.
2915    
2916            * test/test_layer.py (TestLayer.test_derived_store): Add
2917            a test for the new exception in DerivedShapeStore.__init__.
2918    
2919            * test/support.py (FloatTestCase): Removed since there is
2920            already FloatComparisonMixin. Fixes RTbug #1954.
2921            (FloatComparisonMixin.assertFloatEqual): Include test for
2922            infinity that was part of FloatTestCase.
2923    
2924            * test/test_range.py (RangeTest): Inherit from
2925            support.FloatComparisonMixin now that we don't have
2926            support.FloatTestCase.
2927    
2928    2003-06-20  Bernhard Herzog  <[email protected]>
2929    
2930            * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
2931            the implementation in xmlsupport instead.
2932            (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
2933    
2934            * test/test_proj.py: Import sax_eventlist from xmlsupport instead
2935            of test_save
2936    
2937    2003-06-20  Bernhard Herzog  <[email protected]>
2938    
2939            * test/test_load.py (LoadSessionTest.check_format): New helper
2940            method to make sure the test files we load might have been written
2941            by the current thuban version.
2942            (ClassificationTest.TestLayers, TestSingleLayer.test)
2943            (TestLayerVisibility.test, TestClassification.test)
2944            (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
2945            Add check_format() calls and fix the thuban data to match the data
2946            that would be written by saving the session loaded from it.
2947    
2948            * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
2949            the same class and function in test_save.
2950    
2951            * test/test_xmlsupport.py (TestEventList): New. test cases for
2952            sax_eventlist
2953    
2954    2003-06-20  Bernhard Herzog  <[email protected]>
2955    
2956            * Resources/XML/thuban.dtd: Add comment about which versions of
2957            Thuban are covered by this DTD
2958            (map): Fix content model for layers and raster layers. There can
2959            be any number or layers and raster layers in any order.
2960    
2961    2003-06-20  Jonathan Coles   <[email protected]>
2962    
2963            This is mainly about fixing RTbug #1949.
2964    
2965            * Thuban/Model/classification.py: Remove "from __future__"
2966            import statement since python 2.2 is the earliest supported
2967            version.
2968    
2969            * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
2970            Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
2971            depending on the units this projection *forwards* into.
2972    
2973            * Thuban/Model/save.py (SessionSaver.write_classification):
2974            Remove unnecessary use of lambdas and nested functions.
2975    
2976            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
2977            adjustment here if the map projection uses degrees.
2978    
2979            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
2980            scale adjust code since it is now done before calling
2981            this method. Don't do anything if the map projection
2982            is None.
2983    
2984    2003-06-19  Bernhard Herzog  <[email protected]>
2985    
2986            Move version specific load tests to their own file.
2987    
2988            * test/test_load.py: Expand the doc-string to explain a bit how to
2989            handle file format changes.
2990            (TestClassification.test): Update the docstring as this test is
2991            not about Thuban 0.2 anymore.
2992    
2993            * test/test_load_0_2.py: New file with the load tests for thuban
2994            files created with Thuban 0.2 and earlier.
2995    
2996    2003-06-19  Bernhard Herzog  <[email protected]>
2997    
2998            Add XML validation to some of the tests. Validation will only be
2999            done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
3000            To make the DTD available to the test cases it's moved into
3001            Resources/XML
3002    
3003            * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
3004            for versions up to and including 0.2. Two slight changes: added an
3005            encoding specification and fixed the comment which refered to
3006            GRASS, not Thuban
3007    
3008            * test/xmlsupport.py: New support module for tests involving XML.
3009            Currently there's a mix-in class for XML validation.
3010    
3011            * test/test_xmlsupport.py: New. Tests for the xmlsupport module
3012    
3013            * test/test_save.py (SaveSessionTest): Derive from ValidationTest
3014            so that we can validate the
3015            (SaveSessionTest.testEmptySession)
3016            (SaveSessionTest.testSingleLayer)
3017            (SaveSessionTest.testSingleLayer)
3018            (SaveSessionTest.testLayerProjection)
3019            (SaveSessionTest.testRasterLayer)
3020            (SaveSessionTest.testClassifiedLayer): Validate the generated XML
3021    
3022            * test/runtests.py (main): Call print_additional_summary instead
3023            of print_garbage_information
3024    
3025            * test/support.py (resource_dir): New function to return the
3026            "Resource" subdirectory
3027            (print_additional_summary): New function to combine several
3028            summary functions
3029            (run_tests): Use print_additional_summary instead of calling
3030            print_garbage_information directly
3031    
3032    2003-06-19  Bernhard Herzog  <[email protected]>
3033    
3034            * Doc/thuban.dtd (classification): Correct the content model of
3035            the classification element.
3036            (projection): Add the "name" attribute
3037    
3038    2003-06-19  Frank Koormann   <[email protected]>
3039    
3040            MERGE from the greater-ms3 branch.
3041    
3042            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
3043            scale if projection is latlong to get better estimate.
3044    
3045            Fix problem of hidden properties dialog under windows after double
3046            click on layer tree:
3047            The tree control always gets an Expanded / Collapsed event after
3048            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
3049            raises the already displayed window.
3050    
3051            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
3052            raiseProperties initialized to prevent endless loops
3053            (LegendTree._OnItemActivated): Depending on self.raiseProperties
3054            simply raise the properties or open the dialog and issue a second
3055            event.
3056    
3057    2003-06-18  Jonathan Coles   <[email protected]>
3058    
3059            * setup.py: Fix a few problems that occured under Windows.
3060    
3061    2003-06-18  Jonathan Coles   <[email protected]>
3062    
3063            When Thuban loaded the map was redrawn twice because the
3064            legend was being opened after the mainwindow was created
3065            and not during its creation. This meant the map was drawn
3066            initially and then had to be redrawn when the legend
3067            caused the display to change. Now the legend is opened
3068            in the mainwindow constructor which resolves this issue.
3069    
3070            Also, although we were checking for the existence of
3071            gdal and gdalwarp modules, the gdalwarp extension was
3072            still being compiled (which may fail if the system doesn't
3073            have gdal installed). the build_ext command to setup.py
3074            now accepts the flags --with-gdal and --without-gdal.
3075            If --without-gdal is specified setup.py will try to
3076            use the gdal parameters specified by gdal-config. Under
3077            windows, those parameters have to be set in setup.py
3078            as with proj4 an wxWindows.
3079    
3080            * setup.py: Use a list instead of seperate variables for
3081            extension parameters so we can create a generic function
3082            that runs an appropriate *-config script.
3083            (run_cs_script): Renamed from run_wx_script and modified
3084            to accept a second argument which is a list of lists to
3085            be filled in by the values returned from running the command.
3086            (thuban_build_ext): New. Extends the build_ext command and
3087            provides the options --with-gdal/--without-gdal which then
3088            optionally includes the gdalwarp extension.
3089    
3090            * Thuban/Model/resource.py: First check if we can import
3091            the gdalwarp Thuban extension before checking for gdal.
3092            Also added some comments.
3093            
3094            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
3095            the map is None which may be the case if none has been loaded
3096            yet.
3097    
3098            * Thuban/UI/main.py (main): Remove call to ShowLegend.
3099    
3100            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
3101    
3102            * Thuban/UI/renderer.py: Check for gdal support before importing
3103            gdalwarp.
3104            (MapRenderer.render_map): Only try to optimize if we have gdal
3105            support otherwise nothing will get drawn.
3106    
3107            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
3108            during startup before a map has been created. Check if map is None
3109            before using it and do nothing if it is.
3110    
3111    2003-06-17  Jonathan Coles   <[email protected]>
3112    
3113            Fix the problem with raster layers under Windows that caused
3114            Thuban to crash. The view should respond to layer projection
3115            changed events to update the display. Changes to a projection
3116            should not cause the map to be set to full extent.
3117            
3118            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
3119            current_map_proj to remember the current map projection so that
3120            when the projection changes we know what the previous projection
3121            was.
3122            (MapCanvas.SetMap): Unsubscribe and subscribe to
3123            LAYER_PROJECTION_CHANGED events.
3124            (MapCanvas.projection_changed): Split into two methods that respond
3125            to map and layer projection changes.
3126            (MapCanvas.map_projection_changed): New. Takes the current view and
3127            projects it using the new projection. This does not cause the
3128            map to be redrawn at full extent.
3129            (MapCanvas.layer_projection_changed): New. Cause a redraw which
3130            will draw each layer in its new projection.
3131            
3132            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
3133            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
3134            under Windows.
3135            
3136            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
3137            to twice sizeof(void*) because there are two digits for each
3138            hex byte.
3139    
3140    2003-06-16  Bernhard Herzog  <[email protected]>
3141    
3142            Update to the layer interface: Direct access to the table,
3143            shapetable, shapefile and filename attributes is now actively
3144            deprecated by issuing deprecation warnings for all places where
3145            this happens.
3146    
3147            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
3148            to the instance variables table, shapetable, shapefile and
3149            filename via __getattr__ so that we can issue a deprecation
3150            warning.
3151            (Layer.SetShapeStore): Don't set the deprecated instance variables
3152            any more
3153            (Layer.SetShapeStore): Don't use deprecated layer instance
3154            variables
3155            (Layer.Destroy): No need to explicitly remove the instance
3156            variables any more
3157            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
3158            instance variables
3159    
3160            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
3161            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
3162            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
3163            use deprecated layer instance variables
3164    
3165            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
3166            deprecated layer instance variables
3167    
3168            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
3169            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
3170            instance variables
3171    
3172            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
3173            deprecated layer instance variables
3174    
3175            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
3176            deprecated layer instance variables
3177    
3178            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
3179            deprecated layer instance variables
3180    
3181            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
3182            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
3183            variables
3184    
3185            * test/runtests.py (main): Turn Thuban's deprecation warnings into
3186            errors so that they're cought by the tests
3187    
3188            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
3189            layer instance variables
3190    
3191    2003-06-16  Jonathan Coles   <[email protected]>
3192    
3193            Fix a problem under Windows whereby if the user double-clicks on a
3194            layer in the legend that tree item will expand or collapse as well
3195            as open the layer properties dialog. The state of the tree item
3196            should not be affected.
3197    
3198            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
3199            preventExpandCollapse and subscribe to expanding and collapsing
3200            events.
3201            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
3202            collapsing events and will veto the event if it has been triggered
3203            by the user double clicking on a layer.
3204            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
3205            that an expanding/collapsing event should be vetoed.
3206    
3207    2003-06-13  Bernhard Herzog  <[email protected]>
3208    
3209            * Thuban/UI/classifier.py (Classifier.OnClose)
3210            (Classifier.map_layers_removed)
3211            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
3212            in OnClose and not in map_layers_removed or
3213            layer_shapestore_replaced to make sure it always happens when the
3214            dialog is closed
3215    
3216    2003-06-13  Jonathan Coles   <[email protected]>
3217    
3218            This puts back a fix for Windows where a panel is needed so that
3219            the background of the table view appears correctly.
3220    
3221            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
3222            object that can be used by derived classes to place any
3223            controls (including the grid) onto.
3224            (QueryTableFrame.__init__): Use the panel as the parent window
3225            for all the controls. Reparent the grid so that the panel is
3226            the parent. Call UpdateStatusText() to correctly initialize
3227            the status bar.
3228    
3229    2003-06-13  Jonathan Coles   <[email protected]>
3230    
3231            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
3232            from wxFrame (as opposed to wxDialog like the other classes)
3233            but otherwise behaves like the other classes. This is needed
3234            for the TableView which isn't really a dialog and needs to
3235            have a status bar and control buttons.
3236    
3237            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
3238            instance variable to keep track of how many rows are selected.
3239            Subscribe once to the the events we are interested in.
3240            (ThubanGrid.OnRangeSelect): Only handle event if event handling
3241            hasn't been turned off.
3242            (ThubanGrid.OnSelectCell): Only handle event if event handling
3243            hasn't been turned off.
3244            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
3245            as an event listener (which changes the event handler stack)
3246            simply set an instance variable to False. This is checked in
3247            the event handlers.
3248            (ThubanGrid.GetNumberSelected): Return the number of currently
3249            selected rows.
3250            (TableFrame): Inherit from ThubanFrame so we can have a
3251            status bar and control buttons.
3252            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
3253            Explicitly set which items are selected in the operator choice and
3254            action choice so there is always a valid selection. Fixes RTbug #1941.
3255            Subscribe to grid cell selection events so we can update the
3256            status bar.
3257            (QueryTableFrame.UpdateStatusText): Update the status bar with
3258            how many rows are in the grid, how many columns, and how many
3259            rows are selected.
3260            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
3261            Call UpdateStatusText when cells are (de)selected.
3262            (QueryTableFrame.OnQuery): Use the string value in the value
3263            combo if either the selected item index is 0 or if the string
3264            cannot be found in the predefined list (this happens if the
3265            user changes the text). Fixes RTbug #1940.
3266            Only turn off the grid event listeners if there a query comes
3267            back with a none empty list of ids. in the case that the list
3268            is empty this causes a grid.ClearSelection() call to actually
3269            clear the grid selection which causes the selected items in
3270            the map to be deselected. Fixes RTbug #1939.
3271    
3272            * test/test_save.py (XMLWriterTest.Encode): Check return values.
3273            Fixes RTbug #1851.
3274    
3275    2003-06-13  Bernhard Herzog  <[email protected]>
3276    
3277            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
3278            self.selected_shape with the current selection to make sure the
3279            contents of the dialog are up to date when it's shown for the
3280            first time.
3281            The dialog used to work without this by luck. The recent fix to
3282            the connector module 'broke' a 'feature' the identify view was
3283            relying on, i.e that subscribing to a message in response to
3284            receiving a message of that type would mean that the new
3285            subscriber would also be called for the same message.
3286            
3287    2003-06-12  Jonathan Coles   <[email protected]>
3288    
3289            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
3290            the image is rendered. Fixes RTbug #1937.
3291    
3292    2003-06-12  Jonathan Coles   <[email protected]>
3293    
3294            * Thuban/Lib/fileutil.py: As is done under Windows, create the
3295            user directory if it doesn't exist on a posix system.
3296            Fixes RTbug #1815.
3297    
3298            * Thuban/Model/resource.py (get_user_proj_files): Moved the
3299            called to get_application_dir here, so that the directory
3300            will only be called if this method is invoked.
3301    
3302            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
3303            the projfilepath if no projection is selected.
3304    
3305    2003-06-12  Jonathan Coles   <[email protected]>
3306    
3307            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
3308            the scalebar if the current map has no projection set.
3309    
3310            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
3311            projfilepath label to just the basename of the projection file
3312            rather than include the entire path.
3313    
3314            * Thuban/Model/resource.py: Fix missed proj functions that
3315            needed to be renamed.
3316    
3317    2003-06-12  Jonathan Coles   <[email protected]>
3318    
3319            * Thuban/Model/classification.py: Removed assert statements that
3320            tested if the variable was an instance of Color.
3321    
3322            * Thuban/Model/color.py (Color): Remove commented code that isn't
3323            used.
3324            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
3325            Fixes RTbug #1835.
3326            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
3327            Needed now that the class doesn't inherit from Color.
3328    
3329    2003-06-12  Jonathan Coles   <[email protected]>
3330    
3331            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
3332            check unicode strings.
3333    
3334            * test/test_layer.py: Check for existence of gdal.
3335    
3336    2003-06-12  Jonathan Coles   <[email protected]>
3337        
3338            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
3339            that was in load.py
3340    
3341            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
3342            that was in save.py
3343    
3344    2003-06-12  Jonathan Coles   <[email protected]>
3345    
3346            This is largely a collection of bug fixes. We also handle the
3347            case where gdal is not on the system. The XMLReader and XMLWriter
3348            classes were moved into there own files to resolve some circular
3349            import references and because they shouldn't really be in the
3350            file that is dediciated to reading/writing session files since
3351            they are also used elsewhere.
3352    
3353            * Thuban/Model/classgen.py: Renamed functions to follow the
3354            function_names_with_underscores style. Fixes RTbug #1903.
3355            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
3356    
3357            * Thuban/Model/layer.py: Import gdal only if it available.
3358            (RasterLayer): Handle the case where the gdal library is unavailable.
3359            Addresses RTbug #1877.
3360    
3361            * Thuban/Model/load.py (XMLReader): Moved into seperate file
3362            xmlreader.py.
3363    
3364    2003-06-12  Jonathan Coles   <[email protected]>
3365    
3366            This is largely a collection of bug fixes. We also handle the
3367            case where gdal is not on the system. The XMLReader and XMLWriter
3368            classes were moved into there own files to resolve some circular
3369            import references and because they shouldn't really be in the
3370            file that is dediciated to reading/writing session files since
3371            they are also used elsewhere.
3372    
3373            * Thuban/Model/classgen.py: Renamed functions to follow the
3374            function_names_with_underscores style. Fixes RTbug #1903.
3375            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
3376    
3377            * Thuban/Model/layer.py: Import gdal only if it available.
3378            (RasterLayer): Handle the case where the gdal library is unavailable.
3379            Addresses RTbug #1877.
3380    
3381            * Thuban/Model/load.py (XMLReader): Moved into seperate file
3382            xmlreader.py.
3383    
3384            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
3385            file xmlwriter.py.
3386    
3387            * Thuban/Model/resource.py: Renamed functions to following the
3388            function_names_with_underscores style.
3389            (has_gdal_support): New function that returns true if the gdal
3390            library is available. Addresses RTbug #1877.
3391    
3392            * Thuban/UI/application.py (ThubanApplication.OpenSession):
3393            Display a message box if the gdal library is not available, but
3394            only if there are any layers that would use it. Addresses RTbug #1877.
3395    
3396            * Thuban/UI/classgen.py: Use renamed projection resource functions.
3397            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
3398            when using integers versus floats.
3399    
3400            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
3401            determine if the "Add Image Layer" menu option should be
3402            greyed out or not. Addresses RTbug #1877.
3403    
3404            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
3405    
3406            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
3407            optimize if a raster layer is visible. Fixes RTbug #1931.
3408            Only draw the raster layer if the gdal library is available.
3409            Addresses RTbug #1877.
3410    
3411            * test/test_classgen.py: Add tests for generate_singletons,
3412            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
3413            (test_calculate_quantiles): Fix some tests to catch the new
3414            ValueError that is raised.
3415    
3416            * test/test_proj.py: Use renamed projection resource functions.
3417    
3418            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
3419            test for saving classified layers. Fixes RTbug #1902.
3420            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
3421    
3422    2003-06-12  Jan-Oliver Wagner <[email protected]>
3423    
3424            Fix for http://intevation.de/rt/webrt?serial_num=1900.
3425    
3426            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
3427    
3428            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
3429            multiplechoicedialog.py rather than from the wxPython library.
3430    
3431    2003-06-11  Frank Koormann  <[email protected]>
3432    
3433            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
3434            update.
3435    
3436    2003-06-11  Frank Koormann  <[email protected]>
3437    
3438            * Thuban/Lib/fileutil.py (get_application_dir): New function to
3439            determine the absolute .thuban/thuban directory under
3440            "posix" (os.expanduser) and "nt" (read AppData registry key).
3441    
3442            * Thuban/Model/resource.py: Use get_application_dir
3443    
3444            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
3445            Use get_application_dir.
3446    
3447    2003-06-10  Bernhard Herzog  <[email protected]>
3448    
3449            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
3450            the messages MAP_LAYERS_REMOVED messages
3451            (LayerTableFrame.OnClose): Unsubscribe from it.
3452            (LayerTableFrame.map_layers_removed): New. Receiver for
3453            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
3454            dialog is showing is removed.
3455    
3456    2003-06-10  Bernhard Herzog  <[email protected]>
3457    
3458            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
3459            of the receivers list so that unsubscribing in a receiver doesn't
3460            modify it while iterating over it.
3461    
3462            * test/test_connector.py
3463            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
3464            unsubscribing in a receiver works correctly. See docstring for
3465            details
3466    
3467    2003-06-10  Bernhard Herzog  <[email protected]>
3468    
3469            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
3470            message.
3471    
3472            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
3473            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
3474            LAYER_CHANGED will still be sent if the classification changes.
3475    
3476            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
3477            parameter so we can subscribe to some of its messages
3478            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
3479            and the layer's LAYER_SHAPESTORE_REPLACED
3480            (Classifier.unsubscribe_messages): New. Unsubscribe from message
3481            subscribed to in __init__
3482            (Classifier.map_layers_removed)
3483            (Classifier.layer_shapestore_replaced): receivers for the messages
3484            subscribed to in __init__. Unsubscribe and close the dialog
3485    
3486            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
3487            the map to the Classifier dialog
3488    
3489            * test/test_layer.py (SetShapeStoreTests): Derive from
3490            SubscriberMixin as well so we can test messages
3491            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
3492            messages
3493            (SetShapeStoreTests.tearDown): Clear the messages again
3494            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
3495            for the modified flag too
3496            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
3497            to check whether SetShapeStore sets the modified flag
3498            (SetShapeStoreTests.test_set_shape_store_different_field_name)
3499            (SetShapeStoreTests.test_set_shape_store_same_field)
3500            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
3501            Add tests for the messages. This checks both the new
3502            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
3503    
3504    2003-06-06  Jan-Oliver Wagner <[email protected]>
3505    
3506            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
3507            the menu items.
3508    
3509    2003-06-05  Frank Koormann  <[email protected]>
3510    
3511            * Thuban/UI/identifyview.py (IdentifyView.__init__):
3512            Layout reimplemented without panel. Make life easier to fit the list
3513            in the dialog.
3514    
3515    2003-06-05  Frank Koormann  <[email protected]>
3516    
3517            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
3518            once on initialisation (Former implementation resulted in multiple
3519            entries for each projection).
3520            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
3521            if set, select the projection found under the specified name. This
3522            overwrites any other selection estimate.
3523            Removed projchoice filling from this method.
3524            (ProjFrame._OnSave, ProjFrame._OnAddToList):
3525            Updated call of ProjFrame.__FillAvailList
3526            (LCCPanel._DoLayout): Moved parameter controls in more common order.
3527    
3528            * Resources/Projections/defaults.proj: Extended defaults representing
3529            various common European projections.
3530    
3531    2003-06-05  Frank Koormann  <[email protected]>
3532    
3533            * Thuban/UI/identifyview.py (IdentifyView.__init__):
3534            Use ListCtrl instead of GridCtrl
3535    
3536            * Thuban/Model/resource.py:
3537            Guess location of .thuban directory from tempdir parent directory.
3538    
3539            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
3540            Guess location of .thuban directory from tempdir parent directory.
3541    
3542    2003-06-04  Bernhard Herzog  <[email protected]>
3543    
3544            Do not cache the values returned by the tree widget's
3545            GetFirstChild and GetNextChild methods because it led to lots of
3546            segfaults. The new way requires more brute force but is more
3547            reliable.
3548    
3549            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
3550            variable layer2id
3551            (LegendTree.find_layer): New method to do with brute force what
3552            layer2id tried to accomplish
3553            (LegendTree._OnMsgLayerChanged)
3554            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
3555            Use find_layer instead of layer2id
3556            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
3557            update layer2id anymore
3558            (LegendTree._OnMsgMapLayersRemoved)
3559            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
3560    
3561    2003-06-03  Thomas Koester  <[email protected]>
3562    
3563            * Thuban/Model/classgen.py (GenQuantiles0): New function.
3564    
3565    2003-06-02  Bernhard Herzog  <[email protected]>
3566    
3567            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
3568            New commands.
3569            (main_menu): Add the new commands.
3570            (MainWindow.TableRename): New. Implementation of the table_rename
3571            command.
3572            (MainWindow.RenameLayer): New. Implementation of the layer_rename
3573            command.
3574    
3575            * Thuban/Model/session.py (Session.AddTable): call self.changed to
3576            set the modified flag
3577    
3578            * test/test_session.py (TestSessionSimple.test_add_table): Test
3579            whether the modified flag is set properly
3580    
3581            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
3582            instead of issue so that the modified flags get updated.
3583    
3584            * test/test_base.py (SomeTitledObject): Derive from Modifiable
3585            instead of Publisher to reflect reality better and to accomodate
3586            the fact that SetTitle now calls changed instead of issue
3587    
3588    2003-06-02  Bernhard Herzog  <[email protected]>
3589    
3590            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
3591            acquisition has to happen before the try in a try-finally.
3592    
3593    2003-06-02  Bernhard Herzog  <[email protected]>
3594    
3595            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
3596            possible that a layer is removed that is not currently selected in
3597            the legend so don't check for this.
3598    
3599    2003-05-30  Bernhard Herzog  <[email protected]>
3600    
3601            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
3602            variables to None that have direct or indirect references to
3603            shapefiles or dbf files to make sure that they do go away and the
3604            files are closed.
3605    
3606    2003-05-30  Bernhard Herzog  <[email protected]>
3607    
3608            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
3609            availImgListIndices when a new image list is created
3610            
3611    2003-05-30  Bernhard Herzog  <[email protected]>
3612    
3613            * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
3614            changing_selection to indicate whether the LegendTree code itself
3615            is currently changing the selection
3616            (LegendTree.normalize_selection): New method to normalize the
3617            selection by selecting the layer item even if the user clicked on
3618            the classification.
3619            (LegendTree._OnSelChanged): normalize the selection. This works
3620            around a bug in wx which doesn't keep track of the selection
3621            properly when subtrees are deleted.
3622    
3623    2003-05-30  Bernhard Herzog  <[email protected]>
3624    
3625            * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
3626            maximum and minimum scale factors.
3627    
3628            * test/test_classgen.py (ClassGenTest.test): Update to reflect the
3629            changes in classgen.py
3630    
3631    2003-05-30  Jonathan Coles   <[email protected]>
3632    
3633            * Thuban/Model/classgen.py: Remove ClassGenerator class but make
3634            all the methods functions. Fixes RTBug #1903.
3635    
3636            * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
3637            to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
3638            RTBug #1907.
3639    
3640            * Thuban/UI/classgen.py: Use classgen functions that were part
3641            of the ClassGenerator class. Put try/finally blocks around
3642            code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
3643            RTBug #1904.
3644    
3645            * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
3646    
3647            * Thuban/UI/legend.py: The legend was cleared and repopulated any
3648            time something changed which caused some state to be lost such
3649            as which children were expanded or collapsed. Fixes RTBug #1901.
3650            (LegendTree._OnMsgMapLayersAdded): Add only new layers.
3651            (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
3652            the legend but not in the map.
3653            (LegendTree.__FillTree): Move main functionality out into smaller
3654            methods that can be used by other methods.
3655            (LegendTree.__FillTreeLayer): Reuse old slots in the image list
3656            if they are available.
3657            (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
3658            that we override the wxTreeCtrl method. Iterate over children
3659            and call __RemoveLayer.
3660            (LegendTree.__AddLayer): New. Add a new layer to the legend.
3661            (LegendTree.__RemoveLayer): Remove a layer from the legend.
3662            (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
3663            Should only be called with the id of a layer branch.
3664            (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
3665            Returns the root item or creates one if necessary.
3666    
3667            * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
3668            ProjectRasterFile with tuple arguments instead of strings.
3669    
3670            * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
3671            with try/finally. Fixes RTBug #1904.
3672    
3673            * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
3674            with try/finally. Fixes RTBug #1904.
3675            (MapCanvas.FitSelectedToWindow): If a single point is selected
3676            simply center it on the display. Fixes RTBug #1849.
3677    
3678            * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
3679            to be compiled as a standalone app. Now the code can only be
3680            called from Python which simplifies the parameter passing.
3681            (ProjectRasterFile): Handle Python arguments. Remove code that
3682            checks for a destination dataset. Add more clean up code.
3683    
3684            * test/test_map.py (TestMapWithContents.test_raise_layer_top,
3685            TestMapWithContents.test_lower_layer_bottom):
3686            Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
3687            Fixes RTBug #1907.
3688    
3689            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
3690            extent to the map when the legend is toggled. Fixes RTBug #1881.
3691    
3692    2003-05-29  Jan-Oliver Wagner <[email protected]>
3693    
3694            * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
3695            unsubscribes all that is subcribed in __init__.
3696    
3697    2003-05-28  Bernhard Herzog  <[email protected]>
3698    
3699            * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
3700            (MainWindow.CanDuplicateLayer): New methods to implement the
3701            Layer/Duplicate command.
3702            (layer_duplicate command): New.
3703            (main_menu): Add layer_duplicate to the Layer menu.
3704    
3705    2003-05-28  Bernhard Herzog  <[email protected]>
3706    
3707            * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
3708            renderer so that NULL/None values get displayed differently (by a
3709            gray rectangle).
3710            (TableGrid.__init__): Override the default renderers
3711    
3712    2003-05-28  Bernhard Herzog  <[email protected]>
3713    
3714            * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
3715            classification to "None" if the type of the field has changed.
3716    
3717            * test/test_layer.py (SetShapeStoreTests): New. Class with a few
3718            test for the Layer.SetShapeStore method
3719    
3720    2003-05-28  Jan-Oliver Wagner <[email protected]>
3721    
3722            * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
3723            does not necessarily have a filename).
3724    
3725    2003-05-28  Jan-Oliver Wagner <[email protected]>
3726    
3727            * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
3728            sort the selection list for the dialog.
3729    
3730    2003-05-28  Frank Koormann  <[email protected]>
3731    
3732            * extensions/thuban/wxproj.cpp
3733            (project_point): Removed cast to int for projected point coordinates.
3734            (shape_centroid): Return last point if all polygon vertices fall
3735            to one point.
3736    
3737    2003-05-28  Bernhard Herzog  <[email protected]>
3738    
3739            * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
3740            with layers that don't have shapestores, i.e. raster layers.
3741    
3742    2003-05-28  Bernhard Herzog  <[email protected]>
3743    
3744            * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
3745            when determining the title from the filename.
3746    
3747            * test/test_dbf_table.py (TestDBFTable.test_title): Update to
3748            reflect changes in the way the title is derived from the filename
3749    
3750    2003-05-28  Frank Koormann  <[email protected]>
3751    
3752            * Thuban/UI/mainwindow.py (MainWindow.TableShow):
3753            Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
3754    
3755    2003-05-27  Bernhard Herzog  <[email protected]>
3756    
3757            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
3758            delegate SelectedLayer.
3759            (MainWindow.LayerUnjoinTable): Implement.
3760            (_can_unjoin): New. Helper function for the sensitivity of the
3761            layer/unjoin command.
3762    
3763            * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
3764            (DerivedShapeStore.OrigShapeStore): New. Return the original
3765            shapestore. Used to figure out how to unjoin.
3766            (DerivedShapeStore.Shapefile): Fix a typo.
3767    
3768    2003-05-27  Bernhard Herzog  <[email protected]>
3769    
3770            * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
3771            well
3772            (JoinDialog.__init__): Use the layer parameter and only build the
3773            left choice when a layer is given
3774            (JoinDialog.OnJoin): Handle layer joins as well
3775            (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
3776            that the user selects the "Select..." item. The sensitivitly
3777            updating is now in update_sensitivity
3778            (JoinDialog.y): New method to refactor the sensitivity update of
3779            the join button into its own method.
3780    
3781            * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
3782    
3783    2003-05-27  Bernhard Herzog  <[email protected]>
3784    
3785            * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
3786            iff there are unreferenced tables in the session
3787    
3788    2003-05-27  Bernhard Herzog  <[email protected]>
3789    
3790            * Thuban/Model/messages.py (TABLE_REMOVED): New message.
3791    
3792            * Thuban/Model/session.py (Session.UnreferencedTables): New method
3793            to return tables that are not referenced by other tables or shape
3794            stores and can be removed.
3795            (Session.RemoveTable): Issue a TABLE_REMOVED message after
3796            removing the table
3797    
3798            * Thuban/UI/mainwindow.py: Remove unused imports
3799            (MainWindow.TableClose): Implement.
3800    
3801            * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
3802            messages so that the frame will be automatically closed when a new
3803            session is opened or the table is removed.
3804            (TableFrame.OnClose): Unsubscribe the Subscriptions made in
3805            __init__
3806            (TableFrame.close_on_session_replaced)
3807            (TableFrame.close_on_table_removed): New. Subscribers that close
3808            the window
3809    
3810            * test/test_session.py (TestSessionMessages.test_remove_table)
3811            (TestSessionSimple.test_remove_table): Move the test to
3812            TestSessionSimple and add test for the TABLE_REMOVED message
3813            (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
3814            (TestSessionSimple.test_unreferenced_tables) New. Test for the
3815            UnreferencedTables method.
3816            (UnreferencedTablesTests): New. Class with some more sophisticated
3817            tests for UnreferencedTables.
3818    
3819    2003-05-27  Frank Koormann  <[email protected]>
3820    
3821            * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
3822            display has some unwanted side effects. Removed again.
3823    
3824    2003-05-27  Frank Koormann  <[email protected]>
3825    
3826            * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
3827    
3828            * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
3829    
3830    2003-05-27  Jan-Oliver Wagner <[email protected]>
3831    
3832            * test/test_menu.py (MenuTest.test): Added test for
3833            Menu.RemoveItem().
3834    
3835            * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
3836            the menu.
3837    
3838    2003-05-27  Frank Koormann  <[email protected]>
3839            
3840            Nonmodal dialogs without parent (i.e. they can fall behind the main
3841            window)
3842    
3843            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
3844            all dialogs in the dialogs dictionary and the canvas.
3845    
3846            * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
3847            parent, i.e. can fall behind other windows.
3848            (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
3849            dictionary before removing it.
3850    
3851            * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
3852    
3853            * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
3854            * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
3855            * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
3856    
3857    2003-05-27  Bernhard Herzog  <[email protected]>
3858    
3859            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
3860            tableview dialog
3861            (MainWindow.TableShow): Use ShowTableView to open the dialogs.
3862            Also, don't use the table's titles as the dialog names. The titles
3863            aren't guaranteed to be unique.
3864            (MainWindow.TableOpen): Open a table view dialog after opening the
3865            table
3866    
3867    2003-05-27  Bernhard Herzog  <[email protected]>
3868    
3869            * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
3870            effect can be achieved by simply closing the window showing the
3871            table.
3872            (MainWindow.TableHide): Removed.
3873            (main_menu): Removed "table_hide"
3874    
3875    2003-05-27  Frank Koormann  <[email protected]>
3876    
3877            Fix legend tree display problems under Win32
3878    
3879            * Thuban/UI/legend.py:  BMP_SIZE_W = 15
3880            (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
3881            (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
3882    
3883            * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
3884    
3885    2003-05-27  Jan-Oliver Wagner <[email protected]>
3886    
3887            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
3888            'after' now allows to insert separators almost anywhere in the menu.
3889    
3890    2003-05-27  Frank Koormann  <[email protected]>
3891    
3892            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
3893            "S" of selection box label to hint on hot key (Alt-S). Works under
3894            Win32 but is ignored under GTK.
3895    
3896    2003-05-26  Frank Koormann  <[email protected]>
3897    
3898            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
3899            Center Choices.
3900    
3901    2003-05-26  Bernhard Herzog  <[email protected]>
3902    
3903            Remove the Precision methods again. They're too DBF specific to be
3904            part of the table interface and they're only used in table_to_dbf
3905            anyway.
3906            
3907            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
3908            fixed precision of 12 for doubles.
3909            (TransientTableBase.Precision): Removed
3910            (AutoTransientTable.Width): Delegate to self.table.
3911    
3912            * Thuban/Model/table.py (DBFTable.Precision)
3913            (MemoryTable.Precision): Removed.
3914            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
3915            (table_to_dbf): Use a fixed precision of 12 for floats unless the
3916            column object specifies something else.
3917    
3918            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
3919            test for table_to_dbf
3920    
3921    2003-05-26  Bernhard Herzog  <[email protected]>
3922    
3923            * test/test_transientdb.py
3924            (TestTransientTable.run_iceland_political_tests): Fix a comment.
3925    
3926    2003-05-26  Bernhard Herzog  <[email protected]>
3927    
3928            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
3929            implementation. Mark parts of the file format strings for
3930            localization.
3931    
3932            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
3933            file and add the table to the tables managed by the session
3934    
3935            * test/test_session.py (TestSessionSimple.test_open_table_file):
3936            New. test case for OpenTableFile
3937    
3938    2003-05-26  Jan-Oliver Wagner <[email protected]>
3939    
3940            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
3941            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
3942            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
3943            Replace the true/false of wxWindows by True/False of Python 2.2.1.
3944    
3945    2003-05-26  Jan-Oliver Wagner <[email protected]>
3946    
3947            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
3948            already a selection present, update the grid accordingly.
3949    
3950            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
3951            resizeable and increase its initial size.
3952    
3953    2003-05-26  Frank Koormann  <[email protected]>
3954    
3955            Table export functionality
3956    
3957            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
3958            Return width (in characters) for a column.
3959            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
3960            (table_to_dbf): Write table to dbf file.
3961            (table_to_csv): Write table to csv file.
3962    
3963            * Thuban/Model/transientdb.py (TransientTableBase.Width,
3964            TransientTableBase.Precision): Return column width and precision.
3965    
3966            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
3967            or table_to_csv depending on file selection.
3968    
3969            * test/test_dbf_table.py:
3970            Test table_to_dbf (extension of former part of test).
3971    
3972            * test/test_csv_table.py:
3973            Test table_to_csv.
3974    
3975    2003-05-23  Jan-Oliver Wagner <[email protected]>
3976    
3977            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
3978            Use QueryTableFrame instead of TableFrame.
3979    
3980            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
3981            table window with 'Layer Table:' instead of 'Table:'.
3982    
3983    2003-05-23  Jan-Oliver Wagner <[email protected]>
3984    
3985            Give all tables a title via mix-in TitledObject.LayerShowTable
3986    
3987            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
3988            only if it exists.
3989    
3990            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
3991            and call its init-method with a default title. Remove Title() method.
3992    
3993            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
3994            AutoTransientTable): mix-in TitledObject and call its init-method with
3995            a default title. Remove Title() method.
3996    
3997    2003-05-23  Bernhard Herzog  <[email protected]>
3998    
3999            * Thuban/Model/session.py (Session.AddShapeStore): Define
4000            AddShapeStore analogously to AddTable.
4001    
4002            * test/test_session.py (TestSessionSimple.test_add_shapestore):
4003            New. Test for AddShapeStore
4004    
4005    2003-05-23  Jan-Oliver Wagner <[email protected]>
4006    
4007            Introducing QueryTableFrame and a very coarse ShowTable implementation.
4008    
4009            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
4010            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
4011            The latter implements the selection GUI without dependency on a layer.
4012            LayerTableFrame now is derived from QueryTableFrame and connects
4013            to a layer.
4014    
4015            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
4016            implementation that still needs work.
4017    
4018            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
4019    
4020    2003-05-22  Frank Koormann  <[email protected]>
4021    
4022            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
4023            Added "outer_join = False" as optional parameter.
4024            (TransientJoinedTable.create): If outer join is true, perform a
4025            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
4026            the left table. Records not matching are filled with 0 / None.
4027    
4028            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
4029            (JoinDialog.OnJoin): Consider outer join check box.
4030    
4031    2003-05-22  Bernhard Herzog  <[email protected]>
4032    
4033            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
4034            somewhat safer way. Storing the traceback in a local variable can
4035            lead to memory leaks
4036    
4037    2003-05-22  Bernhard Herzog  <[email protected]>
4038    
4039            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
4040            the wxMessageDialog's Destroy() method.
4041    
4042    2003-05-22  Frank Koormann  <[email protected]>
4043    
4044            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
4045            TransientTable.Title()
4046    
4047    2003-05-22  Frank Koormann  <[email protected]>
4048    
4049            Join Dialog, initial version.
4050    
4051            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
4052    
4053            * Thuban/UI/join.py (JoinDialog): Functional implementation of
4054            former framework. Renamed Table1/Table2 to LeftTable/RightTable
4055            in all occurences.
4056    
4057            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
4058            Typo fixed.
4059    
4060    2003-05-22  Bernhard Herzog  <[email protected]>
4061    
4062            Give the tables titles so that the GUI can display more meaningful
4063            names. For now the titles are fixed but depend on e.g. filenames
4064            or the titles of the joined tables.
4065    
4066            * Thuban/Model/transientdb.py (TransientTable.Title)
4067            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
4068    
4069            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
4070    
4071            * test/test_transientdb.py
4072            (TestTransientTable.test_auto_transient_table_title): New. Test
4073            for the Title method
4074            (TestTransientTable.test_transient_joined_table)
4075            (TestTransientTable.test_transient_table): Add test for the Title
4076            methods
4077    
4078            * test/test_memory_table.py (TestMemoryTable.test_title): New.
4079            Test for the Title method
4080    
4081            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
4082            the Title method
4083    
4084    2003-05-22  Bernhard Herzog  <[email protected]>
4085    
4086            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
4087            Provide a better way to destroy the layers
4088            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
4089            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
4090            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
4091            the new way to destroy the layers.
4092            (TestLayer.test_derived_store): New. Test for using a layer with a
4093            DerivedShapeStore
4094    
4095            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
4096            filename if the shape store actually has one.
4097    
4098    2003-05-22  Bernhard Herzog  <[email protected]>
4099    
4100            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
4101            for the filename
4102    
4103            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
4104            for the FileName method
4105            (TestDBFTableWriting.test_write): Fix spelling of filename
4106    
4107    2003-05-22  Thomas Koester  <[email protected]>
4108    
4109            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
4110            from SciParam that now really is immutable.
4111    
4112    2003-05-22  Frank Koormann  <[email protected]>
4113    
4114            Layer Top/Bottom placement added to legend.
4115    
4116            * Thuban/UI/legend.py
4117            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
4118            bound to tool events.
4119            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
4120            New, methods binding the event methods with the map methods.
4121    
4122            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
4123            layer at top/bottom of layer stack.
4124    
4125            * Resources/Bitmaps/top_layer.xpm: New button icon.
4126    
4127            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
4128    
4129    2003-05-22  Bernhard Herzog  <[email protected]>
4130    
4131            * Thuban/Model/session.py (Session.RemoveTable): New method to
4132            remove tables
4133    
4134            * test/test_session.py (TestSessionSimple.test_remove_table): New.
4135            Test for RemoveTable
4136    
4137    2003-05-22  Thomas Koester  <[email protected]>
4138    
4139            * Thuban/Model/classgen.py: Added short module doc string and CVS id.
4140            (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
4141    
4142    2003-05-22  Bernhard Herzog  <[email protected]>
4143    
4144            Implement a way to discover dependencies between tables and
4145            shapestores.
4146    
4147            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
4148            (TransientJoinedTable.Dependencies)
4149            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
4150            interface
4151            (TransientJoinedTable.__init__): Keep tack of the original table
4152            objects in addition to the corresponding transient tables.
4153    
4154            * Thuban/Model/table.py (DBFTable.Dependencies)
4155            (MemoryTable.Dependencies): New. Implement the dependencies
4156            interface
4157    
4158            * Thuban/Model/data.py (ShapeTable): New. Helper class for
4159            ShapefileStore
4160            (ShapefileStore.__init__): Use ShapeTable instead of
4161            AutoTransientTable
4162            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
4163            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
4164            methods for filename and type
4165            (ShapefileStore.Dependencies): New. Implement the dependencies
4166            interface
4167            (DerivedShapeStore): New class to replace SimpleStore. The main
4168            difference to SimpleStore is that it depends not on a shapefile
4169            but another shapestore which expresses the dependencies a bit
4170            better
4171            (SimpleStore.__init__): Add deprecation warning.
4172    
4173            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
4174            Test for the Dependencies method.
4175    
4176            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
4177            New. Test for the Dependencies method.
4178    
4179            * test/test_transientdb.py
4180            (TestTransientTable.test_auto_transient_table_dependencies): New.
4181            Test for the Dependencies method.
4182            (TestTransientTable.test_transient_joined_table): Add test for the
4183            Dependencies method.
4184    
4185            * test/test_session.py (TestSessionSimple.setUp)
4186            (TestSessionSimple.tearDown): New. Implement a better way to
4187            destroy the sessions.
4188            (TestSessionSimple.test_initial_state)
4189            (TestSessionSimple.test_add_table): Bind session to self.session
4190            so that it's destroyed by tearDown
4191            (TestSessionSimple.test_open_shapefile): New. Test for
4192            OpenShapefile and the object it returns
4193    
4194    2003-05-22  Bernhard Herzog  <[email protected]>
4195    
4196            * Thuban/Model/session.py (Session.AddTable): New method to
4197            register tables with the session.
4198            (Session.Tables): Return the tables registered with AddTable too.
4199    
4200            * test/test_session.py (TestSessionSimple.test_add_table): New.
4201            Test case for the AddTable method
4202    
4203    2003-05-22  Frank Koormann  <[email protected]>
4204    
4205            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
4206            lower right corner, center labels for selections, initialize controls
4207            in reasonable order for keyboard navigation.
4208    
4209            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
4210            (ProjFrame.__DoOnProjAvail): Determine position of current projection
4211            using the wxListBox.FindString() method. Still a problem (#1886)
4212    
4213            * Thuban/UI/classifier.py
4214            (Classifier.__init__, SelectPropertiesDialog.__init__)
4215    
4216            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
4217            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
4218            different classification types from here to __init__.
4219            (GenUniquePanel.__init__): Set the column width of the first field
4220            in the Field ListCtrl to the full width.
4221    
4222            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
4223            Button to 'Export'. Center Buttons in Selection Box, set Focus to
4224            Grid.
4225            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
4226            changes focus to the Selection when pressing "Alt-S".
4227    
4228            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
4229            the text if not visible. The italic font sometimes exceeds the
4230            rendering area.
4231    
4232    2003-05-21  Jonathan Coles   <[email protected]>
4233    
4234            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
4235            to OnClose so that Thuban closes correctly.
4236    
4237            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
4238            DockFrame.OnClose, not DockFrame._OnClose.
4239    
4240    2003-05-21  Jonathan Coles   <[email protected]>
4241    
4242            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
4243            references to 'inf' and use new Range __init__ to pass floats
4244            directly rather than converting them to strings first.
4245            Fixes RTBug #1876.
4246    
4247            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
4248            Use new Range ___init__ to pass floats.
4249    
4250            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
4251            filename is a valid image file. Throw IOError otherwise.
4252    
4253            * Thuban/Model/range.py: Brought over new Range from SciParam that
4254            is immutable and has an __init__ which can accept floats.
4255    
4256            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
4257            into try block. AddLayer doesn't throw any exceptions anymore.
4258            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
4259            try block.
4260    
4261            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
4262            the first item in choices. Fixes RTBug #1882.
4263    
4264            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
4265            has gone to 0 which is a serious problem. abort.
4266            (MapRenderer.draw_raster_layer): Catch IOError seperately and
4267            print the error from GDAL.
4268    
4269            * Thuban/UI/tableview.py (TableGrid.__init__): Call
4270            ToggleEventListeners to turn on listening.
4271            (TableGrid.ToggleEventListeners): New. Turns event listening on
4272            and off so as to prevent excessive messages.
4273            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
4274            to suppress excessive messages when selecting many rows.
4275            Fixes RTBug #1880.
4276    
4277            * Thuban/UI/view.py: Added checks against if scale == 0. This
4278            is a serious problem that can occur when an image without
4279            geo data is loading and causes the map projection bounds to
4280            go to infinity. Right now, the solution is to simply try
4281            to recover.
4282    
4283            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
4284            to set the MFILEReceiver attributes even if the data is NULL.
4285    
4286            * extensions/thuban/gdalwarp.cpp: Improved the error handling
4287            and passed GDAL messages back up to the Python layer. Also
4288            tried to fix some memory leaks that were present in the original
4289            utility but didn't matter because the program aborted.
4290    
4291            * test/test_range.py: Copied over tests from SciParam. Removed
4292            tests against importing. Fixes RTBug #1867.
4293    
4294    2003-05-21  Bernhard Herzog  <[email protected]>
4295    
4296            * test/test_load.py: Remove unused imports and restructure the
4297            test code
4298            (LoadSessionTest): Split into one class for each test and turn
4299            LoadSessionTest itself into the base class for all such session
4300            tests.
4301            (ClassificationTest): New base class for load tests that test
4302            classifications
4303            (TestSingleLayer, TestLayerVisibility, TestClassification)
4304            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
4305            for the individual tests
4306    
4307            * test/support.py (FileLoadTestCase.filename): New base class for
4308            file loading tests
4309    
4310    2003-05-21  Jan-Oliver Wagner <[email protected]>
4311    
4312            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
4313            Mercator' to 'UTM Zone 32' as a more convenient example.
4314            Added 'Gauss Krueger Zone 6'.
4315    
4316            * Data/iceland_sample_raster.thuban: political polygon now
4317            filled transparent to have the raster image visible at once.
4318    
4319    2003-05-21  Frank Koormann  <[email protected]>
4320    
4321            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
4322            OnClose() to keep in sync with extensions. Internally Thuban
4323            still uses "underscored" names.
4324    
4325    2003-05-20  Jonathan Coles   <[email protected]>
4326    
4327            This puts back Raster layer support. These layers support projections
4328            through the GDAL library. Currently, the CVS version is being used.
4329            There are no Debian packages available although this may change soon.
4330            A GDAL driver was extended to support writing to memory rather to
4331            files.
4332    
4333            There is still some work that needs to be done, such as some error
4334            handling when loading invalid images or when there is a problem
4335            projecting the image. This putback simply checks in the majority
4336            of the work.
4337    
4338            * setup.py: Add gdalwarp library extension.
4339    
4340            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
4341            Defaults to False, but can be overridden by subclasses if they
4342            support classification.
4343            (RasterLayer): New. Defines a new layer that represents an
4344            image.
4345    
4346            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
4347            tag handler.
4348            (SessionLoader.start_layer): Encode the filename.
4349            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
4350            New. Supports reading a rasterlayer tag.
4351    
4352            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
4353    
4354            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
4355            get a string in Latin1. If we get such as string convert it to
4356            unicode first, otherwise leave if alone before encoding.
4357            (SessionSaver.write_layer): Add support for writing both Layers
4358            and RasterLayers.
4359    
4360            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
4361            The right argument may not be a string, it could also be a Column.
4362    
4363            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
4364            Make initial window size 600x400. Fixes RTBug #1872.
4365    
4366            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
4367            the dialog is constructed so that we can support layers that
4368            do not have classifications.
4369            (Classifier._OnTry): Only build a classification if the layer
4370            supports one.
4371    
4372            * Thuban/UI/legend.py: Change all checks that a layer is an
4373            instance of Layer into checks against BaseLayer.
4374            (LegendTree.__FillTreeLayer): Only add children to a branch if
4375            the layer supports classification.
4376    
4377            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
4378            MainWindow.OpenSession): Don't proceed with an action if the
4379            user chooses Cancel when they are asked to save changes.
4380            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
4381            user to select an image file. Create a new RasterLayer and add
4382            it to the map.
4383    
4384            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
4385            for rendering RasterLayer layers.
4386            (MapRenderer.draw_raster_layer): Actually method that calls
4387            the GDALWarp python wrapper and constructs an image from the
4388            data returned.
4389    
4390            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
4391            Choices symbols to match those used in the table query method.
4392            Replace deprecated method calls on table with new method names.
4393    
4394            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
4395            how small the scale can get. This still needs more testing.
4396    
4397            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
4398            Provides a driver to output in .bmp format.
4399    
4400            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
4401            New. Provides IO routines which write to memory, rather than a file.
4402    
4403            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
4404            of the gdalwarp utility provided in GDAL. Added function calls
4405            that can be accessed from python.
4406    
4407            * Data/iceland_sample_raster.thuban: New. Sample file that uses
4408            a raster layer.
4409    
4410            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
4411            layer image data.
4412    
4413            * Doc/thuban.dtd: Added rasterlayer attribute definition.
4414    
4415            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
4416            tests associated with the raster layer code.
4417    
4418            * test/test_transientdb.py
4419            (TestTransientTable.test_auto_transient_table_query): Added a test
4420            for using a Column object as the "right" parameter to a query.
4421    
4422    2003-05-19  Frank Koormann  <[email protected]>
4423    
4424            * Thuban/version.py (get_changelog_date):
4425            Catch exceptions if ChangeLog does not exist.
4426    
4427            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
4428    
4429    2003-05-19  Frank Koormann  <[email protected]>
4430    
4431            Extended version information for Thuban
4432    
4433            * Thuban/version.py: New, version information for Thuban: Last
4434            modification date and last ChangeLog entry date.
4435    
4436            * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
4437            information: Display Thuban, wxPython and Python version.
4438    
4439    2003-05-16  Bernhard Herzog  <[email protected]>
4440    
4441            * Thuban/Model/save.py: Remove some unused imports including the
4442            __future__ import for nested_scopes as Thuban relies on Python 2.2
4443            now.
4444            (XMLWriter.encode): Remove the special case for a None argument.
4445            In the saver encode is always called with a string argument.
4446    
4447    2003-05-16  Bernhard Herzog  <[email protected]>
4448    
4449            * Thuban/UI/__init__.py: Remove the work-around for the locale bug
4450            in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
4451            of the bug was that e.g. float("1.2") would fail. Thuban now
4452            requires 2.4.x.
4453            
4454    2003-05-16  Frank Koormann   <[email protected]>
4455    
4456            Printing enhancement and WMF export (under Win32)
4457    
4458            * Thuban/UI/renderer.py (ExportRenderer): New, derived from
4459            ScreenRenderer. Renders Map, Legend and Scalebar for export.
4460            (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
4461            PrintRender.
4462    
4463            * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
4464            to fullfil information needed for PrinterRenderer.
4465            (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
4466            (MapCanvas.Print): Adapted to new MapPrintout.
4467            (OutputTransform): General calculations to transform from canvas
4468            coordinates to export/printing devices.
4469    
4470            * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
4471            new method_command to call ExportMap, with platform dependency (only
4472            __WXMSW__)
4473      
4474            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
4475            of scalebar drawing area as new parameters.
4476            
4477            * Thuban/Model/scalebar.py (roundInterval): round long instead of int
4478    
4479            * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
4480            Update to extended scalebar.DrawScalebar header.
4481    
4482            * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
4483    
4484            * test/test_scalebar.py: Made test executable as standalone.
4485    
4486    2003-05-16  Bernhard Herzog  <[email protected]>
4487    
4488            * Thuban/Model/table.py (Table): Remove this compatibility alias
4489            for DBFTable.
4490    
4491            * test/test_table.py: Import DBFTable as Table because that alias
4492            doesn't exist anymore.
4493    
4494            * Thuban/UI/classgen.py: Remove some unused imports
4495    
4496    2003-05-14  Jonathan Coles   <[email protected]>
4497    
4498            * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
4499            Fix docstring.
4500            (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
4501            (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
4502            values of the supplied range to determine the beginning and end
4503            bounds of the generated classes.
4504    
4505            * Thuban/Model/range.py (Range.number_re): Now accepts floats that
4506            do not have a leading 0 (.5 is now accepted as well as 0.5).
4507    
4508            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
4509            call to ClassGenerator.GenUniformDistribution.
4510    
4511            * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
4512            layout bug with the 'Projection' label.
4513    
4514            * test/support.py (FloatTestCase): New. Needed for the Range tests.
4515    
4516            * test/test_range.py: New. Imported from SciParam.
4517    
4518    2003-05-12  Jonathan Coles   <[email protected]>
4519    
4520            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
4521            to table.UniqueValues() with calls that retrieve all the values
4522            from the table. This will need to be replaced by a method on table
4523            which can simply return the list (perhaps more efficiently).
4524    
4525    2003-05-12  Jonathan Coles   <[email protected]>
4526    
4527            The return value of ClassGenerator.CalculateQuantiles has changed.
4528            Refer to the documentation for details.
4529    
4530            * test/test_classgen.py: Modified Quantile tests to use the
4531            new return values.
4532    
4533            * Thuban/Model/classgen.py
4534            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
4535            use new return values from CalculateQuantiles to produce the correct
4536            range bounds in the Classification.
4537            (ClassGenerator.CalculateQuantiles): Add more comments describing
4538            the return values and parameters. Make minor adjustments to improve
4539            the legibility of the code. Fix problem with adjusted not being set
4540            in most cases.
4541    
4542    2003-05-12  Frank Koormann <[email protected]>
4543            
4544            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
4545            and latin1. Fixes #1851 finally.
4546    
4547    2003-05-09  Jonathan Coles   <[email protected]>
4548    
4549            * test/test_classgen.py: New. Tests the Quantile algorithm.
4550    
4551            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
4552            Clean up debugging statement, add comments, fix a small bug in the
4553            returned adjusted percentiles.
4554            
4555    2003-05-09  Jonathan Coles   <[email protected]>
4556    
4557            Introduces Range class from SciParam into the ClassGroupRange class,
4558            and such ranges can now be saved and loaded from disk.
4559    
4560            Quantiles are now available in the Classification Generator.
4561    
4562            Initial support for building Queries on a table. Doesn't do anything
4563            but run some tests.
4564    
4565            * Thuban/Model/classification.py: Explicit imports.
4566            (ClassGroupRange): Use the Range class to store the underlying
4567            range information. The interface remains the same, except for
4568            GetRange(), and you can also supply a Range object as the min
4569            parameter to SetRange or __init__.
4570    
4571            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
4572            string appropriately for use in Thuban. Fixes RTbug #1851.
4573            (SessionLoader.end_projection): Handle the context of the
4574            projection tag a bit better by looking at what objects are not
4575            None. There was an assumption that a projection tag for a map
4576            could occur before any layers.
4577            (SessionLoader.start_clrange): Provide backward compatibility for
4578            reading min/max values as well as the new range parameter.
4579    
4580            * Thuban/Model/map.py: Explicit imports.
4581    
4582            * Thuban/Model/resource.py: Import _.
4583            (ProjFileSaver.write): write header using projfile.dtd.
4584    
4585            * Thuban/Model/save.py: Explicit imports.
4586            (XMLWriter.encode): New. Encode the given string from a format
4587            used by Thuban into UTF-8. Fixes RTbug #1851.
4588    
4589            * Thuban/UI/classgen.py: Explicit imports.
4590            (ClassGenDialog.__init__): Clean up the code and add support
4591            for Quantiles.
4592            (ClassGenDialog.OnOK): Add support for Quantiles.
4593            (GenQuantilesPanel): New. Input panel for Quantiles.
4594            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
4595            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
4596    
4597            * Thuban/Model/classgen.py: New. Contains all the classes named above.
4598    
4599            * Thuban/UI/classifier.py: Explicit imports.
4600            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
4601            ClassTable.SetValueAsCustom): Reworked to use new Range class.
4602    
4603            * Thuban/UI/legend.py: Explicit imports.
4604    
4605            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
4606            a Table menu and associated method calls.
4607            (MainWindow.choose_color): Removed. No longer needed.
4608    
4609            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
4610            should be disabled if no projection is selected in the available
4611            list.
4612    
4613            * Thuban/UI/renderer.py: Explicit imports.
4614    
4615            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
4616            with correctly selecting the rows and issuing the right events.
4617            Be sure to call Skip() to allow the grid to do some of its own
4618            handling which allows the rows to actually be selected.
4619            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
4620            selecting multiple shapes.
4621            (LayerTableFrame): Support for building Queries.
4622            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
4623    
4624            * Thuban/UI/tree.py: Explicit imports.
4625    
4626            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
4627            table view can call it.
4628    
4629            * test/test_classification.py: Explicit imports.
4630            (TestClassification.test_ClassGroupRange): Fix test for new
4631            Range class.
4632    
4633            * Doc/thuban.dtd: Add range parameter for clrange.
4634    
4635            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
4636            object in ClassGroupRange, and also uesd for inputting ranges in
4637            the classifer table and elsewhere.
4638    
4639            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
4640            yet.
4641    
4642    2003-05-09  Frank Koormann <[email protected]>
4643    
4644            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
4645    
4646    2003-05-08  Frank Koormann <[email protected]>
4647    
4648            Coding style updates
4649    
4650            * test/test_scalebar.py: Replaced tab indentation by spaces.
4651    
4652            * Thuban/UI/scalebar.py: Explicit imports.
4653    
4654    2003-05-08  Frank Koormann <[email protected]>
4655    
4656            * Thuban/UI/scalebar.py
4657            (ScaleBar.DrawScalebar): Format string bug fixed.
4658    
4659    2003-05-08  Frank Koormann <[email protected]>
4660    
4661            Reorganization of scalebar component (no wx in Thuban/Model)
4662    
4663            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
4664            (deriveInterval):
4665            Calculate scalebar interval and unit which fits in width for scale.
4666            (roundInterval): Round float.
4667    
4668            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
4669    
4670            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
4671    
4672            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
4673    
4674    2003-05-08  Frank Koormann <[email protected]>
4675    
4676            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
4677            Initialize ScaleBar with canvas.map
4678    
4679            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
4680            round intervals to display smarter lengths
4681            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
4682            layer. If the maps has no projection applied grey the scalebar.
4683    
4684    2003-05-07  Frank Koormann <[email protected]>
4685            
4686            Basic Scalebar features added.
4687    
4688            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
4689    
4690            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
4691            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
4692            and the renderer.
4693    
4694            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
4695    
4696            * Thuban/UI/messages.py: SCALE_CHANGED added.
4697    
4698    2003-05-07  Bernhard Herzog  <[email protected]>
4699    
4700            * Thuban/Model/session.py (Session.__init__): New instance
4701            variable shapestores to hold a list of all open shapestore objects
4702            (Session.ShapeStores): New. Accessor method for the shapestores
4703            list.
4704            (Session._add_shapestore, Session._clean_weak_store_refs): New.
4705            Internal methods to maintain the shapestores list.
4706            (Session.Tables): New. Return all tables open in the session.
4707            (Session.OpenShapefile): Insert the new ShapeStore into the
4708            shapestores list.
4709    
4710            * test/test_session.py (TestSessionSimple.test_initial_state): Add
4711            tests for ShapeStores and Tables
4712            (TestSessionWithContent.test_shape_stores)
4713            (TestSessionWithContent.test_tables): New. Test cases for
4714            ShapeStores and Tables
4715    
4716    2003-05-07  Bernhard Herzog  <[email protected]>
4717    
4718            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
4719            Add comments about the optimizations used.
4720            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
4721            Implement the ReadValue table interface method.
4722    
4723            * test/test_transientdb.py
4724            (TestTransientTable.run_iceland_political_tests)
4725            (TestTransientTable.test_transient_joined_table): Add tests for
4726            ReadValue
4727    
4728    2003-05-07  Frank Koormann <[email protected]>
4729    
4730            * Resources/Bitmaps/fulllayerextent.xpm,
4731            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
4732            new icons.
4733    
4734    2003-05-06  Bernhard Herzog  <[email protected]>
4735    
4736            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
4737            New. Simply delegate to the transient table's version.
4738    
4739            * test/test_transientdb.py
4740            (TestTransientTable.test_auto_transient_table_query): New. Test
4741            case for AutoTransientTable's SimpleQuery
4742    
4743    2003-05-06  Bernhard Herzog  <[email protected]>
4744    
4745            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
4746            Implement a simple query method for the query dialog
4747            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
4748            the row index or shapeid.
4749            (TransientTable.create): Insert the right value of the row index
4750            (TransientJoinedTable.create): Copy the row index of the left
4751            table to the joined result table
4752    
4753            * test/test_transientdb.py
4754            (TestTransientTable.test_transient_table_read_twice): Fix
4755            doc-string
4756            (TestTransientTable.test_transient_table_query): New. Test for the
4757            SimpleQuery method
4758    
4759    2003-05-06  Bernhard Herzog  <[email protected]>
4760    
4761            Convert all table users to use the new table interface. This only
4762            covers Thuban itself, not GREAT-ER or other applications built on
4763            Thuban yet, so the compatibility interface stays in place for the
4764            time being but it now issues DeprecationWarnings.
4765    
4766            Finally, the new Table interface has a new method, HasColumn.
4767    
4768            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
4769            issue deprecation warnings when they're. The warnings refer to the
4770            caller of the method.
4771            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
4772            for the deprecation warnings
4773    
4774            * test/test_table.py: Ignore the deprecation warnings for the old
4775            table in the tests in this module. The purpose of the tests is to
4776            test the old interface, after all.
4777    
4778            * test/test_transientdb.py
4779            (TestTransientTable.run_iceland_political_tests): Use the
4780            constants for the types. Add a test for HasColumn
4781            (TestTransientTable.test_transient_joined_table): Adapt to new
4782            table interface. Add a test for HasColumn
4783            (TestTransientTable.test_transient_table_read_twice): Adapt to new
4784            table interface
4785    
4786            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
4787            Adapt to new table interface
4788    
4789            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
4790            new table interface
4791    
4792            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
4793            (RecordTable.SetTable): Adapt to new table interface
4794    
4795            * Thuban/UI/classifier.py (Classifier.__init__)
4796            (Classifier.__init__): Adapt to new table interface
4797    
4798            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
4799            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
4800            to new table interface
4801    
4802            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
4803            (AutoTransientTable.HasColumn): Implement the new table interface
4804            method
4805            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
4806            (AutoTransientTable.UniqueValues): Adapt to new table interface
4807    
4808            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
4809            Adapt to new table interface
4810    
4811            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
4812            simplify opening shapefiles a bit easier.
4813            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
4814            (TestLayer.test_point_layer): Use the new helper method
4815            (TestLayer.test_get_field_type): New. Test for the GetFieldType
4816            method
4817    
4818            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
4819            the new table method
4820    
4821            * test/test_memory_table.py (TestMemoryTable.test_has_column):
4822            Test for the new table method HasColumn
4823    
4824    2003-05-06  Jonathan Coles   <[email protected]>
4825    
4826            Addresses the "Selection Extent" wish of RTbug #1787.
4827    
4828            * Resources/Bitmaps/fulllayerextent.xpm,
4829            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
4830            extent. These are just place holders for the real bitmaps.
4831    
4832            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
4833            calculate the bounding box once (the first time compute_bbox() is
4834            called).
4835            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
4836            the bounding box for the shapes in lat/long coordinates.
4837    
4838            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
4839            option.
4840            (MainWindow.has_selected_shapes): New. Returns true if there are
4841            any selected shapes.
4842            (MainWindow.FullSelectionExtent): New. Calls
4843            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
4844            (_has_selected_shapes): New. Returns true if there are any
4845            selected shapes.
4846    
4847            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
4848            true if there are any selected shapes.
4849    
4850            * Thuban/UI/view.py (MapCanvas): Added delegated method
4851            HasSelectedShapes.
4852            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
4853            shapes on the canvas using the map projection (if any).
4854    
4855            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
4856            for Layer.ShapesBoundingBox().
4857    
4858    2003-05-06  Bernhard Herzog  <[email protected]>
4859    
4860            * Resources/Projections/defaults.proj: Fix spelling of Mercator
4861    
4862    2003-05-05  Jonathan Coles   <[email protected]>
4863    
4864            Addresses the "Full Layer Extent" wish of RTbug #1787.
4865    
4866            * Resources/Projections/defaults.proj: Added UK National Grid.
4867    
4868            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
4869            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
4870            when the user selects the menu option.
4871    
4872            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
4873            scales the given layer on the canvas using the map projection.
4874    
4875    2003-05-05  Bernhard Herzog  <[email protected]>
4876    
4877            Convert the table implementations to a new table interface. All
4878            tables use a common mixin class to provide backwards compatibility
4879            until all table users have been updated.
4880    
4881            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
4882            provide backwards compatibility for table classes implementing the
4883            new interface
4884            (DBFTable, MemoryTable): Implement the new table interface. Use
4885            OldTableInterfaceMixin as base for compatibility
4886            (DBFColumn, MemoryColumn): New. Column description for DBFTable
4887            and MemoryTable resp.
4888    
4889            * test/test_dbf_table.py: New. Test cases for the DBFTable with
4890            the new table interface.
4891    
4892            * test/test_memory_table.py: New. Test cases for the MemoryTable
4893            with the new table interface.
4894    
4895            * test/test_table.py: Document the all tests in this file as only
4896            for backwards compatibility. The equivalent tests for the new
4897            interface are in test_memory_table.py and test_dbf_table.py
4898            (MemoryTableTest.test_read): field_info should be returning tuples
4899            with four items
4900            (MemoryTableTest.test_write): Make doc-string a more precise.
4901    
4902            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
4903            table interface. Derive from from OldTableInterfaceMixin for
4904            compatibility.
4905            (TransientTableBase.create): New intance variable column_map to
4906            map from names and indices to column objects
4907            (TransientTable.create): Use the new table interface of the input
4908            table
4909            (AutoTransientTable): Convert to new table interface. Derive from
4910            from OldTableInterfaceMixin for compatibility.
4911            (AutoTransientTable.write_record): Removed. It's not implemented
4912            yet and we still have to decide how to handle writing with the new
4913            table and data framework.
4914    
4915            * test/test_transientdb.py
4916            (TestTransientTable.run_iceland_political_tests)
4917            (TestTransientTable.test_transient_joined_table): Use the new
4918            table interface
4919    
4920    2003-05-05  Jonathan Coles   <[email protected]>
4921    
4922            This is namely a collection of UI updates to improve user interactivity.
4923            Tabbing between controls now exists and you can use ESC to close dialog
4924            boxes; ENTER will active the default button.
4925    
4926            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
4927            order that the controls are created so that tabbing works correctly.
4928            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
4929            wxDialog can handle the default button correctly.
4930            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
4931            same reasons as for OnOK.
4932            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
4933            when we ask the table for the maximum/minimum values of a field
4934            which could take a very long time.
4935    
4936            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
4937            order that the controls are created so that tabbing works correctly.
4938            (SelectPropertiesDialog.__init__): Rearrange the order that the
4939            controls are created so that tabbing works correctly.
4940    
4941            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
4942            to derive from a wxDialog but behave like the original implementation
4943            which was derived from a wxFrame. wxDialog provides useful key
4944            handling functionality like ESC calling OnCancel and ENTER calling
4945            OnOK which is lost with wxFrame.
4946    
4947            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
4948            new dialogs.
4949    
4950            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
4951            order that the controls are created so that tabbing works correctly.
4952            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
4953            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
4954            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
4955            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
4956            can provide the "UK National Grid" as a default projection.
4957            (UTMPanel.__init__): Rearrange the order that the controls are
4958            created so that tabbing works correctly.
4959    
4960    2003-05-05  Bernhard Herzog  <[email protected]>
4961    
4962            * extensions/thuban/wxproj.cpp: Fix some of the comments.
4963            (project_point): If a map projection but no layer projection is
4964            given, convert degrees to radians before applying the map
4965            projection.
4966    
4967            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
4968            (TableGrid.allow_messages): New methods to make it possible to
4969            inhibit message sending.
4970            (TableGrid.issue): Only send the message if not inhibited.
4971            (LayerTableGrid.select_shape): Use the new methods to make sure
4972            that no ROW_SELECTED message is sent while we're updating the
4973            selected rows to match the selected shapes.
4974    
4975    2003-05-02  Jan-Oliver Wagner <[email protected]>
4976    
4977            Implementation of MemoryTable.
4978    
4979            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
4980            implementation that operates on a list of tuples. All of the data
4981            are kept in the memory.
4982    
4983            * test/test_table.py (MemoryTableTest): New.
4984    
4985            * test/test_transientdb.py (SimpleTable): Removed.
4986            (TestTransientTable.test_transient_joined_table,
4987            (TestTransientTable.test_transient_table_read_twice): Replaced
4988            SimpleTable by MemoryTable.
4989    
4990    2003-04-30  Jonathan Coles   <[email protected]>
4991    
4992            * Data/iceland_sample.thuban: Now contains correct projections
4993            for each of the layers.
4994    
4995            * Resources/Projections/defaults.proj: Geographic projection
4996            contains unit conversion parameter.
4997    
4998    2003-04-30  Jonathan Coles   <[email protected]>
4999    
5000            The most important part of this putback is the projection changes.
5001            It should now be possible to specify the projection that a layer
5002            is in and then specify a different projection for the map. The
5003            projection dialog has an extra parameter for a geographic projection
5004            which lets the user select if the input is in degrees or radians.
5005    
5006            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
5007            to say that the parameter is a tuple of unprojected
5008            points (which is what the callers to this method were assuming).
5009            Also, since the points are unprojected we need to projected them.
5010    
5011            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
5012            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
5013            groups are selected, move the layer up/down. Fixes RTbug #1833.
5014    
5015            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
5016    
5017            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
5018            parameter in call to SetClientData.
5019            (GeoPanel): Add support for selecting the units that the
5020            source data is in (Radians or Degrees).
5021    
5022            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
5023            the rendering loop by reducing the number of if's, removing the
5024            unnecessary try/except block, and checking if the old group
5025            is the same as the new one (which happens a lot if there is
5026            no classification, or lots of shapes are in the same group).
5027    
5028            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
5029            around the redraw routine to try to catch problems that the user
5030            may create by selecting invalid projections for the data set and
5031            map. Clears the display if there are any problems and prints the
5032            error.
5033            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
5034            rectangle.
5035    
5036            * extensions/thuban/wxproj.cpp (project_point): First invert the
5037            supplied point (which should be in projected coordinates) using
5038            the layer's projection and then project the point using the
5039            map's projection.
5040            (project_points): Use project_point() to project each point.
5041    
5042    2003-04-30  Jan-Oliver Wagner <[email protected]>
5043    
5044            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
5045            don't set the Classification to None if the classfication field
5046            is None (ie only a DEFAULT).
5047    
5048    2003-04-30  Bernhard Herzog  <[email protected]>
5049    
5050            * Thuban/UI/view.py: Fix some typos.
5051    
5052            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
5053            not pop up the dialog if the selection becomes empty (this could
5054            happen if e.g. a new selection is opened while the identify tool
5055            is active and dialog had been closed)
5056    
5057    2003-04-30  Bernhard Herzog  <[email protected]>
5058    
5059            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
5060            instance variable read_record_last_result
5061            (TransientTableBase.read_record): Make sure reading the same
5062            record twice works. The implementation uses the new instance
5063            variable read_record_last_result
5064    
5065            * test/test_transientdb.py
5066            (TestTransientTable.test_transient_table_read_twice): New test
5067            case for the above bug-fix.
5068    
5069    2003-04-29  Jonathan Coles   <[email protected]>
5070    
5071            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
5072    
5073            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
5074    
5075            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
5076            (ClassTable.SetValueAsCustom): Rename keyword argument in
5077            ClassGroup* constructors to match argument name.
5078    
5079    2003-04-29  Bernhard Herzog  <[email protected]>
5080    
5081            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
5082            transient DB if it exists to make sure it doesn't leave a journal
5083            file in the temp directory.
5084    
5085            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
5086            self.conn to None after closing the connection to make sure it's
5087            not closed twice
5088    
5089    2003-04-29  Jonathan Coles   <[email protected]>
5090    
5091            Add a visible parameter in the layer XML tag. The default value is
5092            "true". If anything other than "false" is specified we also assume
5093            "true". Addresses RTbug #1025.
5094    
5095            * Doc/thuban.dtd: Add visible parameter to a layer.
5096    
5097            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
5098            of visible from 1 to True.
5099            (Layer.__init__): Change default value of visible from 1 to True.
5100    
5101            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
5102            parameter.
5103    
5104            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
5105            parameter.
5106    
5107            * test/test_load.py: Add new test data contents_test_visible.
5108            (LoadSessionTest.setUp): save test data.
5109            (LoadSessionTest.testLayerVisibility): Test if the visible flag
5110            is loaded correctly.
5111    
5112            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
5113            for saving an invisible layer.
5114    
5115    2003-04-29  Jonathan Coles   <[email protected]>
5116    
5117            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
5118            legend dialog box and tell it to change its map to the one
5119            supplied to SetMap(). Fixes RTbug #1770.
5120    
5121    2003-04-29  Bernhard Herzog  <[email protected]>
5122    
5123            Next step of table implementation. Introduce a transient database
5124            using SQLite that some of the data is copied to on demand. This
5125            allows us to do joins and other operations that require an index
5126            for good performance with reasonable efficiency. Thuban now needs
5127            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
5128            haven't tested that.
5129            
5130            * Thuban/Model/transientdb.py: New. Transient database
5131            implementation.
5132    
5133            * test/test_transientdb.py: New. Tests for the transient DB
5134            classes.
5135    
5136            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
5137            classes to help automatically remove temporary files and
5138            directories.
5139            (Session.__init__): New instance variables temp_dir for the
5140            temporary directory and transient_db for the SQLite database
5141            (Session.temp_directory): New. Create a temporary directory if not
5142            yet done and return its name. Use AutoRemoveDir to have it
5143            automatically deleted
5144            (Session.TransientDB): Instantiate the transient database if not
5145            done yet and return it.
5146    
5147            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
5148            AutoTransientTable so that data is copied to the transient DB on
5149            demand.
5150            (SimpleStore): New class that simply combines a table and a
5151            shapefile
5152    
5153            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
5154            DBFTable and update its doc-string to reflect the fact that this
5155            is only the table interface to a DBF file. Table is now an alias
5156            for DBFTable for temporary backwards compatibility.
5157    
5158            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
5159            the last reference to the session goes away so that the temporary
5160            files are removed properly.
5161    
5162            * test/test_load.py (LoadSessionTest.tearDown): Remove the
5163            reference to the session to make sure the temporary files are
5164            removed.
5165    
5166    2003-04-29  Bernhard Herzog  <[email protected]>
5167    
5168            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
5169            the __parser instance variable into a normal local variable in
5170            read. It's only used there and read will never be called more than
5171            once. Plus it introduces a reference cycle that keeps can keep the
5172            session object alive for a long time.
5173    
5174    2003-04-29  Jonathan Coles   <[email protected]>
5175    
5176            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
5177            Projection an immutable item. Fixes RTbug #1825.
5178            (Projection.__init__): Initialize instance variables here.
5179            (ProjFile.Replace): New. Replace the given projection object with
5180            the new projection object. This solves the problem of needing the
5181            mutator Projection.SetProjection() in the ProjFrame class and
5182            allows a projection to change parameters without changing its
5183            location in the file.
5184    
5185            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
5186            be of type wxSAVE and should verify overwriting a file.
5187    
5188            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
5189            ProjFile.Replace() method instead of the mutator
5190            Projection.SetProjection(). Also requires that we reassign the
5191            client data to the new projection.
5192    
5193            * test/test_proj.py (TestProjection.test): Test GetName() and
5194            GetAllParameters()
5195            (TestProjFile.test): Remove tests for Set*() methods. Add tests
5196            for Replace().
5197    
5198    2003-04-25  Jonathan Coles   <[email protected]>
5199    
5200            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
5201            to save the name of the projection.
5202    
5203            * test/test_save.py (SaveSessionTest.testLayerProjection): New
5204            test to verify layer projections are saved correctly.
5205    
5206    2003-04-25  Jonathan Coles   <[email protected]>
5207    
5208            * Thuban/Model/proj.py (Projection.SetName): Set the name
5209            to "Unknown" if name is None.
5210            (Projection.SetAllParameters): New. Set the projection's
5211            parameter list to the one supplied.
5212            (Projection.SetProjection): New. Set the projection's
5213            properties to those of the supplied Projection.
5214    
5215            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
5216            the dialog title to include the map's title.
5217            (MainWindow.LayerProjection): Set the dialog title to include
5218            the layer's title.
5219    
5220            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
5221            error dialogs into a single method call.
5222            (ProjFrame.__VerifyButtons): Add more states to check.
5223            (ProjFrame.__GetProjection): Return the current state of an
5224            edited projection or None.
5225            (ProjFrame.__FillAvailList): Remove checks for states that
5226            shouldn't exist.
5227            (ProjFrame._OnNew): Clear all selected items and supply
5228            a projection panel if necessary.
5229    
5230            * test/test_proj.py (TestProjFile.test): Add tests for
5231            ProjFile.SetAllParameters, ProjFile.SetProjection,
5232            ProjFile.SetName.
5233    
5234    2003-04-25  Jonathan Coles   <[email protected]>
5235    
5236            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
5237            takes an optional argument to select the current projection.
5238            This does not guarantee that the item is visible due to
5239            limited wxWindows functionality. Fixes RTBug #1821.
5240    
5241    2003-04-25  Jonathan Coles   <[email protected]>
5242    
5243            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
5244            the projection name and use it when constructing the Projection
5245            object.
5246    
5247            * Thuban/Model/proj.py (Projection.__init__): Change the default
5248            value for 'name' to None and then test if name is equal to None
5249            in the body of the constructor. This way the caller doesn't have to
5250            know what the default value should be. Namely, useful in load.py
5251            where we have to pick a default value if the 'name' parameter
5252            doesn't exist in the XML file.
5253    
5254            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
5255            Tests a file where a layer has a projection.
5256    
5257    2003-04-25  Jonathan Coles   <[email protected]>
5258    
5259            * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
5260            tree for projection information.
5261    
5262            * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
5263            XMLReader.GetFileName.
5264            (SessionLoader): Added support for loading projection tags that
5265            appear inside a layer.
5266    
5267            * Thuban/Model/proj.py (ProjFile): Document the class. Move
5268            back to using a list because the order of the projections in
5269            the file is important to maintain. Fixes RTbug #1817.
5270    
5271            * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
5272            to ProjFile.GetFilename.
5273    
5274            * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
5275            information.
5276    
5277            * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
5278            ProjFrame._OnSaveAs. Removed old dead code from previous
5279            implementation.
5280            (ProjFrame._OnExport): Add support for exporting more than one
5281            projection to a single file.
5282            (ProjFrame.__FillAvailList): use string formatting (% operator)
5283            to build strings that are (partly) translated. Fixes RTbug #1818.
5284    
5285            * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
5286            class.
5287    
5288    2003-04-24  Bernhard Herzog  <[email protected]>
5289    
5290            * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
5291    
5292            * po/fr.po: New. French translation by Daniel Calvelo Aros
5293    
5294            * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
5295            empty strings.
5296    
5297    2003-04-24  Jonathan Coles   <[email protected]>
5298    
5299            * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
5300            implement the interface that the ProjFrame dialog expects.
5301    
5302            * Thuban/Model/proj.py (Projection.SetName): New. Allows the
5303            name of the projection to be changed.
5304            (ProjFile): Use a dictionary instead of a list so that removing
5305            projections is easier and we are sure about uniqueness.
5306            (ProjFile.Remove): Remove the given projection object.
5307    
5308            * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
5309            Return a list with only one projection file instead of searching for
5310            any projection file. This simplifies many things if the user can
5311            only have one system file and one user file.
5312    
5313            * Thuban/UI/classgen.py: Change all references to
5314            genCombo to genChoice.
5315    
5316            * Thuban/UI/mainwindow.py: Add a Projection option under the
5317            layer menu.
5318            (MainWindow.LayerProjection): New. Open up a projection window
5319            for a layer.
5320    
5321            * Thuban/UI/projdialog.py: Large changes to how the dialog is
5322            laid out. Use three panels instead of one. One for the list of
5323            projections, one for the edit controls, and one for the buttons.
5324            Fixed resizing problems so that the dialog resizes correctly
5325            when the projection panel changes. Added import/export, save, and
5326            new buttons/functionality.
5327    
5328    2003-04-24  Bernhard Herzog  <[email protected]>
5329    
5330            First step towards table management. Introduce a simple data
5331            abstraction so that we replace the data a layer uses more easily
5332            in the next step.
5333    
5334            * Thuban/Model/data.py: New file with a simple data abstraction
5335            that bundles shapefile and dbffile into one object.
5336    
5337            * Thuban/Model/session.py (Session.OpenShapefile): New method to
5338            open shapefiles and return a shape store object
5339    
5340            * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
5341            object instead of a shapefile filename. This introduces a new
5342            instance variable store holding the datastore. For intermediate
5343            backwards compatibility keep the old instance variables.
5344            (open_shapefile): Removed. No longer needed with the shape store.
5345            (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
5346            get the shape store used by a layer.
5347            (Layer.Destroy): No need to explicitly destroy the shapefile or
5348            table anymore.
5349    
5350            * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
5351            (MainWindow.AddLayer): Use the session's OpenShapefile method to
5352            open shapefiles
5353    
5354            * Thuban/Model/load.py (ProcessSession.start_layer): Use the
5355            session's OpenShapefile method to open shapefiles
5356    
5357            * test/test_classification.py
5358            (TestClassification.test_classification): Use the session's
5359            OpenShapefile method to open shapefiles and build the filename in
5360            a more platform independed way
5361    
5362            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
5363            Implement to have a session to use in the tests
5364            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
5365            (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
5366            session's OpenShapefile method to open shapefiles
5367            (TestLayerLegend.setUp): Instantiate a session so that we can use
5368            it to open shapefiles.
5369            (TestLayerLegend.tearDown): Make sure that all references to
5370            layers and session are removed otherwise we may get a resource
5371            leak
5372    
5373            * test/test_map.py (TestMapAddLayer.test_add_layer)
5374            (TestMapWithContents.setUp): Instantiate a session so that we can
5375            use it to open shapefiles.
5376            (TestMapWithContents.tearDown): Make sure that all references to
5377            layers, maps and sessions are removed otherwise we may get a
5378            resource leak
5379            ("__main__"): use support.run_tests() so that more info about
5380            uncollected garbage is printed
5381    
5382            * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
5383            session's OpenShapefile method to open shapefiles
5384            ("__main__"): use support.run_tests() so that more info about
5385            uncollected garbage is printed
5386    
5387            * test/test_selection.py (TestSelection.tearDown): Make sure that
5388            all references to the session and the selection are removed
5389            otherwise we may get a resource leak
5390            (TestSelection.get_layer): Instantiate a session so that we can
5391            use it to open shapefiles.
5392            ("__main__"): use support.run_tests() so that more info about
5393            uncollected garbage is printed
5394    
5395            * test/test_session.py (TestSessionBase.tearDown)
5396            (TestSessionWithContent.tearDown): Make sure that all references
5397            to the session and layers are removed otherwise we may get a
5398            resource leak
5399            (TestSessionWithContent.setUp): Use the session's OpenShapefile
5400            method to open shapefiles
5401    
5402    2003-04-24  Jonathan Coles   <[email protected]>
5403    
5404            * Thuban/Model/load.py (XMLReader.read): Should have been checking
5405            if the file_or_filename object had the 'read' attribute.
5406    
5407    2003-04-23  Jonathan Coles   <[email protected]>
5408    
5409            * Thuban/Model/resource.py: Fixes RTbug #1813.
5410            (ReadProjFile): Add documentation about which exceptions are raised.
5411            Always pass the exceptions up to the caller.
5412            (GetProjFiles): If the directory can't be read return an empty list.
5413            If any of the proj files can't be read skip that file and go
5414            on to the next one.
5415    
5416            * test/test_proj.py: Added test cases to handle nonexistent files,
5417            unreadable files, and files that don't parse correctly.
5418    
5419    2003-04-23  Jonathan Coles   <[email protected]>
5420    
5421            Projection dialog. Allows the user to select from a list
5422            of projection templates and optionally edit them and save new ones.
5423    
5424            * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
5425            (ProjPanel): Base class for projection specific panels.
5426            (TMPanel): Projection panel for Transverse Mercartor.
5427            (UTMPanel): Projection panel for Universal Transverse Mercartor.
5428            (LCCPanel): Projection panel for Lambert Conic Conformal.
5429            (GeoPanel): Projetion panel for Geographic Projection.
5430    
5431    2003-04-23  Jonathan Coles   <[email protected]>
5432    
5433            * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
5434            promote symmetry. There now exists XMLReader and XMLWriter.
5435            (XMLReader.read): New. Call to read the given file descriptor or
5436            filename.
5437            (XMLReader.close): New. Make sure the file is closed.
5438            (XMLReader.GetFileName): New. Return just the file name that is being
5439            read from.
5440            (XMLReader.GetDirectory): New. Return just the directory of the file
5441            that is being read.
5442            (XMLReader.AddDispatchers): New. Take a dictionary which contains
5443            the names of functions to call as the XML tree is parsed.
5444            (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
5445            (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
5446            (SessionLoader): Removed class variables start_dispatcher and
5447            end_dispatcher since this functionality is now part of a class
5448            instance. Fixes RTbug #1808.
5449            (SessionLoader.__init__): Add dispatcher functions.
5450            (load_xmlfile): Code was moved into the XMLReader.read().
5451            (load_session): Use modified SessionLoader.
5452    
5453            * Thuban/Model/map.py (Map.GetProjection): New. Returns the
5454            map's projection.
5455    
5456            * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
5457            GetAllParameters.
5458            (Projection.GetParameter): Returns the value for the given parameter.
5459    
5460            * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
5461            (GetProjFiles): Renamed from GetProjections. Now returns a list
5462            of ProjFile objects.
5463            (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
5464            a list of ProjFile objects whose files are not user defined.
5465            (GetUserProjFiles): Renamed from GetUserProjections. Returns a
5466            list of ProjFile objects whose files are user defined.
5467            (ProjFileReader): Extend new XMLReader.
5468    
5469            * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
5470            promote symmetry.
5471    
5472            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
5473            control instead of a wxComboBox. wxChoice controls do not generate
5474            events as the uses highlights possible choices which fixes problems
5475            with resizing the dialog when the use selects an option.
5476    
5477            * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
5478            control instead of a wxComboBox.
5479    
5480            * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
5481            dialog.
5482    
5483            * test/test_proj.py (TestProjection.test): New tests for GetParameter
5484            method.
5485    
5486    2003-04-22  Bernhard Herzog  <[email protected]>
5487    
5488            * Thuban/UI/mainwindow.py: Remove some unused imports and global
5489            constants
5490    
5491            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
5492            (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
5493    
5494    2003-04-17  Bernhard Herzog  <[email protected]>
5495    
5496            * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
5497            (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
5498            anymore.
5499            (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
5500            (Layer.ShapeType, Layer.Shape): No need to call
5501            self.open_shapefile since it's always called in __init__
5502    
5503            * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
5504            In wxPython 2.4 there's no need to extend MainLoop anymore since
5505            wxPython itself makes sure OnExit is called.
5506    
5507    2003-04-16  Jonathan Coles   <[email protected]>
5508    
5509            Initial putback of projection management code. Includes new
5510            classes to read and write projection files. The current load
5511            and save classes were abstracted a bit so they could be reused.
5512            The Projection class was extended to provide new methods and
5513            have a name.
5514    
5515            * Thuban/Model/load.py (XMLProcessor): New. Contains all the
5516            general XML reading methods that were part of ProcessSession.
5517    
5518            * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
5519            name.
5520            (ProjFile): New. Represents a file that contains projection
5521            information.
5522    
5523            * Thuban/Model/resource.py: New. Contains general utilities
5524            for read and writing projection files.
5525    
5526            * Thuban/Model/save.py (XMLSaver): New. Contains all the
5527            general XML writing methods that were part of SessionSaver.
5528            (SessionSaver): Renamed from Saver.
5529    
5530            * test/test_proj.py: New test cases for the projection
5531            file read and write functions.
5532    
5533    2003-04-16  Jonathan Coles   <[email protected]>
5534    
5535            * Thuban/Model/classification.py: Use repr() around values
5536            in the ClassGroup*.__repr__() methods so it is clearer when
5537            a value is a string and when it is a number.
5538    
5539            * test/test_load.py: Rework the classification test to test
5540            that we can load old files.
5541            (testLabels): Test a file where the groups have labels.
5542    
5543    2003-04-16  Bernhard Herzog  <[email protected]>
5544    
5545            Safer implementation of the performance enhancements of the
5546            low-level renderer:
5547            
5548            * extensions/thuban/wxproj.cpp (extract_projection)
5549            (extract_pointer): Rename extract_projection to extract_pointer
5550            and redefine its purpose to return the pointer stored in a CObject
5551            returned by the object's cobject method. Update all callers.
5552            (s_draw_info, free_draw_info, draw_polygon_init): Implement the
5553            handling of these low-level parameters so that each s_draw_info
5554            instance is handled as a CObject at python level that also
5555            contains real references to the actual python objects which
5556            contain the values in the struct. Add free_draw_info as the
5557            destructor.
5558            (draw_polygon_shape): Add the py_draw_info parameter which must a
5559            cobject containing an s_draw_info pointer.
5560    
5561            * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
5562            method to instantiat the low-level render parameter
5563            (MapRenderer.draw_shape_layer): Use the new method. Remove some
5564            commented out code.
5565            (MapRenderer.draw_polygon_shape): Make the first parameter not the
5566            layer but the low-level render parameter
5567            (ScreenRenderer.draw_shape_layer): Use the low-level render
5568            parameter.
5569    
5570    2003-04-15  Jonathan Coles   <[email protected]>
5571    
5572            * Thuban/Model/classification.py: Implemented __repr__ for
5573            the ClassGroup* classes to make debugging a bit easier.
5574            (ClassGroup.SetLabel): Check that the string is an instance
5575            of StringTypes not StringType. Accounts for Unicode strings.
5576    
5577            * Thuban/Model/color.py: Implemented __repr__ to make
5578            debugging a bit easier.
5579    
5580            * Thuban/Model/save.py (Saver.write_classification): Need to
5581            save the group label.
5582    
5583            * test/test_load.py (testClassification): New. Loads the
5584            iceland_sample_test.thuban file and checks if it was loaded
5585            correctly.
5586    
5587    2003-04-15  Jonathan Coles   <[email protected]>
5588    
5589            * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
5590            to improve rendering performance by initializing the variables
5591            that are not change each time draw_polygon_shape() is called.
5592            The values are stored in a global struct draw_info.
5593            (draw_polygon_shape): Removed initialization code that is
5594            now in draw_polygon_init().
5595    
5596            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
5597            drawing initialization call to draw_polygon_init()
5598            (MapRenderer.draw_polygon_shape): Use new signature of
5599            draw_polygon_shape.
5600    
5601            * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
5602            weirdness by setting the range to (1, maxint).
5603    
5604            * Thuban/Model/classification.py (ClassGroupProperties): Make
5605            instance variables private and optimize comparison operator
5606            by first checking if the color references are the same.
5607            (ClassGroupSingleton): Make instance variables private.
5608            (ClassGroupRange): Make instance variables private.
5609    
5610            * HOWTO-Release: Filled in missing steps for releasing packages.
5611    
5612    2003-04-15  Bernhard Herzog  <[email protected]>
5613    
5614            First stab at internationalized messages:
5615    
5616            * Thuban/__init__.py (_): Implement the translation function for
5617            real using the python gettext module.
5618    
5619            * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
5620            translate empty strings.
5621    
5622            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
5623            Add a missing space to a warning message
5624    
5625            * po/README: New. Notes about the management of the translation
5626            files.
5627    
5628            * po/Makefile: New. Makefile to help manage the translation files.
5629    
5630            * po/es.po: New. Spanish translation by Daniel Calvelo Aros
5631    
5632            * MANIFEST.in: Include the *.mo files in Resources/Locale and the
5633            translations and support files in po/
5634    
5635            * setup.py (data_files): Add the *.mo files to the data_files too
5636    
5637            * README: Add note about the translations when building from CVS
5638    
5639    2003-04-14  Jonathan Coles   <[email protected]>
5640    
5641            * Thuban/UI/dock.py: Fixes some window resizing problems most
5642            noticable under windows. Always assume the button bitmaps will
5643            be there. Code clean up.
5644            (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
5645            images for the dock/undock button to the same images.
5646            Work around for RTbug #1801.
5647    
5648            * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
5649            be allowed to grow within the sizer. Fixes a bug under Windows
5650            where the toolbar wasn't being drawn.
5651    
5652    2003-04-14  Frank Koormann   <[email protected]>
5653    
5654            * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
5655            Updated design to try to make the button functionality more
5656            transparent.
5657    
5658    2003-04-14  Jonathan Coles   <[email protected]>
5659    
5660            * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
5661            finalize the intialization of the panel.
5662    
5663            * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
5664            creation of the panel. Should be the last thing called in the
5665            initializer of a subclass.
5666    
5667            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
5668            set the current selections in the combo boxes. This is needed
5669            under Windows.
5670    
5671            * Thuban/UI/classifier.py (Classifier.__init__): Add a top
5672            level panel to the dialog so that the background colors are
5673            consistent under Windows.
5674    
5675    2003-04-11  Jonathan Coles   <[email protected]>
5676    
5677            * Thuban/UI/classgen.py: Change color ramps to start at white
5678            not black.
5679    
5680            * Thuban/UI/legend.py: Enable/disable the legend buttons when
5681            the legend changes. Fixes RTbug #1793.
5682    
5683            * test/test_classification.py: Added test for copying of
5684            classifications.
5685    
5686    2003-04-11  Jonathan Coles   <[email protected]>
5687    
5688            * Thuban/UI/resource.py: New. Centralize the loading of resources
5689            such as bitmaps.
5690    
5691            * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
5692            added images to the move buttons, added 'reverse' button.
5693            (CustomRampPanel.__init__): Added images to the move buttons.
5694            (GreyRamp): New. Generates a ramp from white to black.
5695            (HotToColdRamp): New. Generates a ramp from cold to hot colors.
5696    
5697            * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
5698            ID_PROPERTY_*.
5699            (Classifier.__init__): Minor changes to the layout.
5700            (Classifier._OnTitleChanged): Listen for when the user edits the
5701            title and update the dialog's title and the layer's title.
5702    
5703            * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
5704    
5705            * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
5706            (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
5707            if the layer's title changes.
5708    
5709            * Thuban/UI/mainwindow.py: Added new menu item and associated code
5710            to open a dialog to rename the map.
5711            (MainWindow): Use new resource class to import bitmaps.
5712    
5713    2003-04-11  Jonathan Coles   <[email protected]>
5714    
5715            * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
5716            Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
5717            Resources/Bitmaps/group_use_none.xpm,
5718            Resources/Bitmaps/group_use_not.xpm,
5719            Resources/Bitmaps/hide_layer.xpm,
5720            Resources/Bitmaps/layer_properties.xpm,
5721            Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
5722            Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
5723            New.
5724    
5725    2003-04-10  Jonathan Coles   <[email protected]>
5726    
5727            * Thuban/Model/classification.py: (ClassGroupRange.__init__):
5728            Should pass group to ClassGroup constructor.
5729    
5730    2003-04-10  Jonathan Coles   <[email protected]>
5731    
5732            * Thuban/Model/classification.py: (ClassGroup): Move all the common
5733            methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
5734            here. Implement SetVisible(), IsVisible().
5735            (ClassGroup.__init__): Add group parameter which acts as a copy
5736            constructor.
5737    
5738            * Thuban/UI/classifier.py (ClassTable): Add a new column for the
5739            "Visible" check boxes.
5740            (Classifier): Rename the buttons and refactor the code to match
5741            the new labels.
5742    
5743            * Thuban/UI/legend.py: Classify button is now called "Properties".
5744            Refactored the code to change variable names.
5745            (LegendTree.__FillTreeLayer): Only list a group if it is visible.
5746    
5747            * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
5748            MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
5749            renamed to MainWindow.LayerEditProperties.
5750            (MainWindow.ToggleLegend): Don't include map name in legend title.
5751            (MainWindow.SetMap): Added the map name to the window title.
5752            (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
5753            MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
5754            Functionality is found in the layer properties dialog.
5755    
5756            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
5757            draw visible groups.
5758    
5759    2003-04-09  Jonathan Coles   <[email protected]>
5760    
5761            * Thuban/UI/classgen.py: Modifications to allow simple
5762            addition and selection of new color schemes.
5763            (MonochromaticRamp): New. Generates a ramp between two colors.
5764            (RedRamp): New. Generates a ramp of all red.
5765            (GreenRamp): New. Generates a ramp of all green.
5766            (BlueRamp): New. Generates a ramp of all blue.
5767    
5768    2003-04-09  Jonathan Coles   <[email protected]>
5769    
5770            * Thuban/Model/classification.py (Classification.__deepcopy__):
5771            Need to copy over field and fieldType attributes.
5772    
5773            * Thuban/Model/table.py (Table.field_range): New. Retrive the
5774            maximum and minimum values over the entire table for a given
5775            field.
5776            (Table.GetUniqueValues): New. Retrieve all the unique values
5777            in the table for a given field.
5778    
5779            * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
5780            (GenUniquePanel): New. Controls to allow the user to select
5781            which unique field values they would like in the classification.
5782            (CustomRampPanel): Code that was in ClassGenDialog that allows
5783            the user to select the properties for a custom ramp.
5784            (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
5785    
5786            * Thuban/UI/classifier.py: Removed a lot of debugging code.
5787            (Classifier._SetClassification): Callback method so that the
5788            class generator can set the classification in the grid.
5789            (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
5790            editing of a group properties class into a wxWindows control.
5791    
5792            * Thuban/UI/dock.py: It was decided that if the user closes
5793            a dockable window the window should simply hide itself. That
5794            way if the user wants to show the dock again it appears in the
5795            same place as it was when it was closed.
5796            (DockableWindow.Destroy): Call renamed method OnDockDestroy().
5797            (DockableWindow._OnButtonClose): Hide the window instead of
5798            destroying it.
5799            (DockableWindow._OnClose): Hide the window instead of
5800            destroying it.
5801    
5802            * Thuban/UI/legend.py (LegendTree): Use a private method to
5803            consistently set the font and style of the text. Fixes RTbug #1786.
5804    
5805            * Thuban/UI/mainwindow.py: Import just the Classifier class.
5806    
5807    2003-04-07  Bernhard Herzog  <[email protected]>
5808    
5809            * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
5810            to the map module
5811    
5812    2003-04-07  Bernhard Herzog  <[email protected]>
5813    
5814            * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
5815            favor of ToggleSessionTree
5816            (MainWindow.ToggleSessionTree): New method to toggle visibility of
5817            the session tree.
5818            (MainWindow.SessionTreeShown): New method to return whether the
5819            session tree is currently shown.
5820            (MainWindow.ToggleLegend): New method to toggle visibility of the
5821            legend
5822            (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
5823            LegendShown
5824            (MainWindow.LegendShown): New method to return whether the legend
5825            is currently shown.
5826            (_method_command): Add checked parameter so we can define check
5827            menu items
5828            (_has_tree_window_shown, _has_legend_shown): Use the appropriate
5829            mainwindow methods.
5830            (show_session_tree, show_legend commands): Removed.
5831            (toggle_session_tree, toggle_legend commands): New commands to
5832            toggle the visibility of the dialogs
5833    
5834    2003-04-07  Jonathan Coles   <[email protected]>
5835    
5836            * Thuban/UI/classgen.py: Fix Windows problem.
5837    
5838            * Thuban/UI/dock.py: Fix Windows problem.
5839    
5840            * Thuban/UI/mainwindow.py: Use False instead of false.
5841            (MainWindow.ShowLegend): Remove unnecessary switch parameter.
5842    
5843    2003-04-07  Jonathan Coles   <[email protected]>
5844    
5845            Since we now say that the order of the groups in a classification
5846            matters, it makes sense to be able to manipulate that order. Most
5847            of the changes to Thuban/Model/classification.py are to that end.
5848    
5849            * Thuban/Model/classification.py (Classification.AppendGroup,
5850            Classification.InsertGroup, Classification.ReplaceGroup,
5851            Classification.RemoveGroup, Classification.GetGroup): Do as the
5852            names imply.
5853            (Classification.FindGroup): This was called GetGroup, but GetGroup
5854            takes an index, while FindGroup takes a value.
5855            (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
5856            REFERENCE. Currently there is a cyclic reference between the layer
5857            and its classification. If the classification doesn't need to know
5858            its owning layer we can change this, since it may make sense to be
5859            able to use the same classification with different layers.
5860    
5861            * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
5862    
5863            * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
5864            not AddGroup()
5865    
5866            * Thuban/UI/classifier.py: Now that we can depend on the order in
5867            a Classification and have methods to manipulate that order we don't
5868            need to use our own data structures in the grid. We can simply make
5869            the grid/table access the information they need from a copy of
5870            the classification object.
5871            (Classifier._OnCloseBtn): Event handler for when the user clicks
5872            'Close'. This is needed so if the user applies changes and then
5873            continues to change the table the user has the option of discarding
5874            the most recent changes and keeping what they applied.
5875    
5876            * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
5877            into the same group.
5878    
5879            * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
5880            with a really old version of proj, PJ_VERSION won't even be defined.
5881            If it isn't defined then just compile so that the function always
5882            returns Py_False.
5883    
5884            * test/test_classification.py: Fix tests to use the renamed methods.
5885            Still need to write tests for the new methods.
5886    
5887    2003-04-04  Jonathan Coles   <[email protected]>
5888    
5889            * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
5890            call to SetSelection out of the method and before the call
5891            to __SelectField in __init__. This prevents a recursion of events
5892            when _OnFieldSelect is triggered by the user.
5893    
5894    2003-04-04  Jonathan Coles   <[email protected]>
5895    
5896            * Thuban/Model/classification.py: Rename Color.None to
5897            Color.Transparent.
5898            (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
5899            Don't bother copying the color, since Colors are immutable.
5900    
5901            * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
5902            Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
5903            Thuban/UI/renderer.py, Thuban/UI/view.py:
5904            Rename Color.None to Color.Transparent.
5905        
5906            * test/test_classification.py, test/test_load.py: Rename Color.None
5907            to Color.Transparent.
5908    
5909    2003-04-04  Jonathan Coles   <[email protected]>
5910    
5911            * Thuban/Model/classification.py: Fix assert calls.
5912            (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
5913            Copy the color parameter rather than hold onto a reference.
5914    
5915            * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
5916            the color object.
5917            (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
5918            are sure there exists only one refernce to Color.None in the system.
5919            This allows us to use 'is' rather than the comparision functions.
5920            
5921            * Thuban/Model/save.py: Fix assert calls.
5922            
5923            * Thuban/UI/classifier.py: Fix assert calls.
5924            (ClassGrid._OnCellDClick): Call up to the classifier to open the
5925            dialog to edit the groups properties.
5926            (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
5927            correctly if a cell is resized.
5928            (ClassTable.SetClassification): New. Changes the classification
5929            that is in the table.
5930            (ClassTable.__SetRow): Allow groups to be prepended.
5931            (Classifier): New code for opening the EditProperties and
5932            GenerateRanges dialogs.
5933            (SelectPropertiesDialog.__GetColor): Only set the color in the
5934            color dialog if the current color is not None.
5935            
5936            * Thuban/UI/dock.py: Fix assert calls.
5937            
5938            * Thuban/UI/legend.py: Fix assert calls.
5939            
5940            * Thuban/UI/renderer.py: Fix assert calls.
5941            
5942            * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
5943            classifications.
5944            (GenRangePanel): Panel specific to range generation.
5945            (GenSingletonPanel): Panel specific to singleton generation.
5946            (ClassGenerator): Class responsible for actually generating
5947            the classification from the data gathered in the dialog box.
5948            (PropertyRamp): Generates properties whose values range from
5949            a starting property to an ending property.
5950    
5951    2003-04-03  Bernhard Herzog  <[email protected]>
5952    
5953            * test/support.py (print_garbage_information): New function that
5954            prints information about still connected messages and memory
5955            leaks.
5956            (run_suite): Removed.
5957            (run_tests): New function for use as a replacement of
5958            unittest.main in the test_* files. This one calls
5959            print_garbage_information at the end.
5960    
5961            * test/runtests.py (main): Use support.print_garbage_information
5962    
5963            * test/test_layer.py: Use support.run_tests instead of
5964            unittest.main so we get memory leak information
5965            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
5966            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
5967            (TestLayerLegend.test_visibility): Call the layer's Destroy method
5968            to fix a memory leak.
5969    
5970            * test/test_classification.py: Use support.run_tests instead of
5971            unittest.main so we get memory leak information
5972            (TestClassification.test_classification): Call the layer's Destroy
5973            method to fix a memory leak.
5974    
5975    2003-04-02  Bernhard Herzog  <[email protected]>
5976    
5977            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
5978            Handle the reference counts of the return value and errors in
5979            PyArg_ParseTuple correctly.
5980    
5981            * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
5982            sure the filename is absolute to avoid problems when saving the
5983            session again
5984    
5985            * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
5986    
5987    2003-04-01  Jonathan Coles   <[email protected]>
5988    
5989            *  Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
5990            that there actually are points in the returned list of points
5991            before trying to index into the list. The list may be empty if
5992            the shape is a Null Shape.
5993    
5994    2003-04-01  Bernhard Herzog  <[email protected]>
5995    
5996            * test/test_map.py: Don't use from <module> import *
5997    
5998    2003-04-01  Jonathan Coles   <[email protected]>
5999    
6000            * Thuban/Model/session.py: Use LAYER_CHANGED instead of
6001            LAYER_LEGEND_CHANGED
6002    
6003            * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
6004            self.Destroy() to close the window after yesterday's changes.
6005    
6006            * test/test_map.py, test/test_session.py: Fix messages that
6007            are sent from maps and layers.
6008    
6009    2003-03-31  Jonathan Coles   <[email protected]>
6010    
6011            * Thuban/UI/classifier.py: Commented out some debugging statements.
6012            (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
6013            RTbug #1769.
6014    
6015            * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
6016            position (although position doesn't work yet under GTK).
6017            (DockableWindow.Destroy): New. Called when the window must be
6018            closed. Namely needed when the DockFrame closes and must close
6019            its children.
6020            (DockFrame): Listen for EVT_CLOSE and destroy all children.
6021    
6022            * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
6023            when then window is told to close.
6024            (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
6025            comment in source for more info.
6026    
6027            * Thuban/UI/main.py: Show the legend by default when Thuban starts.
6028    
6029            * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
6030            symmetry with other such methods.
6031            (MainWindow.ShowLegend): Show the legend docked by default.
6032    
6033    2003-03-28  Jonathan Coles   <[email protected]>
6034    
6035            * Thuban/UI/classifier.py: Support for highlighting a specific
6036            group within the grid when the classification dialog is opened.
6037            Also contains a lot of debugging printouts which will later
6038            be removed.
6039    
6040            * Thuban/UI/dock.py: Complete rework on the dock code so that
6041            that it is fairly removed from the rest of the Thuban application.
6042            It is easy to add new docks which the rest of the program having
6043            to be aware of them.
6044    
6045            * Thuban/UI/legend.py: Modifications to support selecting a
6046            specific group in the classification dialog. Changed how layers
6047            are drawn when the layer is visible/invisible.
6048    
6049            * Thuban/UI/mainwindow.py: Removed legend specific code and
6050            replaced it with calls to the new dock code.
6051    
6052            * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
6053            to check if scale > 0. Trying to track down a divide by zero.
6054    
6055    2003-03-26  Jonathan Coles   <[email protected]>
6056    
6057            * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
6058            (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
6059            now part of DockableWindow.
6060            (LegendPanel.DoOnSelChanged): Select the current layer in the
6061            map.
6062            (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
6063            with the selected layer and/or group.
6064    
6065    2003-03-26  Jonathan Coles   <[email protected]>
6066    
6067            This putback contains the code for dockable windows. There is
6068            no support in wxWindows as of this date for windows that can
6069            attach themselves to other windows.
6070    
6071            The current model contains a DockableWindow which has a parent
6072            window for when it is detached and a dock window that it puts
6073            its contents in when it is docked. The contents of a DockableWindow
6074            must be a DockPanel. DockPanel itself derives from wxPanel.
6075    
6076            * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
6077            message, not a LAYER_LEGEND_CHANGED message.
6078    
6079            * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
6080    
6081            * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
6082            as one of the style properties for the fieldTypeText item to
6083            be sure that its size is correct when the text changes.
6084    
6085            * Thuban/UI/dock.py: New. Classes for the DockPanel and
6086            DockableWindow.
6087    
6088            * Thuban/UI/legend.py: Added some more buttons and made the
6089            LegendPanel a DockPanel.
6090    
6091            * Thuban/UI/mainwindow.py: Added sash windows to the main window
6092            and supporting functions for manipulating the sashes.
6093            (MainWindow.ShowLegend): Create a DockableWindow with the
6094            LegendPanel as the contents.
6095    
6096            * Thuban/UI/messages.py: Added DOCKABLE_* messages
6097    
6098            * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
6099            not LAYER_LEGEND_CHANGED, messages.
6100    
6101    2003-03-25  Jonathan Coles   <[email protected]>
6102    
6103            * setup.py: Added custom script bdist_rpm_build_script so that
6104            when the rpm is built the path to wx-config is correct.
6105    
6106            * setup.cfg: Added line saying to use the custom build script
6107    
6108    2003-03-20  Jonathan Coles   <[email protected]>
6109    
6110            Initial implementation of the Legend.
6111    
6112            * Thuban/UI/legend.py: New. Creates a window that shows the map's
6113            Legend information and allows the user to add/modify classifications
6114            and how the layers are drawn on the map.
6115    
6116            * setup.py: New command 'build_docs' which currently uses
6117            happydoc to generate html documentation for Thuban.
6118    
6119            * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
6120            Returns a string which is appropriately describes the group.
6121    
6122            * Thuban/Model/layer.py (Layer.SetClassification): Generate a
6123            LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
6124    
6125            * Thuban/Model/map.py (Map): Rename messages and use new, more
6126            specific, messages.
6127    
6128            * Thuban/Model/messages.py: New message to indicate that a layer's
6129            data has changed (LAYER_CHANGED). New map messages to indicate
6130            when layers have been added/removed/changed or if the stacking order
6131            of the layers has changed.
6132    
6133            * Thuban/Model/session.py: Rename and use new messages.
6134    
6135            * Thuban/UI/classifier.py: Remember if any changes have actually
6136            been applied so that if the dialog is cancelled without an application
6137            of changes we don't have to set a new classification.
6138            (ClassDataPreviewer): Pulled out the window specific code and put it
6139            ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
6140            symbols on any DC.
6141            
6142            * Thuban/UI/mainwindow.py: New code to open the legend.
6143    
6144            * Thuban/UI/view.py: Use new message names.
6145    
6146    2003-03-19  Jonathan Coles   <[email protected]>
6147    
6148            * Thuban/UI/main.py (verify_versions): New. Checks the versions
6149            of Python, wxPython, and some other libraries.
6150    
6151            * extensions/thuban/wxproj.cpp (check_version): Checks the given
6152            version against what wxproj was compiled with.
6153            (check_version_gtk): If wxproj was compiled with gtk then check
6154            the given version against the version of the gtk library
6155            currently being used.
6156    
6157    2003-03-14  Bernhard Herzog  <[email protected]>
6158    
6159            * test/test_command.py: Run the tests when the module is run as a
6160            script
6161    
6162    2003-03-14  Bernhard Herzog  <[email protected]>
6163    
6164            Implement selection of multiple selected shapes in the same layer:
6165    
6166            - Introduce a new class to hold the selection. This basically
6167              replaces the interactor which was nothing more than the
6168              selection anyway. A major difference is of course that the new
6169              selection class supports multiple selected shapes in one layer
6170            
6171            - Move the object that represents the selection from the
6172              application to the canvas. The canvas is a better place than the
6173              application because the selection represents which shapes and
6174              layer of the map displayed by the canvas are selected and
6175              affects how the map is drawn.
6176    
6177            - Make the selection and its messages publicly available through
6178              the mainwindow.
6179    
6180            - The non-modal dialogs do not get a reference to the interactor
6181              anymore as they can simply refer to their parent, the
6182              mainwindow, for the what the interactor had to offer.
6183    
6184            * Thuban/UI/selection.py: New module with a class to represent the
6185            selection.
6186    
6187            * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
6188            these unused messages
6189    
6190            * Thuban/UI/application.py (ThubanApplication.OnInit)
6191            (ThubanApplication.OnExit, ThubanApplication.SetSession): The
6192            interactor is gone now.
6193            (ThubanApplication.CreateMainWindow): There is no interactor
6194            anymore so we pass None as the interactor argument for now for
6195            compatibility.
6196    
6197            * Thuban/UI/view.py (MapCanvas.delegated_messages)
6198            (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
6199            Unsubscribe, delegate messages according to the delegated_messages
6200            class variable.
6201            (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
6202            attributes from instance variables as described with the
6203            delegated_methods class variable.
6204            (MapCanvas.__init__): New instance variable selection holding the
6205            current selection
6206            (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
6207            pass them on to the renderer
6208            (MapCanvas.SetMap): Clear the selection when a different map is
6209            selected.
6210            (MapCanvas.shape_selected): Simple force a complete redraw. The
6211            selection class now takes care of only issueing SHAPES_SELECTED
6212            messages when the set of selected shapes actually does change.
6213            (MapCanvas.SelectShapeAt): The selection is now managed in
6214            self.selection
6215    
6216            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
6217            (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
6218            Unsubscribe, delegate messages according to the delegated_messages
6219            class variable.
6220            (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
6221            attributes from instance variables as described with the
6222            delegated_methods class variable.
6223            (MainWindow.__init__): The interactor as ivar is gone. The
6224            parameter is still there for compatibility. The selection messages
6225            now come from the canvas.
6226            (MainWindow.current_layer, MainWindow.has_selected_layer):
6227            Delegate to the the canvas.
6228            (MainWindow.LayerShowTable, MainWindow.Classify)
6229            (MainWindow.identify_view_on_demand): The dialogs don't need the
6230            interactor parameter anymore.
6231    
6232            * Thuban/UI/tableview.py (TableFrame.__init__)
6233            (LayerTableFrame.__init__, LayerTableFrame.OnClose)
6234            (LayerTableFrame.row_selected): The interactor is gone. It's job
6235            from the dialog's point of view is now done by the mainwindow,
6236            i.e. the parent. Subscribe to SHAPES_SELECTED instead
6237            of SELECTED_SHAPE
6238            
6239            * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
6240            is gone. It's job from the dialog's point of view is now done by
6241            the mainwindow, i.e. the parent.
6242            
6243            * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
6244            gone. It's job from the dialog's point of view is now done by the
6245            mainwindow, i.e. the parent.
6246    
6247            * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
6248            gone. It's job from the dialog's point of view is now done by the
6249            mainwindow, i.e. the parent.
6250            (SessionTreeCtrl.__init__): New parameter mainwindow which is
6251            stored as self.mainwindow. The mainwindow is need so that the tree
6252            can still subscribe to the selection messages.
6253            (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
6254            (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
6255            selection is now accessible through the mainwindow. Subscribe to
6256            SHAPES_SELECTED instead of SELECTED_SHAPE
6257    
6258            * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
6259            SHAPES_SELECTED message now.
6260            (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
6261            so deal with multiple shapes
6262            (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
6263            gone. It's job from the dialog's point of view is now done by the
6264            mainwindow, i.e. the parent.
6265    
6266            * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
6267            parameter is now a list of shape ids.
6268            (RecordTable.SetTable): The second parameter is now a list of
6269            indices.
6270    
6271            * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
6272            selected_shape parameter and ivar to selected_shapes. It's now a
6273            list of shape ids.
6274            (MapRenderer.draw_label_layer): Deal with multiple selected
6275            shapes. Rearrange the code a bit so that the setup and shape type
6276            distinctions are only executed once.
6277    
6278            * test/test_selection.py: Test cases for the selection class
6279    
6280    2003-03-11  Jonathan Coles   <[email protected]>
6281    
6282            * Thuban/Model/load.py: Temporary fix so that the xml reader
6283            doesn't cause Thuban to crash.
6284    
6285            * Thuban/Model/layer.py: Handle the cyclic references between
6286            a layer and its classification better, and be sure to disconnect
6287            the classification from the layer when the layer is destroyed
6288            so that we don't maintain a cyclic reference that may not be
6289            garbage collected.
6290    
6291            * Thuban/Model/classification.py: See comment for layer.py.
6292    
6293    2003-03-12  Jan-Oliver Wagner <[email protected]>
6294    
6295            * HOWTO-Release: New. Information on the steps for releasing
6296            a new version of Thuban.
6297    
6298    2003-03-11  Jonathan Coles   <[email protected]>
6299    
6300            * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
6301            Use True instead of true.
6302            (Classifier): Should have a single panel in which all the controls lie.
6303    
6304            * Thuban/UI/proj4dialog.py: Add normal border.
6305    
6306            * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
6307    
6308            * Thuban/UI/mainwindow.py: Use True instead of true.
6309    
6310            * setup.py: Update some definitions to use wxWindows2.4 files
6311    
6312            * Data/iceland_sample_class.thuban: Fixed file so that the
6313            field_type information is present.
6314    
6315    2003-03-10  Jonathan Coles   <[email protected]>
6316    
6317            * Thuban/UI/classifier.py (Classifier.__init__): Make the
6318            field type label grow so that when the text changes the
6319            size is updated correctly. This may be a wxWindows bug.
6320    
6321    2003-03-10  Jonathan Coles   <[email protected]>
6322    
6323            * Thuban/UI/application.py: Changed SESSION_CHANGED to
6324            SESSION_REPLACED.
6325    
6326            * Thuban/UI/classifier.py: Wrap text with _().
6327            (ClassGrid.CreateTable): Set dimensions and size hints here,
6328            instead of in Reset, so we only set the size once.
6329    
6330            * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
6331    
6332            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
6333            Call Close() instead of Shutdown().
6334    
6335            * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
6336    
6337            * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
6338            Go back to using OnClose() instead of Shutdown().
6339    
6340    2003-03-10  Jonathan Coles   <[email protected]>
6341    
6342            * Thuban/UI/classifier.py (Classifier): SelectField() needed
6343            to know the old field index as well as the new one.
6344    
6345    2003-03-10  Jonathan Coles   <[email protected]>
6346    
6347            * Thuban/UI/classifier.py (Classifier): Use __SelectField()
6348            to correctly set the table information and call this from
6349            __init__ and from _OnFieldSelect so that all the information
6350            is up to date when the dialog opens and when a field is changed.
6351    
6352    2003-03-10  Jonathan Coles   <[email protected]>
6353    
6354            * Thuban/Model/classification.py (Classification): Don't use
6355            layer's message function directly, use the ClassChanged() method
6356            when then classification changes. SetField/SetFieldType/SetLayer
6357            must keep the information about field name and field type in
6358            sync when an owning layer is set or removed.
6359    
6360            * Thuban/Model/layer.py: Added ClassChanged() so that the
6361            classification can tell the layer when its data has changed.
6362            (Layer.SetClassification): Accepts None as an arguement to
6363            remove the current classification and correctly handles
6364            adding a new classification.
6365    
6366            * Thuban/Model/load.py: Comment out print statement
6367    
6368            * test/test_classification.py, test/test_save.py: New and
6369            improved tests.
6370    
6371    2003-03-07  Jonathan Coles   <[email protected]>
6372    
6373            * Thuban/Model/classification.py: Implemented __copy__ and
6374            __deepcopy__ for ClassGroup* and ClassGroupProperites so
6375            they can easily be copied by the classifier dialog.
6376            (ClassGroupProperites.__init__): The default line color should
6377            have been Color.Black.
6378    
6379            * Thuban/UI/classifier.py: Setting and Getting table values now
6380            uses a consistent set of functions.
6381            (Classifier): Now non-modal. Has field type label which changes
6382            as the field changes. Keep track of buttons in a list so that
6383            we can enable/disable the buttons when the None field is selected.
6384            (SelectPropertiesDialog): Add buttons to make the colors transparent.
6385    
6386            * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
6387            does what OnClose did, but can be called by the application to
6388            close a window. Needed when a session changes, and we have to
6389            close the classifier windows.
6390    
6391            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
6392            Shuts down open dialogs. Used when a new session is created
6393            or a session is opened.
6394            (MainWindow.SaveSession): Should only call application.SaveSession()
6395            if we don't call SaveSessionAs first.
6396            (MainWindow.Classify): Allow different classifier dialogs for
6397            different layers.
6398    
6399            * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
6400            the parent class handle it. Add Shutdown() to unsubscibe from
6401            event notification and call the parent Shutdown(). This was
6402            necessary so the application can close the tree window.
6403    
6404    2003-03-06  Jonathan Coles   <[email protected]>
6405    
6406            * Thuban/Model/classification.py: Minor documentation changes,
6407            Addition of __eq__ and __ne__ methods.
6408            (Classification.SetLayer): prevent recursion between this method
6409            and Layer.SetClassification().
6410    
6411            * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
6412    
6413            * Thuban/Model/layer.py (SetClassification): prevent recursion
6414            between this method and Classification.SetLayer().
6415    
6416            * test/test_classification.py, test/test_load.py,
6417            test/test_session.py: Fixed and added tests for the classification
6418            classes.
6419    
6420    2003-03-06  Bernhard Herzog  <[email protected]>
6421    
6422            * Thuban/UI/classifier.py (ClassGrid.__init__)
6423            (ClassGrid.CreateTable): Move the SetSelectionMode call to
6424            CreateTable because otherwise it triggers an assertion in
6425            wxPython/wxGTK 2.4.
6426    
6427    2003-03-05  Jonathan Coles   <[email protected]>
6428    
6429            * Thuban/common.py: Move FIELDTYPE constants back to table.py.
6430    
6431            * Thuban/Model/load.py: import FIELDTYPE constants from table.
6432    
6433            * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
6434    
6435            * Thuban/Model/table.py: Put FIELDTYPE constants back.
6436    
6437    2003-03-05  Jonathan Coles   <[email protected]>
6438    
6439            * Thuban/UI/classifier.py: Added class documentation.
6440            Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
6441            Store just the groups in the table and generate the other
6442            column information when it is requested. Add "None" field
6443            to pull-down to select no classification.
6444    
6445            * Thuban/common.py: Moved FIELDTYPE constants from table.py
6446            (Str2Num): Only catch ValueError exceptions.
6447    
6448            * Thuban/Model/classification.py: Class documentation. Renaming
6449            of methods with Stroke to Line. Groups are stored in a single
6450            list with the default as the first element. Groups are searched
6451            in the order they appear in the list.
6452    
6453            * Thuban/Model/color.py: Documentation.
6454    
6455            * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
6456            the kind of data represented by a field.
6457    
6458            * Thuban/Model/load.py (ProcessSession): Use proper string
6459            conversion function; fixes RTbug #1713.
6460    
6461            * Thuban/Model/save.py (Saver): Store field type information.
6462    
6463            * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
6464            (Table): Add field_info_by_name() to retrieve field information
6465            by specifying the field name, not the number.
6466    
6467            * Thuban/UI/mainwindow.py: Function name changes.
6468    
6469            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
6470            get the layer classification once. Don't try to classify
6471            values when the field is None: just use the default properties.
6472    
6473            * Thuban/UI/view.py: Function name changes.
6474    
6475            * Doc/thuban.dtd: Add field_type attribute to a classification.
6476    
6477    2003-03-04  Bernhard Herzog  <[email protected]>
6478    
6479            * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
6480            the fill and stroke layer attributes optional with suitable
6481            default values. Add the stroke_width layer attribute. Use correct
6482            syntax for empty elements. Make the attribute list for labels
6483            refer to the label element.
6484    
6485    2003-03-04  Bernhard Herzog  <[email protected]>
6486    
6487            * setup.py (thuban_build_py.build): Add a comment about distutils in
6488            Python 2.3 containing some of the functionality we implement in
6489            setup.py ourselves.
6490    
6491            * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
6492            before the selection mode. Doing it the other way round triggers
6493            an assertion in wxWindows.
6494    
6495            * Thuban/Model/save.py (escape): Fix typo in doc-string
6496    
6497            * Thuban/Model/classification.py: Remove unnecessary wxPython
6498            import
6499    
6500    2003-03-04  Jonathan Coles   <[email protected]>
6501    
6502            * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
6503            Parameter 'value' should default to None.
6504    
6505            * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
6506            the class attribute __classification is now private.
6507    
6508            * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
6509            Classifier to ClassGrid. Added support for removing selected rows,
6510            which including code for keeping track of when cells are selected,
6511            and deselected.
6512            (ClassTable): Support for added/removing rows. Fixed a problem
6513            with __ParseInput whereby it would not allow strings (only numbers)
6514            to be entered.
6515            (Classifier): Added button and supporting code for removing
6516            selected rows.
6517    
6518    2003-02-27  Jonathan Coles   <[email protected]>
6519    
6520            * Thuban/common.py: Moved color conversion functions into
6521            Thuban/UI/common.py.
6522            (Str2Num): Now converts the float (not the string) to a long/int
6523            so that an exception isn't thrown.
6524    
6525            * Thuban/UI/common.py: Common functions used in several UI modules
6526    
6527            * Thuban/Model/classification.py: Changed the class hierarchy
6528            so that a Classification consists of Groups which return
6529            Properties when a value matches a Group.
6530    
6531            * Thuban/Model/layer.py: Fixed name resolution problem.
6532    
6533            * Thuban/Model/load.py: Use new Classification and Group functions.
6534    
6535            * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
6536            failure.
6537            (Saver.write_classification): Use new Classification and Group
6538            functions.
6539    
6540            * Thuban/UI/classifier.py: Changes to use new Classification and Group
6541            functions. Fix to create a tuple with a single value instead of
6542            simply returning the value.
6543    
6544            * Thuban/UI/renderer.py: Use new Classification and Group functions.
6545            Use common.py functions.
6546    
6547            * Thuban/UI/tree.py: Use common.py functions.
6548            
6549            * test/test_classification.py: Use new Classification and Group
6550            classes.
6551    
6552    2003-02-24  Jonathan Coles   <[email protected]>
6553    
6554            * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
6555            functions from Thuban color objects to wxWindow colour objects.
6556    
6557            * Thuban/Model/classification.py (Classification): Renamed
6558            GetProperties() to GetClassData(). Used the new iterator
6559            in TreeInfo().
6560            (ClassIterator): Iterator implementation to iterate over the
6561            ClassData objects in a classification object.
6562    
6563            * Thuban/Model/save.py (Saver.write_classificaton): Uses
6564            the new iterator to save the classification information.
6565    
6566            * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
6567            for changing the stroke and fill colors and previewing the
6568            changes.
6569    
6570            * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
6571            MainWindow.SaveSessionAs): Text string changes so the dialogs
6572            have more meaningful titles.
6573    
6574            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
6575            Classification method name from GetProperties to GetClassData.
6576    
6577            * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
6578            instead of accessing now non-existent class variables.
6579    
6580    2003-02-24  Bernhard Herzog  <[email protected]>
6581    
6582            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
6583            unneeded Shape() call. Rendering is substantially faster without
6584            it and it avoids some problems with broken shape files.
6585    
6586    2003-02-20  Frank Koormann   <[email protected]>
6587    
6588            Force minimal size of identify and label dialogs. The autosizing
6589            looked too ugly.
6590    
6591            * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
6592            * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
6593            Set size of listctrl.
6594            * Thuban/UI/identifyview.py (IdentifyView.__init__):
6595            Set size of dialog.
6596    
6597    2003-02-19  Jonathan Coles   <[email protected]>
6598    
6599            * test/test_classification.py, test/test_layer.py,
6600            test/test_load.py, test/test_map.py, test/test_session.py:
6601            Updated the tests to use the new functions that are in the
6602            respective classes.
6603    
6604            * Thuban/Model/classification.py (Classification):
6605            Uses the new ClassData* classes. Modification messages are
6606            passed up to the parent layer (if it exists).
6607            (ClassData): New class to encapsulate the common data in each
6608            classification property.
6609            (ClassDataDefault): Represents the Default class. data.
6610            (ClassDataPoint): Represents a single class. data point
6611            (ClassDataRange): Represents a class. range
6612            (ClassDataMap): Represents a class. map (unused).
6613    
6614            * Thuban/Model/color.py: Added Color.None to represent something
6615            with no color. Color.Black represents the color black.
6616            (NoColor): Helper class derived from Color to represent something
6617            with no color.
6618    
6619            * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
6620            stroke_width attributes. Made the 'classification' attribute private.
6621            New methods for setting/getting the classification.
6622    
6623            * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
6624            to get the classifcation and use the new ClassData* classes to
6625            hold the classification data. Use Str2Num to convert numbers
6626            properly.
6627    
6628            * Thuban/Model/save.py (Saver): Use new Color and Classification
6629            methods
6630    
6631            * Thuban/UI/classifier.py (ClassGrid): New class to represent a
6632            custom grid.
6633            (ClassTable): Support for editing Values and Labels and for
6634            changing what type (point or range) of data is stored in each
6635            property based on how the user enters the data.
6636            (Classifier): Support for saving the new classifications and
6637            launching the dialog to edit a property.
6638            (SelectPropertiesDialog): New class for editing the visual
6639            properties of a classification (stroke color, width, and fill color)
6640            (ClassPreviewer): Took the Draw method from ClassRenderer and
6641            made most of it into this new class. Intend to use this class in
6642            the SelectPropertiesDialog for previewing changes.
6643    
6644            * Thuban/UI/renderer.py: Use new Color and Classification methods.
6645    
6646            * Thuban/UI/tree.py: Formatting changes.
6647    
6648            * Doc/thuban.dtd: Add 'label' element
6649    
6650            * Thuban/common.py: New. Contains common routines used throughout
6651            the code.
6652            (Str2Num): Takes a string and converts it to the "best" type of
6653            number.
6654    
6655    2003-02-14  Bernhard Herzog  <[email protected]>
6656    
6657            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
6658            dragging flag is always set to 0 even when the tool implementation
6659            raises an exception
6660    
6661    2003-02-11  Bernhard Herzog  <[email protected]>
6662    
6663            * Thuban/UI/application.py (ThubanApplication.splash_screen): New
6664            method to create a splash screen.
6665            (ThubanApplication.ShowMainWindow): New. Show the main window.
6666            Needed so the splash screen can display the mainwindow
6667            (ThubanApplication.OnInit): Call the
6668            new splash_screen method to determine whether the application
6669            should display a splash screen. If it displays a splash screen do
6670            not immediately show the main window.
6671    
6672    2003-02-11  Jonathan Coles  <[email protected]>
6673    
6674            * Thuban/Model/classification.py: Added import line to fix
6675            feature conflicts between running on python2.2 and python2.1.
6676    
6677            * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
6678            onto the clinfo parameter, so removed the deepcopy().
6679    
6680    2003-02-10  Jonathan Coles  <[email protected]>
6681    
6682            * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
6683            Added element_open variable to track opening and closing of tags
6684            so that tags that don't span more than one line are closed with
6685            /> instead of </tag_name>. Use the GetDefault*() methods of
6686            the Classification class.
6687    
6688            * Thuban/Model/classification.py (Classificaton): Added set and
6689            get methods for the default data. The class also takes a layer
6690            reference so that modification messages can be sent. Fixed the
6691            methods to use the new ClassData class.
6692            (ClassData): New class to encapsulate the classification data
6693    
6694            * Thuban/Model/layer.py (Layer): Remove the
6695            Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
6696            SetDefault*() methods on the layer's classification object.
6697            (Layer.__init__): Use the new SetDefault*() methods in the
6698            Classification class.
6699    
6700            * Thuban/Model/load.py (ProcessSession): Use the new ClassData
6701            object instead of a dictionary.
6702    
6703            * Thuban/UI/classifier.py (ClassRenderer): New class to
6704            draw the classifications in the dialog box's table.
6705            (Classifier): Modified to use the ClassRenderer class.
6706    
6707            * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
6708            methods of the Classification class.
6709    
6710            * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
6711            of the ClassData class.
6712    
6713            * test/test_classification.py, test/test_layer.py,
6714            test/test_map.py, test/test_session.py: Fix the tests to work
6715            with the above code changes.
6716    
6717    2003-02-03  Jonathan Coles  <[email protected]>
6718    
6719            * Thuban/Model/classification.py (Classification): Added getNull()
6720            to return the NullData reference
6721    
6722            * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
6723            Layer.SetStrokeWidth): Modified these functions to change the
6724            null data in the classification rather than keep these values
6725            directly in the Layer class. Menu options to change these values
6726            work again.
6727    
6728    2003-01-28  Jonathan Coles  <[email protected]>
6729    
6730            * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
6731            Fixed crashing problem on some systems. Dialog box shows
6732            classification data.
6733    
6734            * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
6735            Colors in the tree view.
6736    
6737            * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
6738            the tree info for classifications. Commented out unnecessary lines.
6739    
6740            * Thuban/Model/classification.py (Classification.TreeInfo): New
6741            function to add information about the classification into the
6742            tree view.
6743    
6744    2003-01-27  Jan-Oliver Wagner <[email protected]>
6745    
6746            * Thuban/__init__.py (_): New.
6747    
6748            * Thuban/Model/classification.py, Thuban/Model/extension.py,
6749            Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
6750            Thuban/Model/session.py, Thuban/UI/application.py,
6751            Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
6752            Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
6753            Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
6754            Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
6755            Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
6756    
6757    2003-01-27  Jonathan Coles  <[email protected]>
6758    
6759            * Thuban/Model/layer.py: Classification initialization calls.
6760    
6761            * Thuban/Model/classification.py: Created class to encapsulate
6762            a layer classification. Supports specific data points and
6763            ranges.
6764    
6765            * Thuban/Model/load.py: Added support for loading classification
6766            information.
6767    
6768            * Thuban/Model/save.py: Added support for saving classification
6769            information.
6770    
6771            * Thuban/UI/classifier.py: Initial class for a dialog box for
6772            specifying classification information.
6773    
6774            * Thuban/UI/mainwindows.py: Support for opening the classifier
6775            dialog.
6776    
6777            * Thuban/UI/renderer.py: Support for drawing a layer with the
6778            classification information.
6779    
6780            * Data/iceland_sample_class.thuban: iceland_sample with
6781            classification data.
6782    
6783            * test/test_classification: Tests for the Classification class.
6784    
6785    2002-12-09  Bernhard Herzog  <[email protected]>
6786    
6787            * test/test_command.py: New. Tests for the command classes.
6788    
6789            * Thuban/UI/command.py (ToolCommand): New class for tool commands.
6790            (Command.IsTool): New method to distinguish between command
6791            switching tools and other commands.
6792    
6793            * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
6794            the tool to avoid direct assignments to instance variables
6795            (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
6796            (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
6797            change the tool
6798    
6799            * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
6800            active tool's command turns insensitive, disable the tool.
6801            (_tool_command): Use the new ToolCommand class
6802    
6803            * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
6804            SelectTool method to change the tool
6805            (iconfile): Use the ToolCommand class
6806    
6807    2002-12-03  Bernhard Herzog  <[email protected]>
6808    
6809            * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
6810            the case of selected items that are not children of Layers or Maps
6811            properly. Previously this bug would trigger an assertion in
6812            wxWindows.
6813    
6814    2002-11-06  Frank Koormann  <[email protected]>
6815    
6816            * Thuban/UI/mainwindow.py: Altered the order of tools in the
6817            toolbar: First now are all navigation tools (Zoom In/Out, Pan,
6818            Full Extent).
6819    
6820    2002-10-23  Bernhard Herzog  <[email protected]>
6821    
6822            * setup.py (setup call): version now 0.1.3
6823    
6824            * MANIFEST.in: Add the files in test/
6825    
6826            * test/README: Add note about tests requiring the iceland data
6827    
6828            * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
6829            copyright notice.
6830    
6831    2002-10-18  Bernhard Herzog  <[email protected]>
6832    
6833            * test/test_map.py
6834            (TestMapWithContents.test_projected_bounding_box): Use an explicit
6835            epsilon.
6836    
6837            * test/support.py (FloatComparisonMixin.assertFloatEqual)
6838            (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
6839            message if the assertion fails and don't return the return value
6840            of self.assert_. In assertFloatSeqEqual the return meant that not
6841            all items of the sequence were compared.
6842    
6843    2002-09-20  Bernhard Herzog  <[email protected]>
6844    
6845            * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
6846    
6847            * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
6848    
6849            * test/test_map.py (TestMapWithContents.test_tree_info): Create
6850            the string with the bounding box on the fly because of platform
6851            differences in the way %g is handled.
6852    
6853            * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
6854            DBFfile too because Thuban layers can't yet cope missing DBF
6855            files.
6856    
6857    2002-09-20  Bernhard Herzog  <[email protected]>
6858    
6859            * test/test_menu.py: Use initthuban instead of
6860            add_thuban_dir_to_path to initialize Thuban.
6861    
6862            * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
6863            Mixin class for float comparisons
6864            (SubscriberMixin): New. Mixin class to test messages sent through
6865            the Connector class
6866    
6867            * test/README: Fix a typo and add the -v flag to the command for
6868            individual tests
6869    
6870            * test/test_session.py: New. Test cases for Thuban.Model.session
6871    
6872            * test/test_proj.py: New. Test cases for Thuban.Model.proj
6873    
6874            * test/test_map.py: New. Test cases for Thuban.Model.map
6875    
6876            * test/test_layer.py: New. Test cases for Thuban.Model.layer
6877    
6878            * test/test_label.py: New. Test cases for Thuban.Model.label
6879    
6880            * test/test_connector.py: New. Test cases for Thuban.Lib.connector
6881    
6882            * test/test_color.py: New. Test cases for Thuban.Model.color
6883    
6884            * test/test_base.py: New. Test cases for Thuban.Model.base
6885    
6886    2002-09-13  Bernhard Herzog  <[email protected]>
6887    
6888            * Thuban/Model/session.py (Session.forwarded_channels): Forward
6889            the CHANGED channel too.
6890    
6891            * Thuban/Model/map.py (Map.forwarded_channels): Forward the
6892            CHANGED channel too.
6893            (Map.__init__): Call the Modifiable constructor as well.
6894    
6895            * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
6896            event if the modified flag changes.
6897            (Modifiable.changed): Tweak the doc-string.
6898    
6899            * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
6900            (MainWindow.set_position_text): Put the code that puts the text
6901            with the mouse position into the status bar into the new method
6902            set_position_text so that it can overwritten in derived classes.
6903    
6904    2002-09-12  Bernhard Herzog  <[email protected]>
6905    
6906            * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
6907            message box on the main window.
6908    
6909    2002-09-11  Bernhard Herzog  <[email protected]>
6910    
6911            * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
6912            the 'E' because it's less likely to interfere with other menu
6913            entries.
6914            (MainWindow.build_menu): remove an incorrect comment.
6915    
6916    2002-09-10  Bernhard Herzog  <[email protected]>
6917    
6918            * Thuban/UI/mainwindow.py (MainWindow.Map): New.
6919            (_tool_command): Add sensitive parameter
6920            (_has_visible_map): Sensitivity callback to tools and other
6921            commands that require a visible map. Use it in map_zoom_in_tool,
6922            map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
6923            and map_full_extent
6924    
6925    2002-09-06  Bernhard Herzog  <[email protected]>
6926    
6927            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
6928            VIEW_POSITION
6929    
6930    2002-09-04  Frank Koormann  <[email protected]>
6931    
6932            * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
6933    
6934    2002-09-02  Bernhard Herzog  <[email protected]>
6935    
6936            * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
6937            wxWindows already and our implementation doesn't work correctly
6938            with wxGTK 2.3:
6939            (MapCanvas.__init__): Remove the instance variable
6940            (MapCanvas.OnPaint): Always call do_redraw when there's a map to
6941            be drawin
6942            (MapCanvas.OnIdle): Removed.
6943    
6944            * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
6945            a parameter to determine the size of the rectangle.
6946            (MapCanvas.find_shape_at): Create the box around the point on a
6947            layer by layer basis and make the size depend on the shape type.
6948            This solves a problem with the selection of point shapes at the
6949            border of the layer's bounding box
6950    
6951    2002-08-30  Bernhard Herzog  <[email protected]>
6952    
6953            * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
6954            for the sensitivity  of remove layer.
6955            (_can_remove_layer): New. Sensitivity callback for remove layer
6956            (Command layer_remove): Use _can_remove_layer
6957    
6958            * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
6959            determine whether a given layer can be deleted.
6960    
6961            * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
6962            (MapCanvas.do_redraw): Get rid of the unused update_region
6963            instance variable
6964    
6965            * Thuban/UI/view.py: Add/update some doc-strings.
6966    
6967            * test/: new subdirectory with a bunch of unit tests.
6968    
6969            * test/README, test/test_table.py, test/test_save.py,
6970            test/test_menu.py, test/test_load.py: Initial set of tests and
6971            brief instructions on how to run them
6972    
6973    2002-08-29  Bernhard Herzog  <[email protected]>
6974    
6975            * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
6976            arcs with multiple parts.
6977    
6978            * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
6979            Handle degenrate rectangles.
6980    
6981            * Thuban/Model/table.py: Make writing records work correctly:
6982            (Table.__init__): Keep track of whether the DBF is open for
6983            writing
6984            (Table.write_record): Open the DBF file for writing when necessary
6985    
6986    2002-08-27  Bernhard Herzog  <[email protected]>
6987    
6988            * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
6989            dbf files only for reading by default. Use a new writable dbf
6990            object for writing.
6991    
6992    2002-08-26  Bernhard Herzog  <[email protected]>
6993    
6994            * Thuban/UI/mainwindow.py: Refactor the context creation:
6995            (MainWindow.Context): New method to return a context
6996            (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
6997            new method
6998    
6999            * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
7000            layer table specific code from TableGrid into LayerTableGrid
7001            (TableFrame, LayerTableFrame): Split the layer table specific code
7002            from TableFrame into LayerTableFrame
7003            (LayerTableGrid.select_shape): Remove a debug print
7004    
7005            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
7006            LayerTableFrame
7007    
7008    2002-08-23  Bernhard Herzog  <[email protected]>
7009    
7010            * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
7011            absolute filename.
7012    
7013    2002-08-22  Bernhard Herzog  <[email protected]>
7014    
7015            * Thuban/Model/table.py (Table.write_record): New method to write
7016            records.
7017            (Table.__init__): Open the DBF file for writing too.
7018    
7019            * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
7020            into the underlying table.
7021    
7022            * extensions/shapelib/shapefil.h (DBFCommit),
7023            extensions/shapelib/dbfopen.c (DBFCommit): New API function to
7024            commit any changes made to the DBF file.
7025    
7026            * Thuban/UI/mainwindow.py (make_check_current_tool)
7027            (_tool_command): Put the code that generates the "checked"
7028            callback into a separate function so that we can reuse it
7029            elsewhere
7030    
7031            * Thuban/Model/save.py (Saver): New class to handle serializing a
7032            session into an XML file. The main reason to introduce a class is
7033            that applications built on Thuban can derive from it so that they
7034            can save additional information in a session file.
7035            (save_session): Delegate almost all the work to the Saver class.
7036            Rename the filename argument to file because it may be a file like
7037            object now.
7038    
7039            * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
7040            code. Remove the little test code which would be executed when the
7041            module is run as a script which didn't work anymore since it can't
7042            import the other Thuban modules.
7043            (ProcessSession, load_session): Refactor the ProcessSession to
7044            have one method for each element start and end tag so that derived
7045            classes can easily override the processing of individual tags.
7046            Also, always parse with namespaces enabled because applications
7047            built on top of Thuban will likely use namespaces if they extend
7048            the session file format.
7049    
7050    2002-08-21  Bernhard Herzog  <[email protected]>
7051    
7052            * setup.py (ThubanInstall.run): Don't repr install_lib_orig
7053            because thubaninit_contents will do it for us.
7054    
7055    2002-08-16  Jan-Oliver Wagner <[email protected]>
7056    
7057            * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
7058            tree window already open
7059    
7060    2002-08-15  Bernhard Herzog  <[email protected]>
7061    
7062            * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
7063            with self.
7064    
7065            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
7066            when we have actually captured it.
7067    
7068            * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
7069            shapefile and destroy the table.
7070    
7071            * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
7072    
7073    2002-08-14  Bernhard Herzog  <[email protected]>
7074    
7075            * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
7076            instance variable columns
7077            (RecordTable.GetTypeName): row and col may be negative in some
7078            cases.
7079    
7080            * setup.py (InstallLocal.initialize_options)
7081            (InstallLocal.finalize_options, InstallLocal.user_options): New
7082            option create-init-file to build a thubaninit.py when running
7083            install_local
7084            (InstallLocal.run): Create the thubaninit.py module when requested
7085            (thubaninit_contents): Split the template into several parts and
7086            create a new function thubaninit_contents that creates the
7087            contents of a thubaninit module.
7088            (ThubanInstall.run): Use the new function to create the thubaninit
7089            module.
7090    
7091    2002-07-30  Bernhard Herzog  <[email protected]>
7092    
7093            * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
7094            cleanup.
7095            (ThubanApplication.MainLoop): Extend to automatically call OnExit.
7096    
7097            * Thuban/Model/session.py (Session.Destroy): Don't bypass the
7098            direct base class' Destroy method.
7099    
7100            * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
7101            layers.
7102            (Map.Destroy): Destroy the label_layer as well and call the
7103            inherited Desatroymethod first so that no more messages are
7104            issued.
7105            (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
7106            message if the stacking order actually has changed. Add
7107            doc-strings.
7108            (Map.BoundingBox): Correct the doc-string.
7109            (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
7110            (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
7111    
7112            * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
7113            all labels.
7114    
7115    2002-07-29  Bernhard Herzog  <[email protected]>
7116    
7117            * Thuban/Model/map.py (Map.subscribe_layer_channels)
7118            (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
7119            to a layer's channels into separate methods.
7120            (Map.RemoveLayer, Map.AddLayer): Call the new methods
7121            (Map.Destroy): Unsubscribe from a layer's channels before
7122            destroying it.
7123    
7124            * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
7125            selected_layer parameter to searched_layer which is the layer to
7126            search in.
7127            (MapCanvas.SelectShapeAt): New parameter layer to restrict the
7128            search to that layer. Return the selected layer and shape.
7129    
7130            * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
7131            typo
7132    
7133    2002-07-24  Bernhard Herzog  <[email protected]>
7134    
7135            * Thuban/UI/application.py (ThubanApplication.create_session):
7136            Extend the doc string.
7137            (ThubanApplication.subscribe_session)
7138            (ThubanApplication.unsubscribe_session): New methods to
7139            subscribe/unsubscribe to/from session channels.
7140            (ThubanApplication.SetSession): Call the new methods here.
7141            (ThubanApplication.maps_changed, ThubanApplication.set_map):
7142            Renamed set_map to maps_changed. Its now a subscriber for
7143            MAPS_CHANGED.
7144    
7145            * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
7146            x-coordinate in case of simple clicks
7147    
7148            * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
7149            don't pass it as a parameter
7150    
7151            * Thuban/Model/session.py (Session.RemoveMap): New
7152    
7153            * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
7154            window size into a parameter.
7155    
7156    2002-07-23  Bernhard Herzog  <[email protected]>
7157    
7158            * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
7159            just commands.
7160    
7161            * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
7162            parameter list a bit to allow setting the window title and the
7163            initial message in the status bar. Update the callers.
7164    
7165            * Thuban/UI/application.py (ThubanApplication.OnInit)
7166            (ThubanApplication.CreateMainWindow): Put the mainwindow
7167            instantiation into a separate method so that it can be overridden
7168            by a subclass.
7169    
7170    2002-07-19  Bernhard Herzog  <[email protected]>
7171    
7172            * Thuban/Model/session.py: Issue a CHANGED message every time
7173            another changed message is issued to make it easier to get
7174            notified of changes.
7175            (Session): Update the doc string
7176            (Session.forward): Issue changed-events as CHANGED as well.
7177            (Session.changed): Overwrite the inherited version to issue
7178            CHANGED events as well.
7179    
7180            * Thuban/UI/tree.py: We can now simply subscribe to the session's
7181            CHANGED channel to be informed of changes.
7182            (SessionTreeCtrl.session_channels): Not needed any longer.
7183            (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
7184            Only have to (un)subscribe CHANGED
7185    
7186            * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
7187    
7188            * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
7189            for the wxPython locale bug to __init__.py so that it's
7190            automatically executed by anybody using UI code from Thuban.
7191    
7192    2002-07-18  Bernhard Herzog  <[email protected]>
7193    
7194            * Thuban/UI/main.py (main): app no longer needs to be global
7195    
7196            * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
7197            as parameter and store it in an instance variable
7198            (MainWindow.invoke_command, MainWindow.update_command_ui)
7199            (MainWindow.save_modified_session, MainWindow.NewSession)
7200            (MainWindow.OpenSession, MainWindow.SaveSession)
7201            (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
7202            application object.
7203    
7204            * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
7205            the main window with self.
7206    
7207            * Thuban/UI/context.py: New module with the context class
7208    
7209            * Thuban/UI/command.py (Command): Update doc string.
7210    
7211            * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
7212            MainWindow.update_command_ui): Pass an instance of the context
7213            class to the command's methods
7214            (check_current_tool, call_method): Handle the new context
7215            implementation
7216    
7217            * Examples/simple_extensions/simple_tool.py (simple_tool,
7218            check_simple_tool): Handle the new context implementation
7219    
7220            * Examples/simple_extensions/simple_command.py (simple_command):
7221            Handle the new context implementation. Update the comments about
7222            the context.
7223    
7224            * Thuban/UI/application.py (ThubanApplication.SetSession): Add
7225            doc-string
7226            (ThubanApplication.Session): New method to return the session
7227            object
7228    
7229            * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
7230            interactor's selected_layer may not be a layer of the current
7231            session when the tree is updated while a new session is being set.
7232    
7233    2002-07-17  Bernhard Herzog  <[email protected]>
7234    
7235            * Thuban/UI/tree.py (color_string): Removed. No longer used.
7236            (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
7237            update_tree into update_tree and add_items. The tree now uses a
7238            more generic way to display the contents of the tree.
7239            (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
7240    
7241            * Thuban/Model/layer.py (Layer.TreeInfo),
7242            Thuban/Model/extension.py (Extension.TreeInfo),
7243            Thuban/Model/map.py (Map.TreeInfo),
7244            Thuban/Model/session.py (Session.TreeInfo):
7245            Add TreeInfo methods to implement the new tree view update scheme
7246    
7247    2002-07-16  Bernhard Herzog  <[email protected]>
7248    
7249            * Thuban/UI/application.py: Don't use "import from" for the
7250            MainWindow. It can't always be resolved.
7251            (ThubanApplication.OnInit): change reference to MainWindow
7252            accordingly.
7253    
7254            * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
7255            completely
7256    
7257    2002-07-10  Bernhard Herzog  <[email protected]>
7258    
7259            * setup.py (create_init_module): New configurable variable whose
7260            default depends on the platform we're running on.
7261            (ThubanInstall.initialize_options): Initialize
7262            self.create_init_module from the global create_init_module
7263            (ThubanInstall.user_options): indictate that the options
7264            create-init-module and init-module-dir have arguments.
7265    
7266            * setup.py: In the setup call change the version number to include
7267            cvs.
7268    
7269            * MANIFEST.in: Add the files in Examples
7270    
7271    2002-07-09  Bernhard Herzog  <[email protected]>
7272    
7273            * setup.py: In the setup call, use the thuban homepage as the
7274            value of the url parameter.
7275    
7276            * Examples: New subdirectory for examples.
7277    
7278            * Examples/simple_extensions/simple_tool.xpm,
7279            Examples/simple_extensions/simple_tool.py,
7280            Examples/simple_extensions/simple_command.py,
7281            Examples/simple_extensions/README: Simple examples showing how to
7282            add new commands and tools.
7283    
7284            * setup.cfg (bdist_rpm): Add the default value for prefix and tell
7285            bdist_rpm that we also have an install script.
7286            (bdist_inno): Add 2002 to the copyright notice.
7287    
7288            * setup.py: Create a file in python's site-packages directory to
7289            make installation of Thuban as a library easier.
7290            (ThubanInstall.user_options): Add two new options,
7291            create-init-module and init-module-dir
7292            (ThubanInstall.expand_with_pure_python_dirs): New method to expand
7293            filenames for installation in the default directories.
7294            (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
7295            the inherited methods to capture some filenames before they're
7296            transformed too much by distutils.
7297            (ThubanInstall.run): Create the init module if requested.
7298            (ThubanInstall.thuban_init_filename): New method to return the
7299            full name of the init module.
7300            (ThubanInstall.get_outputs): Append the filename of the init
7301            module.
7302    
7303    2002-07-08  Bernhard Herzog  <[email protected]>
7304    
7305            * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
7306            handle the prefix properly which means that the default for the
7307            installation prefix should be /usr for RPMs and /usr/local when
7308            doing a normal source install.
7309            (bdist_rpm_install_script): Script to override the default install
7310            commands in the specfile generated by the bdist_rpm command.
7311            (thuban_bdist_rpm.user_options): Add a prefix option
7312            (thuban_bdist_rpm.initialize_options): Init the prefix option.
7313            Create the script files for the spec files as empty files here
7314            (thuban_bdist_rpm._make_spec_file): Override the inherited method
7315            to fill the script files with content.
7316    
7317            * Thuban/Model/save.py (relative_filename): Wrapper around
7318            Thuban.Lib.fileutil.relative_filename that accepts an empty dir
7319            argument. save_session now automatically uses this version,
7320            solving a problem when saving to a relative filename.
7321    
7322            * setup.py: In the setup call, make sure that the library
7323            directories are under $prefix/lib not directly under $prefix.
7324    
7325    2002-06-20  Jan-Oliver Wagner <[email protected]>
7326    
7327            * Thuban/Model/extension.py: new module to handle extension objects.
7328            * Thuban/Model/messages.py: new messages for extensions.
7329            * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
7330            Session.AddExtension): new for handling extensions.
7331            Also some other minor changes to round up extension handling.
7332            * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
7333            of Extension titles and title and names of its objects.
7334    
7335    2002-05-29  Bernhard Herzog  <[email protected]>
7336    
7337            * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
7338            the events for a command.
7339            (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
7340            Call bind_command_events to bind the events. add_toolbar_command
7341            can now bind events too so that it's possible to have commands
7342            that are only available through the toolbar.
7343            (MainWindow.init_ids): New instance variable events_bound to keep
7344            track of for which commands events have been bound.
7345    
7346    2002-05-28  Bernhard Herzog  <[email protected]>
7347    
7348            * Thuban/UI/menu.py: New module to build and manage menus.
7349    
7350            * Thuban/UI/mainwindow.py: Remove some unused imports.
7351            (MainWindow.__init__, main_menu): move the definition of the main
7352            menu from __init__ to the Menu instance main_menu.
7353            (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
7354            build the menu bar and sub-menus from a menu description.
7355    
7356            * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
7357            startup file
7358            (ThubanApplication.read_startup_files): New method to run
7359            ~/.thuban/thubanstart.py
7360    
7361            * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
7362            Move the toolbar definition to the Menu instance main_toolbar.
7363            (MainWindow.build_toolbar): New method to build the toolbar
7364            similar to the build_menu methods
7365    
7366    2002-05-23  Bernhard Herzog  <[email protected]>
7367    
7368            * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
7369            layer_outline_color. Fix it in the definition of the command too.
7370    
7371            * Thuban/UI/command.py (Command): Fix typo in doc string
7372    
7373    2002-05-22  Bernhard Herzog  <[email protected]>
7374    
7375            * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
7376            in the docstring
7377    
7378    2002-05-15  Bernhard Herzog  <[email protected]>
7379    
7380            * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
7381            when the shapefile is empty.
7382            (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
7383            now return None for empty shapefiles. Update doc-strings.
7384    
7385            * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
7386            the layer's bbox being None.
7387    
7388            * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
7389            layer's bbox being None.
7390    
7391            * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
7392            necessary.
7393            (MapCanvas.__init__): New instance variables, last_selected_layer
7394            and last_selected_shape to determine how the selection has
7395            changed.
7396    
7397            * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
7398            AutoSizeColumns because it will cause a traversal of the entire
7399            table which for large .dbf files will take a very long time.
7400    
7401    2002-05-14  Bernhard Herzog  <[email protected]>
7402    
7403            * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
7404            maximum depth for the tree than shapelib does by default.
7405    
7406    2002-05-10  Bernhard Herzog  <[email protected]>
7407    
7408            * setup.py (py_modules): The shptree modules doesn't have a
7409            wrapper, so don't include it in the py_modules
7410    
7411    2002-05-08  Bernhard Herzog  <[email protected]>
7412    
7413            * extensions/shapelib/shptree.c (compare_ints): Make arguments
7414            const void * as in the qsort prototype
7415            (SHPTreeFindLikelyShapes): Remove some unused variables.
7416    
7417            * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
7418            maintains to redraw the window during a drag.
7419            (MapCanvas.unprojected_rect_around_point): New method to determine
7420            a small region around a point for hit-testing.
7421            (MapCanvas.find_shape_at): Only test the shapes in a small region
7422            around the point.
7423    
7424            * setup.py: Increment the version to 0.1.2
7425    
7426            * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
7427            debug print and set session to None after unsubscribing
7428    
7429    2002-05-07  Bernhard Herzog  <[email protected]>
7430    
7431            * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
7432            the file to have a .thuban extension.
7433    
7434            * Thuban/UI/tree.py (session_channels): New class constant with
7435            all the session channels to subscribe to to update the tree
7436            (SessionTreeCtrl.session_changed): Remember the session so that we
7437            can unsubscribe properly. Use the new class constant to
7438            unsubscribe from the old session and subscribe to the new one.
7439            (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
7440            subscriptions of the SessionTreeCtrl.
7441            (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
7442    
7443            * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
7444            Session Tree" command to the file menu.
7445    
7446            * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
7447            as update_region to the renderer.
7448    
7449            * Thuban/UI/renderer.py
7450            (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
7451            update box is now directly a tuple, not a wxRect anymore.
7452    
7453            * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
7454            prints.
7455    
7456    2002-05-07  Bernhard Herzog  <[email protected]>
7457    
7458            * setup.py: Add the shptree extension module. See
7459            extensions/pyshapelib/ChangeLog for more details.
7460    
7461            * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
7462            extensions/shapelib/dbfopen.c: Really update to the versions of
7463            shapelib 1.2.9. For some reason it wasn't really done on
7464            2002-04-11.
7465    
7466            * extensions/shapelib/shptree.c: Modified version of shptree.c of
7467            shapelib 1.2.9. The only real difference is the use of qsort
7468            instead of a bubble sort implementation
7469    
7470            * Thuban/Model/layer.py (Layer.__init__): New instance variable
7471            shapetree to hold the shapelib quadtree for the shapefile
7472            (Layer.open_shapefile): Create the quad tree.
7473            (Layer.ShapesInRegion): New method to return the ids of shapes in
7474            a given region using the quad tree.
7475    
7476            * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
7477            comment
7478            (draw_polygon_shape): Accept both arcs and polygons.
7479            (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
7480            the api.
7481    
7482            * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
7483            return the shape ids to be rendered in a given layer.
7484            (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
7485            ids. Use draw_polygon_shape to draw arc shapes as well.
7486            (ScreenRenderer.RenderMap): New parameter for the rectangle that
7487            has to be updated
7488            (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
7489            calling it's ShapesInRegion method.
7490    
7491            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
7492            update_region for the update region.
7493            (MapCanvas.OnPaint): Maintain the update region
7494            (MapCanvas.do_redraw): Pass the bounding box of the update_region
7495            to the renderer when drawing the bitmap. Reset the update_region.
7496    
7497    2002-05-03  Bernhard Herzog  <[email protected]>
7498    
7499            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
7500            MainWindow.OpenSession): Change the file extension of the session
7501            files to .thuban
7502    
7503            * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
7504            Move the map channels to be forwarded by the session into the
7505            class constant with forwarded_channels. Also add
7506            LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
7507            forwarded_channels
7508    
7509            * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
7510            typo and some rewording).
7511    
7512    2002-05-02  Bernhard Herzog  <[email protected]>
7513    
7514            * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
7515            around to speed up most redraws:
7516            (MapCanvas.__init__): New instance variable bitmap which holds the
7517            bitmap
7518            (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
7519            self.bitmap to draw.
7520            (MapCanvas.full_redraw): New method to force a full redraw
7521            including the bitmap
7522            (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
7523            make sure the bitmap is redrawn.
7524            (MapCanvas.projection_changed, MapCanvas.set_view_transform,
7525            MapCanvas.shape_selected): Call full_redraw instead of readraw to
7526            make sure the bitmap is redrawn.
7527            (MapCanvas.OnSize): New method to handle size events so that the
7528            bitmap can be redrawn.
7529    
7530    2002-04-29  Bernhard Herzog  <[email protected]>
7531    
7532            * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
7533            canvas' VIEW_POSITION event
7534            (MainWindow.view_position_changed): Handler for VIEW_POSITION.
7535            Update the text in the status-bar accordingly.
7536    
7537            * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
7538            (MapCanvas.__del__): Implement because Publisher.__del__ has to be
7539            called.
7540            (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
7541            current_position
7542            (MapCanvas.set_current_position): New method to set
7543            current_position. Issue a VIEW_POSITION event
7544            (MapCanvas.CurrentPosition): New public method to return the value
7545            of current_position. Should be called when the VIEW_POSITION event
7546            is processed.
7547            (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
7548            Update the position.
7549            (MapCanvas.OnLeaveWindow): Set the position to None.
7550    
7551            * Thuban/UI/messages.py (VIEW_POSITION): New message for the
7552            position in the statusbar
7553    
7554    2002-04-26  Frank Koormann <[email protected]>
7555    
7556            * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
7557    
7558    2002-04-24  Frank Koormann <[email protected]>
7559    
7560            * Resources/Bitmaps/identify.xpm: shadow added
7561    
7562            * Resources/Bitmaps/fullextent.xpm: new
7563    
7564    2002-04-22  Jan-Oliver Wagner <[email protected]>
7565    
7566            * Thuban/UI/tree.py (update_tree): added test for None on map bounding
7567            box
7568    
7569    2002-04-21  Jan-Oliver Wagner <[email protected]>
7570    
7571            * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
7572    
7573            * Thuban/UI/tree.py (update_tree): added added map extent
7574    
7575            * Thuban/UI/mainwindow.py (_method_command): extended by parameter
7576            icon; added map_full_extend as tool
7577    
7578    2002-04-19  Jan-Oliver Wagner <[email protected]>
7579    
7580            * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
7581            saving _new_ sessions
7582    
7583            * Thuban/Model/session.py (create_empty_session): new session
7584            don't have a filename (set to None)
7585    
7586            * Thuban/UI/tree.py (update_tree): added filename and modified flag
7587    
7588            * Thuban/Model/load.py (ProcessSession): convert projection
7589            parameters from unicode to regular string
7590    
7591            * Data/iceland_sample.session: Added UTM Zone 26 projection.
7592    
7593    2002-04-11  Bernhard Herzog  <[email protected]>
7594    
7595            * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
7596            extensions/shapelib/dbfopen.c: Update to the versions of shapelib
7597            1.2.9
7598    
7599            * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
7600            the pyshapelib directoy into the list of include dirs, so that
7601            pyshapelib_api.h can be found.
7602    
7603            * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
7604            holds the pyshapelib C-API
7605            (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
7606            pyshapelib_api to access the shapelib functions.
7607            (initwxproj): Import the c_api from the shapelib module and
7608            initialize pyshapelib_api.
7609    
7610    2002-04-04  Bernhard Herzog  <[email protected]>
7611    
7612            * setup.py (thuban_bdist_rpm.initialize_options): Use
7613            initialize_options to create the scripts for the rpm.
7614    
7615            * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
7616    
7617    2002-04-03  Bernhard Herzog  <[email protected]>
7618    
7619            * setup.py: Increment version to 0.1.1
7620    
7621            * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
7622            Layer" and "Remove Layer" commands from the layer menu to the map
7623            menu
7624    
7625    2002-02-15  Bernhard Herzog  <[email protected]>
7626    
7627            * Thuban/Model/layer.py (Layer.Shape): list append only takes one
7628            argument (python <= 1.5.2 erroneously accepted multiuple
7629            arguments)
7630    
7631    2002-02-04  Bernhard Herzog  <[email protected]>
7632    
7633            * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
7634            RecordGrid in the identifyview.
7635            (IdentifyView.__init__): Use IdentifyGridCtrl instead of
7636            IdentifyListCtrl. The grid allows editing of the values.
7637    
7638            * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
7639            implementing a grid for a single row of a thuban table.
7640    
7641            * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
7642            layers by default. Easier to use than the previous default of only
7643            searching through the select layer which meant that if no layer
7644            was selected, you couldn't select a shape.
7645    
7646            * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
7647    
7648            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
7649            stroke_width attribute
7650    
7651            * Thuban/Model/save.py (save_session): Write the new stroke_width
7652            attribute
7653    
7654            * Thuban/Model/load.py (ProcessSession.startElement): Read the
7655            stroke_width attribute
7656    
7657            * Thuban/Model/layer.py (Layer.__init__): New parameter and
7658            instance variable stroke_width
7659            (Layer.SetStrokeWidth): Set the stroke_width.
7660    
7661    2002-02-01  Bernhard Herzog  <[email protected]>
7662    
7663            * extensions/thuban/wxproj.cpp (project_points): Fix two
7664            off-by-one errors in the last loop that joins the various parts
7665            together.
7666    
7667    2002-01-14  Bernhard Herzog  <[email protected]>
7668    
7669            * setup.py (data_dist.make_distribution): Fix some typos
7670    
7671    2001-09-18  Bernhard Herzog  <[email protected]>
7672    
7673            * README: Slight tweaking in preparation for the 0.1 release
7674    
7675            * setup.cfg: Add section for sdist to create both tgz and zip
7676            archives
7677    
7678            * setup.py: increase version number to 0.1
7679            (data_dist): New command class for data distribution
7680    
7681    2001-09-14  Bernhard Herzog  <[email protected]>
7682    
7683            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
7684            Handle the case of no layer (i.e. layer is None) properly.
7685    
7686            * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
7687            Set the initial selection of the combo boxes to reflect the
7688            projection we're starting with in a way that works on windows,
7689            too.
7690    
7691            * Thuban/Lib/connector.py (Connector.print_connections): Print the
7692            puiblisher's ids in hex to make it easier to compare them to the
7693            standard repr of python methods
7694    
7695            * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
7696            messages
7697    
7698    2001-09-13  Bernhard Herzog  <[email protected]>
7699    
7700            * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
7701            deselect the layer if no layer is selected
7702    
7703            * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
7704            idle time when there actually is something to draw. If there's
7705            nothing to draw simply clear the window
7706            (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
7707            (MapCanvas.SetMap): force a redraw in all cases because
7708            FitMapToWindow doesn't always do it.
7709            (MapCanvas.ZoomFactor): Add an optional parameter, center, to
7710            specify the point to move into the center of the window
7711            (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
7712            dragged, zoon in/out by a factor of 2
7713            (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
7714            index, i.e. reversed drawing order) so that objects appearing to
7715            be in from of others are selected first. This is probably mostly
7716            relevant for point shapes where the symbols used may overlap
7717    
7718            * Thuban/Model/session.py (create_empty_session): Unset the
7719            modified bit before returning it
7720    
7721            * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
7722            create_empty_session session to create the new, empty session.
7723    
7724            * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
7725            the tool bitmaps.
7726            (MainWindow.OnClose, MainWindow.save_modified_session): Separate
7727            the code that asks whether the session should be saved into the
7728            new method save_modified_session.
7729            (MainWindow.OpenSession, MainWindow.NewSession): Use the new
7730            method to save modified session here too.
7731    
7732  2001-09-11  Bernhard Herzog  <[email protected]>  2001-09-11  Bernhard Herzog  <[email protected]>
7733    
7734          * setup.py (InnoIconItem): fix typo          * setup.py (InnoIconItem): fix typo
# Line 62  Line 7793 
7793          (MainWindow.identify_view_on_demand): Store the interactor in an          (MainWindow.identify_view_on_demand): Store the interactor in an
7794          instvar and use that reference instead of going through main.app          instvar and use that reference instead of going through main.app
7795    
7796          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
7797          * Thuban/UI/application.py (ThubanApplication.OnInit):          * Thuban/UI/application.py (ThubanApplication.OnInit):
7798          * Thuban/UI/main.py (main): Create the session tree view in main          * Thuban/UI/main.py (main): Create the session tree view in main
7799          with the new mainwindow method ShowSessionTree and not directly          with the new mainwindow method ShowSessionTree and not directly
7800          the application's OnInit method          the application's OnInit method
# Line 79  Line 7810 
7810          layer to the tableview dialog.          layer to the tableview dialog.
7811    
7812          * Thuban/UI/tableview.py: Add some doc-strings          * Thuban/UI/tableview.py: Add some doc-strings
7813          (TableGrid):          (TableGrid):
7814          (TableGrid.OnRangeSelect):          (TableGrid.OnRangeSelect):
7815          (TableGrid.OnSelectCell):          (TableGrid.OnSelectCell):
7816          (TableFrame.__init__):          (TableFrame.__init__):
# Line 146  Line 7877 
7877  2001-09-05  Bernhard Herzog  <[email protected]>  2001-09-05  Bernhard Herzog  <[email protected]>
7878    
7879          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
7880            
7881          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
7882          interactor to pass through to the MapCanvas          interactor to pass through to the MapCanvas
7883            
7884          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
7885          argument to the MainWindow constructor to get rid of the ugly hack          argument to the MainWindow constructor to get rid of the ugly hack
7886          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 7927 
7927          (ThubanInstall.run): Remove the leading install root from the          (ThubanInstall.run): Remove the leading install root from the
7928          script filename if an install root was specified and use the new          script filename if an install root was specified and use the new
7929          link_file method          link_file method
7930            
7931          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
7932          the window when the first layer is added to the map.          the window when the first layer is added to the map.
7933    
# Line 233  Line 7964 
7964          (InnoIconItem): Helper class for bdist_inno          (InnoIconItem): Helper class for bdist_inno
7965          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
7966          this together with the appropriate parameters, to the setup call.          this together with the appropriate parameters, to the setup call.
7967            
7968          * setup.cfg (bdist_inno): added new section for the inno setup          * setup.cfg (bdist_inno): added new section for the inno setup
7969          installer          installer
7970    

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26