/[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 55 by bh, Tue Sep 11 11:45:27 2001 UTC revision 1663 by bh, Wed Aug 27 13:51:19 2003 UTC
# Line 1  Line 1 
1    2003-08-27  Bernhard Herzog  <[email protected]>
2    
3            Make the table interface distinguish between row ids (an integer
4            that uniquely identifies a row) and row ordinals (a simple row
5            count from 0 to NumRows() - 1)
6    
7            * Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
8            (PostGISTable.RowOrdinalToId): New methods to conver between row
9            ids and row ordinals
10            (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
11            parameter row_is_ordinal to indicate whether the row parameter is
12            the row id or the ordinal
13    
14            * Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
15            (TransientTableBase.RowOrdinalToId)
16            (AutoTransientTable.RowIdToOrdinal)
17            (AutoTransientTable.RowOrdinalToId): Same new methods as in
18            PostGISTable.
19            (TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
20            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
21            Same new parameter as in PostGISTable.
22    
23            * Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
24            (DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
25            (MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
26            (DBFTable.ReadValue, DBFTable.ReadRowAsDict)
27            (MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
28            parameter as in PostGISTable.
29    
30            * Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
31            (DataTable.RowOrdinalToId): New methods to convert between row ids
32            and row ordinals.
33            (TableGrid.SelectRowById): New method to select a row based on its
34            ID as opposed to its ordinal
35            (DataTable.GetValue, TableGrid.OnRangeSelect)
36            (TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
37            (QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
38            (LayerTableFrame.__init__): Convert between row ids and row
39            ordinals as appropriate
40    
41            * test/postgissupport.py (PostGISDatabase.__init__): Add
42            doc-string.
43            (PostGISDatabase.initdb): The optional third item in a tuple in
44            tables is now a (key, value) list with additional arguments to
45            pass to upload_shapefile
46            (upload_shapefile): New parameter gid_offset to allow gids that
47            are not the same as the shapeids in the shapefile
48            (PostgreSQLServer.get_default_static_data_db): Use the new
49            gid_offset to make the gids in landmarks 1000 higher than the
50            shapeids in the shapefile
51    
52            * test/test_viewport.py
53            (TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
54            new shapeids in the landmarks table
55    
56            * test/test_transientdb.py
57            (TestTransientTable.run_iceland_political_tests)
58            (TestTransientTable.test_transient_joined_table): Add tests for
59            the new table methods and new keywords arguments.
60    
61            * test/test_postgis_db.py
62            (TestPostGISTable.test_read_row_as_dict_row_count_mode)
63            (TestPostGISTable.test_read_value_row_count_mode)
64            (TestPostGISTable.test_row_id_to_ordinal)
65            (TestPostGISTable.test_row_oridnal_to_id): New test for the new
66            table methods and the new arguments
67            (TestPostGISShapestorePoint.test_shapes_in_region)
68            (TestPostGISShapestorePoint.test_shape_raw_data)
69            (TestPostGISShapestorePoint.test_shape_points)
70            (TestPostGISShapestorePoint.test_shape_shapeid)
71            (TestPostGISShapestorePoint.test_all_shapes)
72            (TestPostGISTable.test_simple_query)
73            (TestPostGISTable.test_simple_query)
74            (TestPostGISTable.test_simple_query)
75            (TestPostGISTable.test_read_value)
76            (TestPostGISTable.test_read_row_as_dict): Adapt to the new
77            shapeids in the landmarks table
78    
79            * test/test_memory_table.py
80            (TestMemoryTable.test_read_row_as_dict_row_count_mode)
81            (TestMemoryTable.test_read_value_row_count_mode)
82            (TestMemoryTable.test_row_id_to_ordinal)
83            (TestMemoryTable.test_row_oridnal_to_id): New test for the new
84            table methods and the new arguments
85    
86            * test/test_dbf_table.py
87            (TestDBFTable.test_read_row_as_dict_row_count_mode)
88            (TestDBFTable.test_read_value_row_count_mode)
89            (TestDBFTable.test_row_id_to_ordinal)
90            (TestDBFTable.test_row_oridnal_to_id): New test for the new table
91            methods and the new arguments
92    
93    2003-08-26  Bernhard Herzog  <[email protected]>
94    
95            * Thuban/Model/postgisdb.py (PostGISShapeStore.BoundingBox): Use a
96            more postgis specific but much faster method to get the bounding
97            box
98    
99    2003-08-26  Bernhard Herzog  <[email protected]>
100    
101            * Thuban/Model/postgisdb.py (PostGISTable.Title)
102            (PostGISShapeStore.AllShapes): Add these missing methods.
103            (PostGISShapeStore.ShapesInRegion): No need to raise
104            StopIteration. We can simply return
105    
106            * test/test_postgis_db.py (TestPostGISTable.test_title)
107            (TestPostGISShapestorePoint.test_all_shapes): New tests for the
108            new methods
109    
110    2003-08-25  Bernhard Herzog  <[email protected]>
111    
112            * Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON.
113    
114            * test/test_postgis_db.py (PolygonTests): New class containing
115            those tests from TestPostGISShapestorePolygon that can also be
116            used to test MUTLIPOLYGON tables
117            (TestPostGISShapestorePolygon): Most tests are now in PolygonTests
118            so derive from that
119            (TestPostGISShapestoreMultiPolygon): New class with tests for
120            MUTLIPOLYGON tables
121    
122            * test/postgissupport.py (PostGISDatabase.initdb): Allow the
123            tables argument to have tuples with three items to override the
124            WKT type used.
125            (PostgreSQLServer.get_default_static_data_db): Use the above to
126            create a polygon table with MUTLIPOLYGONs
127            (point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon)
128            (arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to
129            coords_to*
130            (coords_to_multipolygon): New. Convert to MUTLIPOLYGON
131            (wkt_converter): New. Map WKT types to converters
132            (upload_shapefile): New parameter force_wkt_type to use a
133            different WKT type than the default
134    
135    2003-08-25  Bernhard Herzog  <[email protected]>
136    
137            * Thuban/UI/application.py
138            (ThubanApplication.run_db_param_dialog): New. Suitable as a
139            db_connection_callback. Main difference is that the dialog run
140            from this method doesn't have a parent so it can be used even when
141            there is no main window
142            (ThubanApplication.OpenSession): Use self.run_db_param_dialog if
143            no db_connection_callback was given. This way the dialog pops up
144            even when the .thuban file was given as a command line parameter.
145    
146    2003-08-25  Bernhard Herzog  <[email protected]>
147    
148            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse
149            before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs
150            which leads to an effectively frozen X session because the user
151            can only interact with the dialog but the mouse is still grabbed
152            by the canvas.
153            Also, call the tool's Hide method before MouseLeftUp because
154            MouseLeftUp may change the tool's coordinates.
155    
156    2003-08-25  Bernhard Herzog  <[email protected]>
157    
158            * Thuban/UI/application.py (ThubanApplication.OpenSession): Catch
159            LoadCancelled exceptions and handle them by returning immediately.
160    
161    2003-08-25  Bernhard Herzog  <[email protected]>
162    
163            GUI part of loading sessions with postgis connections which may
164            require user interaction to get passwords or updated parameters
165    
166            * Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a
167            bit nucer and be more generic.
168            (DBFrame.OnAdd): Adapt to new DBDialog interface
169    
170            * Thuban/UI/application.py (ThubanApplication.OpenSession): New
171            optional parameter db_connection_callback which is passed to
172            load_session.
173    
174            * Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New.
175            Suitable as a db_connection_callback
176            (MainWindow.OpenSession): Use self.run_db_param_dialog as the
177            db_connection_callback of the application's OpenSession method
178    
179    
180    2003-08-25  Bernhard Herzog  <[email protected]>
181    
182            Basic loading of sessions containing postgis connections:
183    
184            * Thuban/Model/load.py (LoadError): Add doc-string
185            (LoadCancelled): New exception class to indicate a cancelled load
186            (SessionLoader.__init__): Add the db_connection_callback parameter
187            which will be used by the loader to get updated parameters and a
188            password for a database connection
189            (SessionLoader.__init__): Add the new XML elements to the
190            dispatchers dictionary
191            (SessionLoader.check_attrs): Two new conversions, ascii to convert
192            to a byte-string object and idref as a generic id reference
193            (SessionLoader.start_dbconnection)
194            (SessionLoader.start_dbshapesource): New. Handlers for the new XML
195            elements
196            (load_session): Add the db_connection_callback to pass through the
197            SessionLoader
198    
199            * test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword):
200            New classes to test loading of sessions with postgis database
201            connections.
202    
203    2003-08-25  Bernhard Herzog  <[email protected]>
204    
205            * Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and
206            replace it and the comment with __BuildDate__ by the Source: and
207            Id: cvs keywords as used in the other files.
208    
209    2003-08-25  Bernhard Herzog  <[email protected]>
210    
211            * Thuban/Model/load.py (SessionLoader.check_attrs): Raise a
212            LoadError when a required attribute is missing. The code used to
213            be commented out for some reason, but probably should have been
214            active.
215    
216            * test/test_load.py (TestLoadError.test): Test the message in the
217            LoadError too to make sure it really is about the missing
218            attribute
219    
220    2003-08-22  Bernhard Herzog  <[email protected]>
221    
222            * test/test_save.py (SaveSessionTest.test_dbf_table)
223            (SaveSessionTest.test_joined_table): Add XML validation tests.
224    
225    2003-08-22  Bernhard Herzog  <[email protected]>
226    
227            Implement saving a session with a postgis connection
228    
229            * Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New
230            elements for database connections and shapestores using db
231            connections
232            (session): Add the dbconnections to the content model
233    
234            * Thuban/Model/save.py (SessionSaver.write_db_connections): New.
235            Write the db connections
236            (SessionSaver.write_session): Call write_db_connections to write
237            the connection before the data sources
238            (SessionSaver.write_data_containers): Handle postgis shapestores
239    
240            * test/test_save.py (SaveSessionTest.thubanids)
241            (SaveSessionTest.thubanidrefs): Update for new DTD
242            (SaveSessionTest.test_save_postgis): New. Test saving a session
243            with postgis connections
244    
245            * Thuban/Model/postgisdb.py (PostGISTable.DBConnection)
246            (PostGISTable.TableName): New accessor methods for the connection
247            and table name
248    
249            * test/test_postgis_db.py (TestPostGISTable.test_dbconn)
250            (TestPostGISTable.test_dbname): New methods to test the new
251            PostGISConnection methods
252    
253    2003-08-22  Bernhard Herzog  <[email protected]>
254    
255            * Thuban/Model/postgisdb.py (ConnectionError): New exception class
256            for exceptions occurring when establishing a Database connection
257            (PostGISConnection.connect): Catch psycopg.OperationalError during
258            connects and raise ConnectionError.
259    
260            * test/test_postgis_db.py (TestPostgisDBExceptions): New class for
261            tests for database exceptions
262    
263    2003-08-22  Bernhard Herzog  <[email protected]>
264    
265            Prepare the test suite for tests with required authentication
266    
267            * test/postgissupport.py (PostgreSQLServer.__init__): Add instance
268            variables with two predefined users/passwords, one for the admin
269            and one for a non-privileged user.
270            (PostgreSQLServer.createdb): Pass the admin name to initdb and add
271            the non-privileged user to the database and set the admin password
272            (PostgreSQLServer.wait_for_postmaster): Use the admin user name.
273            Better error reporting
274            (PostgreSQLServer.connection_params)
275            (PostgreSQLServer.connection_string): New methods to return
276            information about how to connect to the server
277            (PostgreSQLServer.execute_sql): New. Convenience method to execute
278            SQL statements
279            (PostgreSQLServer.require_authentication): Toggle whether the
280            server requires authentication
281            (PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New.
282            Add or alter users
283            (PostGISDatabase.initdb): Pass the admin name one the
284            subprocesses' command lines. Grant select rights on
285            geometry_columns to everybody.
286            (upload_shapefile): Use the admin name and password when
287            connecting. Grant select rights on the new table to everybody.
288    
289            * test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the
290            server's new methods to get the connection parameters.
291    
292            * test/test_postgis_session.py (TestSessionWithPostGIS.setUp)
293            (TestSessionWithPostGIS.test_remove_dbconn_exception): Use the
294            server's new methods to get the connection parameters.
295    
296            * test/test_postgis_db.py
297            (TestPostGISConnection.test_gis_tables_empty)
298            (TestPostGISConnection.test_gis_tables_non_empty)
299            (PostGISStaticTests.setUp): Use the server's new methods to get
300            the connection parameters.
301    
302    2003-08-22  Bernhard Herzog  <[email protected]>
303    
304            * Thuban/UI/about.py (About.__init__): Add the psycopg version.
305    
306            * Thuban/version.py: Add psycopg version
307    
308            * Thuban/Model/postgisdb.py (psycopg_version): New. Return the
309            version of the psycopg module
310    
311    2003-08-22  Bernhard Herzog  <[email protected]>
312    
313            * Thuban/UI/dbdialog.py (DBPwdDlg): Removed because it's not used.
314            (DBFrame.OnEdit): Removed because it's not used and wouldn't work
315            at the moment. The functionality should probably be implemented
316            some time, though.
317            (DBFrame.OnRemove): Display a message if the connection can't be
318            removed because it's still in use.
319    
320    2003-08-22  Jan-Oliver Wagner <[email protected]>
321    
322            * Thuban/UI/about.py (About.__init__): split up the huge about
323            text into elements/lists for easier translation. This fixes bug
324            https://intevation.de/rt/webrt?serial_num=2058
325            Also, made some forgotten string available for the i18n.
326    
327    2003-08-21  Bernhard Herzog  <[email protected]>
328    
329            Make postgis support really optional including insensitive menu
330            items.
331    
332            * Thuban/Model/postgisdb.py (has_postgis_support): New. Return
333            whether the postgis is supported.
334    
335            * Thuban/UI/dbdialog.py: Put the psycopg import into try..except
336            to make postgis support optional
337    
338            * Thuban/UI/mainwindow.py (_has_postgis_support): New. Context
339            version of Thuban.Model.postgisdb.has_postgis_support
340            (database_management command): Make it only sensitive if postgis
341            is supported.
342    
343    2003-08-21  Jan-Oliver Wagner <[email protected]>
344    
345            * Doc/manual/thuban-manual.xml: Added CVS revision for rev-history.
346            (section Adding and Removing Layers): Added text and described
347            multi-selection.
348            (chapter Extensions): New.
349    
350    2003-08-21  Jan-Oliver Wagner <[email protected]>
351    
352            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Changed dialog
353            settings to allow multiple files to load into the map.
354            Also reduced selection to *.shp as a default.
355    
356    2003-08-20  Bernhard Herzog  <[email protected]>
357    
358            Add dialogs and commands to open database connections and add
359            database layers.
360    
361            * Thuban/UI/mainwindow.py (MainWindow.DatabaseManagement): New
362            method to open the database connection management dialog
363            (MainWindow.AddDBLayer): New method to add a layer from a database
364            (_has_dbconnections): New helper function to use for sensitivity
365            (database_management command, layer_add_db command): New commands
366            that call the above new methods.
367            (main_menu): Add the new commands to the menu.
368    
369            * Thuban/Model/postgisdb.py (PostGISConnection.__init__)
370            (PostGISConnection.connect): Establish the actual connection in a
371            separate method and call it in __init__. This makes it easier to
372            override the behavior in test cases
373            (PostGISConnection.BriefDescription): New method to return a brief
374            description for use in dialogs.
375    
376            * test/test_postgis_db.py (NonConnection): DB connection that
377            doesn't actually connect
378            (TestBriefDescription): New class with tests for the new
379            BriefDescription method
380    
381    2003-08-19  Jan-Oliver Wagner <[email protected]>
382    
383            Moved anything from extensions to libraries.
384    
385            * libraries: New.
386    
387            * libraries/ pyprojection, pyshapelib, shapelib, thuban: New.
388    
389            * libraries/pyprojection/ LICENSE, MANIFEST.in, Projection.i,
390            Projection.py, Projection_wrap.c, setup.py, swighelp.txt: These files have
391            been moved here from thuban/extensions/pyprojection/
392            See there in the Attic for the older history.
393    
394            * libraries/pyshapelib/ COPYING, ChangeLog, NEWS, README, dbflib.i,
395            dbflib.py, dbflib_wrap.c, pyshapelib_api.h, pytest.py, setup.py,
396            shapelib.i, shapelib.py, shapelib_wrap.c, shptreemodule.c: These files
397            have been moved here from thuban/extensions/pyshapelib/
398            See there in the Attic for the older history.
399    
400            * libraries/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: These
401            files have been moved here from thuban/extensions/shapelib/
402            See there in the Attic for the older history.
403    
404            * libraries/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
405            gdalwarp.cpp, wxproj.cpp: These files have been moved here from
406            thuban/extensions/thuban/
407            See there in the Attic for the older history.
408    
409            * MANIFEST.in, setup.cfg, setup.py: renamed extensions to libraries.
410    
411            * extensions/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
412            gdalwarp.cpp, wxproj.cpp: Moved to libraries/thuban.
413    
414            * extensions/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c:
415            Moved to libraries/shapelib.
416    
417            * extensions/pyshapelib/ COPYING, NEWS, dbflib.py, pytest.py,
418            shapelib.py, README, dbflib_wrap.c, setup.py, shapelib_wrap.c,
419            ChangeLog, dbflib.i, pyshapelib_api.h, shapelib.i, shptreemodule.c:
420            Moved to libraries/pyshapelib.
421    
422            * extensions/pyprojection/ MANIFEST.in, Projection.py, setup.py,
423            LICENSE, Projection.i, Projection_wrap.c, swighelp.txt:
424            Moved to libraries/pyprojection.
425    
426            * extensions/ pyprojection, pyshapelib, shapelib, thuban: Removed.
427    
428            * extensions: Removed.
429    
430    2003-08-19  Bernhard Herzog  <[email protected]>
431    
432            * test/test_viewport.py (ViewPortTest): We don't use the
433            facilities of FileTestMixin so don't derive from it.
434            (TestViewportWithPostGIS): New class with tests for using a
435            viewport on a map with postgis layers.
436    
437    2003-08-19  Bernhard Herzog  <[email protected]>
438    
439            Add the db connection management to the session.
440    
441            * Thuban/Model/session.py (Session.__init__): New instance
442            variable db_connections
443            (Session.AddDBConnection, Session.DBConnections)
444            (Session.HasDBConnections, Session.CanRemoveDBConnection)
445            (Session.RemoveDBConnection): New methods to manage and query the
446            db connections managed by the session
447            (Session.OpenDBShapeStore): New method to open a shapestore from a
448            db connection
449    
450            * Thuban/Model/messages.py (DBCONN_REMOVED, DBCONN_ADDED): New
451            messages for the db connection handling in the session
452    
453            * test/test_postgis_session.py: New. test cases for the session's
454            db connection handling with postgis connections
455    
456    2003-08-19  Bernhard Herzog  <[email protected]>
457    
458            Add very basic postgis database support and the corresponding test
459            cases. The test cases require a PostgreSQL + postgis installation
460            but no existing database. The database will be created
461            automatically by the test cases
462    
463            * test/README: Add note about skipped tests and the requirements
464            of the postgis tests.
465    
466            * Thuban/Model/postgisdb.py: New. Basic postgis database support.
467    
468            * test/test_postgis_db.py: New. Test cases for the postgis
469            support.
470    
471            * Thuban/Model/wellknowntext.py: New. Parser for well-known-text
472            format
473    
474            * test/test_wellknowntext.py: New. Test cases for the
475            wellknowntext parser
476    
477            * test/postgissupport.py: New. Support module for tests involving
478            a postgis database.
479    
480            * test/support.py (execute_as_testsuite): Shut down the postmaster
481            if it's still running after the tests
482    
483            * Thuban/Model/data.py (RAW_WKT): New constant for raw data in
484            well known text format
485    
486    2003-08-19  Jan-Oliver Wagner <[email protected]>
487    
488            * Examples/simple_extensions/hello_world.py: New. Raises a Hello World
489            message dialog.
490    
491    2003-08-18  Bernhard Herzog  <[email protected]>
492    
493            * test/support.py (ThubanTestResult.printErrors): Indent the
494            reason for the skips in the output to make it a bit more readable.
495            (execute_as_testsuite): New helper function to run a test suite
496            and print some more information.
497            (run_tests): Use execute_as_testsuite to run the tests
498    
499            * test/runtests.py (main): Use execute_as_testsuite to run the
500            tests
501    
502    2003-08-18  Bernhard Herzog  <[email protected]>
503    
504            Fix some bugs in Thuban and the test suite that were uncovered by
505            changes introduced in Python 2.3:
506    
507            * Thuban/Model/table.py (DBFTable.__init__): Make sure the
508            filename is an absolute name
509    
510            * Thuban/Model/layer.py (RasterLayer.__init__): Make sure the
511            filename is an absolute name
512    
513            * test/test_save.py (SaveSessionTest.testRasterLayer): Use a
514            unique filename to save to and use the correct relative filename
515            in the expected output.
516            (SaveSessionTest.test_dbf_table): Use the correct relative
517            filename in the expected output.
518    
519            * test/test_layer.py (TestLayer.test_raster_layer): Update the
520            test to check whether the filename is absolute.
521    
522    2003-08-18  Jan-Oliver Wagner <[email protected]>
523    
524            * Thuban/UI/about.py (About.__init__): Added Silke Reimer.
525    
526    2003-08-15  Bernhard Herzog  <[email protected]>
527    
528            Change the way shapes are returned by a shape store. The
529            ShapesInRegion method returns an iterator over actual shape
530            objects instead of a list of shape ids.
531    
532            * Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
533            id.
534            (ShapefileStore.ShapesInRegion): Return an iterator over the
535            shapes which yields shape objects instead of returning a list of
536            shape ids
537            (ShapefileStore.AllShapes): New. Return an iterator over all
538            shapes in the shape store
539            (DerivedShapeStore.AllShapes): New. Like in ShapefileStore
540    
541            * Thuban/Model/layer.py (Layer.ShapesInRegion): Update
542            doc-string.
543    
544            * Thuban/UI/baserenderer.py
545            (BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
546            layer_shapes and make it return an iterator containg shapes
547            instead of a list of ids.
548            (BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
549            layer_shapes() change
550    
551            * Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
552            (ScreenRenderer.layer_shapes): Rename as in BaseRenderer
553    
554            * Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
555            changes in the ShapesInRegion return value.
556            (ViewPort._get_hit_tester): Remove commented out code
557    
558            * test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
559            new return value.
560            (SimpleShapeStore.AllShapes): New. Implement this method too.
561    
562            * test/test_layer.py (TestLayer.test_arc_layer)
563            (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
564            (TestLayer.test_point_layer_with_projection)
565            (TestLayer.test_derived_store): Adapt to changes in the
566            ShapesInRegion return value.
567    
568            * test/test_shapefilestore.py
569            (TestShapefileStoreArc.test_shapes_in_region)
570            (TestShapefileStorePolygon.test_shapes_in_region)
571            (TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
572            in the ShapesInRegion return value.
573            (TestShapefileStorePoint.test_all_shapes)
574            (TestShapefileStoreArc.test_shape_shapeid): New tests for the new
575            methods
576    
577            * test/test_derivedshapestore.py
578            (TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
579            the ShapesInRegion return value.
580            (TestDerivedShapeStore.test_all_shapes)
581            (TestDerivedShapeStore.test_shape_shapeid): New tests for the new
582            methods
583    
584    2003-08-15  Bernhard Herzog  <[email protected]>
585    
586            Make the renderers deal correctly with raw vs. python level
587            representation of shape geometries
588    
589            * Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer):
590            Return a flag useraw in addition to the callable and the parameter
591            to indicate whether the callable can deal with the raw shape data
592            or uses the higher level python lists of coordinates. The callable
593            now should accept either the raw data or the return value of the
594            shape's Points() method.
595            (BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer
596            change
597            (BaseRenderer.projected_points): Instead of the shape id use the
598            points list as parameter.
599            (BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape)
600            (BaseRenderer.draw_point_shape): Adapt to projected_points()
601            change and accept the points list as parameter instead of the
602            shape id.
603    
604            * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return
605            the useraw flag as required by the BaseRenderer
606            (ScreenRenderer.draw_shape_layer): Adapt to low-level renderer
607            changes.
608    
609            * test/test_baserenderer.py
610            (TestBaseRenderer.test_point_with_classification): New test for
611            rendering a map with classifications.
612    
613    2003-08-15  Bernhard Herzog  <[email protected]>
614    
615            * Thuban/UI/viewport.py (ViewPort.find_shape_at)
616            (ViewPort._find_shape_in_layer, ViewPort._find_shape_in_layer)
617            (ViewPort._get_hit_tester, ViewPort.projected_points)
618            (ViewPort._hit_point, ViewPort._hit_arc, ViewPort._hit_polygon)
619            (ViewPort._find_label_at): Split the find_shape_at method into
620            several new methods and use the functions in the hit-test module.
621    
622            * Thuban/UI/hittest.py: New module with Python-level hit-testing
623            functions
624    
625            * test/test_hittest.py: New. Test for the new hittest module
626    
627    2003-08-15  Bernhard Herzog  <[email protected]>
628    
629            * Thuban/Model/layer.py (Layer.ShapesInRegion): Apply the layer
630            projection to all corners of the bounding box to get a better
631            approximation of the projected bounding box
632    
633            * test/test_layer.py (TestLayer.test_point_layer_with_projection):
634            New. Test coordinate handling of a layer with a projection.
635            Catches the bug fixed in Layer.ShapesInRegion
636    
637    2003-08-15  Bernhard Herzog  <[email protected]>
638    
639            Move some of the mock objects in test_baserenderer into their own
640            module so they can easily be used from other tests
641    
642            * test/mockgeo.py: New test helper module with some mock objects
643            for geometry related things like shapes, shapestores and
644            projections.
645    
646            * test/test_mockgeo.py: New. Tests for the new helper module
647    
648            * test/test_baserenderer.py: Some of the mock-objects are in
649            mockgeo now.
650    
651    2003-08-12  Jan-Oliver Wagner <[email protected]>
652    
653            * Thuban/UI/about.py (About.__init__): Added Bj�rn Broscheit.
654    
655    2003-08-12  Bernhard Herzog  <[email protected]>
656    
657            * po/de.po: New. German translations by Bjoern Broscheit
658    
659    2003-08-12  Bernhard Herzog  <[email protected]>
660    
661            * Thuban/UI/projdialog.py (UnknownProjPanel._DoLayout): Translated
662            strings have to be one string literal.
663    
664    2003-08-11  Bernhard Herzog  <[email protected]>
665    
666            * test/support.py (FloatComparisonMixin.assertPointListEquals):
667            New. This method was used in various derived classes, but it's
668            better to have it here.
669    
670            * test/test_shapefilestore.py
671            (ShapefileStoreTests.assertPointListEquals): Removed. It's now in
672            FloatComparisonMixin
673    
674            * test/test_layer.py (TestLayer.assertPointListEquals): Removed.
675            It's now in FloatComparisonMixin
676    
677            * test/test_derivedshapestore.py
678            (TestDerivedShapeStore.assertPointListEquals): Removed. It's now
679            in FloatComparisonMixin
680    
681    2003-08-11  Bernhard Herzog  <[email protected]>
682    
683            * Thuban/UI/join.py (JoinDialog.OnJoin): Add missing space to
684            error message
685    
686    2003-08-08  Jan-Oliver Wagner <[email protected]>
687    
688            * Doc/manual/thuban-manual.xml: Now use authorgroup. Added revhistory
689            with version number.
690            Changed title to reflect version number of Thuban.
691    
692    2003-08-08  Jan-Oliver Wagner <[email protected]>
693    
694            * Thuban/UI/about.py (About.__init__): Reworked the hall of fame. Now
695            the list corresponds to the "About" web page.
696    
697    2003-08-08  Bernhard Herzog  <[email protected]>
698    
699            * Thuban/UI/projdialog.py (UTMProposeZoneDialog.dialogLayout):
700            Make sure translated strings are recognized as one string literal.
701    
702            * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog.dialogLayout):
703            Make sure translated strings are recognized as one string literal.
704    
705            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Make sure
706            translated strings are recognized as one string literal.
707    
708            * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
709            sure translated strings are recognized as one string literal.
710    
711    2003-08-07  Bernhard Herzog  <[email protected]>
712    
713            * Thuban/Model/data.py (DerivedShapeStore.RawShapeFormat): New.
714            Simply delegates to the original shapestore.
715    
716            * test/test_derivedshapestore.py
717            (TestDerivedShapeStore.test_raw_format): New. Test case for
718            DerivedShapeStore.RawShapeFormat
719    
720    2003-08-07  Bernhard Herzog  <[email protected]>
721    
722            Add raw data interface to shape objects.
723    
724            * Thuban/Model/data.py (ShapefileShape, Shape): Rname the shape
725            class to ShapefileShape which now holds shapefile specific
726            information.
727            (ShapefileShape.compute_bbox): Simplified to not cache any
728            information. The way this method is used that shouldn't matter
729            performance wise.
730            (ShapefileShape.RawData): New. Return the shapeid which is the raw
731            data format for shapes from shapefiles.
732            (ShapefileStore.RawShapeFormat): New. Return the raw datatype used
733            in the shape objects returned by a shapestore. For a
734            ShapefileStore this is always RAW_SHAPEFILE.
735            (RAW_PYTHON, RAW_SHAPEFILE): Constants for the RawShapeFormat
736            method.
737    
738            * test/test_shapefilestore.py
739            (TestShapefileStore.test_raw_format): New test to test the raw
740            format feature of shapes.
741    
742            * Thuban/Model/layer.py: Remove the unused import of Shape from
743            data. It was only there for interface compatibility but it's not
744            used inside of Thuban and the generic Shape class has gone away.
745    
746            * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Check
747            the raw data format and only use an optimized version of its a
748            shapefile.
749    
750    2003-08-07  Bernhard Herzog  <[email protected]>
751    
752            * test/test_baserenderer.py (SimpleShape): Shape class for the
753            tests.
754            (SimpleShapeStore.Shape): Use SimpleShape instead of
755            Thuban.Model.data.Shape to make the tests independed of the coming
756            changes.
757    
758    2003-08-07  Bernhard Herzog  <[email protected]>
759    
760            * test/support.py (SkipTest, ThubanTestResult, ThubanTestRunner)
761            (ThubanTestProgram): New classes that extend the respective
762            classes from unittest. These new version support skipping tests
763            under certain expected conditions. In the Thuban test suite we
764            uses this for tests that require the optional gdal support.
765            (run_tests): Use ThubanTestProgram instead of the unittest.main()
766    
767            * test/runtests.py (main): Use the new ThubanTestRunner instead of
768            the normal one from unittest
769    
770            * test/test_layer.py (TestLayer.test_raster_layer): If this test
771            is not run because gdal support isn't available report this to the
772            runner.
773    
774            * test/test_baserenderer.py
775            (TestBaseRenderer.test_raster_no_projection): Do not run this test
776            if gdal support isn't available and report this to the runner.
777    
778    2003-08-06  Bernhard Herzog  <[email protected]>
779    
780            Rearrange the renderers a bit, partly in preparation for changes
781            required for the postgis merge, partly to make it more testable.
782            Also make the representation of coordinates in Shapes more
783            consistent.
784    
785            * Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
786            this class is now in BaseRenderer. This class is now practically
787            only a specialization of BaseRenderer for rendering to an actual
788            wx DC.
789            (ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
790            to get the shapetype specific rendering functions.
791    
792            * Thuban/UI/baserenderer.py: New file with the basic rendering
793            logic. The code in this file is completely independend of wx.
794            (BaseRenderer): Class with the basic rendering logic
795    
796            * test/test_baserenderer.py: New. Test cases for BaseRenderer
797    
798            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
799            error_on_redraw to guard agains endless loops and stack overflows
800            when there's a bug in the rendering code that raises exceptions.
801            (MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
802            rendering into a separate method _do_redraw so that error handling
803            is a bit easier. When an exception occurs, set error_on_redraw to
804            true. When it's true on entry to OnIdle do nothing and return
805            immediately.
806    
807            * Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a
808            Shape object will always have the coordinates as a list of list of
809            coordinate pairs (tuples).
810            (Shape.compute_bbox): Adapt to new representation.
811    
812            * Thuban/UI/viewport.py (ViewPort.find_shape_at)
813            (ViewPort.LabelShapeAt): Adapt to new coordinate representation in
814            Shape objects.
815    
816            * test/test_shapefilestore.py
817            (ShapefileStoreTests.assertFloatTuplesEqual)
818            (ShapefileStoreTests.assertPointListEquals): Rename to
819            assertPointListEquals and change purpose to checking equality of
820            the lists returned by Shape.Points().
821            (TestShapefileStoreArc.test_shape)
822            (TestShapefileStorePolygon.test_shape)
823            (TestShapefileStorePoint.test_shape): Use the new
824            assertPointListEquals instead of assertFloatTuplesEqual
825    
826            * test/test_layer.py (TestLayer.assertFloatTuplesEqual)
827            (TestLayer.assertPointListEquals): Rename to assertPointListEquals
828            and change purpose to checking equality of the lists returned by
829            Shape.Points().
830            (TestLayer.test_arc_layer, TestLayer.test_arc_layer)
831            (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
832            (TestLayer.test_derived_store): Use the new assertPointListEquals
833            instead of assertFloatTuplesEqual
834    
835            * test/test_derivedshapestore.py
836            (TestDerivedShapeStore.assertFloatTuplesEqual)
837            (TestDerivedShapeStore.assertPointListEquals): Rename to
838            assertPointListEquals and change purpose to checking equality of
839            the lists returned by Shape.Points().
840            (TestDerivedShapeStore.test_shape): Use the new
841            assertPointListEquals instead of assertFloatTuplesEqual
842    
843    2003-08-06  Jan-Oliver Wagner <[email protected]>
844    
845            * Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for
846            a bounding box. A dialog is raised in case, no bounding box
847            is found. This fixes bug #2043:
848            https://intevation.de/rt/webrt?serial_num=2043
849    
850    2003-08-05  Bernhard Herzog  <[email protected]>
851    
852            * Thuban/Model/color.py (Color.__repr__): Make the repr of a color
853            object look like a Color instantiation. Formerly it looked like a
854            tuple.
855    
856            * test/test_color.py (TestColor.test_repr)
857            (TestColor.test_equality, TestColor.test_inequality): New. test
858            some more apects of the Color class
859            (TestTransparent.test_repr, TestTransparent.test_hex)
860            (TestTransparent.test_equality): New. Test cases for the
861            Transparent object.
862    
863    2003-08-04  Jan-Oliver Wagner <[email protected]>
864    
865            * Doc/manual/thuban-manual.xml: a number of small improvements.
866            The resulting file is the version submitted for GREAT-ER II.
867    
868    2003-08-01  Bernhard Herzog  <[email protected]>
869    
870            * Thuban/UI/resource.py, Thuban/UI/projdialog.py,
871            Thuban/UI/join.py, Thuban/UI/classgen.py, Thuban/UI/about.py,
872            Thuban/Model/resource.py: Insert cvs keywords and doc-strings.
873    
874            * Thuban/UI/common.py: Insert cvs keywords and doc-strings.
875            (Color2wxColour, wxColour2Color, ThubanBeginBusyCursor)
876            (ThubanEndBusyCursor): Add doc-strings
877    
878    2003-08-01  Bernhard Herzog  <[email protected]>
879    
880            First step towards PostGIS integration. More abstraction by movin
881            more code from the layer to the shapestore. More methods of the
882            layer are now simply delegated to the equivalent method of the
883            shapestore. The SHAPETYPE_* constants are now in data not in
884            layer.
885    
886            * Thuban/Model/data.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
887            (SHAPETYPE_POINT, Shape): Move these constants and classes from
888            layer.py to data.py
889            (ShapefileStore.__init__): More Initialization for the new methods
890            and functionality.
891            (ShapefileStore.ShapeType, ShapefileStore.NumShapes)
892            (ShapefileStore.BoundingBox, ShapefileStore.ShapesInRegion)
893            (ShapefileStore.Shape): New methods that were formerly implemented
894            in the layer.
895            (DerivedShapeStore.Shape, DerivedShapeStore.ShapesInRegion)
896            (DerivedShapeStore.ShapeType, DerivedShapeStore.NumShapes)
897            (DerivedShapeStore.BoundingBox): New. DerivedShapeStore
898            equivalents of the new shape methods. These versions are simply
899            delegated to the original shapstore.
900    
901            * Thuban/Model/layer.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
902            (SHAPETYPE_POINT, Shape): Removed. They're now in data.py
903            (Layer.SetShapeStore): Removed the initializatin of instance
904            variables that were needed for the stuff that's now in
905            ShapefileStore
906            (Layer.BoundingBox, Layer.NumShapes, Layer.ShapeType)
907            (Layer.Shape, Layer.ShapesInRegion): Simply delegate to the
908            shapestore.
909    
910            * Thuban/UI/classifier.py, Thuban/UI/renderer.py,
911            Thuban/UI/viewport.py: Import the SHAPETYPE_* constants from data
912            instead of layer.
913    
914            * test/test_shapefilestore.py: New. Tests for ShapefileStore.
915    
916            * test/test_derivedshapestore.py: New. Tests for DerivedShapeStore.
917    
918            * test/test_layer.py: Import the SHAPETYPE_* constants from data
919            instead of layer.
920            (TestLayer.test_derived_store): Remove the test for the exception
921            when instantiating the DerivedShapeStore with an incompatible
922            table which is now in test_derivedshapestore.py. Add some more
923            tests of the layer methods to determine whether they work for a
924            DerivedShapeStore as well.
925    
926    2003-07-31  Jonathan Coles   <[email protected]>
927    
928            * Doc/manual/thuban-manual.xml: Fix the list of required packages
929            by just listing the name and where they can be found.
930    
931    2003-07-31  Frank Koormann   <[email protected]>
932    
933            * Doc/manual/thuban-manual.xml:
934            Changed the screenshot elements to figure.
935            Changed some variablelist elements to itemizedlist.
936            Added section on GDAL formats.
937    
938    2003-07-31  Jonathan Coles   <[email protected]>
939    
940            * Doc/manual/thuban-manual.xml: Added a few sentences about
941            the Fix Border Color option when generating classes.
942    
943    2003-07-30  Jonathan Coles   <[email protected]>
944    
945            * Thuban/Model/classgen.py: Add docstrings. Rename specific
946            Ramp instances to use lower_case_style.
947    
948            * Thuban/UI/classgen.py: Use renamed Ramp instances.
949            
950            * Thuban/UI/classifier.py: Add docstrings.
951    
952            * Thuban/UI/dock.py: Add docstrings.
953    
954            * test/test_classgen.py: Use renamed Ramp instances.
955    
956    2003-07-30  Bernhard Herzog  <[email protected]>
957    
958            * Thuban/Lib/connector.py (QueueingPublisher): Removed. This class
959            was never used in Thuban.
960    
961    2003-07-30  Bernhard Herzog  <[email protected]>
962    
963            * Thuban/UI/join.py (JoinDialog.__init__): Use the table's Title()
964            method directly instead of going through the transient_table
965            method. This faster because transient_table may force the copy of
966            a DBF file into the transient database and setting a table's title
967            doesnm't affect the title of the associated transient table, so
968            this fixes RT #2042
969    
970            * Thuban/UI/main.py (__version__): Don't import the already
971            removed show_exception_dialog.
972    
973    2003-07-29  Jonathan Coles   <[email protected]>
974    
975            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
976            Put back this method and remove the equivalent function since we
977            are setting the exception hook from within this class (OnInit).
978    
979    2003-07-29  Jonathan Coles   <[email protected]>
980    
981            * Doc/manual/images/5_2_custom_ramp.png,
982            Doc/manual/images/5_2_quantiles.png,
983            Doc/manual/images/5_2_uniform_dist.png,
984            Doc/manual/images/5_2_unique_values.png,
985            Doc/manual/images/8_int_error.png: New screen shots.
986    
987            * Doc/manual/thuban-manual.xml: Fixed typos and wording, clarified
988            some points, and added more screen shots.
989    
990    2003-07-29  Bernhard Herzog  <[email protected]>
991    
992            * Thuban/Model/data.py: Remove the now unused import of warnings
993    
994    2003-07-29  Bernhard Herzog  <[email protected]>
995    
996            * Thuban/Model/data.py (SimpleStore): Removed. This class has been
997            deprecated since before the 0.8 release and isn't used in Thuban
998            itself anymore.
999    
1000            * Thuban/Model/transientdb.py: Remove some unnecessary imports
1001    
1002    2003-07-29  Jonathan Coles   <[email protected]>
1003    
1004            * Thuban/UI/application.py (ThubanApplication.OnInit): set the
1005            python exception hook here so that we are sure to catch any
1006            Thuban exception that happen during initialization.
1007    
1008            * Thuban/UI/main.py (main): Don't set the exception hook here,
1009            it will get set in ThubanApplication.OnInit.
1010    
1011    2003-07-29  Jonathan Coles   <[email protected]>
1012                                                                                
1013            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
1014            Removed and called it show_exception_dialog() so that the exception
1015            handler can be set before the class is created.
1016                                                                                
1017            * Thuban/UI/main.py (main): Install the exception handler before
1018            a ThubanApplication is created.
1019                                                                                    
1020    2003-07-29  Bernhard Herzog  <[email protected]>
1021    
1022            * po/it.po: New. Italian translation by Maurizio Napolitano
1023    
1024            * po/ru.po: New. Russian translation by Alex Shevlakov
1025    
1026    2003-07-29  Frank Koormann   <[email protected]>
1027    
1028            * Doc/manual/thuban-manual.xml: Extended section on supported
1029            projections.
1030            
1031    2003-07-29  Frank Koormann   <[email protected]>
1032    
1033            * Doc/manual/thuban-manual.xml: gaspell-checked.
1034    
1035    2003-07-29  Jonathan Coles   <[email protected]>
1036    
1037            * Doc/manual/images/3_5_legend.png: Added border to improve look
1038            on white background.
1039    
1040    2003-07-29  Jonathan Coles   <[email protected]>
1041    
1042            * Doc/manual/thuban-manual.xml: Fixed grammar and typos. Added
1043            descriptions for the legend toolbar.
1044    
1045            * Doc/manual/images/4_2_raster_layer_properties.png: Removed
1046            cursor from dialog box.
1047    
1048    2003-07-28  Jonathan Coles   <[email protected]>
1049    
1050            * Doc/manual/thuban-manual.xml: More screenshots and more chapters.
1051    
1052            * Doc/manual/images/2_4_session_tree.png,
1053            Doc/manual/images/3_5_legend.png, Doc/manual/images/3_rename_map.png,
1054            Doc/manual/images/4_2_layer_properties.png,
1055            Doc/manual/images/4_2_raster_layer_properties.png,
1056            Doc/manual/images/5_3_genclass.png,
1057            Doc/manual/images/5_classification.png,
1058            Doc/manual/images/6_projection.png,
1059            Doc/manual/images/7_1_table_view.png,
1060            Doc/manual/images/7_2_5_join.png: New screenshots.
1061    
1062    2003-07-24  Jonathan Coles   <[email protected]>
1063    
1064            * Doc/manual/thuban-manual.xml: Chapter on Projection Management.
1065    
1066    2003-07-24  Jonathan Coles   <[email protected]>
1067    
1068            * Doc/manual/thuban-manual.xml: Added EPS images and wrote
1069            chapter on Layer Management.
1070    
1071            * Doc/manual/Makefile: New. Makefile to generate all formats for the
1072            manual and images.
1073    
1074    2003-07-24  Bernhard Herzog  <[email protected]>
1075    
1076            * Thuban/Model/range.py, Thuban/version.py: Remove the #! line as
1077            it annoys lintian which warns about these files not being
1078            executable. The #1 isn't necessary here since if you absolutely
1079            must execute them you can always say "python <filename>".
1080    
1081            * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Remove
1082            superfluous code to set brush and pen for point shapes
1083    
1084            * Thuban/UI/viewport.py: Remove commented out code that wouldn't
1085            belong in viewport anyway
1086    
1087    2003-07-24  Frank Koormann   <[email protected]>
1088    
1089            * Doc/manual/thuban-manual.xml: Added section on table management.
1090    
1091    2003-07-24  Bernhard Herzog  <[email protected]>
1092    
1093            * test/runtests.py (main): Recognize the long "verbose" option
1094            correctly.
1095    
1096    2003-07-22  Jonathan Coles   <[email protected]>
1097    
1098            * Doc/manual/thuban-manual.xml: Continue to write first revision
1099            of the manual.
1100    
1101            * Thuban/UI/renderer.py (MapRenderer.render_map): Wrap method
1102            with Begin/EndDrawing() calls to ensure we aren't doing to
1103            many updates to the dc during rendering.
1104            (ScreenRenderer.draw_shape_layer): self.draw_point_shape takes
1105            a pen and brush argument so they need to be passed to the function.
1106    
1107            * Thuban/UI/viewport.py (ViewPort.calc_min_max_scales): New.
1108            Calculates the minimum and maximum scale values. Factored out
1109            of set_view_transform so that it could be used to zoom all the
1110            way into a single point.
1111            (ViewPort.set_view_transform): Call calc_min_max_scales().
1112            (ViewPort.FitSelectedToWindow): Zoom to the maximum scale
1113            if only a single point is selected.
1114    
1115            * Doc/manual/images/1_2_legend_close.png,
1116            Doc/manual/images/1_2_legend_dock.png,
1117            Doc/manual/images/1_2_mainwindow.png,
1118            Doc/manual/images/1_2_mainwindow.ps,
1119            Doc/manual/images/1_2_mainwindow.sk,
1120            Doc/manual/images/3_2_fullextent.png,
1121            Doc/manual/images/3_2_fulllayerextent.png,
1122            Doc/manual/images/3_2_fullshapeextent.png,
1123            Doc/manual/images/3_2_pan.png,
1124            Doc/manual/images/3_2_zoomin.png,
1125            Doc/manual/images/3_2_zoomout.png,
1126            Doc/manual/images/3_3_identify.png,
1127            Doc/manual/images/3_3_label.png,
1128            Doc/manual/images/3_5_invisible.png,
1129            Doc/manual/images/3_5_movedown.png,
1130            Doc/manual/images/3_5_moveup.png,
1131            Doc/manual/images/3_5_props.png,
1132            Doc/manual/images/3_5_tobottom.png,
1133            Doc/manual/images/3_5_totop.png,
1134            Doc/manual/images/3_5_visible.png: New. Images for the documentation.
1135    
1136    2003-07-18  Bernhard Herzog  <[email protected]>
1137    
1138            * Thuban/UI/messages.py (MAP_REPLACED): New message.
1139    
1140            * Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED
1141            after the new map has been assigned
1142    
1143            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages):
1144            Delegate MAP_REPLACED to the canvas too
1145            (MainWindow.prepare_new_session): Removed. Thanks to the new
1146            MAP_REPLACED message it's no longer needed
1147            (MainWindow.OpenSession, MainWindow.NewSession):
1148            prepare_new_session has been removed.
1149    
1150            * Thuban/UI/classifier.py (Classifier.__init__): Subscribe to
1151            MAP_REPLACED so that we can close the dialog if a new map is set.
1152            (Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED
1153            (Classifier.map_replaced): Handle MAP_REPLACED by closing the
1154            dialog
1155    
1156            * test/test_viewport.py (SimpleViewPortTest)
1157            (SimpleViewPortTest.test_default_size): Add doc-strings
1158            (ViewPortTest.setUp): Bind map to self.map so we can use it in
1159            tests. Subscribe to MAP_REPLACED messages too.
1160            (ViewPortTest.tearDown): No need to explicitly unsubscribe
1161            (ViewPortTest.test_set_map): New test for the SetMap method.
1162    
1163    2003-07-18  Bernhard Herzog  <[email protected]>
1164    
1165            * test/test_viewport.py (SimpleViewPortTest.test_default_size):
1166            Move this test from ViewPortTest.setUp to this new separate test
1167            case. setUp is not the place for the actual tests.
1168            (ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
1169            more of the test from setUp to the new test test_inital_settings.
1170            (ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
1171            (ViewPortTest.test_proj_conv): Split test_proj_conv into
1172            test_win_to_proj and test_proj_to_win and make the tests easier to
1173            understand
1174            (ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
1175            (ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
1176            (ViewPortTest.test_unprojected_rect_around_point)
1177            (ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
1178            Reformat to increase readability.
1179    
1180    2003-07-18  Bernhard Herzog  <[email protected]>
1181    
1182            * Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.
1183    
1184    2003-07-18  Bernhard Herzog  <[email protected]>
1185    
1186            * test/runtests.py: The test suite can now be run without an X
1187            connection. To make sure this remains true, remove the DISPLAY
1188            environment variable so that an error occurs if the wxGTK is
1189            imported accidentally
1190    
1191    2003-07-18  Bernhard Herzog  <[email protected]>
1192    
1193            * Thuban/UI/viewport.py: Remove unused imports
1194    
1195            * Thuban/UI/view.py: Remove unused imports
1196    
1197    2003-07-18  Bernhard Herzog  <[email protected]>
1198    
1199            * test/test_export.py Remove unused imports. The OutputTransform
1200            function is now in viewport.py and is called output_transform
1201            (TestScalebar.test_output_transform)
1202            (TestScalebar.test_OutputTransform): Renamed to
1203            test_output_transform and updated to use output_transform instead
1204            of OutputTransform
1205    
1206            * Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
1207            renamed.
1208            (MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
1209            renamed to output_transform
1210    
1211            * Thuban/UI/viewport.py (OutputTransform, output_transform):
1212            Rename to output_transform
1213    
1214    2003-07-18  Bernhard Herzog  <[email protected]>
1215    
1216            * Thuban/Model/layer.py (Layer.__init__): Rename
1217            classificationField to classificatin_column and init it here so
1218            that it can be used in SetClassificationColumn
1219            (Layer.GetClassificationColumn, Layer.GetClassificationField):
1220            Rename to GetClassificationColumn.
1221            (Layer.SetClassificationColumn, Layer.SetClassificationField):
1222            Rename to SetClassificationColumn and issue a LAYER_CHANGED
1223            message if the column changes.
1224            (Layer._classification_changed, Layer.ClassChanged): Rename to
1225            _classification_changed. Update the callers.
1226            (Layer.SetShapeStore): Further field->column renames.
1227    
1228            * Thuban/Model/load.py (SessionLoader.start_classification)
1229            (SessionLoader.start_clpoint): Updates because of
1230            field->column method name changes in the Layer class
1231    
1232            * Thuban/Model/save.py (SessionSaver.write_classification): Updates
1233            because of field->column method name changes in the Layer class
1234    
1235            * Thuban/UI/classifier.py (Classifier.__init__)
1236            (Classifier._OnTry, Classifier._OnRevert): Updates because of
1237            field->column method name changes in the Layer class
1238    
1239            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
1240            because of field->column method name changes in the Layer class
1241    
1242            * Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
1243            of field->column method name changes in the Layer class
1244    
1245            * test/test_save.py (SaveSessionTest.testClassifiedLayer)
1246            (SaveSessionTest.testClassifiedLayer): Update because of
1247            field->column method name changes in the Layer class
1248    
1249            * test/test_layer.py (SetShapeStoreTests.setUp)
1250            (SetShapeStoreTests.test_sanity): Update because of field->column
1251            method name changes in the Layer class
1252            (TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
1253            (TestLayerModification.test_sanity)
1254            (TestLayerModification.test_initial_settings): remove unsued code
1255            and rename to test_sanity.
1256            (TestLayerModification.test_set_classification): New test for
1257            SetClassification and SetClassificationField.
1258    
1259    2003-07-18  Bernhard Herzog  <[email protected]>
1260    
1261            * test/test_classgen.py (TestFixedRamp.test): Extend test to check
1262            the non-fixed values as well. The old test would have accepted a
1263            fixed ramp that only returnes the fixed properties
1264    
1265    2003-07-17  Jonathan Coles   <[email protected]>
1266    
1267            * Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
1268            shots for the manual. The XCF file is the source image and
1269            has additional layers to support changes.
1270    
1271            * Doc/manual/thuban-manual.xml: Wrote an initial Introduction.
1272    
1273            * Thuban/UI/classifier.py (Classifier.__BuildClassification):
1274            Return both the new class and the field name.
1275    
1276            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't
1277            fit the map to the window as this changes any zoom level that
1278            the user may have set.
1279    
1280    2003-07-16  Jonathan Coles   <[email protected]>
1281    
1282            * Thuban/Model/classgen.py (generate_singletons,
1283            generate_uniform_distribution, generate_quantiles): Remove
1284            fixes parameter, but maintain the same functionality by having
1285            the calling function pass a FixedRamp object for the ramp.
1286            (FixedRamp): New. Adapts a ramp to have fixed property values.
1287    
1288            * Thuban/Model/classification.py: Use new CLASS_CHANGED message.
1289            (Classification): Inherit from Publisher.
1290            (Classification.__init__): Remove the layer parameter.
1291            Classifications no longer need to have a parent layer.
1292            (Classification.GetField, Classification.GetFieldType,
1293            Classification.SetFieldInfo): Removed. The field name is stored
1294            in the layer, and the type can be retreived by calling
1295            Layer.GetFieldType().
1296            (Classification._set_layer, Classification.GetLayer): Removed.
1297            Classifications no longer have a parent layer.
1298    
1299            * Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
1300            classification.
1301            (Layer.SetShapeStore): Reset the classification first while
1302            we still have the old shape store to work with.
1303            (Layer.GetClassificationField, Layer.SetClassificationField):
1304            New. Method for getting/setting the field to classify on.
1305            (Layer.SetClassification): Simplified now that the layer
1306            simply has to hold a reference to the classification and not
1307            tell the classification who owns it.
1308            Fixes RTbug #2023.
1309    
1310            * Thuban/Model/load.py (SessionLoader.start_classification):
1311            Set the field name on the layer, not the classification.
1312    
1313            * Thuban/Model/messages.py: Add CLASS_CHANGED for when a
1314            classification is modified.
1315    
1316            * Thuban/Model/save.py (SessionSaver.write_classification):
1317            Get the field name and type from the layer.
1318    
1319            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
1320            parameter records to rows and add docstring. Fixes RTbug #1997.
1321    
1322            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
1323            ramp when we need to fix certain values of a ramp rather than
1324            using the old fixes parameter. Fixes RTbug #2024.
1325    
1326            * Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
1327            parameter.
1328            (ClassTable.Reset): Add fieldType parameter and use it, rather
1329            than asking the classification.
1330            (Classifier.__init__): Remember the original class's field
1331            and ask the layer for the field type, rather than the classification.
1332            (Classifier.__SetGridTable): Retrieve the field and field type
1333            for the table because they are not in the classification.
1334            (Classifier._OnTry, Classifier._OnRevert): Set the classification
1335            field on the layer in addition to the classification itself.
1336    
1337            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
1338            classification field from layer.
1339    
1340            * Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
1341            classification field from layer. Split up tests and remove
1342            *-imports. Fixes RTbug #1992.
1343    
1344            * test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.
1345    
1346            * test/test_classification.py
1347            (TestClassification.test_classification): Remove tests for methods
1348            that no longer exist.
1349    
1350            * test/test_layer.py (SetShapeStoreTests.setUp): Classification
1351            __init__ no longer has a field parameter, use SetClassificationField.
1352            (SetShapeStoreTests.test_sanity): Use layer object to get class
1353            field info.
1354    
1355            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
1356            SetClassificationField on layer to set class field info.
1357    
1358            * test/test_viewport.py: Renamed from test/test_view.py.
1359    
1360    2003-07-16  Jan-Oliver Wagner <[email protected]>
1361    
1362            * Doc/manual/thuban-manual.xml: Added authors and an initial
1363            coarse structure.
1364    
1365    2003-07-15  Bernhard Herzog  <[email protected]>
1366    
1367            * test/support.py (FloatComparisonMixin): This is a mix-in class
1368            and therefore should not be derived from any other class.
1369    
1370            * test/test_range.py (RangeTest): FloatComparisonMixin is a
1371            mix-in, so derive from TestCase as well.
1372    
1373    2003-07-15  Bernhard Herzog  <[email protected]>
1374    
1375            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
1376            draw_func handling a bit to remove one layer of indirection. This
1377            makes the renderer about 10% faster in the non-classifying case
1378            and the code a bit cleaner
1379            (MapRenderer.draw_point_shape): Add the pen and brush parameters
1380            and set them in the dc. Now the draw_point_shape method and
1381            wxproj's draw_polygon_shape function have basically the same
1382            signature so that both can be directly used as draw_func
1383    
1384    2003-07-15  Bernhard Herzog  <[email protected]>
1385    
1386            * Thuban/Model/save.py (SessionSaver.write_classification): Encode
1387            string values (in addition to the labels) as UTF 8
1388    
1389            * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
1390            values if the field type is string
1391    
1392            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
1393            saving a session with non-ascii string classification values.
1394    
1395            * test/test_load.py (TestClassification.file_contents)
1396            (TestClassification.test): Check for non-ascii values in string
1397            classifications
1398    
1399    2003-07-14  Jonathan Coles   <[email protected]>
1400    
1401            * test/test_view.py: New. Tests for ViewPort.
1402    
1403    2003-07-14  Frank Koormann   <[email protected]>
1404    
1405            * Thuban/Model/load.py (SessionLoader.start_map): Encode map
1406            title to latin1.  Fixes https://intevation.de/rt/webrt?serial_num=2013
1407    
1408            * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
1409            unicode strings from session file: session title, map title and
1410            projection name.
1411            
1412    2003-07-10  Jonathan Coles   <[email protected]>
1413    
1414            * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
1415            drag_stop, not drag_move when the mouse is released.
1416    
1417    2003-07-10  Jonathan Coles   <[email protected]>
1418    
1419            The most important part of this is the seperation of view.py into
1420            two pieces. viewport.py now has a class called ViewPort which
1421            contains all the non-wx parts of view.py and can therefore be
1422            tested. view.py contains only the wx-specific parts and is fairly
1423            simple.
1424    
1425            * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
1426            RTTbug #1992.
1427            * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
1428            RTTbug #1992.
1429    
1430            * Thuban/Model/classgen.py (generate_singletons,
1431            generate_uniform_distribution, generate_quantiles):
1432            Added 'fixes' parameter so that property attributes can
1433            be held constant over the generated classification groups.
1434            (CustomRamp.GetProperties): Remove unused variables.
1435    
1436            * Thuban/Model/map.py (Map.SetProjection): Send the old
1437            projection as an argument to listeners of the MAP_PROJECTION_CHANGED
1438            event.
1439    
1440            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
1441            parameter which is a list of records that restricts which
1442            records are saved. Fixes RTbug #1997.
1443    
1444            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
1445            Port exception dialog from GREAT-ER. Fixes RTbug #1993.
1446    
1447            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
1448            to allow the user to fix line color/width on generated groups.
1449            (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
1450            functions to optionally fix group properties.
1451    
1452            * Thuban/UI/main.py (main): Set exception hook to the
1453            ShowExceptionDialog. Fixes RTbug #1993.
1454    
1455            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
1456            the table window when it is selectd to be shown.
1457    
1458            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
1459            Export Selection button and move the export buttons underneath
1460            the table.
1461            (QueryTableFrame.UpdateStatusText): Added event argument so
1462            that it can respond to grid selection events. The status text
1463            is now updated even when the table is not associated with a
1464            layer as was previously assumed.
1465            (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
1466            UpdateStatusText responds to these events.
1467            (QueryTableFrame.OnSaveAs): Renamed to doExport.
1468            (QueryTableFrame.doExport): Helper function that saves the
1469            entire table, or selected rows, to a file.
1470            (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
1471            Respond to export button events and call doExport.
1472    
1473            * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
1474            the function doesn't return NULL without first setting a Python
1475            Error.
1476    
1477            * test/runtests.py (main): Only print "Unknown option" for
1478            unsupported options.
1479    
1480            * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
1481            optional epsilon argument to specify floating point accuracy.
1482            (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
1483            for each item test.
1484    
1485            * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
1486            tests for saving selected records.
1487    
1488            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
1489            tests for saving selected records.
1490    
1491            * test/test_map.py (TestMapWithContents.test_set_projection):
1492            MAP_PROJECTION_CHANGED events send the old projection.
1493    
1494            * test/test_session.py
1495            (TestSessionWithContent.test_forward_map_projection):
1496            MAP_PROJECTION_CHANGED events send the old projection.
1497    
1498            * test/test_table.py (TableTest): Update tests to use non-deprecated
1499            functions.
1500    
1501    2003-07-08  Bernhard Herzog  <[email protected]>
1502    
1503            * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
1504            constants in the column objects are the standard ones defined in
1505            the table module.
1506    
1507            * test/test_transientdb.py
1508            (TestTransientTable.test_transienttable_to_dbf): New. Test whether
1509            exporting transient tables as DBF works. This should catch the bug
1510            just fixed in TransientTableBase.Width.
1511    
1512    2003-07-08  Bernhard Herzog  <[email protected]>
1513    
1514            * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
1515            interpolated colors correctly.
1516    
1517            * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
1518            New. Test case for the fix in classgen.py
1519    
1520    2003-07-08  Bernhard Herzog  <[email protected]>
1521    
1522            * test/runtests.py (main): Make the default output less verbose
1523            and add a verbosity option (-v) to get the old output
1524    
1525    2003-07-08  Bernhard Herzog  <[email protected]>
1526    
1527            * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
1528            0.9.
1529    
1530            * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
1531            New. Return the join type
1532    
1533            * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
1534            DTD
1535            (SessionSaver.write_data_containers): Save the join type for
1536            joined tables
1537    
1538            * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
1539            namespace
1540            (SessionLoader.start_jointable): Handle the jointype attribute
1541    
1542            * test/test_load_0_8.py: New. Effectively a copy of test_load.py
1543            as of Thuban 0.8. These are now tests to determine whether Thuban
1544            can still read files generated by Thuban 0.8
1545    
1546            * test/test_load.py (LoadSessionTest.dtd)
1547            (TestSingleLayer.file_contents)
1548            (TestLayerVisibility.file_contents, TestLabels.file_contents)
1549            (TestLayerProjection.file_contents)
1550            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
1551            (TestJoinedTable.file_contents)
1552            (TestLoadError.file_contents): Update for new DTD
1553            (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
1554            for new join type attribute
1555    
1556            * test/test_save.py (SaveSessionTest.dtd)
1557            (SaveSessionTest.testEmptySession)
1558            (SaveSessionTest.testSingleLayer)
1559            (SaveSessionTest.testLayerProjection)
1560            (SaveSessionTest.testRasterLayer)
1561            (SaveSessionTest.testClassifiedLayer)
1562            (SaveSessionTest.test_dbf_table)
1563            (SaveSessionTest.test_joined_table): Update for new DTD
1564            (SaveSessionTest.test_joined_table): Add test for new join type
1565            attribute
1566    
1567    2003-07-04  Bernhard Herzog  <[email protected]>
1568    
1569            * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
1570            function for table_to_dbf
1571            (table_to_dbf): Deal with names longer than the 10 character limit
1572    
1573            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
1574            doc-string
1575            (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
1576            long column names
1577    
1578    2003-07-03  Bernhard Herzog  <[email protected]>
1579    
1580            * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
1581    
1582    2003-07-03  Bernhard Herzog  <[email protected]>
1583    
1584            * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
1585            for the Thuban manual and README with some basic information about
1586            the manual
1587    
1588    2003-07-03  Bernhard Herzog  <[email protected]>
1589    
1590            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
1591            Update doc-string
1592            (TransientJoinedTable.create): Do not modify the column objects of
1593            the input tables in place and copy all columns of the input tables
1594            into the joined table after all.
1595    
1596            * test/test_transientdb.py
1597            (TestTransientTable.test_transient_joined_table_same_column_name):
1598            Update to reflect the new behavior
1599            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
1600            Update to reflect the new behavior
1601            (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
1602            New test case for a bug which modified the column objects in place
1603    
1604    2003-07-02  Jonathan Coles   <[email protected]>
1605    
1606            * Thuban/Model/classgen.py (generate_singletons,
1607            generate_uniform_distribution, generate_quantiles,
1608            GenQuantiles0): Make sure maxValue isn't less than
1609            one, otherwise we could divide by zero.
1610    
1611            * test/test_classgen.py (ClassGenTest.doClassRangeTest,
1612            ClassGenTest.doClassSingleTest): Call doBoundsTest to
1613            check the end classification groups against the
1614            proper property values.
1615            (ClassGenTest.doBoundsTest): New. Checks the first and
1616            last classification groups to make sure their properties
1617            are the correct upper and lower bounds for a color ramp.
1618    
1619    2003-07-02  Jonathan Coles   <[email protected]>
1620    
1621            * Thuban/Model/classgen.py (generate_singletons,
1622            generate_uniform_distribution, generate_quantiles,
1623            GenQuantiles0): The denominator was one to high when
1624            calculating the index for the ramp causing the index
1625            to never to reach one.
1626    
1627    2003-07-02  Jonathan Coles   <[email protected]>
1628    
1629            Changed the singature of ClassGroupRange.__init__ and
1630            ClassGroupRange.SetRange() so that the min/max values are
1631            passed as a tuple. This makes a better calling scheme for
1632            when a Range object is passed instead.
1633    
1634            * Thuban/Model/classgen.py: Fixed parameters to
1635            ClassGroupRange constructor.
1636    
1637            * Thuban/Model/classification.py (ClassGroupRange.__init__):
1638            Consolidate the min/max parameters into a single _range which
1639            can either be a tuple or a Range object.
1640            (ClassGroupRange.SetRange): Consolidate the min/max parameters
1641            into a single _range which can either be a tuple or a Range object.
1642    
1643            * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
1644            call to ClassGroupRange constructor to use a tuple.
1645    
1646            * Thuban/Model/layer.py (Layer.SetClassification): Switch
1647            the classification instance variable to the new class
1648            before calling _set_layer otherwise subscribers to a
1649            LAYER_CHANGED event will not see any difference.
1650    
1651            * test/test_classification.py: Fix tests of ClassGroupRange
1652            so that they use the new signature.
1653    
1654            * test/test_load.py: Fix use of ClassGroupRange so that it
1655            uses the new signature.
1656    
1657            * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
1658            uses the new signature.
1659    
1660            * test/test_save.py: Fix use of ClassGroupRange so that it
1661            uses the new signature.
1662    
1663    
1664    2003-07-01  Jonathan Coles   <[email protected]>
1665    
1666            * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
1667            Import used objects/class from color.
1668            (generate_singletons): We don't
1669            need the numGroups parameter anymore because we are using
1670            the new ramps with GetProperties().
1671            (generate_uniform_distribution): Use new ramp method
1672            GetProperties().
1673            (generate_quantiles, GenQuantiles0): Use new ramp method
1674            GetProperties().
1675            (CustomRamp.SetNumGroups): Removed. The ramps now map
1676            a value from 0 to 1 to class properties so the number
1677            of groups is not needed ahead of time.
1678            (CustomRamp.next): Removed. CustomRamp does not support
1679            interation anymore.
1680            (CustomRamp.GetProperties): Returns a ClassGroupProperties
1681            object based on the index value from 0 to 1 that is
1682            passed to it.
1683            (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
1684            Made into instances of Monochromatic class instread of
1685            deriving from it.
1686            (HotToCold.SetNumGroups): Removed. See CustomRamp.
1687            (HotToCold.next): Removed. See CustomRamp.
1688    
1689            * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
1690            (Classification.SetField, Classification.SetFieldType):
1691            Replaced with SetFieldInfo.
1692            (Classification.SetFieldInfo): New. Does a better job of
1693            what SetField and SetFieldType used to do by combining
1694            their function since they should really always be done
1695            at the same time.
1696            (Classification.SetLayer): Renamed to _set_layer.
1697            (Classification._set_layer): Should only be called from
1698            Layer's SetClassification. This does not cause a recursive
1699            call as SetLayer did because we know that Layer knows about
1700            the classification.
1701    
1702            * Thuban/Model/color.py: Fixes RTbug #1971.
1703            (_Transparent): Renamed from Transparent so it doesn't
1704            conflict with the module variable.
1705            (Transparent, Black): Renamed from Color.Transparent,
1706            Color.Black so they are not class variables.
1707    
1708            * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
1709            (Layer.Destroy): We don't need to call SetClassification
1710            anymore to clear out the back reference in the classifcation
1711            to the layer. It's better to set it to None using _set_layer,
1712            and we won't be creating another clas object too.
1713            (Layer.SetClassification): Classification._set_layer is not
1714            recursive so remove all the locking variables. Also clean
1715            up the code so that it remains unchanged if something fails.
1716    
1717            * Thuban/Model/load.py: Fixes RTbug #1971.
1718            (SessionLoader.start_classification): Call
1719            Classification.SetFieldInfo().
1720    
1721            * Thuban/Model/save.py: Removed import of Color which wasn't
1722            being used.
1723    
1724            * Thuban/UI/classgen.py: Fixes RTbug #1972.
1725            (ClassGenDialog.__init__): Color ramps are now instances
1726            already so we don't need to create any new objects.
1727            (ClassGenDialog.OnOK): Check for numGroups is no longer
1728            necessary because we never use it.
1729    
1730            * Thuban/UI/classifier.py: Fixes RTbug #1971.
1731            (Classifier.__BuildClassification, Classifier.__SetGridTable):
1732            Call Classification.SetFieldInfo() instead of SetFieldType.
1733    
1734            * Thuban/UI/renderer.py: Fixes RTbug #1971.
1735    
1736            * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
1737            (MapCanvas.__init__): Subscribe to the idle time event. Set
1738            background color to white.
1739            (MapCanvas.OnPaint): Set a flag indicating that we should
1740            render the map during idle time. If we already have a bitmap
1741            just draw it now.
1742            (MapCanvas.OnIdle): New. Render the map only during idle time.
1743            This also fixes a problem with the busy cursor under gtk.
1744    
1745            * test/test_classgen.py (ClassGenTest.test_generate_singletons):
1746            Fix calls to generate_singletons because the signature changed.
1747    
1748            * test/test_classification.py: Fix color references and
1749            change calls to Classification.[SetField|SetFieldType] to
1750            SetFieldInfo.
1751    
1752            * test/test_load.py: Fix color references.
1753    
1754            * test/test_load_0_2.py: Fix color references.
1755    
1756            * test/test_save.py (SaveSessionTest.testClassifiedLayer):
1757            Change calls to Classification.[SetField|SetFieldType] to
1758            SetFieldInfo.
1759    
1760    2003-07-01  Frank Koormann   <[email protected]>
1761    
1762            MERGE from the greater-ms3 branch.
1763    
1764            * test/test_transientdb.py
1765            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
1766            New. Test join of two tables with partly equal column names.
1767    
1768            * Thuban/Model/transientdb.py (TransientJoinedTable.create):
1769            If duplicates in left and right tables column names are found,
1770            append '_' (underscores) to the name until it is unique.
1771            Create always new internal names for the resulting table and reference
1772            columns in the join statement with <table>.<column>
1773    
1774    2003-07-01  Bernhard Herzog  <[email protected]>
1775    
1776            * test/test_transientdb.py
1777            (TestTransientTable.test_transient_joined_table_same_column_name):
1778            New. Test whether joining on columns with the same names in both
1779            tables works.
1780            
1781            * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
1782            sure to use the right internal names even when joining on field
1783            with the same names in both tables. Also, detect duplicate names
1784            in the joined table correctly.
1785    
1786    2003-07-01  Frank Koormann   <[email protected]>
1787    
1788            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
1789            Reverse List of layers to render in same order as in desktop legend.
1790    
1791    2003-06-30  Jonathan Coles   <[email protected]>
1792    
1793            * Thuban/version.py (make_tuple): Takes a version string
1794            and splits it into a tuple of at most three integers.
1795            Used make_tuple() to make tuple versions of the version
1796            numbers.
1797    
1798            * Thuban/UI/about.py: Add Thuban email addresses.
1799    
1800    2003-06-30  Jonathan Coles   <[email protected]>
1801    
1802            * Thuban/version.py: SQLite/PySQLite version dependencies
1803            were too high.
1804    
1805    2003-06-30  Jonathan Coles   <[email protected]>
1806    
1807            * Thuban/version.py: Update version to 0.8.1
1808            
1809            * MANIFEST.in: Added Projections so that default.proj is
1810            included.
1811    
1812    2003-06-26  Jonathan Coles   <[email protected]>
1813    
1814            New About box with lots more information including library
1815            versions and credits. More/better version checking before
1816            Thuban starts.
1817    
1818            * Thuban/UI/about.py: New. New About box that displays
1819            library version information and credits.
1820    
1821            * Thuban/version.py: Added new 'versions' dictionary which
1822            contains the verions of various libraries which are checked
1823            when the module loads.
1824            (verify_versions): Check all version numbers and returns
1825            a list of errors.
1826    
1827            * Thuban/UI/classifier.py (Classifier.__EnableButtons):
1828            Reset the status of the buttons as the situation warrants,
1829            but in a better more reliable way by not relying on the
1830            current status to determine what needs to change.
1831    
1832            * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
1833            (verify_versions): Remove most of the code since it is
1834            now in Thuban.version.verify_versions.o
1835    
1836            * Thuban/UI/mainwindow.py (MainWindow.About): Call new
1837            About box in Thuban.UI.about.
1838    
1839            * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
1840            Returns the version of gdal library being used as a string.
1841    
1842            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
1843            Removed.
1844            (get_proj_version): Return the version of PROJ that the file
1845            was compiled with.
1846            (get_gtk_version): Return th version of GTK that the file
1847            was compiled with.
1848    
1849    2003-06-25  Jonathan Coles   <[email protected]>
1850    
1851            * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
1852            of the SelectPropertiesDialog should be self so the window
1853            appears on top.
1854            (ClassGroupPropertiesCtrl.DoEdit): The parent
1855            of the SelectPropertiesDialog should be self so the window
1856            appears on top.
1857    
1858            * Thuban/UI/resource.py: Cleaned up how we determine file
1859            extensions.
1860            (GetImageResource): Return an wxImage from our Resources.
1861    
1862    2003-06-24  Jonathan Coles   <[email protected]>
1863    
1864            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
1865            Check that a layer has a classification before trying
1866            to get it. Raster layers don't have classifications.
1867    
1868    2003-06-23  Jonathan Coles   <[email protected]>
1869            
1870            * setup.py: Add Resources/XML to resource list.
1871        
1872    2003-06-23  Jonathan Coles   <[email protected]>
1873    
1874            * setup.cfg: Fix copyright dates
1875        
1876    2003-06-23  Jonathan Coles   <[email protected]>
1877    
1878            * MANIFEST.in: Update with Resources/XML
1879    
1880            * setup.py: Don't include Locale resources yet as we don't
1881            have any and it causes problems building the distribution
1882            for Windows. Update version to 0.8.0.
1883    
1884            * Doc/thuban.dtd: Removed since it is now in Resources/XML.
1885    
1886            * Thuban/UI/mainwindow.py: Add blank line at the end because
1887            file was not being read correctly building the Windows
1888            distribution.
1889    
1890    2003-06-23  Jonathan Coles   <[email protected]>
1891    
1892            * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
1893    
1894            * Thuban/version.py: Temporarily update longversion for
1895            the 0.8 release so that it doesn't have the cvs revision.
1896    
1897    2003-06-23  Jonathan Coles   <[email protected]>
1898    
1899            * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
1900            to make sure that we don't create reentrant possibilities with
1901            wxYield.
1902    
1903            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
1904            directly to avoid the wxSafeYield() call which generates an
1905            OnPaint event causing infinite recursion. Don't try to catch
1906            exception anymore. This was for before there were limits on map
1907            scaling.
1908    
1909    2003-06-23  Bernhard Herzog  <[email protected]>
1910    
1911            Bug fix for RT #1961:
1912    
1913            * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
1914            Register DerivedShapestores with the session
1915    
1916            * Thuban/Model/session.py (Session.Tables): Make sure each table
1917            is only listed once.
1918    
1919            * test/test_load.py (TestJoinedTable.test): Add check_format call.
1920            Update file contents to match the one written out.
1921    
1922    2003-06-20  Bernhard Herzog  <[email protected]>
1923    
1924            * test/xmlsupport.py (SaxEventLister.startElementNS)
1925            (SaxEventLister.endElementNS): Do not include the qname. Python
1926            2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
1927            is (presumably incorrectly) None, whereas it's a string with the
1928            element name in the later versions.
1929    
1930            * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
1931            (TestEventList.test_even_list_namespace): Update tests to reflect
1932            the new behaviour
1933            (TestEventList.test_even_list_id_normalization): Fix doc-string
1934    
1935    2003-06-20  Jonathan Coles   <[email protected]>
1936    
1937            * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
1938            by deriving classes to determine if that layer supports shapes.
1939            (Layer): Override HasShapes and return true.
1940    
1941            * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
1942            instead of a direct call to wx[Begin|End]CusyCursor().
1943            (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
1944            table data.
1945    
1946            * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
1947            New. Wrappers around the wxWindows functions that allow us to
1948            make additional calls such as wxYield which gives the native
1949            system a chance to update the cursor correctly.
1950    
1951            * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
1952            instead of a direct call to wx[Begin|End]CusyCursor().
1953    
1954            * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
1955            instead of a direct call to wx[Begin|End]CusyCursor().
1956            (MapCanvas.find_shape_at): Check if the current search layer
1957            support shapes, otherwise go on to the next layer.
1958    
1959            * test/test_layer.py: Add tests in each type of layer for
1960            HasClassification() and HasShapes()
1961    
1962    2003-06-20  Jonathan Coles   <[email protected]>
1963    
1964            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
1965            turning on the busy cursor to allow the system to change the
1966            cursor before we begin painting. This fixes a problem that
1967            was occuring only under GTK. Fixes RTbug #1840.
1968    
1969    2003-06-20  Bernhard Herzog  <[email protected]>
1970    
1971            * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
1972            version.
1973    
1974            * Thuban/Model/save.py (sort_data_stores): New. Make topological
1975            sort of the data sources so they can be written with sources that
1976            data sources that depend on other data sources come after the
1977            sources they depend on.
1978            (SessionSaver.__init__): Add idmap instance variable to map from
1979            objects to the ids used in the file.
1980            (SessionSaver.get_id, SessionSaver.define_id)
1981            (SessionSaver.has_id): New. Methods to manage the idmap
1982            (SessionSaver.write): Use thuban-0.8.dtd
1983            (SessionSaver.write_session): Add a namespace on the session and
1984            write out the data sources before the maps.
1985            (SessionSaver.write_data_containers): New. Write the data
1986            containers.
1987            (SessionSaver.write_layer): Layer elements now refer to a
1988            shapestore and don't contain filenames anymore.
1989    
1990            * Thuban/Model/load.py (LoadError): Exception class to raise when
1991            errors in the files are discovered
1992            (SessionLoader.__init__): Define dispatchers for elements with a
1993            thuban-0.8 namespace too.
1994            (SessionLoader.check_attrs): New helper method to check and
1995            convert attributes
1996            (AttrDesc): New. Helper class for SessionLoader.check_attrs
1997            (SessionLoader.start_fileshapesource)
1998            (SessionLoader.start_derivedshapesource)
1999            (SessionLoader.start_filetable, SessionLoader.start_jointable):
2000            Handlers for the new elements in the new fileformat
2001            (SessionLoader.start_layer): Handle the shapestore attribute in
2002            addition to filename.
2003            (SessionLoader.start_table, SessionLoader.end_table): Removed.
2004            They were never used in the old formats and aren't needed for the
2005            new.
2006    
2007            * Thuban/Model/session.py (Session.DataContainers): New method to
2008            return all "data containers", i.e. shapestores and tables
2009    
2010            * test/xmlsupport.py (SaxEventLister.__init__)
2011            (SaxEventLister.startElementNS, sax_eventlist): Add support to
2012            normalize IDs.
2013    
2014            * test/test_xmlsupport.py
2015            (TestEventList.test_even_list_id_normalization): New test case for
2016            id normalization
2017    
2018            * test/test_load.py (LoadSessionTest.check_format): Use ID
2019            normalization
2020            (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
2021            class atrributes used for ID normalization
2022            (TestSingleLayer, TestLayerVisibility, TestLabels.test)
2023            (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
2024            file format
2025            (TestJoinedTable): New test for loading sessions with joined
2026            tables.
2027            (TestLoadError): New. Test whether missing required attributes
2028            cause a LoadError.
2029    
2030            * test/test_save.py (SaveSessionTest.thubanids)
2031            (SaveSessionTest.thubanidrefs): New class attributes for ID
2032            normalization in .thuban files.
2033            (SaveSessionTest.compare_xml): Use id-normalization.
2034            (SaveSessionTest.testEmptySession)
2035            (SaveSessionTest.testLayerProjection)
2036            (SaveSessionTest.testRasterLayer)
2037            (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
2038            (SaveSessionTest.testLayerProjection): The filename used was the
2039            same as for testSingleLayer. Use a different one.
2040            (SaveSessionTest.test_dbf_table)
2041            (SaveSessionTest.test_joined_table): New test cases for saving the
2042            new data sources structures.
2043            (TestStoreSort, MockDataStore): Classes to test the sorting of the
2044            data stores for writing.
2045    
2046            * test/runtests.py: Add CVS keywords
2047    
2048    2003-06-20  Jonathan Coles   <[email protected]>
2049    
2050            * test/test_session.py
2051            (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
2052            Use the cultural_landmark-point.dbf file for the store so that
2053            the table rows and shape count match.
2054    
2055    2003-06-20  Jonathan Coles   <[email protected]>
2056    
2057            * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
2058            an exception if the number of shapes is different from the
2059            number of rows in the table. Address RTbug #1933.
2060    
2061            * test/test_layer.py (TestLayer.test_derived_store): Add
2062            a test for the new exception in DerivedShapeStore.__init__.
2063    
2064            * test/support.py (FloatTestCase): Removed since there is
2065            already FloatComparisonMixin. Fixes RTbug #1954.
2066            (FloatComparisonMixin.assertFloatEqual): Include test for
2067            infinity that was part of FloatTestCase.
2068    
2069            * test/test_range.py (RangeTest): Inherit from
2070            support.FloatComparisonMixin now that we don't have
2071            support.FloatTestCase.
2072    
2073    2003-06-20  Bernhard Herzog  <[email protected]>
2074    
2075            * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
2076            the implementation in xmlsupport instead.
2077            (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
2078    
2079            * test/test_proj.py: Import sax_eventlist from xmlsupport instead
2080            of test_save
2081    
2082    2003-06-20  Bernhard Herzog  <[email protected]>
2083    
2084            * test/test_load.py (LoadSessionTest.check_format): New helper
2085            method to make sure the test files we load might have been written
2086            by the current thuban version.
2087            (ClassificationTest.TestLayers, TestSingleLayer.test)
2088            (TestLayerVisibility.test, TestClassification.test)
2089            (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
2090            Add check_format() calls and fix the thuban data to match the data
2091            that would be written by saving the session loaded from it.
2092    
2093            * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
2094            the same class and function in test_save.
2095    
2096            * test/test_xmlsupport.py (TestEventList): New. test cases for
2097            sax_eventlist
2098    
2099    2003-06-20  Bernhard Herzog  <[email protected]>
2100    
2101            * Resources/XML/thuban.dtd: Add comment about which versions of
2102            Thuban are covered by this DTD
2103            (map): Fix content model for layers and raster layers. There can
2104            be any number or layers and raster layers in any order.
2105    
2106    2003-06-20  Jonathan Coles   <[email protected]>
2107    
2108            This is mainly about fixing RTbug #1949.
2109    
2110            * Thuban/Model/classification.py: Remove "from __future__"
2111            import statement since python 2.2 is the earliest supported
2112            version.
2113    
2114            * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
2115            Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
2116            depending on the units this projection *forwards* into.
2117    
2118            * Thuban/Model/save.py (SessionSaver.write_classification):
2119            Remove unnecessary use of lambdas and nested functions.
2120    
2121            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
2122            adjustment here if the map projection uses degrees.
2123    
2124            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
2125            scale adjust code since it is now done before calling
2126            this method. Don't do anything if the map projection
2127            is None.
2128    
2129    2003-06-19  Bernhard Herzog  <[email protected]>
2130    
2131            Move version specific load tests to their own file.
2132    
2133            * test/test_load.py: Expand the doc-string to explain a bit how to
2134            handle file format changes.
2135            (TestClassification.test): Update the docstring as this test is
2136            not about Thuban 0.2 anymore.
2137    
2138            * test/test_load_0_2.py: New file with the load tests for thuban
2139            files created with Thuban 0.2 and earlier.
2140    
2141    2003-06-19  Bernhard Herzog  <[email protected]>
2142    
2143            Add XML validation to some of the tests. Validation will only be
2144            done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
2145            To make the DTD available to the test cases it's moved into
2146            Resources/XML
2147    
2148            * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
2149            for versions up to and including 0.2. Two slight changes: added an
2150            encoding specification and fixed the comment which refered to
2151            GRASS, not Thuban
2152    
2153            * test/xmlsupport.py: New support module for tests involving XML.
2154            Currently there's a mix-in class for XML validation.
2155    
2156            * test/test_xmlsupport.py: New. Tests for the xmlsupport module
2157    
2158            * test/test_save.py (SaveSessionTest): Derive from ValidationTest
2159            so that we can validate the
2160            (SaveSessionTest.testEmptySession)
2161            (SaveSessionTest.testSingleLayer)
2162            (SaveSessionTest.testSingleLayer)
2163            (SaveSessionTest.testLayerProjection)
2164            (SaveSessionTest.testRasterLayer)
2165            (SaveSessionTest.testClassifiedLayer): Validate the generated XML
2166    
2167            * test/runtests.py (main): Call print_additional_summary instead
2168            of print_garbage_information
2169    
2170            * test/support.py (resource_dir): New function to return the
2171            "Resource" subdirectory
2172            (print_additional_summary): New function to combine several
2173            summary functions
2174            (run_tests): Use print_additional_summary instead of calling
2175            print_garbage_information directly
2176    
2177    2003-06-19  Bernhard Herzog  <[email protected]>
2178    
2179            * Doc/thuban.dtd (classification): Correct the content model of
2180            the classification element.
2181            (projection): Add the "name" attribute
2182    
2183    2003-06-19  Frank Koormann   <[email protected]>
2184    
2185            MERGE from the greater-ms3 branch.
2186    
2187            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
2188            scale if projection is latlong to get better estimate.
2189    
2190            Fix problem of hidden properties dialog under windows after double
2191            click on layer tree:
2192            The tree control always gets an Expanded / Collapsed event after
2193            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
2194            raises the already displayed window.
2195    
2196            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
2197            raiseProperties initialized to prevent endless loops
2198            (LegendTree._OnItemActivated): Depending on self.raiseProperties
2199            simply raise the properties or open the dialog and issue a second
2200            event.
2201    
2202    2003-06-18  Jonathan Coles   <[email protected]>
2203    
2204            * setup.py: Fix a few problems that occured under Windows.
2205    
2206    2003-06-18  Jonathan Coles   <[email protected]>
2207    
2208            When Thuban loaded the map was redrawn twice because the
2209            legend was being opened after the mainwindow was created
2210            and not during its creation. This meant the map was drawn
2211            initially and then had to be redrawn when the legend
2212            caused the display to change. Now the legend is opened
2213            in the mainwindow constructor which resolves this issue.
2214    
2215            Also, although we were checking for the existence of
2216            gdal and gdalwarp modules, the gdalwarp extension was
2217            still being compiled (which may fail if the system doesn't
2218            have gdal installed). the build_ext command to setup.py
2219            now accepts the flags --with-gdal and --without-gdal.
2220            If --without-gdal is specified setup.py will try to
2221            use the gdal parameters specified by gdal-config. Under
2222            windows, those parameters have to be set in setup.py
2223            as with proj4 an wxWindows.
2224    
2225            * setup.py: Use a list instead of seperate variables for
2226            extension parameters so we can create a generic function
2227            that runs an appropriate *-config script.
2228            (run_cs_script): Renamed from run_wx_script and modified
2229            to accept a second argument which is a list of lists to
2230            be filled in by the values returned from running the command.
2231            (thuban_build_ext): New. Extends the build_ext command and
2232            provides the options --with-gdal/--without-gdal which then
2233            optionally includes the gdalwarp extension.
2234    
2235            * Thuban/Model/resource.py: First check if we can import
2236            the gdalwarp Thuban extension before checking for gdal.
2237            Also added some comments.
2238            
2239            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
2240            the map is None which may be the case if none has been loaded
2241            yet.
2242    
2243            * Thuban/UI/main.py (main): Remove call to ShowLegend.
2244    
2245            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
2246    
2247            * Thuban/UI/renderer.py: Check for gdal support before importing
2248            gdalwarp.
2249            (MapRenderer.render_map): Only try to optimize if we have gdal
2250            support otherwise nothing will get drawn.
2251    
2252            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
2253            during startup before a map has been created. Check if map is None
2254            before using it and do nothing if it is.
2255    
2256    2003-06-17  Jonathan Coles   <[email protected]>
2257    
2258            Fix the problem with raster layers under Windows that caused
2259            Thuban to crash. The view should respond to layer projection
2260            changed events to update the display. Changes to a projection
2261            should not cause the map to be set to full extent.
2262            
2263            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
2264            current_map_proj to remember the current map projection so that
2265            when the projection changes we know what the previous projection
2266            was.
2267            (MapCanvas.SetMap): Unsubscribe and subscribe to
2268            LAYER_PROJECTION_CHANGED events.
2269            (MapCanvas.projection_changed): Split into two methods that respond
2270            to map and layer projection changes.
2271            (MapCanvas.map_projection_changed): New. Takes the current view and
2272            projects it using the new projection. This does not cause the
2273            map to be redrawn at full extent.
2274            (MapCanvas.layer_projection_changed): New. Cause a redraw which
2275            will draw each layer in its new projection.
2276            
2277            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
2278            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
2279            under Windows.
2280            
2281            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
2282            to twice sizeof(void*) because there are two digits for each
2283            hex byte.
2284    
2285    2003-06-16  Bernhard Herzog  <[email protected]>
2286    
2287            Update to the layer interface: Direct access to the table,
2288            shapetable, shapefile and filename attributes is now actively
2289            deprecated by issuing deprecation warnings for all places where
2290            this happens.
2291    
2292            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
2293            to the instance variables table, shapetable, shapefile and
2294            filename via __getattr__ so that we can issue a deprecation
2295            warning.
2296            (Layer.SetShapeStore): Don't set the deprecated instance variables
2297            any more
2298            (Layer.SetShapeStore): Don't use deprecated layer instance
2299            variables
2300            (Layer.Destroy): No need to explicitly remove the instance
2301            variables any more
2302            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
2303            instance variables
2304    
2305            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
2306            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
2307            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
2308            use deprecated layer instance variables
2309    
2310            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
2311            deprecated layer instance variables
2312    
2313            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
2314            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
2315            instance variables
2316    
2317            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
2318            deprecated layer instance variables
2319    
2320            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
2321            deprecated layer instance variables
2322    
2323            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
2324            deprecated layer instance variables
2325    
2326            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
2327            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
2328            variables
2329    
2330            * test/runtests.py (main): Turn Thuban's deprecation warnings into
2331            errors so that they're cought by the tests
2332    
2333            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
2334            layer instance variables
2335    
2336    2003-06-16  Jonathan Coles   <[email protected]>
2337    
2338            Fix a problem under Windows whereby if the user double-clicks on a
2339            layer in the legend that tree item will expand or collapse as well
2340            as open the layer properties dialog. The state of the tree item
2341            should not be affected.
2342    
2343            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
2344            preventExpandCollapse and subscribe to expanding and collapsing
2345            events.
2346            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
2347            collapsing events and will veto the event if it has been triggered
2348            by the user double clicking on a layer.
2349            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
2350            that an expanding/collapsing event should be vetoed.
2351    
2352    2003-06-13  Bernhard Herzog  <[email protected]>
2353    
2354            * Thuban/UI/classifier.py (Classifier.OnClose)
2355            (Classifier.map_layers_removed)
2356            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
2357            in OnClose and not in map_layers_removed or
2358            layer_shapestore_replaced to make sure it always happens when the
2359            dialog is closed
2360    
2361    2003-06-13  Jonathan Coles   <[email protected]>
2362    
2363            This puts back a fix for Windows where a panel is needed so that
2364            the background of the table view appears correctly.
2365    
2366            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
2367            object that can be used by derived classes to place any
2368            controls (including the grid) onto.
2369            (QueryTableFrame.__init__): Use the panel as the parent window
2370            for all the controls. Reparent the grid so that the panel is
2371            the parent. Call UpdateStatusText() to correctly initialize
2372            the status bar.
2373    
2374    2003-06-13  Jonathan Coles   <[email protected]>
2375    
2376            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
2377            from wxFrame (as opposed to wxDialog like the other classes)
2378            but otherwise behaves like the other classes. This is needed
2379            for the TableView which isn't really a dialog and needs to
2380            have a status bar and control buttons.
2381    
2382            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
2383            instance variable to keep track of how many rows are selected.
2384            Subscribe once to the the events we are interested in.
2385            (ThubanGrid.OnRangeSelect): Only handle event if event handling
2386            hasn't been turned off.
2387            (ThubanGrid.OnSelectCell): Only handle event if event handling
2388            hasn't been turned off.
2389            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
2390            as an event listener (which changes the event handler stack)
2391            simply set an instance variable to False. This is checked in
2392            the event handlers.
2393            (ThubanGrid.GetNumberSelected): Return the number of currently
2394            selected rows.
2395            (TableFrame): Inherit from ThubanFrame so we can have a
2396            status bar and control buttons.
2397            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
2398            Explicitly set which items are selected in the operator choice and
2399            action choice so there is always a valid selection. Fixes RTbug #1941.
2400            Subscribe to grid cell selection events so we can update the
2401            status bar.
2402            (QueryTableFrame.UpdateStatusText): Update the status bar with
2403            how many rows are in the grid, how many columns, and how many
2404            rows are selected.
2405            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
2406            Call UpdateStatusText when cells are (de)selected.
2407            (QueryTableFrame.OnQuery): Use the string value in the value
2408            combo if either the selected item index is 0 or if the string
2409            cannot be found in the predefined list (this happens if the
2410            user changes the text). Fixes RTbug #1940.
2411            Only turn off the grid event listeners if there a query comes
2412            back with a none empty list of ids. in the case that the list
2413            is empty this causes a grid.ClearSelection() call to actually
2414            clear the grid selection which causes the selected items in
2415            the map to be deselected. Fixes RTbug #1939.
2416    
2417            * test/test_save.py (XMLWriterTest.Encode): Check return values.
2418            Fixes RTbug #1851.
2419    
2420    2003-06-13  Bernhard Herzog  <[email protected]>
2421    
2422            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
2423            self.selected_shape with the current selection to make sure the
2424            contents of the dialog are up to date when it's shown for the
2425            first time.
2426            The dialog used to work without this by luck. The recent fix to
2427            the connector module 'broke' a 'feature' the identify view was
2428            relying on, i.e that subscribing to a message in response to
2429            receiving a message of that type would mean that the new
2430            subscriber would also be called for the same message.
2431            
2432    2003-06-12  Jonathan Coles   <[email protected]>
2433    
2434            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
2435            the image is rendered. Fixes RTbug #1937.
2436    
2437    2003-06-12  Jonathan Coles   <[email protected]>
2438    
2439            * Thuban/Lib/fileutil.py: As is done under Windows, create the
2440            user directory if it doesn't exist on a posix system.
2441            Fixes RTbug #1815.
2442    
2443            * Thuban/Model/resource.py (get_user_proj_files): Moved the
2444            called to get_application_dir here, so that the directory
2445            will only be called if this method is invoked.
2446    
2447            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
2448            the projfilepath if no projection is selected.
2449    
2450    2003-06-12  Jonathan Coles   <[email protected]>
2451    
2452            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
2453            the scalebar if the current map has no projection set.
2454    
2455            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
2456            projfilepath label to just the basename of the projection file
2457            rather than include the entire path.
2458    
2459            * Thuban/Model/resource.py: Fix missed proj functions that
2460            needed to be renamed.
2461    
2462    2003-06-12  Jonathan Coles   <[email protected]>
2463    
2464            * Thuban/Model/classification.py: Removed assert statements that
2465            tested if the variable was an instance of Color.
2466    
2467            * Thuban/Model/color.py (Color): Remove commented code that isn't
2468            used.
2469            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
2470            Fixes RTbug #1835.
2471            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
2472            Needed now that the class doesn't inherit from Color.
2473    
2474    2003-06-12  Jonathan Coles   <[email protected]>
2475    
2476            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
2477            check unicode strings.
2478    
2479            * test/test_layer.py: Check for existence of gdal.
2480    
2481    2003-06-12  Jonathan Coles   <[email protected]>
2482        
2483            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
2484            that was in load.py
2485    
2486            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
2487            that was in save.py
2488    
2489    2003-06-12  Jonathan Coles   <[email protected]>
2490    
2491            This is largely a collection of bug fixes. We also handle the
2492            case where gdal is not on the system. The XMLReader and XMLWriter
2493            classes were moved into there own files to resolve some circular
2494            import references and because they shouldn't really be in the
2495            file that is dediciated to reading/writing session files since
2496            they are also used elsewhere.
2497    
2498            * Thuban/Model/classgen.py: Renamed functions to follow the
2499            function_names_with_underscores style. Fixes RTbug #1903.
2500            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
2501    
2502            * Thuban/Model/layer.py: Import gdal only if it available.
2503            (RasterLayer): Handle the case where the gdal library is unavailable.
2504            Addresses RTbug #1877.
2505    
2506            * Thuban/Model/load.py (XMLReader): Moved into seperate file
2507            xmlreader.py.
2508    
2509    2003-06-12  Jonathan Coles   <[email protected]>
2510    
2511            This is largely a collection of bug fixes. We also handle the
2512            case where gdal is not on the system. The XMLReader and XMLWriter
2513            classes were moved into there own files to resolve some circular
2514            import references and because they shouldn't really be in the
2515            file that is dediciated to reading/writing session files since
2516            they are also used elsewhere.
2517    
2518            * Thuban/Model/classgen.py: Renamed functions to follow the
2519            function_names_with_underscores style. Fixes RTbug #1903.
2520            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
2521    
2522            * Thuban/Model/layer.py: Import gdal only if it available.
2523            (RasterLayer): Handle the case where the gdal library is unavailable.
2524            Addresses RTbug #1877.
2525    
2526            * Thuban/Model/load.py (XMLReader): Moved into seperate file
2527            xmlreader.py.
2528    
2529            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
2530            file xmlwriter.py.
2531    
2532            * Thuban/Model/resource.py: Renamed functions to following the
2533            function_names_with_underscores style.
2534            (has_gdal_support): New function that returns true if the gdal
2535            library is available. Addresses RTbug #1877.
2536    
2537            * Thuban/UI/application.py (ThubanApplication.OpenSession):
2538            Display a message box if the gdal library is not available, but
2539            only if there are any layers that would use it. Addresses RTbug #1877.
2540    
2541            * Thuban/UI/classgen.py: Use renamed projection resource functions.
2542            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
2543            when using integers versus floats.
2544    
2545            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
2546            determine if the "Add Image Layer" menu option should be
2547            greyed out or not. Addresses RTbug #1877.
2548    
2549            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
2550    
2551            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
2552            optimize if a raster layer is visible. Fixes RTbug #1931.
2553            Only draw the raster layer if the gdal library is available.
2554            Addresses RTbug #1877.
2555    
2556            * test/test_classgen.py: Add tests for generate_singletons,
2557            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
2558            (test_calculate_quantiles): Fix some tests to catch the new
2559            ValueError that is raised.
2560    
2561            * test/test_proj.py: Use renamed projection resource functions.
2562    
2563            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
2564            test for saving classified layers. Fixes RTbug #1902.
2565            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
2566    
2567    2003-06-12  Jan-Oliver Wagner <[email protected]>
2568    
2569            Fix for http://intevation.de/rt/webrt?serial_num=1900.
2570    
2571            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
2572    
2573            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
2574            multiplechoicedialog.py rather than from the wxPython library.
2575    
2576    2003-06-11  Frank Koormann  <[email protected]>
2577    
2578            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
2579            update.
2580    
2581    2003-06-11  Frank Koormann  <[email protected]>
2582    
2583            * Thuban/Lib/fileutil.py (get_application_dir): New function to
2584            determine the absolute .thuban/thuban directory under
2585            "posix" (os.expanduser) and "nt" (read AppData registry key).
2586    
2587            * Thuban/Model/resource.py: Use get_application_dir
2588    
2589            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
2590            Use get_application_dir.
2591    
2592    2003-06-10  Bernhard Herzog  <[email protected]>
2593    
2594            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
2595            the messages MAP_LAYERS_REMOVED messages
2596            (LayerTableFrame.OnClose): Unsubscribe from it.
2597            (LayerTableFrame.map_layers_removed): New. Receiver for
2598            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
2599            dialog is showing is removed.
2600    
2601    2003-06-10  Bernhard Herzog  <[email protected]>
2602    
2603            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
2604            of the receivers list so that unsubscribing in a receiver doesn't
2605            modify it while iterating over it.
2606    
2607            * test/test_connector.py
2608            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
2609            unsubscribing in a receiver works correctly. See docstring for
2610            details
2611    
2612    2003-06-10  Bernhard Herzog  <[email protected]>
2613    
2614            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
2615            message.
2616    
2617            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
2618            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
2619            LAYER_CHANGED will still be sent if the classification changes.
2620    
2621            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
2622            parameter so we can subscribe to some of its messages
2623            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
2624            and the layer's LAYER_SHAPESTORE_REPLACED
2625            (Classifier.unsubscribe_messages): New. Unsubscribe from message
2626            subscribed to in __init__
2627            (Classifier.map_layers_removed)
2628            (Classifier.layer_shapestore_replaced): receivers for the messages
2629            subscribed to in __init__. Unsubscribe and close the dialog
2630    
2631            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
2632            the map to the Classifier dialog
2633    
2634            * test/test_layer.py (SetShapeStoreTests): Derive from
2635            SubscriberMixin as well so we can test messages
2636            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
2637            messages
2638            (SetShapeStoreTests.tearDown): Clear the messages again
2639            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
2640            for the modified flag too
2641            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
2642            to check whether SetShapeStore sets the modified flag
2643            (SetShapeStoreTests.test_set_shape_store_different_field_name)
2644            (SetShapeStoreTests.test_set_shape_store_same_field)
2645            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
2646            Add tests for the messages. This checks both the new
2647            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
2648    
2649    2003-06-06  Jan-Oliver Wagner <[email protected]>
2650    
2651            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
2652            the menu items.
2653    
2654    2003-06-05  Frank Koormann  <[email protected]>
2655    
2656            * Thuban/UI/identifyview.py (IdentifyView.__init__):
2657            Layout reimplemented without panel. Make life easier to fit the list
2658            in the dialog.
2659    
2660    2003-06-05  Frank Koormann  <[email protected]>
2661    
2662            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
2663            once on initialisation (Former implementation resulted in multiple
2664            entries for each projection).
2665            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
2666            if set, select the projection found under the specified name. This
2667            overwrites any other selection estimate.
2668            Removed projchoice filling from this method.
2669            (ProjFrame._OnSave, ProjFrame._OnAddToList):
2670            Updated call of ProjFrame.__FillAvailList
2671            (LCCPanel._DoLayout): Moved parameter controls in more common order.
2672    
2673            * Resources/Projections/defaults.proj: Extended defaults representing
2674            various common European projections.
2675    
2676    2003-06-05  Frank Koormann  <[email protected]>
2677    
2678            * Thuban/UI/identifyview.py (IdentifyView.__init__):
2679            Use ListCtrl instead of GridCtrl
2680    
2681            * Thuban/Model/resource.py:
2682            Guess location of .thuban directory from tempdir parent directory.
2683    
2684            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
2685            Guess location of .thuban directory from tempdir parent directory.
2686    
2687    2003-06-04  Bernhard Herzog  <[email protected]>
2688    
2689            Do not cache the values returned by the tree widget's
2690            GetFirstChild and GetNextChild methods because it led to lots of
2691            segfaults. The new way requires more brute force but is more
2692            reliable.
2693    
2694            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
2695            variable layer2id
2696            (LegendTree.find_layer): New method to do with brute force what
2697            layer2id tried to accomplish
2698            (LegendTree._OnMsgLayerChanged)
2699            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
2700            Use find_layer instead of layer2id
2701            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
2702            update layer2id anymore
2703            (LegendTree._OnMsgMapLayersRemoved)
2704            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
2705    
2706    2003-06-03  Thomas Koester  <[email protected]>
2707    
2708            * Thuban/Model/classgen.py (GenQuantiles0): New function.
2709    
2710    2003-06-02  Bernhard Herzog  <[email protected]>
2711    
2712            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
2713            New commands.
2714            (main_menu): Add the new commands.
2715            (MainWindow.TableRename): New. Implementation of the table_rename
2716            command.
2717            (MainWindow.RenameLayer): New. Implementation of the layer_rename
2718            command.
2719    
2720            * Thuban/Model/session.py (Session.AddTable): call self.changed to
2721            set the modified flag
2722    
2723            * test/test_session.py (TestSessionSimple.test_add_table): Test
2724            whether the modified flag is set properly
2725    
2726            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
2727            instead of issue so that the modified flags get updated.
2728    
2729            * test/test_base.py (SomeTitledObject): Derive from Modifiable
2730            instead of Publisher to reflect reality better and to accomodate
2731            the fact that SetTitle now calls changed instead of issue
2732    
2733    2003-06-02  Bernhard Herzog  <[email protected]>
2734    
2735            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
2736            acquisition has to happen before the try in a try-finally.
2737    
2738    2003-06-02  Bernhard Herzog  <[email protected]>
2739    
2740            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
2741            possible that a layer is removed that is not currently selected in
2742            the legend so don't check for this.
2743    
2744    2003-05-30  Bernhard Herzog  <[email protected]>
2745    
2746            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
2747            variables to None that have direct or indirect references to
2748            shapefiles or dbf files to make sure that they do go away and the
2749            files are closed.
2750    
2751    2003-05-30  Bernhard Herzog  <[email protected]>
2752    
2753            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
2754            availImgListIndices when a new image list is created
2755            
2756    2003-05-30  Bernhard Herzog  <[email protected]>
2757    
2758            * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
2759            changing_selection to indicate whether the LegendTree code itself
2760            is currently changing the selection
2761            (LegendTree.normalize_selection): New method to normalize the
2762            selection by selecting the layer item even if the user clicked on
2763            the classification.
2764            (LegendTree._OnSelChanged): normalize the selection. This works
2765            around a bug in wx which doesn't keep track of the selection
2766            properly when subtrees are deleted.
2767    
2768    2003-05-30  Bernhard Herzog  <[email protected]>
2769    
2770            * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
2771            maximum and minimum scale factors.
2772    
2773            * test/test_classgen.py (ClassGenTest.test): Update to reflect the
2774            changes in classgen.py
2775    
2776    2003-05-30  Jonathan Coles   <[email protected]>
2777    
2778            * Thuban/Model/classgen.py: Remove ClassGenerator class but make
2779            all the methods functions. Fixes RTBug #1903.
2780    
2781            * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
2782            to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
2783            RTBug #1907.
2784    
2785            * Thuban/UI/classgen.py: Use classgen functions that were part
2786            of the ClassGenerator class. Put try/finally blocks around
2787            code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
2788            RTBug #1904.
2789    
2790            * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
2791    
2792            * Thuban/UI/legend.py: The legend was cleared and repopulated any
2793            time something changed which caused some state to be lost such
2794            as which children were expanded or collapsed. Fixes RTBug #1901.
2795            (LegendTree._OnMsgMapLayersAdded): Add only new layers.
2796            (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
2797            the legend but not in the map.
2798            (LegendTree.__FillTree): Move main functionality out into smaller
2799            methods that can be used by other methods.
2800            (LegendTree.__FillTreeLayer): Reuse old slots in the image list
2801            if they are available.
2802            (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
2803            that we override the wxTreeCtrl method. Iterate over children
2804            and call __RemoveLayer.
2805            (LegendTree.__AddLayer): New. Add a new layer to the legend.
2806            (LegendTree.__RemoveLayer): Remove a layer from the legend.
2807            (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
2808            Should only be called with the id of a layer branch.
2809            (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
2810            Returns the root item or creates one if necessary.
2811    
2812            * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
2813            ProjectRasterFile with tuple arguments instead of strings.
2814    
2815            * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
2816            with try/finally. Fixes RTBug #1904.
2817    
2818            * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
2819            with try/finally. Fixes RTBug #1904.
2820            (MapCanvas.FitSelectedToWindow): If a single point is selected
2821            simply center it on the display. Fixes RTBug #1849.
2822    
2823            * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
2824            to be compiled as a standalone app. Now the code can only be
2825            called from Python which simplifies the parameter passing.
2826            (ProjectRasterFile): Handle Python arguments. Remove code that
2827            checks for a destination dataset. Add more clean up code.
2828    
2829            * test/test_map.py (TestMapWithContents.test_raise_layer_top,
2830            TestMapWithContents.test_lower_layer_bottom):
2831            Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
2832            Fixes RTBug #1907.
2833    
2834            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
2835            extent to the map when the legend is toggled. Fixes RTBug #1881.
2836    
2837    2003-05-29  Jan-Oliver Wagner <[email protected]>
2838    
2839            * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
2840            unsubscribes all that is subcribed in __init__.
2841    
2842    2003-05-28  Bernhard Herzog  <[email protected]>
2843    
2844            * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
2845            (MainWindow.CanDuplicateLayer): New methods to implement the
2846            Layer/Duplicate command.
2847            (layer_duplicate command): New.
2848            (main_menu): Add layer_duplicate to the Layer menu.
2849    
2850    2003-05-28  Bernhard Herzog  <[email protected]>
2851    
2852            * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
2853            renderer so that NULL/None values get displayed differently (by a
2854            gray rectangle).
2855            (TableGrid.__init__): Override the default renderers
2856    
2857    2003-05-28  Bernhard Herzog  <[email protected]>
2858    
2859            * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
2860            classification to "None" if the type of the field has changed.
2861    
2862            * test/test_layer.py (SetShapeStoreTests): New. Class with a few
2863            test for the Layer.SetShapeStore method
2864    
2865    2003-05-28  Jan-Oliver Wagner <[email protected]>
2866    
2867            * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
2868            does not necessarily have a filename).
2869    
2870    2003-05-28  Jan-Oliver Wagner <[email protected]>
2871    
2872            * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
2873            sort the selection list for the dialog.
2874    
2875    2003-05-28  Frank Koormann  <[email protected]>
2876    
2877            * extensions/thuban/wxproj.cpp
2878            (project_point): Removed cast to int for projected point coordinates.
2879            (shape_centroid): Return last point if all polygon vertices fall
2880            to one point.
2881    
2882    2003-05-28  Bernhard Herzog  <[email protected]>
2883    
2884            * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
2885            with layers that don't have shapestores, i.e. raster layers.
2886    
2887    2003-05-28  Bernhard Herzog  <[email protected]>
2888    
2889            * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
2890            when determining the title from the filename.
2891    
2892            * test/test_dbf_table.py (TestDBFTable.test_title): Update to
2893            reflect changes in the way the title is derived from the filename
2894    
2895    2003-05-28  Frank Koormann  <[email protected]>
2896    
2897            * Thuban/UI/mainwindow.py (MainWindow.TableShow):
2898            Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
2899    
2900    2003-05-27  Bernhard Herzog  <[email protected]>
2901    
2902            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
2903            delegate SelectedLayer.
2904            (MainWindow.LayerUnjoinTable): Implement.
2905            (_can_unjoin): New. Helper function for the sensitivity of the
2906            layer/unjoin command.
2907    
2908            * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
2909            (DerivedShapeStore.OrigShapeStore): New. Return the original
2910            shapestore. Used to figure out how to unjoin.
2911            (DerivedShapeStore.Shapefile): Fix a typo.
2912    
2913    2003-05-27  Bernhard Herzog  <[email protected]>
2914    
2915            * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
2916            well
2917            (JoinDialog.__init__): Use the layer parameter and only build the
2918            left choice when a layer is given
2919            (JoinDialog.OnJoin): Handle layer joins as well
2920            (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
2921            that the user selects the "Select..." item. The sensitivitly
2922            updating is now in update_sensitivity
2923            (JoinDialog.y): New method to refactor the sensitivity update of
2924            the join button into its own method.
2925    
2926            * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
2927    
2928    2003-05-27  Bernhard Herzog  <[email protected]>
2929    
2930            * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
2931            iff there are unreferenced tables in the session
2932    
2933    2003-05-27  Bernhard Herzog  <[email protected]>
2934    
2935            * Thuban/Model/messages.py (TABLE_REMOVED): New message.
2936    
2937            * Thuban/Model/session.py (Session.UnreferencedTables): New method
2938            to return tables that are not referenced by other tables or shape
2939            stores and can be removed.
2940            (Session.RemoveTable): Issue a TABLE_REMOVED message after
2941            removing the table
2942    
2943            * Thuban/UI/mainwindow.py: Remove unused imports
2944            (MainWindow.TableClose): Implement.
2945    
2946            * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
2947            messages so that the frame will be automatically closed when a new
2948            session is opened or the table is removed.
2949            (TableFrame.OnClose): Unsubscribe the Subscriptions made in
2950            __init__
2951            (TableFrame.close_on_session_replaced)
2952            (TableFrame.close_on_table_removed): New. Subscribers that close
2953            the window
2954    
2955            * test/test_session.py (TestSessionMessages.test_remove_table)
2956            (TestSessionSimple.test_remove_table): Move the test to
2957            TestSessionSimple and add test for the TABLE_REMOVED message
2958            (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
2959            (TestSessionSimple.test_unreferenced_tables) New. Test for the
2960            UnreferencedTables method.
2961            (UnreferencedTablesTests): New. Class with some more sophisticated
2962            tests for UnreferencedTables.
2963    
2964    2003-05-27  Frank Koormann  <[email protected]>
2965    
2966            * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
2967            display has some unwanted side effects. Removed again.
2968    
2969    2003-05-27  Frank Koormann  <[email protected]>
2970    
2971            * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
2972    
2973            * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
2974    
2975    2003-05-27  Jan-Oliver Wagner <[email protected]>
2976    
2977            * test/test_menu.py (MenuTest.test): Added test for
2978            Menu.RemoveItem().
2979    
2980            * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
2981            the menu.
2982    
2983    2003-05-27  Frank Koormann  <[email protected]>
2984            
2985            Nonmodal dialogs without parent (i.e. they can fall behind the main
2986            window)
2987    
2988            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
2989            all dialogs in the dialogs dictionary and the canvas.
2990    
2991            * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
2992            parent, i.e. can fall behind other windows.
2993            (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
2994            dictionary before removing it.
2995    
2996            * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
2997    
2998            * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
2999            * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
3000            * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
3001    
3002    2003-05-27  Bernhard Herzog  <[email protected]>
3003    
3004            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
3005            tableview dialog
3006            (MainWindow.TableShow): Use ShowTableView to open the dialogs.
3007            Also, don't use the table's titles as the dialog names. The titles
3008            aren't guaranteed to be unique.
3009            (MainWindow.TableOpen): Open a table view dialog after opening the
3010            table
3011    
3012    2003-05-27  Bernhard Herzog  <[email protected]>
3013    
3014            * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
3015            effect can be achieved by simply closing the window showing the
3016            table.
3017            (MainWindow.TableHide): Removed.
3018            (main_menu): Removed "table_hide"
3019    
3020    2003-05-27  Frank Koormann  <[email protected]>
3021    
3022            Fix legend tree display problems under Win32
3023    
3024            * Thuban/UI/legend.py:  BMP_SIZE_W = 15
3025            (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
3026            (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
3027    
3028            * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
3029    
3030    2003-05-27  Jan-Oliver Wagner <[email protected]>
3031    
3032            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
3033            'after' now allows to insert separators almost anywhere in the menu.
3034    
3035    2003-05-27  Frank Koormann  <[email protected]>
3036    
3037            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
3038            "S" of selection box label to hint on hot key (Alt-S). Works under
3039            Win32 but is ignored under GTK.
3040    
3041    2003-05-26  Frank Koormann  <[email protected]>
3042    
3043            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
3044            Center Choices.
3045    
3046    2003-05-26  Bernhard Herzog  <[email protected]>
3047    
3048            Remove the Precision methods again. They're too DBF specific to be
3049            part of the table interface and they're only used in table_to_dbf
3050            anyway.
3051            
3052            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
3053            fixed precision of 12 for doubles.
3054            (TransientTableBase.Precision): Removed
3055            (AutoTransientTable.Width): Delegate to self.table.
3056    
3057            * Thuban/Model/table.py (DBFTable.Precision)
3058            (MemoryTable.Precision): Removed.
3059            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
3060            (table_to_dbf): Use a fixed precision of 12 for floats unless the
3061            column object specifies something else.
3062    
3063            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
3064            test for table_to_dbf
3065    
3066    2003-05-26  Bernhard Herzog  <[email protected]>
3067    
3068            * test/test_transientdb.py
3069            (TestTransientTable.run_iceland_political_tests): Fix a comment.
3070    
3071    2003-05-26  Bernhard Herzog  <[email protected]>
3072    
3073            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
3074            implementation. Mark parts of the file format strings for
3075            localization.
3076    
3077            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
3078            file and add the table to the tables managed by the session
3079    
3080            * test/test_session.py (TestSessionSimple.test_open_table_file):
3081            New. test case for OpenTableFile
3082    
3083    2003-05-26  Jan-Oliver Wagner <[email protected]>
3084    
3085            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
3086            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
3087            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
3088            Replace the true/false of wxWindows by True/False of Python 2.2.1.
3089    
3090    2003-05-26  Jan-Oliver Wagner <[email protected]>
3091    
3092            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
3093            already a selection present, update the grid accordingly.
3094    
3095            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
3096            resizeable and increase its initial size.
3097    
3098    2003-05-26  Frank Koormann  <[email protected]>
3099    
3100            Table export functionality
3101    
3102            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
3103            Return width (in characters) for a column.
3104            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
3105            (table_to_dbf): Write table to dbf file.
3106            (table_to_csv): Write table to csv file.
3107    
3108            * Thuban/Model/transientdb.py (TransientTableBase.Width,
3109            TransientTableBase.Precision): Return column width and precision.
3110    
3111            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
3112            or table_to_csv depending on file selection.
3113    
3114            * test/test_dbf_table.py:
3115            Test table_to_dbf (extension of former part of test).
3116    
3117            * test/test_csv_table.py:
3118            Test table_to_csv.
3119    
3120    2003-05-23  Jan-Oliver Wagner <[email protected]>
3121    
3122            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
3123            Use QueryTableFrame instead of TableFrame.
3124    
3125            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
3126            table window with 'Layer Table:' instead of 'Table:'.
3127    
3128    2003-05-23  Jan-Oliver Wagner <[email protected]>
3129    
3130            Give all tables a title via mix-in TitledObject.LayerShowTable
3131    
3132            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
3133            only if it exists.
3134    
3135            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
3136            and call its init-method with a default title. Remove Title() method.
3137    
3138            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
3139            AutoTransientTable): mix-in TitledObject and call its init-method with
3140            a default title. Remove Title() method.
3141    
3142    2003-05-23  Bernhard Herzog  <[email protected]>
3143    
3144            * Thuban/Model/session.py (Session.AddShapeStore): Define
3145            AddShapeStore analogously to AddTable.
3146    
3147            * test/test_session.py (TestSessionSimple.test_add_shapestore):
3148            New. Test for AddShapeStore
3149    
3150    2003-05-23  Jan-Oliver Wagner <[email protected]>
3151    
3152            Introducing QueryTableFrame and a very coarse ShowTable implementation.
3153    
3154            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
3155            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
3156            The latter implements the selection GUI without dependency on a layer.
3157            LayerTableFrame now is derived from QueryTableFrame and connects
3158            to a layer.
3159    
3160            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
3161            implementation that still needs work.
3162    
3163            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
3164    
3165    2003-05-22  Frank Koormann  <[email protected]>
3166    
3167            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
3168            Added "outer_join = False" as optional parameter.
3169            (TransientJoinedTable.create): If outer join is true, perform a
3170            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
3171            the left table. Records not matching are filled with 0 / None.
3172    
3173            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
3174            (JoinDialog.OnJoin): Consider outer join check box.
3175    
3176    2003-05-22  Bernhard Herzog  <[email protected]>
3177    
3178            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
3179            somewhat safer way. Storing the traceback in a local variable can
3180            lead to memory leaks
3181    
3182    2003-05-22  Bernhard Herzog  <[email protected]>
3183    
3184            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
3185            the wxMessageDialog's Destroy() method.
3186    
3187    2003-05-22  Frank Koormann  <[email protected]>
3188    
3189            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
3190            TransientTable.Title()
3191    
3192    2003-05-22  Frank Koormann  <[email protected]>
3193    
3194            Join Dialog, initial version.
3195    
3196            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
3197    
3198            * Thuban/UI/join.py (JoinDialog): Functional implementation of
3199            former framework. Renamed Table1/Table2 to LeftTable/RightTable
3200            in all occurences.
3201    
3202            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
3203            Typo fixed.
3204    
3205    2003-05-22  Bernhard Herzog  <[email protected]>
3206    
3207            Give the tables titles so that the GUI can display more meaningful
3208            names. For now the titles are fixed but depend on e.g. filenames
3209            or the titles of the joined tables.
3210    
3211            * Thuban/Model/transientdb.py (TransientTable.Title)
3212            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
3213    
3214            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
3215    
3216            * test/test_transientdb.py
3217            (TestTransientTable.test_auto_transient_table_title): New. Test
3218            for the Title method
3219            (TestTransientTable.test_transient_joined_table)
3220            (TestTransientTable.test_transient_table): Add test for the Title
3221            methods
3222    
3223            * test/test_memory_table.py (TestMemoryTable.test_title): New.
3224            Test for the Title method
3225    
3226            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
3227            the Title method
3228    
3229    2003-05-22  Bernhard Herzog  <[email protected]>
3230    
3231            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
3232            Provide a better way to destroy the layers
3233            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
3234            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
3235            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
3236            the new way to destroy the layers.
3237            (TestLayer.test_derived_store): New. Test for using a layer with a
3238            DerivedShapeStore
3239    
3240            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
3241            filename if the shape store actually has one.
3242    
3243    2003-05-22  Bernhard Herzog  <[email protected]>
3244    
3245            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
3246            for the filename
3247    
3248            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
3249            for the FileName method
3250            (TestDBFTableWriting.test_write): Fix spelling of filename
3251    
3252    2003-05-22  Thomas Koester  <[email protected]>
3253    
3254            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
3255            from SciParam that now really is immutable.
3256    
3257    2003-05-22  Frank Koormann  <[email protected]>
3258    
3259            Layer Top/Bottom placement added to legend.
3260    
3261            * Thuban/UI/legend.py
3262            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
3263            bound to tool events.
3264            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
3265            New, methods binding the event methods with the map methods.
3266    
3267            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
3268            layer at top/bottom of layer stack.
3269    
3270            * Resources/Bitmaps/top_layer.xpm: New button icon.
3271    
3272            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
3273    
3274    2003-05-22  Bernhard Herzog  <[email protected]>
3275    
3276            * Thuban/Model/session.py (Session.RemoveTable): New method to
3277            remove tables
3278    
3279            * test/test_session.py (TestSessionSimple.test_remove_table): New.
3280            Test for RemoveTable
3281    
3282    2003-05-22  Thomas Koester  <[email protected]>
3283    
3284            * Thuban/Model/classgen.py: Added short module doc string and CVS id.
3285            (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
3286    
3287    2003-05-22  Bernhard Herzog  <[email protected]>
3288    
3289            Implement a way to discover dependencies between tables and
3290            shapestores.
3291    
3292            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
3293            (TransientJoinedTable.Dependencies)
3294            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
3295            interface
3296            (TransientJoinedTable.__init__): Keep tack of the original table
3297            objects in addition to the corresponding transient tables.
3298    
3299            * Thuban/Model/table.py (DBFTable.Dependencies)
3300            (MemoryTable.Dependencies): New. Implement the dependencies
3301            interface
3302    
3303            * Thuban/Model/data.py (ShapeTable): New. Helper class for
3304            ShapefileStore
3305            (ShapefileStore.__init__): Use ShapeTable instead of
3306            AutoTransientTable
3307            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
3308            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
3309            methods for filename and type
3310            (ShapefileStore.Dependencies): New. Implement the dependencies
3311            interface
3312            (DerivedShapeStore): New class to replace SimpleStore. The main
3313            difference to SimpleStore is that it depends not on a shapefile
3314            but another shapestore which expresses the dependencies a bit
3315            better
3316            (SimpleStore.__init__): Add deprecation warning.
3317    
3318            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
3319            Test for the Dependencies method.
3320    
3321            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
3322            New. Test for the Dependencies method.
3323    
3324            * test/test_transientdb.py
3325            (TestTransientTable.test_auto_transient_table_dependencies): New.
3326            Test for the Dependencies method.
3327            (TestTransientTable.test_transient_joined_table): Add test for the
3328            Dependencies method.
3329    
3330            * test/test_session.py (TestSessionSimple.setUp)
3331            (TestSessionSimple.tearDown): New. Implement a better way to
3332            destroy the sessions.
3333            (TestSessionSimple.test_initial_state)
3334            (TestSessionSimple.test_add_table): Bind session to self.session
3335            so that it's destroyed by tearDown
3336            (TestSessionSimple.test_open_shapefile): New. Test for
3337            OpenShapefile and the object it returns
3338    
3339    2003-05-22  Bernhard Herzog  <[email protected]>
3340    
3341            * Thuban/Model/session.py (Session.AddTable): New method to
3342            register tables with the session.
3343            (Session.Tables): Return the tables registered with AddTable too.
3344    
3345            * test/test_session.py (TestSessionSimple.test_add_table): New.
3346            Test case for the AddTable method
3347    
3348    2003-05-22  Frank Koormann  <[email protected]>
3349    
3350            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
3351            lower right corner, center labels for selections, initialize controls
3352            in reasonable order for keyboard navigation.
3353    
3354            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
3355            (ProjFrame.__DoOnProjAvail): Determine position of current projection
3356            using the wxListBox.FindString() method. Still a problem (#1886)
3357    
3358            * Thuban/UI/classifier.py
3359            (Classifier.__init__, SelectPropertiesDialog.__init__)
3360    
3361            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
3362            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
3363            different classification types from here to __init__.
3364            (GenUniquePanel.__init__): Set the column width of the first field
3365            in the Field ListCtrl to the full width.
3366    
3367            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
3368            Button to 'Export'. Center Buttons in Selection Box, set Focus to
3369            Grid.
3370            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
3371            changes focus to the Selection when pressing "Alt-S".
3372    
3373            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
3374            the text if not visible. The italic font sometimes exceeds the
3375            rendering area.
3376    
3377    2003-05-21  Jonathan Coles   <[email protected]>
3378    
3379            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
3380            to OnClose so that Thuban closes correctly.
3381    
3382            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
3383            DockFrame.OnClose, not DockFrame._OnClose.
3384    
3385    2003-05-21  Jonathan Coles   <[email protected]>
3386    
3387            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
3388            references to 'inf' and use new Range __init__ to pass floats
3389            directly rather than converting them to strings first.
3390            Fixes RTBug #1876.
3391    
3392            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
3393            Use new Range ___init__ to pass floats.
3394    
3395            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
3396            filename is a valid image file. Throw IOError otherwise.
3397    
3398            * Thuban/Model/range.py: Brought over new Range from SciParam that
3399            is immutable and has an __init__ which can accept floats.
3400    
3401            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
3402            into try block. AddLayer doesn't throw any exceptions anymore.
3403            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
3404            try block.
3405    
3406            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
3407            the first item in choices. Fixes RTBug #1882.
3408    
3409            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
3410            has gone to 0 which is a serious problem. abort.
3411            (MapRenderer.draw_raster_layer): Catch IOError seperately and
3412            print the error from GDAL.
3413    
3414            * Thuban/UI/tableview.py (TableGrid.__init__): Call
3415            ToggleEventListeners to turn on listening.
3416            (TableGrid.ToggleEventListeners): New. Turns event listening on
3417            and off so as to prevent excessive messages.
3418            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
3419            to suppress excessive messages when selecting many rows.
3420            Fixes RTBug #1880.
3421    
3422            * Thuban/UI/view.py: Added checks against if scale == 0. This
3423            is a serious problem that can occur when an image without
3424            geo data is loading and causes the map projection bounds to
3425            go to infinity. Right now, the solution is to simply try
3426            to recover.
3427    
3428            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
3429            to set the MFILEReceiver attributes even if the data is NULL.
3430    
3431            * extensions/thuban/gdalwarp.cpp: Improved the error handling
3432            and passed GDAL messages back up to the Python layer. Also
3433            tried to fix some memory leaks that were present in the original
3434            utility but didn't matter because the program aborted.
3435    
3436            * test/test_range.py: Copied over tests from SciParam. Removed
3437            tests against importing. Fixes RTBug #1867.
3438    
3439    2003-05-21  Bernhard Herzog  <[email protected]>
3440    
3441            * test/test_load.py: Remove unused imports and restructure the
3442            test code
3443            (LoadSessionTest): Split into one class for each test and turn
3444            LoadSessionTest itself into the base class for all such session
3445            tests.
3446            (ClassificationTest): New base class for load tests that test
3447            classifications
3448            (TestSingleLayer, TestLayerVisibility, TestClassification)
3449            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
3450            for the individual tests
3451    
3452            * test/support.py (FileLoadTestCase.filename): New base class for
3453            file loading tests
3454    
3455    2003-05-21  Jan-Oliver Wagner <[email protected]>
3456    
3457            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
3458            Mercator' to 'UTM Zone 32' as a more convenient example.
3459            Added 'Gauss Krueger Zone 6'.
3460    
3461            * Data/iceland_sample_raster.thuban: political polygon now
3462            filled transparent to have the raster image visible at once.
3463    
3464    2003-05-21  Frank Koormann  <[email protected]>
3465    
3466            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
3467            OnClose() to keep in sync with extensions. Internally Thuban
3468            still uses "underscored" names.
3469    
3470    2003-05-20  Jonathan Coles   <[email protected]>
3471    
3472            This puts back Raster layer support. These layers support projections
3473            through the GDAL library. Currently, the CVS version is being used.
3474            There are no Debian packages available although this may change soon.
3475            A GDAL driver was extended to support writing to memory rather to
3476            files.
3477    
3478            There is still some work that needs to be done, such as some error
3479            handling when loading invalid images or when there is a problem
3480            projecting the image. This putback simply checks in the majority
3481            of the work.
3482    
3483            * setup.py: Add gdalwarp library extension.
3484    
3485            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
3486            Defaults to False, but can be overridden by subclasses if they
3487            support classification.
3488            (RasterLayer): New. Defines a new layer that represents an
3489            image.
3490    
3491            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
3492            tag handler.
3493            (SessionLoader.start_layer): Encode the filename.
3494            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
3495            New. Supports reading a rasterlayer tag.
3496    
3497            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
3498    
3499            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
3500            get a string in Latin1. If we get such as string convert it to
3501            unicode first, otherwise leave if alone before encoding.
3502            (SessionSaver.write_layer): Add support for writing both Layers
3503            and RasterLayers.
3504    
3505            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
3506            The right argument may not be a string, it could also be a Column.
3507    
3508            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
3509            Make initial window size 600x400. Fixes RTBug #1872.
3510    
3511            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
3512            the dialog is constructed so that we can support layers that
3513            do not have classifications.
3514            (Classifier._OnTry): Only build a classification if the layer
3515            supports one.
3516    
3517            * Thuban/UI/legend.py: Change all checks that a layer is an
3518            instance of Layer into checks against BaseLayer.
3519            (LegendTree.__FillTreeLayer): Only add children to a branch if
3520            the layer supports classification.
3521    
3522            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
3523            MainWindow.OpenSession): Don't proceed with an action if the
3524            user chooses Cancel when they are asked to save changes.
3525            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
3526            user to select an image file. Create a new RasterLayer and add
3527            it to the map.
3528    
3529            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
3530            for rendering RasterLayer layers.
3531            (MapRenderer.draw_raster_layer): Actually method that calls
3532            the GDALWarp python wrapper and constructs an image from the
3533            data returned.
3534    
3535            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
3536            Choices symbols to match those used in the table query method.
3537            Replace deprecated method calls on table with new method names.
3538    
3539            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
3540            how small the scale can get. This still needs more testing.
3541    
3542            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
3543            Provides a driver to output in .bmp format.
3544    
3545            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
3546            New. Provides IO routines which write to memory, rather than a file.
3547    
3548            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
3549            of the gdalwarp utility provided in GDAL. Added function calls
3550            that can be accessed from python.
3551    
3552            * Data/iceland_sample_raster.thuban: New. Sample file that uses
3553            a raster layer.
3554    
3555            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
3556            layer image data.
3557    
3558            * Doc/thuban.dtd: Added rasterlayer attribute definition.
3559    
3560            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
3561            tests associated with the raster layer code.
3562    
3563            * test/test_transientdb.py
3564            (TestTransientTable.test_auto_transient_table_query): Added a test
3565            for using a Column object as the "right" parameter to a query.
3566    
3567    2003-05-19  Frank Koormann  <[email protected]>
3568    
3569            * Thuban/version.py (get_changelog_date):
3570            Catch exceptions if ChangeLog does not exist.
3571    
3572            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
3573    
3574    2003-05-19  Frank Koormann  <[email protected]>
3575    
3576            Extended version information for Thuban
3577    
3578            * Thuban/version.py: New, version information for Thuban: Last
3579            modification date and last ChangeLog entry date.
3580    
3581            * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
3582            information: Display Thuban, wxPython and Python version.
3583    
3584    2003-05-16  Bernhard Herzog  <[email protected]>
3585    
3586            * Thuban/Model/save.py: Remove some unused imports including the
3587            __future__ import for nested_scopes as Thuban relies on Python 2.2
3588            now.
3589            (XMLWriter.encode): Remove the special case for a None argument.
3590            In the saver encode is always called with a string argument.
3591    
3592    2003-05-16  Bernhard Herzog  <[email protected]>
3593    
3594            * Thuban/UI/__init__.py: Remove the work-around for the locale bug
3595            in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
3596            of the bug was that e.g. float("1.2") would fail. Thuban now
3597            requires 2.4.x.
3598            
3599    2003-05-16  Frank Koormann   <[email protected]>
3600    
3601            Printing enhancement and WMF export (under Win32)
3602    
3603            * Thuban/UI/renderer.py (ExportRenderer): New, derived from
3604            ScreenRenderer. Renders Map, Legend and Scalebar for export.
3605            (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
3606            PrintRender.
3607    
3608            * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
3609            to fullfil information needed for PrinterRenderer.
3610            (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
3611            (MapCanvas.Print): Adapted to new MapPrintout.
3612            (OutputTransform): General calculations to transform from canvas
3613            coordinates to export/printing devices.
3614    
3615            * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
3616            new method_command to call ExportMap, with platform dependency (only
3617            __WXMSW__)
3618      
3619            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
3620            of scalebar drawing area as new parameters.
3621            
3622            * Thuban/Model/scalebar.py (roundInterval): round long instead of int
3623    
3624            * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
3625            Update to extended scalebar.DrawScalebar header.
3626    
3627            * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
3628    
3629            * test/test_scalebar.py: Made test executable as standalone.
3630    
3631    2003-05-16  Bernhard Herzog  <[email protected]>
3632    
3633            * Thuban/Model/table.py (Table): Remove this compatibility alias
3634            for DBFTable.
3635    
3636            * test/test_table.py: Import DBFTable as Table because that alias
3637            doesn't exist anymore.
3638    
3639            * Thuban/UI/classgen.py: Remove some unused imports
3640    
3641    2003-05-14  Jonathan Coles   <[email protected]>
3642    
3643            * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
3644            Fix docstring.
3645            (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
3646            (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
3647            values of the supplied range to determine the beginning and end
3648            bounds of the generated classes.
3649    
3650            * Thuban/Model/range.py (Range.number_re): Now accepts floats that
3651            do not have a leading 0 (.5 is now accepted as well as 0.5).
3652    
3653            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
3654            call to ClassGenerator.GenUniformDistribution.
3655    
3656            * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
3657            layout bug with the 'Projection' label.
3658    
3659            * test/support.py (FloatTestCase): New. Needed for the Range tests.
3660    
3661            * test/test_range.py: New. Imported from SciParam.
3662    
3663    2003-05-12  Jonathan Coles   <[email protected]>
3664    
3665            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
3666            to table.UniqueValues() with calls that retrieve all the values
3667            from the table. This will need to be replaced by a method on table
3668            which can simply return the list (perhaps more efficiently).
3669    
3670    2003-05-12  Jonathan Coles   <[email protected]>
3671    
3672            The return value of ClassGenerator.CalculateQuantiles has changed.
3673            Refer to the documentation for details.
3674    
3675            * test/test_classgen.py: Modified Quantile tests to use the
3676            new return values.
3677    
3678            * Thuban/Model/classgen.py
3679            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
3680            use new return values from CalculateQuantiles to produce the correct
3681            range bounds in the Classification.
3682            (ClassGenerator.CalculateQuantiles): Add more comments describing
3683            the return values and parameters. Make minor adjustments to improve
3684            the legibility of the code. Fix problem with adjusted not being set
3685            in most cases.
3686    
3687    2003-05-12  Frank Koormann <[email protected]>
3688            
3689            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
3690            and latin1. Fixes #1851 finally.
3691    
3692    2003-05-09  Jonathan Coles   <[email protected]>
3693    
3694            * test/test_classgen.py: New. Tests the Quantile algorithm.
3695    
3696            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
3697            Clean up debugging statement, add comments, fix a small bug in the
3698            returned adjusted percentiles.
3699            
3700    2003-05-09  Jonathan Coles   <[email protected]>
3701    
3702            Introduces Range class from SciParam into the ClassGroupRange class,
3703            and such ranges can now be saved and loaded from disk.
3704    
3705            Quantiles are now available in the Classification Generator.
3706    
3707            Initial support for building Queries on a table. Doesn't do anything
3708            but run some tests.
3709    
3710            * Thuban/Model/classification.py: Explicit imports.
3711            (ClassGroupRange): Use the Range class to store the underlying
3712            range information. The interface remains the same, except for
3713            GetRange(), and you can also supply a Range object as the min
3714            parameter to SetRange or __init__.
3715    
3716            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
3717            string appropriately for use in Thuban. Fixes RTbug #1851.
3718            (SessionLoader.end_projection): Handle the context of the
3719            projection tag a bit better by looking at what objects are not
3720            None. There was an assumption that a projection tag for a map
3721            could occur before any layers.
3722            (SessionLoader.start_clrange): Provide backward compatibility for
3723            reading min/max values as well as the new range parameter.
3724    
3725            * Thuban/Model/map.py: Explicit imports.
3726    
3727            * Thuban/Model/resource.py: Import _.
3728            (ProjFileSaver.write): write header using projfile.dtd.
3729    
3730            * Thuban/Model/save.py: Explicit imports.
3731            (XMLWriter.encode): New. Encode the given string from a format
3732            used by Thuban into UTF-8. Fixes RTbug #1851.
3733    
3734            * Thuban/UI/classgen.py: Explicit imports.
3735            (ClassGenDialog.__init__): Clean up the code and add support
3736            for Quantiles.
3737            (ClassGenDialog.OnOK): Add support for Quantiles.
3738            (GenQuantilesPanel): New. Input panel for Quantiles.
3739            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
3740            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
3741    
3742            * Thuban/Model/classgen.py: New. Contains all the classes named above.
3743    
3744            * Thuban/UI/classifier.py: Explicit imports.
3745            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
3746            ClassTable.SetValueAsCustom): Reworked to use new Range class.
3747    
3748            * Thuban/UI/legend.py: Explicit imports.
3749    
3750            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
3751            a Table menu and associated method calls.
3752            (MainWindow.choose_color): Removed. No longer needed.
3753    
3754            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
3755            should be disabled if no projection is selected in the available
3756            list.
3757    
3758            * Thuban/UI/renderer.py: Explicit imports.
3759    
3760            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
3761            with correctly selecting the rows and issuing the right events.
3762            Be sure to call Skip() to allow the grid to do some of its own
3763            handling which allows the rows to actually be selected.
3764            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
3765            selecting multiple shapes.
3766            (LayerTableFrame): Support for building Queries.
3767            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
3768    
3769            * Thuban/UI/tree.py: Explicit imports.
3770    
3771            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
3772            table view can call it.
3773    
3774            * test/test_classification.py: Explicit imports.
3775            (TestClassification.test_ClassGroupRange): Fix test for new
3776            Range class.
3777    
3778            * Doc/thuban.dtd: Add range parameter for clrange.
3779    
3780            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
3781            object in ClassGroupRange, and also uesd for inputting ranges in
3782            the classifer table and elsewhere.
3783    
3784            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
3785            yet.
3786    
3787    2003-05-09  Frank Koormann <[email protected]>
3788    
3789            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
3790    
3791    2003-05-08  Frank Koormann <[email protected]>
3792    
3793            Coding style updates
3794    
3795            * test/test_scalebar.py: Replaced tab indentation by spaces.
3796    
3797            * Thuban/UI/scalebar.py: Explicit imports.
3798    
3799    2003-05-08  Frank Koormann <[email protected]>
3800    
3801            * Thuban/UI/scalebar.py
3802            (ScaleBar.DrawScalebar): Format string bug fixed.
3803    
3804    2003-05-08  Frank Koormann <[email protected]>
3805    
3806            Reorganization of scalebar component (no wx in Thuban/Model)
3807    
3808            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
3809            (deriveInterval):
3810            Calculate scalebar interval and unit which fits in width for scale.
3811            (roundInterval): Round float.
3812    
3813            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
3814    
3815            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
3816    
3817            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
3818    
3819    2003-05-08  Frank Koormann <[email protected]>
3820    
3821            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
3822            Initialize ScaleBar with canvas.map
3823    
3824            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
3825            round intervals to display smarter lengths
3826            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
3827            layer. If the maps has no projection applied grey the scalebar.
3828    
3829    2003-05-07  Frank Koormann <[email protected]>
3830            
3831            Basic Scalebar features added.
3832    
3833            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
3834    
3835            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
3836            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
3837            and the renderer.
3838    
3839            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
3840    
3841            * Thuban/UI/messages.py: SCALE_CHANGED added.
3842    
3843    2003-05-07  Bernhard Herzog  <[email protected]>
3844    
3845            * Thuban/Model/session.py (Session.__init__): New instance
3846            variable shapestores to hold a list of all open shapestore objects
3847            (Session.ShapeStores): New. Accessor method for the shapestores
3848            list.
3849            (Session._add_shapestore, Session._clean_weak_store_refs): New.
3850            Internal methods to maintain the shapestores list.
3851            (Session.Tables): New. Return all tables open in the session.
3852            (Session.OpenShapefile): Insert the new ShapeStore into the
3853            shapestores list.
3854    
3855            * test/test_session.py (TestSessionSimple.test_initial_state): Add
3856            tests for ShapeStores and Tables
3857            (TestSessionWithContent.test_shape_stores)
3858            (TestSessionWithContent.test_tables): New. Test cases for
3859            ShapeStores and Tables
3860    
3861    2003-05-07  Bernhard Herzog  <[email protected]>
3862    
3863            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
3864            Add comments about the optimizations used.
3865            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
3866            Implement the ReadValue table interface method.
3867    
3868            * test/test_transientdb.py
3869            (TestTransientTable.run_iceland_political_tests)
3870            (TestTransientTable.test_transient_joined_table): Add tests for
3871            ReadValue
3872    
3873    2003-05-07  Frank Koormann <[email protected]>
3874    
3875            * Resources/Bitmaps/fulllayerextent.xpm,
3876            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
3877            new icons.
3878    
3879    2003-05-06  Bernhard Herzog  <[email protected]>
3880    
3881            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
3882            New. Simply delegate to the transient table's version.
3883    
3884            * test/test_transientdb.py
3885            (TestTransientTable.test_auto_transient_table_query): New. Test
3886            case for AutoTransientTable's SimpleQuery
3887    
3888    2003-05-06  Bernhard Herzog  <[email protected]>
3889    
3890            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
3891            Implement a simple query method for the query dialog
3892            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
3893            the row index or shapeid.
3894            (TransientTable.create): Insert the right value of the row index
3895            (TransientJoinedTable.create): Copy the row index of the left
3896            table to the joined result table
3897    
3898            * test/test_transientdb.py
3899            (TestTransientTable.test_transient_table_read_twice): Fix
3900            doc-string
3901            (TestTransientTable.test_transient_table_query): New. Test for the
3902            SimpleQuery method
3903    
3904    2003-05-06  Bernhard Herzog  <[email protected]>
3905    
3906            Convert all table users to use the new table interface. This only
3907            covers Thuban itself, not GREAT-ER or other applications built on
3908            Thuban yet, so the compatibility interface stays in place for the
3909            time being but it now issues DeprecationWarnings.
3910    
3911            Finally, the new Table interface has a new method, HasColumn.
3912    
3913            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
3914            issue deprecation warnings when they're. The warnings refer to the
3915            caller of the method.
3916            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
3917            for the deprecation warnings
3918    
3919            * test/test_table.py: Ignore the deprecation warnings for the old
3920            table in the tests in this module. The purpose of the tests is to
3921            test the old interface, after all.
3922    
3923            * test/test_transientdb.py
3924            (TestTransientTable.run_iceland_political_tests): Use the
3925            constants for the types. Add a test for HasColumn
3926            (TestTransientTable.test_transient_joined_table): Adapt to new
3927            table interface. Add a test for HasColumn
3928            (TestTransientTable.test_transient_table_read_twice): Adapt to new
3929            table interface
3930    
3931            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
3932            Adapt to new table interface
3933    
3934            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
3935            new table interface
3936    
3937            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
3938            (RecordTable.SetTable): Adapt to new table interface
3939    
3940            * Thuban/UI/classifier.py (Classifier.__init__)
3941            (Classifier.__init__): Adapt to new table interface
3942    
3943            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
3944            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
3945            to new table interface
3946    
3947            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
3948            (AutoTransientTable.HasColumn): Implement the new table interface
3949            method
3950            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
3951            (AutoTransientTable.UniqueValues): Adapt to new table interface
3952    
3953            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
3954            Adapt to new table interface
3955    
3956            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
3957            simplify opening shapefiles a bit easier.
3958            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
3959            (TestLayer.test_point_layer): Use the new helper method
3960            (TestLayer.test_get_field_type): New. Test for the GetFieldType
3961            method
3962    
3963            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
3964            the new table method
3965    
3966            * test/test_memory_table.py (TestMemoryTable.test_has_column):
3967            Test for the new table method HasColumn
3968    
3969    2003-05-06  Jonathan Coles   <[email protected]>
3970    
3971            Addresses the "Selection Extent" wish of RTbug #1787.
3972    
3973            * Resources/Bitmaps/fulllayerextent.xpm,
3974            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
3975            extent. These are just place holders for the real bitmaps.
3976    
3977            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
3978            calculate the bounding box once (the first time compute_bbox() is
3979            called).
3980            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
3981            the bounding box for the shapes in lat/long coordinates.
3982    
3983            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
3984            option.
3985            (MainWindow.has_selected_shapes): New. Returns true if there are
3986            any selected shapes.
3987            (MainWindow.FullSelectionExtent): New. Calls
3988            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
3989            (_has_selected_shapes): New. Returns true if there are any
3990            selected shapes.
3991    
3992            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
3993            true if there are any selected shapes.
3994    
3995            * Thuban/UI/view.py (MapCanvas): Added delegated method
3996            HasSelectedShapes.
3997            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
3998            shapes on the canvas using the map projection (if any).
3999    
4000            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
4001            for Layer.ShapesBoundingBox().
4002    
4003    2003-05-06  Bernhard Herzog  <[email protected]>
4004    
4005            * Resources/Projections/defaults.proj: Fix spelling of Mercator
4006    
4007    2003-05-05  Jonathan Coles   <[email protected]>
4008    
4009            Addresses the "Full Layer Extent" wish of RTbug #1787.
4010    
4011            * Resources/Projections/defaults.proj: Added UK National Grid.
4012    
4013            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
4014            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
4015            when the user selects the menu option.
4016    
4017            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
4018            scales the given layer on the canvas using the map projection.
4019    
4020    2003-05-05  Bernhard Herzog  <[email protected]>
4021    
4022            Convert the table implementations to a new table interface. All
4023            tables use a common mixin class to provide backwards compatibility
4024            until all table users have been updated.
4025    
4026            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
4027            provide backwards compatibility for table classes implementing the
4028            new interface
4029            (DBFTable, MemoryTable): Implement the new table interface. Use
4030            OldTableInterfaceMixin as base for compatibility
4031            (DBFColumn, MemoryColumn): New. Column description for DBFTable
4032            and MemoryTable resp.
4033    
4034            * test/test_dbf_table.py: New. Test cases for the DBFTable with
4035            the new table interface.
4036    
4037            * test/test_memory_table.py: New. Test cases for the MemoryTable
4038            with the new table interface.
4039    
4040            * test/test_table.py: Document the all tests in this file as only
4041            for backwards compatibility. The equivalent tests for the new
4042            interface are in test_memory_table.py and test_dbf_table.py
4043            (MemoryTableTest.test_read): field_info should be returning tuples
4044            with four items
4045            (MemoryTableTest.test_write): Make doc-string a more precise.
4046    
4047            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
4048            table interface. Derive from from OldTableInterfaceMixin for
4049            compatibility.
4050            (TransientTableBase.create): New intance variable column_map to
4051            map from names and indices to column objects
4052            (TransientTable.create): Use the new table interface of the input
4053            table
4054            (AutoTransientTable): Convert to new table interface. Derive from
4055            from OldTableInterfaceMixin for compatibility.
4056            (AutoTransientTable.write_record): Removed. It's not implemented
4057            yet and we still have to decide how to handle writing with the new
4058            table and data framework.
4059    
4060            * test/test_transientdb.py
4061            (TestTransientTable.run_iceland_political_tests)
4062            (TestTransientTable.test_transient_joined_table): Use the new
4063            table interface
4064    
4065    2003-05-05  Jonathan Coles   <[email protected]>
4066    
4067            This is namely a collection of UI updates to improve user interactivity.
4068            Tabbing between controls now exists and you can use ESC to close dialog
4069            boxes; ENTER will active the default button.
4070    
4071            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
4072            order that the controls are created so that tabbing works correctly.
4073            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
4074            wxDialog can handle the default button correctly.
4075            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
4076            same reasons as for OnOK.
4077            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
4078            when we ask the table for the maximum/minimum values of a field
4079            which could take a very long time.
4080    
4081            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
4082            order that the controls are created so that tabbing works correctly.
4083            (SelectPropertiesDialog.__init__): Rearrange the order that the
4084            controls are created so that tabbing works correctly.
4085    
4086            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
4087            to derive from a wxDialog but behave like the original implementation
4088            which was derived from a wxFrame. wxDialog provides useful key
4089            handling functionality like ESC calling OnCancel and ENTER calling
4090            OnOK which is lost with wxFrame.
4091    
4092            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
4093            new dialogs.
4094    
4095            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
4096            order that the controls are created so that tabbing works correctly.
4097            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
4098            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
4099            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
4100            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
4101            can provide the "UK National Grid" as a default projection.
4102            (UTMPanel.__init__): Rearrange the order that the controls are
4103            created so that tabbing works correctly.
4104    
4105    2003-05-05  Bernhard Herzog  <[email protected]>
4106    
4107            * extensions/thuban/wxproj.cpp: Fix some of the comments.
4108            (project_point): If a map projection but no layer projection is
4109            given, convert degrees to radians before applying the map
4110            projection.
4111    
4112            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
4113            (TableGrid.allow_messages): New methods to make it possible to
4114            inhibit message sending.
4115            (TableGrid.issue): Only send the message if not inhibited.
4116            (LayerTableGrid.select_shape): Use the new methods to make sure
4117            that no ROW_SELECTED message is sent while we're updating the
4118            selected rows to match the selected shapes.
4119    
4120    2003-05-02  Jan-Oliver Wagner <[email protected]>
4121    
4122            Implementation of MemoryTable.
4123    
4124            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
4125            implementation that operates on a list of tuples. All of the data
4126            are kept in the memory.
4127    
4128            * test/test_table.py (MemoryTableTest): New.
4129    
4130            * test/test_transientdb.py (SimpleTable): Removed.
4131            (TestTransientTable.test_transient_joined_table,
4132            (TestTransientTable.test_transient_table_read_twice): Replaced
4133            SimpleTable by MemoryTable.
4134    
4135    2003-04-30  Jonathan Coles   <[email protected]>
4136    
4137            * Data/iceland_sample.thuban: Now contains correct projections
4138            for each of the layers.
4139    
4140            * Resources/Projections/defaults.proj: Geographic projection
4141            contains unit conversion parameter.
4142    
4143    2003-04-30  Jonathan Coles   <[email protected]>
4144    
4145            The most important part of this putback is the projection changes.
4146            It should now be possible to specify the projection that a layer
4147            is in and then specify a different projection for the map. The
4148            projection dialog has an extra parameter for a geographic projection
4149            which lets the user select if the input is in degrees or radians.
4150    
4151            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
4152            to say that the parameter is a tuple of unprojected
4153            points (which is what the callers to this method were assuming).
4154            Also, since the points are unprojected we need to projected them.
4155    
4156            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
4157            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
4158            groups are selected, move the layer up/down. Fixes RTbug #1833.
4159    
4160            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
4161    
4162            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
4163            parameter in call to SetClientData.
4164            (GeoPanel): Add support for selecting the units that the
4165            source data is in (Radians or Degrees).
4166    
4167            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
4168            the rendering loop by reducing the number of if's, removing the
4169            unnecessary try/except block, and checking if the old group
4170            is the same as the new one (which happens a lot if there is
4171            no classification, or lots of shapes are in the same group).
4172    
4173            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
4174            around the redraw routine to try to catch problems that the user
4175            may create by selecting invalid projections for the data set and
4176            map. Clears the display if there are any problems and prints the
4177            error.
4178            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
4179            rectangle.
4180    
4181            * extensions/thuban/wxproj.cpp (project_point): First invert the
4182            supplied point (which should be in projected coordinates) using
4183            the layer's projection and then project the point using the
4184            map's projection.
4185            (project_points): Use project_point() to project each point.
4186    
4187    2003-04-30  Jan-Oliver Wagner <[email protected]>
4188    
4189            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
4190            don't set the Classification to None if the classfication field
4191            is None (ie only a DEFAULT).
4192    
4193    2003-04-30  Bernhard Herzog  <[email protected]>
4194    
4195            * Thuban/UI/view.py: Fix some typos.
4196    
4197            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
4198            not pop up the dialog if the selection becomes empty (this could
4199            happen if e.g. a new selection is opened while the identify tool
4200            is active and dialog had been closed)
4201    
4202    2003-04-30  Bernhard Herzog  <[email protected]>
4203    
4204            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
4205            instance variable read_record_last_result
4206            (TransientTableBase.read_record): Make sure reading the same
4207            record twice works. The implementation uses the new instance
4208            variable read_record_last_result
4209    
4210            * test/test_transientdb.py
4211            (TestTransientTable.test_transient_table_read_twice): New test
4212            case for the above bug-fix.
4213    
4214    2003-04-29  Jonathan Coles   <[email protected]>
4215    
4216            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
4217    
4218            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
4219    
4220            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
4221            (ClassTable.SetValueAsCustom): Rename keyword argument in
4222            ClassGroup* constructors to match argument name.
4223    
4224    2003-04-29  Bernhard Herzog  <[email protected]>
4225    
4226            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
4227            transient DB if it exists to make sure it doesn't leave a journal
4228            file in the temp directory.
4229    
4230            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
4231            self.conn to None after closing the connection to make sure it's
4232            not closed twice
4233    
4234    2003-04-29  Jonathan Coles   <[email protected]>
4235    
4236            Add a visible parameter in the layer XML tag. The default value is
4237            "true". If anything other than "false" is specified we also assume
4238            "true". Addresses RTbug #1025.
4239    
4240            * Doc/thuban.dtd: Add visible parameter to a layer.
4241    
4242            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
4243            of visible from 1 to True.
4244            (Layer.__init__): Change default value of visible from 1 to True.
4245    
4246            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
4247            parameter.
4248    
4249            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
4250            parameter.
4251    
4252            * test/test_load.py: Add new test data contents_test_visible.
4253            (LoadSessionTest.setUp): save test data.
4254            (LoadSessionTest.testLayerVisibility): Test if the visible flag
4255            is loaded correctly.
4256    
4257            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
4258            for saving an invisible layer.
4259    
4260    2003-04-29  Jonathan Coles   <[email protected]>
4261    
4262            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
4263            legend dialog box and tell it to change its map to the one
4264            supplied to SetMap(). Fixes RTbug #1770.
4265    
4266    2003-04-29  Bernhard Herzog  <[email protected]>
4267    
4268            Next step of table implementation. Introduce a transient database
4269            using SQLite that some of the data is copied to on demand. This
4270            allows us to do joins and other operations that require an index
4271            for good performance with reasonable efficiency. Thuban now needs
4272            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
4273            haven't tested that.
4274            
4275            * Thuban/Model/transientdb.py: New. Transient database
4276            implementation.
4277    
4278            * test/test_transientdb.py: New. Tests for the transient DB
4279            classes.
4280    
4281            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
4282            classes to help automatically remove temporary files and
4283            directories.
4284            (Session.__init__): New instance variables temp_dir for the
4285            temporary directory and transient_db for the SQLite database
4286            (Session.temp_directory): New. Create a temporary directory if not
4287            yet done and return its name. Use AutoRemoveDir to have it
4288            automatically deleted
4289            (Session.TransientDB): Instantiate the transient database if not
4290            done yet and return it.
4291    
4292            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
4293            AutoTransientTable so that data is copied to the transient DB on
4294            demand.
4295            (SimpleStore): New class that simply combines a table and a
4296            shapefile
4297    
4298            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
4299            DBFTable and update its doc-string to reflect the fact that this
4300            is only the table interface to a DBF file. Table is now an alias
4301            for DBFTable for temporary backwards compatibility.
4302    
4303            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
4304            the last reference to the session goes away so that the temporary
4305            files are removed properly.
4306    
4307            * test/test_load.py (LoadSessionTest.tearDown): Remove the
4308            reference to the session to make sure the temporary files are
4309            removed.
4310    
4311    2003-04-29  Bernhard Herzog  <[email protected]>
4312    
4313            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
4314            the __parser instance variable into a normal local variable in
4315            read. It's only used there and read will never be called more than
4316            once. Plus it introduces a reference cycle that keeps can keep the
4317            session object alive for a long time.
4318    
4319    2003-04-29  Jonathan Coles   <[email protected]>
4320    
4321            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
4322            Projection an immutable item. Fixes RTbug #1825.
4323            (Projection.__init__): Initialize instance variables here.
4324            (ProjFile.Replace): New. Replace the given projection object with
4325            the new projection object. This solves the problem of needing the
4326            mutator Projection.SetProjection() in the ProjFrame class and
4327            allows a projection to change parameters without changing its
4328            location in the file.
4329    
4330            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
4331            be of type wxSAVE and should verify overwriting a file.
4332    
4333            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
4334            ProjFile.Replace() method instead of the mutator
4335            Projection.SetProjection(). Also requires that we reassign the
4336            client data to the new projection.
4337    
4338            * test/test_proj.py (TestProjection.test): Test GetName() and
4339            GetAllParameters()
4340            (TestProjFile.test): Remove tests for Set*() methods. Add tests
4341            for Replace().
4342    
4343    2003-04-25  Jonathan Coles   <[email protected]>
4344    
4345            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
4346            to save the name of the projection.
4347    
4348            * test/test_save.py (SaveSessionTest.testLayerProjection): New
4349            test to verify layer projections are saved correctly.
4350    
4351    2003-04-25  Jonathan Coles   <[email protected]>
4352    
4353            * Thuban/Model/proj.py (Projection.SetName): Set the name
4354            to "Unknown" if name is None.
4355            (Projection.SetAllParameters): New. Set the projection's
4356            parameter list to the one supplied.
4357            (Projection.SetProjection): New. Set the projection's
4358            properties to those of the supplied Projection.
4359    
4360            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
4361            the dialog title to include the map's title.
4362            (MainWindow.LayerProjection): Set the dialog title to include
4363            the layer's title.
4364    
4365            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
4366            error dialogs into a single method call.
4367            (ProjFrame.__VerifyButtons): Add more states to check.
4368            (ProjFrame.__GetProjection): Return the current state of an
4369            edited projection or None.
4370            (ProjFrame.__FillAvailList): Remove checks for states that
4371            shouldn't exist.
4372            (ProjFrame._OnNew): Clear all selected items and supply
4373            a projection panel if necessary.
4374    
4375            * test/test_proj.py (TestProjFile.test): Add tests for
4376            ProjFile.SetAllParameters, ProjFile.SetProjection,
4377            ProjFile.SetName.
4378    
4379    2003-04-25  Jonathan Coles   <[email protected]>
4380    
4381            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
4382            takes an optional argument to select the current projection.
4383            This does not guarantee that the item is visible due to
4384            limited wxWindows functionality. Fixes RTBug #1821.
4385    
4386    2003-04-25  Jonathan Coles   <[email protected]>
4387    
4388            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
4389            the projection name and use it when constructing the Projection
4390            object.
4391    
4392            * Thuban/Model/proj.py (Projection.__init__): Change the default
4393            value for 'name' to None and then test if name is equal to None
4394            in the body of the constructor. This way the caller doesn't have to
4395            know what the default value should be. Namely, useful in load.py
4396            where we have to pick a default value if the 'name' parameter
4397            doesn't exist in the XML file.
4398    
4399            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
4400            Tests a file where a layer has a projection.
4401    
4402    2003-04-25  Jonathan Coles   <[email protected]>
4403    
4404            * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
4405            tree for projection information.
4406    
4407            * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
4408            XMLReader.GetFileName.
4409            (SessionLoader): Added support for loading projection tags that
4410            appear inside a layer.
4411    
4412            * Thuban/Model/proj.py (ProjFile): Document the class. Move
4413            back to using a list because the order of the projections in
4414            the file is important to maintain. Fixes RTbug #1817.
4415    
4416            * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
4417            to ProjFile.GetFilename.
4418    
4419            * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
4420            information.
4421    
4422            * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
4423            ProjFrame._OnSaveAs. Removed old dead code from previous
4424            implementation.
4425            (ProjFrame._OnExport): Add support for exporting more than one
4426            projection to a single file.
4427            (ProjFrame.__FillAvailList): use string formatting (% operator)
4428            to build strings that are (partly) translated. Fixes RTbug #1818.
4429    
4430            * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
4431            class.
4432    
4433    2003-04-24  Bernhard Herzog  <[email protected]>
4434    
4435            * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
4436    
4437            * po/fr.po: New. French translation by Daniel Calvelo Aros
4438    
4439            * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
4440            empty strings.
4441    
4442    2003-04-24  Jonathan Coles   <[email protected]>
4443    
4444            * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
4445            implement the interface that the ProjFrame dialog expects.
4446    
4447            * Thuban/Model/proj.py (Projection.SetName): New. Allows the
4448            name of the projection to be changed.
4449            (ProjFile): Use a dictionary instead of a list so that removing
4450            projections is easier and we are sure about uniqueness.
4451            (ProjFile.Remove): Remove the given projection object.
4452    
4453            * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
4454            Return a list with only one projection file instead of searching for
4455            any projection file. This simplifies many things if the user can
4456            only have one system file and one user file.
4457    
4458            * Thuban/UI/classgen.py: Change all references to
4459            genCombo to genChoice.
4460    
4461            * Thuban/UI/mainwindow.py: Add a Projection option under the
4462            layer menu.
4463            (MainWindow.LayerProjection): New. Open up a projection window
4464            for a layer.
4465    
4466            * Thuban/UI/projdialog.py: Large changes to how the dialog is
4467            laid out. Use three panels instead of one. One for the list of
4468            projections, one for the edit controls, and one for the buttons.
4469            Fixed resizing problems so that the dialog resizes correctly
4470            when the projection panel changes. Added import/export, save, and
4471            new buttons/functionality.
4472    
4473    2003-04-24  Bernhard Herzog  <[email protected]>
4474    
4475            First step towards table management. Introduce a simple data
4476            abstraction so that we replace the data a layer uses more easily
4477            in the next step.
4478    
4479            * Thuban/Model/data.py: New file with a simple data abstraction
4480            that bundles shapefile and dbffile into one object.
4481    
4482            * Thuban/Model/session.py (Session.OpenShapefile): New method to
4483            open shapefiles and return a shape store object
4484    
4485            * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
4486            object instead of a shapefile filename. This introduces a new
4487            instance variable store holding the datastore. For intermediate
4488            backwards compatibility keep the old instance variables.
4489            (open_shapefile): Removed. No longer needed with the shape store.
4490            (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
4491            get the shape store used by a layer.
4492            (Layer.Destroy): No need to explicitly destroy the shapefile or
4493            table anymore.
4494    
4495            * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
4496            (MainWindow.AddLayer): Use the session's OpenShapefile method to
4497            open shapefiles
4498    
4499            * Thuban/Model/load.py (ProcessSession.start_layer): Use the
4500            session's OpenShapefile method to open shapefiles
4501    
4502            * test/test_classification.py
4503            (TestClassification.test_classification): Use the session's
4504            OpenShapefile method to open shapefiles and build the filename in
4505            a more platform independed way
4506    
4507            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
4508            Implement to have a session to use in the tests
4509            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
4510            (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
4511            session's OpenShapefile method to open shapefiles
4512            (TestLayerLegend.setUp): Instantiate a session so that we can use
4513            it to open shapefiles.
4514            (TestLayerLegend.tearDown): Make sure that all references to
4515            layers and session are removed otherwise we may get a resource
4516            leak
4517    
4518            * test/test_map.py (TestMapAddLayer.test_add_layer)
4519            (TestMapWithContents.setUp): Instantiate a session so that we can
4520            use it to open shapefiles.
4521            (TestMapWithContents.tearDown): Make sure that all references to
4522            layers, maps and sessions are removed otherwise we may get a
4523            resource leak
4524            ("__main__"): use support.run_tests() so that more info about
4525            uncollected garbage is printed
4526    
4527            * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
4528            session's OpenShapefile method to open shapefiles
4529            ("__main__"): use support.run_tests() so that more info about
4530            uncollected garbage is printed
4531    
4532            * test/test_selection.py (TestSelection.tearDown): Make sure that
4533            all references to the session and the selection are removed
4534            otherwise we may get a resource leak
4535            (TestSelection.get_layer): Instantiate a session so that we can
4536            use it to open shapefiles.
4537            ("__main__"): use support.run_tests() so that more info about
4538            uncollected garbage is printed
4539    
4540            * test/test_session.py (TestSessionBase.tearDown)
4541            (TestSessionWithContent.tearDown): Make sure that all references
4542            to the session and layers are removed otherwise we may get a
4543            resource leak
4544            (TestSessionWithContent.setUp): Use the session's OpenShapefile
4545            method to open shapefiles
4546    
4547    2003-04-24  Jonathan Coles   <[email protected]>
4548    
4549            * Thuban/Model/load.py (XMLReader.read): Should have been checking
4550            if the file_or_filename object had the 'read' attribute.
4551    
4552    2003-04-23  Jonathan Coles   <[email protected]>
4553    
4554            * Thuban/Model/resource.py: Fixes RTbug #1813.
4555            (ReadProjFile): Add documentation about which exceptions are raised.
4556            Always pass the exceptions up to the caller.
4557            (GetProjFiles): If the directory can't be read return an empty list.
4558            If any of the proj files can't be read skip that file and go
4559            on to the next one.
4560    
4561            * test/test_proj.py: Added test cases to handle nonexistent files,
4562            unreadable files, and files that don't parse correctly.
4563    
4564    2003-04-23  Jonathan Coles   <[email protected]>
4565    
4566            Projection dialog. Allows the user to select from a list
4567            of projection templates and optionally edit them and save new ones.
4568    
4569            * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
4570            (ProjPanel): Base class for projection specific panels.
4571            (TMPanel): Projection panel for Transverse Mercartor.
4572            (UTMPanel): Projection panel for Universal Transverse Mercartor.
4573            (LCCPanel): Projection panel for Lambert Conic Conformal.
4574            (GeoPanel): Projetion panel for Geographic Projection.
4575    
4576    2003-04-23  Jonathan Coles   <[email protected]>
4577    
4578            * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
4579            promote symmetry. There now exists XMLReader and XMLWriter.
4580            (XMLReader.read): New. Call to read the given file descriptor or
4581            filename.
4582            (XMLReader.close): New. Make sure the file is closed.
4583            (XMLReader.GetFileName): New. Return just the file name that is being
4584            read from.
4585            (XMLReader.GetDirectory): New. Return just the directory of the file
4586            that is being read.
4587            (XMLReader.AddDispatchers): New. Take a dictionary which contains
4588            the names of functions to call as the XML tree is parsed.
4589            (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
4590            (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
4591            (SessionLoader): Removed class variables start_dispatcher and
4592            end_dispatcher since this functionality is now part of a class
4593            instance. Fixes RTbug #1808.
4594            (SessionLoader.__init__): Add dispatcher functions.
4595            (load_xmlfile): Code was moved into the XMLReader.read().
4596            (load_session): Use modified SessionLoader.
4597    
4598            * Thuban/Model/map.py (Map.GetProjection): New. Returns the
4599            map's projection.
4600    
4601            * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
4602            GetAllParameters.
4603            (Projection.GetParameter): Returns the value for the given parameter.
4604    
4605            * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
4606            (GetProjFiles): Renamed from GetProjections. Now returns a list
4607            of ProjFile objects.
4608            (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
4609            a list of ProjFile objects whose files are not user defined.
4610            (GetUserProjFiles): Renamed from GetUserProjections. Returns a
4611            list of ProjFile objects whose files are user defined.
4612            (ProjFileReader): Extend new XMLReader.
4613    
4614            * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
4615            promote symmetry.
4616    
4617            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
4618            control instead of a wxComboBox. wxChoice controls do not generate
4619            events as the uses highlights possible choices which fixes problems
4620            with resizing the dialog when the use selects an option.
4621    
4622            * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
4623            control instead of a wxComboBox.
4624    
4625            * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
4626            dialog.
4627    
4628            * test/test_proj.py (TestProjection.test): New tests for GetParameter
4629            method.
4630    
4631    2003-04-22  Bernhard Herzog  <[email protected]>
4632    
4633            * Thuban/UI/mainwindow.py: Remove some unused imports and global
4634            constants
4635    
4636            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
4637            (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
4638    
4639    2003-04-17  Bernhard Herzog  <[email protected]>
4640    
4641            * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
4642            (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
4643            anymore.
4644            (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
4645            (Layer.ShapeType, Layer.Shape): No need to call
4646            self.open_shapefile since it's always called in __init__
4647    
4648            * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
4649            In wxPython 2.4 there's no need to extend MainLoop anymore since
4650            wxPython itself makes sure OnExit is called.
4651    
4652    2003-04-16  Jonathan Coles   <[email protected]>
4653    
4654            Initial putback of projection management code. Includes new
4655            classes to read and write projection files. The current load
4656            and save classes were abstracted a bit so they could be reused.
4657            The Projection class was extended to provide new methods and
4658            have a name.
4659    
4660            * Thuban/Model/load.py (XMLProcessor): New. Contains all the
4661            general XML reading methods that were part of ProcessSession.
4662    
4663            * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
4664            name.
4665            (ProjFile): New. Represents a file that contains projection
4666            information.
4667    
4668            * Thuban/Model/resource.py: New. Contains general utilities
4669            for read and writing projection files.
4670    
4671            * Thuban/Model/save.py (XMLSaver): New. Contains all the
4672            general XML writing methods that were part of SessionSaver.
4673            (SessionSaver): Renamed from Saver.
4674    
4675            * test/test_proj.py: New test cases for the projection
4676            file read and write functions.
4677    
4678    2003-04-16  Jonathan Coles   <[email protected]>
4679    
4680            * Thuban/Model/classification.py: Use repr() around values
4681            in the ClassGroup*.__repr__() methods so it is clearer when
4682            a value is a string and when it is a number.
4683    
4684            * test/test_load.py: Rework the classification test to test
4685            that we can load old files.
4686            (testLabels): Test a file where the groups have labels.
4687    
4688    2003-04-16  Bernhard Herzog  <[email protected]>
4689    
4690            Safer implementation of the performance enhancements of the
4691            low-level renderer:
4692            
4693            * extensions/thuban/wxproj.cpp (extract_projection)
4694            (extract_pointer): Rename extract_projection to extract_pointer
4695            and redefine its purpose to return the pointer stored in a CObject
4696            returned by the object's cobject method. Update all callers.
4697            (s_draw_info, free_draw_info, draw_polygon_init): Implement the
4698            handling of these low-level parameters so that each s_draw_info
4699            instance is handled as a CObject at python level that also
4700            contains real references to the actual python objects which
4701            contain the values in the struct. Add free_draw_info as the
4702            destructor.
4703            (draw_polygon_shape): Add the py_draw_info parameter which must a
4704            cobject containing an s_draw_info pointer.
4705    
4706            * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
4707            method to instantiat the low-level render parameter
4708            (MapRenderer.draw_shape_layer): Use the new method. Remove some
4709            commented out code.
4710            (MapRenderer.draw_polygon_shape): Make the first parameter not the
4711            layer but the low-level render parameter
4712            (ScreenRenderer.draw_shape_layer): Use the low-level render
4713            parameter.
4714    
4715    2003-04-15  Jonathan Coles   <[email protected]>
4716    
4717            * Thuban/Model/classification.py: Implemented __repr__ for
4718            the ClassGroup* classes to make debugging a bit easier.
4719            (ClassGroup.SetLabel): Check that the string is an instance
4720            of StringTypes not StringType. Accounts for Unicode strings.
4721    
4722            * Thuban/Model/color.py: Implemented __repr__ to make
4723            debugging a bit easier.
4724    
4725            * Thuban/Model/save.py (Saver.write_classification): Need to
4726            save the group label.
4727    
4728            * test/test_load.py (testClassification): New. Loads the
4729            iceland_sample_test.thuban file and checks if it was loaded
4730            correctly.
4731    
4732    2003-04-15  Jonathan Coles   <[email protected]>
4733    
4734            * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
4735            to improve rendering performance by initializing the variables
4736            that are not change each time draw_polygon_shape() is called.
4737            The values are stored in a global struct draw_info.
4738            (draw_polygon_shape): Removed initialization code that is
4739            now in draw_polygon_init().
4740    
4741            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
4742            drawing initialization call to draw_polygon_init()
4743            (MapRenderer.draw_polygon_shape): Use new signature of
4744            draw_polygon_shape.
4745    
4746            * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
4747            weirdness by setting the range to (1, maxint).
4748    
4749            * Thuban/Model/classification.py (ClassGroupProperties): Make
4750            instance variables private and optimize comparison operator
4751            by first checking if the color references are the same.
4752            (ClassGroupSingleton): Make instance variables private.
4753            (ClassGroupRange): Make instance variables private.
4754    
4755            * HOWTO-Release: Filled in missing steps for releasing packages.
4756    
4757    2003-04-15  Bernhard Herzog  <[email protected]>
4758    
4759            First stab at internationalized messages:
4760    
4761            * Thuban/__init__.py (_): Implement the translation function for
4762            real using the python gettext module.
4763    
4764            * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
4765            translate empty strings.
4766    
4767            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
4768            Add a missing space to a warning message
4769    
4770            * po/README: New. Notes about the management of the translation
4771            files.
4772    
4773            * po/Makefile: New. Makefile to help manage the translation files.
4774    
4775            * po/es.po: New. Spanish translation by Daniel Calvelo Aros
4776    
4777            * MANIFEST.in: Include the *.mo files in Resources/Locale and the
4778            translations and support files in po/
4779    
4780            * setup.py (data_files): Add the *.mo files to the data_files too
4781    
4782            * README: Add note about the translations when building from CVS
4783    
4784    2003-04-14  Jonathan Coles   <[email protected]>
4785    
4786            * Thuban/UI/dock.py: Fixes some window resizing problems most
4787            noticable under windows. Always assume the button bitmaps will
4788            be there. Code clean up.
4789            (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
4790            images for the dock/undock button to the same images.
4791            Work around for RTbug #1801.
4792    
4793            * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
4794            be allowed to grow within the sizer. Fixes a bug under Windows
4795            where the toolbar wasn't being drawn.
4796    
4797    2003-04-14  Frank Koormann   <[email protected]>
4798    
4799            * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
4800            Updated design to try to make the button functionality more
4801            transparent.
4802    
4803    2003-04-14  Jonathan Coles   <[email protected]>
4804    
4805            * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
4806            finalize the intialization of the panel.
4807    
4808            * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
4809            creation of the panel. Should be the last thing called in the
4810            initializer of a subclass.
4811    
4812            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
4813            set the current selections in the combo boxes. This is needed
4814            under Windows.
4815    
4816            * Thuban/UI/classifier.py (Classifier.__init__): Add a top
4817            level panel to the dialog so that the background colors are
4818            consistent under Windows.
4819    
4820    2003-04-11  Jonathan Coles   <[email protected]>
4821    
4822            * Thuban/UI/classgen.py: Change color ramps to start at white
4823            not black.
4824    
4825            * Thuban/UI/legend.py: Enable/disable the legend buttons when
4826            the legend changes. Fixes RTbug #1793.
4827    
4828            * test/test_classification.py: Added test for copying of
4829            classifications.
4830    
4831    2003-04-11  Jonathan Coles   <[email protected]>
4832    
4833            * Thuban/UI/resource.py: New. Centralize the loading of resources
4834            such as bitmaps.
4835    
4836            * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
4837            added images to the move buttons, added 'reverse' button.
4838            (CustomRampPanel.__init__): Added images to the move buttons.
4839            (GreyRamp): New. Generates a ramp from white to black.
4840            (HotToColdRamp): New. Generates a ramp from cold to hot colors.
4841    
4842            * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
4843            ID_PROPERTY_*.
4844            (Classifier.__init__): Minor changes to the layout.
4845            (Classifier._OnTitleChanged): Listen for when the user edits the
4846            title and update the dialog's title and the layer's title.
4847    
4848            * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
4849    
4850            * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
4851            (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
4852            if the layer's title changes.
4853    
4854            * Thuban/UI/mainwindow.py: Added new menu item and associated code
4855            to open a dialog to rename the map.
4856            (MainWindow): Use new resource class to import bitmaps.
4857    
4858    2003-04-11  Jonathan Coles   <[email protected]>
4859    
4860            * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
4861            Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
4862            Resources/Bitmaps/group_use_none.xpm,
4863            Resources/Bitmaps/group_use_not.xpm,
4864            Resources/Bitmaps/hide_layer.xpm,
4865            Resources/Bitmaps/layer_properties.xpm,
4866            Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
4867            Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
4868            New.
4869    
4870    2003-04-10  Jonathan Coles   <[email protected]>
4871    
4872            * Thuban/Model/classification.py: (ClassGroupRange.__init__):
4873            Should pass group to ClassGroup constructor.
4874    
4875    2003-04-10  Jonathan Coles   <[email protected]>
4876    
4877            * Thuban/Model/classification.py: (ClassGroup): Move all the common
4878            methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
4879            here. Implement SetVisible(), IsVisible().
4880            (ClassGroup.__init__): Add group parameter which acts as a copy
4881            constructor.
4882    
4883            * Thuban/UI/classifier.py (ClassTable): Add a new column for the
4884            "Visible" check boxes.
4885            (Classifier): Rename the buttons and refactor the code to match
4886            the new labels.
4887    
4888            * Thuban/UI/legend.py: Classify button is now called "Properties".
4889            Refactored the code to change variable names.
4890            (LegendTree.__FillTreeLayer): Only list a group if it is visible.
4891    
4892            * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
4893            MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
4894            renamed to MainWindow.LayerEditProperties.
4895            (MainWindow.ToggleLegend): Don't include map name in legend title.
4896            (MainWindow.SetMap): Added the map name to the window title.
4897            (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
4898            MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
4899            Functionality is found in the layer properties dialog.
4900    
4901            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
4902            draw visible groups.
4903    
4904    2003-04-09  Jonathan Coles   <[email protected]>
4905    
4906            * Thuban/UI/classgen.py: Modifications to allow simple
4907            addition and selection of new color schemes.
4908            (MonochromaticRamp): New. Generates a ramp between two colors.
4909            (RedRamp): New. Generates a ramp of all red.
4910            (GreenRamp): New. Generates a ramp of all green.
4911            (BlueRamp): New. Generates a ramp of all blue.
4912    
4913    2003-04-09  Jonathan Coles   <[email protected]>
4914    
4915            * Thuban/Model/classification.py (Classification.__deepcopy__):
4916            Need to copy over field and fieldType attributes.
4917    
4918            * Thuban/Model/table.py (Table.field_range): New. Retrive the
4919            maximum and minimum values over the entire table for a given
4920            field.
4921            (Table.GetUniqueValues): New. Retrieve all the unique values
4922            in the table for a given field.
4923    
4924            * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
4925            (GenUniquePanel): New. Controls to allow the user to select
4926            which unique field values they would like in the classification.
4927            (CustomRampPanel): Code that was in ClassGenDialog that allows
4928            the user to select the properties for a custom ramp.
4929            (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
4930    
4931            * Thuban/UI/classifier.py: Removed a lot of debugging code.
4932            (Classifier._SetClassification): Callback method so that the
4933            class generator can set the classification in the grid.
4934            (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
4935            editing of a group properties class into a wxWindows control.
4936    
4937            * Thuban/UI/dock.py: It was decided that if the user closes
4938            a dockable window the window should simply hide itself. That
4939            way if the user wants to show the dock again it appears in the
4940            same place as it was when it was closed.
4941            (DockableWindow.Destroy): Call renamed method OnDockDestroy().
4942            (DockableWindow._OnButtonClose): Hide the window instead of
4943            destroying it.
4944            (DockableWindow._OnClose): Hide the window instead of
4945            destroying it.
4946    
4947            * Thuban/UI/legend.py (LegendTree): Use a private method to
4948            consistently set the font and style of the text. Fixes RTbug #1786.
4949    
4950            * Thuban/UI/mainwindow.py: Import just the Classifier class.
4951    
4952    2003-04-07  Bernhard Herzog  <[email protected]>
4953    
4954            * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
4955            to the map module
4956    
4957    2003-04-07  Bernhard Herzog  <[email protected]>
4958    
4959            * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
4960            favor of ToggleSessionTree
4961            (MainWindow.ToggleSessionTree): New method to toggle visibility of
4962            the session tree.
4963            (MainWindow.SessionTreeShown): New method to return whether the
4964            session tree is currently shown.
4965            (MainWindow.ToggleLegend): New method to toggle visibility of the
4966            legend
4967            (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
4968            LegendShown
4969            (MainWindow.LegendShown): New method to return whether the legend
4970            is currently shown.
4971            (_method_command): Add checked parameter so we can define check
4972            menu items
4973            (_has_tree_window_shown, _has_legend_shown): Use the appropriate
4974            mainwindow methods.
4975            (show_session_tree, show_legend commands): Removed.
4976            (toggle_session_tree, toggle_legend commands): New commands to
4977            toggle the visibility of the dialogs
4978    
4979    2003-04-07  Jonathan Coles   <[email protected]>
4980    
4981            * Thuban/UI/classgen.py: Fix Windows problem.
4982    
4983            * Thuban/UI/dock.py: Fix Windows problem.
4984    
4985            * Thuban/UI/mainwindow.py: Use False instead of false.
4986            (MainWindow.ShowLegend): Remove unnecessary switch parameter.
4987    
4988    2003-04-07  Jonathan Coles   <[email protected]>
4989    
4990            Since we now say that the order of the groups in a classification
4991            matters, it makes sense to be able to manipulate that order. Most
4992            of the changes to Thuban/Model/classification.py are to that end.
4993    
4994            * Thuban/Model/classification.py (Classification.AppendGroup,
4995            Classification.InsertGroup, Classification.ReplaceGroup,
4996            Classification.RemoveGroup, Classification.GetGroup): Do as the
4997            names imply.
4998            (Classification.FindGroup): This was called GetGroup, but GetGroup
4999            takes an index, while FindGroup takes a value.
5000            (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
5001            REFERENCE. Currently there is a cyclic reference between the layer
5002            and its classification. If the classification doesn't need to know
5003            its owning layer we can change this, since it may make sense to be
5004            able to use the same classification with different layers.
5005    
5006            * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
5007    
5008            * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
5009            not AddGroup()
5010    
5011            * Thuban/UI/classifier.py: Now that we can depend on the order in
5012            a Classification and have methods to manipulate that order we don't
5013            need to use our own data structures in the grid. We can simply make
5014            the grid/table access the information they need from a copy of
5015            the classification object.
5016            (Classifier._OnCloseBtn): Event handler for when the user clicks
5017            'Close'. This is needed so if the user applies changes and then
5018            continues to change the table the user has the option of discarding
5019            the most recent changes and keeping what they applied.
5020    
5021            * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
5022            into the same group.
5023    
5024            * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
5025            with a really old version of proj, PJ_VERSION won't even be defined.
5026            If it isn't defined then just compile so that the function always
5027            returns Py_False.
5028    
5029            * test/test_classification.py: Fix tests to use the renamed methods.
5030            Still need to write tests for the new methods.
5031    
5032    2003-04-04  Jonathan Coles   <[email protected]>
5033    
5034            * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
5035            call to SetSelection out of the method and before the call
5036            to __SelectField in __init__. This prevents a recursion of events
5037            when _OnFieldSelect is triggered by the user.
5038    
5039    2003-04-04  Jonathan Coles   <[email protected]>
5040    
5041            * Thuban/Model/classification.py: Rename Color.None to
5042            Color.Transparent.
5043            (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
5044            Don't bother copying the color, since Colors are immutable.
5045    
5046            * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
5047            Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
5048            Thuban/UI/renderer.py, Thuban/UI/view.py:
5049            Rename Color.None to Color.Transparent.
5050        
5051            * test/test_classification.py, test/test_load.py: Rename Color.None
5052            to Color.Transparent.
5053    
5054    2003-04-04  Jonathan Coles   <[email protected]>
5055    
5056            * Thuban/Model/classification.py: Fix assert calls.
5057            (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
5058            Copy the color parameter rather than hold onto a reference.
5059    
5060            * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
5061            the color object.
5062            (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
5063            are sure there exists only one refernce to Color.None in the system.
5064            This allows us to use 'is' rather than the comparision functions.
5065            
5066            * Thuban/Model/save.py: Fix assert calls.
5067            
5068            * Thuban/UI/classifier.py: Fix assert calls.
5069            (ClassGrid._OnCellDClick): Call up to the classifier to open the
5070            dialog to edit the groups properties.
5071            (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
5072            correctly if a cell is resized.
5073            (ClassTable.SetClassification): New. Changes the classification
5074            that is in the table.
5075            (ClassTable.__SetRow): Allow groups to be prepended.
5076            (Classifier): New code for opening the EditProperties and
5077            GenerateRanges dialogs.
5078            (SelectPropertiesDialog.__GetColor): Only set the color in the
5079            color dialog if the current color is not None.
5080            
5081            * Thuban/UI/dock.py: Fix assert calls.
5082            
5083            * Thuban/UI/legend.py: Fix assert calls.
5084            
5085            * Thuban/UI/renderer.py: Fix assert calls.
5086            
5087            * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
5088            classifications.
5089            (GenRangePanel): Panel specific to range generation.
5090            (GenSingletonPanel): Panel specific to singleton generation.
5091            (ClassGenerator): Class responsible for actually generating
5092            the classification from the data gathered in the dialog box.
5093            (PropertyRamp): Generates properties whose values range from
5094            a starting property to an ending property.
5095    
5096    2003-04-03  Bernhard Herzog  <[email protected]>
5097    
5098            * test/support.py (print_garbage_information): New function that
5099            prints information about still connected messages and memory
5100            leaks.
5101            (run_suite): Removed.
5102            (run_tests): New function for use as a replacement of
5103            unittest.main in the test_* files. This one calls
5104            print_garbage_information at the end.
5105    
5106            * test/runtests.py (main): Use support.print_garbage_information
5107    
5108            * test/test_layer.py: Use support.run_tests instead of
5109            unittest.main so we get memory leak information
5110            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
5111            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
5112            (TestLayerLegend.test_visibility): Call the layer's Destroy method
5113            to fix a memory leak.
5114    
5115            * test/test_classification.py: Use support.run_tests instead of
5116            unittest.main so we get memory leak information
5117            (TestClassification.test_classification): Call the layer's Destroy
5118            method to fix a memory leak.
5119    
5120    2003-04-02  Bernhard Herzog  <[email protected]>
5121    
5122            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
5123            Handle the reference counts of the return value and errors in
5124            PyArg_ParseTuple correctly.
5125    
5126            * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
5127            sure the filename is absolute to avoid problems when saving the
5128            session again
5129    
5130            * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
5131    
5132    2003-04-01  Jonathan Coles   <[email protected]>
5133    
5134            *  Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
5135            that there actually are points in the returned list of points
5136            before trying to index into the list. The list may be empty if
5137            the shape is a Null Shape.
5138    
5139    2003-04-01  Bernhard Herzog  <[email protected]>
5140    
5141            * test/test_map.py: Don't use from <module> import *
5142    
5143    2003-04-01  Jonathan Coles   <[email protected]>
5144    
5145            * Thuban/Model/session.py: Use LAYER_CHANGED instead of
5146            LAYER_LEGEND_CHANGED
5147    
5148            * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
5149            self.Destroy() to close the window after yesterday's changes.
5150    
5151            * test/test_map.py, test/test_session.py: Fix messages that
5152            are sent from maps and layers.
5153    
5154    2003-03-31  Jonathan Coles   <[email protected]>
5155    
5156            * Thuban/UI/classifier.py: Commented out some debugging statements.
5157            (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
5158            RTbug #1769.
5159    
5160            * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
5161            position (although position doesn't work yet under GTK).
5162            (DockableWindow.Destroy): New. Called when the window must be
5163            closed. Namely needed when the DockFrame closes and must close
5164            its children.
5165            (DockFrame): Listen for EVT_CLOSE and destroy all children.
5166    
5167            * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
5168            when then window is told to close.
5169            (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
5170            comment in source for more info.
5171    
5172            * Thuban/UI/main.py: Show the legend by default when Thuban starts.
5173    
5174            * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
5175            symmetry with other such methods.
5176            (MainWindow.ShowLegend): Show the legend docked by default.
5177    
5178    2003-03-28  Jonathan Coles   <[email protected]>
5179    
5180            * Thuban/UI/classifier.py: Support for highlighting a specific
5181            group within the grid when the classification dialog is opened.
5182            Also contains a lot of debugging printouts which will later
5183            be removed.
5184    
5185            * Thuban/UI/dock.py: Complete rework on the dock code so that
5186            that it is fairly removed from the rest of the Thuban application.
5187            It is easy to add new docks which the rest of the program having
5188            to be aware of them.
5189    
5190            * Thuban/UI/legend.py: Modifications to support selecting a
5191            specific group in the classification dialog. Changed how layers
5192            are drawn when the layer is visible/invisible.
5193    
5194            * Thuban/UI/mainwindow.py: Removed legend specific code and
5195            replaced it with calls to the new dock code.
5196    
5197            * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
5198            to check if scale > 0. Trying to track down a divide by zero.
5199    
5200    2003-03-26  Jonathan Coles   <[email protected]>
5201    
5202            * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
5203            (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
5204            now part of DockableWindow.
5205            (LegendPanel.DoOnSelChanged): Select the current layer in the
5206            map.
5207            (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
5208            with the selected layer and/or group.
5209    
5210    2003-03-26  Jonathan Coles   <[email protected]>
5211    
5212            This putback contains the code for dockable windows. There is
5213            no support in wxWindows as of this date for windows that can
5214            attach themselves to other windows.
5215    
5216            The current model contains a DockableWindow which has a parent
5217            window for when it is detached and a dock window that it puts
5218            its contents in when it is docked. The contents of a DockableWindow
5219            must be a DockPanel. DockPanel itself derives from wxPanel.
5220    
5221            * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
5222            message, not a LAYER_LEGEND_CHANGED message.
5223    
5224            * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
5225    
5226            * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
5227            as one of the style properties for the fieldTypeText item to
5228            be sure that its size is correct when the text changes.
5229    
5230            * Thuban/UI/dock.py: New. Classes for the DockPanel and
5231            DockableWindow.
5232    
5233            * Thuban/UI/legend.py: Added some more buttons and made the
5234            LegendPanel a DockPanel.
5235    
5236            * Thuban/UI/mainwindow.py: Added sash windows to the main window
5237            and supporting functions for manipulating the sashes.
5238            (MainWindow.ShowLegend): Create a DockableWindow with the
5239            LegendPanel as the contents.
5240    
5241            * Thuban/UI/messages.py: Added DOCKABLE_* messages
5242    
5243            * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
5244            not LAYER_LEGEND_CHANGED, messages.
5245    
5246    2003-03-25  Jonathan Coles   <[email protected]>
5247    
5248            * setup.py: Added custom script bdist_rpm_build_script so that
5249            when the rpm is built the path to wx-config is correct.
5250    
5251            * setup.cfg: Added line saying to use the custom build script
5252    
5253    2003-03-20  Jonathan Coles   <[email protected]>
5254    
5255            Initial implementation of the Legend.
5256    
5257            * Thuban/UI/legend.py: New. Creates a window that shows the map's
5258            Legend information and allows the user to add/modify classifications
5259            and how the layers are drawn on the map.
5260    
5261            * setup.py: New command 'build_docs' which currently uses
5262            happydoc to generate html documentation for Thuban.
5263    
5264            * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
5265            Returns a string which is appropriately describes the group.
5266    
5267            * Thuban/Model/layer.py (Layer.SetClassification): Generate a
5268            LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
5269    
5270            * Thuban/Model/map.py (Map): Rename messages and use new, more
5271            specific, messages.
5272    
5273            * Thuban/Model/messages.py: New message to indicate that a layer's
5274            data has changed (LAYER_CHANGED). New map messages to indicate
5275            when layers have been added/removed/changed or if the stacking order
5276            of the layers has changed.
5277    
5278            * Thuban/Model/session.py: Rename and use new messages.
5279    
5280            * Thuban/UI/classifier.py: Remember if any changes have actually
5281            been applied so that if the dialog is cancelled without an application
5282            of changes we don't have to set a new classification.
5283            (ClassDataPreviewer): Pulled out the window specific code and put it
5284            ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
5285            symbols on any DC.
5286            
5287            * Thuban/UI/mainwindow.py: New code to open the legend.
5288    
5289            * Thuban/UI/view.py: Use new message names.
5290    
5291    2003-03-19  Jonathan Coles   <[email protected]>
5292    
5293            * Thuban/UI/main.py (verify_versions): New. Checks the versions
5294            of Python, wxPython, and some other libraries.
5295    
5296            * extensions/thuban/wxproj.cpp (check_version): Checks the given
5297            version against what wxproj was compiled with.
5298            (check_version_gtk): If wxproj was compiled with gtk then check
5299            the given version against the version of the gtk library
5300            currently being used.
5301    
5302    2003-03-14  Bernhard Herzog  <[email protected]>
5303    
5304            * test/test_command.py: Run the tests when the module is run as a
5305            script
5306    
5307    2003-03-14  Bernhard Herzog  <[email protected]>
5308    
5309            Implement selection of multiple selected shapes in the same layer:
5310    
5311            - Introduce a new class to hold the selection. This basically
5312              replaces the interactor which was nothing more than the
5313              selection anyway. A major difference is of course that the new
5314              selection class supports multiple selected shapes in one layer
5315            
5316            - Move the object that represents the selection from the
5317              application to the canvas. The canvas is a better place than the
5318              application because the selection represents which shapes and
5319              layer of the map displayed by the canvas are selected and
5320              affects how the map is drawn.
5321    
5322            - Make the selection and its messages publicly available through
5323              the mainwindow.
5324    
5325            - The non-modal dialogs do not get a reference to the interactor
5326              anymore as they can simply refer to their parent, the
5327              mainwindow, for the what the interactor had to offer.
5328    
5329            * Thuban/UI/selection.py: New module with a class to represent the
5330            selection.
5331    
5332            * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
5333            these unused messages
5334    
5335            * Thuban/UI/application.py (ThubanApplication.OnInit)
5336            (ThubanApplication.OnExit, ThubanApplication.SetSession): The
5337            interactor is gone now.
5338            (ThubanApplication.CreateMainWindow): There is no interactor
5339            anymore so we pass None as the interactor argument for now for
5340            compatibility.
5341    
5342            * Thuban/UI/view.py (MapCanvas.delegated_messages)
5343            (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
5344            Unsubscribe, delegate messages according to the delegated_messages
5345            class variable.
5346            (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
5347            attributes from instance variables as described with the
5348            delegated_methods class variable.
5349            (MapCanvas.__init__): New instance variable selection holding the
5350            current selection
5351            (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
5352            pass them on to the renderer
5353            (MapCanvas.SetMap): Clear the selection when a different map is
5354            selected.
5355            (MapCanvas.shape_selected): Simple force a complete redraw. The
5356            selection class now takes care of only issueing SHAPES_SELECTED
5357            messages when the set of selected shapes actually does change.
5358            (MapCanvas.SelectShapeAt): The selection is now managed in
5359            self.selection
5360    
5361            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
5362            (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
5363            Unsubscribe, delegate messages according to the delegated_messages
5364            class variable.
5365            (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
5366            attributes from instance variables as described with the
5367            delegated_methods class variable.
5368            (MainWindow.__init__): The interactor as ivar is gone. The
5369            parameter is still there for compatibility. The selection messages
5370            now come from the canvas.
5371            (MainWindow.current_layer, MainWindow.has_selected_layer):
5372            Delegate to the the canvas.
5373            (MainWindow.LayerShowTable, MainWindow.Classify)
5374            (MainWindow.identify_view_on_demand): The dialogs don't need the
5375            interactor parameter anymore.
5376    
5377            * Thuban/UI/tableview.py (TableFrame.__init__)
5378            (LayerTableFrame.__init__, LayerTableFrame.OnClose)
5379            (LayerTableFrame.row_selected): The interactor is gone. It's job
5380            from the dialog's point of view is now done by the mainwindow,
5381            i.e. the parent. Subscribe to SHAPES_SELECTED instead
5382            of SELECTED_SHAPE
5383            
5384            * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
5385            is gone. It's job from the dialog's point of view is now done by
5386            the mainwindow, i.e. the parent.
5387            
5388            * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
5389            gone. It's job from the dialog's point of view is now done by the
5390            mainwindow, i.e. the parent.
5391    
5392            * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
5393            gone. It's job from the dialog's point of view is now done by the
5394            mainwindow, i.e. the parent.
5395            (SessionTreeCtrl.__init__): New parameter mainwindow which is
5396            stored as self.mainwindow. The mainwindow is need so that the tree
5397            can still subscribe to the selection messages.
5398            (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
5399            (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
5400            selection is now accessible through the mainwindow. Subscribe to
5401            SHAPES_SELECTED instead of SELECTED_SHAPE
5402    
5403            * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
5404            SHAPES_SELECTED message now.
5405            (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
5406            so deal with multiple shapes
5407            (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
5408            gone. It's job from the dialog's point of view is now done by the
5409            mainwindow, i.e. the parent.
5410    
5411            * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
5412            parameter is now a list of shape ids.
5413            (RecordTable.SetTable): The second parameter is now a list of
5414            indices.
5415    
5416            * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
5417            selected_shape parameter and ivar to selected_shapes. It's now a
5418            list of shape ids.
5419            (MapRenderer.draw_label_layer): Deal with multiple selected
5420            shapes. Rearrange the code a bit so that the setup and shape type
5421            distinctions are only executed once.
5422    
5423            * test/test_selection.py: Test cases for the selection class
5424    
5425    2003-03-11  Jonathan Coles   <[email protected]>
5426    
5427            * Thuban/Model/load.py: Temporary fix so that the xml reader
5428            doesn't cause Thuban to crash.
5429    
5430            * Thuban/Model/layer.py: Handle the cyclic references between
5431            a layer and its classification better, and be sure to disconnect
5432            the classification from the layer when the layer is destroyed
5433            so that we don't maintain a cyclic reference that may not be
5434            garbage collected.
5435    
5436            * Thuban/Model/classification.py: See comment for layer.py.
5437    
5438    2003-03-12  Jan-Oliver Wagner <[email protected]>
5439    
5440            * HOWTO-Release: New. Information on the steps for releasing
5441            a new version of Thuban.
5442    
5443    2003-03-11  Jonathan Coles   <[email protected]>
5444    
5445            * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
5446            Use True instead of true.
5447            (Classifier): Should have a single panel in which all the controls lie.
5448    
5449            * Thuban/UI/proj4dialog.py: Add normal border.
5450    
5451            * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
5452    
5453            * Thuban/UI/mainwindow.py: Use True instead of true.
5454    
5455            * setup.py: Update some definitions to use wxWindows2.4 files
5456    
5457            * Data/iceland_sample_class.thuban: Fixed file so that the
5458            field_type information is present.
5459    
5460    2003-03-10  Jonathan Coles   <[email protected]>
5461    
5462            * Thuban/UI/classifier.py (Classifier.__init__): Make the
5463            field type label grow so that when the text changes the
5464            size is updated correctly. This may be a wxWindows bug.
5465    
5466    2003-03-10  Jonathan Coles   <[email protected]>
5467    
5468            * Thuban/UI/application.py: Changed SESSION_CHANGED to
5469            SESSION_REPLACED.
5470    
5471            * Thuban/UI/classifier.py: Wrap text with _().
5472            (ClassGrid.CreateTable): Set dimensions and size hints here,
5473            instead of in Reset, so we only set the size once.
5474    
5475            * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
5476    
5477            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
5478            Call Close() instead of Shutdown().
5479    
5480            * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
5481    
5482            * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
5483            Go back to using OnClose() instead of Shutdown().
5484    
5485    2003-03-10  Jonathan Coles   <[email protected]>
5486    
5487            * Thuban/UI/classifier.py (Classifier): SelectField() needed
5488            to know the old field index as well as the new one.
5489    
5490    2003-03-10  Jonathan Coles   <[email protected]>
5491    
5492            * Thuban/UI/classifier.py (Classifier): Use __SelectField()
5493            to correctly set the table information and call this from
5494            __init__ and from _OnFieldSelect so that all the information
5495            is up to date when the dialog opens and when a field is changed.
5496    
5497    2003-03-10  Jonathan Coles   <[email protected]>
5498    
5499            * Thuban/Model/classification.py (Classification): Don't use
5500            layer's message function directly, use the ClassChanged() method
5501            when then classification changes. SetField/SetFieldType/SetLayer
5502            must keep the information about field name and field type in
5503            sync when an owning layer is set or removed.
5504    
5505            * Thuban/Model/layer.py: Added ClassChanged() so that the
5506            classification can tell the layer when its data has changed.
5507            (Layer.SetClassification): Accepts None as an arguement to
5508            remove the current classification and correctly handles
5509            adding a new classification.
5510    
5511            * Thuban/Model/load.py: Comment out print statement
5512    
5513            * test/test_classification.py, test/test_save.py: New and
5514            improved tests.
5515    
5516    2003-03-07  Jonathan Coles   <[email protected]>
5517    
5518            * Thuban/Model/classification.py: Implemented __copy__ and
5519            __deepcopy__ for ClassGroup* and ClassGroupProperites so
5520            they can easily be copied by the classifier dialog.
5521            (ClassGroupProperites.__init__): The default line color should
5522            have been Color.Black.
5523    
5524            * Thuban/UI/classifier.py: Setting and Getting table values now
5525            uses a consistent set of functions.
5526            (Classifier): Now non-modal. Has field type label which changes
5527            as the field changes. Keep track of buttons in a list so that
5528            we can enable/disable the buttons when the None field is selected.
5529            (SelectPropertiesDialog): Add buttons to make the colors transparent.
5530    
5531            * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
5532            does what OnClose did, but can be called by the application to
5533            close a window. Needed when a session changes, and we have to
5534            close the classifier windows.
5535    
5536            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
5537            Shuts down open dialogs. Used when a new session is created
5538            or a session is opened.
5539            (MainWindow.SaveSession): Should only call application.SaveSession()
5540            if we don't call SaveSessionAs first.
5541            (MainWindow.Classify): Allow different classifier dialogs for
5542            different layers.
5543    
5544            * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
5545            the parent class handle it. Add Shutdown() to unsubscibe from
5546            event notification and call the parent Shutdown(). This was
5547            necessary so the application can close the tree window.
5548    
5549    2003-03-06  Jonathan Coles   <[email protected]>
5550    
5551            * Thuban/Model/classification.py: Minor documentation changes,
5552            Addition of __eq__ and __ne__ methods.
5553            (Classification.SetLayer): prevent recursion between this method
5554            and Layer.SetClassification().
5555    
5556            * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
5557    
5558            * Thuban/Model/layer.py (SetClassification): prevent recursion
5559            between this method and Classification.SetLayer().
5560    
5561            * test/test_classification.py, test/test_load.py,
5562            test/test_session.py: Fixed and added tests for the classification
5563            classes.
5564    
5565    2003-03-06  Bernhard Herzog  <[email protected]>
5566    
5567            * Thuban/UI/classifier.py (ClassGrid.__init__)
5568            (ClassGrid.CreateTable): Move the SetSelectionMode call to
5569            CreateTable because otherwise it triggers an assertion in
5570            wxPython/wxGTK 2.4.
5571    
5572    2003-03-05  Jonathan Coles   <[email protected]>
5573    
5574            * Thuban/common.py: Move FIELDTYPE constants back to table.py.
5575    
5576            * Thuban/Model/load.py: import FIELDTYPE constants from table.
5577    
5578            * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
5579    
5580            * Thuban/Model/table.py: Put FIELDTYPE constants back.
5581    
5582    2003-03-05  Jonathan Coles   <[email protected]>
5583    
5584            * Thuban/UI/classifier.py: Added class documentation.
5585            Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
5586            Store just the groups in the table and generate the other
5587            column information when it is requested. Add "None" field
5588            to pull-down to select no classification.
5589    
5590            * Thuban/common.py: Moved FIELDTYPE constants from table.py
5591            (Str2Num): Only catch ValueError exceptions.
5592    
5593            * Thuban/Model/classification.py: Class documentation. Renaming
5594            of methods with Stroke to Line. Groups are stored in a single
5595            list with the default as the first element. Groups are searched
5596            in the order they appear in the list.
5597    
5598            * Thuban/Model/color.py: Documentation.
5599    
5600            * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
5601            the kind of data represented by a field.
5602    
5603            * Thuban/Model/load.py (ProcessSession): Use proper string
5604            conversion function; fixes RTbug #1713.
5605    
5606            * Thuban/Model/save.py (Saver): Store field type information.
5607    
5608            * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
5609            (Table): Add field_info_by_name() to retrieve field information
5610            by specifying the field name, not the number.
5611    
5612            * Thuban/UI/mainwindow.py: Function name changes.
5613    
5614            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
5615            get the layer classification once. Don't try to classify
5616            values when the field is None: just use the default properties.
5617    
5618            * Thuban/UI/view.py: Function name changes.
5619    
5620            * Doc/thuban.dtd: Add field_type attribute to a classification.
5621    
5622    2003-03-04  Bernhard Herzog  <[email protected]>
5623    
5624            * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
5625            the fill and stroke layer attributes optional with suitable
5626            default values. Add the stroke_width layer attribute. Use correct
5627            syntax for empty elements. Make the attribute list for labels
5628            refer to the label element.
5629    
5630    2003-03-04  Bernhard Herzog  <[email protected]>
5631    
5632            * setup.py (thuban_build_py.build): Add a comment about distutils in
5633            Python 2.3 containing some of the functionality we implement in
5634            setup.py ourselves.
5635    
5636            * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
5637            before the selection mode. Doing it the other way round triggers
5638            an assertion in wxWindows.
5639    
5640            * Thuban/Model/save.py (escape): Fix typo in doc-string
5641    
5642            * Thuban/Model/classification.py: Remove unnecessary wxPython
5643            import
5644    
5645    2003-03-04  Jonathan Coles   <[email protected]>
5646    
5647            * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
5648            Parameter 'value' should default to None.
5649    
5650            * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
5651            the class attribute __classification is now private.
5652    
5653            * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
5654            Classifier to ClassGrid. Added support for removing selected rows,
5655            which including code for keeping track of when cells are selected,
5656            and deselected.
5657            (ClassTable): Support for added/removing rows. Fixed a problem
5658            with __ParseInput whereby it would not allow strings (only numbers)
5659            to be entered.
5660            (Classifier): Added button and supporting code for removing
5661            selected rows.
5662    
5663    2003-02-27  Jonathan Coles   <[email protected]>
5664    
5665            * Thuban/common.py: Moved color conversion functions into
5666            Thuban/UI/common.py.
5667            (Str2Num): Now converts the float (not the string) to a long/int
5668            so that an exception isn't thrown.
5669    
5670            * Thuban/UI/common.py: Common functions used in several UI modules
5671    
5672            * Thuban/Model/classification.py: Changed the class hierarchy
5673            so that a Classification consists of Groups which return
5674            Properties when a value matches a Group.
5675    
5676            * Thuban/Model/layer.py: Fixed name resolution problem.
5677    
5678            * Thuban/Model/load.py: Use new Classification and Group functions.
5679    
5680            * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
5681            failure.
5682            (Saver.write_classification): Use new Classification and Group
5683            functions.
5684    
5685            * Thuban/UI/classifier.py: Changes to use new Classification and Group
5686            functions. Fix to create a tuple with a single value instead of
5687            simply returning the value.
5688    
5689            * Thuban/UI/renderer.py: Use new Classification and Group functions.
5690            Use common.py functions.
5691    
5692            * Thuban/UI/tree.py: Use common.py functions.
5693            
5694            * test/test_classification.py: Use new Classification and Group
5695            classes.
5696    
5697    2003-02-24  Jonathan Coles   <[email protected]>
5698    
5699            * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
5700            functions from Thuban color objects to wxWindow colour objects.
5701    
5702            * Thuban/Model/classification.py (Classification): Renamed
5703            GetProperties() to GetClassData(). Used the new iterator
5704            in TreeInfo().
5705            (ClassIterator): Iterator implementation to iterate over the
5706            ClassData objects in a classification object.
5707    
5708            * Thuban/Model/save.py (Saver.write_classificaton): Uses
5709            the new iterator to save the classification information.
5710    
5711            * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
5712            for changing the stroke and fill colors and previewing the
5713            changes.
5714    
5715            * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
5716            MainWindow.SaveSessionAs): Text string changes so the dialogs
5717            have more meaningful titles.
5718    
5719            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
5720            Classification method name from GetProperties to GetClassData.
5721    
5722            * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
5723            instead of accessing now non-existent class variables.
5724    
5725    2003-02-24  Bernhard Herzog  <[email protected]>
5726    
5727            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
5728            unneeded Shape() call. Rendering is substantially faster without
5729            it and it avoids some problems with broken shape files.
5730    
5731    2003-02-20  Frank Koormann   <[email protected]>
5732    
5733            Force minimal size of identify and label dialogs. The autosizing
5734            looked too ugly.
5735    
5736            * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
5737            * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
5738            Set size of listctrl.
5739            * Thuban/UI/identifyview.py (IdentifyView.__init__):
5740            Set size of dialog.
5741    
5742    2003-02-19  Jonathan Coles   <[email protected]>
5743    
5744            * test/test_classification.py, test/test_layer.py,
5745            test/test_load.py, test/test_map.py, test/test_session.py:
5746            Updated the tests to use the new functions that are in the
5747            respective classes.
5748    
5749            * Thuban/Model/classification.py (Classification):
5750            Uses the new ClassData* classes. Modification messages are
5751            passed up to the parent layer (if it exists).
5752            (ClassData): New class to encapsulate the common data in each
5753            classification property.
5754            (ClassDataDefault): Represents the Default class. data.
5755            (ClassDataPoint): Represents a single class. data point
5756            (ClassDataRange): Represents a class. range
5757            (ClassDataMap): Represents a class. map (unused).
5758    
5759            * Thuban/Model/color.py: Added Color.None to represent something
5760            with no color. Color.Black represents the color black.
5761            (NoColor): Helper class derived from Color to represent something
5762            with no color.
5763    
5764            * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
5765            stroke_width attributes. Made the 'classification' attribute private.
5766            New methods for setting/getting the classification.
5767    
5768            * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
5769            to get the classifcation and use the new ClassData* classes to
5770            hold the classification data. Use Str2Num to convert numbers
5771            properly.
5772    
5773            * Thuban/Model/save.py (Saver): Use new Color and Classification
5774            methods
5775    
5776            * Thuban/UI/classifier.py (ClassGrid): New class to represent a
5777            custom grid.
5778            (ClassTable): Support for editing Values and Labels and for
5779            changing what type (point or range) of data is stored in each
5780            property based on how the user enters the data.
5781            (Classifier): Support for saving the new classifications and
5782            launching the dialog to edit a property.
5783            (SelectPropertiesDialog): New class for editing the visual
5784            properties of a classification (stroke color, width, and fill color)
5785            (ClassPreviewer): Took the Draw method from ClassRenderer and
5786            made most of it into this new class. Intend to use this class in
5787            the SelectPropertiesDialog for previewing changes.
5788    
5789            * Thuban/UI/renderer.py: Use new Color and Classification methods.
5790    
5791            * Thuban/UI/tree.py: Formatting changes.
5792    
5793            * Doc/thuban.dtd: Add 'label' element
5794    
5795            * Thuban/common.py: New. Contains common routines used throughout
5796            the code.
5797            (Str2Num): Takes a string and converts it to the "best" type of
5798            number.
5799    
5800    2003-02-14  Bernhard Herzog  <[email protected]>
5801    
5802            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
5803            dragging flag is always set to 0 even when the tool implementation
5804            raises an exception
5805    
5806    2003-02-11  Bernhard Herzog  <[email protected]>
5807    
5808            * Thuban/UI/application.py (ThubanApplication.splash_screen): New
5809            method to create a splash screen.
5810            (ThubanApplication.ShowMainWindow): New. Show the main window.
5811            Needed so the splash screen can display the mainwindow
5812            (ThubanApplication.OnInit): Call the
5813            new splash_screen method to determine whether the application
5814            should display a splash screen. If it displays a splash screen do
5815            not immediately show the main window.
5816    
5817    2003-02-11  Jonathan Coles  <[email protected]>
5818    
5819            * Thuban/Model/classification.py: Added import line to fix
5820            feature conflicts between running on python2.2 and python2.1.
5821    
5822            * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
5823            onto the clinfo parameter, so removed the deepcopy().
5824    
5825    2003-02-10  Jonathan Coles  <[email protected]>
5826    
5827            * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
5828            Added element_open variable to track opening and closing of tags
5829            so that tags that don't span more than one line are closed with
5830            /> instead of </tag_name>. Use the GetDefault*() methods of
5831            the Classification class.
5832    
5833            * Thuban/Model/classification.py (Classificaton): Added set and
5834            get methods for the default data. The class also takes a layer
5835            reference so that modification messages can be sent. Fixed the
5836            methods to use the new ClassData class.
5837            (ClassData): New class to encapsulate the classification data
5838    
5839            * Thuban/Model/layer.py (Layer): Remove the
5840            Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
5841            SetDefault*() methods on the layer's classification object.
5842            (Layer.__init__): Use the new SetDefault*() methods in the
5843            Classification class.
5844    
5845            * Thuban/Model/load.py (ProcessSession): Use the new ClassData
5846            object instead of a dictionary.
5847    
5848            * Thuban/UI/classifier.py (ClassRenderer): New class to
5849            draw the classifications in the dialog box's table.
5850            (Classifier): Modified to use the ClassRenderer class.
5851    
5852            * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
5853            methods of the Classification class.
5854    
5855            * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
5856            of the ClassData class.
5857    
5858            * test/test_classification.py, test/test_layer.py,
5859            test/test_map.py, test/test_session.py: Fix the tests to work
5860            with the above code changes.
5861    
5862    2003-02-03  Jonathan Coles  <[email protected]>
5863    
5864            * Thuban/Model/classification.py (Classification): Added getNull()
5865            to return the NullData reference
5866    
5867            * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
5868            Layer.SetStrokeWidth): Modified these functions to change the
5869            null data in the classification rather than keep these values
5870            directly in the Layer class. Menu options to change these values
5871            work again.
5872    
5873    2003-01-28  Jonathan Coles  <[email protected]>
5874    
5875            * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
5876            Fixed crashing problem on some systems. Dialog box shows
5877            classification data.
5878    
5879            * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
5880            Colors in the tree view.
5881    
5882            * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
5883            the tree info for classifications. Commented out unnecessary lines.
5884    
5885            * Thuban/Model/classification.py (Classification.TreeInfo): New
5886            function to add information about the classification into the
5887            tree view.
5888    
5889    2003-01-27  Jan-Oliver Wagner <[email protected]>
5890    
5891            * Thuban/__init__.py (_): New.
5892    
5893            * Thuban/Model/classification.py, Thuban/Model/extension.py,
5894            Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
5895            Thuban/Model/session.py, Thuban/UI/application.py,
5896            Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
5897            Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
5898            Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
5899            Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
5900            Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
5901    
5902    2003-01-27  Jonathan Coles  <[email protected]>
5903    
5904            * Thuban/Model/layer.py: Classification initialization calls.
5905    
5906            * Thuban/Model/classification.py: Created class to encapsulate
5907            a layer classification. Supports specific data points and
5908            ranges.
5909    
5910            * Thuban/Model/load.py: Added support for loading classification
5911            information.
5912    
5913            * Thuban/Model/save.py: Added support for saving classification
5914            information.
5915    
5916            * Thuban/UI/classifier.py: Initial class for a dialog box for
5917            specifying classification information.
5918    
5919            * Thuban/UI/mainwindows.py: Support for opening the classifier
5920            dialog.
5921    
5922            * Thuban/UI/renderer.py: Support for drawing a layer with the
5923            classification information.
5924    
5925            * Data/iceland_sample_class.thuban: iceland_sample with
5926            classification data.
5927    
5928            * test/test_classification: Tests for the Classification class.
5929    
5930    2002-12-09  Bernhard Herzog  <[email protected]>
5931    
5932            * test/test_command.py: New. Tests for the command classes.
5933    
5934            * Thuban/UI/command.py (ToolCommand): New class for tool commands.
5935            (Command.IsTool): New method to distinguish between command
5936            switching tools and other commands.
5937    
5938            * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
5939            the tool to avoid direct assignments to instance variables
5940            (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
5941            (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
5942            change the tool
5943    
5944            * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
5945            active tool's command turns insensitive, disable the tool.
5946            (_tool_command): Use the new ToolCommand class
5947    
5948            * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
5949            SelectTool method to change the tool
5950            (iconfile): Use the ToolCommand class
5951    
5952    2002-12-03  Bernhard Herzog  <[email protected]>
5953    
5954            * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
5955            the case of selected items that are not children of Layers or Maps
5956            properly. Previously this bug would trigger an assertion in
5957            wxWindows.
5958    
5959    2002-11-06  Frank Koormann  <[email protected]>
5960    
5961            * Thuban/UI/mainwindow.py: Altered the order of tools in the
5962            toolbar: First now are all navigation tools (Zoom In/Out, Pan,
5963            Full Extent).
5964    
5965    2002-10-23  Bernhard Herzog  <[email protected]>
5966    
5967            * setup.py (setup call): version now 0.1.3
5968    
5969            * MANIFEST.in: Add the files in test/
5970    
5971            * test/README: Add note about tests requiring the iceland data
5972    
5973            * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
5974            copyright notice.
5975    
5976    2002-10-18  Bernhard Herzog  <[email protected]>
5977    
5978            * test/test_map.py
5979            (TestMapWithContents.test_projected_bounding_box): Use an explicit
5980            epsilon.
5981    
5982            * test/support.py (FloatComparisonMixin.assertFloatEqual)
5983            (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
5984            message if the assertion fails and don't return the return value
5985            of self.assert_. In assertFloatSeqEqual the return meant that not
5986            all items of the sequence were compared.
5987    
5988    2002-09-20  Bernhard Herzog  <[email protected]>
5989    
5990            * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
5991    
5992            * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
5993    
5994            * test/test_map.py (TestMapWithContents.test_tree_info): Create
5995            the string with the bounding box on the fly because of platform
5996            differences in the way %g is handled.
5997    
5998            * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
5999            DBFfile too because Thuban layers can't yet cope missing DBF
6000            files.
6001    
6002    2002-09-20  Bernhard Herzog  <[email protected]>
6003    
6004            * test/test_menu.py: Use initthuban instead of
6005            add_thuban_dir_to_path to initialize Thuban.
6006    
6007            * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
6008            Mixin class for float comparisons
6009            (SubscriberMixin): New. Mixin class to test messages sent through
6010            the Connector class
6011    
6012            * test/README: Fix a typo and add the -v flag to the command for
6013            individual tests
6014    
6015            * test/test_session.py: New. Test cases for Thuban.Model.session
6016    
6017            * test/test_proj.py: New. Test cases for Thuban.Model.proj
6018    
6019            * test/test_map.py: New. Test cases for Thuban.Model.map
6020    
6021            * test/test_layer.py: New. Test cases for Thuban.Model.layer
6022    
6023            * test/test_label.py: New. Test cases for Thuban.Model.label
6024    
6025            * test/test_connector.py: New. Test cases for Thuban.Lib.connector
6026    
6027            * test/test_color.py: New. Test cases for Thuban.Model.color
6028    
6029            * test/test_base.py: New. Test cases for Thuban.Model.base
6030    
6031    2002-09-13  Bernhard Herzog  <[email protected]>
6032    
6033            * Thuban/Model/session.py (Session.forwarded_channels): Forward
6034            the CHANGED channel too.
6035    
6036            * Thuban/Model/map.py (Map.forwarded_channels): Forward the
6037            CHANGED channel too.
6038            (Map.__init__): Call the Modifiable constructor as well.
6039    
6040            * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
6041            event if the modified flag changes.
6042            (Modifiable.changed): Tweak the doc-string.
6043    
6044            * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
6045            (MainWindow.set_position_text): Put the code that puts the text
6046            with the mouse position into the status bar into the new method
6047            set_position_text so that it can overwritten in derived classes.
6048    
6049    2002-09-12  Bernhard Herzog  <[email protected]>
6050    
6051            * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
6052            message box on the main window.
6053    
6054    2002-09-11  Bernhard Herzog  <[email protected]>
6055    
6056            * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
6057            the 'E' because it's less likely to interfere with other menu
6058            entries.
6059            (MainWindow.build_menu): remove an incorrect comment.
6060    
6061    2002-09-10  Bernhard Herzog  <[email protected]>
6062    
6063            * Thuban/UI/mainwindow.py (MainWindow.Map): New.
6064            (_tool_command): Add sensitive parameter
6065            (_has_visible_map): Sensitivity callback to tools and other
6066            commands that require a visible map. Use it in map_zoom_in_tool,
6067            map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
6068            and map_full_extent
6069    
6070    2002-09-06  Bernhard Herzog  <[email protected]>
6071    
6072            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
6073            VIEW_POSITION
6074    
6075    2002-09-04  Frank Koormann  <[email protected]>
6076    
6077            * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
6078    
6079    2002-09-02  Bernhard Herzog  <[email protected]>
6080    
6081            * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
6082            wxWindows already and our implementation doesn't work correctly
6083            with wxGTK 2.3:
6084            (MapCanvas.__init__): Remove the instance variable
6085            (MapCanvas.OnPaint): Always call do_redraw when there's a map to
6086            be drawin
6087            (MapCanvas.OnIdle): Removed.
6088    
6089            * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
6090            a parameter to determine the size of the rectangle.
6091            (MapCanvas.find_shape_at): Create the box around the point on a
6092            layer by layer basis and make the size depend on the shape type.
6093            This solves a problem with the selection of point shapes at the
6094            border of the layer's bounding box
6095    
6096    2002-08-30  Bernhard Herzog  <[email protected]>
6097    
6098            * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
6099            for the sensitivity  of remove layer.
6100            (_can_remove_layer): New. Sensitivity callback for remove layer
6101            (Command layer_remove): Use _can_remove_layer
6102    
6103            * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
6104            determine whether a given layer can be deleted.
6105    
6106            * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
6107            (MapCanvas.do_redraw): Get rid of the unused update_region
6108            instance variable
6109    
6110            * Thuban/UI/view.py: Add/update some doc-strings.
6111    
6112            * test/: new subdirectory with a bunch of unit tests.
6113    
6114            * test/README, test/test_table.py, test/test_save.py,
6115            test/test_menu.py, test/test_load.py: Initial set of tests and
6116            brief instructions on how to run them
6117    
6118    2002-08-29  Bernhard Herzog  <[email protected]>
6119    
6120            * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
6121            arcs with multiple parts.
6122    
6123            * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
6124            Handle degenrate rectangles.
6125    
6126            * Thuban/Model/table.py: Make writing records work correctly:
6127            (Table.__init__): Keep track of whether the DBF is open for
6128            writing
6129            (Table.write_record): Open the DBF file for writing when necessary
6130    
6131    2002-08-27  Bernhard Herzog  <[email protected]>
6132    
6133            * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
6134            dbf files only for reading by default. Use a new writable dbf
6135            object for writing.
6136    
6137    2002-08-26  Bernhard Herzog  <[email protected]>
6138    
6139            * Thuban/UI/mainwindow.py: Refactor the context creation:
6140            (MainWindow.Context): New method to return a context
6141            (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
6142            new method
6143    
6144            * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
6145            layer table specific code from TableGrid into LayerTableGrid
6146            (TableFrame, LayerTableFrame): Split the layer table specific code
6147            from TableFrame into LayerTableFrame
6148            (LayerTableGrid.select_shape): Remove a debug print
6149    
6150            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
6151            LayerTableFrame
6152    
6153    2002-08-23  Bernhard Herzog  <[email protected]>
6154    
6155            * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
6156            absolute filename.
6157    
6158    2002-08-22  Bernhard Herzog  <[email protected]>
6159    
6160            * Thuban/Model/table.py (Table.write_record): New method to write
6161            records.
6162            (Table.__init__): Open the DBF file for writing too.
6163    
6164            * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
6165            into the underlying table.
6166    
6167            * extensions/shapelib/shapefil.h (DBFCommit),
6168            extensions/shapelib/dbfopen.c (DBFCommit): New API function to
6169            commit any changes made to the DBF file.
6170    
6171            * Thuban/UI/mainwindow.py (make_check_current_tool)
6172            (_tool_command): Put the code that generates the "checked"
6173            callback into a separate function so that we can reuse it
6174            elsewhere
6175    
6176            * Thuban/Model/save.py (Saver): New class to handle serializing a
6177            session into an XML file. The main reason to introduce a class is
6178            that applications built on Thuban can derive from it so that they
6179            can save additional information in a session file.
6180            (save_session): Delegate almost all the work to the Saver class.
6181            Rename the filename argument to file because it may be a file like
6182            object now.
6183    
6184            * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
6185            code. Remove the little test code which would be executed when the
6186            module is run as a script which didn't work anymore since it can't
6187            import the other Thuban modules.
6188            (ProcessSession, load_session): Refactor the ProcessSession to
6189            have one method for each element start and end tag so that derived
6190            classes can easily override the processing of individual tags.
6191            Also, always parse with namespaces enabled because applications
6192            built on top of Thuban will likely use namespaces if they extend
6193            the session file format.
6194    
6195    2002-08-21  Bernhard Herzog  <[email protected]>
6196    
6197            * setup.py (ThubanInstall.run): Don't repr install_lib_orig
6198            because thubaninit_contents will do it for us.
6199    
6200    2002-08-16  Jan-Oliver Wagner <[email protected]>
6201    
6202            * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
6203            tree window already open
6204    
6205    2002-08-15  Bernhard Herzog  <[email protected]>
6206    
6207            * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
6208            with self.
6209    
6210            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
6211            when we have actually captured it.
6212    
6213            * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
6214            shapefile and destroy the table.
6215    
6216            * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
6217    
6218    2002-08-14  Bernhard Herzog  <[email protected]>
6219    
6220            * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
6221            instance variable columns
6222            (RecordTable.GetTypeName): row and col may be negative in some
6223            cases.
6224    
6225            * setup.py (InstallLocal.initialize_options)
6226            (InstallLocal.finalize_options, InstallLocal.user_options): New
6227            option create-init-file to build a thubaninit.py when running
6228            install_local
6229            (InstallLocal.run): Create the thubaninit.py module when requested
6230            (thubaninit_contents): Split the template into several parts and
6231            create a new function thubaninit_contents that creates the
6232            contents of a thubaninit module.
6233            (ThubanInstall.run): Use the new function to create the thubaninit
6234            module.
6235    
6236    2002-07-30  Bernhard Herzog  <[email protected]>
6237    
6238            * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
6239            cleanup.
6240            (ThubanApplication.MainLoop): Extend to automatically call OnExit.
6241    
6242            * Thuban/Model/session.py (Session.Destroy): Don't bypass the
6243            direct base class' Destroy method.
6244    
6245            * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
6246            layers.
6247            (Map.Destroy): Destroy the label_layer as well and call the
6248            inherited Desatroymethod first so that no more messages are
6249            issued.
6250            (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
6251            message if the stacking order actually has changed. Add
6252            doc-strings.
6253            (Map.BoundingBox): Correct the doc-string.
6254            (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
6255            (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
6256    
6257            * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
6258            all labels.
6259    
6260    2002-07-29  Bernhard Herzog  <[email protected]>
6261    
6262            * Thuban/Model/map.py (Map.subscribe_layer_channels)
6263            (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
6264            to a layer's channels into separate methods.
6265            (Map.RemoveLayer, Map.AddLayer): Call the new methods
6266            (Map.Destroy): Unsubscribe from a layer's channels before
6267            destroying it.
6268    
6269            * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
6270            selected_layer parameter to searched_layer which is the layer to
6271            search in.
6272            (MapCanvas.SelectShapeAt): New parameter layer to restrict the
6273            search to that layer. Return the selected layer and shape.
6274    
6275            * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
6276            typo
6277    
6278    2002-07-24  Bernhard Herzog  <[email protected]>
6279    
6280            * Thuban/UI/application.py (ThubanApplication.create_session):
6281            Extend the doc string.
6282            (ThubanApplication.subscribe_session)
6283            (ThubanApplication.unsubscribe_session): New methods to
6284            subscribe/unsubscribe to/from session channels.
6285            (ThubanApplication.SetSession): Call the new methods here.
6286            (ThubanApplication.maps_changed, ThubanApplication.set_map):
6287            Renamed set_map to maps_changed. Its now a subscriber for
6288            MAPS_CHANGED.
6289    
6290            * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
6291            x-coordinate in case of simple clicks
6292    
6293            * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
6294            don't pass it as a parameter
6295    
6296            * Thuban/Model/session.py (Session.RemoveMap): New
6297    
6298            * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
6299            window size into a parameter.
6300    
6301    2002-07-23  Bernhard Herzog  <[email protected]>
6302    
6303            * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
6304            just commands.
6305    
6306            * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
6307            parameter list a bit to allow setting the window title and the
6308            initial message in the status bar. Update the callers.
6309    
6310            * Thuban/UI/application.py (ThubanApplication.OnInit)
6311            (ThubanApplication.CreateMainWindow): Put the mainwindow
6312            instantiation into a separate method so that it can be overridden
6313            by a subclass.
6314    
6315    2002-07-19  Bernhard Herzog  <[email protected]>
6316    
6317            * Thuban/Model/session.py: Issue a CHANGED message every time
6318            another changed message is issued to make it easier to get
6319            notified of changes.
6320            (Session): Update the doc string
6321            (Session.forward): Issue changed-events as CHANGED as well.
6322            (Session.changed): Overwrite the inherited version to issue
6323            CHANGED events as well.
6324    
6325            * Thuban/UI/tree.py: We can now simply subscribe to the session's
6326            CHANGED channel to be informed of changes.
6327            (SessionTreeCtrl.session_channels): Not needed any longer.
6328            (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
6329            Only have to (un)subscribe CHANGED
6330    
6331            * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
6332    
6333            * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
6334            for the wxPython locale bug to __init__.py so that it's
6335            automatically executed by anybody using UI code from Thuban.
6336    
6337    2002-07-18  Bernhard Herzog  <[email protected]>
6338    
6339            * Thuban/UI/main.py (main): app no longer needs to be global
6340    
6341            * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
6342            as parameter and store it in an instance variable
6343            (MainWindow.invoke_command, MainWindow.update_command_ui)
6344            (MainWindow.save_modified_session, MainWindow.NewSession)
6345            (MainWindow.OpenSession, MainWindow.SaveSession)
6346            (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
6347            application object.
6348    
6349            * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
6350            the main window with self.
6351    
6352            * Thuban/UI/context.py: New module with the context class
6353    
6354            * Thuban/UI/command.py (Command): Update doc string.
6355    
6356            * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
6357            MainWindow.update_command_ui): Pass an instance of the context
6358            class to the command's methods
6359            (check_current_tool, call_method): Handle the new context
6360            implementation
6361    
6362            * Examples/simple_extensions/simple_tool.py (simple_tool,
6363            check_simple_tool): Handle the new context implementation
6364    
6365            * Examples/simple_extensions/simple_command.py (simple_command):
6366            Handle the new context implementation. Update the comments about
6367            the context.
6368    
6369            * Thuban/UI/application.py (ThubanApplication.SetSession): Add
6370            doc-string
6371            (ThubanApplication.Session): New method to return the session
6372            object
6373    
6374            * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
6375            interactor's selected_layer may not be a layer of the current
6376            session when the tree is updated while a new session is being set.
6377    
6378    2002-07-17  Bernhard Herzog  <[email protected]>
6379    
6380            * Thuban/UI/tree.py (color_string): Removed. No longer used.
6381            (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
6382            update_tree into update_tree and add_items. The tree now uses a
6383            more generic way to display the contents of the tree.
6384            (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
6385    
6386            * Thuban/Model/layer.py (Layer.TreeInfo),
6387            Thuban/Model/extension.py (Extension.TreeInfo),
6388            Thuban/Model/map.py (Map.TreeInfo),
6389            Thuban/Model/session.py (Session.TreeInfo):
6390            Add TreeInfo methods to implement the new tree view update scheme
6391    
6392    2002-07-16  Bernhard Herzog  <[email protected]>
6393    
6394            * Thuban/UI/application.py: Don't use "import from" for the
6395            MainWindow. It can't always be resolved.
6396            (ThubanApplication.OnInit): change reference to MainWindow
6397            accordingly.
6398    
6399            * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
6400            completely
6401    
6402    2002-07-10  Bernhard Herzog  <[email protected]>
6403    
6404            * setup.py (create_init_module): New configurable variable whose
6405            default depends on the platform we're running on.
6406            (ThubanInstall.initialize_options): Initialize
6407            self.create_init_module from the global create_init_module
6408            (ThubanInstall.user_options): indictate that the options
6409            create-init-module and init-module-dir have arguments.
6410    
6411            * setup.py: In the setup call change the version number to include
6412            cvs.
6413    
6414            * MANIFEST.in: Add the files in Examples
6415    
6416    2002-07-09  Bernhard Herzog  <[email protected]>
6417    
6418            * setup.py: In the setup call, use the thuban homepage as the
6419            value of the url parameter.
6420    
6421            * Examples: New subdirectory for examples.
6422    
6423            * Examples/simple_extensions/simple_tool.xpm,
6424            Examples/simple_extensions/simple_tool.py,
6425            Examples/simple_extensions/simple_command.py,
6426            Examples/simple_extensions/README: Simple examples showing how to
6427            add new commands and tools.
6428    
6429            * setup.cfg (bdist_rpm): Add the default value for prefix and tell
6430            bdist_rpm that we also have an install script.
6431            (bdist_inno): Add 2002 to the copyright notice.
6432    
6433            * setup.py: Create a file in python's site-packages directory to
6434            make installation of Thuban as a library easier.
6435            (ThubanInstall.user_options): Add two new options,
6436            create-init-module and init-module-dir
6437            (ThubanInstall.expand_with_pure_python_dirs): New method to expand
6438            filenames for installation in the default directories.
6439            (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
6440            the inherited methods to capture some filenames before they're
6441            transformed too much by distutils.
6442            (ThubanInstall.run): Create the init module if requested.
6443            (ThubanInstall.thuban_init_filename): New method to return the
6444            full name of the init module.
6445            (ThubanInstall.get_outputs): Append the filename of the init
6446            module.
6447    
6448    2002-07-08  Bernhard Herzog  <[email protected]>
6449    
6450            * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
6451            handle the prefix properly which means that the default for the
6452            installation prefix should be /usr for RPMs and /usr/local when
6453            doing a normal source install.
6454            (bdist_rpm_install_script): Script to override the default install
6455            commands in the specfile generated by the bdist_rpm command.
6456            (thuban_bdist_rpm.user_options): Add a prefix option
6457            (thuban_bdist_rpm.initialize_options): Init the prefix option.
6458            Create the script files for the spec files as empty files here
6459            (thuban_bdist_rpm._make_spec_file): Override the inherited method
6460            to fill the script files with content.
6461    
6462            * Thuban/Model/save.py (relative_filename): Wrapper around
6463            Thuban.Lib.fileutil.relative_filename that accepts an empty dir
6464            argument. save_session now automatically uses this version,
6465            solving a problem when saving to a relative filename.
6466    
6467            * setup.py: In the setup call, make sure that the library
6468            directories are under $prefix/lib not directly under $prefix.
6469    
6470    2002-06-20  Jan-Oliver Wagner <[email protected]>
6471    
6472            * Thuban/Model/extension.py: new module to handle extension objects.
6473            * Thuban/Model/messages.py: new messages for extensions.
6474            * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
6475            Session.AddExtension): new for handling extensions.
6476            Also some other minor changes to round up extension handling.
6477            * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
6478            of Extension titles and title and names of its objects.
6479    
6480    2002-05-29  Bernhard Herzog  <[email protected]>
6481    
6482            * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
6483            the events for a command.
6484            (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
6485            Call bind_command_events to bind the events. add_toolbar_command
6486            can now bind events too so that it's possible to have commands
6487            that are only available through the toolbar.
6488            (MainWindow.init_ids): New instance variable events_bound to keep
6489            track of for which commands events have been bound.
6490    
6491    2002-05-28  Bernhard Herzog  <[email protected]>
6492    
6493            * Thuban/UI/menu.py: New module to build and manage menus.
6494    
6495            * Thuban/UI/mainwindow.py: Remove some unused imports.
6496            (MainWindow.__init__, main_menu): move the definition of the main
6497            menu from __init__ to the Menu instance main_menu.
6498            (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
6499            build the menu bar and sub-menus from a menu description.
6500    
6501            * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
6502            startup file
6503            (ThubanApplication.read_startup_files): New method to run
6504            ~/.thuban/thubanstart.py
6505    
6506            * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
6507            Move the toolbar definition to the Menu instance main_toolbar.
6508            (MainWindow.build_toolbar): New method to build the toolbar
6509            similar to the build_menu methods
6510    
6511    2002-05-23  Bernhard Herzog  <[email protected]>
6512    
6513            * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
6514            layer_outline_color. Fix it in the definition of the command too.
6515    
6516            * Thuban/UI/command.py (Command): Fix typo in doc string
6517    
6518    2002-05-22  Bernhard Herzog  <[email protected]>
6519    
6520            * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
6521            in the docstring
6522    
6523    2002-05-15  Bernhard Herzog  <[email protected]>
6524    
6525            * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
6526            when the shapefile is empty.
6527            (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
6528            now return None for empty shapefiles. Update doc-strings.
6529    
6530            * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
6531            the layer's bbox being None.
6532    
6533            * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
6534            layer's bbox being None.
6535    
6536            * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
6537            necessary.
6538            (MapCanvas.__init__): New instance variables, last_selected_layer
6539            and last_selected_shape to determine how the selection has
6540            changed.
6541    
6542            * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
6543            AutoSizeColumns because it will cause a traversal of the entire
6544            table which for large .dbf files will take a very long time.
6545    
6546    2002-05-14  Bernhard Herzog  <[email protected]>
6547    
6548            * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
6549            maximum depth for the tree than shapelib does by default.
6550    
6551    2002-05-10  Bernhard Herzog  <[email protected]>
6552    
6553            * setup.py (py_modules): The shptree modules doesn't have a
6554            wrapper, so don't include it in the py_modules
6555    
6556    2002-05-08  Bernhard Herzog  <[email protected]>
6557    
6558            * extensions/shapelib/shptree.c (compare_ints): Make arguments
6559            const void * as in the qsort prototype
6560            (SHPTreeFindLikelyShapes): Remove some unused variables.
6561    
6562            * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
6563            maintains to redraw the window during a drag.
6564            (MapCanvas.unprojected_rect_around_point): New method to determine
6565            a small region around a point for hit-testing.
6566            (MapCanvas.find_shape_at): Only test the shapes in a small region
6567            around the point.
6568    
6569            * setup.py: Increment the version to 0.1.2
6570    
6571            * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
6572            debug print and set session to None after unsubscribing
6573    
6574    2002-05-07  Bernhard Herzog  <[email protected]>
6575    
6576            * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
6577            the file to have a .thuban extension.
6578    
6579            * Thuban/UI/tree.py (session_channels): New class constant with
6580            all the session channels to subscribe to to update the tree
6581            (SessionTreeCtrl.session_changed): Remember the session so that we
6582            can unsubscribe properly. Use the new class constant to
6583            unsubscribe from the old session and subscribe to the new one.
6584            (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
6585            subscriptions of the SessionTreeCtrl.
6586            (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
6587    
6588            * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
6589            Session Tree" command to the file menu.
6590    
6591            * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
6592            as update_region to the renderer.
6593    
6594            * Thuban/UI/renderer.py
6595            (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
6596            update box is now directly a tuple, not a wxRect anymore.
6597    
6598            * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
6599            prints.
6600    
6601    2002-05-07  Bernhard Herzog  <[email protected]>
6602    
6603            * setup.py: Add the shptree extension module. See
6604            extensions/pyshapelib/ChangeLog for more details.
6605    
6606            * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
6607            extensions/shapelib/dbfopen.c: Really update to the versions of
6608            shapelib 1.2.9. For some reason it wasn't really done on
6609            2002-04-11.
6610    
6611            * extensions/shapelib/shptree.c: Modified version of shptree.c of
6612            shapelib 1.2.9. The only real difference is the use of qsort
6613            instead of a bubble sort implementation
6614    
6615            * Thuban/Model/layer.py (Layer.__init__): New instance variable
6616            shapetree to hold the shapelib quadtree for the shapefile
6617            (Layer.open_shapefile): Create the quad tree.
6618            (Layer.ShapesInRegion): New method to return the ids of shapes in
6619            a given region using the quad tree.
6620    
6621            * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
6622            comment
6623            (draw_polygon_shape): Accept both arcs and polygons.
6624            (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
6625            the api.
6626    
6627            * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
6628            return the shape ids to be rendered in a given layer.
6629            (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
6630            ids. Use draw_polygon_shape to draw arc shapes as well.
6631            (ScreenRenderer.RenderMap): New parameter for the rectangle that
6632            has to be updated
6633            (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
6634            calling it's ShapesInRegion method.
6635    
6636            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
6637            update_region for the update region.
6638            (MapCanvas.OnPaint): Maintain the update region
6639            (MapCanvas.do_redraw): Pass the bounding box of the update_region
6640            to the renderer when drawing the bitmap. Reset the update_region.
6641    
6642    2002-05-03  Bernhard Herzog  <[email protected]>
6643    
6644            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
6645            MainWindow.OpenSession): Change the file extension of the session
6646            files to .thuban
6647    
6648            * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
6649            Move the map channels to be forwarded by the session into the
6650            class constant with forwarded_channels. Also add
6651            LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
6652            forwarded_channels
6653    
6654            * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
6655            typo and some rewording).
6656    
6657    2002-05-02  Bernhard Herzog  <[email protected]>
6658    
6659            * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
6660            around to speed up most redraws:
6661            (MapCanvas.__init__): New instance variable bitmap which holds the
6662            bitmap
6663            (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
6664            self.bitmap to draw.
6665            (MapCanvas.full_redraw): New method to force a full redraw
6666            including the bitmap
6667            (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
6668            make sure the bitmap is redrawn.
6669            (MapCanvas.projection_changed, MapCanvas.set_view_transform,
6670            MapCanvas.shape_selected): Call full_redraw instead of readraw to
6671            make sure the bitmap is redrawn.
6672            (MapCanvas.OnSize): New method to handle size events so that the
6673            bitmap can be redrawn.
6674    
6675    2002-04-29  Bernhard Herzog  <[email protected]>
6676    
6677            * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
6678            canvas' VIEW_POSITION event
6679            (MainWindow.view_position_changed): Handler for VIEW_POSITION.
6680            Update the text in the status-bar accordingly.
6681    
6682            * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
6683            (MapCanvas.__del__): Implement because Publisher.__del__ has to be
6684            called.
6685            (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
6686            current_position
6687            (MapCanvas.set_current_position): New method to set
6688            current_position. Issue a VIEW_POSITION event
6689            (MapCanvas.CurrentPosition): New public method to return the value
6690            of current_position. Should be called when the VIEW_POSITION event
6691            is processed.
6692            (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
6693            Update the position.
6694            (MapCanvas.OnLeaveWindow): Set the position to None.
6695    
6696            * Thuban/UI/messages.py (VIEW_POSITION): New message for the
6697            position in the statusbar
6698    
6699    2002-04-26  Frank Koormann <[email protected]>
6700    
6701            * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
6702    
6703    2002-04-24  Frank Koormann <[email protected]>
6704    
6705            * Resources/Bitmaps/identify.xpm: shadow added
6706    
6707            * Resources/Bitmaps/fullextent.xpm: new
6708    
6709    2002-04-22  Jan-Oliver Wagner <[email protected]>
6710    
6711            * Thuban/UI/tree.py (update_tree): added test for None on map bounding
6712            box
6713    
6714    2002-04-21  Jan-Oliver Wagner <[email protected]>
6715    
6716            * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
6717    
6718            * Thuban/UI/tree.py (update_tree): added added map extent
6719    
6720            * Thuban/UI/mainwindow.py (_method_command): extended by parameter
6721            icon; added map_full_extend as tool
6722    
6723    2002-04-19  Jan-Oliver Wagner <[email protected]>
6724    
6725            * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
6726            saving _new_ sessions
6727    
6728            * Thuban/Model/session.py (create_empty_session): new session
6729            don't have a filename (set to None)
6730    
6731            * Thuban/UI/tree.py (update_tree): added filename and modified flag
6732    
6733            * Thuban/Model/load.py (ProcessSession): convert projection
6734            parameters from unicode to regular string
6735    
6736            * Data/iceland_sample.session: Added UTM Zone 26 projection.
6737    
6738    2002-04-11  Bernhard Herzog  <[email protected]>
6739    
6740            * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
6741            extensions/shapelib/dbfopen.c: Update to the versions of shapelib
6742            1.2.9
6743    
6744            * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
6745            the pyshapelib directoy into the list of include dirs, so that
6746            pyshapelib_api.h can be found.
6747    
6748            * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
6749            holds the pyshapelib C-API
6750            (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
6751            pyshapelib_api to access the shapelib functions.
6752            (initwxproj): Import the c_api from the shapelib module and
6753            initialize pyshapelib_api.
6754    
6755    2002-04-04  Bernhard Herzog  <[email protected]>
6756    
6757            * setup.py (thuban_bdist_rpm.initialize_options): Use
6758            initialize_options to create the scripts for the rpm.
6759    
6760            * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
6761    
6762    2002-04-03  Bernhard Herzog  <[email protected]>
6763    
6764            * setup.py: Increment version to 0.1.1
6765    
6766            * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
6767            Layer" and "Remove Layer" commands from the layer menu to the map
6768            menu
6769    
6770    2002-02-15  Bernhard Herzog  <[email protected]>
6771    
6772            * Thuban/Model/layer.py (Layer.Shape): list append only takes one
6773            argument (python <= 1.5.2 erroneously accepted multiuple
6774            arguments)
6775    
6776    2002-02-04  Bernhard Herzog  <[email protected]>
6777    
6778            * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
6779            RecordGrid in the identifyview.
6780            (IdentifyView.__init__): Use IdentifyGridCtrl instead of
6781            IdentifyListCtrl. The grid allows editing of the values.
6782    
6783            * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
6784            implementing a grid for a single row of a thuban table.
6785    
6786            * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
6787            layers by default. Easier to use than the previous default of only
6788            searching through the select layer which meant that if no layer
6789            was selected, you couldn't select a shape.
6790    
6791            * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
6792    
6793            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
6794            stroke_width attribute
6795    
6796            * Thuban/Model/save.py (save_session): Write the new stroke_width
6797            attribute
6798    
6799            * Thuban/Model/load.py (ProcessSession.startElement): Read the
6800            stroke_width attribute
6801    
6802            * Thuban/Model/layer.py (Layer.__init__): New parameter and
6803            instance variable stroke_width
6804            (Layer.SetStrokeWidth): Set the stroke_width.
6805    
6806    2002-02-01  Bernhard Herzog  <[email protected]>
6807    
6808            * extensions/thuban/wxproj.cpp (project_points): Fix two
6809            off-by-one errors in the last loop that joins the various parts
6810            together.
6811    
6812    2002-01-14  Bernhard Herzog  <[email protected]>
6813    
6814            * setup.py (data_dist.make_distribution): Fix some typos
6815    
6816    2001-09-18  Bernhard Herzog  <[email protected]>
6817    
6818            * README: Slight tweaking in preparation for the 0.1 release
6819    
6820            * setup.cfg: Add section for sdist to create both tgz and zip
6821            archives
6822    
6823            * setup.py: increase version number to 0.1
6824            (data_dist): New command class for data distribution
6825    
6826    2001-09-14  Bernhard Herzog  <[email protected]>
6827    
6828            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
6829            Handle the case of no layer (i.e. layer is None) properly.
6830    
6831            * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
6832            Set the initial selection of the combo boxes to reflect the
6833            projection we're starting with in a way that works on windows,
6834            too.
6835    
6836            * Thuban/Lib/connector.py (Connector.print_connections): Print the
6837            puiblisher's ids in hex to make it easier to compare them to the
6838            standard repr of python methods
6839    
6840            * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
6841            messages
6842    
6843    2001-09-13  Bernhard Herzog  <[email protected]>
6844    
6845            * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
6846            deselect the layer if no layer is selected
6847    
6848            * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
6849            idle time when there actually is something to draw. If there's
6850            nothing to draw simply clear the window
6851            (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
6852            (MapCanvas.SetMap): force a redraw in all cases because
6853            FitMapToWindow doesn't always do it.
6854            (MapCanvas.ZoomFactor): Add an optional parameter, center, to
6855            specify the point to move into the center of the window
6856            (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
6857            dragged, zoon in/out by a factor of 2
6858            (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
6859            index, i.e. reversed drawing order) so that objects appearing to
6860            be in from of others are selected first. This is probably mostly
6861            relevant for point shapes where the symbols used may overlap
6862    
6863            * Thuban/Model/session.py (create_empty_session): Unset the
6864            modified bit before returning it
6865    
6866            * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
6867            create_empty_session session to create the new, empty session.
6868    
6869            * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
6870            the tool bitmaps.
6871            (MainWindow.OnClose, MainWindow.save_modified_session): Separate
6872            the code that asks whether the session should be saved into the
6873            new method save_modified_session.
6874            (MainWindow.OpenSession, MainWindow.NewSession): Use the new
6875            method to save modified session here too.
6876    
6877  2001-09-11  Bernhard Herzog  <[email protected]>  2001-09-11  Bernhard Herzog  <[email protected]>
6878    
6879          * setup.py (InnoIconItem): fix typo          * setup.py (InnoIconItem): fix typo
# Line 62  Line 6938 
6938          (MainWindow.identify_view_on_demand): Store the interactor in an          (MainWindow.identify_view_on_demand): Store the interactor in an
6939          instvar and use that reference instead of going through main.app          instvar and use that reference instead of going through main.app
6940    
6941          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
6942          * Thuban/UI/application.py (ThubanApplication.OnInit):          * Thuban/UI/application.py (ThubanApplication.OnInit):
6943          * Thuban/UI/main.py (main): Create the session tree view in main          * Thuban/UI/main.py (main): Create the session tree view in main
6944          with the new mainwindow method ShowSessionTree and not directly          with the new mainwindow method ShowSessionTree and not directly
6945          the application's OnInit method          the application's OnInit method
# Line 79  Line 6955 
6955          layer to the tableview dialog.          layer to the tableview dialog.
6956    
6957          * Thuban/UI/tableview.py: Add some doc-strings          * Thuban/UI/tableview.py: Add some doc-strings
6958          (TableGrid):          (TableGrid):
6959          (TableGrid.OnRangeSelect):          (TableGrid.OnRangeSelect):
6960          (TableGrid.OnSelectCell):          (TableGrid.OnSelectCell):
6961          (TableFrame.__init__):          (TableFrame.__init__):
# Line 146  Line 7022 
7022  2001-09-05  Bernhard Herzog  <[email protected]>  2001-09-05  Bernhard Herzog  <[email protected]>
7023    
7024          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
7025            
7026          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
7027          interactor to pass through to the MapCanvas          interactor to pass through to the MapCanvas
7028            
7029          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
7030          argument to the MainWindow constructor to get rid of the ugly hack          argument to the MainWindow constructor to get rid of the ugly hack
7031          that made main.app available early just so that the mapcanvas          that made main.app available early just so that the mapcanvas
# Line 196  Line 7072 
7072          (ThubanInstall.run): Remove the leading install root from the          (ThubanInstall.run): Remove the leading install root from the
7073          script filename if an install root was specified and use the new          script filename if an install root was specified and use the new
7074          link_file method          link_file method
7075            
7076          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
7077          the window when the first layer is added to the map.          the window when the first layer is added to the map.
7078    
# Line 233  Line 7109 
7109          (InnoIconItem): Helper class for bdist_inno          (InnoIconItem): Helper class for bdist_inno
7110          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
7111          this together with the appropriate parameters, to the setup call.          this together with the appropriate parameters, to the setup call.
7112            
7113          * setup.cfg (bdist_inno): added new section for the inno setup          * setup.cfg (bdist_inno): added new section for the inno setup
7114          installer          installer
7115    

Legend:
Removed from v.55  
changed lines
  Added in v.1663

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26