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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1479 - (show annotations)
Thu Jul 24 17:01:43 2003 UTC (21 years, 7 months ago) by frank
Original Path: trunk/thuban/ChangeLog
File size: 234230 byte(s)
Documentation Update

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26