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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1325 - (show annotations)
Tue Jul 1 09:29:27 2003 UTC (21 years, 8 months ago) by frank
Original Path: trunk/thuban/ChangeLog
File size: 206446 byte(s)
BugFix #1963

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26