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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1657 - (hide annotations)
Mon Aug 25 18:27:16 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 271404 byte(s)
update ChangeLog

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

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26