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

Legend:
Removed from v.674  
changed lines
  Added in v.997

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26