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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1470 - (show annotations)
Tue Jul 22 14:04:49 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 233974 byte(s)
updated ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26