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

Legend:
Removed from v.1203  
changed lines
  Added in v.1286

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26