/[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 1191 by jonathan, Thu Jun 12 17:01:45 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]>  2003-06-12  Jonathan Coles   <[email protected]>
812    
813          * Thuban/Lib/fileutil.py: As is done under Windows, create the          * Thuban/Lib/fileutil.py: As is done under Windows, create the
814          user directory if it doesn't exist on a posix system.          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          * Thuban/Model/resource.py (get_user_proj_files): Moved the
818          called to get_application_dir here, so that the directory          called to get_application_dir here, so that the directory

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26