/[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 2542 by jan, Fri Jan 21 14:25:25 2005 UTC revision 2587 by jonathan, Wed Mar 23 15:30:27 2005 UTC
# Line 1  Line 1 
1    2005-03-23  Jonathan Coles <[email protected]>
2    
3            These changes add support for adjusting the opacity of a raster layer.
4    
5            * Thuban/Model/layer.py (RasterLayer.Opacity): Replaces AlphaOpacity.
6            (RasterLayer.SetOpacity): Replaces SetAlphaOpacity. Also triggers
7            a LAYER_CHANGED event if the opacity actually changes.
8    
9            * Thuban/UI/baserenderer.py (BaseRenderer.draw_raster_data): Added
10            layer parameter needed in the implementation of this method in
11            renderer.py.
12    
13            * Thuban/UI/layerproperties.py (LayerProperties.dialog_layout): Fixed
14            typo 00 -> 0.
15    
16            * Thuban/UI/rasterlayerproperties.py (RasterLayerProperties): Added
17            control to adjust opacity.
18    
19            * Thuban/UI/renderer.py (MapRenderer.draw_raster_data): Scale the
20            alpha data based on the opacity level of the layer.
21    
22            * test/test_baserenderer.py (SimpleRenderer.draw_raster_data): Now
23            accepts a layer parameter.
24    
25            * test/test_layer.py (TestLayerModification.test_raster_layer):
26            Rename opacity method calls and add test for LAYER_CHANGED.
27    
28    2005-03-16  Bernhard Herzog  <[email protected]>
29    
30            * test/test_connector.py (DeletionTestMixin.check_deletions)
31            (DeletionTestMixin.check_deletetions): renamed to check_deletions.
32            update the callers.
33    
34    2005-03-14  Jan-Oliver Wagner <[email protected]>
35    
36            * Doc/manual/thuban-manual-de.xml: More translations.
37    
38    2005-03-10  Jan-Oliver Wagner <[email protected]>
39    
40            Introducing initialization callbacks for extensions.
41    
42            * Thuban/UI/extensionregistry.py (ExtensionDesc.__init__): Added
43            optional parameter init_callback.
44            (ExtensionDesc.init_ext): New. Executes the callback and sets
45            a status.
46    
47            * Thuban/UI/application.py (ThubanApplication.OnInit): Add the
48            initialization of the extensions.
49            (ThubanApplication.init_extensions): Init all extensions.
50    
51            * Thuban/UI/about.py (About.__init__): Added status of the extensions
52            to the about text.
53    
54            * Extensions/gns2shp/__init__.py: Added init method for Extension
55            description.
56            (init): New. Contains the initialization of the module.
57    
58    2005-03-04  Nina H�ffmeyer <[email protected]>
59    
60            * Extensions/ogr/ogrdialog.py: Added a dialog, which asks for
61            OGRConnection to open a datasource. Removed dialog to display all
62            available drivers. Added some doc strings.
63    
64            * Extensions/ogr/ogrstart.py: Added menu entry for opening an
65            OGRDatasource with a string. Added two opening methods which return an
66            OGRDatasource (either data from file or from DB).
67    
68            * Extensions/ogr/ogrshapes.py: Added class OGRGeometry, which
69            represents a geometry reference of an OGRFeature. OGRShape now has a
70            list of referenced geometry objects (important for geometry
71            collections).
72            For OGRShapeStores loaded from a DB an ID column can be specified now.
73    
74    2005-02-22  Jan-Oliver Wagner <[email protected]>
75    
76            * test/test_map.py (TestMapWithContents.test_tree_info):
77            Added label layer for comparison.
78    
79    2005-02-18  Jonathan Coles <[email protected]>
80    
81            * libraries/thuban/gdalwarp.cpp (GetImageData): Optimize the loop
82            which builds a mask. Handle the majority of an image in a loop,
83            creating 8 bits at a time. Later, handle the edge case where less
84            than 8 bits are packed.
85    
86    2005-02-18  Bernhard Herzog  <[email protected]>
87    
88            * test/test_baserenderer.py (TestBaseRenderer.setUp): Fix
89            doc-string
90    
91    2005-02-18  Jonathan Coles <[email protected]>
92    
93            * setup.py: Remove wx_cs_params from gdal compile options.
94    
95    2005-02-18  Jonathan Coles <[email protected]>
96    
97            Refactored baserenderer.py and renderer.py to remove baserenderer.py's
98            dependencies on wxPython. Added a new method projected_raster_layer()
99            that returns a raster layer image in projected space. This must be
100            implemented in classes derived from BaseRenderer. This also eliminates
101            the dependency on gdal in baserenderer.py.
102    
103            * Thuban/UI/baserenderer.py (BaseRenderer.draw_raster_layer): Call
104            new projected_raster_layer() to get projected raster image instead
105            of directly calling ProjectRasterFile().
106            (BaseRenderer.projected_raster_layer): New. This must be implemented
107            by derived classes. It takes almost the same arguments as ProjectRasterFile
108            did and returns a projected image with mask and alpha data (if requested).
109            (BaseRenderer.render_map_incrementally): Remove the check for gdal since
110            that check will be done in MapRenderer.projected_raster_layer(). This
111            also allows other implementations to use different projection code.
112    
113            * Thuban/UI/renderer.py (MapRenderer.projected_raster_layer):
114            Implementation of BaseRenderer.projected_raster_layer. Checks for
115            gdal support and wxPython version. Also handles exceptions from
116            ProjectRasterFile.
117    
118            * libraries/thuban/gdalwarp.cpp: Removed checks for wxPython versions
119            and added a variable which can be set through the options argument
120            of ProjectRasterFile.
121    
122            * test/test_baserenderer.py (SimpleRenderer.projected_raster_layer): New.
123            Calls ProjectRasterFile and returns the result.
124            (TestBaseRenderer.test_projected_raster_layer): New. Tests the results
125            of calling projected_raster_layer() with different options.
126            (TestBaseRenderer.test_raster_no_projection): Removed tests based on
127            wxPython version and all tests of masks and alpha channels. These are
128            now in test_projected_raster_layer().
129    
130    2005-02-17  Jan-Oliver Wagner <[email protected]>
131    
132            * Thuban/Model/map.py, Thuban/Model/label.py: Fixed
133            doc-strings to comply with coding_guidelines.
134    
135    2005-02-17  Jan-Oliver Wagner <[email protected]>
136    
137            Docstring improvements and minor fixes for labellayer.
138    
139            * Thuban/Model/map.py:
140            (Map, Map.Destroy, Map.RemoveLayer, Map.ClearLayers,
141            Map.Layers, Map.HasLayers, Map.MoveLayerToTop,
142            Map.RaiseLayer, Map.LowerLayer, Map.MoveLayerToBottom,
143            Map.ProjectedBoundingBox, Map.GetProjection): Improved/added
144            doc string.
145            (Map.BoundingBox): Removed superfluous test for label_layer
146            and improved doc string.
147            (Map.TreeInfo): Added label_layer and improved sdo string.
148    
149            * Thuban/Model/label.py: Added import of _.
150            (Label, Label.__init__): Improved/added doc string.
151            (LabelLayer, LabelLayer.__init__, LabelLayer.Labels,
152            LabelLayer.RemoveLabel, LabelLayer.ClearLabels):
153            Improved/added doc string.
154            (LabelLayer.AddLabel): Use already defined names for
155            align strings and improved doc string.
156            (LabelLayer.TreeInfo): New. Return the object data for
157            the tree view.
158    
159    2005-02-16  Jonathan Coles <[email protected]>
160    
161            Further wxPython 2.5 changes using patches from Daniel Calvelo Aros
162            so that that wxproj doesn't crash. Added GUI support for selecting
163            alpha channel (opacity can't be selected yet).
164    
165            NOTE: If wxPython.h is including in future distribution packages
166            then it will not be necessary to have the files swigPtrConvertHack.h
167            and wxPython_int.h included with Thuban. This is hopefully
168            a temporary workaround.
169    
170            * setup.py (thuban_build_ext.finalize_options): gdalwarp needs
171            access to the macro wxCHECK_VERSION so that it will properly
172            generate a bit mask. There was a problem between wx2.4 and wx2.5
173            that this works around.
174    
175            * Thuban/Model/layer.py (RasterLayer.UseMask): Removed in favor
176            of RasterLayer.MaskType.
177            (RasterLayer.SetUseMask): Removed in favor of RasterLayer.SetMaskType
178            (RasterLayer.MaskType): New. Returns the type of mask to use. Can
179            specify none, a bitmap, or an alpha channel.
180            (RasterLayer.SetMaskType): New. Set what kind of mask to use.
181    
182            * Thuban/UI/baserenderer.py (BaseRenderer.draw_raster_layer):
183            Set the raster warping options for the mask based on the value
184            of RasterLayer.MaskType.
185    
186            * Thuban/UI/legend.py (LegendTree.__FillTreeLayer): Remove
187            deprecated calls to SetItemSelectedImage in favor of SetItemImage
188            with wxTreeItemIcon_Selected.
189    
190            * Thuban/UI/rasterlayerproperties.py: Support selecting to use
191            an alpha channel for the mask.
192    
193            * Thuban/UI/renderer.py (MapRenderer.draw_raster_data): Use alpha
194            data if it is available and an alpha channel is supported under
195            the current version of wxPython.
196    
197            * libraries/thuban/gdalwarp.cpp (GetImageData): Added compiler define
198            to select whether 1's or 0's select the desired portion of an image
199            in the bit mask. wx2.4 has a bug where the documentation is the opposite
200            from behavior.
201            (ProjectRasterFile): Only generate an alpha channel if the version
202            of wxPython is >= 2.5.3.
203    
204            * libraries/thuban/wxproj.cpp: Applied patches from Daniel Calvelo Aros.
205            When wxPython >= 2.5.3 use the special swig functions to decode an
206            object's address.
207    
208            * libraries/thuban/swigPtrConvertHack.h: Includes conditional code
209            based on the version of wxPython. If >= 2.5.3 use the special swig
210            functions from wxPython to decode wxPython objects, otherwise use
211            the old method of retrieving the address from the object __repr__ string.
212    
213            * libraries/thuban/wxPython_int.h: Copied from wxPython source.
214            Unnecessary code was removed to make it smaller.
215    
216            * test/test_baserenderer.py (TestBaseRenderer.test_raster_no_projection):
217            Add tests for returning an alpha channel.
218    
219            * test/test_layer.py (TestLayerModification.test_raster_layer): Fix
220            tests that used removed functions UseMask and SetUseMask
221    
222    
223    2005-02-08  Bernhard Herzog  <[email protected]>
224    
225            More wxPython 2.5 changes.  This time taken from a patch from
226            Daniel Calvelo Aros.
227    
228            * Thuban/UI/tableview.py (QueryTableFrame.__init__)
229            (QueryTableFrame.__init__): Pass the size of a spacer as a single
230            item.
231    
232            * Thuban/UI/projdialog.py (ProjFrame.build_dialog)
233            (ProjFrame.build_dialog): Pass the size of a spacer as a single
234            item.
235    
236            * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Pass the
237            size of a spacer as a single item.
238    
239            * Thuban/UI/classifier.py (Classifier.dialog_layout): Pass the
240            size of a spacer as a single item.
241    
242    2005-02-08  Bernhard Herzog  <[email protected]>
243    
244            Compatibility with wxPython 2.5.  The changes should make it work
245            better with 2.5 while still keeping compatibility with 2.4.  There
246            are still problems with 2.5, though.
247    
248            * Thuban/UI/dock.py (DockableWindow.__CreateBorder): Pass the size
249            of a spacer as a single item.
250    
251            * Thuban/UI/classifier.py (ClassGroupPropertiesCtrl): Derive only
252            from wxControl
253    
254            * Thuban/UI/legend.py (LegendTree): When running with wxPython <
255            2.5, add an implementation of the GetFirstChild method that does
256            not require the second parameter.
257            (LegendTree.find_layer, LegendTree._OnMsgMapLayersAdded)
258            (LegendTree._OnMsgMapLayersRemoved, LegendTree.DeleteAllItems)
259            (LegendTree.DeleteChildren, LegendTree.__ShowHideLayer): Do not
260            pass the second parameter to GetFirstChild
261    
262    2005-02-08  Nina H�ffmeyer <[email protected]>
263    
264            * Extensions/ogr/ogrshapes.py: Removed some print commands.
265    
266            * Extensions/ogr/ogrstart.py: Changed the GUI. OGR is no longer an
267            additional menu but appears as a possibility in the menu Map.
268    
269    2005-02-07  Jonathan Coles <[email protected]>
270            * libraries/thuban/gdalwarp.cpp: Removed the macros PYTHON_ERR
271            and PYTHON_ERRF since they were no longer necessary.
272    
273    2005-02-07  Bernhard Reiter <[email protected]>
274            * Thuban/UI/classifier.py (ClassGrid.DeleteSelectedRows):
275            Enable translation for message string.
276    
277    2005-02-06  Martin Schulze  <[email protected]>
278    
279            * Extensions/wms/infodialog.py (wmsInfoDialog.__init__): Adjusted
280            the arguments of the contstructor to fit the global scheme
281    
282    2005-01-31  Nina H�ffmeyer <[email protected]>
283    
284            * Extensions/ogr/ogrdialog.py: Added class ogrdialog.py, which provides
285            some dialogs needed to start ogr.
286            
287            * Extensions/ogr/__init__.py: Changed comments to avoid encoding
288            warnings.
289    
290            * Extensions/ogr/test/test_OGRShapestore.py: Changed comments to avoid
291            encoding warnings.
292    
293    2005-01-28  Jonathan Coles <[email protected]>
294    
295            * libraries/thuban/gdalwarp.cpp (GetImageData): Recode how the
296            mask is packed into a bit array. It's now slightly faster.
297    
298    2005-01-28  Jonathan Coles <[email protected]>
299    
300            * Thuban/Model/layer.py (RasterLayer.__init__): Make use_mask
301            default to true.
302    
303            * Thuban/Model/load.py (SessionLoader.start_rasterlayer): Remove
304            code that loads the state of the layer's use_mask flag. Its
305            usefulness is still being debated.
306    
307            * Thuban/Model/save.py (SessionSaver.write_layer): Remove
308            code that saves the state of the layer's use_mask flag. Its
309            usefulness is still being debated.
310    
311            * Thuban/UI/baserenderer.py (BaseRenderer.draw_raster_layer): Pass
312            options to ProjectRasterFile based on the state of layer.UseMask().
313            Catch more exceptions from ProjectRasterFile so that Thuban doesn't
314            quit is there is a problem projecting.
315            (BaseRenderer.draw_raster_data): Change the documentation to
316            describe the new format (XBM) that the mask data will be in.
317    
318            * Thuban/UI/renderer.py (MapRenderer.draw_raster_data): The mask
319            data is in XBM format when format='RAW' which means it doesn't
320            need to be converted to a wxImage before being used as a mask
321            for a wxBitmap. Assume that if format != 'RAW' that the image
322            data and mask data are in the same format.
323    
324            * libraries/thuban/gdalwarp.cpp (GetImageData): If alpha is enabled
325            and a mask is requested, convert the alpha band to a bit array in
326            XBM format. if an alpha channel is requested, simply return the
327            data in the alpha band. Provide better error handling by returning
328            python error messages (also fixes RT #2947).
329            (ProjectRasterFile): Support multiple mask options, rather than simply
330            a flag indicating that a mask should or should not be used. Provide
331            better error handling by returning python error messages.
332    
333            * test/test_baserenderer.py (TestBaseRenderer.test_raster_no_projection):
334            Add mask data to test.
335    
336            * test/test_layer.py (TestLayer.test_raster_layer): Test that a layer
337            should use the mask by default.
338            (TestLayerModificaton.test_raster_layer): Test that a layer should use
339            the mask by default.
340    
341            * test/test_load.py (TestRasterLayer.test): Remove testing for
342            use_mask flag in file.
343    
344            * test/test_save.py (SaveSessionTest.testRasterLayer): Remove testing
345            for use_mask in file.
346    
347            * test/test_load_1_0_1.py: Removed. Shouldn't have been checked in.
348            
349    2005-01-26  Jonathan Coles <[email protected]>
350    
351            Add a new dialog box for raster layers. The dialog box allows
352            the user to toggle a mask that is generated by ProjectRasterFile
353            and is used to only draw the real parts of the projected image.
354    
355            * Thuban/UI/baserenderer.py (BaseRenderer.draw_raster_layer):
356            Instruct the warping code to generate a mask if the raster layer
357            requests one.
358            (BaseRenderer.draw_raster_data): Removed obsolete optional mask argument.
359    
360            * Thuban/UI/renderer.py (MapRenderer.draw_raster_data): Removed
361            obsolete optional mask argument.
362    
363            * Thuban/UI/classifier.py (Classifier): Change the parent class
364            to LayerProperties and rework the code to support layout calls
365            from the parent.
366            (Classifier.dialog_layout): New. Layout the dialog box.
367            (Classifier.map_layers_removed): Removed. Moved to parent class.
368            (Classifier.map_replaced): Removed. Moved to parent class.
369            (Classifier._OnTry): Renamed to OnTry to support parent class.
370            (Classifier.OnClose): Removed. Supplied in parent class.
371            (Classifier._OnCloseBtn): Removed. Supplied in parent class as OnCloseBtn.
372            (Classifier._OnOK): Renamed to OnOK to support parent class.
373            (Classifier._OnRevert): Renamed to OnRevert to support parent class.
374    
375            * Thuban/UI/layerproperties.py: New. Base class for layer properties
376            dialog boxes.
377    
378            * Thuban/UI/rasterlayerproperties.py: New. Class for displaying
379            raster layer properties.
380    
381            * libraries/thuban/gdalwarp.cpp: Replace the old gdalwarp.cpp code
382            with the non-simple version supplied with gdal. This allows added
383            features such as creating an alpha band.
384            (GetImageData): Generate a mask array from the alpha band that is
385            generated by gdal if the user has selected it. Try to support images
386            that have more than three bands, such as images with RGB plus an
387            alpha band.
388            (ProjectRasterFile): Convert python argument for mask and tell
389            gdal to enable or disable an alpha band.
390    
391            * Thuban/Model/layer.py (BaseLayer.Type): New. Returns a string
392            describing what kind of layer the class is. Defaults to "Unknown",
393            but should be overridden by subclasses.
394            (Layer.Type): New. Override base class method.
395            (RasterLayer.__init__): Create a flag for using a mask. Record extra
396            data from gdal for display in the properties dialog.
397            (RasterLayer.Type): New. Override base class method.
398            (RasterLayer.UseMask): New. Returns True if the mask should be used.
399            (RasterLayer.SetUseMask): New. Set if the mask should be used.
400            (RasterLayer.ImageInfo): New. Return extra information about the image.
401    
402            * Thuban/Model/load.py (SessionLoader.start_rasterlayer): Load
403            the mask information.
404    
405            * Thuban/Model/save.py (SessionSaver.write_layer): Save mask information.
406    
407            * Thuban/UI/mainwindow.py: Register the RasterLayerProperties and
408            Classifier classes as dialogs to use with the proper layer types.
409    
410            * test/test_baserenderer.py (TestBaseRenderer.test_raster_no_projection):
411            Fix test.
412    
413            * test/test_layer.py (TestLayer.test_raster_layer): Test new methods.
414            (TestLayerModification.build_path): New. Support function.
415            (TestLayerModification.test_raster_layer): New. Test new methods.
416    
417            * test/test_save.py (SaveSessionTest.testRasterLayer): Add tests for mask.
418    
419            * test/test_load.py (TestRasterLayer): Add tests for mask.
420    
421            * test/test_load_1_0_1.py: New. Copied from test_load.py.
422    
423            * test/test_baserenderer.py (SimpleRenderer.draw_raster_data): Removed
424            obsolete optional mask argument.
425    
426    2005-01-26  Nina H�ffmeyer <[email protected]>
427    
428            * Extensions/ogr/ogrshapes.py: Added two dictionaries to ShapeStore
429            which maps the ids and the ordinals. Fixed RowIdToOrdinal(),
430            RowOrdinalToId() and ReadRowAsDict().
431    
432            * Extensions/ogr/ogrstart.py: Added menu item which opens database
433            layers for existing database connections.
434    
435            * Extensions/ogr/test/test_OGRShapestore.py: Fixed a message string.
436    
437    
438    2005-01-26  Jan-Oliver Wagner <[email protected]>
439    
440            * Doc/manual/thuban-manual-de.xml: More translations.
441    
442    2005-01-24  Bernhard Herzog  <[email protected]>
443    
444            Rework the status bar updates a bit to make sure the message about
445            the projections is produced at the right times.
446    
447            * Thuban/UI/mainwindow.py (MainWindow.update_status_bar_messages):
448            New class variable with messages that may require a status bar
449            update.
450            (MainWindow.view_position_changed)
451            (MainWindow.update_status_bar): Rename from view_position_changed
452            to update_status_bar.  It's meaning has changed now that it may
453            also generate messages about problems with projection settings.
454            (MainWindow.__init__): Use the new update_status_bar_messages
455            class variable to subscribe update_status_bar
456            (MainWindow.set_position_text): Update doc-string.  This method
457            has to be renamed at some point.  See doc-string and comments.
458            (MainWindow.OnClose): Unsubscribe update_status_bar from all
459            messages in update_status_bar_messages
460    
461            * Thuban/UI/viewport.py (ViewPort.forwarded_map_messages): New
462            class attribute.  map messages to be forwarded by the viewport.
463            (ViewPort._subscribe_map, ViewPort._unsubscribe_map): (un)subscribe
464            the messages in forwarded_map_messages
465    
466    2005-01-21  Bernhard Herzog  <[email protected]>
467    
468            * test/postgissupport.py (PostGISDatabase.__init__): Tweak
469            doc-string
470            (find_postgis_sql): Update for postgis-1.0.0-rc1, which uses a
471            different name for the initialization SQL file.
472    
473  2005-01-21  Jonathan Coles <[email protected]>  2005-01-21  Jonathan Coles <[email protected]>
474    
475          * Thuban/UI/baserenderer.py (proj_params_to_str): New. Takes          * Thuban/UI/baserenderer.py (proj_params_to_str): New. Takes

Legend:
Removed from v.2542  
changed lines
  Added in v.2587

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26