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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1829 - (hide annotations)
Thu Oct 16 13:14:42 2003 UTC (21 years, 4 months ago) by silke
Original Path: trunk/thuban/ChangeLog
File size: 300548 byte(s)
New directory with configuration files for building a thuban deb-package.

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26