/[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 735 by jonathan, Fri Apr 25 09:11:39 2003 UTC revision 971 by jonathan, Wed May 21 17:26:40 2003 UTC
# Line 1  Line 1 
1    2003-05-20  Jonathan Coles   <[email protected]>
2    
3            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
4            references to 'inf' and use new Range __init__ to pass floats
5            directly rather than converting them to strings first.
6            Fixes RTBug #1876.
7    
8            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
9            Use new Range ___init__ to pass floats.
10    
11            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
12            filename is a valid image file. Throw IOError otherwise.
13    
14            * Thuban/Model/range.py: Brought over new Range from SciParam that
15            is immutable and has an __init__ which can accept floats.
16    
17            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
18            into try block. AddLayer doesn't throw any exceptions anymore.
19            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
20            try block.
21    
22            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
23            the first item in choices. Fixes RTBug #1882.
24    
25            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
26            has gone to 0 which is a serious problem. abort.
27            (MapRenderer.draw_raster_layer): Catch IOError seperately and
28            print the error from GDAL.
29    
30            * Thuban/UI/tableview.py (TableGrid.__init__): Call
31            ToggleEventListeners to turn on listening.
32            (TableGrid.ToggleEventListeners): New. Turns event listening on
33            and off so as to prevent excessive messages.
34            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
35            to suppress excessive messages when selecting many rows.
36            Fixes RTBug #1880.
37    
38            * Thuban/UI/view.py: Added checks against if scale == 0. This
39            is a serious problem that can occur when an image without
40            geo data is loading and causes the map projection bounds to
41            go to infinity. Right now, the solution is to simply try
42            to recover.
43    
44            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
45            to set the MFILEReceiver attributes even if the data is NULL.
46    
47            * extensions/thuban/gdalwarp.cpp: Improved the error handling
48            and passed GDAL messages back up to the Python layer. Also
49            tried to fix some memory leaks that were present in the original
50            utility but didn't matter because the program aborted.
51    
52            * test/test_range.py: Copied over tests from SciParam. Removed
53            tests against importing. Fixes RTBug #1867.
54    
55    2003-05-21  Bernhard Herzog  <[email protected]>
56    
57            * test/test_load.py: Remove unused imports and restructure the
58            test code
59            (LoadSessionTest): Split into one class for each test and turn
60            LoadSessionTest itself into the base class for all such session
61            tests.
62            (ClassificationTest): New base class for load tests that test
63            classifications
64            (TestSingleLayer, TestLayerVisibility, TestClassification)
65            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
66            for the individual tests
67    
68            * test/support.py (FileLoadTestCase.filename): New base class for
69            file loading tests
70    
71    2003-05-21  Jan-Oliver Wagner <[email protected]>
72    
73            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
74            Mercator' to 'UTM Zone 32' as a more convenient example.
75            Added 'Gauss Krueger Zone 6'.
76    
77            * Data/iceland_sample_raster.thuban: political polygon now
78            filled transparent to have the raster image visible at once.
79    
80    2003-05-21  Frank Koormann  <[email protected]>
81    
82            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
83            OnClose() to keep in sync with extensions. Internally Thuban
84            still uses "underscored" names.
85    
86    2003-05-20  Jonathan Coles   <[email protected]>
87    
88            This puts back Raster layer support. These layers support projections
89            through the GDAL library. Currently, the CVS version is being used.
90            There are no Debian packages available although this may change soon.
91            A GDAL driver was extended to support writing to memory rather to
92            files.
93    
94            There is still some work that needs to be done, such as some error
95            handling when loading invalid images or when there is a problem
96            projecting the image. This putback simply checks in the majority
97            of the work.
98    
99            * setup.py: Add gdalwarp library extension.
100    
101            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
102            Defaults to False, but can be overridden by subclasses if they
103            support classification.
104            (RasterLayer): New. Defines a new layer that represents an
105            image.
106    
107            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
108            tag handler.
109            (SessionLoader.start_layer): Encode the filename.
110            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
111            New. Supports reading a rasterlayer tag.
112    
113            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
114    
115            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
116            get a string in Latin1. If we get such as string convert it to
117            unicode first, otherwise leave if alone before encoding.
118            (SessionSaver.write_layer): Add support for writing both Layers
119            and RasterLayers.
120    
121            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
122            The right argument may not be a string, it could also be a Column.
123    
124            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
125            Make initial window size 600x400. Fixes RTBug #1872.
126    
127            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
128            the dialog is constructed so that we can support layers that
129            do not have classifications.
130            (Classifier._OnTry): Only build a classification if the layer
131            supports one.
132    
133            * Thuban/UI/legend.py: Change all checks that a layer is an
134            instance of Layer into checks against BaseLayer.
135            (LegendTree.__FillTreeLayer): Only add children to a branch if
136            the layer supports classification.
137    
138            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
139            MainWindow.OpenSession): Don't proceed with an action if the
140            user chooses Cancel when they are asked to save changes.
141            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
142            user to select an image file. Create a new RasterLayer and add
143            it to the map.
144    
145            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
146            for rendering RasterLayer layers.
147            (MapRenderer.draw_raster_layer): Actually method that calls
148            the GDALWarp python wrapper and constructs an image from the
149            data returned.
150    
151            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
152            Choices symbols to match those used in the table query method.
153            Replace deprecated method calls on table with new method names.
154    
155            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
156            how small the scale can get. This still needs more testing.
157    
158            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
159            Provides a driver to output in .bmp format.
160    
161            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
162            New. Provides IO routines which write to memory, rather than a file.
163    
164            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
165            of the gdalwarp utility provided in GDAL. Added function calls
166            that can be accessed from python.
167    
168            * Data/iceland_sample_raster.thuban: New. Sample file that uses
169            a raster layer.
170    
171            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
172            layer image data.
173    
174            * Doc/thuban.dtd: Added rasterlayer attribute definition.
175    
176            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
177            tests associated with the raster layer code.
178    
179            * test/test_transientdb.py
180            (TestTransientTable.test_auto_transient_table_query): Added a test
181            for using a Column object as the "right" parameter to a query.
182    
183    2003-05-19  Frank Koormann  <[email protected]>
184    
185            * Thuban/version.py (get_changelog_date):
186            Catch exceptions if ChangeLog does not exist.
187    
188            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
189    
190    2003-05-19  Frank Koormann  <[email protected]>
191    
192            Extended version information for Thuban
193    
194            * Thuban/version.py: New, version information for Thuban: Last
195            modification date and last ChangeLog entry date.
196    
197            * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
198            information: Display Thuban, wxPython and Python version.
199    
200    2003-05-16  Bernhard Herzog  <[email protected]>
201    
202            * Thuban/Model/save.py: Remove some unused imports including the
203            __future__ import for nested_scopes as Thuban relies on Python 2.2
204            now.
205            (XMLWriter.encode): Remove the special case for a None argument.
206            In the saver encode is always called with a string argument.
207    
208    2003-05-16  Bernhard Herzog  <[email protected]>
209    
210            * Thuban/UI/__init__.py: Remove the work-around for the locale bug
211            in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
212            of the bug was that e.g. float("1.2") would fail. Thuban now
213            requires 2.4.x.
214            
215    2003-05-16  Frank Koormann   <[email protected]>
216    
217            Printing enhancement and WMF export (under Win32)
218    
219            * Thuban/UI/renderer.py (ExportRenderer): New, derived from
220            ScreenRenderer. Renders Map, Legend and Scalebar for export.
221            (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
222            PrintRender.
223    
224            * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
225            to fullfil information needed for PrinterRenderer.
226            (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
227            (MapCanvas.Print): Adapted to new MapPrintout.
228            (OutputTransform): General calculations to transform from canvas
229            coordinates to export/printing devices.
230    
231            * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
232            new method_command to call ExportMap, with platform dependency (only
233            __WXMSW__)
234      
235            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
236            of scalebar drawing area as new parameters.
237            
238            * Thuban/Model/scalebar.py (roundInterval): round long instead of int
239    
240            * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
241            Update to extended scalebar.DrawScalebar header.
242    
243            * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
244    
245            * test/test_scalebar.py: Made test executable as standalone.
246    
247    2003-05-16  Bernhard Herzog  <[email protected]>
248    
249            * Thuban/Model/table.py (Table): Remove this compatibility alias
250            for DBFTable.
251    
252            * test/test_table.py: Import DBFTable as Table because that alias
253            doesn't exist anymore.
254    
255            * Thuban/UI/classgen.py: Remove some unused imports
256    
257    2003-05-14  Jonathan Coles   <[email protected]>
258    
259            * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
260            Fix docstring.
261            (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
262            (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
263            values of the supplied range to determine the beginning and end
264            bounds of the generated classes.
265    
266            * Thuban/Model/range.py (Range.number_re): Now accepts floats that
267            do not have a leading 0 (.5 is now accepted as well as 0.5).
268    
269            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
270            call to ClassGenerator.GenUniformDistribution.
271    
272            * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
273            layout bug with the 'Projection' label.
274    
275            * test/support.py (FloatTestCase): New. Needed for the Range tests.
276    
277            * test/test_range.py: New. Imported from SciParam.
278    
279    2003-05-12  Jonathan Coles   <[email protected]>
280    
281            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
282            to table.UniqueValues() with calls that retrieve all the values
283            from the table. This will need to be replaced by a method on table
284            which can simply return the list (perhaps more efficiently).
285    
286    2003-05-12  Jonathan Coles   <[email protected]>
287    
288            The return value of ClassGenerator.CalculateQuantiles has changed.
289            Refer to the documentation for details.
290    
291            * test/test_classgen.py: Modified Quantile tests to use the
292            new return values.
293    
294            * Thuban/Model/classgen.py
295            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
296            use new return values from CalculateQuantiles to produce the correct
297            range bounds in the Classification.
298            (ClassGenerator.CalculateQuantiles): Add more comments describing
299            the return values and parameters. Make minor adjustments to improve
300            the legibility of the code. Fix problem with adjusted not being set
301            in most cases.
302    
303    2003-05-12  Frank Koormann <[email protected]>
304            
305            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
306            and latin1. Fixes #1851 finally.
307    
308    2003-05-09  Jonathan Coles   <[email protected]>
309    
310            * test/test_classgen.py: New. Tests the Quantile algorithm.
311    
312            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
313            Clean up debugging statement, add comments, fix a small bug in the
314            returned adjusted percentiles.
315            
316    2003-05-09  Jonathan Coles   <[email protected]>
317    
318            Introduces Range class from SciParam into the ClassGroupRange class,
319            and such ranges can now be saved and loaded from disk.
320    
321            Quantiles are now available in the Classification Generator.
322    
323            Initial support for building Queries on a table. Doesn't do anything
324            but run some tests.
325    
326            * Thuban/Model/classification.py: Explicit imports.
327            (ClassGroupRange): Use the Range class to store the underlying
328            range information. The interface remains the same, except for
329            GetRange(), and you can also supply a Range object as the min
330            parameter to SetRange or __init__.
331    
332            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
333            string appropriately for use in Thuban. Fixes RTbug #1851.
334            (SessionLoader.end_projection): Handle the context of the
335            projection tag a bit better by looking at what objects are not
336            None. There was an assumption that a projection tag for a map
337            could occur before any layers.
338            (SessionLoader.start_clrange): Provide backward compatibility for
339            reading min/max values as well as the new range parameter.
340    
341            * Thuban/Model/map.py: Explicit imports.
342    
343            * Thuban/Model/resource.py: Import _.
344            (ProjFileSaver.write): write header using projfile.dtd.
345    
346            * Thuban/Model/save.py: Explicit imports.
347            (XMLWriter.encode): New. Encode the given string from a format
348            used by Thuban into UTF-8. Fixes RTbug #1851.
349    
350            * Thuban/UI/classgen.py: Explicit imports.
351            (ClassGenDialog.__init__): Clean up the code and add support
352            for Quantiles.
353            (ClassGenDialog.OnOK): Add support for Quantiles.
354            (GenQuantilesPanel): New. Input panel for Quantiles.
355            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
356            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
357    
358            * Thuban/Model/classgen.py: New. Contains all the classes named above.
359    
360            * Thuban/UI/classifier.py: Explicit imports.
361            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
362            ClassTable.SetValueAsCustom): Reworked to use new Range class.
363    
364            * Thuban/UI/legend.py: Explicit imports.
365    
366            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
367            a Table menu and associated method calls.
368            (MainWindow.choose_color): Removed. No longer needed.
369    
370            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
371            should be disabled if no projection is selected in the available
372            list.
373    
374            * Thuban/UI/renderer.py: Explicit imports.
375    
376            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
377            with correctly selecting the rows and issuing the right events.
378            Be sure to call Skip() to allow the grid to do some of its own
379            handling which allows the rows to actually be selected.
380            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
381            selecting multiple shapes.
382            (LayerTableFrame): Support for building Queries.
383            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
384    
385            * Thuban/UI/tree.py: Explicit imports.
386    
387            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
388            table view can call it.
389    
390            * test/test_classification.py: Explicit imports.
391            (TestClassification.test_ClassGroupRange): Fix test for new
392            Range class.
393    
394            * Doc/thuban.dtd: Add range parameter for clrange.
395    
396            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
397            object in ClassGroupRange, and also uesd for inputting ranges in
398            the classifer table and elsewhere.
399    
400            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
401            yet.
402    
403    2003-05-09  Frank Koormann <[email protected]>
404    
405            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
406    
407    2003-05-08  Frank Koormann <[email protected]>
408    
409            Coding style updates
410    
411            * test/test_scalebar.py: Replaced tab indentation by spaces.
412    
413            * Thuban/UI/scalebar.py: Explicit imports.
414    
415    2003-05-08  Frank Koormann <[email protected]>
416    
417            * Thuban/UI/scalebar.py
418            (ScaleBar.DrawScalebar): Format string bug fixed.
419    
420    2003-05-08  Frank Koormann <[email protected]>
421    
422            Reorganization of scalebar component (no wx in Thuban/Model)
423    
424            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
425            (deriveInterval):
426            Calculate scalebar interval and unit which fits in width for scale.
427            (roundInterval): Round float.
428    
429            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
430    
431            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
432    
433            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
434    
435    2003-05-08  Frank Koormann <[email protected]>
436    
437            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
438            Initialize ScaleBar with canvas.map
439    
440            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
441            round intervals to display smarter lengths
442            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
443            layer. If the maps has no projection applied grey the scalebar.
444    
445    2003-05-07  Frank Koormann <[email protected]>
446            
447            Basic Scalebar features added.
448    
449            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
450    
451            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
452            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
453            and the renderer.
454    
455            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
456    
457            * Thuban/UI/messages.py: SCALE_CHANGED added.
458    
459    2003-05-07  Bernhard Herzog  <[email protected]>
460    
461            * Thuban/Model/session.py (Session.__init__): New instance
462            variable shapestores to hold a list of all open shapestore objects
463            (Session.ShapeStores): New. Accessor method for the shapestores
464            list.
465            (Session._add_shapestore, Session._clean_weak_store_refs): New.
466            Internal methods to maintain the shapestores list.
467            (Session.Tables): New. Return all tables open in the session.
468            (Session.OpenShapefile): Insert the new ShapeStore into the
469            shapestores list.
470    
471            * test/test_session.py (TestSessionSimple.test_initial_state): Add
472            tests for ShapeStores and Tables
473            (TestSessionWithContent.test_shape_stores)
474            (TestSessionWithContent.test_tables): New. Test cases for
475            ShapeStores and Tables
476    
477    2003-05-07  Bernhard Herzog  <[email protected]>
478    
479            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
480            Add comments about the optimizations used.
481            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
482            Implement the ReadValue table interface method.
483    
484            * test/test_transientdb.py
485            (TestTransientTable.run_iceland_political_tests)
486            (TestTransientTable.test_transient_joined_table): Add tests for
487            ReadValue
488    
489    2003-05-07  Frank Koormann <[email protected]>
490    
491            * Resources/Bitmaps/fulllayerextent.xpm,
492            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
493            new icons.
494    
495    2003-05-06  Bernhard Herzog  <[email protected]>
496    
497            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
498            New. Simply delegate to the transient table's version.
499    
500            * test/test_transientdb.py
501            (TestTransientTable.test_auto_transient_table_query): New. Test
502            case for AutoTransientTable's SimpleQuery
503    
504    2003-05-06  Bernhard Herzog  <[email protected]>
505    
506            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
507            Implement a simple query method for the query dialog
508            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
509            the row index or shapeid.
510            (TransientTable.create): Insert the right value of the row index
511            (TransientJoinedTable.create): Copy the row index of the left
512            table to the joined result table
513    
514            * test/test_transientdb.py
515            (TestTransientTable.test_transient_table_read_twice): Fix
516            doc-string
517            (TestTransientTable.test_transient_table_query): New. Test for the
518            SimpleQuery method
519    
520    2003-05-06  Bernhard Herzog  <[email protected]>
521    
522            Convert all table users to use the new table interface. This only
523            covers Thuban itself, not GREAT-ER or other applications built on
524            Thuban yet, so the compatibility interface stays in place for the
525            time being but it now issues DeprecationWarnings.
526    
527            Finally, the new Table interface has a new method, HasColumn.
528    
529            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
530            issue deprecation warnings when they're. The warnings refer to the
531            caller of the method.
532            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
533            for the deprecation warnings
534    
535            * test/test_table.py: Ignore the deprecation warnings for the old
536            table in the tests in this module. The purpose of the tests is to
537            test the old interface, after all.
538    
539            * test/test_transientdb.py
540            (TestTransientTable.run_iceland_political_tests): Use the
541            constants for the types. Add a test for HasColumn
542            (TestTransientTable.test_transient_joined_table): Adapt to new
543            table interface. Add a test for HasColumn
544            (TestTransientTable.test_transient_table_read_twice): Adapt to new
545            table interface
546    
547            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
548            Adapt to new table interface
549    
550            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
551            new table interface
552    
553            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
554            (RecordTable.SetTable): Adapt to new table interface
555    
556            * Thuban/UI/classifier.py (Classifier.__init__)
557            (Classifier.__init__): Adapt to new table interface
558    
559            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
560            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
561            to new table interface
562    
563            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
564            (AutoTransientTable.HasColumn): Implement the new table interface
565            method
566            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
567            (AutoTransientTable.UniqueValues): Adapt to new table interface
568    
569            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
570            Adapt to new table interface
571    
572            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
573            simplify opening shapefiles a bit easier.
574            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
575            (TestLayer.test_point_layer): Use the new helper method
576            (TestLayer.test_get_field_type): New. Test for the GetFieldType
577            method
578    
579            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
580            the new table method
581    
582            * test/test_memory_table.py (TestMemoryTable.test_has_column):
583            Test for the new table method HasColumn
584    
585    2003-05-06  Jonathan Coles   <[email protected]>
586    
587            Addresses the "Selection Extent" wish of RTbug #1787.
588    
589            * Resources/Bitmaps/fulllayerextent.xpm,
590            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
591            extent. These are just place holders for the real bitmaps.
592    
593            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
594            calculate the bounding box once (the first time compute_bbox() is
595            called).
596            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
597            the bounding box for the shapes in lat/long coordinates.
598    
599            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
600            option.
601            (MainWindow.has_selected_shapes): New. Returns true if there are
602            any selected shapes.
603            (MainWindow.FullSelectionExtent): New. Calls
604            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
605            (_has_selected_shapes): New. Returns true if there are any
606            selected shapes.
607    
608            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
609            true if there are any selected shapes.
610    
611            * Thuban/UI/view.py (MapCanvas): Added delegated method
612            HasSelectedShapes.
613            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
614            shapes on the canvas using the map projection (if any).
615    
616            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
617            for Layer.ShapesBoundingBox().
618    
619    2003-05-06  Bernhard Herzog  <[email protected]>
620    
621            * Resources/Projections/defaults.proj: Fix spelling of Mercator
622    
623    2003-05-05  Jonathan Coles   <[email protected]>
624    
625            Addresses the "Full Layer Extent" wish of RTbug #1787.
626    
627            * Resources/Projections/defaults.proj: Added UK National Grid.
628    
629            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
630            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
631            when the user selects the menu option.
632    
633            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
634            scales the given layer on the canvas using the map projection.
635    
636    2003-05-05  Bernhard Herzog  <[email protected]>
637    
638            Convert the table implementations to a new table interface. All
639            tables use a common mixin class to provide backwards compatibility
640            until all table users have been updated.
641    
642            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
643            provide backwards compatibility for table classes implementing the
644            new interface
645            (DBFTable, MemoryTable): Implement the new table interface. Use
646            OldTableInterfaceMixin as base for compatibility
647            (DBFColumn, MemoryColumn): New. Column description for DBFTable
648            and MemoryTable resp.
649    
650            * test/test_dbf_table.py: New. Test cases for the DBFTable with
651            the new table interface.
652    
653            * test/test_memory_table.py: New. Test cases for the MemoryTable
654            with the new table interface.
655    
656            * test/test_table.py: Document the all tests in this file as only
657            for backwards compatibility. The equivalent tests for the new
658            interface are in test_memory_table.py and test_dbf_table.py
659            (MemoryTableTest.test_read): field_info should be returning tuples
660            with four items
661            (MemoryTableTest.test_write): Make doc-string a more precise.
662    
663            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
664            table interface. Derive from from OldTableInterfaceMixin for
665            compatibility.
666            (TransientTableBase.create): New intance variable column_map to
667            map from names and indices to column objects
668            (TransientTable.create): Use the new table interface of the input
669            table
670            (AutoTransientTable): Convert to new table interface. Derive from
671            from OldTableInterfaceMixin for compatibility.
672            (AutoTransientTable.write_record): Removed. It's not implemented
673            yet and we still have to decide how to handle writing with the new
674            table and data framework.
675    
676            * test/test_transientdb.py
677            (TestTransientTable.run_iceland_political_tests)
678            (TestTransientTable.test_transient_joined_table): Use the new
679            table interface
680    
681    2003-05-05  Jonathan Coles   <[email protected]>
682    
683            This is namely a collection of UI updates to improve user interactivity.
684            Tabbing between controls now exists and you can use ESC to close dialog
685            boxes; ENTER will active the default button.
686    
687            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
688            order that the controls are created so that tabbing works correctly.
689            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
690            wxDialog can handle the default button correctly.
691            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
692            same reasons as for OnOK.
693            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
694            when we ask the table for the maximum/minimum values of a field
695            which could take a very long time.
696    
697            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
698            order that the controls are created so that tabbing works correctly.
699            (SelectPropertiesDialog.__init__): Rearrange the order that the
700            controls are created so that tabbing works correctly.
701    
702            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
703            to derive from a wxDialog but behave like the original implementation
704            which was derived from a wxFrame. wxDialog provides useful key
705            handling functionality like ESC calling OnCancel and ENTER calling
706            OnOK which is lost with wxFrame.
707    
708            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
709            new dialogs.
710    
711            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
712            order that the controls are created so that tabbing works correctly.
713            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
714            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
715            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
716            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
717            can provide the "UK National Grid" as a default projection.
718            (UTMPanel.__init__): Rearrange the order that the controls are
719            created so that tabbing works correctly.
720    
721    2003-05-05  Bernhard Herzog  <[email protected]>
722    
723            * extensions/thuban/wxproj.cpp: Fix some of the comments.
724            (project_point): If a map projection but no layer projection is
725            given, convert degrees to radians before applying the map
726            projection.
727    
728            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
729            (TableGrid.allow_messages): New methods to make it possible to
730            inhibit message sending.
731            (TableGrid.issue): Only send the message if not inhibited.
732            (LayerTableGrid.select_shape): Use the new methods to make sure
733            that no ROW_SELECTED message is sent while we're updating the
734            selected rows to match the selected shapes.
735    
736    2003-05-02  Jan-Oliver Wagner <[email protected]>
737    
738            Implementation of MemoryTable.
739    
740            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
741            implementation that operates on a list of tuples. All of the data
742            are kept in the memory.
743    
744            * test/test_table.py (MemoryTableTest): New.
745    
746            * test/test_transientdb.py (SimpleTable): Removed.
747            (TestTransientTable.test_transient_joined_table,
748            (TestTransientTable.test_transient_table_read_twice): Replaced
749            SimpleTable by MemoryTable.
750    
751    2003-04-30  Jonathan Coles   <[email protected]>
752    
753            * Data/iceland_sample.thuban: Now contains correct projections
754            for each of the layers.
755    
756            * Resources/Projections/defaults.proj: Geographic projection
757            contains unit conversion parameter.
758    
759    2003-04-30  Jonathan Coles   <[email protected]>
760    
761            The most important part of this putback is the projection changes.
762            It should now be possible to specify the projection that a layer
763            is in and then specify a different projection for the map. The
764            projection dialog has an extra parameter for a geographic projection
765            which lets the user select if the input is in degrees or radians.
766    
767            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
768            to say that the parameter is a tuple of unprojected
769            points (which is what the callers to this method were assuming).
770            Also, since the points are unprojected we need to projected them.
771    
772            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
773            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
774            groups are selected, move the layer up/down. Fixes RTbug #1833.
775    
776            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
777    
778            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
779            parameter in call to SetClientData.
780            (GeoPanel): Add support for selecting the units that the
781            source data is in (Radians or Degrees).
782    
783            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
784            the rendering loop by reducing the number of if's, removing the
785            unnecessary try/except block, and checking if the old group
786            is the same as the new one (which happens a lot if there is
787            no classification, or lots of shapes are in the same group).
788    
789            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
790            around the redraw routine to try to catch problems that the user
791            may create by selecting invalid projections for the data set and
792            map. Clears the display if there are any problems and prints the
793            error.
794            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
795            rectangle.
796    
797            * extensions/thuban/wxproj.cpp (project_point): First invert the
798            supplied point (which should be in projected coordinates) using
799            the layer's projection and then project the point using the
800            map's projection.
801            (project_points): Use project_point() to project each point.
802    
803    2003-04-30  Jan-Oliver Wagner <[email protected]>
804    
805            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
806            don't set the Classification to None if the classfication field
807            is None (ie only a DEFAULT).
808    
809    2003-04-30  Bernhard Herzog  <[email protected]>
810    
811            * Thuban/UI/view.py: Fix some typos.
812    
813            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
814            not pop up the dialog if the selection becomes empty (this could
815            happen if e.g. a new selection is opened while the identify tool
816            is active and dialog had been closed)
817    
818    2003-04-30  Bernhard Herzog  <[email protected]>
819    
820            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
821            instance variable read_record_last_result
822            (TransientTableBase.read_record): Make sure reading the same
823            record twice works. The implementation uses the new instance
824            variable read_record_last_result
825    
826            * test/test_transientdb.py
827            (TestTransientTable.test_transient_table_read_twice): New test
828            case for the above bug-fix.
829    
830    2003-04-29  Jonathan Coles   <[email protected]>
831    
832            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
833    
834            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
835    
836            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
837            (ClassTable.SetValueAsCustom): Rename keyword argument in
838            ClassGroup* constructors to match argument name.
839    
840    2003-04-29  Bernhard Herzog  <[email protected]>
841    
842            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
843            transient DB if it exists to make sure it doesn't leave a journal
844            file in the temp directory.
845    
846            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
847            self.conn to None after closing the connection to make sure it's
848            not closed twice
849    
850    2003-04-29  Jonathan Coles   <[email protected]>
851    
852            Add a visible parameter in the layer XML tag. The default value is
853            "true". If anything other than "false" is specified we also assume
854            "true". Addresses RTbug #1025.
855    
856            * Doc/thuban.dtd: Add visible parameter to a layer.
857    
858            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
859            of visible from 1 to True.
860            (Layer.__init__): Change default value of visible from 1 to True.
861    
862            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
863            parameter.
864    
865            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
866            parameter.
867    
868            * test/test_load.py: Add new test data contents_test_visible.
869            (LoadSessionTest.setUp): save test data.
870            (LoadSessionTest.testLayerVisibility): Test if the visible flag
871            is loaded correctly.
872    
873            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
874            for saving an invisible layer.
875    
876    2003-04-29  Jonathan Coles   <[email protected]>
877    
878            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
879            legend dialog box and tell it to change its map to the one
880            supplied to SetMap(). Fixes RTbug #1770.
881    
882    2003-04-29  Bernhard Herzog  <[email protected]>
883    
884            Next step of table implementation. Introduce a transient database
885            using SQLite that some of the data is copied to on demand. This
886            allows us to do joins and other operations that require an index
887            for good performance with reasonable efficiency. Thuban now needs
888            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
889            haven't tested that.
890            
891            * Thuban/Model/transientdb.py: New. Transient database
892            implementation.
893    
894            * test/test_transientdb.py: New. Tests for the transient DB
895            classes.
896    
897            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
898            classes to help automatically remove temporary files and
899            directories.
900            (Session.__init__): New instance variables temp_dir for the
901            temporary directory and transient_db for the SQLite database
902            (Session.temp_directory): New. Create a temporary directory if not
903            yet done and return its name. Use AutoRemoveDir to have it
904            automatically deleted
905            (Session.TransientDB): Instantiate the transient database if not
906            done yet and return it.
907    
908            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
909            AutoTransientTable so that data is copied to the transient DB on
910            demand.
911            (SimpleStore): New class that simply combines a table and a
912            shapefile
913    
914            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
915            DBFTable and update its doc-string to reflect the fact that this
916            is only the table interface to a DBF file. Table is now an alias
917            for DBFTable for temporary backwards compatibility.
918    
919            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
920            the last reference to the session goes away so that the temporary
921            files are removed properly.
922    
923            * test/test_load.py (LoadSessionTest.tearDown): Remove the
924            reference to the session to make sure the temporary files are
925            removed.
926    
927    2003-04-29  Bernhard Herzog  <[email protected]>
928    
929            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
930            the __parser instance variable into a normal local variable in
931            read. It's only used there and read will never be called more than
932            once. Plus it introduces a reference cycle that keeps can keep the
933            session object alive for a long time.
934    
935    2003-04-29  Jonathan Coles   <[email protected]>
936    
937            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
938            Projection an immutable item. Fixes RTbug #1825.
939            (Projection.__init__): Initialize instance variables here.
940            (ProjFile.Replace): New. Replace the given projection object with
941            the new projection object. This solves the problem of needing the
942            mutator Projection.SetProjection() in the ProjFrame class and
943            allows a projection to change parameters without changing its
944            location in the file.
945    
946            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
947            be of type wxSAVE and should verify overwriting a file.
948    
949            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
950            ProjFile.Replace() method instead of the mutator
951            Projection.SetProjection(). Also requires that we reassign the
952            client data to the new projection.
953    
954            * test/test_proj.py (TestProjection.test): Test GetName() and
955            GetAllParameters()
956            (TestProjFile.test): Remove tests for Set*() methods. Add tests
957            for Replace().
958    
959    2003-04-25  Jonathan Coles   <[email protected]>
960    
961            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
962            to save the name of the projection.
963    
964            * test/test_save.py (SaveSessionTest.testLayerProjection): New
965            test to verify layer projections are saved correctly.
966    
967    2003-04-25  Jonathan Coles   <[email protected]>
968    
969            * Thuban/Model/proj.py (Projection.SetName): Set the name
970            to "Unknown" if name is None.
971            (Projection.SetAllParameters): New. Set the projection's
972            parameter list to the one supplied.
973            (Projection.SetProjection): New. Set the projection's
974            properties to those of the supplied Projection.
975    
976            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
977            the dialog title to include the map's title.
978            (MainWindow.LayerProjection): Set the dialog title to include
979            the layer's title.
980    
981            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
982            error dialogs into a single method call.
983            (ProjFrame.__VerifyButtons): Add more states to check.
984            (ProjFrame.__GetProjection): Return the current state of an
985            edited projection or None.
986            (ProjFrame.__FillAvailList): Remove checks for states that
987            shouldn't exist.
988            (ProjFrame._OnNew): Clear all selected items and supply
989            a projection panel if necessary.
990    
991            * test/test_proj.py (TestProjFile.test): Add tests for
992            ProjFile.SetAllParameters, ProjFile.SetProjection,
993            ProjFile.SetName.
994    
995    2003-04-25  Jonathan Coles   <[email protected]>
996    
997            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
998            takes an optional argument to select the current projection.
999            This does not guarantee that the item is visible due to
1000            limited wxWindows functionality. Fixes RTBug #1821.
1001    
1002    2003-04-25  Jonathan Coles   <[email protected]>
1003    
1004            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
1005            the projection name and use it when constructing the Projection
1006            object.
1007    
1008            * Thuban/Model/proj.py (Projection.__init__): Change the default
1009            value for 'name' to None and then test if name is equal to None
1010            in the body of the constructor. This way the caller doesn't have to
1011            know what the default value should be. Namely, useful in load.py
1012            where we have to pick a default value if the 'name' parameter
1013            doesn't exist in the XML file.
1014    
1015            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
1016            Tests a file where a layer has a projection.
1017    
1018  2003-04-25  Jonathan Coles   <[email protected]>  2003-04-25  Jonathan Coles   <[email protected]>
1019    
1020          * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the          * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the

Legend:
Removed from v.735  
changed lines
  Added in v.971

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26