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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26