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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26