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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1720 - (hide annotations)
Fri Sep 19 09:17:31 2003 UTC (21 years, 5 months ago) by jan
Original Path: trunk/thuban/ChangeLog
File size: 284144 byte(s)
extended manual

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26