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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26