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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1764 - (show annotations)
Tue Sep 30 13:11:45 2003 UTC (21 years, 5 months ago) by frank
File size: 192161 byte(s)
Thuban/version.py: Version information update.

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26