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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1459 - (hide annotations)
Fri Jul 18 15:09:32 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 230314 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26