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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1767 - (hide annotations)
Wed Oct 1 09:52:52 2003 UTC (21 years, 5 months ago) by jan
Original Path: trunk/thuban/ChangeLog
File size: 288198 byte(s)
removed #! lines

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26