/[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 762 by jonathan, Tue Apr 29 09:02:33 2003 UTC revision 1862 by jan, Fri Oct 24 16:03:40 2003 UTC
# Line 1  Line 1 
1  2003-04-25  Jonathan Coles   <[email protected]>  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          * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
5177          Projection an immutable item. Fixes RTbug #1825.          Projection an immutable item. Fixes RTbug #1825.

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26