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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1304 - (hide annotations)
Wed Jun 25 09:40:02 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 204614 byte(s)
updated ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26