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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26