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

Legend:
Removed from v.595  
changed lines
  Added in v.1718

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26