/[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 1152 by frank, Wed Jun 11 11:06:27 2003 UTC revision 1349 by jonathan, Tue Jul 1 16:12:38 2003 UTC
# Line 1  Line 1 
1    2003-07-01  Jonathan Coles   <[email protected]>
2    
3            * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
4            Import used objects/class from color.
5            (generate_singletons): We don't
6            need the numGroups parameter anymore because we are using
7            the new ramps with GetProperties().
8            (generate_uniform_distribution): Use new ramp method
9            GetProperties().
10            (generate_quantiles, GenQuantiles0): Use new ramp method
11            GetProperties().
12            (CustomRamp.SetNumGroups): Removed. The ramps now map
13            a value from 0 to 1 to class properties so the number
14            of groups is not needed ahead of time.
15            (CustomRamp.next): Removed. CustomRamp does not support
16            interation anymore.
17            (CustomRamp.GetProperties): Returns a ClassGroupProperties
18            object based on the index value from 0 to 1 that is
19            passed to it.
20            (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
21            Made into instances of Monochromatic class instread of
22            deriving from it.
23            (HotToCold.SetNumGroups): Removed. See CustomRamp.
24            (HotToCold.next): Removed. See CustomRamp.
25    
26            * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
27            (Classification.SetField, Classification.SetFieldType):
28            Replaced with SetFieldInfo.
29            (Classification.SetFieldInfo): New. Does a better job of
30            what SetField and SetFieldType used to do by combining
31            their function since they should really always be done
32            at the same time.
33            (Classification.SetLayer): Renamed to _set_layer.
34            (Classification._set_layer): Should only be called from
35            Layer's SetClassification. This does not cause a recursive
36            call as SetLayer did because we know that Layer knows about
37            the classification.
38    
39            * Thuban/Model/color.py: Fixes RTbug #1971.
40            (_Transparent): Renamed from Transparent so it doesn't
41            conflict with the module variable.
42            (Transparent, Black): Renamed from Color.Transparent,
43            Color.Black so they are not class variables.
44    
45            * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
46            (Layer.Destroy): We don't need to call SetClassification
47            anymore to clear out the back reference in the classifcation
48            to the layer. It's better to set it to None using _set_layer,
49            and we won't be creating another clas object too.
50            (Layer.SetClassification): Classification._set_layer is not
51            recursive so remove all the locking variables. Also clean
52            up the code so that it remains unchanged if something fails.
53    
54            * Thuban/Model/load.py: Fixes RTbug #1971.
55            (SessionLoader.start_classification): Call
56            Classification.SetFieldInfo().
57    
58            * Thuban/Model/save.py: Removed import of Color which wasn't
59            being used.
60    
61            * Thuban/UI/classgen.py: Fixes RTbug #1972.
62            (ClassGenDialog.__init__): Color ramps are now instances
63            already so we don't need to create any new objects.
64            (ClassGenDialog.OnOK): Check for numGroups is no longer
65            necessary because we never use it.
66    
67            * Thuban/UI/classifier.py: Fixes RTbug #1971.
68            (Classifier.__BuildClassification, Classifier.__SetGridTable):
69            Call Classification.SetFieldInfo() instead of SetFieldType.
70    
71            * Thuban/UI/renderer.py: Fixes RTbug #1971.
72    
73            * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
74            (MapCanvas.__init__): Subscribe to the idle time event. Set
75            background color to white.
76            (MapCanvas.OnPaint): Set a flag indicating that we should
77            render the map during idle time. If we already have a bitmap
78            just draw it now.
79            (MapCanvas.OnIdle): New. Render the map only during idle time.
80            This also fixes a problem with the busy cursor under gtk.
81    
82            * test/test_classgen.py (ClassGenTest.test_generate_singletons):
83            Fix calls to generate_singletons because the signature changed.
84    
85            * test/test_classification.py: Fix color references and
86            change calls to Classification.[SetField|SetFieldType] to
87            SetFieldInfo.
88    
89            * test/test_load.py: Fix color references.
90    
91            * test/test_load_0_2.py: Fix color references.
92    
93            * test/test_save.py (SaveSessionTest.testClassifiedLayer):
94            Change calls to Classification.[SetField|SetFieldType] to
95            SetFieldInfo.
96    
97    2003-07-01  Frank Koormann   <[email protected]>
98    
99            MERGE from the greater-ms3 branch.
100    
101            * test/test_transientdb.py
102            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
103            New. Test join of two tables with partly equal column names.
104    
105            * Thuban/Model/transientdb.py (TransientJoinedTable.create):
106            If duplicates in left and right tables column names are found,
107            append '_' (underscores) to the name until it is unique.
108            Create always new internal names for the resulting table and reference
109            columns in the join statement with <table>.<column>
110    
111    2003-07-01  Bernhard Herzog  <[email protected]>
112    
113            * test/test_transientdb.py
114            (TestTransientTable.test_transient_joined_table_same_column_name):
115            New. Test whether joining on columns with the same names in both
116            tables works.
117            
118            * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
119            sure to use the right internal names even when joining on field
120            with the same names in both tables. Also, detect duplicate names
121            in the joined table correctly.
122    
123    2003-07-01  Frank Koormann   <[email protected]>
124    
125            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
126            Reverse List of layers to render in same order as in desktop legend.
127    
128    2003-06-30  Jonathan Coles   <[email protected]>
129    
130            * Thuban/version.py (make_tuple): Takes a version string
131            and splits it into a tuple of at most three integers.
132            Used make_tuple() to make tuple versions of the version
133            numbers.
134    
135            * Thuban/UI/about.py: Add Thuban email addresses.
136    
137    2003-06-30  Jonathan Coles   <[email protected]>
138    
139            * Thuban/version.py: SQLite/PySQLite version dependencies
140            were too high.
141    
142    2003-06-30  Jonathan Coles   <[email protected]>
143    
144            * Thuban/version.py: Update version to 0.8.1
145            
146            * MANIFEST.in: Added Projections so that default.proj is
147            included.
148    
149    2003-06-26  Jonathan Coles   <[email protected]>
150    
151            New About box with lots more information including library
152            versions and credits. More/better version checking before
153            Thuban starts.
154    
155            * Thuban/UI/about.py: New. New About box that displays
156            library version information and credits.
157    
158            * Thuban/version.py: Added new 'versions' dictionary which
159            contains the verions of various libraries which are checked
160            when the module loads.
161            (verify_versions): Check all version numbers and returns
162            a list of errors.
163    
164            * Thuban/UI/classifier.py (Classifier.__EnableButtons):
165            Reset the status of the buttons as the situation warrants,
166            but in a better more reliable way by not relying on the
167            current status to determine what needs to change.
168    
169            * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
170            (verify_versions): Remove most of the code since it is
171            now in Thuban.version.verify_versions.o
172    
173            * Thuban/UI/mainwindow.py (MainWindow.About): Call new
174            About box in Thuban.UI.about.
175    
176            * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
177            Returns the version of gdal library being used as a string.
178    
179            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
180            Removed.
181            (get_proj_version): Return the version of PROJ that the file
182            was compiled with.
183            (get_gtk_version): Return th version of GTK that the file
184            was compiled with.
185    
186    2003-06-25  Jonathan Coles   <[email protected]>
187    
188            * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
189            of the SelectPropertiesDialog should be self so the window
190            appears on top.
191            (ClassGroupPropertiesCtrl.DoEdit): The parent
192            of the SelectPropertiesDialog should be self so the window
193            appears on top.
194    
195            * Thuban/UI/resource.py: Cleaned up how we determine file
196            extensions.
197            (GetImageResource): Return an wxImage from our Resources.
198    
199    2003-06-24  Jonathan Coles   <[email protected]>
200    
201            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
202            Check that a layer has a classification before trying
203            to get it. Raster layers don't have classifications.
204    
205    2003-06-23  Jonathan Coles   <[email protected]>
206            
207            * setup.py: Add Resources/XML to resource list.
208        
209    2003-06-23  Jonathan Coles   <[email protected]>
210    
211            * setup.cfg: Fix copyright dates
212        
213    2003-06-23  Jonathan Coles   <[email protected]>
214    
215            * MANIFEST.in: Update with Resources/XML
216    
217            * setup.py: Don't include Locale resources yet as we don't
218            have any and it causes problems building the distribution
219            for Windows. Update version to 0.8.0.
220    
221            * Doc/thuban.dtd: Removed since it is now in Resources/XML.
222    
223            * Thuban/UI/mainwindow.py: Add blank line at the end because
224            file was not being read correctly building the Windows
225            distribution.
226    
227    2003-06-23  Jonathan Coles   <[email protected]>
228    
229            * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
230    
231            * Thuban/version.py: Temporarily update longversion for
232            the 0.8 release so that it doesn't have the cvs revision.
233    
234    2003-06-23  Jonathan Coles   <[email protected]>
235    
236            * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
237            to make sure that we don't create reentrant possibilities with
238            wxYield.
239    
240            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
241            directly to avoid the wxSafeYield() call which generates an
242            OnPaint event causing infinite recursion. Don't try to catch
243            exception anymore. This was for before there were limits on map
244            scaling.
245    
246    2003-06-23  Bernhard Herzog  <[email protected]>
247    
248            Bug fix for RT #1961:
249    
250            * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
251            Register DerivedShapestores with the session
252    
253            * Thuban/Model/session.py (Session.Tables): Make sure each table
254            is only listed once.
255    
256            * test/test_load.py (TestJoinedTable.test): Add check_format call.
257            Update file contents to match the one written out.
258    
259    2003-06-20  Bernhard Herzog  <[email protected]>
260    
261            * test/xmlsupport.py (SaxEventLister.startElementNS)
262            (SaxEventLister.endElementNS): Do not include the qname. Python
263            2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
264            is (presumably incorrectly) None, whereas it's a string with the
265            element name in the later versions.
266    
267            * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
268            (TestEventList.test_even_list_namespace): Update tests to reflect
269            the new behaviour
270            (TestEventList.test_even_list_id_normalization): Fix doc-string
271    
272    2003-06-20  Jonathan Coles   <[email protected]>
273    
274            * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
275            by deriving classes to determine if that layer supports shapes.
276            (Layer): Override HasShapes and return true.
277    
278            * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
279            instead of a direct call to wx[Begin|End]CusyCursor().
280            (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
281            table data.
282    
283            * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
284            New. Wrappers around the wxWindows functions that allow us to
285            make additional calls such as wxYield which gives the native
286            system a chance to update the cursor correctly.
287    
288            * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
289            instead of a direct call to wx[Begin|End]CusyCursor().
290    
291            * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
292            instead of a direct call to wx[Begin|End]CusyCursor().
293            (MapCanvas.find_shape_at): Check if the current search layer
294            support shapes, otherwise go on to the next layer.
295    
296            * test/test_layer.py: Add tests in each type of layer for
297            HasClassification() and HasShapes()
298    
299    2003-06-20  Jonathan Coles   <[email protected]>
300    
301            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
302            turning on the busy cursor to allow the system to change the
303            cursor before we begin painting. This fixes a problem that
304            was occuring only under GTK. Fixes RTbug #1840.
305    
306    2003-06-20  Bernhard Herzog  <[email protected]>
307    
308            * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
309            version.
310    
311            * Thuban/Model/save.py (sort_data_stores): New. Make topological
312            sort of the data sources so they can be written with sources that
313            data sources that depend on other data sources come after the
314            sources they depend on.
315            (SessionSaver.__init__): Add idmap instance variable to map from
316            objects to the ids used in the file.
317            (SessionSaver.get_id, SessionSaver.define_id)
318            (SessionSaver.has_id): New. Methods to manage the idmap
319            (SessionSaver.write): Use thuban-0.8.dtd
320            (SessionSaver.write_session): Add a namespace on the session and
321            write out the data sources before the maps.
322            (SessionSaver.write_data_containers): New. Write the data
323            containers.
324            (SessionSaver.write_layer): Layer elements now refer to a
325            shapestore and don't contain filenames anymore.
326    
327            * Thuban/Model/load.py (LoadError): Exception class to raise when
328            errors in the files are discovered
329            (SessionLoader.__init__): Define dispatchers for elements with a
330            thuban-0.8 namespace too.
331            (SessionLoader.check_attrs): New helper method to check and
332            convert attributes
333            (AttrDesc): New. Helper class for SessionLoader.check_attrs
334            (SessionLoader.start_fileshapesource)
335            (SessionLoader.start_derivedshapesource)
336            (SessionLoader.start_filetable, SessionLoader.start_jointable):
337            Handlers for the new elements in the new fileformat
338            (SessionLoader.start_layer): Handle the shapestore attribute in
339            addition to filename.
340            (SessionLoader.start_table, SessionLoader.end_table): Removed.
341            They were never used in the old formats and aren't needed for the
342            new.
343    
344            * Thuban/Model/session.py (Session.DataContainers): New method to
345            return all "data containers", i.e. shapestores and tables
346    
347            * test/xmlsupport.py (SaxEventLister.__init__)
348            (SaxEventLister.startElementNS, sax_eventlist): Add support to
349            normalize IDs.
350    
351            * test/test_xmlsupport.py
352            (TestEventList.test_even_list_id_normalization): New test case for
353            id normalization
354    
355            * test/test_load.py (LoadSessionTest.check_format): Use ID
356            normalization
357            (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
358            class atrributes used for ID normalization
359            (TestSingleLayer, TestLayerVisibility, TestLabels.test)
360            (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
361            file format
362            (TestJoinedTable): New test for loading sessions with joined
363            tables.
364            (TestLoadError): New. Test whether missing required attributes
365            cause a LoadError.
366    
367            * test/test_save.py (SaveSessionTest.thubanids)
368            (SaveSessionTest.thubanidrefs): New class attributes for ID
369            normalization in .thuban files.
370            (SaveSessionTest.compare_xml): Use id-normalization.
371            (SaveSessionTest.testEmptySession)
372            (SaveSessionTest.testLayerProjection)
373            (SaveSessionTest.testRasterLayer)
374            (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
375            (SaveSessionTest.testLayerProjection): The filename used was the
376            same as for testSingleLayer. Use a different one.
377            (SaveSessionTest.test_dbf_table)
378            (SaveSessionTest.test_joined_table): New test cases for saving the
379            new data sources structures.
380            (TestStoreSort, MockDataStore): Classes to test the sorting of the
381            data stores for writing.
382    
383            * test/runtests.py: Add CVS keywords
384    
385    2003-06-20  Jonathan Coles   <[email protected]>
386    
387            * test/test_session.py
388            (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
389            Use the cultural_landmark-point.dbf file for the store so that
390            the table rows and shape count match.
391    
392    2003-06-20  Jonathan Coles   <[email protected]>
393    
394            * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
395            an exception if the number of shapes is different from the
396            number of rows in the table. Address RTbug #1933.
397    
398            * test/test_layer.py (TestLayer.test_derived_store): Add
399            a test for the new exception in DerivedShapeStore.__init__.
400    
401            * test/support.py (FloatTestCase): Removed since there is
402            already FloatComparisonMixin. Fixes RTbug #1954.
403            (FloatComparisonMixin.assertFloatEqual): Include test for
404            infinity that was part of FloatTestCase.
405    
406            * test/test_range.py (RangeTest): Inherit from
407            support.FloatComparisonMixin now that we don't have
408            support.FloatTestCase.
409    
410    2003-06-20  Bernhard Herzog  <[email protected]>
411    
412            * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
413            the implementation in xmlsupport instead.
414            (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
415    
416            * test/test_proj.py: Import sax_eventlist from xmlsupport instead
417            of test_save
418    
419    2003-06-20  Bernhard Herzog  <[email protected]>
420    
421            * test/test_load.py (LoadSessionTest.check_format): New helper
422            method to make sure the test files we load might have been written
423            by the current thuban version.
424            (ClassificationTest.TestLayers, TestSingleLayer.test)
425            (TestLayerVisibility.test, TestClassification.test)
426            (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
427            Add check_format() calls and fix the thuban data to match the data
428            that would be written by saving the session loaded from it.
429    
430            * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
431            the same class and function in test_save.
432    
433            * test/test_xmlsupport.py (TestEventList): New. test cases for
434            sax_eventlist
435    
436    2003-06-20  Bernhard Herzog  <[email protected]>
437    
438            * Resources/XML/thuban.dtd: Add comment about which versions of
439            Thuban are covered by this DTD
440            (map): Fix content model for layers and raster layers. There can
441            be any number or layers and raster layers in any order.
442    
443    2003-06-20  Jonathan Coles   <[email protected]>
444    
445            This is mainly about fixing RTbug #1949.
446    
447            * Thuban/Model/classification.py: Remove "from __future__"
448            import statement since python 2.2 is the earliest supported
449            version.
450    
451            * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
452            Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
453            depending on the units this projection *forwards* into.
454    
455            * Thuban/Model/save.py (SessionSaver.write_classification):
456            Remove unnecessary use of lambdas and nested functions.
457    
458            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
459            adjustment here if the map projection uses degrees.
460    
461            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
462            scale adjust code since it is now done before calling
463            this method. Don't do anything if the map projection
464            is None.
465    
466    2003-06-19  Bernhard Herzog  <[email protected]>
467    
468            Move version specific load tests to their own file.
469    
470            * test/test_load.py: Expand the doc-string to explain a bit how to
471            handle file format changes.
472            (TestClassification.test): Update the docstring as this test is
473            not about Thuban 0.2 anymore.
474    
475            * test/test_load_0_2.py: New file with the load tests for thuban
476            files created with Thuban 0.2 and earlier.
477    
478    2003-06-19  Bernhard Herzog  <[email protected]>
479    
480            Add XML validation to some of the tests. Validation will only be
481            done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
482            To make the DTD available to the test cases it's moved into
483            Resources/XML
484    
485            * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
486            for versions up to and including 0.2. Two slight changes: added an
487            encoding specification and fixed the comment which refered to
488            GRASS, not Thuban
489    
490            * test/xmlsupport.py: New support module for tests involving XML.
491            Currently there's a mix-in class for XML validation.
492    
493            * test/test_xmlsupport.py: New. Tests for the xmlsupport module
494    
495            * test/test_save.py (SaveSessionTest): Derive from ValidationTest
496            so that we can validate the
497            (SaveSessionTest.testEmptySession)
498            (SaveSessionTest.testSingleLayer)
499            (SaveSessionTest.testSingleLayer)
500            (SaveSessionTest.testLayerProjection)
501            (SaveSessionTest.testRasterLayer)
502            (SaveSessionTest.testClassifiedLayer): Validate the generated XML
503    
504            * test/runtests.py (main): Call print_additional_summary instead
505            of print_garbage_information
506    
507            * test/support.py (resource_dir): New function to return the
508            "Resource" subdirectory
509            (print_additional_summary): New function to combine several
510            summary functions
511            (run_tests): Use print_additional_summary instead of calling
512            print_garbage_information directly
513    
514    2003-06-19  Bernhard Herzog  <[email protected]>
515    
516            * Doc/thuban.dtd (classification): Correct the content model of
517            the classification element.
518            (projection): Add the "name" attribute
519    
520    2003-06-19  Frank Koormann   <[email protected]>
521    
522            MERGE from the greater-ms3 branch.
523    
524            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
525            scale if projection is latlong to get better estimate.
526    
527            Fix problem of hidden properties dialog under windows after double
528            click on layer tree:
529            The tree control always gets an Expanded / Collapsed event after
530            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
531            raises the already displayed window.
532    
533            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
534            raiseProperties initialized to prevent endless loops
535            (LegendTree._OnItemActivated): Depending on self.raiseProperties
536            simply raise the properties or open the dialog and issue a second
537            event.
538    
539    2003-06-18  Jonathan Coles   <[email protected]>
540    
541            * setup.py: Fix a few problems that occured under Windows.
542    
543    2003-06-18  Jonathan Coles   <[email protected]>
544    
545            When Thuban loaded the map was redrawn twice because the
546            legend was being opened after the mainwindow was created
547            and not during its creation. This meant the map was drawn
548            initially and then had to be redrawn when the legend
549            caused the display to change. Now the legend is opened
550            in the mainwindow constructor which resolves this issue.
551    
552            Also, although we were checking for the existence of
553            gdal and gdalwarp modules, the gdalwarp extension was
554            still being compiled (which may fail if the system doesn't
555            have gdal installed). the build_ext command to setup.py
556            now accepts the flags --with-gdal and --without-gdal.
557            If --without-gdal is specified setup.py will try to
558            use the gdal parameters specified by gdal-config. Under
559            windows, those parameters have to be set in setup.py
560            as with proj4 an wxWindows.
561    
562            * setup.py: Use a list instead of seperate variables for
563            extension parameters so we can create a generic function
564            that runs an appropriate *-config script.
565            (run_cs_script): Renamed from run_wx_script and modified
566            to accept a second argument which is a list of lists to
567            be filled in by the values returned from running the command.
568            (thuban_build_ext): New. Extends the build_ext command and
569            provides the options --with-gdal/--without-gdal which then
570            optionally includes the gdalwarp extension.
571    
572            * Thuban/Model/resource.py: First check if we can import
573            the gdalwarp Thuban extension before checking for gdal.
574            Also added some comments.
575            
576            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
577            the map is None which may be the case if none has been loaded
578            yet.
579    
580            * Thuban/UI/main.py (main): Remove call to ShowLegend.
581    
582            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
583    
584            * Thuban/UI/renderer.py: Check for gdal support before importing
585            gdalwarp.
586            (MapRenderer.render_map): Only try to optimize if we have gdal
587            support otherwise nothing will get drawn.
588    
589            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
590            during startup before a map has been created. Check if map is None
591            before using it and do nothing if it is.
592    
593    2003-06-17  Jonathan Coles   <[email protected]>
594    
595            Fix the problem with raster layers under Windows that caused
596            Thuban to crash. The view should respond to layer projection
597            changed events to update the display. Changes to a projection
598            should not cause the map to be set to full extent.
599            
600            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
601            current_map_proj to remember the current map projection so that
602            when the projection changes we know what the previous projection
603            was.
604            (MapCanvas.SetMap): Unsubscribe and subscribe to
605            LAYER_PROJECTION_CHANGED events.
606            (MapCanvas.projection_changed): Split into two methods that respond
607            to map and layer projection changes.
608            (MapCanvas.map_projection_changed): New. Takes the current view and
609            projects it using the new projection. This does not cause the
610            map to be redrawn at full extent.
611            (MapCanvas.layer_projection_changed): New. Cause a redraw which
612            will draw each layer in its new projection.
613            
614            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
615            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
616            under Windows.
617            
618            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
619            to twice sizeof(void*) because there are two digits for each
620            hex byte.
621    
622    2003-06-16  Bernhard Herzog  <[email protected]>
623    
624            Update to the layer interface: Direct access to the table,
625            shapetable, shapefile and filename attributes is now actively
626            deprecated by issuing deprecation warnings for all places where
627            this happens.
628    
629            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
630            to the instance variables table, shapetable, shapefile and
631            filename via __getattr__ so that we can issue a deprecation
632            warning.
633            (Layer.SetShapeStore): Don't set the deprecated instance variables
634            any more
635            (Layer.SetShapeStore): Don't use deprecated layer instance
636            variables
637            (Layer.Destroy): No need to explicitly remove the instance
638            variables any more
639            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
640            instance variables
641    
642            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
643            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
644            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
645            use deprecated layer instance variables
646    
647            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
648            deprecated layer instance variables
649    
650            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
651            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
652            instance variables
653    
654            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
655            deprecated layer instance variables
656    
657            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
658            deprecated layer instance variables
659    
660            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
661            deprecated layer instance variables
662    
663            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
664            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
665            variables
666    
667            * test/runtests.py (main): Turn Thuban's deprecation warnings into
668            errors so that they're cought by the tests
669    
670            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
671            layer instance variables
672    
673    2003-06-16  Jonathan Coles   <[email protected]>
674    
675            Fix a problem under Windows whereby if the user double-clicks on a
676            layer in the legend that tree item will expand or collapse as well
677            as open the layer properties dialog. The state of the tree item
678            should not be affected.
679    
680            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
681            preventExpandCollapse and subscribe to expanding and collapsing
682            events.
683            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
684            collapsing events and will veto the event if it has been triggered
685            by the user double clicking on a layer.
686            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
687            that an expanding/collapsing event should be vetoed.
688    
689    2003-06-13  Bernhard Herzog  <[email protected]>
690    
691            * Thuban/UI/classifier.py (Classifier.OnClose)
692            (Classifier.map_layers_removed)
693            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
694            in OnClose and not in map_layers_removed or
695            layer_shapestore_replaced to make sure it always happens when the
696            dialog is closed
697    
698    2003-06-13  Jonathan Coles   <[email protected]>
699    
700            This puts back a fix for Windows where a panel is needed so that
701            the background of the table view appears correctly.
702    
703            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
704            object that can be used by derived classes to place any
705            controls (including the grid) onto.
706            (QueryTableFrame.__init__): Use the panel as the parent window
707            for all the controls. Reparent the grid so that the panel is
708            the parent. Call UpdateStatusText() to correctly initialize
709            the status bar.
710    
711    2003-06-13  Jonathan Coles   <[email protected]>
712    
713            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
714            from wxFrame (as opposed to wxDialog like the other classes)
715            but otherwise behaves like the other classes. This is needed
716            for the TableView which isn't really a dialog and needs to
717            have a status bar and control buttons.
718    
719            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
720            instance variable to keep track of how many rows are selected.
721            Subscribe once to the the events we are interested in.
722            (ThubanGrid.OnRangeSelect): Only handle event if event handling
723            hasn't been turned off.
724            (ThubanGrid.OnSelectCell): Only handle event if event handling
725            hasn't been turned off.
726            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
727            as an event listener (which changes the event handler stack)
728            simply set an instance variable to False. This is checked in
729            the event handlers.
730            (ThubanGrid.GetNumberSelected): Return the number of currently
731            selected rows.
732            (TableFrame): Inherit from ThubanFrame so we can have a
733            status bar and control buttons.
734            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
735            Explicitly set which items are selected in the operator choice and
736            action choice so there is always a valid selection. Fixes RTbug #1941.
737            Subscribe to grid cell selection events so we can update the
738            status bar.
739            (QueryTableFrame.UpdateStatusText): Update the status bar with
740            how many rows are in the grid, how many columns, and how many
741            rows are selected.
742            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
743            Call UpdateStatusText when cells are (de)selected.
744            (QueryTableFrame.OnQuery): Use the string value in the value
745            combo if either the selected item index is 0 or if the string
746            cannot be found in the predefined list (this happens if the
747            user changes the text). Fixes RTbug #1940.
748            Only turn off the grid event listeners if there a query comes
749            back with a none empty list of ids. in the case that the list
750            is empty this causes a grid.ClearSelection() call to actually
751            clear the grid selection which causes the selected items in
752            the map to be deselected. Fixes RTbug #1939.
753    
754            * test/test_save.py (XMLWriterTest.Encode): Check return values.
755            Fixes RTbug #1851.
756    
757    2003-06-13  Bernhard Herzog  <[email protected]>
758    
759            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
760            self.selected_shape with the current selection to make sure the
761            contents of the dialog are up to date when it's shown for the
762            first time.
763            The dialog used to work without this by luck. The recent fix to
764            the connector module 'broke' a 'feature' the identify view was
765            relying on, i.e that subscribing to a message in response to
766            receiving a message of that type would mean that the new
767            subscriber would also be called for the same message.
768            
769    2003-06-12  Jonathan Coles   <[email protected]>
770    
771            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
772            the image is rendered. Fixes RTbug #1937.
773    
774    2003-06-12  Jonathan Coles   <[email protected]>
775    
776            * Thuban/Lib/fileutil.py: As is done under Windows, create the
777            user directory if it doesn't exist on a posix system.
778            Fixes RTbug #1815.
779    
780            * Thuban/Model/resource.py (get_user_proj_files): Moved the
781            called to get_application_dir here, so that the directory
782            will only be called if this method is invoked.
783    
784            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
785            the projfilepath if no projection is selected.
786    
787    2003-06-12  Jonathan Coles   <[email protected]>
788    
789            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
790            the scalebar if the current map has no projection set.
791    
792            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
793            projfilepath label to just the basename of the projection file
794            rather than include the entire path.
795    
796            * Thuban/Model/resource.py: Fix missed proj functions that
797            needed to be renamed.
798    
799    2003-06-12  Jonathan Coles   <[email protected]>
800    
801            * Thuban/Model/classification.py: Removed assert statements that
802            tested if the variable was an instance of Color.
803    
804            * Thuban/Model/color.py (Color): Remove commented code that isn't
805            used.
806            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
807            Fixes RTbug #1835.
808            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
809            Needed now that the class doesn't inherit from Color.
810    
811    2003-06-12  Jonathan Coles   <[email protected]>
812    
813            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
814            check unicode strings.
815    
816            * test/test_layer.py: Check for existence of gdal.
817    
818    2003-06-12  Jonathan Coles   <[email protected]>
819        
820            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
821            that was in load.py
822    
823            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
824            that was in save.py
825    
826    2003-06-12  Jonathan Coles   <[email protected]>
827    
828            This is largely a collection of bug fixes. We also handle the
829            case where gdal is not on the system. The XMLReader and XMLWriter
830            classes were moved into there own files to resolve some circular
831            import references and because they shouldn't really be in the
832            file that is dediciated to reading/writing session files since
833            they are also used elsewhere.
834    
835            * Thuban/Model/classgen.py: Renamed functions to follow the
836            function_names_with_underscores style. Fixes RTbug #1903.
837            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
838    
839            * Thuban/Model/layer.py: Import gdal only if it available.
840            (RasterLayer): Handle the case where the gdal library is unavailable.
841            Addresses RTbug #1877.
842    
843            * Thuban/Model/load.py (XMLReader): Moved into seperate file
844            xmlreader.py.
845    
846    2003-06-12  Jonathan Coles   <[email protected]>
847    
848            This is largely a collection of bug fixes. We also handle the
849            case where gdal is not on the system. The XMLReader and XMLWriter
850            classes were moved into there own files to resolve some circular
851            import references and because they shouldn't really be in the
852            file that is dediciated to reading/writing session files since
853            they are also used elsewhere.
854    
855            * Thuban/Model/classgen.py: Renamed functions to follow the
856            function_names_with_underscores style. Fixes RTbug #1903.
857            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
858    
859            * Thuban/Model/layer.py: Import gdal only if it available.
860            (RasterLayer): Handle the case where the gdal library is unavailable.
861            Addresses RTbug #1877.
862    
863            * Thuban/Model/load.py (XMLReader): Moved into seperate file
864            xmlreader.py.
865    
866            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
867            file xmlwriter.py.
868    
869            * Thuban/Model/resource.py: Renamed functions to following the
870            function_names_with_underscores style.
871            (has_gdal_support): New function that returns true if the gdal
872            library is available. Addresses RTbug #1877.
873    
874            * Thuban/UI/application.py (ThubanApplication.OpenSession):
875            Display a message box if the gdal library is not available, but
876            only if there are any layers that would use it. Addresses RTbug #1877.
877    
878            * Thuban/UI/classgen.py: Use renamed projection resource functions.
879            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
880            when using integers versus floats.
881    
882            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
883            determine if the "Add Image Layer" menu option should be
884            greyed out or not. Addresses RTbug #1877.
885    
886            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
887    
888            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
889            optimize if a raster layer is visible. Fixes RTbug #1931.
890            Only draw the raster layer if the gdal library is available.
891            Addresses RTbug #1877.
892    
893            * test/test_classgen.py: Add tests for generate_singletons,
894            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
895            (test_calculate_quantiles): Fix some tests to catch the new
896            ValueError that is raised.
897    
898            * test/test_proj.py: Use renamed projection resource functions.
899    
900            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
901            test for saving classified layers. Fixes RTbug #1902.
902            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
903    
904    2003-06-12  Jan-Oliver Wagner <[email protected]>
905    
906            Fix for http://intevation.de/rt/webrt?serial_num=1900.
907    
908            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
909    
910            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
911            multiplechoicedialog.py rather than from the wxPython library.
912    
913  2003-06-11  Frank Koormann  <[email protected]>  2003-06-11  Frank Koormann  <[email protected]>
914    
915          * Thuban/Lib/fileutil.py (get_application_dir): Minor stability          * Thuban/Lib/fileutil.py (get_application_dir): Minor stability

Legend:
Removed from v.1152  
changed lines
  Added in v.1349

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26