/[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 1130 by bh, Wed Jun 4 18:37:57 2003 UTC revision 1242 by frank, Thu Jun 19 09:26:10 2003 UTC
# Line 1  Line 1 
1    2003-06-19  Frank Koormann   <[email protected]>
2    
3            MERGE from the greater-ms3 branch.
4    
5            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
6            scale if projection is latlong to get better estimate.
7    
8            Fix problem of hidden properties dialog under windows after double
9            click on layer tree:
10            The tree control always gets an Expanded / Collapsed event after
11            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
12            raises the already displayed window.
13    
14            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
15            raiseProperties initialized to prevent endless loops
16            (LegendTree._OnItemActivated): Depending on self.raiseProperties
17            simply raise the properties or open the dialog and issue a second
18            event.
19    
20    2003-06-18  Jonathan Coles   <[email protected]>
21    
22            * setup.py: Fix a few problems that occured under Windows.
23    
24    2003-06-18  Jonathan Coles   <[email protected]>
25    
26            When Thuban loaded the map was redrawn twice because the
27            legend was being opened after the mainwindow was created
28            and not during its creation. This meant the map was drawn
29            initially and then had to be redrawn when the legend
30            caused the display to change. Now the legend is opened
31            in the mainwindow constructor which resolves this issue.
32    
33            Also, although we were checking for the existence of
34            gdal and gdalwarp modules, the gdalwarp extension was
35            still being compiled (which may fail if the system doesn't
36            have gdal installed). the build_ext command to setup.py
37            now accepts the flags --with-gdal and --without-gdal.
38            If --without-gdal is specified setup.py will try to
39            use the gdal parameters specified by gdal-config. Under
40            windows, those parameters have to be set in setup.py
41            as with proj4 an wxWindows.
42    
43            * setup.py: Use a list instead of seperate variables for
44            extension parameters so we can create a generic function
45            that runs an appropriate *-config script.
46            (run_cs_script): Renamed from run_wx_script and modified
47            to accept a second argument which is a list of lists to
48            be filled in by the values returned from running the command.
49            (thuban_build_ext): New. Extends the build_ext command and
50            provides the options --with-gdal/--without-gdal which then
51            optionally includes the gdalwarp extension.
52    
53            * Thuban/Model/resource.py: First check if we can import
54            the gdalwarp Thuban extension before checking for gdal.
55            Also added some comments.
56            
57            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
58            the map is None which may be the case if none has been loaded
59            yet.
60    
61            * Thuban/UI/main.py (main): Remove call to ShowLegend.
62    
63            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
64    
65            * Thuban/UI/renderer.py: Check for gdal support before importing
66            gdalwarp.
67            (MapRenderer.render_map): Only try to optimize if we have gdal
68            support otherwise nothing will get drawn.
69    
70            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
71            during startup before a map has been created. Check if map is None
72            before using it and do nothing if it is.
73    
74    2003-06-17  Jonathan Coles   <[email protected]>
75    
76            Fix the problem with raster layers under Windows that caused
77            Thuban to crash. The view should respond to layer projection
78            changed events to update the display. Changes to a projection
79            should not cause the map to be set to full extent.
80            
81            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
82            current_map_proj to remember the current map projection so that
83            when the projection changes we know what the previous projection
84            was.
85            (MapCanvas.SetMap): Unsubscribe and subscribe to
86            LAYER_PROJECTION_CHANGED events.
87            (MapCanvas.projection_changed): Split into two methods that respond
88            to map and layer projection changes.
89            (MapCanvas.map_projection_changed): New. Takes the current view and
90            projects it using the new projection. This does not cause the
91            map to be redrawn at full extent.
92            (MapCanvas.layer_projection_changed): New. Cause a redraw which
93            will draw each layer in its new projection.
94            
95            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
96            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
97            under Windows.
98            
99            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
100            to twice sizeof(void*) because there are two digits for each
101            hex byte.
102    
103    2003-06-16  Bernhard Herzog  <[email protected]>
104    
105            Update to the layer interface: Direct access to the table,
106            shapetable, shapefile and filename attributes is now actively
107            deprecated by issuing deprecation warnings for all places where
108            this happens.
109    
110            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
111            to the instance variables table, shapetable, shapefile and
112            filename via __getattr__ so that we can issue a deprecation
113            warning.
114            (Layer.SetShapeStore): Don't set the deprecated instance variables
115            any more
116            (Layer.SetShapeStore): Don't use deprecated layer instance
117            variables
118            (Layer.Destroy): No need to explicitly remove the instance
119            variables any more
120            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
121            instance variables
122    
123            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
124            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
125            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
126            use deprecated layer instance variables
127    
128            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
129            deprecated layer instance variables
130    
131            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
132            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
133            instance variables
134    
135            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
136            deprecated layer instance variables
137    
138            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
139            deprecated layer instance variables
140    
141            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
142            deprecated layer instance variables
143    
144            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
145            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
146            variables
147    
148            * test/runtests.py (main): Turn Thuban's deprecation warnings into
149            errors so that they're cought by the tests
150    
151            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
152            layer instance variables
153    
154    2003-06-16  Jonathan Coles   <[email protected]>
155    
156            Fix a problem under Windows whereby if the user double-clicks on a
157            layer in the legend that tree item will expand or collapse as well
158            as open the layer properties dialog. The state of the tree item
159            should not be affected.
160    
161            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
162            preventExpandCollapse and subscribe to expanding and collapsing
163            events.
164            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
165            collapsing events and will veto the event if it has been triggered
166            by the user double clicking on a layer.
167            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
168            that an expanding/collapsing event should be vetoed.
169    
170    2003-06-13  Bernhard Herzog  <[email protected]>
171    
172            * Thuban/UI/classifier.py (Classifier.OnClose)
173            (Classifier.map_layers_removed)
174            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
175            in OnClose and not in map_layers_removed or
176            layer_shapestore_replaced to make sure it always happens when the
177            dialog is closed
178    
179    2003-06-13  Jonathan Coles   <[email protected]>
180    
181            This puts back a fix for Windows where a panel is needed so that
182            the background of the table view appears correctly.
183    
184            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
185            object that can be used by derived classes to place any
186            controls (including the grid) onto.
187            (QueryTableFrame.__init__): Use the panel as the parent window
188            for all the controls. Reparent the grid so that the panel is
189            the parent. Call UpdateStatusText() to correctly initialize
190            the status bar.
191    
192    2003-06-13  Jonathan Coles   <[email protected]>
193    
194            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
195            from wxFrame (as opposed to wxDialog like the other classes)
196            but otherwise behaves like the other classes. This is needed
197            for the TableView which isn't really a dialog and needs to
198            have a status bar and control buttons.
199    
200            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
201            instance variable to keep track of how many rows are selected.
202            Subscribe once to the the events we are interested in.
203            (ThubanGrid.OnRangeSelect): Only handle event if event handling
204            hasn't been turned off.
205            (ThubanGrid.OnSelectCell): Only handle event if event handling
206            hasn't been turned off.
207            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
208            as an event listener (which changes the event handler stack)
209            simply set an instance variable to False. This is checked in
210            the event handlers.
211            (ThubanGrid.GetNumberSelected): Return the number of currently
212            selected rows.
213            (TableFrame): Inherit from ThubanFrame so we can have a
214            status bar and control buttons.
215            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
216            Explicitly set which items are selected in the operator choice and
217            action choice so there is always a valid selection. Fixes RTbug #1941.
218            Subscribe to grid cell selection events so we can update the
219            status bar.
220            (QueryTableFrame.UpdateStatusText): Update the status bar with
221            how many rows are in the grid, how many columns, and how many
222            rows are selected.
223            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
224            Call UpdateStatusText when cells are (de)selected.
225            (QueryTableFrame.OnQuery): Use the string value in the value
226            combo if either the selected item index is 0 or if the string
227            cannot be found in the predefined list (this happens if the
228            user changes the text). Fixes RTbug #1940.
229            Only turn off the grid event listeners if there a query comes
230            back with a none empty list of ids. in the case that the list
231            is empty this causes a grid.ClearSelection() call to actually
232            clear the grid selection which causes the selected items in
233            the map to be deselected. Fixes RTbug #1939.
234    
235            * test/test_save.py (XMLWriterTest.Encode): Check return values.
236            Fixes RTbug #1851.
237    
238    2003-06-13  Bernhard Herzog  <[email protected]>
239    
240            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
241            self.selected_shape with the current selection to make sure the
242            contents of the dialog are up to date when it's shown for the
243            first time.
244            The dialog used to work without this by luck. The recent fix to
245            the connector module 'broke' a 'feature' the identify view was
246            relying on, i.e that subscribing to a message in response to
247            receiving a message of that type would mean that the new
248            subscriber would also be called for the same message.
249            
250    2003-06-12  Jonathan Coles   <[email protected]>
251    
252            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
253            the image is rendered. Fixes RTbug #1937.
254    
255    2003-06-12  Jonathan Coles   <[email protected]>
256    
257            * Thuban/Lib/fileutil.py: As is done under Windows, create the
258            user directory if it doesn't exist on a posix system.
259            Fixes RTbug #1815.
260    
261            * Thuban/Model/resource.py (get_user_proj_files): Moved the
262            called to get_application_dir here, so that the directory
263            will only be called if this method is invoked.
264    
265            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
266            the projfilepath if no projection is selected.
267    
268    2003-06-12  Jonathan Coles   <[email protected]>
269    
270            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
271            the scalebar if the current map has no projection set.
272    
273            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
274            projfilepath label to just the basename of the projection file
275            rather than include the entire path.
276    
277            * Thuban/Model/resource.py: Fix missed proj functions that
278            needed to be renamed.
279    
280    2003-06-12  Jonathan Coles   <[email protected]>
281    
282            * Thuban/Model/classification.py: Removed assert statements that
283            tested if the variable was an instance of Color.
284    
285            * Thuban/Model/color.py (Color): Remove commented code that isn't
286            used.
287            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
288            Fixes RTbug #1835.
289            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
290            Needed now that the class doesn't inherit from Color.
291    
292    2003-06-12  Jonathan Coles   <[email protected]>
293    
294            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
295            check unicode strings.
296    
297            * test/test_layer.py: Check for existence of gdal.
298    
299    2003-06-12  Jonathan Coles   <[email protected]>
300        
301            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
302            that was in load.py
303    
304            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
305            that was in save.py
306    
307    2003-06-12  Jonathan Coles   <[email protected]>
308    
309            This is largely a collection of bug fixes. We also handle the
310            case where gdal is not on the system. The XMLReader and XMLWriter
311            classes were moved into there own files to resolve some circular
312            import references and because they shouldn't really be in the
313            file that is dediciated to reading/writing session files since
314            they are also used elsewhere.
315    
316            * Thuban/Model/classgen.py: Renamed functions to follow the
317            function_names_with_underscores style. Fixes RTbug #1903.
318            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
319    
320            * Thuban/Model/layer.py: Import gdal only if it available.
321            (RasterLayer): Handle the case where the gdal library is unavailable.
322            Addresses RTbug #1877.
323    
324            * Thuban/Model/load.py (XMLReader): Moved into seperate file
325            xmlreader.py.
326    
327    2003-06-12  Jonathan Coles   <[email protected]>
328    
329            This is largely a collection of bug fixes. We also handle the
330            case where gdal is not on the system. The XMLReader and XMLWriter
331            classes were moved into there own files to resolve some circular
332            import references and because they shouldn't really be in the
333            file that is dediciated to reading/writing session files since
334            they are also used elsewhere.
335    
336            * Thuban/Model/classgen.py: Renamed functions to follow the
337            function_names_with_underscores style. Fixes RTbug #1903.
338            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
339    
340            * Thuban/Model/layer.py: Import gdal only if it available.
341            (RasterLayer): Handle the case where the gdal library is unavailable.
342            Addresses RTbug #1877.
343    
344            * Thuban/Model/load.py (XMLReader): Moved into seperate file
345            xmlreader.py.
346    
347            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
348            file xmlwriter.py.
349    
350            * Thuban/Model/resource.py: Renamed functions to following the
351            function_names_with_underscores style.
352            (has_gdal_support): New function that returns true if the gdal
353            library is available. Addresses RTbug #1877.
354    
355            * Thuban/UI/application.py (ThubanApplication.OpenSession):
356            Display a message box if the gdal library is not available, but
357            only if there are any layers that would use it. Addresses RTbug #1877.
358    
359            * Thuban/UI/classgen.py: Use renamed projection resource functions.
360            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
361            when using integers versus floats.
362    
363            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
364            determine if the "Add Image Layer" menu option should be
365            greyed out or not. Addresses RTbug #1877.
366    
367            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
368    
369            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
370            optimize if a raster layer is visible. Fixes RTbug #1931.
371            Only draw the raster layer if the gdal library is available.
372            Addresses RTbug #1877.
373    
374            * test/test_classgen.py: Add tests for generate_singletons,
375            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
376            (test_calculate_quantiles): Fix some tests to catch the new
377            ValueError that is raised.
378    
379            * test/test_proj.py: Use renamed projection resource functions.
380    
381            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
382            test for saving classified layers. Fixes RTbug #1902.
383            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
384    
385    2003-06-12  Jan-Oliver Wagner <[email protected]>
386    
387            Fix for http://intevation.de/rt/webrt?serial_num=1900.
388    
389            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
390    
391            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
392            multiplechoicedialog.py rather than from the wxPython library.
393    
394    2003-06-11  Frank Koormann  <[email protected]>
395    
396            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
397            update.
398    
399    2003-06-11  Frank Koormann  <[email protected]>
400    
401            * Thuban/Lib/fileutil.py (get_application_dir): New function to
402            determine the absolute .thuban/thuban directory under
403            "posix" (os.expanduser) and "nt" (read AppData registry key).
404    
405            * Thuban/Model/resource.py: Use get_application_dir
406    
407            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
408            Use get_application_dir.
409    
410    2003-06-10  Bernhard Herzog  <[email protected]>
411    
412            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
413            the messages MAP_LAYERS_REMOVED messages
414            (LayerTableFrame.OnClose): Unsubscribe from it.
415            (LayerTableFrame.map_layers_removed): New. Receiver for
416            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
417            dialog is showing is removed.
418    
419    2003-06-10  Bernhard Herzog  <[email protected]>
420    
421            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
422            of the receivers list so that unsubscribing in a receiver doesn't
423            modify it while iterating over it.
424    
425            * test/test_connector.py
426            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
427            unsubscribing in a receiver works correctly. See docstring for
428            details
429    
430    2003-06-10  Bernhard Herzog  <[email protected]>
431    
432            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
433            message.
434    
435            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
436            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
437            LAYER_CHANGED will still be sent if the classification changes.
438    
439            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
440            parameter so we can subscribe to some of its messages
441            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
442            and the layer's LAYER_SHAPESTORE_REPLACED
443            (Classifier.unsubscribe_messages): New. Unsubscribe from message
444            subscribed to in __init__
445            (Classifier.map_layers_removed)
446            (Classifier.layer_shapestore_replaced): receivers for the messages
447            subscribed to in __init__. Unsubscribe and close the dialog
448    
449            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
450            the map to the Classifier dialog
451    
452            * test/test_layer.py (SetShapeStoreTests): Derive from
453            SubscriberMixin as well so we can test messages
454            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
455            messages
456            (SetShapeStoreTests.tearDown): Clear the messages again
457            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
458            for the modified flag too
459            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
460            to check whether SetShapeStore sets the modified flag
461            (SetShapeStoreTests.test_set_shape_store_different_field_name)
462            (SetShapeStoreTests.test_set_shape_store_same_field)
463            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
464            Add tests for the messages. This checks both the new
465            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
466    
467    2003-06-06  Jan-Oliver Wagner <[email protected]>
468    
469            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
470            the menu items.
471    
472    2003-06-05  Frank Koormann  <[email protected]>
473    
474            * Thuban/UI/identifyview.py (IdentifyView.__init__):
475            Layout reimplemented without panel. Make life easier to fit the list
476            in the dialog.
477    
478    2003-06-05  Frank Koormann  <[email protected]>
479    
480            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
481            once on initialisation (Former implementation resulted in multiple
482            entries for each projection).
483            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
484            if set, select the projection found under the specified name. This
485            overwrites any other selection estimate.
486            Removed projchoice filling from this method.
487            (ProjFrame._OnSave, ProjFrame._OnAddToList):
488            Updated call of ProjFrame.__FillAvailList
489            (LCCPanel._DoLayout): Moved parameter controls in more common order.
490    
491            * Resources/Projections/defaults.proj: Extended defaults representing
492            various common European projections.
493    
494    2003-06-05  Frank Koormann  <[email protected]>
495    
496            * Thuban/UI/identifyview.py (IdentifyView.__init__):
497            Use ListCtrl instead of GridCtrl
498    
499            * Thuban/Model/resource.py:
500            Guess location of .thuban directory from tempdir parent directory.
501    
502            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
503            Guess location of .thuban directory from tempdir parent directory.
504    
505  2003-06-04  Bernhard Herzog  <[email protected]>  2003-06-04  Bernhard Herzog  <[email protected]>
506    
507          Do not cache the values returned by the tree widget's          Do not cache the values returned by the tree widget's

Legend:
Removed from v.1130  
changed lines
  Added in v.1242

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26