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

Legend:
Removed from v.184  
changed lines
  Added in v.1847

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26