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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1897 - (hide annotations)
Fri Oct 31 11:55:44 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 315526 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26