/[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 756 by jonathan, Fri Apr 25 14:48:44 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]>  2003-04-25  Jonathan Coles   <[email protected]>
1058    
1059          * Thuban/Model/save.py (SessionSaver.write_projection): Make sure          * Thuban/Model/save.py (SessionSaver.write_projection): Make sure

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26