/[thuban]/branches/greater-ms3/thuban/ChangeLog
ViewVC logotype

Contents of /branches/greater-ms3/thuban/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1765 - (show annotations)
Tue Sep 30 13:17:11 2003 UTC (21 years, 5 months ago) by frank
File size: 192316 byte(s)
Thuban/UI/tableview.py (TableGrid.__init__):
    Set FormattedFloatRenderer to '%.4g'

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26