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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26