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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1279 - (hide annotations)
Fri Jun 20 17:47:12 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 201637 byte(s)
updated ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26