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

Legend:
Removed from v.1169  
changed lines
  Added in v.1272

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26