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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1532 - (hide annotations)
Thu Jul 31 10:58:24 2003 UTC (21 years, 7 months ago) by frank
Original Path: trunk/thuban/ChangeLog
File size: 239800 byte(s)
* Doc/manual/thuban-manual.xml:
	Changed the screenshot elements to figure.
	Changed some variablelist elements to itemizedlist.
	Added section on GDAL formats.

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26