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

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

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

revision 924 by frank, Mon May 19 09:12:42 2003 UTC revision 1829 by silke, Thu Oct 16 13:14:42 2003 UTC
# Line 1  Line 1 
1    2003-10-16      Silke Reimer    <[email protected]>
2    
3            * debian/*: New directory with configuration files for building a thuban
4              deb-package.
5    
6    2003-10-14  Bernhard Herzog  <[email protected]>
7    
8            * test/test_proj.py: Execute support.run_tests when run as
9            __main__ so that missing unsubscribes are detected
10            (TestProjFile.tearDown): Destroy the proj_file properly
11    
12    2003-10-14  Bernhard Herzog  <[email protected]>
13    
14            * Thuban/Model/messages.py (PROJECTION_ADDED)
15            (PROJECTION_REPLACED, PROJECTION_REMOVED): New message types for
16            the ProjFile objects
17    
18            * Thuban/Model/proj.py (ProjFile): Derive from Publisher so we can
19            easily send messages when the projections change
20            (ProjFile.Add, ProjFile.Remove, ProjFile.Replace): Issue messages
21            when the change was successful
22    
23            * test/test_proj.py (TestProjFile.setUp): Subscribe to some of the
24            proj file messages
25            (TestProjFile.test_add_remove)
26            (TestProjFile.test_remove_non_existing)
27            (TestProjFile.test_replace)
28            (TestProjFile.test_replace_non_existing): Test whether the right
29            messages are sent
30    
31    2003-10-14  Bernhard Herzog  <[email protected]>
32    
33            * test/test_proj.py (TestProjFile.test): Refactor into several
34            tests
35            (TestProjFile.test_add_remove)
36            (TestProjFile.test_remove_non_existing)
37            (TestProjFile.test_replace)
38            (TestProjFile.test_replace_non_existing): Some of the new
39            individual test cases
40            (TestProjFileSimple): New class for the rest of the test cases
41            that came out of the refactoring
42            (ProjFileTest): Derive from xmlsupport.ValidationTest so that the
43            derived classes don't have to
44    
45    2003-10-13  Bernhard Herzog  <[email protected]>
46    
47            Add an optional EPSG code to the projection objects and extend the
48            .proj file format accordingly.
49    
50            * Resources/XML/projfile.dtd (element projection): Add epsg
51            attribute
52    
53            * Thuban/Model/proj.py (Projection.__init__): New parameter and
54            instance variable epsg. Update doc-string
55            (Projection.EPSGCode, Projection.Label): New methods to provide
56            access to EPSG code and a label for use in dialogs
57    
58            * Thuban/Model/resource.py (ProjFileReader.start_projection)
59            (ProjFileReader.end_projection, ProjFileSaver.write_projfile):
60            Handle the epsg code attribute when reading or writing proj files
61    
62            * Thuban/UI/projdialog.py (ProjFrame._OnSave)
63            (ProjFrame._OnAddToList, ProjFrame.__DoOnProjAvail)
64            (ProjFrame.__FillAvailList): Use the projection's Label method to
65            get the string for the list box
66    
67            * test/test_proj.py (TestProjection.test_label)
68            (TestProjection.test_label_epsg)
69            (TestProjection.test_epsgcode_for_non_epsg_projection)
70            (TestProjection.test_epsgcode_for_real_epsg_projection): New tests
71            for the label and EPSGCode methods
72            (WriteProjFileTests.doTestWrite, WriteProjFileTests.test_write)
73            (WriteProjFileTests.test_write_empty_file): Create the ProjFile
74            objects in the test cases and put the expected contents into the
75            test case methods too. Update doTestWrite accordingly
76            (TestLoadingProjFile)
77            (TestLoadingProjFileWithEmptyProjectionlist): New classes with the
78            read tests from TestProjFile.
79            (TestProjFile.doTestRead, TestProjFile.testRead): Removed. These
80            tests are now in the new classes.
81            (sample_projfile, sample_projfile_data)
82            (sample_projfile2, sample_projfile_data2): Removed. Not used
83            anymore.
84            (TestProjFile.test_read_unreadable_file): No need to reset the
85            permissions at the end anymore since we use a unique filename
86    
87    2003-10-13  Bernhard Herzog  <[email protected]>
88    
89            * test/test_proj.py: Some more refactoring of the test cases
90            (ProjFileTest): New base class for the proj file tests.
91            (TestProjFile): Derive from ProjFileTest
92            (TestProjFile.test_read_unreadable_file)
93            (TestProjFile.test_read_empty_file, TestProjFile.doTestRead): Use
94            the new filename method to get a unique filename
95            (TestProjFile.doTestWrite, TestProjFile.testWrite): Removed.
96            (WriteProjFileTests): New class for proj file write tests.
97            Contains the write test that were in TestProjFile originally.
98    
99    2003-10-13  Bernhard Herzog  <[email protected]>
100    
101            * test/test_proj.py (TestProjFile.testRead)
102            (TestProjFile.test_read_non_existing_file)
103            (TestProjFile.test_read_unreadable_file)
104            (TestProjFile.test_read_empty_file): Split into several methods.
105    
106    2003-10-10  Bernhard Herzog  <[email protected]>
107    
108            * Thuban/UI/sizers.py: New file with custom sizers.
109    
110            * Thuban/UI/projdialog.py (ProjFrame.build_dialog): Instantiate
111            all projection type specific panels and put them into a
112            NotebookLikeSizer. This way the dialog doesn't change its size
113            when a different projection is selected
114            (ProjFrame.__init__): Rename projection_panels
115            projection_panel_defs and reuse projection_panels for a list of
116            the instantiated panels.
117            (ProjFrame._show_proj_panel, ProjFrame.__DoOnProjAvail)
118            (ProjFrame.__DoOnProjChoice): Changes due to the new handling of
119            the panels
120            (UnknownProjPanel._DoLayout): Place the newlines in the message
121            differently to make the panel narrower.
122            (TMPanel._DoLayout): Layout the parameters in one column.
123    
124    2003-10-10  Bernhard Herzog  <[email protected]>
125    
126            * Thuban/UI/projdialog.py (ProjFrame.build_dialog): New method
127            that contains all the setup for the dialog's widgets, layout and
128            event handling.
129            (__): Call build_dialog to build the dialog.
130            (ProjFrame.__set_properties, ProjFrame.__do_layout): Removed.
131            Their functionality is now in build_dialog
132            (ProjFrame.__VerifyButtons, ProjFrame.__VerifyButtons)
133            (ProjFrame.__DoOnProjAvail, ProjFrame.__DoOnProjAvail)
134            (ProjFrame.__DoOnProjChoice): Small updates due to slightly
135            different widget names and hierarchy introduced with build_dialog.
136    
137    2003-10-10  Bernhard Herzog  <[email protected]>
138    
139            * README: Fix typo.
140    
141    2003-10-09  Bernhard Herzog  <[email protected]>
142    
143            * Thuban/Model/proj.py (ProjFile.Add): Do not check whether the
144            projection is already in the list. This is *a lot* faster when
145            loading files with hundreds of projections since it saves a linear
146            search. OTOH this will allow adding the same projection to the
147            user.proj file multiple times in the projection dialog but we'll
148            deal with that later
149    
150    2003-10-09  Jan-Oliver Wagner <[email protected]>
151    
152            * devtools: New. Directory for developer tools that are not intended
153            for the regular user.
154    
155            * devtools/create_epsg.py: New. Convert the epsg file of proj into
156            a python .proj file.
157    
158    2003-10-09  Bernhard Herzog  <[email protected]>
159    
160            * test/test_proj.py
161            (TestProjection.test_get_parameter_without_equals_sign): New. Test
162            whether GetParameter handles parameters without "=" sign correctly
163    
164            * Thuban/Model/proj.py (Projection.GetParameter): Handle
165            parameters that do not contain a "=". Update the doc-string
166    
167    2003-10-08  Bernhard Herzog  <[email protected]>
168    
169            * Thuban/UI/projdialog.py (ProjFrame.__set_properties): Remove the
170            length limit on the projname text control
171    
172    2003-10-08  Bernhard Herzog  <[email protected]>
173    
174            * test/test_proj.py (TestProjection.test_get_projection_units_geo)
175            (TestProjection.test_get_projection_units_normal): New. Tests for
176            the Projection.GetProjectedUnits method
177    
178    2003-10-08  Jan-Oliver Wagner <[email protected]>
179    
180            * Thuban/Model/resource.py (get_user_proj_file): small bug-fix:
181            Added missing 'val' parameter.
182    
183    2003-10-08  Bernhard Herzog  <[email protected]>
184    
185            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): When the
186            projection type of the currently selected projection is not known,
187            i.e. there's no panel for it, use the UnknownProjPanel
188            (ProjFrame.__DoOnProjChoice, ProjFrame._show_proj_panel): Split
189            the actual replacing of the proj panel into the new method
190            _show_proj_panel.
191            (UnknownProjPanel): Add doc-string.
192            (UnknownProjPanel._DoLayout): Insert a newline into the text so
193            that the panel is not so wide.
194    
195    2003-10-08  Bernhard Herzog  <[email protected]>
196    
197            * Thuban/Model/resource.py (read_proj_file): Return the warnings
198            too. Update the doc-string
199            (get_proj_files): Removed. It wasn't used anywhere
200            (get_system_proj_files, get_system_proj_file): Rename to
201            get_system_proj_file and return the ProjFile object and not a list
202            of ProjFile objects. Update the callers.
203            (get_user_proj_files, get_user_proj_file): Rename to
204            get_user_proj_file return the ProjFile object and not a list of
205            ProjFile objects. Update the callers.
206            (ProjFileReader.__init__): New instance variable for the warnings.
207            Rename the __pf ivar to projfile. Update the methods referring to
208            __pf
209            (ProjFileReader.end_projection): Catch any errors raised when
210            instantiating the projection and record that as an error. The
211            projection will not be in the final ProjFile object.
212            (ProjFileReader.GetWarnings): New method to return the warnings.
213    
214            * Thuban/UI/projdialog.py (ProjFrame.show_warnings): New method to
215            show the warnings from the projfile reader
216            (ProjFrame._OnImport): Deal with any warnings returned by
217            read_proj_file
218            (ProjFrame.__FillAvailList): Deal with any warnings returned by
219            get_system_proj_file or get_user_proj_file.
220    
221            * test/test_proj.py (TestProjFile.doTestRead): Check the warnings.
222            (TestProjFileWithInvalidParameters.file_contents): New test cases
223            to test whether read_proj_file handles invalid projection
224            parameters correctly
225            (TestProjFile.test_get_system_proj_file): New. Simple test for
226            resource.get_system_proj_file
227    
228    2003-10-07  Bernhard Herzog  <[email protected]>
229    
230            * test/test_derivedshapestore.py
231            (TestDerivedShapeStoreExceptions.tearDown): Clear the session
232            properly so that the temporary directories get deleted correctly
233    
234    2003-10-06  Bernhard Herzog  <[email protected]>
235    
236            Handle the title changes in a proper MVC way.
237    
238            * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
239            canvas' TITLE_CHANGED messages
240            (MainWindow.update_title): New. Update the main window's title
241            (MainWindow.__SetTitle): Removed. Use update_title instead.
242            (MainWindow.SetMap): Use update_title instead of __SetTitle
243            (MainWindow.RenameMap): Do change the window title explicitly
244            here. That's handled in a proper MVC way now.
245            (MainWindow.title_changed): New. Subscriber for the TITLE_CHANGED
246            messages
247    
248            * Thuban/Lib/connector.py (Conduit): New class to help classes
249            that forward messages
250    
251            * Thuban/UI/viewport.py: Forward the map's TITLE_CHANGED messages
252            (ViewPort): Derive from Conduit instead of Publisher
253            (ViewPort.Subscribe, ViewPort.Unsubscribe): Use the new base class
254            when calling the inherited versions
255            (ViewPort._subscribe_map, ViewPort._unsubscribe_map): New helper
256            methods to subscribe and unsubscribe map messages
257            (ViewPort.SetMap, ViewPort.Destroy): Use the new helper methods to
258            handle the map subscriptions
259            (ViewPort.Map, ViewPort.map_projection_changed)
260            (ViewPort.layer_projection_changed): Add or update doc-strings
261    
262            * test/test_connector.py (TestPublisher.test_issue_simple): Fix
263            typo
264            (MyConduit): Helper class for the Conduit test.
265            (TestConduit): Test cases for Conduit
266    
267            * test/test_connector.py: Use support.run_tests as main.
268    
269            * test/test_viewport.py (ViewPortTest.setUp): Also subscribe to
270            the TITLE_CHANGED messages
271            (ViewPortTest.test_forwarding_title_changed): New test to check
272            whether the viewport forwards the map's TITLE_CHANGED messages
273            (TestViewportWithPostGIS.tearDown): Call the map's Destroy method
274            after the port's because the latter may require a still functional
275            map.
276    
277    2003-10-06  Bernhard Herzog  <[email protected]>
278    
279            * Thuban/UI/application.py (ThubanApplication.maps_changed): Add
280            doc-string
281    
282    2003-10-06  Bernhard Herzog  <[email protected]>
283    
284            * test/test_viewport.py (ViewPortTest.setUp)
285            (SimpleViewPortTest.test_init_with_size): Move the test for the
286            initial size as a constructor parameter from ViewPortTest.setUp
287            method to a new separate test in SimpleViewPortTest.
288    
289    2003-10-06  Bernhard Herzog  <[email protected]>
290    
291            * test/test_viewport.py (MockView): New class derived from
292            ViewPort with a mock implementation of GetTextExtent to be used in
293            the test cases
294            (ViewPortTest.setUp): Use MockView instead of ViewPort
295    
296            * Thuban/UI/viewport.py (ViewPort.GetTextExtent): Turn this method
297            into what would be a "pure virtual function" in C++: always raise
298            NotImplementedError. Mock implementations for test cases don't
299            belong into the real code
300    
301    2003-10-02  Bernhard Herzog  <[email protected]>
302    
303            * test/test_layer.py (TestLayer.test_empty_layer): Explicitly
304            close the dbf file we create so that it's contents have been
305            written properly.
306    
307            * libraries/shapelib/shptree.c, libraries/shapelib/shpopen.c,
308            libraries/shapelib/shapefil.h, libraries/shapelib/dbfopen.c:
309            Update to shapelib 1.2.10
310    
311    2003-10-01  Jan-Oliver Wagner <[email protected]>
312    
313            * Thuban/UI/tree.py, Thuban/UI/main.py: Remove the #! line as
314            it annoys lintian which warns about these files not being
315            executable. The #! isn't necessary here since if you absolutely
316            must execute them you can always say "python <filename>".
317    
318    2003-09-26  Bernhard Herzog  <[email protected]>
319    
320            * Thuban/Model/classgen.py (GenQuantiles0): Removed since it's
321            only used in GREAT-ER but not used in Thuban itself. When GREAT-ER
322            is ported to a newer the import will fail, so it should be noticed
323            immediately that this function is gone.
324            Fixes RT#1919
325    
326    2003-09-26  Bernhard Herzog  <[email protected]>
327    
328            Add a DTD for the projection files and make thuban write valid
329            projection files
330    
331            * Resources/XML/projfile.dtd: New. DTD for thuban's projection
332            files
333    
334            * Thuban/Model/resource.py (ProjFileSaver.write): Use
335            'projectionlist' as the name in the document type declaration so
336            that it matches the element type of the root element.
337    
338            * test/test_proj.py (sample_projfile, sample_projfile2): Use
339            'projectionlist' as the name in the document type declaration just
340            as it is done now in the files thuban would write
341            (sample_projfile, sample_projfile_data): Fix spelling of
342            "Mercator"
343            (TestProjFile.doTestWrite): Validate the written and the expected
344            XML data
345            (TestProjFile): Derive from ValidationTest so that we can run xml
346            validation tests
347    
348    2003-09-24  Bernhard Herzog  <[email protected]>
349    
350            * Thuban/UI/renderer.py (ExportRenderer.render_legend): Do not
351            modify the list returned by map.Layers() in place since it is the
352            actual list of layers used by the map.
353    
354    2003-09-23  Jan-Oliver Wagner <[email protected]>
355    
356            * Doc/manual/thuban-manual.xml: Added subsection to chapter
357            Extensions to describe the extensions coming with the Thuban
358            standard package (gns2shp and importAPR).
359    
360    2003-09-23  Bernhard Herzog  <[email protected]>
361    
362            * libraries/thuban/wxproj.cpp (project_point): if there's an
363            inverse but no forward projection, convert to degrees after
364            applying the inverse projection. Fixes RT#2096
365    
366            * test/test_wxproj.py: New. Test cases for wxproj.so. One test
367            implicitly tests for the fix to RT#2096
368    
369            * test/support.py (FloatComparisonMixin.assertFloatSeqEqual):
370            Check that the sequences have the same lengths
371    
372            * Resources/Projections/defaults.proj (Geographic projection): Use
373            a much more precise value for the to_meter attribute.
374    
375    2003-09-22  Bernhard Herzog  <[email protected]>
376    
377            * test/support.py (initthuban): Make sure to unset the LANG env.
378            var. so that tests that compare translated strings work. Solves RT
379            #2094
380    
381    2003-09-22  Jan-Oliver Wagner <[email protected]>
382    
383            Small improvement of APR import.
384    
385            * Extensions/importAPR/test/test_apr.py (aprTest.test_LClass):
386            Added tests for text-ranges.
387    
388            * Extensions/importAPR/apr.py (APR_LClass.GetThubanRange): Now
389            returns a string object if the range is based on text.
390    
391            * Extensions/importAPR/importAPR.py (import_apr_dialog): Unified
392            range retrieval.
393    
394    2003-09-22  Jan-Oliver Wagner <[email protected]>
395    
396            Initial version of the importAPR extension which is in
397            experimental state.
398    
399            * /Extensions/importAPR/, /Extensions/importAPR/samples/,
400            /Extensions/importAPR/test/: New directories.
401    
402            * /Extensions/importAPR/samples/README: New: Howto load the samples.
403    
404            * /Extensions/importAPR/samples/iceland.apr: New: A sample APR
405            file which refers to the Thuban Iceland demo data.
406    
407            * /Extensions/importAPR/test/README: New: Howto execute the tests.
408    
409            * /Extensions/importAPR/test/test_apr.py: New: Tests for APR classes.
410    
411            * /Extensions/importAPR/apr.py: New: Classes for ArcView Objects
412            as in '.apr'-files.
413    
414            * /Extensions/importAPR/odb.py: New: Classes for generic ArcView
415            ODB Objects as in '.apr', '.avl' and other files.
416    
417            * /Extensions/importAPR/__init__.py: New: Init to make this
418            directory a package.
419    
420            * /Extensions/importAPR/importAPR.py: New: Import a ArcView
421            project file (.apr) and convert it to Thuban.
422    
423    2003-09-22  Jan-Oliver Wagner <[email protected]>
424    
425            * Extensions/gns2shp.gns2shp.py: The main module of gns2shp.
426    
427    2003-09-19  Jan-Oliver Wagner <[email protected]>
428    
429            * Doc/manual/thuban-manual.xml: Extended section 'Installation'
430            with description on RPM installation and RPM binary package
431            creation.
432    
433    2003-09-18  Bernhard Herzog  <[email protected]>
434    
435            * setup.py (data_files): Only add the mo files if the Locales
436            directory actually exists, so that setup.py works with a fresh CVS
437            checkout
438    
439    2003-09-12  Jan-Oliver Wagner <[email protected]>
440    
441            * Examples/simple_extensions/simple_tool.py: bugfix: Tool is now
442            in viewport, not anymore in view
443    
444    2003-09-04  Jan-Oliver Wagner <[email protected]>
445    
446            Introducing first Extension (gns2shp).
447    
448            * Extensions, Extensions/gns2shp, Extensions/gns2shp/test: New.
449    
450            * Extensions/__init__.py: New. init to make this dir a package.
451    
452            * Extensions/gns2shp/__init__.py: New. init to make this dir a package.
453    
454            * Extensions/gns2shp/test/README: New. some info on this test directory.
455    
456            * Extensions/gns2shp/test/ls.txt: New. test data set (Liechtenstein).
457    
458            * Extensions/gns2shp/test/test_gns2shp.py: New. Test for correct creation
459            of Shapefile from GNS text file format
460    
461    2003-09-03  Jan-Oliver Wagner <[email protected]>
462    
463            Fix/workaround for bug #2019:
464            https://intevation.de/rt/webrt?serial_num=2019
465    
466            * Thuban/UI/identifyview.py (IdentifyView.ID_STOP): New.
467            (IdentifyView.__init__): Added another button that allows to
468            stop the identify mode.
469            (IdentifyView.OnStop): New. Stops the identify mode.
470    
471    2003-09-03  Jan-Oliver Wagner <[email protected]>
472    
473            Introducing a new exception dialog that allows to exit the
474            application immediately.
475            This fixes bug #2060: https://intevation.de/rt/webrt?serial_num=2060
476    
477            * Thuban/UI/exceptiondialog.py: New. A special exception dialog.
478    
479            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
480            Made strings available to translations. Exchanged the simple
481            ScrolledMessageDialog by the new ExceptionDialog.
482    
483    2003-09-01  Bernhard Herzog  <[email protected]>
484    
485            * NEWS: New. Summary of changes and release notes.
486    
487            * MANIFEST.in: Add NEWS
488    
489    2003-09-01  Bernhard Herzog  <[email protected]>
490    
491            * MANIFEST.in: Correct the include statement for the mo-files and
492            include the documentation too.
493    
494            * setup.py (data_files): Add the .mo files
495            (setup call): Up to version 0.9.0
496    
497    2003-09-01  Bernhard Herzog  <[email protected]>
498    
499            * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Change the
500            parameter list to just parent and session
501            (ChooseDBTableDialog.__set_properties): Removed. Setting the
502            selection of empty list boxes is not allowed (and produces C++
503            assertion errors) and the rest of the setup is better done in
504            __init__ anyway.
505            (ChooseDBTableDialog.OnCancel, ChooseDBTableDialog.OnOK)
506            (ChooseDBTableDialog.OnLBDClick, DBDialog.OnOK): Use the Python
507            builtins True/False for booleans to avoid warnings from wxPython
508    
509            * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Adapt to new
510            ChooseDBTableDialog constructor parameters.
511    
512    2003-09-01  Bernhard Herzog  <[email protected]>
513    
514            * Thuban/Model/postgisdb.py
515            (PostGISTable): Extend doc-string
516            (PostGISTable._fetch_table_information): Set the column index
517            correctly, pretending ignored columns don't exist.
518    
519            * test/test_postgis_db.py (TestPostGISIgnoredColumns): New tests
520            for postgis tables with data types not yet supported by thuban.
521    
522    2003-08-29  Bernhard Herzog  <[email protected]>
523    
524            * HOWTO-Release: Tweak item about running the tests.
525    
526    2003-08-29  Jan-Oliver Wagner <[email protected]>
527    
528            * /Doc/manual/thuban-manual.xml: updated to version 1.0pre2.
529    
530    2003-08-29  Bernhard Herzog  <[email protected]>
531    
532            Add some missing parameters to projections. Proj complains about
533            them on windows but for some reason not on Linux.
534    
535            * test/test_save.py (SaveSessionTest.testLayerProjection): Add
536            missing required projection parameters
537    
538            * test/test_proj.py (TestProjFile.test): Add missing required
539            projection parameters
540    
541            * test/test_load_0_8.py (TestLayerProjection.file_contents)
542            (TestLayerProjection.test): Add missing required projection
543            parameters and tests for them
544    
545            * test/test_load.py (TestLayerProjection.file_contents)
546            (TestLayerProjection.test): Add missing required projection
547            parameters and tests for them
548    
549            * test/test_layer.py (TestLayer.test_base_layer): Add missing
550            required projection parameters
551    
552    2003-08-29  Bernhard Herzog  <[email protected]>
553    
554            * libraries/pyprojection/Projection.i: Use pj_get_errno_ref to
555            access the pj_errno because directly accessing pj_errno doesn't
556            work on windows if the proj library is in a DLL
557    
558            * libraries/pyprojection/Projection_wrap.c: Update from Projection.i
559    
560    2003-08-28  Bernhard Herzog  <[email protected]>
561    
562            * test/test_proj.py: Import things from Thuban after calling
563            initthuban
564    
565            * test/test_load.py (LoadSessionTest.filenames): New class
566            variable with the filename attributes to normalize
567            (LoadSessionTest.check_format): Pass self.filenames to
568            sax_eventlist to normalize the filename attributes
569    
570            * test/xmlsupport.py: Add cvs keywords
571            (SaxEventLister.__init__): New parameter filenames which indicates
572            attributes that contain filenames
573            (SaxEventLister.startElementNS): Normalize the filename attributes
574            with os.path.normpath
575            (sax_eventlist): New parameter filenames to pass through to
576            SaxEventLister
577    
578            * test/test_derivedshapestore.py: Make this file callable as a
579            program to execute the tests
580            (TestDerivedShapeStoreExceptions.test_table_with_wrong_size): Bind
581            the session to self.session so that it gets destroyed properly
582    
583            * test/test_layer.py (TestLayer.tearDown): Call the session's
584            Destroy method
585    
586            * test/test_map.py (TestMapBase.tearDown): Destroy self.session
587            too if it exists
588            (TestMapAddLayer.test_add_layer): Bind the session to self.session
589            so that it gets destroyed properly
590    
591            * test/postgissupport.py (reason_for_not_running_tests): Add a
592            test for the existence of popen2.Popen4.
593    
594            * test/test_save.py (SaveSessionTest.tearDown): New. Provide a
595            reliable way to destroy the sessions created in the test cases
596            (SaveSessionTest.test_dbf_table): Bind the session to self.session
597            so that it gets destroyed properly
598            (SaveSessionTest.testLayerProjection): Bind the session to
599            self.session so that it gets destroyed properly
600    
601            * test/test_session.py (UnreferencedTablesTests.tearDown): Make
602            sure that the session is destroyed properly
603    
604            * test/test_shapefilestore.py: Make this callable as a program to
605            execute the tests
606    
607            * test/test_scalebar.py: Remove unnecessary import of _ from
608            Thuban
609    
610            * test/support.py (print_garbage_information): Call initthuban
611            here because it may be called indirectly from test cases that test
612            test support modules which do not use anything from thuban itself
613            (ThubanTestProgram.runTests): Remove unnecessary debug print
614    
615    2003-08-28  Bernhard Herzog  <[email protected]>
616    
617            * Thuban/version.py (longversion): Update to 0.9
618    
619            * Thuban/UI/mainwindow.py: Remove some unused imports
620    
621            * README: Add section about required additional software. Add date
622            and revision CVS keywords
623    
624            * HOWTO-Release: Add item about the translations. Add date and
625            revision CVs keywords and change formatting to match README a bit
626            better
627    
628            * po/de.po: Update for 0.9
629    
630            * test/README: Tweak the wording a little because many tests are
631            not really unittest.
632    
633    2003-08-27  Bernhard Herzog  <[email protected]>
634    
635            As preparation for the 0.9 release, switch thuban files to a
636            non-dev namespace
637    
638            * Thuban/Model/save.py (SessionSaver.write_session): Write files
639            with the http://thuban.intevation.org/dtds/thuban-0.9.dtd
640            namespace
641    
642            * Thuban/Model/load.py (SessionLoader.__init__): Accept the
643            http://thuban.intevation.org/dtds/thuban-0.9.dtd namespace too
644    
645            * test/test_save.py (SaveSessionTest.dtd)
646            (SaveSessionTest.testEmptySession)
647            (SaveSessionTest.testSingleLayer)
648            (SaveSessionTest.testLayerProjection)
649            (SaveSessionTest.testRasterLayer)
650            (SaveSessionTest.testClassifiedLayer)
651            (SaveSessionTest.test_dbf_table)
652            (SaveSessionTest.test_joined_table)
653            (SaveSessionTest.test_save_postgis): Update for new namespace
654    
655            * test/test_load.py (LoadSessionTest.dtd, TestSingleLayer)
656            (TestLayerVisibility.file_contents, TestLabels.file_contents)
657            (TestLayerProjection.file_contents)
658            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
659            (TestPostGISLayer.file_contents)
660            (TestPostGISLayerPassword.file_contents)
661            (TestLoadError.file_contents, TestLoadError.test): Update for new
662            namespace
663    
664    2003-08-27  Bernhard Herzog  <[email protected]>
665    
666            Make the table interface distinguish between row ids (an integer
667            that uniquely identifies a row) and row ordinals (a simple row
668            count from 0 to NumRows() - 1)
669    
670            * Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
671            (PostGISTable.RowOrdinalToId): New methods to conver between row
672            ids and row ordinals
673            (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
674            parameter row_is_ordinal to indicate whether the row parameter is
675            the row id or the ordinal
676    
677            * Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
678            (TransientTableBase.RowOrdinalToId)
679            (AutoTransientTable.RowIdToOrdinal)
680            (AutoTransientTable.RowOrdinalToId): Same new methods as in
681            PostGISTable.
682            (TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
683            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
684            Same new parameter as in PostGISTable.
685    
686            * Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
687            (DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
688            (MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
689            (DBFTable.ReadValue, DBFTable.ReadRowAsDict)
690            (MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
691            parameter as in PostGISTable.
692    
693            * Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
694            (DataTable.RowOrdinalToId): New methods to convert between row ids
695            and row ordinals.
696            (TableGrid.SelectRowById): New method to select a row based on its
697            ID as opposed to its ordinal
698            (DataTable.GetValue, TableGrid.OnRangeSelect)
699            (TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
700            (QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
701            (LayerTableFrame.__init__): Convert between row ids and row
702            ordinals as appropriate
703    
704            * test/postgissupport.py (PostGISDatabase.__init__): Add
705            doc-string.
706            (PostGISDatabase.initdb): The optional third item in a tuple in
707            tables is now a (key, value) list with additional arguments to
708            pass to upload_shapefile
709            (upload_shapefile): New parameter gid_offset to allow gids that
710            are not the same as the shapeids in the shapefile
711            (PostgreSQLServer.get_default_static_data_db): Use the new
712            gid_offset to make the gids in landmarks 1000 higher than the
713            shapeids in the shapefile
714    
715            * test/test_viewport.py
716            (TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
717            new shapeids in the landmarks table
718    
719            * test/test_transientdb.py
720            (TestTransientTable.run_iceland_political_tests)
721            (TestTransientTable.test_transient_joined_table): Add tests for
722            the new table methods and new keywords arguments.
723    
724            * test/test_postgis_db.py
725            (TestPostGISTable.test_read_row_as_dict_row_count_mode)
726            (TestPostGISTable.test_read_value_row_count_mode)
727            (TestPostGISTable.test_row_id_to_ordinal)
728            (TestPostGISTable.test_row_oridnal_to_id): New test for the new
729            table methods and the new arguments
730            (TestPostGISShapestorePoint.test_shapes_in_region)
731            (TestPostGISShapestorePoint.test_shape_raw_data)
732            (TestPostGISShapestorePoint.test_shape_points)
733            (TestPostGISShapestorePoint.test_shape_shapeid)
734            (TestPostGISShapestorePoint.test_all_shapes)
735            (TestPostGISTable.test_simple_query)
736            (TestPostGISTable.test_simple_query)
737            (TestPostGISTable.test_simple_query)
738            (TestPostGISTable.test_read_value)
739            (TestPostGISTable.test_read_row_as_dict): Adapt to the new
740            shapeids in the landmarks table
741    
742            * test/test_memory_table.py
743            (TestMemoryTable.test_read_row_as_dict_row_count_mode)
744            (TestMemoryTable.test_read_value_row_count_mode)
745            (TestMemoryTable.test_row_id_to_ordinal)
746            (TestMemoryTable.test_row_oridnal_to_id): New test for the new
747            table methods and the new arguments
748    
749            * test/test_dbf_table.py
750            (TestDBFTable.test_read_row_as_dict_row_count_mode)
751            (TestDBFTable.test_read_value_row_count_mode)
752            (TestDBFTable.test_row_id_to_ordinal)
753            (TestDBFTable.test_row_oridnal_to_id): New test for the new table
754            methods and the new arguments
755    
756    2003-08-26  Bernhard Herzog  <[email protected]>
757    
758            * Thuban/Model/postgisdb.py (PostGISShapeStore.BoundingBox): Use a
759            more postgis specific but much faster method to get the bounding
760            box
761    
762    2003-08-26  Bernhard Herzog  <[email protected]>
763    
764            * Thuban/Model/postgisdb.py (PostGISTable.Title)
765            (PostGISShapeStore.AllShapes): Add these missing methods.
766            (PostGISShapeStore.ShapesInRegion): No need to raise
767            StopIteration. We can simply return
768    
769            * test/test_postgis_db.py (TestPostGISTable.test_title)
770            (TestPostGISShapestorePoint.test_all_shapes): New tests for the
771            new methods
772    
773    2003-08-25  Bernhard Herzog  <[email protected]>
774    
775            * Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON.
776    
777            * test/test_postgis_db.py (PolygonTests): New class containing
778            those tests from TestPostGISShapestorePolygon that can also be
779            used to test MUTLIPOLYGON tables
780            (TestPostGISShapestorePolygon): Most tests are now in PolygonTests
781            so derive from that
782            (TestPostGISShapestoreMultiPolygon): New class with tests for
783            MUTLIPOLYGON tables
784    
785            * test/postgissupport.py (PostGISDatabase.initdb): Allow the
786            tables argument to have tuples with three items to override the
787            WKT type used.
788            (PostgreSQLServer.get_default_static_data_db): Use the above to
789            create a polygon table with MUTLIPOLYGONs
790            (point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon)
791            (arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to
792            coords_to*
793            (coords_to_multipolygon): New. Convert to MUTLIPOLYGON
794            (wkt_converter): New. Map WKT types to converters
795            (upload_shapefile): New parameter force_wkt_type to use a
796            different WKT type than the default
797    
798    2003-08-25  Bernhard Herzog  <[email protected]>
799    
800            * Thuban/UI/application.py
801            (ThubanApplication.run_db_param_dialog): New. Suitable as a
802            db_connection_callback. Main difference is that the dialog run
803            from this method doesn't have a parent so it can be used even when
804            there is no main window
805            (ThubanApplication.OpenSession): Use self.run_db_param_dialog if
806            no db_connection_callback was given. This way the dialog pops up
807            even when the .thuban file was given as a command line parameter.
808    
809    2003-08-25  Bernhard Herzog  <[email protected]>
810    
811            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse
812            before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs
813            which leads to an effectively frozen X session because the user
814            can only interact with the dialog but the mouse is still grabbed
815            by the canvas.
816            Also, call the tool's Hide method before MouseLeftUp because
817            MouseLeftUp may change the tool's coordinates.
818    
819    2003-08-25  Bernhard Herzog  <[email protected]>
820    
821            * Thuban/UI/application.py (ThubanApplication.OpenSession): Catch
822            LoadCancelled exceptions and handle them by returning immediately.
823    
824    2003-08-25  Bernhard Herzog  <[email protected]>
825    
826            GUI part of loading sessions with postgis connections which may
827            require user interaction to get passwords or updated parameters
828    
829            * Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a
830            bit nucer and be more generic.
831            (DBFrame.OnAdd): Adapt to new DBDialog interface
832    
833            * Thuban/UI/application.py (ThubanApplication.OpenSession): New
834            optional parameter db_connection_callback which is passed to
835            load_session.
836    
837            * Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New.
838            Suitable as a db_connection_callback
839            (MainWindow.OpenSession): Use self.run_db_param_dialog as the
840            db_connection_callback of the application's OpenSession method
841    
842    
843    2003-08-25  Bernhard Herzog  <[email protected]>
844    
845            Basic loading of sessions containing postgis connections:
846    
847            * Thuban/Model/load.py (LoadError): Add doc-string
848            (LoadCancelled): New exception class to indicate a cancelled load
849            (SessionLoader.__init__): Add the db_connection_callback parameter
850            which will be used by the loader to get updated parameters and a
851            password for a database connection
852            (SessionLoader.__init__): Add the new XML elements to the
853            dispatchers dictionary
854            (SessionLoader.check_attrs): Two new conversions, ascii to convert
855            to a byte-string object and idref as a generic id reference
856            (SessionLoader.start_dbconnection)
857            (SessionLoader.start_dbshapesource): New. Handlers for the new XML
858            elements
859            (load_session): Add the db_connection_callback to pass through the
860            SessionLoader
861    
862            * test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword):
863            New classes to test loading of sessions with postgis database
864            connections.
865    
866    2003-08-25  Bernhard Herzog  <[email protected]>
867    
868            * Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and
869            replace it and the comment with __BuildDate__ by the Source: and
870            Id: cvs keywords as used in the other files.
871    
872    2003-08-25  Bernhard Herzog  <[email protected]>
873    
874            * Thuban/Model/load.py (SessionLoader.check_attrs): Raise a
875            LoadError when a required attribute is missing. The code used to
876            be commented out for some reason, but probably should have been
877            active.
878    
879            * test/test_load.py (TestLoadError.test): Test the message in the
880            LoadError too to make sure it really is about the missing
881            attribute
882    
883    2003-08-22  Bernhard Herzog  <[email protected]>
884    
885            * test/test_save.py (SaveSessionTest.test_dbf_table)
886            (SaveSessionTest.test_joined_table): Add XML validation tests.
887    
888    2003-08-22  Bernhard Herzog  <[email protected]>
889    
890            Implement saving a session with a postgis connection
891    
892            * Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New
893            elements for database connections and shapestores using db
894            connections
895            (session): Add the dbconnections to the content model
896    
897            * Thuban/Model/save.py (SessionSaver.write_db_connections): New.
898            Write the db connections
899            (SessionSaver.write_session): Call write_db_connections to write
900            the connection before the data sources
901            (SessionSaver.write_data_containers): Handle postgis shapestores
902    
903            * test/test_save.py (SaveSessionTest.thubanids)
904            (SaveSessionTest.thubanidrefs): Update for new DTD
905            (SaveSessionTest.test_save_postgis): New. Test saving a session
906            with postgis connections
907    
908            * Thuban/Model/postgisdb.py (PostGISTable.DBConnection)
909            (PostGISTable.TableName): New accessor methods for the connection
910            and table name
911    
912            * test/test_postgis_db.py (TestPostGISTable.test_dbconn)
913            (TestPostGISTable.test_dbname): New methods to test the new
914            PostGISConnection methods
915    
916    2003-08-22  Bernhard Herzog  <[email protected]>
917    
918            * Thuban/Model/postgisdb.py (ConnectionError): New exception class
919            for exceptions occurring when establishing a Database connection
920            (PostGISConnection.connect): Catch psycopg.OperationalError during
921            connects and raise ConnectionError.
922    
923            * test/test_postgis_db.py (TestPostgisDBExceptions): New class for
924            tests for database exceptions
925    
926    2003-08-22  Bernhard Herzog  <[email protected]>
927    
928            Prepare the test suite for tests with required authentication
929    
930            * test/postgissupport.py (PostgreSQLServer.__init__): Add instance
931            variables with two predefined users/passwords, one for the admin
932            and one for a non-privileged user.
933            (PostgreSQLServer.createdb): Pass the admin name to initdb and add
934            the non-privileged user to the database and set the admin password
935            (PostgreSQLServer.wait_for_postmaster): Use the admin user name.
936            Better error reporting
937            (PostgreSQLServer.connection_params)
938            (PostgreSQLServer.connection_string): New methods to return
939            information about how to connect to the server
940            (PostgreSQLServer.execute_sql): New. Convenience method to execute
941            SQL statements
942            (PostgreSQLServer.require_authentication): Toggle whether the
943            server requires authentication
944            (PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New.
945            Add or alter users
946            (PostGISDatabase.initdb): Pass the admin name one the
947            subprocesses' command lines. Grant select rights on
948            geometry_columns to everybody.
949            (upload_shapefile): Use the admin name and password when
950            connecting. Grant select rights on the new table to everybody.
951    
952            * test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the
953            server's new methods to get the connection parameters.
954    
955            * test/test_postgis_session.py (TestSessionWithPostGIS.setUp)
956            (TestSessionWithPostGIS.test_remove_dbconn_exception): Use the
957            server's new methods to get the connection parameters.
958    
959            * test/test_postgis_db.py
960            (TestPostGISConnection.test_gis_tables_empty)
961            (TestPostGISConnection.test_gis_tables_non_empty)
962            (PostGISStaticTests.setUp): Use the server's new methods to get
963            the connection parameters.
964    
965    2003-08-22  Bernhard Herzog  <[email protected]>
966    
967            * Thuban/UI/about.py (About.__init__): Add the psycopg version.
968    
969            * Thuban/version.py: Add psycopg version
970    
971            * Thuban/Model/postgisdb.py (psycopg_version): New. Return the
972            version of the psycopg module
973    
974    2003-08-22  Bernhard Herzog  <[email protected]>
975    
976            * Thuban/UI/dbdialog.py (DBPwdDlg): Removed because it's not used.
977            (DBFrame.OnEdit): Removed because it's not used and wouldn't work
978            at the moment. The functionality should probably be implemented
979            some time, though.
980            (DBFrame.OnRemove): Display a message if the connection can't be
981            removed because it's still in use.
982    
983    2003-08-22  Jan-Oliver Wagner <[email protected]>
984    
985            * Thuban/UI/about.py (About.__init__): split up the huge about
986            text into elements/lists for easier translation. This fixes bug
987            https://intevation.de/rt/webrt?serial_num=2058
988            Also, made some forgotten string available for the i18n.
989    
990    2003-08-21  Bernhard Herzog  <[email protected]>
991    
992            Make postgis support really optional including insensitive menu
993            items.
994    
995            * Thuban/Model/postgisdb.py (has_postgis_support): New. Return
996            whether the postgis is supported.
997    
998            * Thuban/UI/dbdialog.py: Put the psycopg import into try..except
999            to make postgis support optional
1000    
1001            * Thuban/UI/mainwindow.py (_has_postgis_support): New. Context
1002            version of Thuban.Model.postgisdb.has_postgis_support
1003            (database_management command): Make it only sensitive if postgis
1004            is supported.
1005    
1006    2003-08-21  Jan-Oliver Wagner <[email protected]>
1007    
1008            * Doc/manual/thuban-manual.xml: Added CVS revision for rev-history.
1009            (section Adding and Removing Layers): Added text and described
1010            multi-selection.
1011            (chapter Extensions): New.
1012    
1013    2003-08-21  Jan-Oliver Wagner <[email protected]>
1014    
1015            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Changed dialog
1016            settings to allow multiple files to load into the map.
1017            Also reduced selection to *.shp as a default.
1018    
1019    2003-08-20  Bernhard Herzog  <[email protected]>
1020    
1021            Add dialogs and commands to open database connections and add
1022            database layers.
1023    
1024            * Thuban/UI/mainwindow.py (MainWindow.DatabaseManagement): New
1025            method to open the database connection management dialog
1026            (MainWindow.AddDBLayer): New method to add a layer from a database
1027            (_has_dbconnections): New helper function to use for sensitivity
1028            (database_management command, layer_add_db command): New commands
1029            that call the above new methods.
1030            (main_menu): Add the new commands to the menu.
1031    
1032            * Thuban/Model/postgisdb.py (PostGISConnection.__init__)
1033            (PostGISConnection.connect): Establish the actual connection in a
1034            separate method and call it in __init__. This makes it easier to
1035            override the behavior in test cases
1036            (PostGISConnection.BriefDescription): New method to return a brief
1037            description for use in dialogs.
1038    
1039            * test/test_postgis_db.py (NonConnection): DB connection that
1040            doesn't actually connect
1041            (TestBriefDescription): New class with tests for the new
1042            BriefDescription method
1043    
1044    2003-08-19  Jan-Oliver Wagner <[email protected]>
1045    
1046            Moved anything from extensions to libraries.
1047    
1048            * libraries: New.
1049    
1050            * libraries/ pyprojection, pyshapelib, shapelib, thuban: New.
1051    
1052            * libraries/pyprojection/ LICENSE, MANIFEST.in, Projection.i,
1053            Projection.py, Projection_wrap.c, setup.py, swighelp.txt: These files have
1054            been moved here from thuban/extensions/pyprojection/
1055            See there in the Attic for the older history.
1056    
1057            * libraries/pyshapelib/ COPYING, ChangeLog, NEWS, README, dbflib.i,
1058            dbflib.py, dbflib_wrap.c, pyshapelib_api.h, pytest.py, setup.py,
1059            shapelib.i, shapelib.py, shapelib_wrap.c, shptreemodule.c: These files
1060            have been moved here from thuban/extensions/pyshapelib/
1061            See there in the Attic for the older history.
1062    
1063            * libraries/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: These
1064            files have been moved here from thuban/extensions/shapelib/
1065            See there in the Attic for the older history.
1066    
1067            * libraries/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
1068            gdalwarp.cpp, wxproj.cpp: These files have been moved here from
1069            thuban/extensions/thuban/
1070            See there in the Attic for the older history.
1071    
1072            * MANIFEST.in, setup.cfg, setup.py: renamed extensions to libraries.
1073    
1074            * extensions/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
1075            gdalwarp.cpp, wxproj.cpp: Moved to libraries/thuban.
1076    
1077            * extensions/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c:
1078            Moved to libraries/shapelib.
1079    
1080            * extensions/pyshapelib/ COPYING, NEWS, dbflib.py, pytest.py,
1081            shapelib.py, README, dbflib_wrap.c, setup.py, shapelib_wrap.c,
1082            ChangeLog, dbflib.i, pyshapelib_api.h, shapelib.i, shptreemodule.c:
1083            Moved to libraries/pyshapelib.
1084    
1085            * extensions/pyprojection/ MANIFEST.in, Projection.py, setup.py,
1086            LICENSE, Projection.i, Projection_wrap.c, swighelp.txt:
1087            Moved to libraries/pyprojection.
1088    
1089            * extensions/ pyprojection, pyshapelib, shapelib, thuban: Removed.
1090    
1091            * extensions: Removed.
1092    
1093    2003-08-19  Bernhard Herzog  <[email protected]>
1094    
1095            * test/test_viewport.py (ViewPortTest): We don't use the
1096            facilities of FileTestMixin so don't derive from it.
1097            (TestViewportWithPostGIS): New class with tests for using a
1098            viewport on a map with postgis layers.
1099    
1100    2003-08-19  Bernhard Herzog  <[email protected]>
1101    
1102            Add the db connection management to the session.
1103    
1104            * Thuban/Model/session.py (Session.__init__): New instance
1105            variable db_connections
1106            (Session.AddDBConnection, Session.DBConnections)
1107            (Session.HasDBConnections, Session.CanRemoveDBConnection)
1108            (Session.RemoveDBConnection): New methods to manage and query the
1109            db connections managed by the session
1110            (Session.OpenDBShapeStore): New method to open a shapestore from a
1111            db connection
1112    
1113            * Thuban/Model/messages.py (DBCONN_REMOVED, DBCONN_ADDED): New
1114            messages for the db connection handling in the session
1115    
1116            * test/test_postgis_session.py: New. test cases for the session's
1117            db connection handling with postgis connections
1118    
1119    2003-08-19  Bernhard Herzog  <[email protected]>
1120    
1121            Add very basic postgis database support and the corresponding test
1122            cases. The test cases require a PostgreSQL + postgis installation
1123            but no existing database. The database will be created
1124            automatically by the test cases
1125    
1126            * test/README: Add note about skipped tests and the requirements
1127            of the postgis tests.
1128    
1129            * Thuban/Model/postgisdb.py: New. Basic postgis database support.
1130    
1131            * test/test_postgis_db.py: New. Test cases for the postgis
1132            support.
1133    
1134            * Thuban/Model/wellknowntext.py: New. Parser for well-known-text
1135            format
1136    
1137            * test/test_wellknowntext.py: New. Test cases for the
1138            wellknowntext parser
1139    
1140            * test/postgissupport.py: New. Support module for tests involving
1141            a postgis database.
1142    
1143            * test/support.py (execute_as_testsuite): Shut down the postmaster
1144            if it's still running after the tests
1145    
1146            * Thuban/Model/data.py (RAW_WKT): New constant for raw data in
1147            well known text format
1148    
1149    2003-08-19  Jan-Oliver Wagner <[email protected]>
1150    
1151            * Examples/simple_extensions/hello_world.py: New. Raises a Hello World
1152            message dialog.
1153    
1154    2003-08-18  Bernhard Herzog  <[email protected]>
1155    
1156            * test/support.py (ThubanTestResult.printErrors): Indent the
1157            reason for the skips in the output to make it a bit more readable.
1158            (execute_as_testsuite): New helper function to run a test suite
1159            and print some more information.
1160            (run_tests): Use execute_as_testsuite to run the tests
1161    
1162            * test/runtests.py (main): Use execute_as_testsuite to run the
1163            tests
1164    
1165    2003-08-18  Bernhard Herzog  <[email protected]>
1166    
1167            Fix some bugs in Thuban and the test suite that were uncovered by
1168            changes introduced in Python 2.3:
1169    
1170            * Thuban/Model/table.py (DBFTable.__init__): Make sure the
1171            filename is an absolute name
1172    
1173            * Thuban/Model/layer.py (RasterLayer.__init__): Make sure the
1174            filename is an absolute name
1175    
1176            * test/test_save.py (SaveSessionTest.testRasterLayer): Use a
1177            unique filename to save to and use the correct relative filename
1178            in the expected output.
1179            (SaveSessionTest.test_dbf_table): Use the correct relative
1180            filename in the expected output.
1181    
1182            * test/test_layer.py (TestLayer.test_raster_layer): Update the
1183            test to check whether the filename is absolute.
1184    
1185    2003-08-18  Jan-Oliver Wagner <[email protected]>
1186    
1187            * Thuban/UI/about.py (About.__init__): Added Silke Reimer.
1188    
1189    2003-08-15  Bernhard Herzog  <[email protected]>
1190    
1191            Change the way shapes are returned by a shape store. The
1192            ShapesInRegion method returns an iterator over actual shape
1193            objects instead of a list of shape ids.
1194    
1195            * Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
1196            id.
1197            (ShapefileStore.ShapesInRegion): Return an iterator over the
1198            shapes which yields shape objects instead of returning a list of
1199            shape ids
1200            (ShapefileStore.AllShapes): New. Return an iterator over all
1201            shapes in the shape store
1202            (DerivedShapeStore.AllShapes): New. Like in ShapefileStore
1203    
1204            * Thuban/Model/layer.py (Layer.ShapesInRegion): Update
1205            doc-string.
1206    
1207            * Thuban/UI/baserenderer.py
1208            (BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
1209            layer_shapes and make it return an iterator containg shapes
1210            instead of a list of ids.
1211            (BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
1212            layer_shapes() change
1213    
1214            * Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
1215            (ScreenRenderer.layer_shapes): Rename as in BaseRenderer
1216    
1217            * Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
1218            changes in the ShapesInRegion return value.
1219            (ViewPort._get_hit_tester): Remove commented out code
1220    
1221            * test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
1222            new return value.
1223            (SimpleShapeStore.AllShapes): New. Implement this method too.
1224    
1225            * test/test_layer.py (TestLayer.test_arc_layer)
1226            (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
1227            (TestLayer.test_point_layer_with_projection)
1228            (TestLayer.test_derived_store): Adapt to changes in the
1229            ShapesInRegion return value.
1230    
1231            * test/test_shapefilestore.py
1232            (TestShapefileStoreArc.test_shapes_in_region)
1233            (TestShapefileStorePolygon.test_shapes_in_region)
1234            (TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
1235            in the ShapesInRegion return value.
1236            (TestShapefileStorePoint.test_all_shapes)
1237            (TestShapefileStoreArc.test_shape_shapeid): New tests for the new
1238            methods
1239    
1240            * test/test_derivedshapestore.py
1241            (TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
1242            the ShapesInRegion return value.
1243            (TestDerivedShapeStore.test_all_shapes)
1244            (TestDerivedShapeStore.test_shape_shapeid): New tests for the new
1245            methods
1246    
1247    2003-08-15  Bernhard Herzog  <[email protected]>
1248    
1249            Make the renderers deal correctly with raw vs. python level
1250            representation of shape geometries
1251    
1252            * Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer):
1253            Return a flag useraw in addition to the callable and the parameter
1254            to indicate whether the callable can deal with the raw shape data
1255            or uses the higher level python lists of coordinates. The callable
1256            now should accept either the raw data or the return value of the
1257            shape's Points() method.
1258            (BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer
1259            change
1260            (BaseRenderer.projected_points): Instead of the shape id use the
1261            points list as parameter.
1262            (BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape)
1263            (BaseRenderer.draw_point_shape): Adapt to projected_points()
1264            change and accept the points list as parameter instead of the
1265            shape id.
1266    
1267            * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return
1268            the useraw flag as required by the BaseRenderer
1269            (ScreenRenderer.draw_shape_layer): Adapt to low-level renderer
1270            changes.
1271    
1272            * test/test_baserenderer.py
1273            (TestBaseRenderer.test_point_with_classification): New test for
1274            rendering a map with classifications.
1275    
1276    2003-08-15  Bernhard Herzog  <[email protected]>
1277    
1278            * Thuban/UI/viewport.py (ViewPort.find_shape_at)
1279            (ViewPort._find_shape_in_layer, ViewPort._find_shape_in_layer)
1280            (ViewPort._get_hit_tester, ViewPort.projected_points)
1281            (ViewPort._hit_point, ViewPort._hit_arc, ViewPort._hit_polygon)
1282            (ViewPort._find_label_at): Split the find_shape_at method into
1283            several new methods and use the functions in the hit-test module.
1284    
1285            * Thuban/UI/hittest.py: New module with Python-level hit-testing
1286            functions
1287    
1288            * test/test_hittest.py: New. Test for the new hittest module
1289    
1290    2003-08-15  Bernhard Herzog  <[email protected]>
1291    
1292            * Thuban/Model/layer.py (Layer.ShapesInRegion): Apply the layer
1293            projection to all corners of the bounding box to get a better
1294            approximation of the projected bounding box
1295    
1296            * test/test_layer.py (TestLayer.test_point_layer_with_projection):
1297            New. Test coordinate handling of a layer with a projection.
1298            Catches the bug fixed in Layer.ShapesInRegion
1299    
1300    2003-08-15  Bernhard Herzog  <[email protected]>
1301    
1302            Move some of the mock objects in test_baserenderer into their own
1303            module so they can easily be used from other tests
1304    
1305            * test/mockgeo.py: New test helper module with some mock objects
1306            for geometry related things like shapes, shapestores and
1307            projections.
1308    
1309            * test/test_mockgeo.py: New. Tests for the new helper module
1310    
1311            * test/test_baserenderer.py: Some of the mock-objects are in
1312            mockgeo now.
1313    
1314    2003-08-12  Jan-Oliver Wagner <[email protected]>
1315    
1316            * Thuban/UI/about.py (About.__init__): Added Bj�rn Broscheit.
1317    
1318    2003-08-12  Bernhard Herzog  <[email protected]>
1319    
1320            * po/de.po: New. German translations by Bjoern Broscheit
1321    
1322    2003-08-12  Bernhard Herzog  <[email protected]>
1323    
1324            * Thuban/UI/projdialog.py (UnknownProjPanel._DoLayout): Translated
1325            strings have to be one string literal.
1326    
1327    2003-08-11  Bernhard Herzog  <[email protected]>
1328    
1329            * test/support.py (FloatComparisonMixin.assertPointListEquals):
1330            New. This method was used in various derived classes, but it's
1331            better to have it here.
1332    
1333            * test/test_shapefilestore.py
1334            (ShapefileStoreTests.assertPointListEquals): Removed. It's now in
1335            FloatComparisonMixin
1336    
1337            * test/test_layer.py (TestLayer.assertPointListEquals): Removed.
1338            It's now in FloatComparisonMixin
1339    
1340            * test/test_derivedshapestore.py
1341            (TestDerivedShapeStore.assertPointListEquals): Removed. It's now
1342            in FloatComparisonMixin
1343    
1344    2003-08-11  Bernhard Herzog  <[email protected]>
1345    
1346            * Thuban/UI/join.py (JoinDialog.OnJoin): Add missing space to
1347            error message
1348    
1349    2003-08-08  Jan-Oliver Wagner <[email protected]>
1350    
1351            * Doc/manual/thuban-manual.xml: Now use authorgroup. Added revhistory
1352            with version number.
1353            Changed title to reflect version number of Thuban.
1354    
1355    2003-08-08  Jan-Oliver Wagner <[email protected]>
1356    
1357            * Thuban/UI/about.py (About.__init__): Reworked the hall of fame. Now
1358            the list corresponds to the "About" web page.
1359    
1360    2003-08-08  Bernhard Herzog  <[email protected]>
1361    
1362            * Thuban/UI/projdialog.py (UTMProposeZoneDialog.dialogLayout):
1363            Make sure translated strings are recognized as one string literal.
1364    
1365            * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog.dialogLayout):
1366            Make sure translated strings are recognized as one string literal.
1367    
1368            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Make sure
1369            translated strings are recognized as one string literal.
1370    
1371            * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
1372            sure translated strings are recognized as one string literal.
1373    
1374    2003-08-07  Bernhard Herzog  <[email protected]>
1375    
1376            * Thuban/Model/data.py (DerivedShapeStore.RawShapeFormat): New.
1377            Simply delegates to the original shapestore.
1378    
1379            * test/test_derivedshapestore.py
1380            (TestDerivedShapeStore.test_raw_format): New. Test case for
1381            DerivedShapeStore.RawShapeFormat
1382    
1383    2003-08-07  Bernhard Herzog  <[email protected]>
1384    
1385            Add raw data interface to shape objects.
1386    
1387            * Thuban/Model/data.py (ShapefileShape, Shape): Rname the shape
1388            class to ShapefileShape which now holds shapefile specific
1389            information.
1390            (ShapefileShape.compute_bbox): Simplified to not cache any
1391            information. The way this method is used that shouldn't matter
1392            performance wise.
1393            (ShapefileShape.RawData): New. Return the shapeid which is the raw
1394            data format for shapes from shapefiles.
1395            (ShapefileStore.RawShapeFormat): New. Return the raw datatype used
1396            in the shape objects returned by a shapestore. For a
1397            ShapefileStore this is always RAW_SHAPEFILE.
1398            (RAW_PYTHON, RAW_SHAPEFILE): Constants for the RawShapeFormat
1399            method.
1400    
1401            * test/test_shapefilestore.py
1402            (TestShapefileStore.test_raw_format): New test to test the raw
1403            format feature of shapes.
1404    
1405            * Thuban/Model/layer.py: Remove the unused import of Shape from
1406            data. It was only there for interface compatibility but it's not
1407            used inside of Thuban and the generic Shape class has gone away.
1408    
1409            * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Check
1410            the raw data format and only use an optimized version of its a
1411            shapefile.
1412    
1413    2003-08-07  Bernhard Herzog  <[email protected]>
1414    
1415            * test/test_baserenderer.py (SimpleShape): Shape class for the
1416            tests.
1417            (SimpleShapeStore.Shape): Use SimpleShape instead of
1418            Thuban.Model.data.Shape to make the tests independed of the coming
1419            changes.
1420    
1421    2003-08-07  Bernhard Herzog  <[email protected]>
1422    
1423            * test/support.py (SkipTest, ThubanTestResult, ThubanTestRunner)
1424            (ThubanTestProgram): New classes that extend the respective
1425            classes from unittest. These new version support skipping tests
1426            under certain expected conditions. In the Thuban test suite we
1427            uses this for tests that require the optional gdal support.
1428            (run_tests): Use ThubanTestProgram instead of the unittest.main()
1429    
1430            * test/runtests.py (main): Use the new ThubanTestRunner instead of
1431            the normal one from unittest
1432    
1433            * test/test_layer.py (TestLayer.test_raster_layer): If this test
1434            is not run because gdal support isn't available report this to the
1435            runner.
1436    
1437            * test/test_baserenderer.py
1438            (TestBaseRenderer.test_raster_no_projection): Do not run this test
1439            if gdal support isn't available and report this to the runner.
1440    
1441    2003-08-06  Bernhard Herzog  <[email protected]>
1442    
1443            Rearrange the renderers a bit, partly in preparation for changes
1444            required for the postgis merge, partly to make it more testable.
1445            Also make the representation of coordinates in Shapes more
1446            consistent.
1447    
1448            * Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
1449            this class is now in BaseRenderer. This class is now practically
1450            only a specialization of BaseRenderer for rendering to an actual
1451            wx DC.
1452            (ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
1453            to get the shapetype specific rendering functions.
1454    
1455            * Thuban/UI/baserenderer.py: New file with the basic rendering
1456            logic. The code in this file is completely independend of wx.
1457            (BaseRenderer): Class with the basic rendering logic
1458    
1459            * test/test_baserenderer.py: New. Test cases for BaseRenderer
1460    
1461            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
1462            error_on_redraw to guard agains endless loops and stack overflows
1463            when there's a bug in the rendering code that raises exceptions.
1464            (MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
1465            rendering into a separate method _do_redraw so that error handling
1466            is a bit easier. When an exception occurs, set error_on_redraw to
1467            true. When it's true on entry to OnIdle do nothing and return
1468            immediately.
1469    
1470            * Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a
1471            Shape object will always have the coordinates as a list of list of
1472            coordinate pairs (tuples).
1473            (Shape.compute_bbox): Adapt to new representation.
1474    
1475            * Thuban/UI/viewport.py (ViewPort.find_shape_at)
1476            (ViewPort.LabelShapeAt): Adapt to new coordinate representation in
1477            Shape objects.
1478    
1479            * test/test_shapefilestore.py
1480            (ShapefileStoreTests.assertFloatTuplesEqual)
1481            (ShapefileStoreTests.assertPointListEquals): Rename to
1482            assertPointListEquals and change purpose to checking equality of
1483            the lists returned by Shape.Points().
1484            (TestShapefileStoreArc.test_shape)
1485            (TestShapefileStorePolygon.test_shape)
1486            (TestShapefileStorePoint.test_shape): Use the new
1487            assertPointListEquals instead of assertFloatTuplesEqual
1488    
1489            * test/test_layer.py (TestLayer.assertFloatTuplesEqual)
1490            (TestLayer.assertPointListEquals): Rename to assertPointListEquals
1491            and change purpose to checking equality of the lists returned by
1492            Shape.Points().
1493            (TestLayer.test_arc_layer, TestLayer.test_arc_layer)
1494            (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
1495            (TestLayer.test_derived_store): Use the new assertPointListEquals
1496            instead of assertFloatTuplesEqual
1497    
1498            * test/test_derivedshapestore.py
1499            (TestDerivedShapeStore.assertFloatTuplesEqual)
1500            (TestDerivedShapeStore.assertPointListEquals): Rename to
1501            assertPointListEquals and change purpose to checking equality of
1502            the lists returned by Shape.Points().
1503            (TestDerivedShapeStore.test_shape): Use the new
1504            assertPointListEquals instead of assertFloatTuplesEqual
1505    
1506    2003-08-06  Jan-Oliver Wagner <[email protected]>
1507    
1508            * Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for
1509            a bounding box. A dialog is raised in case, no bounding box
1510            is found. This fixes bug #2043:
1511            https://intevation.de/rt/webrt?serial_num=2043
1512    
1513    2003-08-05  Bernhard Herzog  <[email protected]>
1514    
1515            * Thuban/Model/color.py (Color.__repr__): Make the repr of a color
1516            object look like a Color instantiation. Formerly it looked like a
1517            tuple.
1518    
1519            * test/test_color.py (TestColor.test_repr)
1520            (TestColor.test_equality, TestColor.test_inequality): New. test
1521            some more apects of the Color class
1522            (TestTransparent.test_repr, TestTransparent.test_hex)
1523            (TestTransparent.test_equality): New. Test cases for the
1524            Transparent object.
1525    
1526    2003-08-04  Jan-Oliver Wagner <[email protected]>
1527    
1528            * Doc/manual/thuban-manual.xml: a number of small improvements.
1529            The resulting file is the version submitted for GREAT-ER II.
1530    
1531    2003-08-01  Bernhard Herzog  <[email protected]>
1532    
1533            * Thuban/UI/resource.py, Thuban/UI/projdialog.py,
1534            Thuban/UI/join.py, Thuban/UI/classgen.py, Thuban/UI/about.py,
1535            Thuban/Model/resource.py: Insert cvs keywords and doc-strings.
1536    
1537            * Thuban/UI/common.py: Insert cvs keywords and doc-strings.
1538            (Color2wxColour, wxColour2Color, ThubanBeginBusyCursor)
1539            (ThubanEndBusyCursor): Add doc-strings
1540    
1541    2003-08-01  Bernhard Herzog  <[email protected]>
1542    
1543            First step towards PostGIS integration. More abstraction by movin
1544            more code from the layer to the shapestore. More methods of the
1545            layer are now simply delegated to the equivalent method of the
1546            shapestore. The SHAPETYPE_* constants are now in data not in
1547            layer.
1548    
1549            * Thuban/Model/data.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
1550            (SHAPETYPE_POINT, Shape): Move these constants and classes from
1551            layer.py to data.py
1552            (ShapefileStore.__init__): More Initialization for the new methods
1553            and functionality.
1554            (ShapefileStore.ShapeType, ShapefileStore.NumShapes)
1555            (ShapefileStore.BoundingBox, ShapefileStore.ShapesInRegion)
1556            (ShapefileStore.Shape): New methods that were formerly implemented
1557            in the layer.
1558            (DerivedShapeStore.Shape, DerivedShapeStore.ShapesInRegion)
1559            (DerivedShapeStore.ShapeType, DerivedShapeStore.NumShapes)
1560            (DerivedShapeStore.BoundingBox): New. DerivedShapeStore
1561            equivalents of the new shape methods. These versions are simply
1562            delegated to the original shapstore.
1563    
1564            * Thuban/Model/layer.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
1565            (SHAPETYPE_POINT, Shape): Removed. They're now in data.py
1566            (Layer.SetShapeStore): Removed the initializatin of instance
1567            variables that were needed for the stuff that's now in
1568            ShapefileStore
1569            (Layer.BoundingBox, Layer.NumShapes, Layer.ShapeType)
1570            (Layer.Shape, Layer.ShapesInRegion): Simply delegate to the
1571            shapestore.
1572    
1573            * Thuban/UI/classifier.py, Thuban/UI/renderer.py,
1574            Thuban/UI/viewport.py: Import the SHAPETYPE_* constants from data
1575            instead of layer.
1576    
1577            * test/test_shapefilestore.py: New. Tests for ShapefileStore.
1578    
1579            * test/test_derivedshapestore.py: New. Tests for DerivedShapeStore.
1580    
1581            * test/test_layer.py: Import the SHAPETYPE_* constants from data
1582            instead of layer.
1583            (TestLayer.test_derived_store): Remove the test for the exception
1584            when instantiating the DerivedShapeStore with an incompatible
1585            table which is now in test_derivedshapestore.py. Add some more
1586            tests of the layer methods to determine whether they work for a
1587            DerivedShapeStore as well.
1588    
1589    2003-07-31  Jonathan Coles   <[email protected]>
1590    
1591            * Doc/manual/thuban-manual.xml: Fix the list of required packages
1592            by just listing the name and where they can be found.
1593    
1594    2003-07-31  Frank Koormann   <[email protected]>
1595    
1596            * Doc/manual/thuban-manual.xml:
1597            Changed the screenshot elements to figure.
1598            Changed some variablelist elements to itemizedlist.
1599            Added section on GDAL formats.
1600    
1601    2003-07-31  Jonathan Coles   <[email protected]>
1602    
1603            * Doc/manual/thuban-manual.xml: Added a few sentences about
1604            the Fix Border Color option when generating classes.
1605    
1606    2003-07-30  Jonathan Coles   <[email protected]>
1607    
1608            * Thuban/Model/classgen.py: Add docstrings. Rename specific
1609            Ramp instances to use lower_case_style.
1610    
1611            * Thuban/UI/classgen.py: Use renamed Ramp instances.
1612            
1613            * Thuban/UI/classifier.py: Add docstrings.
1614    
1615            * Thuban/UI/dock.py: Add docstrings.
1616    
1617            * test/test_classgen.py: Use renamed Ramp instances.
1618    
1619    2003-07-30  Bernhard Herzog  <[email protected]>
1620    
1621            * Thuban/Lib/connector.py (QueueingPublisher): Removed. This class
1622            was never used in Thuban.
1623    
1624    2003-07-30  Bernhard Herzog  <[email protected]>
1625    
1626            * Thuban/UI/join.py (JoinDialog.__init__): Use the table's Title()
1627            method directly instead of going through the transient_table
1628            method. This faster because transient_table may force the copy of
1629            a DBF file into the transient database and setting a table's title
1630            doesnm't affect the title of the associated transient table, so
1631            this fixes RT #2042
1632    
1633            * Thuban/UI/main.py (__version__): Don't import the already
1634            removed show_exception_dialog.
1635    
1636    2003-07-29  Jonathan Coles   <[email protected]>
1637    
1638            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
1639            Put back this method and remove the equivalent function since we
1640            are setting the exception hook from within this class (OnInit).
1641    
1642    2003-07-29  Jonathan Coles   <[email protected]>
1643    
1644            * Doc/manual/images/5_2_custom_ramp.png,
1645            Doc/manual/images/5_2_quantiles.png,
1646            Doc/manual/images/5_2_uniform_dist.png,
1647            Doc/manual/images/5_2_unique_values.png,
1648            Doc/manual/images/8_int_error.png: New screen shots.
1649    
1650            * Doc/manual/thuban-manual.xml: Fixed typos and wording, clarified
1651            some points, and added more screen shots.
1652    
1653    2003-07-29  Bernhard Herzog  <[email protected]>
1654    
1655            * Thuban/Model/data.py: Remove the now unused import of warnings
1656    
1657    2003-07-29  Bernhard Herzog  <[email protected]>
1658    
1659            * Thuban/Model/data.py (SimpleStore): Removed. This class has been
1660            deprecated since before the 0.8 release and isn't used in Thuban
1661            itself anymore.
1662    
1663            * Thuban/Model/transientdb.py: Remove some unnecessary imports
1664    
1665    2003-07-29  Jonathan Coles   <[email protected]>
1666    
1667            * Thuban/UI/application.py (ThubanApplication.OnInit): set the
1668            python exception hook here so that we are sure to catch any
1669            Thuban exception that happen during initialization.
1670    
1671            * Thuban/UI/main.py (main): Don't set the exception hook here,
1672            it will get set in ThubanApplication.OnInit.
1673    
1674    2003-07-29  Jonathan Coles   <[email protected]>
1675                                                                                
1676            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
1677            Removed and called it show_exception_dialog() so that the exception
1678            handler can be set before the class is created.
1679                                                                                
1680            * Thuban/UI/main.py (main): Install the exception handler before
1681            a ThubanApplication is created.
1682                                                                                    
1683    2003-07-29  Bernhard Herzog  <[email protected]>
1684    
1685            * po/it.po: New. Italian translation by Maurizio Napolitano
1686    
1687            * po/ru.po: New. Russian translation by Alex Shevlakov
1688    
1689    2003-07-29  Frank Koormann   <[email protected]>
1690    
1691            * Doc/manual/thuban-manual.xml: Extended section on supported
1692            projections.
1693            
1694    2003-07-29  Frank Koormann   <[email protected]>
1695    
1696            * Doc/manual/thuban-manual.xml: gaspell-checked.
1697    
1698    2003-07-29  Jonathan Coles   <[email protected]>
1699    
1700            * Doc/manual/images/3_5_legend.png: Added border to improve look
1701            on white background.
1702    
1703    2003-07-29  Jonathan Coles   <[email protected]>
1704    
1705            * Doc/manual/thuban-manual.xml: Fixed grammar and typos. Added
1706            descriptions for the legend toolbar.
1707    
1708            * Doc/manual/images/4_2_raster_layer_properties.png: Removed
1709            cursor from dialog box.
1710    
1711    2003-07-28  Jonathan Coles   <[email protected]>
1712    
1713            * Doc/manual/thuban-manual.xml: More screenshots and more chapters.
1714    
1715            * Doc/manual/images/2_4_session_tree.png,
1716            Doc/manual/images/3_5_legend.png, Doc/manual/images/3_rename_map.png,
1717            Doc/manual/images/4_2_layer_properties.png,
1718            Doc/manual/images/4_2_raster_layer_properties.png,
1719            Doc/manual/images/5_3_genclass.png,
1720            Doc/manual/images/5_classification.png,
1721            Doc/manual/images/6_projection.png,
1722            Doc/manual/images/7_1_table_view.png,
1723            Doc/manual/images/7_2_5_join.png: New screenshots.
1724    
1725    2003-07-24  Jonathan Coles   <[email protected]>
1726    
1727            * Doc/manual/thuban-manual.xml: Chapter on Projection Management.
1728    
1729    2003-07-24  Jonathan Coles   <[email protected]>
1730    
1731            * Doc/manual/thuban-manual.xml: Added EPS images and wrote
1732            chapter on Layer Management.
1733    
1734            * Doc/manual/Makefile: New. Makefile to generate all formats for the
1735            manual and images.
1736    
1737    2003-07-24  Bernhard Herzog  <[email protected]>
1738    
1739            * Thuban/Model/range.py, Thuban/version.py: Remove the #! line as
1740            it annoys lintian which warns about these files not being
1741            executable. The #! isn't necessary here since if you absolutely
1742            must execute them you can always say "python <filename>".
1743    
1744            * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Remove
1745            superfluous code to set brush and pen for point shapes
1746    
1747            * Thuban/UI/viewport.py: Remove commented out code that wouldn't
1748            belong in viewport anyway
1749    
1750    2003-07-24  Frank Koormann   <[email protected]>
1751    
1752            * Doc/manual/thuban-manual.xml: Added section on table management.
1753    
1754    2003-07-24  Bernhard Herzog  <[email protected]>
1755    
1756            * test/runtests.py (main): Recognize the long "verbose" option
1757            correctly.
1758    
1759    2003-07-22  Jonathan Coles   <[email protected]>
1760    
1761            * Doc/manual/thuban-manual.xml: Continue to write first revision
1762            of the manual.
1763    
1764            * Thuban/UI/renderer.py (MapRenderer.render_map): Wrap method
1765            with Begin/EndDrawing() calls to ensure we aren't doing to
1766            many updates to the dc during rendering.
1767            (ScreenRenderer.draw_shape_layer): self.draw_point_shape takes
1768            a pen and brush argument so they need to be passed to the function.
1769    
1770            * Thuban/UI/viewport.py (ViewPort.calc_min_max_scales): New.
1771            Calculates the minimum and maximum scale values. Factored out
1772            of set_view_transform so that it could be used to zoom all the
1773            way into a single point.
1774            (ViewPort.set_view_transform): Call calc_min_max_scales().
1775            (ViewPort.FitSelectedToWindow): Zoom to the maximum scale
1776            if only a single point is selected.
1777    
1778            * Doc/manual/images/1_2_legend_close.png,
1779            Doc/manual/images/1_2_legend_dock.png,
1780            Doc/manual/images/1_2_mainwindow.png,
1781            Doc/manual/images/1_2_mainwindow.ps,
1782            Doc/manual/images/1_2_mainwindow.sk,
1783            Doc/manual/images/3_2_fullextent.png,
1784            Doc/manual/images/3_2_fulllayerextent.png,
1785            Doc/manual/images/3_2_fullshapeextent.png,
1786            Doc/manual/images/3_2_pan.png,
1787            Doc/manual/images/3_2_zoomin.png,
1788            Doc/manual/images/3_2_zoomout.png,
1789            Doc/manual/images/3_3_identify.png,
1790            Doc/manual/images/3_3_label.png,
1791            Doc/manual/images/3_5_invisible.png,
1792            Doc/manual/images/3_5_movedown.png,
1793            Doc/manual/images/3_5_moveup.png,
1794            Doc/manual/images/3_5_props.png,
1795            Doc/manual/images/3_5_tobottom.png,
1796            Doc/manual/images/3_5_totop.png,
1797            Doc/manual/images/3_5_visible.png: New. Images for the documentation.
1798    
1799    2003-07-18  Bernhard Herzog  <[email protected]>
1800    
1801            * Thuban/UI/messages.py (MAP_REPLACED): New message.
1802    
1803            * Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED
1804            after the new map has been assigned
1805    
1806            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages):
1807            Delegate MAP_REPLACED to the canvas too
1808            (MainWindow.prepare_new_session): Removed. Thanks to the new
1809            MAP_REPLACED message it's no longer needed
1810            (MainWindow.OpenSession, MainWindow.NewSession):
1811            prepare_new_session has been removed.
1812    
1813            * Thuban/UI/classifier.py (Classifier.__init__): Subscribe to
1814            MAP_REPLACED so that we can close the dialog if a new map is set.
1815            (Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED
1816            (Classifier.map_replaced): Handle MAP_REPLACED by closing the
1817            dialog
1818    
1819            * test/test_viewport.py (SimpleViewPortTest)
1820            (SimpleViewPortTest.test_default_size): Add doc-strings
1821            (ViewPortTest.setUp): Bind map to self.map so we can use it in
1822            tests. Subscribe to MAP_REPLACED messages too.
1823            (ViewPortTest.tearDown): No need to explicitly unsubscribe
1824            (ViewPortTest.test_set_map): New test for the SetMap method.
1825    
1826    2003-07-18  Bernhard Herzog  <[email protected]>
1827    
1828            * test/test_viewport.py (SimpleViewPortTest.test_default_size):
1829            Move this test from ViewPortTest.setUp to this new separate test
1830            case. setUp is not the place for the actual tests.
1831            (ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
1832            more of the test from setUp to the new test test_inital_settings.
1833            (ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
1834            (ViewPortTest.test_proj_conv): Split test_proj_conv into
1835            test_win_to_proj and test_proj_to_win and make the tests easier to
1836            understand
1837            (ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
1838            (ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
1839            (ViewPortTest.test_unprojected_rect_around_point)
1840            (ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
1841            Reformat to increase readability.
1842    
1843    2003-07-18  Bernhard Herzog  <[email protected]>
1844    
1845            * Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.
1846    
1847    2003-07-18  Bernhard Herzog  <[email protected]>
1848    
1849            * test/runtests.py: The test suite can now be run without an X
1850            connection. To make sure this remains true, remove the DISPLAY
1851            environment variable so that an error occurs if the wxGTK is
1852            imported accidentally
1853    
1854    2003-07-18  Bernhard Herzog  <[email protected]>
1855    
1856            * Thuban/UI/viewport.py: Remove unused imports
1857    
1858            * Thuban/UI/view.py: Remove unused imports
1859    
1860    2003-07-18  Bernhard Herzog  <[email protected]>
1861    
1862            * test/test_export.py Remove unused imports. The OutputTransform
1863            function is now in viewport.py and is called output_transform
1864            (TestScalebar.test_output_transform)
1865            (TestScalebar.test_OutputTransform): Renamed to
1866            test_output_transform and updated to use output_transform instead
1867            of OutputTransform
1868    
1869            * Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
1870            renamed.
1871            (MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
1872            renamed to output_transform
1873    
1874            * Thuban/UI/viewport.py (OutputTransform, output_transform):
1875            Rename to output_transform
1876    
1877    2003-07-18  Bernhard Herzog  <[email protected]>
1878    
1879            * Thuban/Model/layer.py (Layer.__init__): Rename
1880            classificationField to classificatin_column and init it here so
1881            that it can be used in SetClassificationColumn
1882            (Layer.GetClassificationColumn, Layer.GetClassificationField):
1883            Rename to GetClassificationColumn.
1884            (Layer.SetClassificationColumn, Layer.SetClassificationField):
1885            Rename to SetClassificationColumn and issue a LAYER_CHANGED
1886            message if the column changes.
1887            (Layer._classification_changed, Layer.ClassChanged): Rename to
1888            _classification_changed. Update the callers.
1889            (Layer.SetShapeStore): Further field->column renames.
1890    
1891            * Thuban/Model/load.py (SessionLoader.start_classification)
1892            (SessionLoader.start_clpoint): Updates because of
1893            field->column method name changes in the Layer class
1894    
1895            * Thuban/Model/save.py (SessionSaver.write_classification): Updates
1896            because of field->column method name changes in the Layer class
1897    
1898            * Thuban/UI/classifier.py (Classifier.__init__)
1899            (Classifier._OnTry, Classifier._OnRevert): Updates because of
1900            field->column method name changes in the Layer class
1901    
1902            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
1903            because of field->column method name changes in the Layer class
1904    
1905            * Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
1906            of field->column method name changes in the Layer class
1907    
1908            * test/test_save.py (SaveSessionTest.testClassifiedLayer)
1909            (SaveSessionTest.testClassifiedLayer): Update because of
1910            field->column method name changes in the Layer class
1911    
1912            * test/test_layer.py (SetShapeStoreTests.setUp)
1913            (SetShapeStoreTests.test_sanity): Update because of field->column
1914            method name changes in the Layer class
1915            (TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
1916            (TestLayerModification.test_sanity)
1917            (TestLayerModification.test_initial_settings): remove unsued code
1918            and rename to test_sanity.
1919            (TestLayerModification.test_set_classification): New test for
1920            SetClassification and SetClassificationField.
1921    
1922    2003-07-18  Bernhard Herzog  <[email protected]>
1923    
1924            * test/test_classgen.py (TestFixedRamp.test): Extend test to check
1925            the non-fixed values as well. The old test would have accepted a
1926            fixed ramp that only returnes the fixed properties
1927    
1928    2003-07-17  Jonathan Coles   <[email protected]>
1929    
1930            * Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
1931            shots for the manual. The XCF file is the source image and
1932            has additional layers to support changes.
1933    
1934            * Doc/manual/thuban-manual.xml: Wrote an initial Introduction.
1935    
1936            * Thuban/UI/classifier.py (Classifier.__BuildClassification):
1937            Return both the new class and the field name.
1938    
1939            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't
1940            fit the map to the window as this changes any zoom level that
1941            the user may have set.
1942    
1943    2003-07-16  Jonathan Coles   <[email protected]>
1944    
1945            * Thuban/Model/classgen.py (generate_singletons,
1946            generate_uniform_distribution, generate_quantiles): Remove
1947            fixes parameter, but maintain the same functionality by having
1948            the calling function pass a FixedRamp object for the ramp.
1949            (FixedRamp): New. Adapts a ramp to have fixed property values.
1950    
1951            * Thuban/Model/classification.py: Use new CLASS_CHANGED message.
1952            (Classification): Inherit from Publisher.
1953            (Classification.__init__): Remove the layer parameter.
1954            Classifications no longer need to have a parent layer.
1955            (Classification.GetField, Classification.GetFieldType,
1956            Classification.SetFieldInfo): Removed. The field name is stored
1957            in the layer, and the type can be retreived by calling
1958            Layer.GetFieldType().
1959            (Classification._set_layer, Classification.GetLayer): Removed.
1960            Classifications no longer have a parent layer.
1961    
1962            * Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
1963            classification.
1964            (Layer.SetShapeStore): Reset the classification first while
1965            we still have the old shape store to work with.
1966            (Layer.GetClassificationField, Layer.SetClassificationField):
1967            New. Method for getting/setting the field to classify on.
1968            (Layer.SetClassification): Simplified now that the layer
1969            simply has to hold a reference to the classification and not
1970            tell the classification who owns it.
1971            Fixes RTbug #2023.
1972    
1973            * Thuban/Model/load.py (SessionLoader.start_classification):
1974            Set the field name on the layer, not the classification.
1975    
1976            * Thuban/Model/messages.py: Add CLASS_CHANGED for when a
1977            classification is modified.
1978    
1979            * Thuban/Model/save.py (SessionSaver.write_classification):
1980            Get the field name and type from the layer.
1981    
1982            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
1983            parameter records to rows and add docstring. Fixes RTbug #1997.
1984    
1985            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
1986            ramp when we need to fix certain values of a ramp rather than
1987            using the old fixes parameter. Fixes RTbug #2024.
1988    
1989            * Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
1990            parameter.
1991            (ClassTable.Reset): Add fieldType parameter and use it, rather
1992            than asking the classification.
1993            (Classifier.__init__): Remember the original class's field
1994            and ask the layer for the field type, rather than the classification.
1995            (Classifier.__SetGridTable): Retrieve the field and field type
1996            for the table because they are not in the classification.
1997            (Classifier._OnTry, Classifier._OnRevert): Set the classification
1998            field on the layer in addition to the classification itself.
1999    
2000            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
2001            classification field from layer.
2002    
2003            * Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
2004            classification field from layer. Split up tests and remove
2005            *-imports. Fixes RTbug #1992.
2006    
2007            * test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.
2008    
2009            * test/test_classification.py
2010            (TestClassification.test_classification): Remove tests for methods
2011            that no longer exist.
2012    
2013            * test/test_layer.py (SetShapeStoreTests.setUp): Classification
2014            __init__ no longer has a field parameter, use SetClassificationField.
2015            (SetShapeStoreTests.test_sanity): Use layer object to get class
2016            field info.
2017    
2018            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
2019            SetClassificationField on layer to set class field info.
2020    
2021            * test/test_viewport.py: Renamed from test/test_view.py.
2022    
2023    2003-07-16  Jan-Oliver Wagner <[email protected]>
2024    
2025            * Doc/manual/thuban-manual.xml: Added authors and an initial
2026            coarse structure.
2027    
2028    2003-07-15  Bernhard Herzog  <[email protected]>
2029    
2030            * test/support.py (FloatComparisonMixin): This is a mix-in class
2031            and therefore should not be derived from any other class.
2032    
2033            * test/test_range.py (RangeTest): FloatComparisonMixin is a
2034            mix-in, so derive from TestCase as well.
2035    
2036    2003-07-15  Bernhard Herzog  <[email protected]>
2037    
2038            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
2039            draw_func handling a bit to remove one layer of indirection. This
2040            makes the renderer about 10% faster in the non-classifying case
2041            and the code a bit cleaner
2042            (MapRenderer.draw_point_shape): Add the pen and brush parameters
2043            and set them in the dc. Now the draw_point_shape method and
2044            wxproj's draw_polygon_shape function have basically the same
2045            signature so that both can be directly used as draw_func
2046    
2047    2003-07-15  Bernhard Herzog  <[email protected]>
2048    
2049            * Thuban/Model/save.py (SessionSaver.write_classification): Encode
2050            string values (in addition to the labels) as UTF 8
2051    
2052            * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
2053            values if the field type is string
2054    
2055            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
2056            saving a session with non-ascii string classification values.
2057    
2058            * test/test_load.py (TestClassification.file_contents)
2059            (TestClassification.test): Check for non-ascii values in string
2060            classifications
2061    
2062    2003-07-14  Jonathan Coles   <[email protected]>
2063    
2064            * test/test_view.py: New. Tests for ViewPort.
2065    
2066    2003-07-14  Frank Koormann   <[email protected]>
2067    
2068            * Thuban/Model/load.py (SessionLoader.start_map): Encode map
2069            title to latin1.  Fixes https://intevation.de/rt/webrt?serial_num=2013
2070    
2071            * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
2072            unicode strings from session file: session title, map title and
2073            projection name.
2074            
2075    2003-07-10  Jonathan Coles   <[email protected]>
2076    
2077            * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
2078            drag_stop, not drag_move when the mouse is released.
2079    
2080    2003-07-10  Jonathan Coles   <[email protected]>
2081    
2082            The most important part of this is the seperation of view.py into
2083            two pieces. viewport.py now has a class called ViewPort which
2084            contains all the non-wx parts of view.py and can therefore be
2085            tested. view.py contains only the wx-specific parts and is fairly
2086            simple.
2087    
2088            * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
2089            RTTbug #1992.
2090            * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
2091            RTTbug #1992.
2092    
2093            * Thuban/Model/classgen.py (generate_singletons,
2094            generate_uniform_distribution, generate_quantiles):
2095            Added 'fixes' parameter so that property attributes can
2096            be held constant over the generated classification groups.
2097            (CustomRamp.GetProperties): Remove unused variables.
2098    
2099            * Thuban/Model/map.py (Map.SetProjection): Send the old
2100            projection as an argument to listeners of the MAP_PROJECTION_CHANGED
2101            event.
2102    
2103            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
2104            parameter which is a list of records that restricts which
2105            records are saved. Fixes RTbug #1997.
2106    
2107            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
2108            Port exception dialog from GREAT-ER. Fixes RTbug #1993.
2109    
2110            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
2111            to allow the user to fix line color/width on generated groups.
2112            (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
2113            functions to optionally fix group properties.
2114    
2115            * Thuban/UI/main.py (main): Set exception hook to the
2116            ShowExceptionDialog. Fixes RTbug #1993.
2117    
2118            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
2119            the table window when it is selectd to be shown.
2120    
2121            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
2122            Export Selection button and move the export buttons underneath
2123            the table.
2124            (QueryTableFrame.UpdateStatusText): Added event argument so
2125            that it can respond to grid selection events. The status text
2126            is now updated even when the table is not associated with a
2127            layer as was previously assumed.
2128            (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
2129            UpdateStatusText responds to these events.
2130            (QueryTableFrame.OnSaveAs): Renamed to doExport.
2131            (QueryTableFrame.doExport): Helper function that saves the
2132            entire table, or selected rows, to a file.
2133            (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
2134            Respond to export button events and call doExport.
2135    
2136            * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
2137            the function doesn't return NULL without first setting a Python
2138            Error.
2139    
2140            * test/runtests.py (main): Only print "Unknown option" for
2141            unsupported options.
2142    
2143            * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
2144            optional epsilon argument to specify floating point accuracy.
2145            (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
2146            for each item test.
2147    
2148            * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
2149            tests for saving selected records.
2150    
2151            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
2152            tests for saving selected records.
2153    
2154            * test/test_map.py (TestMapWithContents.test_set_projection):
2155            MAP_PROJECTION_CHANGED events send the old projection.
2156    
2157            * test/test_session.py
2158            (TestSessionWithContent.test_forward_map_projection):
2159            MAP_PROJECTION_CHANGED events send the old projection.
2160    
2161            * test/test_table.py (TableTest): Update tests to use non-deprecated
2162            functions.
2163    
2164    2003-07-08  Bernhard Herzog  <[email protected]>
2165    
2166            * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
2167            constants in the column objects are the standard ones defined in
2168            the table module.
2169    
2170            * test/test_transientdb.py
2171            (TestTransientTable.test_transienttable_to_dbf): New. Test whether
2172            exporting transient tables as DBF works. This should catch the bug
2173            just fixed in TransientTableBase.Width.
2174    
2175    2003-07-08  Bernhard Herzog  <[email protected]>
2176    
2177            * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
2178            interpolated colors correctly.
2179    
2180            * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
2181            New. Test case for the fix in classgen.py
2182    
2183    2003-07-08  Bernhard Herzog  <[email protected]>
2184    
2185            * test/runtests.py (main): Make the default output less verbose
2186            and add a verbosity option (-v) to get the old output
2187    
2188    2003-07-08  Bernhard Herzog  <[email protected]>
2189    
2190            * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
2191            0.9.
2192    
2193            * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
2194            New. Return the join type
2195    
2196            * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
2197            DTD
2198            (SessionSaver.write_data_containers): Save the join type for
2199            joined tables
2200    
2201            * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
2202            namespace
2203            (SessionLoader.start_jointable): Handle the jointype attribute
2204    
2205            * test/test_load_0_8.py: New. Effectively a copy of test_load.py
2206            as of Thuban 0.8. These are now tests to determine whether Thuban
2207            can still read files generated by Thuban 0.8
2208    
2209            * test/test_load.py (LoadSessionTest.dtd)
2210            (TestSingleLayer.file_contents)
2211            (TestLayerVisibility.file_contents, TestLabels.file_contents)
2212            (TestLayerProjection.file_contents)
2213            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
2214            (TestJoinedTable.file_contents)
2215            (TestLoadError.file_contents): Update for new DTD
2216            (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
2217            for new join type attribute
2218    
2219            * test/test_save.py (SaveSessionTest.dtd)
2220            (SaveSessionTest.testEmptySession)
2221            (SaveSessionTest.testSingleLayer)
2222            (SaveSessionTest.testLayerProjection)
2223            (SaveSessionTest.testRasterLayer)
2224            (SaveSessionTest.testClassifiedLayer)
2225            (SaveSessionTest.test_dbf_table)
2226            (SaveSessionTest.test_joined_table): Update for new DTD
2227            (SaveSessionTest.test_joined_table): Add test for new join type
2228            attribute
2229    
2230    2003-07-04  Bernhard Herzog  <[email protected]>
2231    
2232            * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
2233            function for table_to_dbf
2234            (table_to_dbf): Deal with names longer than the 10 character limit
2235    
2236            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
2237            doc-string
2238            (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
2239            long column names
2240    
2241    2003-07-03  Bernhard Herzog  <[email protected]>
2242    
2243            * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
2244    
2245    2003-07-03  Bernhard Herzog  <[email protected]>
2246    
2247            * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
2248            for the Thuban manual and README with some basic information about
2249            the manual
2250    
2251    2003-07-03  Bernhard Herzog  <[email protected]>
2252    
2253            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
2254            Update doc-string
2255            (TransientJoinedTable.create): Do not modify the column objects of
2256            the input tables in place and copy all columns of the input tables
2257            into the joined table after all.
2258    
2259            * test/test_transientdb.py
2260            (TestTransientTable.test_transient_joined_table_same_column_name):
2261            Update to reflect the new behavior
2262            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
2263            Update to reflect the new behavior
2264            (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
2265            New test case for a bug which modified the column objects in place
2266    
2267    2003-07-02  Jonathan Coles   <[email protected]>
2268    
2269            * Thuban/Model/classgen.py (generate_singletons,
2270            generate_uniform_distribution, generate_quantiles,
2271            GenQuantiles0): Make sure maxValue isn't less than
2272            one, otherwise we could divide by zero.
2273    
2274            * test/test_classgen.py (ClassGenTest.doClassRangeTest,
2275            ClassGenTest.doClassSingleTest): Call doBoundsTest to
2276            check the end classification groups against the
2277            proper property values.
2278            (ClassGenTest.doBoundsTest): New. Checks the first and
2279            last classification groups to make sure their properties
2280            are the correct upper and lower bounds for a color ramp.
2281    
2282    2003-07-02  Jonathan Coles   <[email protected]>
2283    
2284            * Thuban/Model/classgen.py (generate_singletons,
2285            generate_uniform_distribution, generate_quantiles,
2286            GenQuantiles0): The denominator was one to high when
2287            calculating the index for the ramp causing the index
2288            to never to reach one.
2289    
2290    2003-07-02  Jonathan Coles   <[email protected]>
2291    
2292            Changed the singature of ClassGroupRange.__init__ and
2293            ClassGroupRange.SetRange() so that the min/max values are
2294            passed as a tuple. This makes a better calling scheme for
2295            when a Range object is passed instead.
2296    
2297            * Thuban/Model/classgen.py: Fixed parameters to
2298            ClassGroupRange constructor.
2299    
2300            * Thuban/Model/classification.py (ClassGroupRange.__init__):
2301            Consolidate the min/max parameters into a single _range which
2302            can either be a tuple or a Range object.
2303            (ClassGroupRange.SetRange): Consolidate the min/max parameters
2304            into a single _range which can either be a tuple or a Range object.
2305    
2306            * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
2307            call to ClassGroupRange constructor to use a tuple.
2308    
2309            * Thuban/Model/layer.py (Layer.SetClassification): Switch
2310            the classification instance variable to the new class
2311            before calling _set_layer otherwise subscribers to a
2312            LAYER_CHANGED event will not see any difference.
2313    
2314            * test/test_classification.py: Fix tests of ClassGroupRange
2315            so that they use the new signature.
2316    
2317            * test/test_load.py: Fix use of ClassGroupRange so that it
2318            uses the new signature.
2319    
2320            * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
2321            uses the new signature.
2322    
2323            * test/test_save.py: Fix use of ClassGroupRange so that it
2324            uses the new signature.
2325    
2326    
2327    2003-07-01  Jonathan Coles   <[email protected]>
2328    
2329            * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
2330            Import used objects/class from color.
2331            (generate_singletons): We don't
2332            need the numGroups parameter anymore because we are using
2333            the new ramps with GetProperties().
2334            (generate_uniform_distribution): Use new ramp method
2335            GetProperties().
2336            (generate_quantiles, GenQuantiles0): Use new ramp method
2337            GetProperties().
2338            (CustomRamp.SetNumGroups): Removed. The ramps now map
2339            a value from 0 to 1 to class properties so the number
2340            of groups is not needed ahead of time.
2341            (CustomRamp.next): Removed. CustomRamp does not support
2342            interation anymore.
2343            (CustomRamp.GetProperties): Returns a ClassGroupProperties
2344            object based on the index value from 0 to 1 that is
2345            passed to it.
2346            (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
2347            Made into instances of Monochromatic class instread of
2348            deriving from it.
2349            (HotToCold.SetNumGroups): Removed. See CustomRamp.
2350            (HotToCold.next): Removed. See CustomRamp.
2351    
2352            * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
2353            (Classification.SetField, Classification.SetFieldType):
2354            Replaced with SetFieldInfo.
2355            (Classification.SetFieldInfo): New. Does a better job of
2356            what SetField and SetFieldType used to do by combining
2357            their function since they should really always be done
2358            at the same time.
2359            (Classification.SetLayer): Renamed to _set_layer.
2360            (Classification._set_layer): Should only be called from
2361            Layer's SetClassification. This does not cause a recursive
2362            call as SetLayer did because we know that Layer knows about
2363            the classification.
2364    
2365            * Thuban/Model/color.py: Fixes RTbug #1971.
2366            (_Transparent): Renamed from Transparent so it doesn't
2367            conflict with the module variable.
2368            (Transparent, Black): Renamed from Color.Transparent,
2369            Color.Black so they are not class variables.
2370    
2371            * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
2372            (Layer.Destroy): We don't need to call SetClassification
2373            anymore to clear out the back reference in the classifcation
2374            to the layer. It's better to set it to None using _set_layer,
2375            and we won't be creating another clas object too.
2376            (Layer.SetClassification): Classification._set_layer is not
2377            recursive so remove all the locking variables. Also clean
2378            up the code so that it remains unchanged if something fails.
2379    
2380            * Thuban/Model/load.py: Fixes RTbug #1971.
2381            (SessionLoader.start_classification): Call
2382            Classification.SetFieldInfo().
2383    
2384            * Thuban/Model/save.py: Removed import of Color which wasn't
2385            being used.
2386    
2387            * Thuban/UI/classgen.py: Fixes RTbug #1972.
2388            (ClassGenDialog.__init__): Color ramps are now instances
2389            already so we don't need to create any new objects.
2390            (ClassGenDialog.OnOK): Check for numGroups is no longer
2391            necessary because we never use it.
2392    
2393            * Thuban/UI/classifier.py: Fixes RTbug #1971.
2394            (Classifier.__BuildClassification, Classifier.__SetGridTable):
2395            Call Classification.SetFieldInfo() instead of SetFieldType.
2396    
2397            * Thuban/UI/renderer.py: Fixes RTbug #1971.
2398    
2399            * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
2400            (MapCanvas.__init__): Subscribe to the idle time event. Set
2401            background color to white.
2402            (MapCanvas.OnPaint): Set a flag indicating that we should
2403            render the map during idle time. If we already have a bitmap
2404            just draw it now.
2405            (MapCanvas.OnIdle): New. Render the map only during idle time.
2406            This also fixes a problem with the busy cursor under gtk.
2407    
2408            * test/test_classgen.py (ClassGenTest.test_generate_singletons):
2409            Fix calls to generate_singletons because the signature changed.
2410    
2411            * test/test_classification.py: Fix color references and
2412            change calls to Classification.[SetField|SetFieldType] to
2413            SetFieldInfo.
2414    
2415            * test/test_load.py: Fix color references.
2416    
2417            * test/test_load_0_2.py: Fix color references.
2418    
2419            * test/test_save.py (SaveSessionTest.testClassifiedLayer):
2420            Change calls to Classification.[SetField|SetFieldType] to
2421            SetFieldInfo.
2422    
2423    2003-07-01  Frank Koormann   <[email protected]>
2424    
2425            MERGE from the greater-ms3 branch.
2426    
2427            * test/test_transientdb.py
2428            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
2429            New. Test join of two tables with partly equal column names.
2430    
2431            * Thuban/Model/transientdb.py (TransientJoinedTable.create):
2432            If duplicates in left and right tables column names are found,
2433            append '_' (underscores) to the name until it is unique.
2434            Create always new internal names for the resulting table and reference
2435            columns in the join statement with <table>.<column>
2436    
2437    2003-07-01  Bernhard Herzog  <[email protected]>
2438    
2439            * test/test_transientdb.py
2440            (TestTransientTable.test_transient_joined_table_same_column_name):
2441            New. Test whether joining on columns with the same names in both
2442            tables works.
2443            
2444            * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
2445            sure to use the right internal names even when joining on field
2446            with the same names in both tables. Also, detect duplicate names
2447            in the joined table correctly.
2448    
2449    2003-07-01  Frank Koormann   <[email protected]>
2450    
2451            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
2452            Reverse List of layers to render in same order as in desktop legend.
2453    
2454    2003-06-30  Jonathan Coles   <[email protected]>
2455    
2456            * Thuban/version.py (make_tuple): Takes a version string
2457            and splits it into a tuple of at most three integers.
2458            Used make_tuple() to make tuple versions of the version
2459            numbers.
2460    
2461            * Thuban/UI/about.py: Add Thuban email addresses.
2462    
2463    2003-06-30  Jonathan Coles   <[email protected]>
2464    
2465            * Thuban/version.py: SQLite/PySQLite version dependencies
2466            were too high.
2467    
2468    2003-06-30  Jonathan Coles   <[email protected]>
2469    
2470            * Thuban/version.py: Update version to 0.8.1
2471            
2472            * MANIFEST.in: Added Projections so that default.proj is
2473            included.
2474    
2475    2003-06-26  Jonathan Coles   <[email protected]>
2476    
2477            New About box with lots more information including library
2478            versions and credits. More/better version checking before
2479            Thuban starts.
2480    
2481            * Thuban/UI/about.py: New. New About box that displays
2482            library version information and credits.
2483    
2484            * Thuban/version.py: Added new 'versions' dictionary which
2485            contains the verions of various libraries which are checked
2486            when the module loads.
2487            (verify_versions): Check all version numbers and returns
2488            a list of errors.
2489    
2490            * Thuban/UI/classifier.py (Classifier.__EnableButtons):
2491            Reset the status of the buttons as the situation warrants,
2492            but in a better more reliable way by not relying on the
2493            current status to determine what needs to change.
2494    
2495            * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
2496            (verify_versions): Remove most of the code since it is
2497            now in Thuban.version.verify_versions.o
2498    
2499            * Thuban/UI/mainwindow.py (MainWindow.About): Call new
2500            About box in Thuban.UI.about.
2501    
2502            * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
2503            Returns the version of gdal library being used as a string.
2504    
2505            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
2506            Removed.
2507            (get_proj_version): Return the version of PROJ that the file
2508            was compiled with.
2509            (get_gtk_version): Return th version of GTK that the file
2510            was compiled with.
2511    
2512    2003-06-25  Jonathan Coles   <[email protected]>
2513    
2514            * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
2515            of the SelectPropertiesDialog should be self so the window
2516            appears on top.
2517            (ClassGroupPropertiesCtrl.DoEdit): The parent
2518            of the SelectPropertiesDialog should be self so the window
2519            appears on top.
2520    
2521            * Thuban/UI/resource.py: Cleaned up how we determine file
2522            extensions.
2523            (GetImageResource): Return an wxImage from our Resources.
2524    
2525    2003-06-24  Jonathan Coles   <[email protected]>
2526    
2527            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
2528            Check that a layer has a classification before trying
2529            to get it. Raster layers don't have classifications.
2530    
2531    2003-06-23  Jonathan Coles   <[email protected]>
2532            
2533            * setup.py: Add Resources/XML to resource list.
2534        
2535    2003-06-23  Jonathan Coles   <[email protected]>
2536    
2537            * setup.cfg: Fix copyright dates
2538        
2539    2003-06-23  Jonathan Coles   <[email protected]>
2540    
2541            * MANIFEST.in: Update with Resources/XML
2542    
2543            * setup.py: Don't include Locale resources yet as we don't
2544            have any and it causes problems building the distribution
2545            for Windows. Update version to 0.8.0.
2546    
2547            * Doc/thuban.dtd: Removed since it is now in Resources/XML.
2548    
2549            * Thuban/UI/mainwindow.py: Add blank line at the end because
2550            file was not being read correctly building the Windows
2551            distribution.
2552    
2553    2003-06-23  Jonathan Coles   <[email protected]>
2554    
2555            * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
2556    
2557            * Thuban/version.py: Temporarily update longversion for
2558            the 0.8 release so that it doesn't have the cvs revision.
2559    
2560    2003-06-23  Jonathan Coles   <[email protected]>
2561    
2562            * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
2563            to make sure that we don't create reentrant possibilities with
2564            wxYield.
2565    
2566            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
2567            directly to avoid the wxSafeYield() call which generates an
2568            OnPaint event causing infinite recursion. Don't try to catch
2569            exception anymore. This was for before there were limits on map
2570            scaling.
2571    
2572    2003-06-23  Bernhard Herzog  <[email protected]>
2573    
2574            Bug fix for RT #1961:
2575    
2576            * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
2577            Register DerivedShapestores with the session
2578    
2579            * Thuban/Model/session.py (Session.Tables): Make sure each table
2580            is only listed once.
2581    
2582            * test/test_load.py (TestJoinedTable.test): Add check_format call.
2583            Update file contents to match the one written out.
2584    
2585    2003-06-20  Bernhard Herzog  <[email protected]>
2586    
2587            * test/xmlsupport.py (SaxEventLister.startElementNS)
2588            (SaxEventLister.endElementNS): Do not include the qname. Python
2589            2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
2590            is (presumably incorrectly) None, whereas it's a string with the
2591            element name in the later versions.
2592    
2593            * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
2594            (TestEventList.test_even_list_namespace): Update tests to reflect
2595            the new behaviour
2596            (TestEventList.test_even_list_id_normalization): Fix doc-string
2597    
2598    2003-06-20  Jonathan Coles   <[email protected]>
2599    
2600            * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
2601            by deriving classes to determine if that layer supports shapes.
2602            (Layer): Override HasShapes and return true.
2603    
2604            * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
2605            instead of a direct call to wx[Begin|End]CusyCursor().
2606            (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
2607            table data.
2608    
2609            * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
2610            New. Wrappers around the wxWindows functions that allow us to
2611            make additional calls such as wxYield which gives the native
2612            system a chance to update the cursor correctly.
2613    
2614            * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
2615            instead of a direct call to wx[Begin|End]CusyCursor().
2616    
2617            * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
2618            instead of a direct call to wx[Begin|End]CusyCursor().
2619            (MapCanvas.find_shape_at): Check if the current search layer
2620            support shapes, otherwise go on to the next layer.
2621    
2622            * test/test_layer.py: Add tests in each type of layer for
2623            HasClassification() and HasShapes()
2624    
2625    2003-06-20  Jonathan Coles   <[email protected]>
2626    
2627            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
2628            turning on the busy cursor to allow the system to change the
2629            cursor before we begin painting. This fixes a problem that
2630            was occuring only under GTK. Fixes RTbug #1840.
2631    
2632    2003-06-20  Bernhard Herzog  <[email protected]>
2633    
2634            * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
2635            version.
2636    
2637            * Thuban/Model/save.py (sort_data_stores): New. Make topological
2638            sort of the data sources so they can be written with sources that
2639            data sources that depend on other data sources come after the
2640            sources they depend on.
2641            (SessionSaver.__init__): Add idmap instance variable to map from
2642            objects to the ids used in the file.
2643            (SessionSaver.get_id, SessionSaver.define_id)
2644            (SessionSaver.has_id): New. Methods to manage the idmap
2645            (SessionSaver.write): Use thuban-0.8.dtd
2646            (SessionSaver.write_session): Add a namespace on the session and
2647            write out the data sources before the maps.
2648            (SessionSaver.write_data_containers): New. Write the data
2649            containers.
2650            (SessionSaver.write_layer): Layer elements now refer to a
2651            shapestore and don't contain filenames anymore.
2652    
2653            * Thuban/Model/load.py (LoadError): Exception class to raise when
2654            errors in the files are discovered
2655            (SessionLoader.__init__): Define dispatchers for elements with a
2656            thuban-0.8 namespace too.
2657            (SessionLoader.check_attrs): New helper method to check and
2658            convert attributes
2659            (AttrDesc): New. Helper class for SessionLoader.check_attrs
2660            (SessionLoader.start_fileshapesource)
2661            (SessionLoader.start_derivedshapesource)
2662            (SessionLoader.start_filetable, SessionLoader.start_jointable):
2663            Handlers for the new elements in the new fileformat
2664            (SessionLoader.start_layer): Handle the shapestore attribute in
2665            addition to filename.
2666            (SessionLoader.start_table, SessionLoader.end_table): Removed.
2667            They were never used in the old formats and aren't needed for the
2668            new.
2669    
2670            * Thuban/Model/session.py (Session.DataContainers): New method to
2671            return all "data containers", i.e. shapestores and tables
2672    
2673            * test/xmlsupport.py (SaxEventLister.__init__)
2674            (SaxEventLister.startElementNS, sax_eventlist): Add support to
2675            normalize IDs.
2676    
2677            * test/test_xmlsupport.py
2678            (TestEventList.test_even_list_id_normalization): New test case for
2679            id normalization
2680    
2681            * test/test_load.py (LoadSessionTest.check_format): Use ID
2682            normalization
2683            (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
2684            class atrributes used for ID normalization
2685            (TestSingleLayer, TestLayerVisibility, TestLabels.test)
2686            (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
2687            file format
2688            (TestJoinedTable): New test for loading sessions with joined
2689            tables.
2690            (TestLoadError): New. Test whether missing required attributes
2691            cause a LoadError.
2692    
2693            * test/test_save.py (SaveSessionTest.thubanids)
2694            (SaveSessionTest.thubanidrefs): New class attributes for ID
2695            normalization in .thuban files.
2696            (SaveSessionTest.compare_xml): Use id-normalization.
2697            (SaveSessionTest.testEmptySession)
2698            (SaveSessionTest.testLayerProjection)
2699            (SaveSessionTest.testRasterLayer)
2700            (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
2701            (SaveSessionTest.testLayerProjection): The filename used was the
2702            same as for testSingleLayer. Use a different one.
2703            (SaveSessionTest.test_dbf_table)
2704            (SaveSessionTest.test_joined_table): New test cases for saving the
2705            new data sources structures.
2706            (TestStoreSort, MockDataStore): Classes to test the sorting of the
2707            data stores for writing.
2708    
2709            * test/runtests.py: Add CVS keywords
2710    
2711    2003-06-20  Jonathan Coles   <[email protected]>
2712    
2713            * test/test_session.py
2714            (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
2715            Use the cultural_landmark-point.dbf file for the store so that
2716            the table rows and shape count match.
2717    
2718    2003-06-20  Jonathan Coles   <[email protected]>
2719    
2720            * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
2721            an exception if the number of shapes is different from the
2722            number of rows in the table. Address RTbug #1933.
2723    
2724            * test/test_layer.py (TestLayer.test_derived_store): Add
2725            a test for the new exception in DerivedShapeStore.__init__.
2726    
2727            * test/support.py (FloatTestCase): Removed since there is
2728            already FloatComparisonMixin. Fixes RTbug #1954.
2729            (FloatComparisonMixin.assertFloatEqual): Include test for
2730            infinity that was part of FloatTestCase.
2731    
2732            * test/test_range.py (RangeTest): Inherit from
2733            support.FloatComparisonMixin now that we don't have
2734            support.FloatTestCase.
2735    
2736    2003-06-20  Bernhard Herzog  <[email protected]>
2737    
2738            * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
2739            the implementation in xmlsupport instead.
2740            (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
2741    
2742            * test/test_proj.py: Import sax_eventlist from xmlsupport instead
2743            of test_save
2744    
2745    2003-06-20  Bernhard Herzog  <[email protected]>
2746    
2747            * test/test_load.py (LoadSessionTest.check_format): New helper
2748            method to make sure the test files we load might have been written
2749            by the current thuban version.
2750            (ClassificationTest.TestLayers, TestSingleLayer.test)
2751            (TestLayerVisibility.test, TestClassification.test)
2752            (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
2753            Add check_format() calls and fix the thuban data to match the data
2754            that would be written by saving the session loaded from it.
2755    
2756            * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
2757            the same class and function in test_save.
2758    
2759            * test/test_xmlsupport.py (TestEventList): New. test cases for
2760            sax_eventlist
2761    
2762    2003-06-20  Bernhard Herzog  <[email protected]>
2763    
2764            * Resources/XML/thuban.dtd: Add comment about which versions of
2765            Thuban are covered by this DTD
2766            (map): Fix content model for layers and raster layers. There can
2767            be any number or layers and raster layers in any order.
2768    
2769    2003-06-20  Jonathan Coles   <[email protected]>
2770    
2771            This is mainly about fixing RTbug #1949.
2772    
2773            * Thuban/Model/classification.py: Remove "from __future__"
2774            import statement since python 2.2 is the earliest supported
2775            version.
2776    
2777            * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
2778            Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
2779            depending on the units this projection *forwards* into.
2780    
2781            * Thuban/Model/save.py (SessionSaver.write_classification):
2782            Remove unnecessary use of lambdas and nested functions.
2783    
2784            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
2785            adjustment here if the map projection uses degrees.
2786    
2787            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
2788            scale adjust code since it is now done before calling
2789            this method. Don't do anything if the map projection
2790            is None.
2791    
2792    2003-06-19  Bernhard Herzog  <[email protected]>
2793    
2794            Move version specific load tests to their own file.
2795    
2796            * test/test_load.py: Expand the doc-string to explain a bit how to
2797            handle file format changes.
2798            (TestClassification.test): Update the docstring as this test is
2799            not about Thuban 0.2 anymore.
2800    
2801            * test/test_load_0_2.py: New file with the load tests for thuban
2802            files created with Thuban 0.2 and earlier.
2803    
2804    2003-06-19  Bernhard Herzog  <[email protected]>
2805    
2806            Add XML validation to some of the tests. Validation will only be
2807            done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
2808            To make the DTD available to the test cases it's moved into
2809            Resources/XML
2810    
2811            * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
2812            for versions up to and including 0.2. Two slight changes: added an
2813            encoding specification and fixed the comment which refered to
2814            GRASS, not Thuban
2815    
2816            * test/xmlsupport.py: New support module for tests involving XML.
2817            Currently there's a mix-in class for XML validation.
2818    
2819            * test/test_xmlsupport.py: New. Tests for the xmlsupport module
2820    
2821            * test/test_save.py (SaveSessionTest): Derive from ValidationTest
2822            so that we can validate the
2823            (SaveSessionTest.testEmptySession)
2824            (SaveSessionTest.testSingleLayer)
2825            (SaveSessionTest.testSingleLayer)
2826            (SaveSessionTest.testLayerProjection)
2827            (SaveSessionTest.testRasterLayer)
2828            (SaveSessionTest.testClassifiedLayer): Validate the generated XML
2829    
2830            * test/runtests.py (main): Call print_additional_summary instead
2831            of print_garbage_information
2832    
2833            * test/support.py (resource_dir): New function to return the
2834            "Resource" subdirectory
2835            (print_additional_summary): New function to combine several
2836            summary functions
2837            (run_tests): Use print_additional_summary instead of calling
2838            print_garbage_information directly
2839    
2840    2003-06-19  Bernhard Herzog  <[email protected]>
2841    
2842            * Doc/thuban.dtd (classification): Correct the content model of
2843            the classification element.
2844            (projection): Add the "name" attribute
2845    
2846    2003-06-19  Frank Koormann   <[email protected]>
2847    
2848            MERGE from the greater-ms3 branch.
2849    
2850            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
2851            scale if projection is latlong to get better estimate.
2852    
2853            Fix problem of hidden properties dialog under windows after double
2854            click on layer tree:
2855            The tree control always gets an Expanded / Collapsed event after
2856            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
2857            raises the already displayed window.
2858    
2859            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
2860            raiseProperties initialized to prevent endless loops
2861            (LegendTree._OnItemActivated): Depending on self.raiseProperties
2862            simply raise the properties or open the dialog and issue a second
2863            event.
2864    
2865    2003-06-18  Jonathan Coles   <[email protected]>
2866    
2867            * setup.py: Fix a few problems that occured under Windows.
2868    
2869    2003-06-18  Jonathan Coles   <[email protected]>
2870    
2871            When Thuban loaded the map was redrawn twice because the
2872            legend was being opened after the mainwindow was created
2873            and not during its creation. This meant the map was drawn
2874            initially and then had to be redrawn when the legend
2875            caused the display to change. Now the legend is opened
2876            in the mainwindow constructor which resolves this issue.
2877    
2878            Also, although we were checking for the existence of
2879            gdal and gdalwarp modules, the gdalwarp extension was
2880            still being compiled (which may fail if the system doesn't
2881            have gdal installed). the build_ext command to setup.py
2882            now accepts the flags --with-gdal and --without-gdal.
2883            If --without-gdal is specified setup.py will try to
2884            use the gdal parameters specified by gdal-config. Under
2885            windows, those parameters have to be set in setup.py
2886            as with proj4 an wxWindows.
2887    
2888            * setup.py: Use a list instead of seperate variables for
2889            extension parameters so we can create a generic function
2890            that runs an appropriate *-config script.
2891            (run_cs_script): Renamed from run_wx_script and modified
2892            to accept a second argument which is a list of lists to
2893            be filled in by the values returned from running the command.
2894            (thuban_build_ext): New. Extends the build_ext command and
2895            provides the options --with-gdal/--without-gdal which then
2896            optionally includes the gdalwarp extension.
2897    
2898            * Thuban/Model/resource.py: First check if we can import
2899            the gdalwarp Thuban extension before checking for gdal.
2900            Also added some comments.
2901            
2902            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
2903            the map is None which may be the case if none has been loaded
2904            yet.
2905    
2906            * Thuban/UI/main.py (main): Remove call to ShowLegend.
2907    
2908            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
2909    
2910            * Thuban/UI/renderer.py: Check for gdal support before importing
2911            gdalwarp.
2912            (MapRenderer.render_map): Only try to optimize if we have gdal
2913            support otherwise nothing will get drawn.
2914    
2915            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
2916            during startup before a map has been created. Check if map is None
2917            before using it and do nothing if it is.
2918    
2919    2003-06-17  Jonathan Coles   <[email protected]>
2920    
2921            Fix the problem with raster layers under Windows that caused
2922            Thuban to crash. The view should respond to layer projection
2923            changed events to update the display. Changes to a projection
2924            should not cause the map to be set to full extent.
2925            
2926            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
2927            current_map_proj to remember the current map projection so that
2928            when the projection changes we know what the previous projection
2929            was.
2930            (MapCanvas.SetMap): Unsubscribe and subscribe to
2931            LAYER_PROJECTION_CHANGED events.
2932            (MapCanvas.projection_changed): Split into two methods that respond
2933            to map and layer projection changes.
2934            (MapCanvas.map_projection_changed): New. Takes the current view and
2935            projects it using the new projection. This does not cause the
2936            map to be redrawn at full extent.
2937            (MapCanvas.layer_projection_changed): New. Cause a redraw which
2938            will draw each layer in its new projection.
2939            
2940            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
2941            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
2942            under Windows.
2943            
2944            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
2945            to twice sizeof(void*) because there are two digits for each
2946            hex byte.
2947    
2948    2003-06-16  Bernhard Herzog  <[email protected]>
2949    
2950            Update to the layer interface: Direct access to the table,
2951            shapetable, shapefile and filename attributes is now actively
2952            deprecated by issuing deprecation warnings for all places where
2953            this happens.
2954    
2955            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
2956            to the instance variables table, shapetable, shapefile and
2957            filename via __getattr__ so that we can issue a deprecation
2958            warning.
2959            (Layer.SetShapeStore): Don't set the deprecated instance variables
2960            any more
2961            (Layer.SetShapeStore): Don't use deprecated layer instance
2962            variables
2963            (Layer.Destroy): No need to explicitly remove the instance
2964            variables any more
2965            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
2966            instance variables
2967    
2968            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
2969            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
2970            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
2971            use deprecated layer instance variables
2972    
2973            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
2974            deprecated layer instance variables
2975    
2976            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
2977            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
2978            instance variables
2979    
2980            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
2981            deprecated layer instance variables
2982    
2983            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
2984            deprecated layer instance variables
2985    
2986            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
2987            deprecated layer instance variables
2988    
2989            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
2990            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
2991            variables
2992    
2993            * test/runtests.py (main): Turn Thuban's deprecation warnings into
2994            errors so that they're cought by the tests
2995    
2996            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
2997            layer instance variables
2998    
2999    2003-06-16  Jonathan Coles   <[email protected]>
3000    
3001            Fix a problem under Windows whereby if the user double-clicks on a
3002            layer in the legend that tree item will expand or collapse as well
3003            as open the layer properties dialog. The state of the tree item
3004            should not be affected.
3005    
3006            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
3007            preventExpandCollapse and subscribe to expanding and collapsing
3008            events.
3009            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
3010            collapsing events and will veto the event if it has been triggered
3011            by the user double clicking on a layer.
3012            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
3013            that an expanding/collapsing event should be vetoed.
3014    
3015    2003-06-13  Bernhard Herzog  <[email protected]>
3016    
3017            * Thuban/UI/classifier.py (Classifier.OnClose)
3018            (Classifier.map_layers_removed)
3019            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
3020            in OnClose and not in map_layers_removed or
3021            layer_shapestore_replaced to make sure it always happens when the
3022            dialog is closed
3023    
3024    2003-06-13  Jonathan Coles   <[email protected]>
3025    
3026            This puts back a fix for Windows where a panel is needed so that
3027            the background of the table view appears correctly.
3028    
3029            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
3030            object that can be used by derived classes to place any
3031            controls (including the grid) onto.
3032            (QueryTableFrame.__init__): Use the panel as the parent window
3033            for all the controls. Reparent the grid so that the panel is
3034            the parent. Call UpdateStatusText() to correctly initialize
3035            the status bar.
3036    
3037    2003-06-13  Jonathan Coles   <[email protected]>
3038    
3039            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
3040            from wxFrame (as opposed to wxDialog like the other classes)
3041            but otherwise behaves like the other classes. This is needed
3042            for the TableView which isn't really a dialog and needs to
3043            have a status bar and control buttons.
3044    
3045            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
3046            instance variable to keep track of how many rows are selected.
3047            Subscribe once to the the events we are interested in.
3048            (ThubanGrid.OnRangeSelect): Only handle event if event handling
3049            hasn't been turned off.
3050            (ThubanGrid.OnSelectCell): Only handle event if event handling
3051            hasn't been turned off.
3052            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
3053            as an event listener (which changes the event handler stack)
3054            simply set an instance variable to False. This is checked in
3055            the event handlers.
3056            (ThubanGrid.GetNumberSelected): Return the number of currently
3057            selected rows.
3058            (TableFrame): Inherit from ThubanFrame so we can have a
3059            status bar and control buttons.
3060            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
3061            Explicitly set which items are selected in the operator choice and
3062            action choice so there is always a valid selection. Fixes RTbug #1941.
3063            Subscribe to grid cell selection events so we can update the
3064            status bar.
3065            (QueryTableFrame.UpdateStatusText): Update the status bar with
3066            how many rows are in the grid, how many columns, and how many
3067            rows are selected.
3068            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
3069            Call UpdateStatusText when cells are (de)selected.
3070            (QueryTableFrame.OnQuery): Use the string value in the value
3071            combo if either the selected item index is 0 or if the string
3072            cannot be found in the predefined list (this happens if the
3073            user changes the text). Fixes RTbug #1940.
3074            Only turn off the grid event listeners if there a query comes
3075            back with a none empty list of ids. in the case that the list
3076            is empty this causes a grid.ClearSelection() call to actually
3077            clear the grid selection which causes the selected items in
3078            the map to be deselected. Fixes RTbug #1939.
3079    
3080            * test/test_save.py (XMLWriterTest.Encode): Check return values.
3081            Fixes RTbug #1851.
3082    
3083    2003-06-13  Bernhard Herzog  <[email protected]>
3084    
3085            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
3086            self.selected_shape with the current selection to make sure the
3087            contents of the dialog are up to date when it's shown for the
3088            first time.
3089            The dialog used to work without this by luck. The recent fix to
3090            the connector module 'broke' a 'feature' the identify view was
3091            relying on, i.e that subscribing to a message in response to
3092            receiving a message of that type would mean that the new
3093            subscriber would also be called for the same message.
3094            
3095    2003-06-12  Jonathan Coles   <[email protected]>
3096    
3097            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
3098            the image is rendered. Fixes RTbug #1937.
3099    
3100    2003-06-12  Jonathan Coles   <[email protected]>
3101    
3102            * Thuban/Lib/fileutil.py: As is done under Windows, create the
3103            user directory if it doesn't exist on a posix system.
3104            Fixes RTbug #1815.
3105    
3106            * Thuban/Model/resource.py (get_user_proj_files): Moved the
3107            called to get_application_dir here, so that the directory
3108            will only be called if this method is invoked.
3109    
3110            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
3111            the projfilepath if no projection is selected.
3112    
3113    2003-06-12  Jonathan Coles   <[email protected]>
3114    
3115            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
3116            the scalebar if the current map has no projection set.
3117    
3118            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
3119            projfilepath label to just the basename of the projection file
3120            rather than include the entire path.
3121    
3122            * Thuban/Model/resource.py: Fix missed proj functions that
3123            needed to be renamed.
3124    
3125    2003-06-12  Jonathan Coles   <[email protected]>
3126    
3127            * Thuban/Model/classification.py: Removed assert statements that
3128            tested if the variable was an instance of Color.
3129    
3130            * Thuban/Model/color.py (Color): Remove commented code that isn't
3131            used.
3132            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
3133            Fixes RTbug #1835.
3134            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
3135            Needed now that the class doesn't inherit from Color.
3136    
3137    2003-06-12  Jonathan Coles   <[email protected]>
3138    
3139            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
3140            check unicode strings.
3141    
3142            * test/test_layer.py: Check for existence of gdal.
3143    
3144    2003-06-12  Jonathan Coles   <[email protected]>
3145        
3146            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
3147            that was in load.py
3148    
3149            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
3150            that was in save.py
3151    
3152    2003-06-12  Jonathan Coles   <[email protected]>
3153    
3154            This is largely a collection of bug fixes. We also handle the
3155            case where gdal is not on the system. The XMLReader and XMLWriter
3156            classes were moved into there own files to resolve some circular
3157            import references and because they shouldn't really be in the
3158            file that is dediciated to reading/writing session files since
3159            they are also used elsewhere.
3160    
3161            * Thuban/Model/classgen.py: Renamed functions to follow the
3162            function_names_with_underscores style. Fixes RTbug #1903.
3163            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
3164    
3165            * Thuban/Model/layer.py: Import gdal only if it available.
3166            (RasterLayer): Handle the case where the gdal library is unavailable.
3167            Addresses RTbug #1877.
3168    
3169            * Thuban/Model/load.py (XMLReader): Moved into seperate file
3170            xmlreader.py.
3171    
3172    2003-06-12  Jonathan Coles   <[email protected]>
3173    
3174            This is largely a collection of bug fixes. We also handle the
3175            case where gdal is not on the system. The XMLReader and XMLWriter
3176            classes were moved into there own files to resolve some circular
3177            import references and because they shouldn't really be in the
3178            file that is dediciated to reading/writing session files since
3179            they are also used elsewhere.
3180    
3181            * Thuban/Model/classgen.py: Renamed functions to follow the
3182            function_names_with_underscores style. Fixes RTbug #1903.
3183            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
3184    
3185            * Thuban/Model/layer.py: Import gdal only if it available.
3186            (RasterLayer): Handle the case where the gdal library is unavailable.
3187            Addresses RTbug #1877.
3188    
3189            * Thuban/Model/load.py (XMLReader): Moved into seperate file
3190            xmlreader.py.
3191    
3192            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
3193            file xmlwriter.py.
3194    
3195            * Thuban/Model/resource.py: Renamed functions to following the
3196            function_names_with_underscores style.
3197            (has_gdal_support): New function that returns true if the gdal
3198            library is available. Addresses RTbug #1877.
3199    
3200            * Thuban/UI/application.py (ThubanApplication.OpenSession):
3201            Display a message box if the gdal library is not available, but
3202            only if there are any layers that would use it. Addresses RTbug #1877.
3203    
3204            * Thuban/UI/classgen.py: Use renamed projection resource functions.
3205            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
3206            when using integers versus floats.
3207    
3208            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
3209            determine if the "Add Image Layer" menu option should be
3210            greyed out or not. Addresses RTbug #1877.
3211    
3212            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
3213    
3214            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
3215            optimize if a raster layer is visible. Fixes RTbug #1931.
3216            Only draw the raster layer if the gdal library is available.
3217            Addresses RTbug #1877.
3218    
3219            * test/test_classgen.py: Add tests for generate_singletons,
3220            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
3221            (test_calculate_quantiles): Fix some tests to catch the new
3222            ValueError that is raised.
3223    
3224            * test/test_proj.py: Use renamed projection resource functions.
3225    
3226            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
3227            test for saving classified layers. Fixes RTbug #1902.
3228            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
3229    
3230    2003-06-12  Jan-Oliver Wagner <[email protected]>
3231    
3232            Fix for http://intevation.de/rt/webrt?serial_num=1900.
3233    
3234            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
3235    
3236            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
3237            multiplechoicedialog.py rather than from the wxPython library.
3238    
3239    2003-06-11  Frank Koormann  <[email protected]>
3240    
3241            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
3242            update.
3243    
3244    2003-06-11  Frank Koormann  <[email protected]>
3245    
3246            * Thuban/Lib/fileutil.py (get_application_dir): New function to
3247            determine the absolute .thuban/thuban directory under
3248            "posix" (os.expanduser) and "nt" (read AppData registry key).
3249    
3250            * Thuban/Model/resource.py: Use get_application_dir
3251    
3252            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
3253            Use get_application_dir.
3254    
3255    2003-06-10  Bernhard Herzog  <[email protected]>
3256    
3257            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
3258            the messages MAP_LAYERS_REMOVED messages
3259            (LayerTableFrame.OnClose): Unsubscribe from it.
3260            (LayerTableFrame.map_layers_removed): New. Receiver for
3261            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
3262            dialog is showing is removed.
3263    
3264    2003-06-10  Bernhard Herzog  <[email protected]>
3265    
3266            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
3267            of the receivers list so that unsubscribing in a receiver doesn't
3268            modify it while iterating over it.
3269    
3270            * test/test_connector.py
3271            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
3272            unsubscribing in a receiver works correctly. See docstring for
3273            details
3274    
3275    2003-06-10  Bernhard Herzog  <[email protected]>
3276    
3277            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
3278            message.
3279    
3280            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
3281            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
3282            LAYER_CHANGED will still be sent if the classification changes.
3283    
3284            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
3285            parameter so we can subscribe to some of its messages
3286            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
3287            and the layer's LAYER_SHAPESTORE_REPLACED
3288            (Classifier.unsubscribe_messages): New. Unsubscribe from message
3289            subscribed to in __init__
3290            (Classifier.map_layers_removed)
3291            (Classifier.layer_shapestore_replaced): receivers for the messages
3292            subscribed to in __init__. Unsubscribe and close the dialog
3293    
3294            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
3295            the map to the Classifier dialog
3296    
3297            * test/test_layer.py (SetShapeStoreTests): Derive from
3298            SubscriberMixin as well so we can test messages
3299            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
3300            messages
3301            (SetShapeStoreTests.tearDown): Clear the messages again
3302            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
3303            for the modified flag too
3304            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
3305            to check whether SetShapeStore sets the modified flag
3306            (SetShapeStoreTests.test_set_shape_store_different_field_name)
3307            (SetShapeStoreTests.test_set_shape_store_same_field)
3308            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
3309            Add tests for the messages. This checks both the new
3310            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
3311    
3312    2003-06-06  Jan-Oliver Wagner <[email protected]>
3313    
3314            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
3315            the menu items.
3316    
3317    2003-06-05  Frank Koormann  <[email protected]>
3318    
3319            * Thuban/UI/identifyview.py (IdentifyView.__init__):
3320            Layout reimplemented without panel. Make life easier to fit the list
3321            in the dialog.
3322    
3323    2003-06-05  Frank Koormann  <[email protected]>
3324    
3325            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
3326            once on initialisation (Former implementation resulted in multiple
3327            entries for each projection).
3328            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
3329            if set, select the projection found under the specified name. This
3330            overwrites any other selection estimate.
3331            Removed projchoice filling from this method.
3332            (ProjFrame._OnSave, ProjFrame._OnAddToList):
3333            Updated call of ProjFrame.__FillAvailList
3334            (LCCPanel._DoLayout): Moved parameter controls in more common order.
3335    
3336            * Resources/Projections/defaults.proj: Extended defaults representing
3337            various common European projections.
3338    
3339    2003-06-05  Frank Koormann  <[email protected]>
3340    
3341            * Thuban/UI/identifyview.py (IdentifyView.__init__):
3342            Use ListCtrl instead of GridCtrl
3343    
3344            * Thuban/Model/resource.py:
3345            Guess location of .thuban directory from tempdir parent directory.
3346    
3347            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
3348            Guess location of .thuban directory from tempdir parent directory.
3349    
3350    2003-06-04  Bernhard Herzog  <[email protected]>
3351    
3352            Do not cache the values returned by the tree widget's
3353            GetFirstChild and GetNextChild methods because it led to lots of
3354            segfaults. The new way requires more brute force but is more
3355            reliable.
3356    
3357            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
3358            variable layer2id
3359            (LegendTree.find_layer): New method to do with brute force what
3360            layer2id tried to accomplish
3361            (LegendTree._OnMsgLayerChanged)
3362            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
3363            Use find_layer instead of layer2id
3364            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
3365            update layer2id anymore
3366            (LegendTree._OnMsgMapLayersRemoved)
3367            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
3368    
3369    2003-06-03  Thomas Koester  <[email protected]>
3370    
3371            * Thuban/Model/classgen.py (GenQuantiles0): New function.
3372    
3373    2003-06-02  Bernhard Herzog  <[email protected]>
3374    
3375            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
3376            New commands.
3377            (main_menu): Add the new commands.
3378            (MainWindow.TableRename): New. Implementation of the table_rename
3379            command.
3380            (MainWindow.RenameLayer): New. Implementation of the layer_rename
3381            command.
3382    
3383            * Thuban/Model/session.py (Session.AddTable): call self.changed to
3384            set the modified flag
3385    
3386            * test/test_session.py (TestSessionSimple.test_add_table): Test
3387            whether the modified flag is set properly
3388    
3389            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
3390            instead of issue so that the modified flags get updated.
3391    
3392            * test/test_base.py (SomeTitledObject): Derive from Modifiable
3393            instead of Publisher to reflect reality better and to accomodate
3394            the fact that SetTitle now calls changed instead of issue
3395    
3396    2003-06-02  Bernhard Herzog  <[email protected]>
3397    
3398            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
3399            acquisition has to happen before the try in a try-finally.
3400    
3401    2003-06-02  Bernhard Herzog  <[email protected]>
3402    
3403            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
3404            possible that a layer is removed that is not currently selected in
3405            the legend so don't check for this.
3406    
3407    2003-05-30  Bernhard Herzog  <[email protected]>
3408    
3409            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
3410            variables to None that have direct or indirect references to
3411            shapefiles or dbf files to make sure that they do go away and the
3412            files are closed.
3413    
3414    2003-05-30  Bernhard Herzog  <[email protected]>
3415    
3416            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
3417            availImgListIndices when a new image list is created
3418            
3419    2003-05-30  Bernhard Herzog  <[email protected]>
3420    
3421            * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
3422            changing_selection to indicate whether the LegendTree code itself
3423            is currently changing the selection
3424            (LegendTree.normalize_selection): New method to normalize the
3425            selection by selecting the layer item even if the user clicked on
3426            the classification.
3427            (LegendTree._OnSelChanged): normalize the selection. This works
3428            around a bug in wx which doesn't keep track of the selection
3429            properly when subtrees are deleted.
3430    
3431    2003-05-30  Bernhard Herzog  <[email protected]>
3432    
3433            * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
3434            maximum and minimum scale factors.
3435    
3436            * test/test_classgen.py (ClassGenTest.test): Update to reflect the
3437            changes in classgen.py
3438    
3439    2003-05-30  Jonathan Coles   <[email protected]>
3440    
3441            * Thuban/Model/classgen.py: Remove ClassGenerator class but make
3442            all the methods functions. Fixes RTBug #1903.
3443    
3444            * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
3445            to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
3446            RTBug #1907.
3447    
3448            * Thuban/UI/classgen.py: Use classgen functions that were part
3449            of the ClassGenerator class. Put try/finally blocks around
3450            code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
3451            RTBug #1904.
3452    
3453            * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
3454    
3455            * Thuban/UI/legend.py: The legend was cleared and repopulated any
3456            time something changed which caused some state to be lost such
3457            as which children were expanded or collapsed. Fixes RTBug #1901.
3458            (LegendTree._OnMsgMapLayersAdded): Add only new layers.
3459            (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
3460            the legend but not in the map.
3461            (LegendTree.__FillTree): Move main functionality out into smaller
3462            methods that can be used by other methods.
3463            (LegendTree.__FillTreeLayer): Reuse old slots in the image list
3464            if they are available.
3465            (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
3466            that we override the wxTreeCtrl method. Iterate over children
3467            and call __RemoveLayer.
3468            (LegendTree.__AddLayer): New. Add a new layer to the legend.
3469            (LegendTree.__RemoveLayer): Remove a layer from the legend.
3470            (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
3471            Should only be called with the id of a layer branch.
3472            (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
3473            Returns the root item or creates one if necessary.
3474    
3475            * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
3476            ProjectRasterFile with tuple arguments instead of strings.
3477    
3478            * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
3479            with try/finally. Fixes RTBug #1904.
3480    
3481            * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
3482            with try/finally. Fixes RTBug #1904.
3483            (MapCanvas.FitSelectedToWindow): If a single point is selected
3484            simply center it on the display. Fixes RTBug #1849.
3485    
3486            * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
3487            to be compiled as a standalone app. Now the code can only be
3488            called from Python which simplifies the parameter passing.
3489            (ProjectRasterFile): Handle Python arguments. Remove code that
3490            checks for a destination dataset. Add more clean up code.
3491    
3492            * test/test_map.py (TestMapWithContents.test_raise_layer_top,
3493            TestMapWithContents.test_lower_layer_bottom):
3494            Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
3495            Fixes RTBug #1907.
3496    
3497            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
3498            extent to the map when the legend is toggled. Fixes RTBug #1881.
3499    
3500    2003-05-29  Jan-Oliver Wagner <[email protected]>
3501    
3502            * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
3503            unsubscribes all that is subcribed in __init__.
3504    
3505    2003-05-28  Bernhard Herzog  <[email protected]>
3506    
3507            * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
3508            (MainWindow.CanDuplicateLayer): New methods to implement the
3509            Layer/Duplicate command.
3510            (layer_duplicate command): New.
3511            (main_menu): Add layer_duplicate to the Layer menu.
3512    
3513    2003-05-28  Bernhard Herzog  <[email protected]>
3514    
3515            * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
3516            renderer so that NULL/None values get displayed differently (by a
3517            gray rectangle).
3518            (TableGrid.__init__): Override the default renderers
3519    
3520    2003-05-28  Bernhard Herzog  <[email protected]>
3521    
3522            * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
3523            classification to "None" if the type of the field has changed.
3524    
3525            * test/test_layer.py (SetShapeStoreTests): New. Class with a few
3526            test for the Layer.SetShapeStore method
3527    
3528    2003-05-28  Jan-Oliver Wagner <[email protected]>
3529    
3530            * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
3531            does not necessarily have a filename).
3532    
3533    2003-05-28  Jan-Oliver Wagner <[email protected]>
3534    
3535            * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
3536            sort the selection list for the dialog.
3537    
3538    2003-05-28  Frank Koormann  <[email protected]>
3539    
3540            * extensions/thuban/wxproj.cpp
3541            (project_point): Removed cast to int for projected point coordinates.
3542            (shape_centroid): Return last point if all polygon vertices fall
3543            to one point.
3544    
3545    2003-05-28  Bernhard Herzog  <[email protected]>
3546    
3547            * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
3548            with layers that don't have shapestores, i.e. raster layers.
3549    
3550    2003-05-28  Bernhard Herzog  <[email protected]>
3551    
3552            * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
3553            when determining the title from the filename.
3554    
3555            * test/test_dbf_table.py (TestDBFTable.test_title): Update to
3556            reflect changes in the way the title is derived from the filename
3557    
3558    2003-05-28  Frank Koormann  <[email protected]>
3559    
3560            * Thuban/UI/mainwindow.py (MainWindow.TableShow):
3561            Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
3562    
3563    2003-05-27  Bernhard Herzog  <[email protected]>
3564    
3565            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
3566            delegate SelectedLayer.
3567            (MainWindow.LayerUnjoinTable): Implement.
3568            (_can_unjoin): New. Helper function for the sensitivity of the
3569            layer/unjoin command.
3570    
3571            * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
3572            (DerivedShapeStore.OrigShapeStore): New. Return the original
3573            shapestore. Used to figure out how to unjoin.
3574            (DerivedShapeStore.Shapefile): Fix a typo.
3575    
3576    2003-05-27  Bernhard Herzog  <[email protected]>
3577    
3578            * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
3579            well
3580            (JoinDialog.__init__): Use the layer parameter and only build the
3581            left choice when a layer is given
3582            (JoinDialog.OnJoin): Handle layer joins as well
3583            (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
3584            that the user selects the "Select..." item. The sensitivitly
3585            updating is now in update_sensitivity
3586            (JoinDialog.y): New method to refactor the sensitivity update of
3587            the join button into its own method.
3588    
3589            * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
3590    
3591    2003-05-27  Bernhard Herzog  <[email protected]>
3592    
3593            * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
3594            iff there are unreferenced tables in the session
3595    
3596    2003-05-27  Bernhard Herzog  <[email protected]>
3597    
3598            * Thuban/Model/messages.py (TABLE_REMOVED): New message.
3599    
3600            * Thuban/Model/session.py (Session.UnreferencedTables): New method
3601            to return tables that are not referenced by other tables or shape
3602            stores and can be removed.
3603            (Session.RemoveTable): Issue a TABLE_REMOVED message after
3604            removing the table
3605    
3606            * Thuban/UI/mainwindow.py: Remove unused imports
3607            (MainWindow.TableClose): Implement.
3608    
3609            * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
3610            messages so that the frame will be automatically closed when a new
3611            session is opened or the table is removed.
3612            (TableFrame.OnClose): Unsubscribe the Subscriptions made in
3613            __init__
3614            (TableFrame.close_on_session_replaced)
3615            (TableFrame.close_on_table_removed): New. Subscribers that close
3616            the window
3617    
3618            * test/test_session.py (TestSessionMessages.test_remove_table)
3619            (TestSessionSimple.test_remove_table): Move the test to
3620            TestSessionSimple and add test for the TABLE_REMOVED message
3621            (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
3622            (TestSessionSimple.test_unreferenced_tables) New. Test for the
3623            UnreferencedTables method.
3624            (UnreferencedTablesTests): New. Class with some more sophisticated
3625            tests for UnreferencedTables.
3626    
3627    2003-05-27  Frank Koormann  <[email protected]>
3628    
3629            * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
3630            display has some unwanted side effects. Removed again.
3631    
3632    2003-05-27  Frank Koormann  <[email protected]>
3633    
3634            * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
3635    
3636            * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
3637    
3638    2003-05-27  Jan-Oliver Wagner <[email protected]>
3639    
3640            * test/test_menu.py (MenuTest.test): Added test for
3641            Menu.RemoveItem().
3642    
3643            * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
3644            the menu.
3645    
3646    2003-05-27  Frank Koormann  <[email protected]>
3647            
3648            Nonmodal dialogs without parent (i.e. they can fall behind the main
3649            window)
3650    
3651            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
3652            all dialogs in the dialogs dictionary and the canvas.
3653    
3654            * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
3655            parent, i.e. can fall behind other windows.
3656            (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
3657            dictionary before removing it.
3658    
3659            * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
3660    
3661            * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
3662            * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
3663            * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
3664    
3665    2003-05-27  Bernhard Herzog  <[email protected]>
3666    
3667            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
3668            tableview dialog
3669            (MainWindow.TableShow): Use ShowTableView to open the dialogs.
3670            Also, don't use the table's titles as the dialog names. The titles
3671            aren't guaranteed to be unique.
3672            (MainWindow.TableOpen): Open a table view dialog after opening the
3673            table
3674    
3675    2003-05-27  Bernhard Herzog  <[email protected]>
3676    
3677            * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
3678            effect can be achieved by simply closing the window showing the
3679            table.
3680            (MainWindow.TableHide): Removed.
3681            (main_menu): Removed "table_hide"
3682    
3683    2003-05-27  Frank Koormann  <[email protected]>
3684    
3685            Fix legend tree display problems under Win32
3686    
3687            * Thuban/UI/legend.py:  BMP_SIZE_W = 15
3688            (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
3689            (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
3690    
3691            * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
3692    
3693    2003-05-27  Jan-Oliver Wagner <[email protected]>
3694    
3695            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
3696            'after' now allows to insert separators almost anywhere in the menu.
3697    
3698    2003-05-27  Frank Koormann  <[email protected]>
3699    
3700            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
3701            "S" of selection box label to hint on hot key (Alt-S). Works under
3702            Win32 but is ignored under GTK.
3703    
3704    2003-05-26  Frank Koormann  <[email protected]>
3705    
3706            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
3707            Center Choices.
3708    
3709    2003-05-26  Bernhard Herzog  <[email protected]>
3710    
3711            Remove the Precision methods again. They're too DBF specific to be
3712            part of the table interface and they're only used in table_to_dbf
3713            anyway.
3714            
3715            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
3716            fixed precision of 12 for doubles.
3717            (TransientTableBase.Precision): Removed
3718            (AutoTransientTable.Width): Delegate to self.table.
3719    
3720            * Thuban/Model/table.py (DBFTable.Precision)
3721            (MemoryTable.Precision): Removed.
3722            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
3723            (table_to_dbf): Use a fixed precision of 12 for floats unless the
3724            column object specifies something else.
3725    
3726            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
3727            test for table_to_dbf
3728    
3729    2003-05-26  Bernhard Herzog  <[email protected]>
3730    
3731            * test/test_transientdb.py
3732            (TestTransientTable.run_iceland_political_tests): Fix a comment.
3733    
3734    2003-05-26  Bernhard Herzog  <[email protected]>
3735    
3736            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
3737            implementation. Mark parts of the file format strings for
3738            localization.
3739    
3740            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
3741            file and add the table to the tables managed by the session
3742    
3743            * test/test_session.py (TestSessionSimple.test_open_table_file):
3744            New. test case for OpenTableFile
3745    
3746    2003-05-26  Jan-Oliver Wagner <[email protected]>
3747    
3748            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
3749            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
3750            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
3751            Replace the true/false of wxWindows by True/False of Python 2.2.1.
3752    
3753    2003-05-26  Jan-Oliver Wagner <[email protected]>
3754    
3755            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
3756            already a selection present, update the grid accordingly.
3757    
3758            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
3759            resizeable and increase its initial size.
3760    
3761    2003-05-26  Frank Koormann  <[email protected]>
3762    
3763            Table export functionality
3764    
3765            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
3766            Return width (in characters) for a column.
3767            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
3768            (table_to_dbf): Write table to dbf file.
3769            (table_to_csv): Write table to csv file.
3770    
3771            * Thuban/Model/transientdb.py (TransientTableBase.Width,
3772            TransientTableBase.Precision): Return column width and precision.
3773    
3774            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
3775            or table_to_csv depending on file selection.
3776    
3777            * test/test_dbf_table.py:
3778            Test table_to_dbf (extension of former part of test).
3779    
3780            * test/test_csv_table.py:
3781            Test table_to_csv.
3782    
3783    2003-05-23  Jan-Oliver Wagner <[email protected]>
3784    
3785            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
3786            Use QueryTableFrame instead of TableFrame.
3787    
3788            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
3789            table window with 'Layer Table:' instead of 'Table:'.
3790    
3791    2003-05-23  Jan-Oliver Wagner <[email protected]>
3792    
3793            Give all tables a title via mix-in TitledObject.LayerShowTable
3794    
3795            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
3796            only if it exists.
3797    
3798            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
3799            and call its init-method with a default title. Remove Title() method.
3800    
3801            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
3802            AutoTransientTable): mix-in TitledObject and call its init-method with
3803            a default title. Remove Title() method.
3804    
3805    2003-05-23  Bernhard Herzog  <[email protected]>
3806    
3807            * Thuban/Model/session.py (Session.AddShapeStore): Define
3808            AddShapeStore analogously to AddTable.
3809    
3810            * test/test_session.py (TestSessionSimple.test_add_shapestore):
3811            New. Test for AddShapeStore
3812    
3813    2003-05-23  Jan-Oliver Wagner <[email protected]>
3814    
3815            Introducing QueryTableFrame and a very coarse ShowTable implementation.
3816    
3817            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
3818            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
3819            The latter implements the selection GUI without dependency on a layer.
3820            LayerTableFrame now is derived from QueryTableFrame and connects
3821            to a layer.
3822    
3823            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
3824            implementation that still needs work.
3825    
3826            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
3827    
3828    2003-05-22  Frank Koormann  <[email protected]>
3829    
3830            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
3831            Added "outer_join = False" as optional parameter.
3832            (TransientJoinedTable.create): If outer join is true, perform a
3833            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
3834            the left table. Records not matching are filled with 0 / None.
3835    
3836            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
3837            (JoinDialog.OnJoin): Consider outer join check box.
3838    
3839    2003-05-22  Bernhard Herzog  <[email protected]>
3840    
3841            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
3842            somewhat safer way. Storing the traceback in a local variable can
3843            lead to memory leaks
3844    
3845    2003-05-22  Bernhard Herzog  <[email protected]>
3846    
3847            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
3848            the wxMessageDialog's Destroy() method.
3849    
3850    2003-05-22  Frank Koormann  <[email protected]>
3851    
3852            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
3853            TransientTable.Title()
3854    
3855    2003-05-22  Frank Koormann  <[email protected]>
3856    
3857            Join Dialog, initial version.
3858    
3859            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
3860    
3861            * Thuban/UI/join.py (JoinDialog): Functional implementation of
3862            former framework. Renamed Table1/Table2 to LeftTable/RightTable
3863            in all occurences.
3864    
3865            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
3866            Typo fixed.
3867    
3868    2003-05-22  Bernhard Herzog  <[email protected]>
3869    
3870            Give the tables titles so that the GUI can display more meaningful
3871            names. For now the titles are fixed but depend on e.g. filenames
3872            or the titles of the joined tables.
3873    
3874            * Thuban/Model/transientdb.py (TransientTable.Title)
3875            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
3876    
3877            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
3878    
3879            * test/test_transientdb.py
3880            (TestTransientTable.test_auto_transient_table_title): New. Test
3881            for the Title method
3882            (TestTransientTable.test_transient_joined_table)
3883            (TestTransientTable.test_transient_table): Add test for the Title
3884            methods
3885    
3886            * test/test_memory_table.py (TestMemoryTable.test_title): New.
3887            Test for the Title method
3888    
3889            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
3890            the Title method
3891    
3892    2003-05-22  Bernhard Herzog  <[email protected]>
3893    
3894            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
3895            Provide a better way to destroy the layers
3896            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
3897            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
3898            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
3899            the new way to destroy the layers.
3900            (TestLayer.test_derived_store): New. Test for using a layer with a
3901            DerivedShapeStore
3902    
3903            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
3904            filename if the shape store actually has one.
3905    
3906    2003-05-22  Bernhard Herzog  <[email protected]>
3907    
3908            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
3909            for the filename
3910    
3911            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
3912            for the FileName method
3913            (TestDBFTableWriting.test_write): Fix spelling of filename
3914    
3915    2003-05-22  Thomas Koester  <[email protected]>
3916    
3917            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
3918            from SciParam that now really is immutable.
3919    
3920    2003-05-22  Frank Koormann  <[email protected]>
3921    
3922            Layer Top/Bottom placement added to legend.
3923    
3924            * Thuban/UI/legend.py
3925            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
3926            bound to tool events.
3927            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
3928            New, methods binding the event methods with the map methods.
3929    
3930            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
3931            layer at top/bottom of layer stack.
3932    
3933            * Resources/Bitmaps/top_layer.xpm: New button icon.
3934    
3935            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
3936    
3937    2003-05-22  Bernhard Herzog  <[email protected]>
3938    
3939            * Thuban/Model/session.py (Session.RemoveTable): New method to
3940            remove tables
3941    
3942            * test/test_session.py (TestSessionSimple.test_remove_table): New.
3943            Test for RemoveTable
3944    
3945    2003-05-22  Thomas Koester  <[email protected]>
3946    
3947            * Thuban/Model/classgen.py: Added short module doc string and CVS id.
3948            (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
3949    
3950    2003-05-22  Bernhard Herzog  <[email protected]>
3951    
3952            Implement a way to discover dependencies between tables and
3953            shapestores.
3954    
3955            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
3956            (TransientJoinedTable.Dependencies)
3957            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
3958            interface
3959            (TransientJoinedTable.__init__): Keep tack of the original table
3960            objects in addition to the corresponding transient tables.
3961    
3962            * Thuban/Model/table.py (DBFTable.Dependencies)
3963            (MemoryTable.Dependencies): New. Implement the dependencies
3964            interface
3965    
3966            * Thuban/Model/data.py (ShapeTable): New. Helper class for
3967            ShapefileStore
3968            (ShapefileStore.__init__): Use ShapeTable instead of
3969            AutoTransientTable
3970            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
3971            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
3972            methods for filename and type
3973            (ShapefileStore.Dependencies): New. Implement the dependencies
3974            interface
3975            (DerivedShapeStore): New class to replace SimpleStore. The main
3976            difference to SimpleStore is that it depends not on a shapefile
3977            but another shapestore which expresses the dependencies a bit
3978            better
3979            (SimpleStore.__init__): Add deprecation warning.
3980    
3981            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
3982            Test for the Dependencies method.
3983    
3984            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
3985            New. Test for the Dependencies method.
3986    
3987            * test/test_transientdb.py
3988            (TestTransientTable.test_auto_transient_table_dependencies): New.
3989            Test for the Dependencies method.
3990            (TestTransientTable.test_transient_joined_table): Add test for the
3991            Dependencies method.
3992    
3993            * test/test_session.py (TestSessionSimple.setUp)
3994            (TestSessionSimple.tearDown): New. Implement a better way to
3995            destroy the sessions.
3996            (TestSessionSimple.test_initial_state)
3997            (TestSessionSimple.test_add_table): Bind session to self.session
3998            so that it's destroyed by tearDown
3999            (TestSessionSimple.test_open_shapefile): New. Test for
4000            OpenShapefile and the object it returns
4001    
4002    2003-05-22  Bernhard Herzog  <[email protected]>
4003    
4004            * Thuban/Model/session.py (Session.AddTable): New method to
4005            register tables with the session.
4006            (Session.Tables): Return the tables registered with AddTable too.
4007    
4008            * test/test_session.py (TestSessionSimple.test_add_table): New.
4009            Test case for the AddTable method
4010    
4011    2003-05-22  Frank Koormann  <[email protected]>
4012    
4013            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
4014            lower right corner, center labels for selections, initialize controls
4015            in reasonable order for keyboard navigation.
4016    
4017            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
4018            (ProjFrame.__DoOnProjAvail): Determine position of current projection
4019            using the wxListBox.FindString() method. Still a problem (#1886)
4020    
4021            * Thuban/UI/classifier.py
4022            (Classifier.__init__, SelectPropertiesDialog.__init__)
4023    
4024            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
4025            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
4026            different classification types from here to __init__.
4027            (GenUniquePanel.__init__): Set the column width of the first field
4028            in the Field ListCtrl to the full width.
4029    
4030            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
4031            Button to 'Export'. Center Buttons in Selection Box, set Focus to
4032            Grid.
4033            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
4034            changes focus to the Selection when pressing "Alt-S".
4035    
4036            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
4037            the text if not visible. The italic font sometimes exceeds the
4038            rendering area.
4039    
4040    2003-05-21  Jonathan Coles   <[email protected]>
4041    
4042            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
4043            to OnClose so that Thuban closes correctly.
4044    
4045            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
4046            DockFrame.OnClose, not DockFrame._OnClose.
4047    
4048    2003-05-21  Jonathan Coles   <[email protected]>
4049    
4050            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
4051            references to 'inf' and use new Range __init__ to pass floats
4052            directly rather than converting them to strings first.
4053            Fixes RTBug #1876.
4054    
4055            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
4056            Use new Range ___init__ to pass floats.
4057    
4058            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
4059            filename is a valid image file. Throw IOError otherwise.
4060    
4061            * Thuban/Model/range.py: Brought over new Range from SciParam that
4062            is immutable and has an __init__ which can accept floats.
4063    
4064            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
4065            into try block. AddLayer doesn't throw any exceptions anymore.
4066            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
4067            try block.
4068    
4069            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
4070            the first item in choices. Fixes RTBug #1882.
4071    
4072            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
4073            has gone to 0 which is a serious problem. abort.
4074            (MapRenderer.draw_raster_layer): Catch IOError seperately and
4075            print the error from GDAL.
4076    
4077            * Thuban/UI/tableview.py (TableGrid.__init__): Call
4078            ToggleEventListeners to turn on listening.
4079            (TableGrid.ToggleEventListeners): New. Turns event listening on
4080            and off so as to prevent excessive messages.
4081            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
4082            to suppress excessive messages when selecting many rows.
4083            Fixes RTBug #1880.
4084    
4085            * Thuban/UI/view.py: Added checks against if scale == 0. This
4086            is a serious problem that can occur when an image without
4087            geo data is loading and causes the map projection bounds to
4088            go to infinity. Right now, the solution is to simply try
4089            to recover.
4090    
4091            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
4092            to set the MFILEReceiver attributes even if the data is NULL.
4093    
4094            * extensions/thuban/gdalwarp.cpp: Improved the error handling
4095            and passed GDAL messages back up to the Python layer. Also
4096            tried to fix some memory leaks that were present in the original
4097            utility but didn't matter because the program aborted.
4098    
4099            * test/test_range.py: Copied over tests from SciParam. Removed
4100            tests against importing. Fixes RTBug #1867.
4101    
4102    2003-05-21  Bernhard Herzog  <[email protected]>
4103    
4104            * test/test_load.py: Remove unused imports and restructure the
4105            test code
4106            (LoadSessionTest): Split into one class for each test and turn
4107            LoadSessionTest itself into the base class for all such session
4108            tests.
4109            (ClassificationTest): New base class for load tests that test
4110            classifications
4111            (TestSingleLayer, TestLayerVisibility, TestClassification)
4112            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
4113            for the individual tests
4114    
4115            * test/support.py (FileLoadTestCase.filename): New base class for
4116            file loading tests
4117    
4118    2003-05-21  Jan-Oliver Wagner <[email protected]>
4119    
4120            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
4121            Mercator' to 'UTM Zone 32' as a more convenient example.
4122            Added 'Gauss Krueger Zone 6'.
4123    
4124            * Data/iceland_sample_raster.thuban: political polygon now
4125            filled transparent to have the raster image visible at once.
4126    
4127    2003-05-21  Frank Koormann  <[email protected]>
4128    
4129            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
4130            OnClose() to keep in sync with extensions. Internally Thuban
4131            still uses "underscored" names.
4132    
4133    2003-05-20  Jonathan Coles   <[email protected]>
4134    
4135            This puts back Raster layer support. These layers support projections
4136            through the GDAL library. Currently, the CVS version is being used.
4137            There are no Debian packages available although this may change soon.
4138            A GDAL driver was extended to support writing to memory rather to
4139            files.
4140    
4141            There is still some work that needs to be done, such as some error
4142            handling when loading invalid images or when there is a problem
4143            projecting the image. This putback simply checks in the majority
4144            of the work.
4145    
4146            * setup.py: Add gdalwarp library extension.
4147    
4148            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
4149            Defaults to False, but can be overridden by subclasses if they
4150            support classification.
4151            (RasterLayer): New. Defines a new layer that represents an
4152            image.
4153    
4154            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
4155            tag handler.
4156            (SessionLoader.start_layer): Encode the filename.
4157            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
4158            New. Supports reading a rasterlayer tag.
4159    
4160            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
4161    
4162            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
4163            get a string in Latin1. If we get such as string convert it to
4164            unicode first, otherwise leave if alone before encoding.
4165            (SessionSaver.write_layer): Add support for writing both Layers
4166            and RasterLayers.
4167    
4168            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
4169            The right argument may not be a string, it could also be a Column.
4170    
4171            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
4172            Make initial window size 600x400. Fixes RTBug #1872.
4173    
4174            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
4175            the dialog is constructed so that we can support layers that
4176            do not have classifications.
4177            (Classifier._OnTry): Only build a classification if the layer
4178            supports one.
4179    
4180            * Thuban/UI/legend.py: Change all checks that a layer is an
4181            instance of Layer into checks against BaseLayer.
4182            (LegendTree.__FillTreeLayer): Only add children to a branch if
4183            the layer supports classification.
4184    
4185            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
4186            MainWindow.OpenSession): Don't proceed with an action if the
4187            user chooses Cancel when they are asked to save changes.
4188            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
4189            user to select an image file. Create a new RasterLayer and add
4190            it to the map.
4191    
4192            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
4193            for rendering RasterLayer layers.
4194            (MapRenderer.draw_raster_layer): Actually method that calls
4195            the GDALWarp python wrapper and constructs an image from the
4196            data returned.
4197    
4198            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
4199            Choices symbols to match those used in the table query method.
4200            Replace deprecated method calls on table with new method names.
4201    
4202            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
4203            how small the scale can get. This still needs more testing.
4204    
4205            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
4206            Provides a driver to output in .bmp format.
4207    
4208            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
4209            New. Provides IO routines which write to memory, rather than a file.
4210    
4211            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
4212            of the gdalwarp utility provided in GDAL. Added function calls
4213            that can be accessed from python.
4214    
4215            * Data/iceland_sample_raster.thuban: New. Sample file that uses
4216            a raster layer.
4217    
4218            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
4219            layer image data.
4220    
4221            * Doc/thuban.dtd: Added rasterlayer attribute definition.
4222    
4223            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
4224            tests associated with the raster layer code.
4225    
4226            * test/test_transientdb.py
4227            (TestTransientTable.test_auto_transient_table_query): Added a test
4228            for using a Column object as the "right" parameter to a query.
4229    
4230    2003-05-19  Frank Koormann  <[email protected]>
4231    
4232            * Thuban/version.py (get_changelog_date):
4233            Catch exceptions if ChangeLog does not exist.
4234    
4235            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
4236    
4237  2003-05-19  Frank Koormann  <[email protected]>  2003-05-19  Frank Koormann  <[email protected]>
4238    
4239          Extended version information for Thuban          Extended version information for Thuban

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26