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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1465 - (show annotations)
Fri Jul 18 18:21:07 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 232379 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26