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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 634 by jonathan, Wed Apr 9 15:41:58 2003 UTC revision 985 by bh, Thu May 22 16:38:01 2003 UTC
# Line 1  Line 1 
1    2003-05-22  Bernhard Herzog  <[email protected]>
2    
3            Implement a way to discover dependencies between tables and
4            shapestores.
5    
6            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
7            (TransientJoinedTable.Dependencies)
8            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
9            interface
10            (TransientJoinedTable.__init__): Keep tack of the original table
11            objects in addition to the corresponding transient tables.
12    
13            * Thuban/Model/table.py (DBFTable.Dependencies)
14            (MemoryTable.Dependencies): New. Implement the dependencies
15            interface
16    
17            * Thuban/Model/data.py (ShapeTable): New. Helper class for
18            ShapefileStore
19            (ShapefileStore.__init__): Use ShapeTable instead of
20            AutoTransientTable
21            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
22            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
23            methods for filename and type
24            (ShapefileStore.Dependencies): New. Implement the dependencies
25            interface
26            (DerivedShapeStore): New class to replace SimpleStore. The main
27            difference to SimpleStore is that it depends not on a shapefile
28            but another shapestore which expresses the dependencies a bit
29            better
30            (SimpleStore.__init__): Add deprecation warning.
31    
32            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
33            Test for the Dependencies method.
34    
35            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
36            New. Test for the Dependencies method.
37    
38            * test/test_transientdb.py
39            (TestTransientTable.test_auto_transient_table_dependencies): New.
40            Test for the Dependencies method.
41            (TestTransientTable.test_transient_joined_table): Add test for the
42            Dependencies method.
43    
44            * test/test_session.py (TestSessionSimple.setUp)
45            (TestSessionSimple.tearDown): New. Implement a better way to
46            destroy the sessions.
47            (TestSessionSimple.test_initial_state)
48            (TestSessionSimple.test_add_table): Bind session to self.session
49            so that it's destroyed by tearDown
50            (TestSessionSimple.test_open_shapefile): New. Test for
51            OpenShapefile and the object it returns
52    
53    2003-05-22  Bernhard Herzog  <[email protected]>
54    
55            * Thuban/Model/session.py (Session.AddTable): New method to
56            register tables with the session.
57            (Session.Tables): Return the tables registered with AddTable too.
58    
59            * test/test_session.py (TestSessionSimple.test_add_table): New.
60            Test case for the AddTable method
61    
62    2003-05-22  Frank Koormann  <[email protected]>
63    
64            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
65            lower right corner, center labels for selections, initialize controls
66            in reasonable order for keyboard navigation.
67    
68            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
69            (ProjFrame.__DoOnProjAvail): Determine position of current projection
70            using the wxListBox.FindString() method. Still a problem (#1886)
71    
72            * Thuban/UI/classifier.py
73            (Classifier.__init__, SelectPropertiesDialog.__init__)
74    
75            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
76            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
77            different classification types from here to __init__.
78            (GenUniquePanel.__init__): Set the column width of the first field
79            in the Field ListCtrl to the full width.
80    
81            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
82            Button to 'Export'. Center Buttons in Selection Box, set Focus to
83            Grid.
84            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
85            changes focus to the Selection when pressing "Alt-S".
86    
87            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
88            the text if not visible. The italic font sometimes exceeds the
89            rendering area.
90    
91    2003-05-21  Jonathan Coles   <[email protected]>
92    
93            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
94            to OnClose so that Thuban closes correctly.
95    
96            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
97            DockFrame.OnClose, not DockFrame._OnClose.
98    
99    2003-05-21  Jonathan Coles   <[email protected]>
100    
101            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
102            references to 'inf' and use new Range __init__ to pass floats
103            directly rather than converting them to strings first.
104            Fixes RTBug #1876.
105    
106            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
107            Use new Range ___init__ to pass floats.
108    
109            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
110            filename is a valid image file. Throw IOError otherwise.
111    
112            * Thuban/Model/range.py: Brought over new Range from SciParam that
113            is immutable and has an __init__ which can accept floats.
114    
115            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
116            into try block. AddLayer doesn't throw any exceptions anymore.
117            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
118            try block.
119    
120            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
121            the first item in choices. Fixes RTBug #1882.
122    
123            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
124            has gone to 0 which is a serious problem. abort.
125            (MapRenderer.draw_raster_layer): Catch IOError seperately and
126            print the error from GDAL.
127    
128            * Thuban/UI/tableview.py (TableGrid.__init__): Call
129            ToggleEventListeners to turn on listening.
130            (TableGrid.ToggleEventListeners): New. Turns event listening on
131            and off so as to prevent excessive messages.
132            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
133            to suppress excessive messages when selecting many rows.
134            Fixes RTBug #1880.
135    
136            * Thuban/UI/view.py: Added checks against if scale == 0. This
137            is a serious problem that can occur when an image without
138            geo data is loading and causes the map projection bounds to
139            go to infinity. Right now, the solution is to simply try
140            to recover.
141    
142            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
143            to set the MFILEReceiver attributes even if the data is NULL.
144    
145            * extensions/thuban/gdalwarp.cpp: Improved the error handling
146            and passed GDAL messages back up to the Python layer. Also
147            tried to fix some memory leaks that were present in the original
148            utility but didn't matter because the program aborted.
149    
150            * test/test_range.py: Copied over tests from SciParam. Removed
151            tests against importing. Fixes RTBug #1867.
152    
153    2003-05-21  Bernhard Herzog  <[email protected]>
154    
155            * test/test_load.py: Remove unused imports and restructure the
156            test code
157            (LoadSessionTest): Split into one class for each test and turn
158            LoadSessionTest itself into the base class for all such session
159            tests.
160            (ClassificationTest): New base class for load tests that test
161            classifications
162            (TestSingleLayer, TestLayerVisibility, TestClassification)
163            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
164            for the individual tests
165    
166            * test/support.py (FileLoadTestCase.filename): New base class for
167            file loading tests
168    
169    2003-05-21  Jan-Oliver Wagner <[email protected]>
170    
171            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
172            Mercator' to 'UTM Zone 32' as a more convenient example.
173            Added 'Gauss Krueger Zone 6'.
174    
175            * Data/iceland_sample_raster.thuban: political polygon now
176            filled transparent to have the raster image visible at once.
177    
178    2003-05-21  Frank Koormann  <[email protected]>
179    
180            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
181            OnClose() to keep in sync with extensions. Internally Thuban
182            still uses "underscored" names.
183    
184    2003-05-20  Jonathan Coles   <[email protected]>
185    
186            This puts back Raster layer support. These layers support projections
187            through the GDAL library. Currently, the CVS version is being used.
188            There are no Debian packages available although this may change soon.
189            A GDAL driver was extended to support writing to memory rather to
190            files.
191    
192            There is still some work that needs to be done, such as some error
193            handling when loading invalid images or when there is a problem
194            projecting the image. This putback simply checks in the majority
195            of the work.
196    
197            * setup.py: Add gdalwarp library extension.
198    
199            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
200            Defaults to False, but can be overridden by subclasses if they
201            support classification.
202            (RasterLayer): New. Defines a new layer that represents an
203            image.
204    
205            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
206            tag handler.
207            (SessionLoader.start_layer): Encode the filename.
208            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
209            New. Supports reading a rasterlayer tag.
210    
211            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
212    
213            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
214            get a string in Latin1. If we get such as string convert it to
215            unicode first, otherwise leave if alone before encoding.
216            (SessionSaver.write_layer): Add support for writing both Layers
217            and RasterLayers.
218    
219            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
220            The right argument may not be a string, it could also be a Column.
221    
222            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
223            Make initial window size 600x400. Fixes RTBug #1872.
224    
225            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
226            the dialog is constructed so that we can support layers that
227            do not have classifications.
228            (Classifier._OnTry): Only build a classification if the layer
229            supports one.
230    
231            * Thuban/UI/legend.py: Change all checks that a layer is an
232            instance of Layer into checks against BaseLayer.
233            (LegendTree.__FillTreeLayer): Only add children to a branch if
234            the layer supports classification.
235    
236            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
237            MainWindow.OpenSession): Don't proceed with an action if the
238            user chooses Cancel when they are asked to save changes.
239            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
240            user to select an image file. Create a new RasterLayer and add
241            it to the map.
242    
243            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
244            for rendering RasterLayer layers.
245            (MapRenderer.draw_raster_layer): Actually method that calls
246            the GDALWarp python wrapper and constructs an image from the
247            data returned.
248    
249            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
250            Choices symbols to match those used in the table query method.
251            Replace deprecated method calls on table with new method names.
252    
253            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
254            how small the scale can get. This still needs more testing.
255    
256            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
257            Provides a driver to output in .bmp format.
258    
259            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
260            New. Provides IO routines which write to memory, rather than a file.
261    
262            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
263            of the gdalwarp utility provided in GDAL. Added function calls
264            that can be accessed from python.
265    
266            * Data/iceland_sample_raster.thuban: New. Sample file that uses
267            a raster layer.
268    
269            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
270            layer image data.
271    
272            * Doc/thuban.dtd: Added rasterlayer attribute definition.
273    
274            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
275            tests associated with the raster layer code.
276    
277            * test/test_transientdb.py
278            (TestTransientTable.test_auto_transient_table_query): Added a test
279            for using a Column object as the "right" parameter to a query.
280    
281    2003-05-19  Frank Koormann  <[email protected]>
282    
283            * Thuban/version.py (get_changelog_date):
284            Catch exceptions if ChangeLog does not exist.
285    
286            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
287    
288    2003-05-19  Frank Koormann  <[email protected]>
289    
290            Extended version information for Thuban
291    
292            * Thuban/version.py: New, version information for Thuban: Last
293            modification date and last ChangeLog entry date.
294    
295            * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
296            information: Display Thuban, wxPython and Python version.
297    
298    2003-05-16  Bernhard Herzog  <[email protected]>
299    
300            * Thuban/Model/save.py: Remove some unused imports including the
301            __future__ import for nested_scopes as Thuban relies on Python 2.2
302            now.
303            (XMLWriter.encode): Remove the special case for a None argument.
304            In the saver encode is always called with a string argument.
305    
306    2003-05-16  Bernhard Herzog  <[email protected]>
307    
308            * Thuban/UI/__init__.py: Remove the work-around for the locale bug
309            in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
310            of the bug was that e.g. float("1.2") would fail. Thuban now
311            requires 2.4.x.
312            
313    2003-05-16  Frank Koormann   <[email protected]>
314    
315            Printing enhancement and WMF export (under Win32)
316    
317            * Thuban/UI/renderer.py (ExportRenderer): New, derived from
318            ScreenRenderer. Renders Map, Legend and Scalebar for export.
319            (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
320            PrintRender.
321    
322            * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
323            to fullfil information needed for PrinterRenderer.
324            (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
325            (MapCanvas.Print): Adapted to new MapPrintout.
326            (OutputTransform): General calculations to transform from canvas
327            coordinates to export/printing devices.
328    
329            * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
330            new method_command to call ExportMap, with platform dependency (only
331            __WXMSW__)
332      
333            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
334            of scalebar drawing area as new parameters.
335            
336            * Thuban/Model/scalebar.py (roundInterval): round long instead of int
337    
338            * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
339            Update to extended scalebar.DrawScalebar header.
340    
341            * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
342    
343            * test/test_scalebar.py: Made test executable as standalone.
344    
345    2003-05-16  Bernhard Herzog  <[email protected]>
346    
347            * Thuban/Model/table.py (Table): Remove this compatibility alias
348            for DBFTable.
349    
350            * test/test_table.py: Import DBFTable as Table because that alias
351            doesn't exist anymore.
352    
353            * Thuban/UI/classgen.py: Remove some unused imports
354    
355    2003-05-14  Jonathan Coles   <[email protected]>
356    
357            * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
358            Fix docstring.
359            (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
360            (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
361            values of the supplied range to determine the beginning and end
362            bounds of the generated classes.
363    
364            * Thuban/Model/range.py (Range.number_re): Now accepts floats that
365            do not have a leading 0 (.5 is now accepted as well as 0.5).
366    
367            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
368            call to ClassGenerator.GenUniformDistribution.
369    
370            * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
371            layout bug with the 'Projection' label.
372    
373            * test/support.py (FloatTestCase): New. Needed for the Range tests.
374    
375            * test/test_range.py: New. Imported from SciParam.
376    
377    2003-05-12  Jonathan Coles   <[email protected]>
378    
379            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
380            to table.UniqueValues() with calls that retrieve all the values
381            from the table. This will need to be replaced by a method on table
382            which can simply return the list (perhaps more efficiently).
383    
384    2003-05-12  Jonathan Coles   <[email protected]>
385    
386            The return value of ClassGenerator.CalculateQuantiles has changed.
387            Refer to the documentation for details.
388    
389            * test/test_classgen.py: Modified Quantile tests to use the
390            new return values.
391    
392            * Thuban/Model/classgen.py
393            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
394            use new return values from CalculateQuantiles to produce the correct
395            range bounds in the Classification.
396            (ClassGenerator.CalculateQuantiles): Add more comments describing
397            the return values and parameters. Make minor adjustments to improve
398            the legibility of the code. Fix problem with adjusted not being set
399            in most cases.
400    
401    2003-05-12  Frank Koormann <[email protected]>
402            
403            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
404            and latin1. Fixes #1851 finally.
405    
406    2003-05-09  Jonathan Coles   <[email protected]>
407    
408            * test/test_classgen.py: New. Tests the Quantile algorithm.
409    
410            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
411            Clean up debugging statement, add comments, fix a small bug in the
412            returned adjusted percentiles.
413            
414    2003-05-09  Jonathan Coles   <[email protected]>
415    
416            Introduces Range class from SciParam into the ClassGroupRange class,
417            and such ranges can now be saved and loaded from disk.
418    
419            Quantiles are now available in the Classification Generator.
420    
421            Initial support for building Queries on a table. Doesn't do anything
422            but run some tests.
423    
424            * Thuban/Model/classification.py: Explicit imports.
425            (ClassGroupRange): Use the Range class to store the underlying
426            range information. The interface remains the same, except for
427            GetRange(), and you can also supply a Range object as the min
428            parameter to SetRange or __init__.
429    
430            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
431            string appropriately for use in Thuban. Fixes RTbug #1851.
432            (SessionLoader.end_projection): Handle the context of the
433            projection tag a bit better by looking at what objects are not
434            None. There was an assumption that a projection tag for a map
435            could occur before any layers.
436            (SessionLoader.start_clrange): Provide backward compatibility for
437            reading min/max values as well as the new range parameter.
438    
439            * Thuban/Model/map.py: Explicit imports.
440    
441            * Thuban/Model/resource.py: Import _.
442            (ProjFileSaver.write): write header using projfile.dtd.
443    
444            * Thuban/Model/save.py: Explicit imports.
445            (XMLWriter.encode): New. Encode the given string from a format
446            used by Thuban into UTF-8. Fixes RTbug #1851.
447    
448            * Thuban/UI/classgen.py: Explicit imports.
449            (ClassGenDialog.__init__): Clean up the code and add support
450            for Quantiles.
451            (ClassGenDialog.OnOK): Add support for Quantiles.
452            (GenQuantilesPanel): New. Input panel for Quantiles.
453            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
454            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
455    
456            * Thuban/Model/classgen.py: New. Contains all the classes named above.
457    
458            * Thuban/UI/classifier.py: Explicit imports.
459            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
460            ClassTable.SetValueAsCustom): Reworked to use new Range class.
461    
462            * Thuban/UI/legend.py: Explicit imports.
463    
464            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
465            a Table menu and associated method calls.
466            (MainWindow.choose_color): Removed. No longer needed.
467    
468            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
469            should be disabled if no projection is selected in the available
470            list.
471    
472            * Thuban/UI/renderer.py: Explicit imports.
473    
474            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
475            with correctly selecting the rows and issuing the right events.
476            Be sure to call Skip() to allow the grid to do some of its own
477            handling which allows the rows to actually be selected.
478            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
479            selecting multiple shapes.
480            (LayerTableFrame): Support for building Queries.
481            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
482    
483            * Thuban/UI/tree.py: Explicit imports.
484    
485            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
486            table view can call it.
487    
488            * test/test_classification.py: Explicit imports.
489            (TestClassification.test_ClassGroupRange): Fix test for new
490            Range class.
491    
492            * Doc/thuban.dtd: Add range parameter for clrange.
493    
494            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
495            object in ClassGroupRange, and also uesd for inputting ranges in
496            the classifer table and elsewhere.
497    
498            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
499            yet.
500    
501    2003-05-09  Frank Koormann <[email protected]>
502    
503            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
504    
505    2003-05-08  Frank Koormann <[email protected]>
506    
507            Coding style updates
508    
509            * test/test_scalebar.py: Replaced tab indentation by spaces.
510    
511            * Thuban/UI/scalebar.py: Explicit imports.
512    
513    2003-05-08  Frank Koormann <[email protected]>
514    
515            * Thuban/UI/scalebar.py
516            (ScaleBar.DrawScalebar): Format string bug fixed.
517    
518    2003-05-08  Frank Koormann <[email protected]>
519    
520            Reorganization of scalebar component (no wx in Thuban/Model)
521    
522            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
523            (deriveInterval):
524            Calculate scalebar interval and unit which fits in width for scale.
525            (roundInterval): Round float.
526    
527            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
528    
529            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
530    
531            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
532    
533    2003-05-08  Frank Koormann <[email protected]>
534    
535            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
536            Initialize ScaleBar with canvas.map
537    
538            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
539            round intervals to display smarter lengths
540            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
541            layer. If the maps has no projection applied grey the scalebar.
542    
543    2003-05-07  Frank Koormann <[email protected]>
544            
545            Basic Scalebar features added.
546    
547            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
548    
549            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
550            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
551            and the renderer.
552    
553            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
554    
555            * Thuban/UI/messages.py: SCALE_CHANGED added.
556    
557    2003-05-07  Bernhard Herzog  <[email protected]>
558    
559            * Thuban/Model/session.py (Session.__init__): New instance
560            variable shapestores to hold a list of all open shapestore objects
561            (Session.ShapeStores): New. Accessor method for the shapestores
562            list.
563            (Session._add_shapestore, Session._clean_weak_store_refs): New.
564            Internal methods to maintain the shapestores list.
565            (Session.Tables): New. Return all tables open in the session.
566            (Session.OpenShapefile): Insert the new ShapeStore into the
567            shapestores list.
568    
569            * test/test_session.py (TestSessionSimple.test_initial_state): Add
570            tests for ShapeStores and Tables
571            (TestSessionWithContent.test_shape_stores)
572            (TestSessionWithContent.test_tables): New. Test cases for
573            ShapeStores and Tables
574    
575    2003-05-07  Bernhard Herzog  <[email protected]>
576    
577            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
578            Add comments about the optimizations used.
579            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
580            Implement the ReadValue table interface method.
581    
582            * test/test_transientdb.py
583            (TestTransientTable.run_iceland_political_tests)
584            (TestTransientTable.test_transient_joined_table): Add tests for
585            ReadValue
586    
587    2003-05-07  Frank Koormann <[email protected]>
588    
589            * Resources/Bitmaps/fulllayerextent.xpm,
590            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
591            new icons.
592    
593    2003-05-06  Bernhard Herzog  <[email protected]>
594    
595            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
596            New. Simply delegate to the transient table's version.
597    
598            * test/test_transientdb.py
599            (TestTransientTable.test_auto_transient_table_query): New. Test
600            case for AutoTransientTable's SimpleQuery
601    
602    2003-05-06  Bernhard Herzog  <[email protected]>
603    
604            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
605            Implement a simple query method for the query dialog
606            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
607            the row index or shapeid.
608            (TransientTable.create): Insert the right value of the row index
609            (TransientJoinedTable.create): Copy the row index of the left
610            table to the joined result table
611    
612            * test/test_transientdb.py
613            (TestTransientTable.test_transient_table_read_twice): Fix
614            doc-string
615            (TestTransientTable.test_transient_table_query): New. Test for the
616            SimpleQuery method
617    
618    2003-05-06  Bernhard Herzog  <[email protected]>
619    
620            Convert all table users to use the new table interface. This only
621            covers Thuban itself, not GREAT-ER or other applications built on
622            Thuban yet, so the compatibility interface stays in place for the
623            time being but it now issues DeprecationWarnings.
624    
625            Finally, the new Table interface has a new method, HasColumn.
626    
627            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
628            issue deprecation warnings when they're. The warnings refer to the
629            caller of the method.
630            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
631            for the deprecation warnings
632    
633            * test/test_table.py: Ignore the deprecation warnings for the old
634            table in the tests in this module. The purpose of the tests is to
635            test the old interface, after all.
636    
637            * test/test_transientdb.py
638            (TestTransientTable.run_iceland_political_tests): Use the
639            constants for the types. Add a test for HasColumn
640            (TestTransientTable.test_transient_joined_table): Adapt to new
641            table interface. Add a test for HasColumn
642            (TestTransientTable.test_transient_table_read_twice): Adapt to new
643            table interface
644    
645            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
646            Adapt to new table interface
647    
648            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
649            new table interface
650    
651            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
652            (RecordTable.SetTable): Adapt to new table interface
653    
654            * Thuban/UI/classifier.py (Classifier.__init__)
655            (Classifier.__init__): Adapt to new table interface
656    
657            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
658            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
659            to new table interface
660    
661            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
662            (AutoTransientTable.HasColumn): Implement the new table interface
663            method
664            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
665            (AutoTransientTable.UniqueValues): Adapt to new table interface
666    
667            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
668            Adapt to new table interface
669    
670            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
671            simplify opening shapefiles a bit easier.
672            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
673            (TestLayer.test_point_layer): Use the new helper method
674            (TestLayer.test_get_field_type): New. Test for the GetFieldType
675            method
676    
677            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
678            the new table method
679    
680            * test/test_memory_table.py (TestMemoryTable.test_has_column):
681            Test for the new table method HasColumn
682    
683    2003-05-06  Jonathan Coles   <[email protected]>
684    
685            Addresses the "Selection Extent" wish of RTbug #1787.
686    
687            * Resources/Bitmaps/fulllayerextent.xpm,
688            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
689            extent. These are just place holders for the real bitmaps.
690    
691            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
692            calculate the bounding box once (the first time compute_bbox() is
693            called).
694            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
695            the bounding box for the shapes in lat/long coordinates.
696    
697            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
698            option.
699            (MainWindow.has_selected_shapes): New. Returns true if there are
700            any selected shapes.
701            (MainWindow.FullSelectionExtent): New. Calls
702            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
703            (_has_selected_shapes): New. Returns true if there are any
704            selected shapes.
705    
706            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
707            true if there are any selected shapes.
708    
709            * Thuban/UI/view.py (MapCanvas): Added delegated method
710            HasSelectedShapes.
711            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
712            shapes on the canvas using the map projection (if any).
713    
714            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
715            for Layer.ShapesBoundingBox().
716    
717    2003-05-06  Bernhard Herzog  <[email protected]>
718    
719            * Resources/Projections/defaults.proj: Fix spelling of Mercator
720    
721    2003-05-05  Jonathan Coles   <[email protected]>
722    
723            Addresses the "Full Layer Extent" wish of RTbug #1787.
724    
725            * Resources/Projections/defaults.proj: Added UK National Grid.
726    
727            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
728            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
729            when the user selects the menu option.
730    
731            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
732            scales the given layer on the canvas using the map projection.
733    
734    2003-05-05  Bernhard Herzog  <[email protected]>
735    
736            Convert the table implementations to a new table interface. All
737            tables use a common mixin class to provide backwards compatibility
738            until all table users have been updated.
739    
740            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
741            provide backwards compatibility for table classes implementing the
742            new interface
743            (DBFTable, MemoryTable): Implement the new table interface. Use
744            OldTableInterfaceMixin as base for compatibility
745            (DBFColumn, MemoryColumn): New. Column description for DBFTable
746            and MemoryTable resp.
747    
748            * test/test_dbf_table.py: New. Test cases for the DBFTable with
749            the new table interface.
750    
751            * test/test_memory_table.py: New. Test cases for the MemoryTable
752            with the new table interface.
753    
754            * test/test_table.py: Document the all tests in this file as only
755            for backwards compatibility. The equivalent tests for the new
756            interface are in test_memory_table.py and test_dbf_table.py
757            (MemoryTableTest.test_read): field_info should be returning tuples
758            with four items
759            (MemoryTableTest.test_write): Make doc-string a more precise.
760    
761            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
762            table interface. Derive from from OldTableInterfaceMixin for
763            compatibility.
764            (TransientTableBase.create): New intance variable column_map to
765            map from names and indices to column objects
766            (TransientTable.create): Use the new table interface of the input
767            table
768            (AutoTransientTable): Convert to new table interface. Derive from
769            from OldTableInterfaceMixin for compatibility.
770            (AutoTransientTable.write_record): Removed. It's not implemented
771            yet and we still have to decide how to handle writing with the new
772            table and data framework.
773    
774            * test/test_transientdb.py
775            (TestTransientTable.run_iceland_political_tests)
776            (TestTransientTable.test_transient_joined_table): Use the new
777            table interface
778    
779    2003-05-05  Jonathan Coles   <[email protected]>
780    
781            This is namely a collection of UI updates to improve user interactivity.
782            Tabbing between controls now exists and you can use ESC to close dialog
783            boxes; ENTER will active the default button.
784    
785            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
786            order that the controls are created so that tabbing works correctly.
787            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
788            wxDialog can handle the default button correctly.
789            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
790            same reasons as for OnOK.
791            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
792            when we ask the table for the maximum/minimum values of a field
793            which could take a very long time.
794    
795            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
796            order that the controls are created so that tabbing works correctly.
797            (SelectPropertiesDialog.__init__): Rearrange the order that the
798            controls are created so that tabbing works correctly.
799    
800            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
801            to derive from a wxDialog but behave like the original implementation
802            which was derived from a wxFrame. wxDialog provides useful key
803            handling functionality like ESC calling OnCancel and ENTER calling
804            OnOK which is lost with wxFrame.
805    
806            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
807            new dialogs.
808    
809            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
810            order that the controls are created so that tabbing works correctly.
811            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
812            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
813            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
814            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
815            can provide the "UK National Grid" as a default projection.
816            (UTMPanel.__init__): Rearrange the order that the controls are
817            created so that tabbing works correctly.
818    
819    2003-05-05  Bernhard Herzog  <[email protected]>
820    
821            * extensions/thuban/wxproj.cpp: Fix some of the comments.
822            (project_point): If a map projection but no layer projection is
823            given, convert degrees to radians before applying the map
824            projection.
825    
826            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
827            (TableGrid.allow_messages): New methods to make it possible to
828            inhibit message sending.
829            (TableGrid.issue): Only send the message if not inhibited.
830            (LayerTableGrid.select_shape): Use the new methods to make sure
831            that no ROW_SELECTED message is sent while we're updating the
832            selected rows to match the selected shapes.
833    
834    2003-05-02  Jan-Oliver Wagner <[email protected]>
835    
836            Implementation of MemoryTable.
837    
838            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
839            implementation that operates on a list of tuples. All of the data
840            are kept in the memory.
841    
842            * test/test_table.py (MemoryTableTest): New.
843    
844            * test/test_transientdb.py (SimpleTable): Removed.
845            (TestTransientTable.test_transient_joined_table,
846            (TestTransientTable.test_transient_table_read_twice): Replaced
847            SimpleTable by MemoryTable.
848    
849    2003-04-30  Jonathan Coles   <[email protected]>
850    
851            * Data/iceland_sample.thuban: Now contains correct projections
852            for each of the layers.
853    
854            * Resources/Projections/defaults.proj: Geographic projection
855            contains unit conversion parameter.
856    
857    2003-04-30  Jonathan Coles   <[email protected]>
858    
859            The most important part of this putback is the projection changes.
860            It should now be possible to specify the projection that a layer
861            is in and then specify a different projection for the map. The
862            projection dialog has an extra parameter for a geographic projection
863            which lets the user select if the input is in degrees or radians.
864    
865            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
866            to say that the parameter is a tuple of unprojected
867            points (which is what the callers to this method were assuming).
868            Also, since the points are unprojected we need to projected them.
869    
870            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
871            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
872            groups are selected, move the layer up/down. Fixes RTbug #1833.
873    
874            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
875    
876            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
877            parameter in call to SetClientData.
878            (GeoPanel): Add support for selecting the units that the
879            source data is in (Radians or Degrees).
880    
881            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
882            the rendering loop by reducing the number of if's, removing the
883            unnecessary try/except block, and checking if the old group
884            is the same as the new one (which happens a lot if there is
885            no classification, or lots of shapes are in the same group).
886    
887            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
888            around the redraw routine to try to catch problems that the user
889            may create by selecting invalid projections for the data set and
890            map. Clears the display if there are any problems and prints the
891            error.
892            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
893            rectangle.
894    
895            * extensions/thuban/wxproj.cpp (project_point): First invert the
896            supplied point (which should be in projected coordinates) using
897            the layer's projection and then project the point using the
898            map's projection.
899            (project_points): Use project_point() to project each point.
900    
901    2003-04-30  Jan-Oliver Wagner <[email protected]>
902    
903            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
904            don't set the Classification to None if the classfication field
905            is None (ie only a DEFAULT).
906    
907    2003-04-30  Bernhard Herzog  <[email protected]>
908    
909            * Thuban/UI/view.py: Fix some typos.
910    
911            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
912            not pop up the dialog if the selection becomes empty (this could
913            happen if e.g. a new selection is opened while the identify tool
914            is active and dialog had been closed)
915    
916    2003-04-30  Bernhard Herzog  <[email protected]>
917    
918            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
919            instance variable read_record_last_result
920            (TransientTableBase.read_record): Make sure reading the same
921            record twice works. The implementation uses the new instance
922            variable read_record_last_result
923    
924            * test/test_transientdb.py
925            (TestTransientTable.test_transient_table_read_twice): New test
926            case for the above bug-fix.
927    
928    2003-04-29  Jonathan Coles   <[email protected]>
929    
930            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
931    
932            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
933    
934            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
935            (ClassTable.SetValueAsCustom): Rename keyword argument in
936            ClassGroup* constructors to match argument name.
937    
938    2003-04-29  Bernhard Herzog  <[email protected]>
939    
940            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
941            transient DB if it exists to make sure it doesn't leave a journal
942            file in the temp directory.
943    
944            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
945            self.conn to None after closing the connection to make sure it's
946            not closed twice
947    
948    2003-04-29  Jonathan Coles   <[email protected]>
949    
950            Add a visible parameter in the layer XML tag. The default value is
951            "true". If anything other than "false" is specified we also assume
952            "true". Addresses RTbug #1025.
953    
954            * Doc/thuban.dtd: Add visible parameter to a layer.
955    
956            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
957            of visible from 1 to True.
958            (Layer.__init__): Change default value of visible from 1 to True.
959    
960            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
961            parameter.
962    
963            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
964            parameter.
965    
966            * test/test_load.py: Add new test data contents_test_visible.
967            (LoadSessionTest.setUp): save test data.
968            (LoadSessionTest.testLayerVisibility): Test if the visible flag
969            is loaded correctly.
970    
971            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
972            for saving an invisible layer.
973    
974    2003-04-29  Jonathan Coles   <[email protected]>
975    
976            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
977            legend dialog box and tell it to change its map to the one
978            supplied to SetMap(). Fixes RTbug #1770.
979    
980    2003-04-29  Bernhard Herzog  <[email protected]>
981    
982            Next step of table implementation. Introduce a transient database
983            using SQLite that some of the data is copied to on demand. This
984            allows us to do joins and other operations that require an index
985            for good performance with reasonable efficiency. Thuban now needs
986            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
987            haven't tested that.
988            
989            * Thuban/Model/transientdb.py: New. Transient database
990            implementation.
991    
992            * test/test_transientdb.py: New. Tests for the transient DB
993            classes.
994    
995            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
996            classes to help automatically remove temporary files and
997            directories.
998            (Session.__init__): New instance variables temp_dir for the
999            temporary directory and transient_db for the SQLite database
1000            (Session.temp_directory): New. Create a temporary directory if not
1001            yet done and return its name. Use AutoRemoveDir to have it
1002            automatically deleted
1003            (Session.TransientDB): Instantiate the transient database if not
1004            done yet and return it.
1005    
1006            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
1007            AutoTransientTable so that data is copied to the transient DB on
1008            demand.
1009            (SimpleStore): New class that simply combines a table and a
1010            shapefile
1011    
1012            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
1013            DBFTable and update its doc-string to reflect the fact that this
1014            is only the table interface to a DBF file. Table is now an alias
1015            for DBFTable for temporary backwards compatibility.
1016    
1017            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
1018            the last reference to the session goes away so that the temporary
1019            files are removed properly.
1020    
1021            * test/test_load.py (LoadSessionTest.tearDown): Remove the
1022            reference to the session to make sure the temporary files are
1023            removed.
1024    
1025    2003-04-29  Bernhard Herzog  <[email protected]>
1026    
1027            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
1028            the __parser instance variable into a normal local variable in
1029            read. It's only used there and read will never be called more than
1030            once. Plus it introduces a reference cycle that keeps can keep the
1031            session object alive for a long time.
1032    
1033    2003-04-29  Jonathan Coles   <[email protected]>
1034    
1035            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
1036            Projection an immutable item. Fixes RTbug #1825.
1037            (Projection.__init__): Initialize instance variables here.
1038            (ProjFile.Replace): New. Replace the given projection object with
1039            the new projection object. This solves the problem of needing the
1040            mutator Projection.SetProjection() in the ProjFrame class and
1041            allows a projection to change parameters without changing its
1042            location in the file.
1043    
1044            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
1045            be of type wxSAVE and should verify overwriting a file.
1046    
1047            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
1048            ProjFile.Replace() method instead of the mutator
1049            Projection.SetProjection(). Also requires that we reassign the
1050            client data to the new projection.
1051    
1052            * test/test_proj.py (TestProjection.test): Test GetName() and
1053            GetAllParameters()
1054            (TestProjFile.test): Remove tests for Set*() methods. Add tests
1055            for Replace().
1056    
1057    2003-04-25  Jonathan Coles   <[email protected]>
1058    
1059            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
1060            to save the name of the projection.
1061    
1062            * test/test_save.py (SaveSessionTest.testLayerProjection): New
1063            test to verify layer projections are saved correctly.
1064    
1065    2003-04-25  Jonathan Coles   <[email protected]>
1066    
1067            * Thuban/Model/proj.py (Projection.SetName): Set the name
1068            to "Unknown" if name is None.
1069            (Projection.SetAllParameters): New. Set the projection's
1070            parameter list to the one supplied.
1071            (Projection.SetProjection): New. Set the projection's
1072            properties to those of the supplied Projection.
1073    
1074            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
1075            the dialog title to include the map's title.
1076            (MainWindow.LayerProjection): Set the dialog title to include
1077            the layer's title.
1078    
1079            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
1080            error dialogs into a single method call.
1081            (ProjFrame.__VerifyButtons): Add more states to check.
1082            (ProjFrame.__GetProjection): Return the current state of an
1083            edited projection or None.
1084            (ProjFrame.__FillAvailList): Remove checks for states that
1085            shouldn't exist.
1086            (ProjFrame._OnNew): Clear all selected items and supply
1087            a projection panel if necessary.
1088    
1089            * test/test_proj.py (TestProjFile.test): Add tests for
1090            ProjFile.SetAllParameters, ProjFile.SetProjection,
1091            ProjFile.SetName.
1092    
1093    2003-04-25  Jonathan Coles   <[email protected]>
1094    
1095            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
1096            takes an optional argument to select the current projection.
1097            This does not guarantee that the item is visible due to
1098            limited wxWindows functionality. Fixes RTBug #1821.
1099    
1100    2003-04-25  Jonathan Coles   <[email protected]>
1101    
1102            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
1103            the projection name and use it when constructing the Projection
1104            object.
1105    
1106            * Thuban/Model/proj.py (Projection.__init__): Change the default
1107            value for 'name' to None and then test if name is equal to None
1108            in the body of the constructor. This way the caller doesn't have to
1109            know what the default value should be. Namely, useful in load.py
1110            where we have to pick a default value if the 'name' parameter
1111            doesn't exist in the XML file.
1112    
1113            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
1114            Tests a file where a layer has a projection.
1115    
1116    2003-04-25  Jonathan Coles   <[email protected]>
1117    
1118            * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
1119            tree for projection information.
1120    
1121            * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
1122            XMLReader.GetFileName.
1123            (SessionLoader): Added support for loading projection tags that
1124            appear inside a layer.
1125    
1126            * Thuban/Model/proj.py (ProjFile): Document the class. Move
1127            back to using a list because the order of the projections in
1128            the file is important to maintain. Fixes RTbug #1817.
1129    
1130            * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
1131            to ProjFile.GetFilename.
1132    
1133            * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
1134            information.
1135    
1136            * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
1137            ProjFrame._OnSaveAs. Removed old dead code from previous
1138            implementation.
1139            (ProjFrame._OnExport): Add support for exporting more than one
1140            projection to a single file.
1141            (ProjFrame.__FillAvailList): use string formatting (% operator)
1142            to build strings that are (partly) translated. Fixes RTbug #1818.
1143    
1144            * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
1145            class.
1146    
1147    2003-04-24  Bernhard Herzog  <[email protected]>
1148    
1149            * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
1150    
1151            * po/fr.po: New. French translation by Daniel Calvelo Aros
1152    
1153            * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
1154            empty strings.
1155    
1156    2003-04-24  Jonathan Coles   <[email protected]>
1157    
1158            * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
1159            implement the interface that the ProjFrame dialog expects.
1160    
1161            * Thuban/Model/proj.py (Projection.SetName): New. Allows the
1162            name of the projection to be changed.
1163            (ProjFile): Use a dictionary instead of a list so that removing
1164            projections is easier and we are sure about uniqueness.
1165            (ProjFile.Remove): Remove the given projection object.
1166    
1167            * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
1168            Return a list with only one projection file instead of searching for
1169            any projection file. This simplifies many things if the user can
1170            only have one system file and one user file.
1171    
1172            * Thuban/UI/classgen.py: Change all references to
1173            genCombo to genChoice.
1174    
1175            * Thuban/UI/mainwindow.py: Add a Projection option under the
1176            layer menu.
1177            (MainWindow.LayerProjection): New. Open up a projection window
1178            for a layer.
1179    
1180            * Thuban/UI/projdialog.py: Large changes to how the dialog is
1181            laid out. Use three panels instead of one. One for the list of
1182            projections, one for the edit controls, and one for the buttons.
1183            Fixed resizing problems so that the dialog resizes correctly
1184            when the projection panel changes. Added import/export, save, and
1185            new buttons/functionality.
1186    
1187    2003-04-24  Bernhard Herzog  <[email protected]>
1188    
1189            First step towards table management. Introduce a simple data
1190            abstraction so that we replace the data a layer uses more easily
1191            in the next step.
1192    
1193            * Thuban/Model/data.py: New file with a simple data abstraction
1194            that bundles shapefile and dbffile into one object.
1195    
1196            * Thuban/Model/session.py (Session.OpenShapefile): New method to
1197            open shapefiles and return a shape store object
1198    
1199            * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
1200            object instead of a shapefile filename. This introduces a new
1201            instance variable store holding the datastore. For intermediate
1202            backwards compatibility keep the old instance variables.
1203            (open_shapefile): Removed. No longer needed with the shape store.
1204            (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
1205            get the shape store used by a layer.
1206            (Layer.Destroy): No need to explicitly destroy the shapefile or
1207            table anymore.
1208    
1209            * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
1210            (MainWindow.AddLayer): Use the session's OpenShapefile method to
1211            open shapefiles
1212    
1213            * Thuban/Model/load.py (ProcessSession.start_layer): Use the
1214            session's OpenShapefile method to open shapefiles
1215    
1216            * test/test_classification.py
1217            (TestClassification.test_classification): Use the session's
1218            OpenShapefile method to open shapefiles and build the filename in
1219            a more platform independed way
1220    
1221            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
1222            Implement to have a session to use in the tests
1223            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1224            (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
1225            session's OpenShapefile method to open shapefiles
1226            (TestLayerLegend.setUp): Instantiate a session so that we can use
1227            it to open shapefiles.
1228            (TestLayerLegend.tearDown): Make sure that all references to
1229            layers and session are removed otherwise we may get a resource
1230            leak
1231    
1232            * test/test_map.py (TestMapAddLayer.test_add_layer)
1233            (TestMapWithContents.setUp): Instantiate a session so that we can
1234            use it to open shapefiles.
1235            (TestMapWithContents.tearDown): Make sure that all references to
1236            layers, maps and sessions are removed otherwise we may get a
1237            resource leak
1238            ("__main__"): use support.run_tests() so that more info about
1239            uncollected garbage is printed
1240    
1241            * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
1242            session's OpenShapefile method to open shapefiles
1243            ("__main__"): use support.run_tests() so that more info about
1244            uncollected garbage is printed
1245    
1246            * test/test_selection.py (TestSelection.tearDown): Make sure that
1247            all references to the session and the selection are removed
1248            otherwise we may get a resource leak
1249            (TestSelection.get_layer): Instantiate a session so that we can
1250            use it to open shapefiles.
1251            ("__main__"): use support.run_tests() so that more info about
1252            uncollected garbage is printed
1253    
1254            * test/test_session.py (TestSessionBase.tearDown)
1255            (TestSessionWithContent.tearDown): Make sure that all references
1256            to the session and layers are removed otherwise we may get a
1257            resource leak
1258            (TestSessionWithContent.setUp): Use the session's OpenShapefile
1259            method to open shapefiles
1260    
1261    2003-04-24  Jonathan Coles   <[email protected]>
1262    
1263            * Thuban/Model/load.py (XMLReader.read): Should have been checking
1264            if the file_or_filename object had the 'read' attribute.
1265    
1266    2003-04-23  Jonathan Coles   <[email protected]>
1267    
1268            * Thuban/Model/resource.py: Fixes RTbug #1813.
1269            (ReadProjFile): Add documentation about which exceptions are raised.
1270            Always pass the exceptions up to the caller.
1271            (GetProjFiles): If the directory can't be read return an empty list.
1272            If any of the proj files can't be read skip that file and go
1273            on to the next one.
1274    
1275            * test/test_proj.py: Added test cases to handle nonexistent files,
1276            unreadable files, and files that don't parse correctly.
1277    
1278    2003-04-23  Jonathan Coles   <[email protected]>
1279    
1280            Projection dialog. Allows the user to select from a list
1281            of projection templates and optionally edit them and save new ones.
1282    
1283            * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
1284            (ProjPanel): Base class for projection specific panels.
1285            (TMPanel): Projection panel for Transverse Mercartor.
1286            (UTMPanel): Projection panel for Universal Transverse Mercartor.
1287            (LCCPanel): Projection panel for Lambert Conic Conformal.
1288            (GeoPanel): Projetion panel for Geographic Projection.
1289    
1290    2003-04-23  Jonathan Coles   <[email protected]>
1291    
1292            * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
1293            promote symmetry. There now exists XMLReader and XMLWriter.
1294            (XMLReader.read): New. Call to read the given file descriptor or
1295            filename.
1296            (XMLReader.close): New. Make sure the file is closed.
1297            (XMLReader.GetFileName): New. Return just the file name that is being
1298            read from.
1299            (XMLReader.GetDirectory): New. Return just the directory of the file
1300            that is being read.
1301            (XMLReader.AddDispatchers): New. Take a dictionary which contains
1302            the names of functions to call as the XML tree is parsed.
1303            (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
1304            (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
1305            (SessionLoader): Removed class variables start_dispatcher and
1306            end_dispatcher since this functionality is now part of a class
1307            instance. Fixes RTbug #1808.
1308            (SessionLoader.__init__): Add dispatcher functions.
1309            (load_xmlfile): Code was moved into the XMLReader.read().
1310            (load_session): Use modified SessionLoader.
1311    
1312            * Thuban/Model/map.py (Map.GetProjection): New. Returns the
1313            map's projection.
1314    
1315            * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
1316            GetAllParameters.
1317            (Projection.GetParameter): Returns the value for the given parameter.
1318    
1319            * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
1320            (GetProjFiles): Renamed from GetProjections. Now returns a list
1321            of ProjFile objects.
1322            (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
1323            a list of ProjFile objects whose files are not user defined.
1324            (GetUserProjFiles): Renamed from GetUserProjections. Returns a
1325            list of ProjFile objects whose files are user defined.
1326            (ProjFileReader): Extend new XMLReader.
1327    
1328            * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
1329            promote symmetry.
1330    
1331            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
1332            control instead of a wxComboBox. wxChoice controls do not generate
1333            events as the uses highlights possible choices which fixes problems
1334            with resizing the dialog when the use selects an option.
1335    
1336            * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
1337            control instead of a wxComboBox.
1338    
1339            * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
1340            dialog.
1341    
1342            * test/test_proj.py (TestProjection.test): New tests for GetParameter
1343            method.
1344    
1345    2003-04-22  Bernhard Herzog  <[email protected]>
1346    
1347            * Thuban/UI/mainwindow.py: Remove some unused imports and global
1348            constants
1349    
1350            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
1351            (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
1352    
1353    2003-04-17  Bernhard Herzog  <[email protected]>
1354    
1355            * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
1356            (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
1357            anymore.
1358            (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
1359            (Layer.ShapeType, Layer.Shape): No need to call
1360            self.open_shapefile since it's always called in __init__
1361    
1362            * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
1363            In wxPython 2.4 there's no need to extend MainLoop anymore since
1364            wxPython itself makes sure OnExit is called.
1365    
1366    2003-04-16  Jonathan Coles   <[email protected]>
1367    
1368            Initial putback of projection management code. Includes new
1369            classes to read and write projection files. The current load
1370            and save classes were abstracted a bit so they could be reused.
1371            The Projection class was extended to provide new methods and
1372            have a name.
1373    
1374            * Thuban/Model/load.py (XMLProcessor): New. Contains all the
1375            general XML reading methods that were part of ProcessSession.
1376    
1377            * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
1378            name.
1379            (ProjFile): New. Represents a file that contains projection
1380            information.
1381    
1382            * Thuban/Model/resource.py: New. Contains general utilities
1383            for read and writing projection files.
1384    
1385            * Thuban/Model/save.py (XMLSaver): New. Contains all the
1386            general XML writing methods that were part of SessionSaver.
1387            (SessionSaver): Renamed from Saver.
1388    
1389            * test/test_proj.py: New test cases for the projection
1390            file read and write functions.
1391    
1392    2003-04-16  Jonathan Coles   <[email protected]>
1393    
1394            * Thuban/Model/classification.py: Use repr() around values
1395            in the ClassGroup*.__repr__() methods so it is clearer when
1396            a value is a string and when it is a number.
1397    
1398            * test/test_load.py: Rework the classification test to test
1399            that we can load old files.
1400            (testLabels): Test a file where the groups have labels.
1401    
1402    2003-04-16  Bernhard Herzog  <[email protected]>
1403    
1404            Safer implementation of the performance enhancements of the
1405            low-level renderer:
1406            
1407            * extensions/thuban/wxproj.cpp (extract_projection)
1408            (extract_pointer): Rename extract_projection to extract_pointer
1409            and redefine its purpose to return the pointer stored in a CObject
1410            returned by the object's cobject method. Update all callers.
1411            (s_draw_info, free_draw_info, draw_polygon_init): Implement the
1412            handling of these low-level parameters so that each s_draw_info
1413            instance is handled as a CObject at python level that also
1414            contains real references to the actual python objects which
1415            contain the values in the struct. Add free_draw_info as the
1416            destructor.
1417            (draw_polygon_shape): Add the py_draw_info parameter which must a
1418            cobject containing an s_draw_info pointer.
1419    
1420            * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
1421            method to instantiat the low-level render parameter
1422            (MapRenderer.draw_shape_layer): Use the new method. Remove some
1423            commented out code.
1424            (MapRenderer.draw_polygon_shape): Make the first parameter not the
1425            layer but the low-level render parameter
1426            (ScreenRenderer.draw_shape_layer): Use the low-level render
1427            parameter.
1428    
1429    2003-04-15  Jonathan Coles   <[email protected]>
1430    
1431            * Thuban/Model/classification.py: Implemented __repr__ for
1432            the ClassGroup* classes to make debugging a bit easier.
1433            (ClassGroup.SetLabel): Check that the string is an instance
1434            of StringTypes not StringType. Accounts for Unicode strings.
1435    
1436            * Thuban/Model/color.py: Implemented __repr__ to make
1437            debugging a bit easier.
1438    
1439            * Thuban/Model/save.py (Saver.write_classification): Need to
1440            save the group label.
1441    
1442            * test/test_load.py (testClassification): New. Loads the
1443            iceland_sample_test.thuban file and checks if it was loaded
1444            correctly.
1445    
1446    2003-04-15  Jonathan Coles   <[email protected]>
1447    
1448            * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
1449            to improve rendering performance by initializing the variables
1450            that are not change each time draw_polygon_shape() is called.
1451            The values are stored in a global struct draw_info.
1452            (draw_polygon_shape): Removed initialization code that is
1453            now in draw_polygon_init().
1454    
1455            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
1456            drawing initialization call to draw_polygon_init()
1457            (MapRenderer.draw_polygon_shape): Use new signature of
1458            draw_polygon_shape.
1459    
1460            * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
1461            weirdness by setting the range to (1, maxint).
1462    
1463            * Thuban/Model/classification.py (ClassGroupProperties): Make
1464            instance variables private and optimize comparison operator
1465            by first checking if the color references are the same.
1466            (ClassGroupSingleton): Make instance variables private.
1467            (ClassGroupRange): Make instance variables private.
1468    
1469            * HOWTO-Release: Filled in missing steps for releasing packages.
1470    
1471    2003-04-15  Bernhard Herzog  <[email protected]>
1472    
1473            First stab at internationalized messages:
1474    
1475            * Thuban/__init__.py (_): Implement the translation function for
1476            real using the python gettext module.
1477    
1478            * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
1479            translate empty strings.
1480    
1481            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1482            Add a missing space to a warning message
1483    
1484            * po/README: New. Notes about the management of the translation
1485            files.
1486    
1487            * po/Makefile: New. Makefile to help manage the translation files.
1488    
1489            * po/es.po: New. Spanish translation by Daniel Calvelo Aros
1490    
1491            * MANIFEST.in: Include the *.mo files in Resources/Locale and the
1492            translations and support files in po/
1493    
1494            * setup.py (data_files): Add the *.mo files to the data_files too
1495    
1496            * README: Add note about the translations when building from CVS
1497    
1498    2003-04-14  Jonathan Coles   <[email protected]>
1499    
1500            * Thuban/UI/dock.py: Fixes some window resizing problems most
1501            noticable under windows. Always assume the button bitmaps will
1502            be there. Code clean up.
1503            (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
1504            images for the dock/undock button to the same images.
1505            Work around for RTbug #1801.
1506    
1507            * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
1508            be allowed to grow within the sizer. Fixes a bug under Windows
1509            where the toolbar wasn't being drawn.
1510    
1511    2003-04-14  Frank Koormann   <[email protected]>
1512    
1513            * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
1514            Updated design to try to make the button functionality more
1515            transparent.
1516    
1517    2003-04-14  Jonathan Coles   <[email protected]>
1518    
1519            * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
1520            finalize the intialization of the panel.
1521    
1522            * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
1523            creation of the panel. Should be the last thing called in the
1524            initializer of a subclass.
1525    
1526            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
1527            set the current selections in the combo boxes. This is needed
1528            under Windows.
1529    
1530            * Thuban/UI/classifier.py (Classifier.__init__): Add a top
1531            level panel to the dialog so that the background colors are
1532            consistent under Windows.
1533    
1534    2003-04-11  Jonathan Coles   <[email protected]>
1535    
1536            * Thuban/UI/classgen.py: Change color ramps to start at white
1537            not black.
1538    
1539            * Thuban/UI/legend.py: Enable/disable the legend buttons when
1540            the legend changes. Fixes RTbug #1793.
1541    
1542            * test/test_classification.py: Added test for copying of
1543            classifications.
1544    
1545    2003-04-11  Jonathan Coles   <[email protected]>
1546    
1547            * Thuban/UI/resource.py: New. Centralize the loading of resources
1548            such as bitmaps.
1549    
1550            * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
1551            added images to the move buttons, added 'reverse' button.
1552            (CustomRampPanel.__init__): Added images to the move buttons.
1553            (GreyRamp): New. Generates a ramp from white to black.
1554            (HotToColdRamp): New. Generates a ramp from cold to hot colors.
1555    
1556            * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
1557            ID_PROPERTY_*.
1558            (Classifier.__init__): Minor changes to the layout.
1559            (Classifier._OnTitleChanged): Listen for when the user edits the
1560            title and update the dialog's title and the layer's title.
1561    
1562            * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
1563    
1564            * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
1565            (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
1566            if the layer's title changes.
1567    
1568            * Thuban/UI/mainwindow.py: Added new menu item and associated code
1569            to open a dialog to rename the map.
1570            (MainWindow): Use new resource class to import bitmaps.
1571    
1572    2003-04-11  Jonathan Coles   <[email protected]>
1573    
1574            * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
1575            Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
1576            Resources/Bitmaps/group_use_none.xpm,
1577            Resources/Bitmaps/group_use_not.xpm,
1578            Resources/Bitmaps/hide_layer.xpm,
1579            Resources/Bitmaps/layer_properties.xpm,
1580            Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
1581            Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
1582            New.
1583    
1584    2003-04-10  Jonathan Coles   <[email protected]>
1585    
1586            * Thuban/Model/classification.py: (ClassGroupRange.__init__):
1587            Should pass group to ClassGroup constructor.
1588    
1589    2003-04-10  Jonathan Coles   <[email protected]>
1590    
1591            * Thuban/Model/classification.py: (ClassGroup): Move all the common
1592            methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
1593            here. Implement SetVisible(), IsVisible().
1594            (ClassGroup.__init__): Add group parameter which acts as a copy
1595            constructor.
1596    
1597            * Thuban/UI/classifier.py (ClassTable): Add a new column for the
1598            "Visible" check boxes.
1599            (Classifier): Rename the buttons and refactor the code to match
1600            the new labels.
1601    
1602            * Thuban/UI/legend.py: Classify button is now called "Properties".
1603            Refactored the code to change variable names.
1604            (LegendTree.__FillTreeLayer): Only list a group if it is visible.
1605    
1606            * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
1607            MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
1608            renamed to MainWindow.LayerEditProperties.
1609            (MainWindow.ToggleLegend): Don't include map name in legend title.
1610            (MainWindow.SetMap): Added the map name to the window title.
1611            (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
1612            MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
1613            Functionality is found in the layer properties dialog.
1614    
1615            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
1616            draw visible groups.
1617    
1618  2003-04-09  Jonathan Coles   <[email protected]>  2003-04-09  Jonathan Coles   <[email protected]>
1619    
1620          * Thuban/UI/classgen.py: Modifications to allow simple          * Thuban/UI/classgen.py: Modifications to allow simple

Legend:
Removed from v.634  
changed lines
  Added in v.985

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26