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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1283 - (show annotations)
Mon Jun 23 09:47:31 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 202590 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26