/[thuban]/branches/WIP-pyshapelib-bramz/ChangeLog
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26