1 |
|
2005-01-26 Jonathan Coles <[email protected]> |
2 |
|
|
3 |
|
Add a new dialog box for raster layers. The dialog box allows |
4 |
|
the user to toggle a mask that is generated by ProjectRasterFile |
5 |
|
and is used to only draw the real parts of the projected image. |
6 |
|
|
7 |
|
* Thuban/UI/baserenderer.py (BaseRenderer.draw_raster_layer): |
8 |
|
Instruct the warping code to generate a mask if the raster layer |
9 |
|
requests one. |
10 |
|
(BaseRenderer.draw_raster_data): Removed obsolete optional mask argument. |
11 |
|
|
12 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_raster_data): Removed |
13 |
|
obsolete optional mask argument. |
14 |
|
|
15 |
|
* Thuban/UI/classifier.py (Classifier): Change the parent class |
16 |
|
to LayerProperties and rework the code to support layout calls |
17 |
|
from the parent. |
18 |
|
(Classifier.dialog_layout): New. Layout the dialog box. |
19 |
|
(Classifier.map_layers_removed): Removed. Moved to parent class. |
20 |
|
(Classifier.map_replaced): Removed. Moved to parent class. |
21 |
|
(Classifier._OnTry): Renamed to OnTry to support parent class. |
22 |
|
(Classifier.OnClose): Removed. Supplied in parent class. |
23 |
|
(Classifier._OnCloseBtn): Removed. Supplied in parent class as OnCloseBtn. |
24 |
|
(Classifier._OnOK): Renamed to OnOK to support parent class. |
25 |
|
(Classifier._OnRevert): Renamed to OnRevert to support parent class. |
26 |
|
|
27 |
|
* Thuban/UI/layerproperties.py: New. Base class for layer properties |
28 |
|
dialog boxes. |
29 |
|
|
30 |
|
* Thuban/UI/rasterlayerproperties.py: New. Class for displaying |
31 |
|
raster layer properties. |
32 |
|
|
33 |
|
* libraries/thuban/gdalwarp.cpp: Replace the old gdalwarp.cpp code |
34 |
|
with the non-simple version supplied with gdal. This allows added |
35 |
|
features such as creating an alpha band. |
36 |
|
(GetImageData): Generate a mask array from the alpha band that is |
37 |
|
generated by gdal if the user has selected it. Try to support images |
38 |
|
that have more than three bands, such as images with RGB plus an |
39 |
|
alpha band. |
40 |
|
(ProjectRasterFile): Convert python argument for mask and tell |
41 |
|
gdal to enable or disable an alpha band. |
42 |
|
|
43 |
|
* Thuban/Model/layer.py (BaseLayer.Type): New. Returns a string |
44 |
|
describing what kind of layer the class is. Defaults to "Unknown", |
45 |
|
but should be overridden by subclasses. |
46 |
|
(Layer.Type): New. Override base class method. |
47 |
|
(RasterLayer.__init__): Create a flag for using a mask. Record extra |
48 |
|
data from gdal for display in the properties dialog. |
49 |
|
(RasterLayer.Type): New. Override base class method. |
50 |
|
(RasterLayer.UseMask): New. Returns True if the mask should be used. |
51 |
|
(RasterLayer.SetUseMask): New. Set if the mask should be used. |
52 |
|
(RasterLayer.ImageInfo): New. Return extra information about the image. |
53 |
|
|
54 |
|
* Thuban/Model/load.py (SessionLoader.start_rasterlayer): Load |
55 |
|
the mask information. |
56 |
|
|
57 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save mask information. |
58 |
|
|
59 |
|
* Thuban/UI/mainwindow.py: Register the RasterLayerProperties and |
60 |
|
Classifier classes as dialogs to use with the proper layer types. |
61 |
|
|
62 |
|
* test/test_baserenderer.py (TestBaseRenderer.test_raster_no_projection): |
63 |
|
Fix test. |
64 |
|
|
65 |
|
* test/test_layer.py (TestLayer.test_raster_layer): Test new methods. |
66 |
|
(TestLayerModification.build_path): New. Support function. |
67 |
|
(TestLayerModification.test_raster_layer): New. Test new methods. |
68 |
|
|
69 |
|
* test/test_save.py (SaveSessionTest.testRasterLayer): Add tests for mask. |
70 |
|
|
71 |
|
* test/test_load.py (TestRasterLayer): Add tests for mask. |
72 |
|
|
73 |
|
* test/test_load_1_0_1.py: New. Copied from test_load.py. |
74 |
|
|
75 |
|
* test/test_baserenderer.py (SimpleRenderer.draw_raster_data): Removed |
76 |
|
obsolete optional mask argument. |
77 |
|
|
78 |
2005-01-26 Nina H�ffmeyer <[email protected]> |
2005-01-26 Nina H�ffmeyer <[email protected]> |
79 |
|
|
80 |
* Extensions/ogr/ogrshapes.py: Added two dictionaries to ShapeStore |
* Extensions/ogr/ogrshapes.py: Added two dictionaries to ShapeStore |