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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1451 - (show annotations)
Fri Jul 18 10:19:19 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 227295 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26