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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1457 - (show annotations)
Fri Jul 18 14:56:29 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 230051 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26