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

Legend:
Removed from v.688  
changed lines
  Added in v.986

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26