/[thuban]/branches/WIP-pyshapelib-bramz/ChangeLog
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 766 by bh, Tue Apr 29 12:42:27 2003 UTC revision 1358 by jonathan, Wed Jul 2 09:38:36 2003 UTC
# Line 1  Line 1 
1    2003-07-01  Jonathan Coles   <[email protected]>
2    
3            Changed the singature of ClassGroupRange.__init__ and
4            ClassGroupRange.SetRange() so that the min/max values are
5            passed as a tuple. This makes a better calling scheme for
6            when a Range object is passed instead.
7    
8            * Thuban/Model/classgen.py: Fixed parameters to
9            ClassGroupRange constructor.
10    
11            * Thuban/Model/classification.py (ClassGroupRange.__init__):
12            Consolidate the min/max parameters into a single _range which
13            can either be a tuple or a Range object.
14            (ClassGroupRange.SetRange): Consolidate the min/max parameters
15            into a single _range which can either be a tuple or a Range object.
16    
17            * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
18            call to ClassGroupRange constructor to use a tuple.
19    
20            * Thuban/Model/layer.py (Layer.SetClassification): Switch
21            the classification instance variable to the new class
22            before calling _set_layer otherwise subscribers to a
23            LAYER_CHANGED event will not see any difference.
24    
25            * test/test_classification.py: Fix tests of ClassGroupRange
26            so that they use the new signature.
27    
28            * test/test_load.py: Fix use of ClassGroupRange so that it
29            uses the new signature.
30    
31            * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
32            uses the new signature.
33    
34            * test/test_save.py: Fix use of ClassGroupRange so that it
35            uses the new signature.
36    
37    
38    2003-07-01  Jonathan Coles   <[email protected]>
39    
40            * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
41            Import used objects/class from color.
42            (generate_singletons): We don't
43            need the numGroups parameter anymore because we are using
44            the new ramps with GetProperties().
45            (generate_uniform_distribution): Use new ramp method
46            GetProperties().
47            (generate_quantiles, GenQuantiles0): Use new ramp method
48            GetProperties().
49            (CustomRamp.SetNumGroups): Removed. The ramps now map
50            a value from 0 to 1 to class properties so the number
51            of groups is not needed ahead of time.
52            (CustomRamp.next): Removed. CustomRamp does not support
53            interation anymore.
54            (CustomRamp.GetProperties): Returns a ClassGroupProperties
55            object based on the index value from 0 to 1 that is
56            passed to it.
57            (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
58            Made into instances of Monochromatic class instread of
59            deriving from it.
60            (HotToCold.SetNumGroups): Removed. See CustomRamp.
61            (HotToCold.next): Removed. See CustomRamp.
62    
63            * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
64            (Classification.SetField, Classification.SetFieldType):
65            Replaced with SetFieldInfo.
66            (Classification.SetFieldInfo): New. Does a better job of
67            what SetField and SetFieldType used to do by combining
68            their function since they should really always be done
69            at the same time.
70            (Classification.SetLayer): Renamed to _set_layer.
71            (Classification._set_layer): Should only be called from
72            Layer's SetClassification. This does not cause a recursive
73            call as SetLayer did because we know that Layer knows about
74            the classification.
75    
76            * Thuban/Model/color.py: Fixes RTbug #1971.
77            (_Transparent): Renamed from Transparent so it doesn't
78            conflict with the module variable.
79            (Transparent, Black): Renamed from Color.Transparent,
80            Color.Black so they are not class variables.
81    
82            * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
83            (Layer.Destroy): We don't need to call SetClassification
84            anymore to clear out the back reference in the classifcation
85            to the layer. It's better to set it to None using _set_layer,
86            and we won't be creating another clas object too.
87            (Layer.SetClassification): Classification._set_layer is not
88            recursive so remove all the locking variables. Also clean
89            up the code so that it remains unchanged if something fails.
90    
91            * Thuban/Model/load.py: Fixes RTbug #1971.
92            (SessionLoader.start_classification): Call
93            Classification.SetFieldInfo().
94    
95            * Thuban/Model/save.py: Removed import of Color which wasn't
96            being used.
97    
98            * Thuban/UI/classgen.py: Fixes RTbug #1972.
99            (ClassGenDialog.__init__): Color ramps are now instances
100            already so we don't need to create any new objects.
101            (ClassGenDialog.OnOK): Check for numGroups is no longer
102            necessary because we never use it.
103    
104            * Thuban/UI/classifier.py: Fixes RTbug #1971.
105            (Classifier.__BuildClassification, Classifier.__SetGridTable):
106            Call Classification.SetFieldInfo() instead of SetFieldType.
107    
108            * Thuban/UI/renderer.py: Fixes RTbug #1971.
109    
110            * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
111            (MapCanvas.__init__): Subscribe to the idle time event. Set
112            background color to white.
113            (MapCanvas.OnPaint): Set a flag indicating that we should
114            render the map during idle time. If we already have a bitmap
115            just draw it now.
116            (MapCanvas.OnIdle): New. Render the map only during idle time.
117            This also fixes a problem with the busy cursor under gtk.
118    
119            * test/test_classgen.py (ClassGenTest.test_generate_singletons):
120            Fix calls to generate_singletons because the signature changed.
121    
122            * test/test_classification.py: Fix color references and
123            change calls to Classification.[SetField|SetFieldType] to
124            SetFieldInfo.
125    
126            * test/test_load.py: Fix color references.
127    
128            * test/test_load_0_2.py: Fix color references.
129    
130            * test/test_save.py (SaveSessionTest.testClassifiedLayer):
131            Change calls to Classification.[SetField|SetFieldType] to
132            SetFieldInfo.
133    
134    2003-07-01  Frank Koormann   <[email protected]>
135    
136            MERGE from the greater-ms3 branch.
137    
138            * test/test_transientdb.py
139            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
140            New. Test join of two tables with partly equal column names.
141    
142            * Thuban/Model/transientdb.py (TransientJoinedTable.create):
143            If duplicates in left and right tables column names are found,
144            append '_' (underscores) to the name until it is unique.
145            Create always new internal names for the resulting table and reference
146            columns in the join statement with <table>.<column>
147    
148    2003-07-01  Bernhard Herzog  <[email protected]>
149    
150            * test/test_transientdb.py
151            (TestTransientTable.test_transient_joined_table_same_column_name):
152            New. Test whether joining on columns with the same names in both
153            tables works.
154            
155            * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
156            sure to use the right internal names even when joining on field
157            with the same names in both tables. Also, detect duplicate names
158            in the joined table correctly.
159    
160    2003-07-01  Frank Koormann   <[email protected]>
161    
162            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
163            Reverse List of layers to render in same order as in desktop legend.
164    
165    2003-06-30  Jonathan Coles   <[email protected]>
166    
167            * Thuban/version.py (make_tuple): Takes a version string
168            and splits it into a tuple of at most three integers.
169            Used make_tuple() to make tuple versions of the version
170            numbers.
171    
172            * Thuban/UI/about.py: Add Thuban email addresses.
173    
174    2003-06-30  Jonathan Coles   <[email protected]>
175    
176            * Thuban/version.py: SQLite/PySQLite version dependencies
177            were too high.
178    
179    2003-06-30  Jonathan Coles   <[email protected]>
180    
181            * Thuban/version.py: Update version to 0.8.1
182            
183            * MANIFEST.in: Added Projections so that default.proj is
184            included.
185    
186    2003-06-26  Jonathan Coles   <[email protected]>
187    
188            New About box with lots more information including library
189            versions and credits. More/better version checking before
190            Thuban starts.
191    
192            * Thuban/UI/about.py: New. New About box that displays
193            library version information and credits.
194    
195            * Thuban/version.py: Added new 'versions' dictionary which
196            contains the verions of various libraries which are checked
197            when the module loads.
198            (verify_versions): Check all version numbers and returns
199            a list of errors.
200    
201            * Thuban/UI/classifier.py (Classifier.__EnableButtons):
202            Reset the status of the buttons as the situation warrants,
203            but in a better more reliable way by not relying on the
204            current status to determine what needs to change.
205    
206            * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
207            (verify_versions): Remove most of the code since it is
208            now in Thuban.version.verify_versions.o
209    
210            * Thuban/UI/mainwindow.py (MainWindow.About): Call new
211            About box in Thuban.UI.about.
212    
213            * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
214            Returns the version of gdal library being used as a string.
215    
216            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
217            Removed.
218            (get_proj_version): Return the version of PROJ that the file
219            was compiled with.
220            (get_gtk_version): Return th version of GTK that the file
221            was compiled with.
222    
223    2003-06-25  Jonathan Coles   <[email protected]>
224    
225            * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
226            of the SelectPropertiesDialog should be self so the window
227            appears on top.
228            (ClassGroupPropertiesCtrl.DoEdit): The parent
229            of the SelectPropertiesDialog should be self so the window
230            appears on top.
231    
232            * Thuban/UI/resource.py: Cleaned up how we determine file
233            extensions.
234            (GetImageResource): Return an wxImage from our Resources.
235    
236    2003-06-24  Jonathan Coles   <[email protected]>
237    
238            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
239            Check that a layer has a classification before trying
240            to get it. Raster layers don't have classifications.
241    
242    2003-06-23  Jonathan Coles   <[email protected]>
243            
244            * setup.py: Add Resources/XML to resource list.
245        
246    2003-06-23  Jonathan Coles   <[email protected]>
247    
248            * setup.cfg: Fix copyright dates
249        
250    2003-06-23  Jonathan Coles   <[email protected]>
251    
252            * MANIFEST.in: Update with Resources/XML
253    
254            * setup.py: Don't include Locale resources yet as we don't
255            have any and it causes problems building the distribution
256            for Windows. Update version to 0.8.0.
257    
258            * Doc/thuban.dtd: Removed since it is now in Resources/XML.
259    
260            * Thuban/UI/mainwindow.py: Add blank line at the end because
261            file was not being read correctly building the Windows
262            distribution.
263    
264    2003-06-23  Jonathan Coles   <[email protected]>
265    
266            * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
267    
268            * Thuban/version.py: Temporarily update longversion for
269            the 0.8 release so that it doesn't have the cvs revision.
270    
271    2003-06-23  Jonathan Coles   <[email protected]>
272    
273            * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
274            to make sure that we don't create reentrant possibilities with
275            wxYield.
276    
277            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
278            directly to avoid the wxSafeYield() call which generates an
279            OnPaint event causing infinite recursion. Don't try to catch
280            exception anymore. This was for before there were limits on map
281            scaling.
282    
283    2003-06-23  Bernhard Herzog  <[email protected]>
284    
285            Bug fix for RT #1961:
286    
287            * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
288            Register DerivedShapestores with the session
289    
290            * Thuban/Model/session.py (Session.Tables): Make sure each table
291            is only listed once.
292    
293            * test/test_load.py (TestJoinedTable.test): Add check_format call.
294            Update file contents to match the one written out.
295    
296    2003-06-20  Bernhard Herzog  <[email protected]>
297    
298            * test/xmlsupport.py (SaxEventLister.startElementNS)
299            (SaxEventLister.endElementNS): Do not include the qname. Python
300            2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
301            is (presumably incorrectly) None, whereas it's a string with the
302            element name in the later versions.
303    
304            * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
305            (TestEventList.test_even_list_namespace): Update tests to reflect
306            the new behaviour
307            (TestEventList.test_even_list_id_normalization): Fix doc-string
308    
309    2003-06-20  Jonathan Coles   <[email protected]>
310    
311            * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
312            by deriving classes to determine if that layer supports shapes.
313            (Layer): Override HasShapes and return true.
314    
315            * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
316            instead of a direct call to wx[Begin|End]CusyCursor().
317            (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
318            table data.
319    
320            * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
321            New. Wrappers around the wxWindows functions that allow us to
322            make additional calls such as wxYield which gives the native
323            system a chance to update the cursor correctly.
324    
325            * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
326            instead of a direct call to wx[Begin|End]CusyCursor().
327    
328            * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
329            instead of a direct call to wx[Begin|End]CusyCursor().
330            (MapCanvas.find_shape_at): Check if the current search layer
331            support shapes, otherwise go on to the next layer.
332    
333            * test/test_layer.py: Add tests in each type of layer for
334            HasClassification() and HasShapes()
335    
336    2003-06-20  Jonathan Coles   <[email protected]>
337    
338            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
339            turning on the busy cursor to allow the system to change the
340            cursor before we begin painting. This fixes a problem that
341            was occuring only under GTK. Fixes RTbug #1840.
342    
343    2003-06-20  Bernhard Herzog  <[email protected]>
344    
345            * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
346            version.
347    
348            * Thuban/Model/save.py (sort_data_stores): New. Make topological
349            sort of the data sources so they can be written with sources that
350            data sources that depend on other data sources come after the
351            sources they depend on.
352            (SessionSaver.__init__): Add idmap instance variable to map from
353            objects to the ids used in the file.
354            (SessionSaver.get_id, SessionSaver.define_id)
355            (SessionSaver.has_id): New. Methods to manage the idmap
356            (SessionSaver.write): Use thuban-0.8.dtd
357            (SessionSaver.write_session): Add a namespace on the session and
358            write out the data sources before the maps.
359            (SessionSaver.write_data_containers): New. Write the data
360            containers.
361            (SessionSaver.write_layer): Layer elements now refer to a
362            shapestore and don't contain filenames anymore.
363    
364            * Thuban/Model/load.py (LoadError): Exception class to raise when
365            errors in the files are discovered
366            (SessionLoader.__init__): Define dispatchers for elements with a
367            thuban-0.8 namespace too.
368            (SessionLoader.check_attrs): New helper method to check and
369            convert attributes
370            (AttrDesc): New. Helper class for SessionLoader.check_attrs
371            (SessionLoader.start_fileshapesource)
372            (SessionLoader.start_derivedshapesource)
373            (SessionLoader.start_filetable, SessionLoader.start_jointable):
374            Handlers for the new elements in the new fileformat
375            (SessionLoader.start_layer): Handle the shapestore attribute in
376            addition to filename.
377            (SessionLoader.start_table, SessionLoader.end_table): Removed.
378            They were never used in the old formats and aren't needed for the
379            new.
380    
381            * Thuban/Model/session.py (Session.DataContainers): New method to
382            return all "data containers", i.e. shapestores and tables
383    
384            * test/xmlsupport.py (SaxEventLister.__init__)
385            (SaxEventLister.startElementNS, sax_eventlist): Add support to
386            normalize IDs.
387    
388            * test/test_xmlsupport.py
389            (TestEventList.test_even_list_id_normalization): New test case for
390            id normalization
391    
392            * test/test_load.py (LoadSessionTest.check_format): Use ID
393            normalization
394            (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
395            class atrributes used for ID normalization
396            (TestSingleLayer, TestLayerVisibility, TestLabels.test)
397            (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
398            file format
399            (TestJoinedTable): New test for loading sessions with joined
400            tables.
401            (TestLoadError): New. Test whether missing required attributes
402            cause a LoadError.
403    
404            * test/test_save.py (SaveSessionTest.thubanids)
405            (SaveSessionTest.thubanidrefs): New class attributes for ID
406            normalization in .thuban files.
407            (SaveSessionTest.compare_xml): Use id-normalization.
408            (SaveSessionTest.testEmptySession)
409            (SaveSessionTest.testLayerProjection)
410            (SaveSessionTest.testRasterLayer)
411            (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
412            (SaveSessionTest.testLayerProjection): The filename used was the
413            same as for testSingleLayer. Use a different one.
414            (SaveSessionTest.test_dbf_table)
415            (SaveSessionTest.test_joined_table): New test cases for saving the
416            new data sources structures.
417            (TestStoreSort, MockDataStore): Classes to test the sorting of the
418            data stores for writing.
419    
420            * test/runtests.py: Add CVS keywords
421    
422    2003-06-20  Jonathan Coles   <[email protected]>
423    
424            * test/test_session.py
425            (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
426            Use the cultural_landmark-point.dbf file for the store so that
427            the table rows and shape count match.
428    
429    2003-06-20  Jonathan Coles   <[email protected]>
430    
431            * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
432            an exception if the number of shapes is different from the
433            number of rows in the table. Address RTbug #1933.
434    
435            * test/test_layer.py (TestLayer.test_derived_store): Add
436            a test for the new exception in DerivedShapeStore.__init__.
437    
438            * test/support.py (FloatTestCase): Removed since there is
439            already FloatComparisonMixin. Fixes RTbug #1954.
440            (FloatComparisonMixin.assertFloatEqual): Include test for
441            infinity that was part of FloatTestCase.
442    
443            * test/test_range.py (RangeTest): Inherit from
444            support.FloatComparisonMixin now that we don't have
445            support.FloatTestCase.
446    
447    2003-06-20  Bernhard Herzog  <[email protected]>
448    
449            * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
450            the implementation in xmlsupport instead.
451            (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
452    
453            * test/test_proj.py: Import sax_eventlist from xmlsupport instead
454            of test_save
455    
456    2003-06-20  Bernhard Herzog  <[email protected]>
457    
458            * test/test_load.py (LoadSessionTest.check_format): New helper
459            method to make sure the test files we load might have been written
460            by the current thuban version.
461            (ClassificationTest.TestLayers, TestSingleLayer.test)
462            (TestLayerVisibility.test, TestClassification.test)
463            (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
464            Add check_format() calls and fix the thuban data to match the data
465            that would be written by saving the session loaded from it.
466    
467            * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
468            the same class and function in test_save.
469    
470            * test/test_xmlsupport.py (TestEventList): New. test cases for
471            sax_eventlist
472    
473    2003-06-20  Bernhard Herzog  <[email protected]>
474    
475            * Resources/XML/thuban.dtd: Add comment about which versions of
476            Thuban are covered by this DTD
477            (map): Fix content model for layers and raster layers. There can
478            be any number or layers and raster layers in any order.
479    
480    2003-06-20  Jonathan Coles   <[email protected]>
481    
482            This is mainly about fixing RTbug #1949.
483    
484            * Thuban/Model/classification.py: Remove "from __future__"
485            import statement since python 2.2 is the earliest supported
486            version.
487    
488            * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
489            Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
490            depending on the units this projection *forwards* into.
491    
492            * Thuban/Model/save.py (SessionSaver.write_classification):
493            Remove unnecessary use of lambdas and nested functions.
494    
495            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
496            adjustment here if the map projection uses degrees.
497    
498            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
499            scale adjust code since it is now done before calling
500            this method. Don't do anything if the map projection
501            is None.
502    
503    2003-06-19  Bernhard Herzog  <[email protected]>
504    
505            Move version specific load tests to their own file.
506    
507            * test/test_load.py: Expand the doc-string to explain a bit how to
508            handle file format changes.
509            (TestClassification.test): Update the docstring as this test is
510            not about Thuban 0.2 anymore.
511    
512            * test/test_load_0_2.py: New file with the load tests for thuban
513            files created with Thuban 0.2 and earlier.
514    
515    2003-06-19  Bernhard Herzog  <[email protected]>
516    
517            Add XML validation to some of the tests. Validation will only be
518            done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
519            To make the DTD available to the test cases it's moved into
520            Resources/XML
521    
522            * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
523            for versions up to and including 0.2. Two slight changes: added an
524            encoding specification and fixed the comment which refered to
525            GRASS, not Thuban
526    
527            * test/xmlsupport.py: New support module for tests involving XML.
528            Currently there's a mix-in class for XML validation.
529    
530            * test/test_xmlsupport.py: New. Tests for the xmlsupport module
531    
532            * test/test_save.py (SaveSessionTest): Derive from ValidationTest
533            so that we can validate the
534            (SaveSessionTest.testEmptySession)
535            (SaveSessionTest.testSingleLayer)
536            (SaveSessionTest.testSingleLayer)
537            (SaveSessionTest.testLayerProjection)
538            (SaveSessionTest.testRasterLayer)
539            (SaveSessionTest.testClassifiedLayer): Validate the generated XML
540    
541            * test/runtests.py (main): Call print_additional_summary instead
542            of print_garbage_information
543    
544            * test/support.py (resource_dir): New function to return the
545            "Resource" subdirectory
546            (print_additional_summary): New function to combine several
547            summary functions
548            (run_tests): Use print_additional_summary instead of calling
549            print_garbage_information directly
550    
551    2003-06-19  Bernhard Herzog  <[email protected]>
552    
553            * Doc/thuban.dtd (classification): Correct the content model of
554            the classification element.
555            (projection): Add the "name" attribute
556    
557    2003-06-19  Frank Koormann   <[email protected]>
558    
559            MERGE from the greater-ms3 branch.
560    
561            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
562            scale if projection is latlong to get better estimate.
563    
564            Fix problem of hidden properties dialog under windows after double
565            click on layer tree:
566            The tree control always gets an Expanded / Collapsed event after
567            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
568            raises the already displayed window.
569    
570            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
571            raiseProperties initialized to prevent endless loops
572            (LegendTree._OnItemActivated): Depending on self.raiseProperties
573            simply raise the properties or open the dialog and issue a second
574            event.
575    
576    2003-06-18  Jonathan Coles   <[email protected]>
577    
578            * setup.py: Fix a few problems that occured under Windows.
579    
580    2003-06-18  Jonathan Coles   <[email protected]>
581    
582            When Thuban loaded the map was redrawn twice because the
583            legend was being opened after the mainwindow was created
584            and not during its creation. This meant the map was drawn
585            initially and then had to be redrawn when the legend
586            caused the display to change. Now the legend is opened
587            in the mainwindow constructor which resolves this issue.
588    
589            Also, although we were checking for the existence of
590            gdal and gdalwarp modules, the gdalwarp extension was
591            still being compiled (which may fail if the system doesn't
592            have gdal installed). the build_ext command to setup.py
593            now accepts the flags --with-gdal and --without-gdal.
594            If --without-gdal is specified setup.py will try to
595            use the gdal parameters specified by gdal-config. Under
596            windows, those parameters have to be set in setup.py
597            as with proj4 an wxWindows.
598    
599            * setup.py: Use a list instead of seperate variables for
600            extension parameters so we can create a generic function
601            that runs an appropriate *-config script.
602            (run_cs_script): Renamed from run_wx_script and modified
603            to accept a second argument which is a list of lists to
604            be filled in by the values returned from running the command.
605            (thuban_build_ext): New. Extends the build_ext command and
606            provides the options --with-gdal/--without-gdal which then
607            optionally includes the gdalwarp extension.
608    
609            * Thuban/Model/resource.py: First check if we can import
610            the gdalwarp Thuban extension before checking for gdal.
611            Also added some comments.
612            
613            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
614            the map is None which may be the case if none has been loaded
615            yet.
616    
617            * Thuban/UI/main.py (main): Remove call to ShowLegend.
618    
619            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
620    
621            * Thuban/UI/renderer.py: Check for gdal support before importing
622            gdalwarp.
623            (MapRenderer.render_map): Only try to optimize if we have gdal
624            support otherwise nothing will get drawn.
625    
626            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
627            during startup before a map has been created. Check if map is None
628            before using it and do nothing if it is.
629    
630    2003-06-17  Jonathan Coles   <[email protected]>
631    
632            Fix the problem with raster layers under Windows that caused
633            Thuban to crash. The view should respond to layer projection
634            changed events to update the display. Changes to a projection
635            should not cause the map to be set to full extent.
636            
637            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
638            current_map_proj to remember the current map projection so that
639            when the projection changes we know what the previous projection
640            was.
641            (MapCanvas.SetMap): Unsubscribe and subscribe to
642            LAYER_PROJECTION_CHANGED events.
643            (MapCanvas.projection_changed): Split into two methods that respond
644            to map and layer projection changes.
645            (MapCanvas.map_projection_changed): New. Takes the current view and
646            projects it using the new projection. This does not cause the
647            map to be redrawn at full extent.
648            (MapCanvas.layer_projection_changed): New. Cause a redraw which
649            will draw each layer in its new projection.
650            
651            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
652            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
653            under Windows.
654            
655            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
656            to twice sizeof(void*) because there are two digits for each
657            hex byte.
658    
659    2003-06-16  Bernhard Herzog  <[email protected]>
660    
661            Update to the layer interface: Direct access to the table,
662            shapetable, shapefile and filename attributes is now actively
663            deprecated by issuing deprecation warnings for all places where
664            this happens.
665    
666            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
667            to the instance variables table, shapetable, shapefile and
668            filename via __getattr__ so that we can issue a deprecation
669            warning.
670            (Layer.SetShapeStore): Don't set the deprecated instance variables
671            any more
672            (Layer.SetShapeStore): Don't use deprecated layer instance
673            variables
674            (Layer.Destroy): No need to explicitly remove the instance
675            variables any more
676            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
677            instance variables
678    
679            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
680            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
681            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
682            use deprecated layer instance variables
683    
684            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
685            deprecated layer instance variables
686    
687            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
688            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
689            instance variables
690    
691            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
692            deprecated layer instance variables
693    
694            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
695            deprecated layer instance variables
696    
697            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
698            deprecated layer instance variables
699    
700            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
701            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
702            variables
703    
704            * test/runtests.py (main): Turn Thuban's deprecation warnings into
705            errors so that they're cought by the tests
706    
707            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
708            layer instance variables
709    
710    2003-06-16  Jonathan Coles   <[email protected]>
711    
712            Fix a problem under Windows whereby if the user double-clicks on a
713            layer in the legend that tree item will expand or collapse as well
714            as open the layer properties dialog. The state of the tree item
715            should not be affected.
716    
717            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
718            preventExpandCollapse and subscribe to expanding and collapsing
719            events.
720            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
721            collapsing events and will veto the event if it has been triggered
722            by the user double clicking on a layer.
723            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
724            that an expanding/collapsing event should be vetoed.
725    
726    2003-06-13  Bernhard Herzog  <[email protected]>
727    
728            * Thuban/UI/classifier.py (Classifier.OnClose)
729            (Classifier.map_layers_removed)
730            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
731            in OnClose and not in map_layers_removed or
732            layer_shapestore_replaced to make sure it always happens when the
733            dialog is closed
734    
735    2003-06-13  Jonathan Coles   <[email protected]>
736    
737            This puts back a fix for Windows where a panel is needed so that
738            the background of the table view appears correctly.
739    
740            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
741            object that can be used by derived classes to place any
742            controls (including the grid) onto.
743            (QueryTableFrame.__init__): Use the panel as the parent window
744            for all the controls. Reparent the grid so that the panel is
745            the parent. Call UpdateStatusText() to correctly initialize
746            the status bar.
747    
748    2003-06-13  Jonathan Coles   <[email protected]>
749    
750            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
751            from wxFrame (as opposed to wxDialog like the other classes)
752            but otherwise behaves like the other classes. This is needed
753            for the TableView which isn't really a dialog and needs to
754            have a status bar and control buttons.
755    
756            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
757            instance variable to keep track of how many rows are selected.
758            Subscribe once to the the events we are interested in.
759            (ThubanGrid.OnRangeSelect): Only handle event if event handling
760            hasn't been turned off.
761            (ThubanGrid.OnSelectCell): Only handle event if event handling
762            hasn't been turned off.
763            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
764            as an event listener (which changes the event handler stack)
765            simply set an instance variable to False. This is checked in
766            the event handlers.
767            (ThubanGrid.GetNumberSelected): Return the number of currently
768            selected rows.
769            (TableFrame): Inherit from ThubanFrame so we can have a
770            status bar and control buttons.
771            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
772            Explicitly set which items are selected in the operator choice and
773            action choice so there is always a valid selection. Fixes RTbug #1941.
774            Subscribe to grid cell selection events so we can update the
775            status bar.
776            (QueryTableFrame.UpdateStatusText): Update the status bar with
777            how many rows are in the grid, how many columns, and how many
778            rows are selected.
779            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
780            Call UpdateStatusText when cells are (de)selected.
781            (QueryTableFrame.OnQuery): Use the string value in the value
782            combo if either the selected item index is 0 or if the string
783            cannot be found in the predefined list (this happens if the
784            user changes the text). Fixes RTbug #1940.
785            Only turn off the grid event listeners if there a query comes
786            back with a none empty list of ids. in the case that the list
787            is empty this causes a grid.ClearSelection() call to actually
788            clear the grid selection which causes the selected items in
789            the map to be deselected. Fixes RTbug #1939.
790    
791            * test/test_save.py (XMLWriterTest.Encode): Check return values.
792            Fixes RTbug #1851.
793    
794    2003-06-13  Bernhard Herzog  <[email protected]>
795    
796            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
797            self.selected_shape with the current selection to make sure the
798            contents of the dialog are up to date when it's shown for the
799            first time.
800            The dialog used to work without this by luck. The recent fix to
801            the connector module 'broke' a 'feature' the identify view was
802            relying on, i.e that subscribing to a message in response to
803            receiving a message of that type would mean that the new
804            subscriber would also be called for the same message.
805            
806    2003-06-12  Jonathan Coles   <[email protected]>
807    
808            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
809            the image is rendered. Fixes RTbug #1937.
810    
811    2003-06-12  Jonathan Coles   <[email protected]>
812    
813            * Thuban/Lib/fileutil.py: As is done under Windows, create the
814            user directory if it doesn't exist on a posix system.
815            Fixes RTbug #1815.
816    
817            * Thuban/Model/resource.py (get_user_proj_files): Moved the
818            called to get_application_dir here, so that the directory
819            will only be called if this method is invoked.
820    
821            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
822            the projfilepath if no projection is selected.
823    
824    2003-06-12  Jonathan Coles   <[email protected]>
825    
826            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
827            the scalebar if the current map has no projection set.
828    
829            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
830            projfilepath label to just the basename of the projection file
831            rather than include the entire path.
832    
833            * Thuban/Model/resource.py: Fix missed proj functions that
834            needed to be renamed.
835    
836    2003-06-12  Jonathan Coles   <[email protected]>
837    
838            * Thuban/Model/classification.py: Removed assert statements that
839            tested if the variable was an instance of Color.
840    
841            * Thuban/Model/color.py (Color): Remove commented code that isn't
842            used.
843            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
844            Fixes RTbug #1835.
845            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
846            Needed now that the class doesn't inherit from Color.
847    
848    2003-06-12  Jonathan Coles   <[email protected]>
849    
850            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
851            check unicode strings.
852    
853            * test/test_layer.py: Check for existence of gdal.
854    
855    2003-06-12  Jonathan Coles   <[email protected]>
856        
857            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
858            that was in load.py
859    
860            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
861            that was in save.py
862    
863    2003-06-12  Jonathan Coles   <[email protected]>
864    
865            This is largely a collection of bug fixes. We also handle the
866            case where gdal is not on the system. The XMLReader and XMLWriter
867            classes were moved into there own files to resolve some circular
868            import references and because they shouldn't really be in the
869            file that is dediciated to reading/writing session files since
870            they are also used elsewhere.
871    
872            * Thuban/Model/classgen.py: Renamed functions to follow the
873            function_names_with_underscores style. Fixes RTbug #1903.
874            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
875    
876            * Thuban/Model/layer.py: Import gdal only if it available.
877            (RasterLayer): Handle the case where the gdal library is unavailable.
878            Addresses RTbug #1877.
879    
880            * Thuban/Model/load.py (XMLReader): Moved into seperate file
881            xmlreader.py.
882    
883    2003-06-12  Jonathan Coles   <[email protected]>
884    
885            This is largely a collection of bug fixes. We also handle the
886            case where gdal is not on the system. The XMLReader and XMLWriter
887            classes were moved into there own files to resolve some circular
888            import references and because they shouldn't really be in the
889            file that is dediciated to reading/writing session files since
890            they are also used elsewhere.
891    
892            * Thuban/Model/classgen.py: Renamed functions to follow the
893            function_names_with_underscores style. Fixes RTbug #1903.
894            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
895    
896            * Thuban/Model/layer.py: Import gdal only if it available.
897            (RasterLayer): Handle the case where the gdal library is unavailable.
898            Addresses RTbug #1877.
899    
900            * Thuban/Model/load.py (XMLReader): Moved into seperate file
901            xmlreader.py.
902    
903            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
904            file xmlwriter.py.
905    
906            * Thuban/Model/resource.py: Renamed functions to following the
907            function_names_with_underscores style.
908            (has_gdal_support): New function that returns true if the gdal
909            library is available. Addresses RTbug #1877.
910    
911            * Thuban/UI/application.py (ThubanApplication.OpenSession):
912            Display a message box if the gdal library is not available, but
913            only if there are any layers that would use it. Addresses RTbug #1877.
914    
915            * Thuban/UI/classgen.py: Use renamed projection resource functions.
916            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
917            when using integers versus floats.
918    
919            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
920            determine if the "Add Image Layer" menu option should be
921            greyed out or not. Addresses RTbug #1877.
922    
923            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
924    
925            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
926            optimize if a raster layer is visible. Fixes RTbug #1931.
927            Only draw the raster layer if the gdal library is available.
928            Addresses RTbug #1877.
929    
930            * test/test_classgen.py: Add tests for generate_singletons,
931            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
932            (test_calculate_quantiles): Fix some tests to catch the new
933            ValueError that is raised.
934    
935            * test/test_proj.py: Use renamed projection resource functions.
936    
937            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
938            test for saving classified layers. Fixes RTbug #1902.
939            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
940    
941    2003-06-12  Jan-Oliver Wagner <[email protected]>
942    
943            Fix for http://intevation.de/rt/webrt?serial_num=1900.
944    
945            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
946    
947            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
948            multiplechoicedialog.py rather than from the wxPython library.
949    
950    2003-06-11  Frank Koormann  <[email protected]>
951    
952            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
953            update.
954    
955    2003-06-11  Frank Koormann  <[email protected]>
956    
957            * Thuban/Lib/fileutil.py (get_application_dir): New function to
958            determine the absolute .thuban/thuban directory under
959            "posix" (os.expanduser) and "nt" (read AppData registry key).
960    
961            * Thuban/Model/resource.py: Use get_application_dir
962    
963            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
964            Use get_application_dir.
965    
966    2003-06-10  Bernhard Herzog  <[email protected]>
967    
968            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
969            the messages MAP_LAYERS_REMOVED messages
970            (LayerTableFrame.OnClose): Unsubscribe from it.
971            (LayerTableFrame.map_layers_removed): New. Receiver for
972            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
973            dialog is showing is removed.
974    
975    2003-06-10  Bernhard Herzog  <[email protected]>
976    
977            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
978            of the receivers list so that unsubscribing in a receiver doesn't
979            modify it while iterating over it.
980    
981            * test/test_connector.py
982            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
983            unsubscribing in a receiver works correctly. See docstring for
984            details
985    
986    2003-06-10  Bernhard Herzog  <[email protected]>
987    
988            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
989            message.
990    
991            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
992            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
993            LAYER_CHANGED will still be sent if the classification changes.
994    
995            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
996            parameter so we can subscribe to some of its messages
997            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
998            and the layer's LAYER_SHAPESTORE_REPLACED
999            (Classifier.unsubscribe_messages): New. Unsubscribe from message
1000            subscribed to in __init__
1001            (Classifier.map_layers_removed)
1002            (Classifier.layer_shapestore_replaced): receivers for the messages
1003            subscribed to in __init__. Unsubscribe and close the dialog
1004    
1005            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
1006            the map to the Classifier dialog
1007    
1008            * test/test_layer.py (SetShapeStoreTests): Derive from
1009            SubscriberMixin as well so we can test messages
1010            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
1011            messages
1012            (SetShapeStoreTests.tearDown): Clear the messages again
1013            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
1014            for the modified flag too
1015            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
1016            to check whether SetShapeStore sets the modified flag
1017            (SetShapeStoreTests.test_set_shape_store_different_field_name)
1018            (SetShapeStoreTests.test_set_shape_store_same_field)
1019            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
1020            Add tests for the messages. This checks both the new
1021            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
1022    
1023    2003-06-06  Jan-Oliver Wagner <[email protected]>
1024    
1025            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
1026            the menu items.
1027    
1028    2003-06-05  Frank Koormann  <[email protected]>
1029    
1030            * Thuban/UI/identifyview.py (IdentifyView.__init__):
1031            Layout reimplemented without panel. Make life easier to fit the list
1032            in the dialog.
1033    
1034    2003-06-05  Frank Koormann  <[email protected]>
1035    
1036            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
1037            once on initialisation (Former implementation resulted in multiple
1038            entries for each projection).
1039            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
1040            if set, select the projection found under the specified name. This
1041            overwrites any other selection estimate.
1042            Removed projchoice filling from this method.
1043            (ProjFrame._OnSave, ProjFrame._OnAddToList):
1044            Updated call of ProjFrame.__FillAvailList
1045            (LCCPanel._DoLayout): Moved parameter controls in more common order.
1046    
1047            * Resources/Projections/defaults.proj: Extended defaults representing
1048            various common European projections.
1049    
1050    2003-06-05  Frank Koormann  <[email protected]>
1051    
1052            * Thuban/UI/identifyview.py (IdentifyView.__init__):
1053            Use ListCtrl instead of GridCtrl
1054    
1055            * Thuban/Model/resource.py:
1056            Guess location of .thuban directory from tempdir parent directory.
1057    
1058            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1059            Guess location of .thuban directory from tempdir parent directory.
1060    
1061    2003-06-04  Bernhard Herzog  <[email protected]>
1062    
1063            Do not cache the values returned by the tree widget's
1064            GetFirstChild and GetNextChild methods because it led to lots of
1065            segfaults. The new way requires more brute force but is more
1066            reliable.
1067    
1068            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
1069            variable layer2id
1070            (LegendTree.find_layer): New method to do with brute force what
1071            layer2id tried to accomplish
1072            (LegendTree._OnMsgLayerChanged)
1073            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
1074            Use find_layer instead of layer2id
1075            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
1076            update layer2id anymore
1077            (LegendTree._OnMsgMapLayersRemoved)
1078            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
1079    
1080    2003-06-03  Thomas Koester  <[email protected]>
1081    
1082            * Thuban/Model/classgen.py (GenQuantiles0): New function.
1083    
1084    2003-06-02  Bernhard Herzog  <[email protected]>
1085    
1086            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
1087            New commands.
1088            (main_menu): Add the new commands.
1089            (MainWindow.TableRename): New. Implementation of the table_rename
1090            command.
1091            (MainWindow.RenameLayer): New. Implementation of the layer_rename
1092            command.
1093    
1094            * Thuban/Model/session.py (Session.AddTable): call self.changed to
1095            set the modified flag
1096    
1097            * test/test_session.py (TestSessionSimple.test_add_table): Test
1098            whether the modified flag is set properly
1099    
1100            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
1101            instead of issue so that the modified flags get updated.
1102    
1103            * test/test_base.py (SomeTitledObject): Derive from Modifiable
1104            instead of Publisher to reflect reality better and to accomodate
1105            the fact that SetTitle now calls changed instead of issue
1106    
1107    2003-06-02  Bernhard Herzog  <[email protected]>
1108    
1109            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
1110            acquisition has to happen before the try in a try-finally.
1111    
1112    2003-06-02  Bernhard Herzog  <[email protected]>
1113    
1114            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
1115            possible that a layer is removed that is not currently selected in
1116            the legend so don't check for this.
1117    
1118    2003-05-30  Bernhard Herzog  <[email protected]>
1119    
1120            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
1121            variables to None that have direct or indirect references to
1122            shapefiles or dbf files to make sure that they do go away and the
1123            files are closed.
1124    
1125    2003-05-30  Bernhard Herzog  <[email protected]>
1126    
1127            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
1128            availImgListIndices when a new image list is created
1129            
1130    2003-05-30  Bernhard Herzog  <[email protected]>
1131    
1132            * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
1133            changing_selection to indicate whether the LegendTree code itself
1134            is currently changing the selection
1135            (LegendTree.normalize_selection): New method to normalize the
1136            selection by selecting the layer item even if the user clicked on
1137            the classification.
1138            (LegendTree._OnSelChanged): normalize the selection. This works
1139            around a bug in wx which doesn't keep track of the selection
1140            properly when subtrees are deleted.
1141    
1142    2003-05-30  Bernhard Herzog  <[email protected]>
1143    
1144            * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
1145            maximum and minimum scale factors.
1146    
1147            * test/test_classgen.py (ClassGenTest.test): Update to reflect the
1148            changes in classgen.py
1149    
1150    2003-05-30  Jonathan Coles   <[email protected]>
1151    
1152            * Thuban/Model/classgen.py: Remove ClassGenerator class but make
1153            all the methods functions. Fixes RTBug #1903.
1154    
1155            * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
1156            to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
1157            RTBug #1907.
1158    
1159            * Thuban/UI/classgen.py: Use classgen functions that were part
1160            of the ClassGenerator class. Put try/finally blocks around
1161            code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
1162            RTBug #1904.
1163    
1164            * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
1165    
1166            * Thuban/UI/legend.py: The legend was cleared and repopulated any
1167            time something changed which caused some state to be lost such
1168            as which children were expanded or collapsed. Fixes RTBug #1901.
1169            (LegendTree._OnMsgMapLayersAdded): Add only new layers.
1170            (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
1171            the legend but not in the map.
1172            (LegendTree.__FillTree): Move main functionality out into smaller
1173            methods that can be used by other methods.
1174            (LegendTree.__FillTreeLayer): Reuse old slots in the image list
1175            if they are available.
1176            (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
1177            that we override the wxTreeCtrl method. Iterate over children
1178            and call __RemoveLayer.
1179            (LegendTree.__AddLayer): New. Add a new layer to the legend.
1180            (LegendTree.__RemoveLayer): Remove a layer from the legend.
1181            (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
1182            Should only be called with the id of a layer branch.
1183            (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
1184            Returns the root item or creates one if necessary.
1185    
1186            * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
1187            ProjectRasterFile with tuple arguments instead of strings.
1188    
1189            * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
1190            with try/finally. Fixes RTBug #1904.
1191    
1192            * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
1193            with try/finally. Fixes RTBug #1904.
1194            (MapCanvas.FitSelectedToWindow): If a single point is selected
1195            simply center it on the display. Fixes RTBug #1849.
1196    
1197            * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
1198            to be compiled as a standalone app. Now the code can only be
1199            called from Python which simplifies the parameter passing.
1200            (ProjectRasterFile): Handle Python arguments. Remove code that
1201            checks for a destination dataset. Add more clean up code.
1202    
1203            * test/test_map.py (TestMapWithContents.test_raise_layer_top,
1204            TestMapWithContents.test_lower_layer_bottom):
1205            Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
1206            Fixes RTBug #1907.
1207    
1208            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
1209            extent to the map when the legend is toggled. Fixes RTBug #1881.
1210    
1211    2003-05-29  Jan-Oliver Wagner <[email protected]>
1212    
1213            * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
1214            unsubscribes all that is subcribed in __init__.
1215    
1216    2003-05-28  Bernhard Herzog  <[email protected]>
1217    
1218            * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
1219            (MainWindow.CanDuplicateLayer): New methods to implement the
1220            Layer/Duplicate command.
1221            (layer_duplicate command): New.
1222            (main_menu): Add layer_duplicate to the Layer menu.
1223    
1224    2003-05-28  Bernhard Herzog  <[email protected]>
1225    
1226            * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
1227            renderer so that NULL/None values get displayed differently (by a
1228            gray rectangle).
1229            (TableGrid.__init__): Override the default renderers
1230    
1231    2003-05-28  Bernhard Herzog  <[email protected]>
1232    
1233            * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
1234            classification to "None" if the type of the field has changed.
1235    
1236            * test/test_layer.py (SetShapeStoreTests): New. Class with a few
1237            test for the Layer.SetShapeStore method
1238    
1239    2003-05-28  Jan-Oliver Wagner <[email protected]>
1240    
1241            * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
1242            does not necessarily have a filename).
1243    
1244    2003-05-28  Jan-Oliver Wagner <[email protected]>
1245    
1246            * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
1247            sort the selection list for the dialog.
1248    
1249    2003-05-28  Frank Koormann  <[email protected]>
1250    
1251            * extensions/thuban/wxproj.cpp
1252            (project_point): Removed cast to int for projected point coordinates.
1253            (shape_centroid): Return last point if all polygon vertices fall
1254            to one point.
1255    
1256    2003-05-28  Bernhard Herzog  <[email protected]>
1257    
1258            * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
1259            with layers that don't have shapestores, i.e. raster layers.
1260    
1261    2003-05-28  Bernhard Herzog  <[email protected]>
1262    
1263            * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
1264            when determining the title from the filename.
1265    
1266            * test/test_dbf_table.py (TestDBFTable.test_title): Update to
1267            reflect changes in the way the title is derived from the filename
1268    
1269    2003-05-28  Frank Koormann  <[email protected]>
1270    
1271            * Thuban/UI/mainwindow.py (MainWindow.TableShow):
1272            Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
1273    
1274    2003-05-27  Bernhard Herzog  <[email protected]>
1275    
1276            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
1277            delegate SelectedLayer.
1278            (MainWindow.LayerUnjoinTable): Implement.
1279            (_can_unjoin): New. Helper function for the sensitivity of the
1280            layer/unjoin command.
1281    
1282            * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
1283            (DerivedShapeStore.OrigShapeStore): New. Return the original
1284            shapestore. Used to figure out how to unjoin.
1285            (DerivedShapeStore.Shapefile): Fix a typo.
1286    
1287    2003-05-27  Bernhard Herzog  <[email protected]>
1288    
1289            * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
1290            well
1291            (JoinDialog.__init__): Use the layer parameter and only build the
1292            left choice when a layer is given
1293            (JoinDialog.OnJoin): Handle layer joins as well
1294            (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
1295            that the user selects the "Select..." item. The sensitivitly
1296            updating is now in update_sensitivity
1297            (JoinDialog.y): New method to refactor the sensitivity update of
1298            the join button into its own method.
1299    
1300            * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
1301    
1302    2003-05-27  Bernhard Herzog  <[email protected]>
1303    
1304            * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
1305            iff there are unreferenced tables in the session
1306    
1307    2003-05-27  Bernhard Herzog  <[email protected]>
1308    
1309            * Thuban/Model/messages.py (TABLE_REMOVED): New message.
1310    
1311            * Thuban/Model/session.py (Session.UnreferencedTables): New method
1312            to return tables that are not referenced by other tables or shape
1313            stores and can be removed.
1314            (Session.RemoveTable): Issue a TABLE_REMOVED message after
1315            removing the table
1316    
1317            * Thuban/UI/mainwindow.py: Remove unused imports
1318            (MainWindow.TableClose): Implement.
1319    
1320            * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
1321            messages so that the frame will be automatically closed when a new
1322            session is opened or the table is removed.
1323            (TableFrame.OnClose): Unsubscribe the Subscriptions made in
1324            __init__
1325            (TableFrame.close_on_session_replaced)
1326            (TableFrame.close_on_table_removed): New. Subscribers that close
1327            the window
1328    
1329            * test/test_session.py (TestSessionMessages.test_remove_table)
1330            (TestSessionSimple.test_remove_table): Move the test to
1331            TestSessionSimple and add test for the TABLE_REMOVED message
1332            (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
1333            (TestSessionSimple.test_unreferenced_tables) New. Test for the
1334            UnreferencedTables method.
1335            (UnreferencedTablesTests): New. Class with some more sophisticated
1336            tests for UnreferencedTables.
1337    
1338    2003-05-27  Frank Koormann  <[email protected]>
1339    
1340            * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
1341            display has some unwanted side effects. Removed again.
1342    
1343    2003-05-27  Frank Koormann  <[email protected]>
1344    
1345            * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
1346    
1347            * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
1348    
1349    2003-05-27  Jan-Oliver Wagner <[email protected]>
1350    
1351            * test/test_menu.py (MenuTest.test): Added test for
1352            Menu.RemoveItem().
1353    
1354            * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
1355            the menu.
1356    
1357    2003-05-27  Frank Koormann  <[email protected]>
1358            
1359            Nonmodal dialogs without parent (i.e. they can fall behind the main
1360            window)
1361    
1362            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
1363            all dialogs in the dialogs dictionary and the canvas.
1364    
1365            * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
1366            parent, i.e. can fall behind other windows.
1367            (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
1368            dictionary before removing it.
1369    
1370            * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
1371    
1372            * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
1373            * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
1374            * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
1375    
1376    2003-05-27  Bernhard Herzog  <[email protected]>
1377    
1378            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
1379            tableview dialog
1380            (MainWindow.TableShow): Use ShowTableView to open the dialogs.
1381            Also, don't use the table's titles as the dialog names. The titles
1382            aren't guaranteed to be unique.
1383            (MainWindow.TableOpen): Open a table view dialog after opening the
1384            table
1385    
1386    2003-05-27  Bernhard Herzog  <[email protected]>
1387    
1388            * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
1389            effect can be achieved by simply closing the window showing the
1390            table.
1391            (MainWindow.TableHide): Removed.
1392            (main_menu): Removed "table_hide"
1393    
1394    2003-05-27  Frank Koormann  <[email protected]>
1395    
1396            Fix legend tree display problems under Win32
1397    
1398            * Thuban/UI/legend.py:  BMP_SIZE_W = 15
1399            (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
1400            (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
1401    
1402            * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
1403    
1404    2003-05-27  Jan-Oliver Wagner <[email protected]>
1405    
1406            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
1407            'after' now allows to insert separators almost anywhere in the menu.
1408    
1409    2003-05-27  Frank Koormann  <[email protected]>
1410    
1411            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
1412            "S" of selection box label to hint on hot key (Alt-S). Works under
1413            Win32 but is ignored under GTK.
1414    
1415    2003-05-26  Frank Koormann  <[email protected]>
1416    
1417            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
1418            Center Choices.
1419    
1420    2003-05-26  Bernhard Herzog  <[email protected]>
1421    
1422            Remove the Precision methods again. They're too DBF specific to be
1423            part of the table interface and they're only used in table_to_dbf
1424            anyway.
1425            
1426            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
1427            fixed precision of 12 for doubles.
1428            (TransientTableBase.Precision): Removed
1429            (AutoTransientTable.Width): Delegate to self.table.
1430    
1431            * Thuban/Model/table.py (DBFTable.Precision)
1432            (MemoryTable.Precision): Removed.
1433            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
1434            (table_to_dbf): Use a fixed precision of 12 for floats unless the
1435            column object specifies something else.
1436    
1437            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
1438            test for table_to_dbf
1439    
1440    2003-05-26  Bernhard Herzog  <[email protected]>
1441    
1442            * test/test_transientdb.py
1443            (TestTransientTable.run_iceland_political_tests): Fix a comment.
1444    
1445    2003-05-26  Bernhard Herzog  <[email protected]>
1446    
1447            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
1448            implementation. Mark parts of the file format strings for
1449            localization.
1450    
1451            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
1452            file and add the table to the tables managed by the session
1453    
1454            * test/test_session.py (TestSessionSimple.test_open_table_file):
1455            New. test case for OpenTableFile
1456    
1457    2003-05-26  Jan-Oliver Wagner <[email protected]>
1458    
1459            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
1460            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
1461            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
1462            Replace the true/false of wxWindows by True/False of Python 2.2.1.
1463    
1464    2003-05-26  Jan-Oliver Wagner <[email protected]>
1465    
1466            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
1467            already a selection present, update the grid accordingly.
1468    
1469            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
1470            resizeable and increase its initial size.
1471    
1472    2003-05-26  Frank Koormann  <[email protected]>
1473    
1474            Table export functionality
1475    
1476            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
1477            Return width (in characters) for a column.
1478            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
1479            (table_to_dbf): Write table to dbf file.
1480            (table_to_csv): Write table to csv file.
1481    
1482            * Thuban/Model/transientdb.py (TransientTableBase.Width,
1483            TransientTableBase.Precision): Return column width and precision.
1484    
1485            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
1486            or table_to_csv depending on file selection.
1487    
1488            * test/test_dbf_table.py:
1489            Test table_to_dbf (extension of former part of test).
1490    
1491            * test/test_csv_table.py:
1492            Test table_to_csv.
1493    
1494    2003-05-23  Jan-Oliver Wagner <[email protected]>
1495    
1496            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
1497            Use QueryTableFrame instead of TableFrame.
1498    
1499            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
1500            table window with 'Layer Table:' instead of 'Table:'.
1501    
1502    2003-05-23  Jan-Oliver Wagner <[email protected]>
1503    
1504            Give all tables a title via mix-in TitledObject.LayerShowTable
1505    
1506            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
1507            only if it exists.
1508    
1509            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
1510            and call its init-method with a default title. Remove Title() method.
1511    
1512            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
1513            AutoTransientTable): mix-in TitledObject and call its init-method with
1514            a default title. Remove Title() method.
1515    
1516    2003-05-23  Bernhard Herzog  <[email protected]>
1517    
1518            * Thuban/Model/session.py (Session.AddShapeStore): Define
1519            AddShapeStore analogously to AddTable.
1520    
1521            * test/test_session.py (TestSessionSimple.test_add_shapestore):
1522            New. Test for AddShapeStore
1523    
1524    2003-05-23  Jan-Oliver Wagner <[email protected]>
1525    
1526            Introducing QueryTableFrame and a very coarse ShowTable implementation.
1527    
1528            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
1529            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
1530            The latter implements the selection GUI without dependency on a layer.
1531            LayerTableFrame now is derived from QueryTableFrame and connects
1532            to a layer.
1533    
1534            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
1535            implementation that still needs work.
1536    
1537            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
1538    
1539    2003-05-22  Frank Koormann  <[email protected]>
1540    
1541            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
1542            Added "outer_join = False" as optional parameter.
1543            (TransientJoinedTable.create): If outer join is true, perform a
1544            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
1545            the left table. Records not matching are filled with 0 / None.
1546    
1547            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
1548            (JoinDialog.OnJoin): Consider outer join check box.
1549    
1550    2003-05-22  Bernhard Herzog  <[email protected]>
1551    
1552            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
1553            somewhat safer way. Storing the traceback in a local variable can
1554            lead to memory leaks
1555    
1556    2003-05-22  Bernhard Herzog  <[email protected]>
1557    
1558            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
1559            the wxMessageDialog's Destroy() method.
1560    
1561    2003-05-22  Frank Koormann  <[email protected]>
1562    
1563            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
1564            TransientTable.Title()
1565    
1566    2003-05-22  Frank Koormann  <[email protected]>
1567    
1568            Join Dialog, initial version.
1569    
1570            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
1571    
1572            * Thuban/UI/join.py (JoinDialog): Functional implementation of
1573            former framework. Renamed Table1/Table2 to LeftTable/RightTable
1574            in all occurences.
1575    
1576            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
1577            Typo fixed.
1578    
1579    2003-05-22  Bernhard Herzog  <[email protected]>
1580    
1581            Give the tables titles so that the GUI can display more meaningful
1582            names. For now the titles are fixed but depend on e.g. filenames
1583            or the titles of the joined tables.
1584    
1585            * Thuban/Model/transientdb.py (TransientTable.Title)
1586            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
1587    
1588            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
1589    
1590            * test/test_transientdb.py
1591            (TestTransientTable.test_auto_transient_table_title): New. Test
1592            for the Title method
1593            (TestTransientTable.test_transient_joined_table)
1594            (TestTransientTable.test_transient_table): Add test for the Title
1595            methods
1596    
1597            * test/test_memory_table.py (TestMemoryTable.test_title): New.
1598            Test for the Title method
1599    
1600            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
1601            the Title method
1602    
1603    2003-05-22  Bernhard Herzog  <[email protected]>
1604    
1605            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
1606            Provide a better way to destroy the layers
1607            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
1608            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1609            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
1610            the new way to destroy the layers.
1611            (TestLayer.test_derived_store): New. Test for using a layer with a
1612            DerivedShapeStore
1613    
1614            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
1615            filename if the shape store actually has one.
1616    
1617    2003-05-22  Bernhard Herzog  <[email protected]>
1618    
1619            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
1620            for the filename
1621    
1622            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
1623            for the FileName method
1624            (TestDBFTableWriting.test_write): Fix spelling of filename
1625    
1626    2003-05-22  Thomas Koester  <[email protected]>
1627    
1628            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
1629            from SciParam that now really is immutable.
1630    
1631    2003-05-22  Frank Koormann  <[email protected]>
1632    
1633            Layer Top/Bottom placement added to legend.
1634    
1635            * Thuban/UI/legend.py
1636            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
1637            bound to tool events.
1638            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
1639            New, methods binding the event methods with the map methods.
1640    
1641            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
1642            layer at top/bottom of layer stack.
1643    
1644            * Resources/Bitmaps/top_layer.xpm: New button icon.
1645    
1646            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
1647    
1648    2003-05-22  Bernhard Herzog  <[email protected]>
1649    
1650            * Thuban/Model/session.py (Session.RemoveTable): New method to
1651            remove tables
1652    
1653            * test/test_session.py (TestSessionSimple.test_remove_table): New.
1654            Test for RemoveTable
1655    
1656    2003-05-22  Thomas Koester  <[email protected]>
1657    
1658            * Thuban/Model/classgen.py: Added short module doc string and CVS id.
1659            (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
1660    
1661    2003-05-22  Bernhard Herzog  <[email protected]>
1662    
1663            Implement a way to discover dependencies between tables and
1664            shapestores.
1665    
1666            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
1667            (TransientJoinedTable.Dependencies)
1668            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
1669            interface
1670            (TransientJoinedTable.__init__): Keep tack of the original table
1671            objects in addition to the corresponding transient tables.
1672    
1673            * Thuban/Model/table.py (DBFTable.Dependencies)
1674            (MemoryTable.Dependencies): New. Implement the dependencies
1675            interface
1676    
1677            * Thuban/Model/data.py (ShapeTable): New. Helper class for
1678            ShapefileStore
1679            (ShapefileStore.__init__): Use ShapeTable instead of
1680            AutoTransientTable
1681            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
1682            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
1683            methods for filename and type
1684            (ShapefileStore.Dependencies): New. Implement the dependencies
1685            interface
1686            (DerivedShapeStore): New class to replace SimpleStore. The main
1687            difference to SimpleStore is that it depends not on a shapefile
1688            but another shapestore which expresses the dependencies a bit
1689            better
1690            (SimpleStore.__init__): Add deprecation warning.
1691    
1692            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
1693            Test for the Dependencies method.
1694    
1695            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
1696            New. Test for the Dependencies method.
1697    
1698            * test/test_transientdb.py
1699            (TestTransientTable.test_auto_transient_table_dependencies): New.
1700            Test for the Dependencies method.
1701            (TestTransientTable.test_transient_joined_table): Add test for the
1702            Dependencies method.
1703    
1704            * test/test_session.py (TestSessionSimple.setUp)
1705            (TestSessionSimple.tearDown): New. Implement a better way to
1706            destroy the sessions.
1707            (TestSessionSimple.test_initial_state)
1708            (TestSessionSimple.test_add_table): Bind session to self.session
1709            so that it's destroyed by tearDown
1710            (TestSessionSimple.test_open_shapefile): New. Test for
1711            OpenShapefile and the object it returns
1712    
1713    2003-05-22  Bernhard Herzog  <[email protected]>
1714    
1715            * Thuban/Model/session.py (Session.AddTable): New method to
1716            register tables with the session.
1717            (Session.Tables): Return the tables registered with AddTable too.
1718    
1719            * test/test_session.py (TestSessionSimple.test_add_table): New.
1720            Test case for the AddTable method
1721    
1722    2003-05-22  Frank Koormann  <[email protected]>
1723    
1724            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
1725            lower right corner, center labels for selections, initialize controls
1726            in reasonable order for keyboard navigation.
1727    
1728            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
1729            (ProjFrame.__DoOnProjAvail): Determine position of current projection
1730            using the wxListBox.FindString() method. Still a problem (#1886)
1731    
1732            * Thuban/UI/classifier.py
1733            (Classifier.__init__, SelectPropertiesDialog.__init__)
1734    
1735            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
1736            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
1737            different classification types from here to __init__.
1738            (GenUniquePanel.__init__): Set the column width of the first field
1739            in the Field ListCtrl to the full width.
1740    
1741            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
1742            Button to 'Export'. Center Buttons in Selection Box, set Focus to
1743            Grid.
1744            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
1745            changes focus to the Selection when pressing "Alt-S".
1746    
1747            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
1748            the text if not visible. The italic font sometimes exceeds the
1749            rendering area.
1750    
1751    2003-05-21  Jonathan Coles   <[email protected]>
1752    
1753            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
1754            to OnClose so that Thuban closes correctly.
1755    
1756            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
1757            DockFrame.OnClose, not DockFrame._OnClose.
1758    
1759    2003-05-21  Jonathan Coles   <[email protected]>
1760    
1761            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
1762            references to 'inf' and use new Range __init__ to pass floats
1763            directly rather than converting them to strings first.
1764            Fixes RTBug #1876.
1765    
1766            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
1767            Use new Range ___init__ to pass floats.
1768    
1769            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
1770            filename is a valid image file. Throw IOError otherwise.
1771    
1772            * Thuban/Model/range.py: Brought over new Range from SciParam that
1773            is immutable and has an __init__ which can accept floats.
1774    
1775            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
1776            into try block. AddLayer doesn't throw any exceptions anymore.
1777            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
1778            try block.
1779    
1780            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
1781            the first item in choices. Fixes RTBug #1882.
1782    
1783            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
1784            has gone to 0 which is a serious problem. abort.
1785            (MapRenderer.draw_raster_layer): Catch IOError seperately and
1786            print the error from GDAL.
1787    
1788            * Thuban/UI/tableview.py (TableGrid.__init__): Call
1789            ToggleEventListeners to turn on listening.
1790            (TableGrid.ToggleEventListeners): New. Turns event listening on
1791            and off so as to prevent excessive messages.
1792            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
1793            to suppress excessive messages when selecting many rows.
1794            Fixes RTBug #1880.
1795    
1796            * Thuban/UI/view.py: Added checks against if scale == 0. This
1797            is a serious problem that can occur when an image without
1798            geo data is loading and causes the map projection bounds to
1799            go to infinity. Right now, the solution is to simply try
1800            to recover.
1801    
1802            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
1803            to set the MFILEReceiver attributes even if the data is NULL.
1804    
1805            * extensions/thuban/gdalwarp.cpp: Improved the error handling
1806            and passed GDAL messages back up to the Python layer. Also
1807            tried to fix some memory leaks that were present in the original
1808            utility but didn't matter because the program aborted.
1809    
1810            * test/test_range.py: Copied over tests from SciParam. Removed
1811            tests against importing. Fixes RTBug #1867.
1812    
1813    2003-05-21  Bernhard Herzog  <[email protected]>
1814    
1815            * test/test_load.py: Remove unused imports and restructure the
1816            test code
1817            (LoadSessionTest): Split into one class for each test and turn
1818            LoadSessionTest itself into the base class for all such session
1819            tests.
1820            (ClassificationTest): New base class for load tests that test
1821            classifications
1822            (TestSingleLayer, TestLayerVisibility, TestClassification)
1823            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
1824            for the individual tests
1825    
1826            * test/support.py (FileLoadTestCase.filename): New base class for
1827            file loading tests
1828    
1829    2003-05-21  Jan-Oliver Wagner <[email protected]>
1830    
1831            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
1832            Mercator' to 'UTM Zone 32' as a more convenient example.
1833            Added 'Gauss Krueger Zone 6'.
1834    
1835            * Data/iceland_sample_raster.thuban: political polygon now
1836            filled transparent to have the raster image visible at once.
1837    
1838    2003-05-21  Frank Koormann  <[email protected]>
1839    
1840            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
1841            OnClose() to keep in sync with extensions. Internally Thuban
1842            still uses "underscored" names.
1843    
1844    2003-05-20  Jonathan Coles   <[email protected]>
1845    
1846            This puts back Raster layer support. These layers support projections
1847            through the GDAL library. Currently, the CVS version is being used.
1848            There are no Debian packages available although this may change soon.
1849            A GDAL driver was extended to support writing to memory rather to
1850            files.
1851    
1852            There is still some work that needs to be done, such as some error
1853            handling when loading invalid images or when there is a problem
1854            projecting the image. This putback simply checks in the majority
1855            of the work.
1856    
1857            * setup.py: Add gdalwarp library extension.
1858    
1859            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
1860            Defaults to False, but can be overridden by subclasses if they
1861            support classification.
1862            (RasterLayer): New. Defines a new layer that represents an
1863            image.
1864    
1865            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
1866            tag handler.
1867            (SessionLoader.start_layer): Encode the filename.
1868            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
1869            New. Supports reading a rasterlayer tag.
1870    
1871            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
1872    
1873            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
1874            get a string in Latin1. If we get such as string convert it to
1875            unicode first, otherwise leave if alone before encoding.
1876            (SessionSaver.write_layer): Add support for writing both Layers
1877            and RasterLayers.
1878    
1879            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
1880            The right argument may not be a string, it could also be a Column.
1881    
1882            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
1883            Make initial window size 600x400. Fixes RTBug #1872.
1884    
1885            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
1886            the dialog is constructed so that we can support layers that
1887            do not have classifications.
1888            (Classifier._OnTry): Only build a classification if the layer
1889            supports one.
1890    
1891            * Thuban/UI/legend.py: Change all checks that a layer is an
1892            instance of Layer into checks against BaseLayer.
1893            (LegendTree.__FillTreeLayer): Only add children to a branch if
1894            the layer supports classification.
1895    
1896            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
1897            MainWindow.OpenSession): Don't proceed with an action if the
1898            user chooses Cancel when they are asked to save changes.
1899            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
1900            user to select an image file. Create a new RasterLayer and add
1901            it to the map.
1902    
1903            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
1904            for rendering RasterLayer layers.
1905            (MapRenderer.draw_raster_layer): Actually method that calls
1906            the GDALWarp python wrapper and constructs an image from the
1907            data returned.
1908    
1909            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
1910            Choices symbols to match those used in the table query method.
1911            Replace deprecated method calls on table with new method names.
1912    
1913            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
1914            how small the scale can get. This still needs more testing.
1915    
1916            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
1917            Provides a driver to output in .bmp format.
1918    
1919            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
1920            New. Provides IO routines which write to memory, rather than a file.
1921    
1922            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
1923            of the gdalwarp utility provided in GDAL. Added function calls
1924            that can be accessed from python.
1925    
1926            * Data/iceland_sample_raster.thuban: New. Sample file that uses
1927            a raster layer.
1928    
1929            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
1930            layer image data.
1931    
1932            * Doc/thuban.dtd: Added rasterlayer attribute definition.
1933    
1934            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
1935            tests associated with the raster layer code.
1936    
1937            * test/test_transientdb.py
1938            (TestTransientTable.test_auto_transient_table_query): Added a test
1939            for using a Column object as the "right" parameter to a query.
1940    
1941    2003-05-19  Frank Koormann  <[email protected]>
1942    
1943            * Thuban/version.py (get_changelog_date):
1944            Catch exceptions if ChangeLog does not exist.
1945    
1946            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
1947    
1948    2003-05-19  Frank Koormann  <[email protected]>
1949    
1950            Extended version information for Thuban
1951    
1952            * Thuban/version.py: New, version information for Thuban: Last
1953            modification date and last ChangeLog entry date.
1954    
1955            * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
1956            information: Display Thuban, wxPython and Python version.
1957    
1958    2003-05-16  Bernhard Herzog  <[email protected]>
1959    
1960            * Thuban/Model/save.py: Remove some unused imports including the
1961            __future__ import for nested_scopes as Thuban relies on Python 2.2
1962            now.
1963            (XMLWriter.encode): Remove the special case for a None argument.
1964            In the saver encode is always called with a string argument.
1965    
1966    2003-05-16  Bernhard Herzog  <[email protected]>
1967    
1968            * Thuban/UI/__init__.py: Remove the work-around for the locale bug
1969            in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
1970            of the bug was that e.g. float("1.2") would fail. Thuban now
1971            requires 2.4.x.
1972            
1973    2003-05-16  Frank Koormann   <[email protected]>
1974    
1975            Printing enhancement and WMF export (under Win32)
1976    
1977            * Thuban/UI/renderer.py (ExportRenderer): New, derived from
1978            ScreenRenderer. Renders Map, Legend and Scalebar for export.
1979            (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
1980            PrintRender.
1981    
1982            * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
1983            to fullfil information needed for PrinterRenderer.
1984            (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
1985            (MapCanvas.Print): Adapted to new MapPrintout.
1986            (OutputTransform): General calculations to transform from canvas
1987            coordinates to export/printing devices.
1988    
1989            * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
1990            new method_command to call ExportMap, with platform dependency (only
1991            __WXMSW__)
1992      
1993            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
1994            of scalebar drawing area as new parameters.
1995            
1996            * Thuban/Model/scalebar.py (roundInterval): round long instead of int
1997    
1998            * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
1999            Update to extended scalebar.DrawScalebar header.
2000    
2001            * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
2002    
2003            * test/test_scalebar.py: Made test executable as standalone.
2004    
2005    2003-05-16  Bernhard Herzog  <[email protected]>
2006    
2007            * Thuban/Model/table.py (Table): Remove this compatibility alias
2008            for DBFTable.
2009    
2010            * test/test_table.py: Import DBFTable as Table because that alias
2011            doesn't exist anymore.
2012    
2013            * Thuban/UI/classgen.py: Remove some unused imports
2014    
2015    2003-05-14  Jonathan Coles   <[email protected]>
2016    
2017            * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
2018            Fix docstring.
2019            (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
2020            (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
2021            values of the supplied range to determine the beginning and end
2022            bounds of the generated classes.
2023    
2024            * Thuban/Model/range.py (Range.number_re): Now accepts floats that
2025            do not have a leading 0 (.5 is now accepted as well as 0.5).
2026    
2027            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
2028            call to ClassGenerator.GenUniformDistribution.
2029    
2030            * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
2031            layout bug with the 'Projection' label.
2032    
2033            * test/support.py (FloatTestCase): New. Needed for the Range tests.
2034    
2035            * test/test_range.py: New. Imported from SciParam.
2036    
2037    2003-05-12  Jonathan Coles   <[email protected]>
2038    
2039            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
2040            to table.UniqueValues() with calls that retrieve all the values
2041            from the table. This will need to be replaced by a method on table
2042            which can simply return the list (perhaps more efficiently).
2043    
2044    2003-05-12  Jonathan Coles   <[email protected]>
2045    
2046            The return value of ClassGenerator.CalculateQuantiles has changed.
2047            Refer to the documentation for details.
2048    
2049            * test/test_classgen.py: Modified Quantile tests to use the
2050            new return values.
2051    
2052            * Thuban/Model/classgen.py
2053            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
2054            use new return values from CalculateQuantiles to produce the correct
2055            range bounds in the Classification.
2056            (ClassGenerator.CalculateQuantiles): Add more comments describing
2057            the return values and parameters. Make minor adjustments to improve
2058            the legibility of the code. Fix problem with adjusted not being set
2059            in most cases.
2060    
2061    2003-05-12  Frank Koormann <[email protected]>
2062            
2063            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
2064            and latin1. Fixes #1851 finally.
2065    
2066    2003-05-09  Jonathan Coles   <[email protected]>
2067    
2068            * test/test_classgen.py: New. Tests the Quantile algorithm.
2069    
2070            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
2071            Clean up debugging statement, add comments, fix a small bug in the
2072            returned adjusted percentiles.
2073            
2074    2003-05-09  Jonathan Coles   <[email protected]>
2075    
2076            Introduces Range class from SciParam into the ClassGroupRange class,
2077            and such ranges can now be saved and loaded from disk.
2078    
2079            Quantiles are now available in the Classification Generator.
2080    
2081            Initial support for building Queries on a table. Doesn't do anything
2082            but run some tests.
2083    
2084            * Thuban/Model/classification.py: Explicit imports.
2085            (ClassGroupRange): Use the Range class to store the underlying
2086            range information. The interface remains the same, except for
2087            GetRange(), and you can also supply a Range object as the min
2088            parameter to SetRange or __init__.
2089    
2090            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
2091            string appropriately for use in Thuban. Fixes RTbug #1851.
2092            (SessionLoader.end_projection): Handle the context of the
2093            projection tag a bit better by looking at what objects are not
2094            None. There was an assumption that a projection tag for a map
2095            could occur before any layers.
2096            (SessionLoader.start_clrange): Provide backward compatibility for
2097            reading min/max values as well as the new range parameter.
2098    
2099            * Thuban/Model/map.py: Explicit imports.
2100    
2101            * Thuban/Model/resource.py: Import _.
2102            (ProjFileSaver.write): write header using projfile.dtd.
2103    
2104            * Thuban/Model/save.py: Explicit imports.
2105            (XMLWriter.encode): New. Encode the given string from a format
2106            used by Thuban into UTF-8. Fixes RTbug #1851.
2107    
2108            * Thuban/UI/classgen.py: Explicit imports.
2109            (ClassGenDialog.__init__): Clean up the code and add support
2110            for Quantiles.
2111            (ClassGenDialog.OnOK): Add support for Quantiles.
2112            (GenQuantilesPanel): New. Input panel for Quantiles.
2113            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
2114            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
2115    
2116            * Thuban/Model/classgen.py: New. Contains all the classes named above.
2117    
2118            * Thuban/UI/classifier.py: Explicit imports.
2119            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
2120            ClassTable.SetValueAsCustom): Reworked to use new Range class.
2121    
2122            * Thuban/UI/legend.py: Explicit imports.
2123    
2124            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
2125            a Table menu and associated method calls.
2126            (MainWindow.choose_color): Removed. No longer needed.
2127    
2128            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
2129            should be disabled if no projection is selected in the available
2130            list.
2131    
2132            * Thuban/UI/renderer.py: Explicit imports.
2133    
2134            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
2135            with correctly selecting the rows and issuing the right events.
2136            Be sure to call Skip() to allow the grid to do some of its own
2137            handling which allows the rows to actually be selected.
2138            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
2139            selecting multiple shapes.
2140            (LayerTableFrame): Support for building Queries.
2141            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
2142    
2143            * Thuban/UI/tree.py: Explicit imports.
2144    
2145            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
2146            table view can call it.
2147    
2148            * test/test_classification.py: Explicit imports.
2149            (TestClassification.test_ClassGroupRange): Fix test for new
2150            Range class.
2151    
2152            * Doc/thuban.dtd: Add range parameter for clrange.
2153    
2154            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
2155            object in ClassGroupRange, and also uesd for inputting ranges in
2156            the classifer table and elsewhere.
2157    
2158            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
2159            yet.
2160    
2161    2003-05-09  Frank Koormann <[email protected]>
2162    
2163            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
2164    
2165    2003-05-08  Frank Koormann <[email protected]>
2166    
2167            Coding style updates
2168    
2169            * test/test_scalebar.py: Replaced tab indentation by spaces.
2170    
2171            * Thuban/UI/scalebar.py: Explicit imports.
2172    
2173    2003-05-08  Frank Koormann <[email protected]>
2174    
2175            * Thuban/UI/scalebar.py
2176            (ScaleBar.DrawScalebar): Format string bug fixed.
2177    
2178    2003-05-08  Frank Koormann <[email protected]>
2179    
2180            Reorganization of scalebar component (no wx in Thuban/Model)
2181    
2182            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
2183            (deriveInterval):
2184            Calculate scalebar interval and unit which fits in width for scale.
2185            (roundInterval): Round float.
2186    
2187            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
2188    
2189            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
2190    
2191            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
2192    
2193    2003-05-08  Frank Koormann <[email protected]>
2194    
2195            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
2196            Initialize ScaleBar with canvas.map
2197    
2198            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
2199            round intervals to display smarter lengths
2200            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
2201            layer. If the maps has no projection applied grey the scalebar.
2202    
2203    2003-05-07  Frank Koormann <[email protected]>
2204            
2205            Basic Scalebar features added.
2206    
2207            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
2208    
2209            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
2210            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
2211            and the renderer.
2212    
2213            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
2214    
2215            * Thuban/UI/messages.py: SCALE_CHANGED added.
2216    
2217    2003-05-07  Bernhard Herzog  <[email protected]>
2218    
2219            * Thuban/Model/session.py (Session.__init__): New instance
2220            variable shapestores to hold a list of all open shapestore objects
2221            (Session.ShapeStores): New. Accessor method for the shapestores
2222            list.
2223            (Session._add_shapestore, Session._clean_weak_store_refs): New.
2224            Internal methods to maintain the shapestores list.
2225            (Session.Tables): New. Return all tables open in the session.
2226            (Session.OpenShapefile): Insert the new ShapeStore into the
2227            shapestores list.
2228    
2229            * test/test_session.py (TestSessionSimple.test_initial_state): Add
2230            tests for ShapeStores and Tables
2231            (TestSessionWithContent.test_shape_stores)
2232            (TestSessionWithContent.test_tables): New. Test cases for
2233            ShapeStores and Tables
2234    
2235    2003-05-07  Bernhard Herzog  <[email protected]>
2236    
2237            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
2238            Add comments about the optimizations used.
2239            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
2240            Implement the ReadValue table interface method.
2241    
2242            * test/test_transientdb.py
2243            (TestTransientTable.run_iceland_political_tests)
2244            (TestTransientTable.test_transient_joined_table): Add tests for
2245            ReadValue
2246    
2247    2003-05-07  Frank Koormann <[email protected]>
2248    
2249            * Resources/Bitmaps/fulllayerextent.xpm,
2250            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
2251            new icons.
2252    
2253    2003-05-06  Bernhard Herzog  <[email protected]>
2254    
2255            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
2256            New. Simply delegate to the transient table's version.
2257    
2258            * test/test_transientdb.py
2259            (TestTransientTable.test_auto_transient_table_query): New. Test
2260            case for AutoTransientTable's SimpleQuery
2261    
2262    2003-05-06  Bernhard Herzog  <[email protected]>
2263    
2264            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
2265            Implement a simple query method for the query dialog
2266            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
2267            the row index or shapeid.
2268            (TransientTable.create): Insert the right value of the row index
2269            (TransientJoinedTable.create): Copy the row index of the left
2270            table to the joined result table
2271    
2272            * test/test_transientdb.py
2273            (TestTransientTable.test_transient_table_read_twice): Fix
2274            doc-string
2275            (TestTransientTable.test_transient_table_query): New. Test for the
2276            SimpleQuery method
2277    
2278    2003-05-06  Bernhard Herzog  <[email protected]>
2279    
2280            Convert all table users to use the new table interface. This only
2281            covers Thuban itself, not GREAT-ER or other applications built on
2282            Thuban yet, so the compatibility interface stays in place for the
2283            time being but it now issues DeprecationWarnings.
2284    
2285            Finally, the new Table interface has a new method, HasColumn.
2286    
2287            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
2288            issue deprecation warnings when they're. The warnings refer to the
2289            caller of the method.
2290            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
2291            for the deprecation warnings
2292    
2293            * test/test_table.py: Ignore the deprecation warnings for the old
2294            table in the tests in this module. The purpose of the tests is to
2295            test the old interface, after all.
2296    
2297            * test/test_transientdb.py
2298            (TestTransientTable.run_iceland_political_tests): Use the
2299            constants for the types. Add a test for HasColumn
2300            (TestTransientTable.test_transient_joined_table): Adapt to new
2301            table interface. Add a test for HasColumn
2302            (TestTransientTable.test_transient_table_read_twice): Adapt to new
2303            table interface
2304    
2305            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
2306            Adapt to new table interface
2307    
2308            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
2309            new table interface
2310    
2311            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
2312            (RecordTable.SetTable): Adapt to new table interface
2313    
2314            * Thuban/UI/classifier.py (Classifier.__init__)
2315            (Classifier.__init__): Adapt to new table interface
2316    
2317            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
2318            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
2319            to new table interface
2320    
2321            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
2322            (AutoTransientTable.HasColumn): Implement the new table interface
2323            method
2324            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
2325            (AutoTransientTable.UniqueValues): Adapt to new table interface
2326    
2327            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
2328            Adapt to new table interface
2329    
2330            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
2331            simplify opening shapefiles a bit easier.
2332            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
2333            (TestLayer.test_point_layer): Use the new helper method
2334            (TestLayer.test_get_field_type): New. Test for the GetFieldType
2335            method
2336    
2337            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
2338            the new table method
2339    
2340            * test/test_memory_table.py (TestMemoryTable.test_has_column):
2341            Test for the new table method HasColumn
2342    
2343    2003-05-06  Jonathan Coles   <[email protected]>
2344    
2345            Addresses the "Selection Extent" wish of RTbug #1787.
2346    
2347            * Resources/Bitmaps/fulllayerextent.xpm,
2348            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
2349            extent. These are just place holders for the real bitmaps.
2350    
2351            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
2352            calculate the bounding box once (the first time compute_bbox() is
2353            called).
2354            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
2355            the bounding box for the shapes in lat/long coordinates.
2356    
2357            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
2358            option.
2359            (MainWindow.has_selected_shapes): New. Returns true if there are
2360            any selected shapes.
2361            (MainWindow.FullSelectionExtent): New. Calls
2362            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
2363            (_has_selected_shapes): New. Returns true if there are any
2364            selected shapes.
2365    
2366            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
2367            true if there are any selected shapes.
2368    
2369            * Thuban/UI/view.py (MapCanvas): Added delegated method
2370            HasSelectedShapes.
2371            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
2372            shapes on the canvas using the map projection (if any).
2373    
2374            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
2375            for Layer.ShapesBoundingBox().
2376    
2377    2003-05-06  Bernhard Herzog  <[email protected]>
2378    
2379            * Resources/Projections/defaults.proj: Fix spelling of Mercator
2380    
2381    2003-05-05  Jonathan Coles   <[email protected]>
2382    
2383            Addresses the "Full Layer Extent" wish of RTbug #1787.
2384    
2385            * Resources/Projections/defaults.proj: Added UK National Grid.
2386    
2387            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
2388            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
2389            when the user selects the menu option.
2390    
2391            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
2392            scales the given layer on the canvas using the map projection.
2393    
2394    2003-05-05  Bernhard Herzog  <[email protected]>
2395    
2396            Convert the table implementations to a new table interface. All
2397            tables use a common mixin class to provide backwards compatibility
2398            until all table users have been updated.
2399    
2400            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
2401            provide backwards compatibility for table classes implementing the
2402            new interface
2403            (DBFTable, MemoryTable): Implement the new table interface. Use
2404            OldTableInterfaceMixin as base for compatibility
2405            (DBFColumn, MemoryColumn): New. Column description for DBFTable
2406            and MemoryTable resp.
2407    
2408            * test/test_dbf_table.py: New. Test cases for the DBFTable with
2409            the new table interface.
2410    
2411            * test/test_memory_table.py: New. Test cases for the MemoryTable
2412            with the new table interface.
2413    
2414            * test/test_table.py: Document the all tests in this file as only
2415            for backwards compatibility. The equivalent tests for the new
2416            interface are in test_memory_table.py and test_dbf_table.py
2417            (MemoryTableTest.test_read): field_info should be returning tuples
2418            with four items
2419            (MemoryTableTest.test_write): Make doc-string a more precise.
2420    
2421            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
2422            table interface. Derive from from OldTableInterfaceMixin for
2423            compatibility.
2424            (TransientTableBase.create): New intance variable column_map to
2425            map from names and indices to column objects
2426            (TransientTable.create): Use the new table interface of the input
2427            table
2428            (AutoTransientTable): Convert to new table interface. Derive from
2429            from OldTableInterfaceMixin for compatibility.
2430            (AutoTransientTable.write_record): Removed. It's not implemented
2431            yet and we still have to decide how to handle writing with the new
2432            table and data framework.
2433    
2434            * test/test_transientdb.py
2435            (TestTransientTable.run_iceland_political_tests)
2436            (TestTransientTable.test_transient_joined_table): Use the new
2437            table interface
2438    
2439    2003-05-05  Jonathan Coles   <[email protected]>
2440    
2441            This is namely a collection of UI updates to improve user interactivity.
2442            Tabbing between controls now exists and you can use ESC to close dialog
2443            boxes; ENTER will active the default button.
2444    
2445            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
2446            order that the controls are created so that tabbing works correctly.
2447            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
2448            wxDialog can handle the default button correctly.
2449            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
2450            same reasons as for OnOK.
2451            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
2452            when we ask the table for the maximum/minimum values of a field
2453            which could take a very long time.
2454    
2455            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
2456            order that the controls are created so that tabbing works correctly.
2457            (SelectPropertiesDialog.__init__): Rearrange the order that the
2458            controls are created so that tabbing works correctly.
2459    
2460            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
2461            to derive from a wxDialog but behave like the original implementation
2462            which was derived from a wxFrame. wxDialog provides useful key
2463            handling functionality like ESC calling OnCancel and ENTER calling
2464            OnOK which is lost with wxFrame.
2465    
2466            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
2467            new dialogs.
2468    
2469            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
2470            order that the controls are created so that tabbing works correctly.
2471            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
2472            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
2473            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
2474            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
2475            can provide the "UK National Grid" as a default projection.
2476            (UTMPanel.__init__): Rearrange the order that the controls are
2477            created so that tabbing works correctly.
2478    
2479    2003-05-05  Bernhard Herzog  <[email protected]>
2480    
2481            * extensions/thuban/wxproj.cpp: Fix some of the comments.
2482            (project_point): If a map projection but no layer projection is
2483            given, convert degrees to radians before applying the map
2484            projection.
2485    
2486            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
2487            (TableGrid.allow_messages): New methods to make it possible to
2488            inhibit message sending.
2489            (TableGrid.issue): Only send the message if not inhibited.
2490            (LayerTableGrid.select_shape): Use the new methods to make sure
2491            that no ROW_SELECTED message is sent while we're updating the
2492            selected rows to match the selected shapes.
2493    
2494    2003-05-02  Jan-Oliver Wagner <[email protected]>
2495    
2496            Implementation of MemoryTable.
2497    
2498            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
2499            implementation that operates on a list of tuples. All of the data
2500            are kept in the memory.
2501    
2502            * test/test_table.py (MemoryTableTest): New.
2503    
2504            * test/test_transientdb.py (SimpleTable): Removed.
2505            (TestTransientTable.test_transient_joined_table,
2506            (TestTransientTable.test_transient_table_read_twice): Replaced
2507            SimpleTable by MemoryTable.
2508    
2509    2003-04-30  Jonathan Coles   <[email protected]>
2510    
2511            * Data/iceland_sample.thuban: Now contains correct projections
2512            for each of the layers.
2513    
2514            * Resources/Projections/defaults.proj: Geographic projection
2515            contains unit conversion parameter.
2516    
2517    2003-04-30  Jonathan Coles   <[email protected]>
2518    
2519            The most important part of this putback is the projection changes.
2520            It should now be possible to specify the projection that a layer
2521            is in and then specify a different projection for the map. The
2522            projection dialog has an extra parameter for a geographic projection
2523            which lets the user select if the input is in degrees or radians.
2524    
2525            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
2526            to say that the parameter is a tuple of unprojected
2527            points (which is what the callers to this method were assuming).
2528            Also, since the points are unprojected we need to projected them.
2529    
2530            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
2531            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
2532            groups are selected, move the layer up/down. Fixes RTbug #1833.
2533    
2534            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
2535    
2536            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
2537            parameter in call to SetClientData.
2538            (GeoPanel): Add support for selecting the units that the
2539            source data is in (Radians or Degrees).
2540    
2541            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
2542            the rendering loop by reducing the number of if's, removing the
2543            unnecessary try/except block, and checking if the old group
2544            is the same as the new one (which happens a lot if there is
2545            no classification, or lots of shapes are in the same group).
2546    
2547            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
2548            around the redraw routine to try to catch problems that the user
2549            may create by selecting invalid projections for the data set and
2550            map. Clears the display if there are any problems and prints the
2551            error.
2552            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
2553            rectangle.
2554    
2555            * extensions/thuban/wxproj.cpp (project_point): First invert the
2556            supplied point (which should be in projected coordinates) using
2557            the layer's projection and then project the point using the
2558            map's projection.
2559            (project_points): Use project_point() to project each point.
2560    
2561    2003-04-30  Jan-Oliver Wagner <[email protected]>
2562    
2563            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
2564            don't set the Classification to None if the classfication field
2565            is None (ie only a DEFAULT).
2566    
2567    2003-04-30  Bernhard Herzog  <[email protected]>
2568    
2569            * Thuban/UI/view.py: Fix some typos.
2570    
2571            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
2572            not pop up the dialog if the selection becomes empty (this could
2573            happen if e.g. a new selection is opened while the identify tool
2574            is active and dialog had been closed)
2575    
2576    2003-04-30  Bernhard Herzog  <[email protected]>
2577    
2578            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
2579            instance variable read_record_last_result
2580            (TransientTableBase.read_record): Make sure reading the same
2581            record twice works. The implementation uses the new instance
2582            variable read_record_last_result
2583    
2584            * test/test_transientdb.py
2585            (TestTransientTable.test_transient_table_read_twice): New test
2586            case for the above bug-fix.
2587    
2588    2003-04-29  Jonathan Coles   <[email protected]>
2589    
2590            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
2591    
2592            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
2593    
2594            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
2595            (ClassTable.SetValueAsCustom): Rename keyword argument in
2596            ClassGroup* constructors to match argument name.
2597    
2598    2003-04-29  Bernhard Herzog  <[email protected]>
2599    
2600            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
2601            transient DB if it exists to make sure it doesn't leave a journal
2602            file in the temp directory.
2603    
2604            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
2605            self.conn to None after closing the connection to make sure it's
2606            not closed twice
2607    
2608    2003-04-29  Jonathan Coles   <[email protected]>
2609    
2610            Add a visible parameter in the layer XML tag. The default value is
2611            "true". If anything other than "false" is specified we also assume
2612            "true". Addresses RTbug #1025.
2613    
2614            * Doc/thuban.dtd: Add visible parameter to a layer.
2615    
2616            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
2617            of visible from 1 to True.
2618            (Layer.__init__): Change default value of visible from 1 to True.
2619    
2620            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
2621            parameter.
2622    
2623            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
2624            parameter.
2625    
2626            * test/test_load.py: Add new test data contents_test_visible.
2627            (LoadSessionTest.setUp): save test data.
2628            (LoadSessionTest.testLayerVisibility): Test if the visible flag
2629            is loaded correctly.
2630    
2631            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
2632            for saving an invisible layer.
2633    
2634    2003-04-29  Jonathan Coles   <[email protected]>
2635    
2636            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
2637            legend dialog box and tell it to change its map to the one
2638            supplied to SetMap(). Fixes RTbug #1770.
2639    
2640  2003-04-29  Bernhard Herzog  <[email protected]>  2003-04-29  Bernhard Herzog  <[email protected]>
2641    
2642          Next step of table implementation. Introduce a transient database          Next step of table implementation. Introduce a transient database
# Line 51  Line 2690 
2690          once. Plus it introduces a reference cycle that keeps can keep the          once. Plus it introduces a reference cycle that keeps can keep the
2691          session object alive for a long time.          session object alive for a long time.
2692    
2693  2003-04-25  Jonathan Coles   <[email protected]>  2003-04-29  Jonathan Coles   <[email protected]>
2694    
2695          * Thuban/Model/proj.py (Projection): Removed Set*() methods to make          * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
2696          Projection an immutable item. Fixes RTbug #1825.          Projection an immutable item. Fixes RTbug #1825.

Legend:
Removed from v.766  
changed lines
  Added in v.1358

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26