/[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 1283 by bh, Mon Jun 23 09:47:31 2003 UTC
# Line 1  Line 1 
1    2003-06-23  Bernhard Herzog  <[email protected]>
2    
3            Bug fix for RT #1961:
4    
5            * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
6            Register DerivedShapestores with the session
7    
8            * Thuban/Model/session.py (Session.Tables): Make sure each table
9            is only listed once.
10    
11            * test/test_load.py (TestJoinedTable.test): Add check_format call.
12            Update file contents to match the one written out.
13    
14    2003-06-20  Bernhard Herzog  <[email protected]>
15    
16            * test/xmlsupport.py (SaxEventLister.startElementNS)
17            (SaxEventLister.endElementNS): Do not include the qname. Python
18            2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
19            is (presumably incorrectly) None, whereas it's a string with the
20            element name in the later versions.
21    
22            * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
23            (TestEventList.test_even_list_namespace): Update tests to reflect
24            the new behaviour
25            (TestEventList.test_even_list_id_normalization): Fix doc-string
26    
27    2003-06-20  Jonathan Coles   <[email protected]>
28    
29            * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
30            by deriving classes to determine if that layer supports shapes.
31            (Layer): Override HasShapes and return true.
32    
33            * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
34            instead of a direct call to wx[Begin|End]CusyCursor().
35            (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
36            table data.
37    
38            * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
39            New. Wrappers around the wxWindows functions that allow us to
40            make additional calls such as wxYield which gives the native
41            system a chance to update the cursor correctly.
42    
43            * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
44            instead of a direct call to wx[Begin|End]CusyCursor().
45    
46            * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
47            instead of a direct call to wx[Begin|End]CusyCursor().
48            (MapCanvas.find_shape_at): Check if the current search layer
49            support shapes, otherwise go on to the next layer.
50    
51            * test/test_layer.py: Add tests in each type of layer for
52            HasClassification() and HasShapes()
53    
54    2003-06-20  Jonathan Coles   <[email protected]>
55    
56            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
57            turning on the busy cursor to allow the system to change the
58            cursor before we begin painting. This fixes a problem that
59            was occuring only under GTK. Fixes RTbug #1840.
60    
61    2003-06-20  Bernhard Herzog  <[email protected]>
62    
63            * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
64            version.
65    
66            * Thuban/Model/save.py (sort_data_stores): New. Make topological
67            sort of the data sources so they can be written with sources that
68            data sources that depend on other data sources come after the
69            sources they depend on.
70            (SessionSaver.__init__): Add idmap instance variable to map from
71            objects to the ids used in the file.
72            (SessionSaver.get_id, SessionSaver.define_id)
73            (SessionSaver.has_id): New. Methods to manage the idmap
74            (SessionSaver.write): Use thuban-0.8.dtd
75            (SessionSaver.write_session): Add a namespace on the session and
76            write out the data sources before the maps.
77            (SessionSaver.write_data_containers): New. Write the data
78            containers.
79            (SessionSaver.write_layer): Layer elements now refer to a
80            shapestore and don't contain filenames anymore.
81    
82            * Thuban/Model/load.py (LoadError): Exception class to raise when
83            errors in the files are discovered
84            (SessionLoader.__init__): Define dispatchers for elements with a
85            thuban-0.8 namespace too.
86            (SessionLoader.check_attrs): New helper method to check and
87            convert attributes
88            (AttrDesc): New. Helper class for SessionLoader.check_attrs
89            (SessionLoader.start_fileshapesource)
90            (SessionLoader.start_derivedshapesource)
91            (SessionLoader.start_filetable, SessionLoader.start_jointable):
92            Handlers for the new elements in the new fileformat
93            (SessionLoader.start_layer): Handle the shapestore attribute in
94            addition to filename.
95            (SessionLoader.start_table, SessionLoader.end_table): Removed.
96            They were never used in the old formats and aren't needed for the
97            new.
98    
99            * Thuban/Model/session.py (Session.DataContainers): New method to
100            return all "data containers", i.e. shapestores and tables
101    
102            * test/xmlsupport.py (SaxEventLister.__init__)
103            (SaxEventLister.startElementNS, sax_eventlist): Add support to
104            normalize IDs.
105    
106            * test/test_xmlsupport.py
107            (TestEventList.test_even_list_id_normalization): New test case for
108            id normalization
109    
110            * test/test_load.py (LoadSessionTest.check_format): Use ID
111            normalization
112            (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
113            class atrributes used for ID normalization
114            (TestSingleLayer, TestLayerVisibility, TestLabels.test)
115            (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
116            file format
117            (TestJoinedTable): New test for loading sessions with joined
118            tables.
119            (TestLoadError): New. Test whether missing required attributes
120            cause a LoadError.
121    
122            * test/test_save.py (SaveSessionTest.thubanids)
123            (SaveSessionTest.thubanidrefs): New class attributes for ID
124            normalization in .thuban files.
125            (SaveSessionTest.compare_xml): Use id-normalization.
126            (SaveSessionTest.testEmptySession)
127            (SaveSessionTest.testLayerProjection)
128            (SaveSessionTest.testRasterLayer)
129            (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
130            (SaveSessionTest.testLayerProjection): The filename used was the
131            same as for testSingleLayer. Use a different one.
132            (SaveSessionTest.test_dbf_table)
133            (SaveSessionTest.test_joined_table): New test cases for saving the
134            new data sources structures.
135            (TestStoreSort, MockDataStore): Classes to test the sorting of the
136            data stores for writing.
137    
138            * test/runtests.py: Add CVS keywords
139    
140    2003-06-20  Jonathan Coles   <[email protected]>
141    
142            * test/test_session.py
143            (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
144            Use the cultural_landmark-point.dbf file for the store so that
145            the table rows and shape count match.
146    
147    2003-06-20  Jonathan Coles   <[email protected]>
148    
149            * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
150            an exception if the number of shapes is different from the
151            number of rows in the table. Address RTbug #1933.
152    
153            * test/test_layer.py (TestLayer.test_derived_store): Add
154            a test for the new exception in DerivedShapeStore.__init__.
155    
156            * test/support.py (FloatTestCase): Removed since there is
157            already FloatComparisonMixin. Fixes RTbug #1954.
158            (FloatComparisonMixin.assertFloatEqual): Include test for
159            infinity that was part of FloatTestCase.
160    
161            * test/test_range.py (RangeTest): Inherit from
162            support.FloatComparisonMixin now that we don't have
163            support.FloatTestCase.
164    
165    2003-06-20  Bernhard Herzog  <[email protected]>
166    
167            * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
168            the implementation in xmlsupport instead.
169            (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
170    
171            * test/test_proj.py: Import sax_eventlist from xmlsupport instead
172            of test_save
173    
174    2003-06-20  Bernhard Herzog  <[email protected]>
175    
176            * test/test_load.py (LoadSessionTest.check_format): New helper
177            method to make sure the test files we load might have been written
178            by the current thuban version.
179            (ClassificationTest.TestLayers, TestSingleLayer.test)
180            (TestLayerVisibility.test, TestClassification.test)
181            (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
182            Add check_format() calls and fix the thuban data to match the data
183            that would be written by saving the session loaded from it.
184    
185            * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
186            the same class and function in test_save.
187    
188            * test/test_xmlsupport.py (TestEventList): New. test cases for
189            sax_eventlist
190    
191    2003-06-20  Bernhard Herzog  <[email protected]>
192    
193            * Resources/XML/thuban.dtd: Add comment about which versions of
194            Thuban are covered by this DTD
195            (map): Fix content model for layers and raster layers. There can
196            be any number or layers and raster layers in any order.
197    
198    2003-06-20  Jonathan Coles   <[email protected]>
199    
200            This is mainly about fixing RTbug #1949.
201    
202            * Thuban/Model/classification.py: Remove "from __future__"
203            import statement since python 2.2 is the earliest supported
204            version.
205    
206            * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
207            Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
208            depending on the units this projection *forwards* into.
209    
210            * Thuban/Model/save.py (SessionSaver.write_classification):
211            Remove unnecessary use of lambdas and nested functions.
212    
213            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
214            adjustment here if the map projection uses degrees.
215    
216            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
217            scale adjust code since it is now done before calling
218            this method. Don't do anything if the map projection
219            is None.
220    
221    2003-06-19  Bernhard Herzog  <[email protected]>
222    
223            Move version specific load tests to their own file.
224    
225            * test/test_load.py: Expand the doc-string to explain a bit how to
226            handle file format changes.
227            (TestClassification.test): Update the docstring as this test is
228            not about Thuban 0.2 anymore.
229    
230            * test/test_load_0_2.py: New file with the load tests for thuban
231            files created with Thuban 0.2 and earlier.
232    
233    2003-06-19  Bernhard Herzog  <[email protected]>
234    
235            Add XML validation to some of the tests. Validation will only be
236            done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
237            To make the DTD available to the test cases it's moved into
238            Resources/XML
239    
240            * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
241            for versions up to and including 0.2. Two slight changes: added an
242            encoding specification and fixed the comment which refered to
243            GRASS, not Thuban
244    
245            * test/xmlsupport.py: New support module for tests involving XML.
246            Currently there's a mix-in class for XML validation.
247    
248            * test/test_xmlsupport.py: New. Tests for the xmlsupport module
249    
250            * test/test_save.py (SaveSessionTest): Derive from ValidationTest
251            so that we can validate the
252            (SaveSessionTest.testEmptySession)
253            (SaveSessionTest.testSingleLayer)
254            (SaveSessionTest.testSingleLayer)
255            (SaveSessionTest.testLayerProjection)
256            (SaveSessionTest.testRasterLayer)
257            (SaveSessionTest.testClassifiedLayer): Validate the generated XML
258    
259            * test/runtests.py (main): Call print_additional_summary instead
260            of print_garbage_information
261    
262            * test/support.py (resource_dir): New function to return the
263            "Resource" subdirectory
264            (print_additional_summary): New function to combine several
265            summary functions
266            (run_tests): Use print_additional_summary instead of calling
267            print_garbage_information directly
268    
269    2003-06-19  Bernhard Herzog  <[email protected]>
270    
271            * Doc/thuban.dtd (classification): Correct the content model of
272            the classification element.
273            (projection): Add the "name" attribute
274    
275    2003-06-19  Frank Koormann   <[email protected]>
276    
277            MERGE from the greater-ms3 branch.
278    
279            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
280            scale if projection is latlong to get better estimate.
281    
282            Fix problem of hidden properties dialog under windows after double
283            click on layer tree:
284            The tree control always gets an Expanded / Collapsed event after
285            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
286            raises the already displayed window.
287    
288            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
289            raiseProperties initialized to prevent endless loops
290            (LegendTree._OnItemActivated): Depending on self.raiseProperties
291            simply raise the properties or open the dialog and issue a second
292            event.
293    
294    2003-06-18  Jonathan Coles   <[email protected]>
295    
296            * setup.py: Fix a few problems that occured under Windows.
297    
298    2003-06-18  Jonathan Coles   <[email protected]>
299    
300            When Thuban loaded the map was redrawn twice because the
301            legend was being opened after the mainwindow was created
302            and not during its creation. This meant the map was drawn
303            initially and then had to be redrawn when the legend
304            caused the display to change. Now the legend is opened
305            in the mainwindow constructor which resolves this issue.
306    
307            Also, although we were checking for the existence of
308            gdal and gdalwarp modules, the gdalwarp extension was
309            still being compiled (which may fail if the system doesn't
310            have gdal installed). the build_ext command to setup.py
311            now accepts the flags --with-gdal and --without-gdal.
312            If --without-gdal is specified setup.py will try to
313            use the gdal parameters specified by gdal-config. Under
314            windows, those parameters have to be set in setup.py
315            as with proj4 an wxWindows.
316    
317            * setup.py: Use a list instead of seperate variables for
318            extension parameters so we can create a generic function
319            that runs an appropriate *-config script.
320            (run_cs_script): Renamed from run_wx_script and modified
321            to accept a second argument which is a list of lists to
322            be filled in by the values returned from running the command.
323            (thuban_build_ext): New. Extends the build_ext command and
324            provides the options --with-gdal/--without-gdal which then
325            optionally includes the gdalwarp extension.
326    
327            * Thuban/Model/resource.py: First check if we can import
328            the gdalwarp Thuban extension before checking for gdal.
329            Also added some comments.
330            
331            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
332            the map is None which may be the case if none has been loaded
333            yet.
334    
335            * Thuban/UI/main.py (main): Remove call to ShowLegend.
336    
337            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
338    
339            * Thuban/UI/renderer.py: Check for gdal support before importing
340            gdalwarp.
341            (MapRenderer.render_map): Only try to optimize if we have gdal
342            support otherwise nothing will get drawn.
343    
344            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
345            during startup before a map has been created. Check if map is None
346            before using it and do nothing if it is.
347    
348    2003-06-17  Jonathan Coles   <[email protected]>
349    
350            Fix the problem with raster layers under Windows that caused
351            Thuban to crash. The view should respond to layer projection
352            changed events to update the display. Changes to a projection
353            should not cause the map to be set to full extent.
354            
355            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
356            current_map_proj to remember the current map projection so that
357            when the projection changes we know what the previous projection
358            was.
359            (MapCanvas.SetMap): Unsubscribe and subscribe to
360            LAYER_PROJECTION_CHANGED events.
361            (MapCanvas.projection_changed): Split into two methods that respond
362            to map and layer projection changes.
363            (MapCanvas.map_projection_changed): New. Takes the current view and
364            projects it using the new projection. This does not cause the
365            map to be redrawn at full extent.
366            (MapCanvas.layer_projection_changed): New. Cause a redraw which
367            will draw each layer in its new projection.
368            
369            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
370            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
371            under Windows.
372            
373            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
374            to twice sizeof(void*) because there are two digits for each
375            hex byte.
376    
377    2003-06-16  Bernhard Herzog  <[email protected]>
378    
379            Update to the layer interface: Direct access to the table,
380            shapetable, shapefile and filename attributes is now actively
381            deprecated by issuing deprecation warnings for all places where
382            this happens.
383    
384            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
385            to the instance variables table, shapetable, shapefile and
386            filename via __getattr__ so that we can issue a deprecation
387            warning.
388            (Layer.SetShapeStore): Don't set the deprecated instance variables
389            any more
390            (Layer.SetShapeStore): Don't use deprecated layer instance
391            variables
392            (Layer.Destroy): No need to explicitly remove the instance
393            variables any more
394            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
395            instance variables
396    
397            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
398            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
399            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
400            use deprecated layer instance variables
401    
402            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
403            deprecated layer instance variables
404    
405            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
406            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
407            instance variables
408    
409            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
410            deprecated layer instance variables
411    
412            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
413            deprecated layer instance variables
414    
415            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
416            deprecated layer instance variables
417    
418            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
419            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
420            variables
421    
422            * test/runtests.py (main): Turn Thuban's deprecation warnings into
423            errors so that they're cought by the tests
424    
425            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
426            layer instance variables
427    
428    2003-06-16  Jonathan Coles   <[email protected]>
429    
430            Fix a problem under Windows whereby if the user double-clicks on a
431            layer in the legend that tree item will expand or collapse as well
432            as open the layer properties dialog. The state of the tree item
433            should not be affected.
434    
435            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
436            preventExpandCollapse and subscribe to expanding and collapsing
437            events.
438            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
439            collapsing events and will veto the event if it has been triggered
440            by the user double clicking on a layer.
441            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
442            that an expanding/collapsing event should be vetoed.
443    
444    2003-06-13  Bernhard Herzog  <[email protected]>
445    
446            * Thuban/UI/classifier.py (Classifier.OnClose)
447            (Classifier.map_layers_removed)
448            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
449            in OnClose and not in map_layers_removed or
450            layer_shapestore_replaced to make sure it always happens when the
451            dialog is closed
452    
453    2003-06-13  Jonathan Coles   <[email protected]>
454    
455            This puts back a fix for Windows where a panel is needed so that
456            the background of the table view appears correctly.
457    
458            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
459            object that can be used by derived classes to place any
460            controls (including the grid) onto.
461            (QueryTableFrame.__init__): Use the panel as the parent window
462            for all the controls. Reparent the grid so that the panel is
463            the parent. Call UpdateStatusText() to correctly initialize
464            the status bar.
465    
466    2003-06-13  Jonathan Coles   <[email protected]>
467    
468            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
469            from wxFrame (as opposed to wxDialog like the other classes)
470            but otherwise behaves like the other classes. This is needed
471            for the TableView which isn't really a dialog and needs to
472            have a status bar and control buttons.
473    
474            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
475            instance variable to keep track of how many rows are selected.
476            Subscribe once to the the events we are interested in.
477            (ThubanGrid.OnRangeSelect): Only handle event if event handling
478            hasn't been turned off.
479            (ThubanGrid.OnSelectCell): Only handle event if event handling
480            hasn't been turned off.
481            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
482            as an event listener (which changes the event handler stack)
483            simply set an instance variable to False. This is checked in
484            the event handlers.
485            (ThubanGrid.GetNumberSelected): Return the number of currently
486            selected rows.
487            (TableFrame): Inherit from ThubanFrame so we can have a
488            status bar and control buttons.
489            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
490            Explicitly set which items are selected in the operator choice and
491            action choice so there is always a valid selection. Fixes RTbug #1941.
492            Subscribe to grid cell selection events so we can update the
493            status bar.
494            (QueryTableFrame.UpdateStatusText): Update the status bar with
495            how many rows are in the grid, how many columns, and how many
496            rows are selected.
497            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
498            Call UpdateStatusText when cells are (de)selected.
499            (QueryTableFrame.OnQuery): Use the string value in the value
500            combo if either the selected item index is 0 or if the string
501            cannot be found in the predefined list (this happens if the
502            user changes the text). Fixes RTbug #1940.
503            Only turn off the grid event listeners if there a query comes
504            back with a none empty list of ids. in the case that the list
505            is empty this causes a grid.ClearSelection() call to actually
506            clear the grid selection which causes the selected items in
507            the map to be deselected. Fixes RTbug #1939.
508    
509            * test/test_save.py (XMLWriterTest.Encode): Check return values.
510            Fixes RTbug #1851.
511    
512    2003-06-13  Bernhard Herzog  <[email protected]>
513    
514            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
515            self.selected_shape with the current selection to make sure the
516            contents of the dialog are up to date when it's shown for the
517            first time.
518            The dialog used to work without this by luck. The recent fix to
519            the connector module 'broke' a 'feature' the identify view was
520            relying on, i.e that subscribing to a message in response to
521            receiving a message of that type would mean that the new
522            subscriber would also be called for the same message.
523            
524    2003-06-12  Jonathan Coles   <[email protected]>
525    
526            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
527            the image is rendered. Fixes RTbug #1937.
528    
529  2003-06-12  Jonathan Coles   <[email protected]>  2003-06-12  Jonathan Coles   <[email protected]>
530    
531          * Thuban/Lib/fileutil.py: As is done under Windows, create the          * Thuban/Lib/fileutil.py: As is done under Windows, create the
532          user directory if it doesn't exist on a posix system.          user directory if it doesn't exist on a posix system.
533            Fixes RTbug #1815.
534    
535          * Thuban/Model/resource.py (get_user_proj_files): Moved the          * Thuban/Model/resource.py (get_user_proj_files): Moved the
536          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.1283

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26