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

Legend:
Removed from v.766  
changed lines
  Added in v.1767

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26