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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26