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

Legend:
Removed from v.703  
changed lines
  Added in v.995

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26