1 |
|
2005-01-28 Jonathan Coles <[email protected]> |
2 |
|
|
3 |
|
* libraries/thuban/gdalwarp.cpp (GetImageData): Recode how the |
4 |
|
mask is packed into a bit array. It's now slightly faster. |
5 |
|
|
6 |
|
2005-01-28 Jonathan Coles <[email protected]> |
7 |
|
|
8 |
|
* Thuban/Model/layer.py (RasterLayer.__init__): Make use_mask |
9 |
|
default to true. |
10 |
|
|
11 |
|
* Thuban/Model/load.py (SessionLoader.start_rasterlayer): Remove |
12 |
|
code that loads the state of the layer's use_mask flag. Its |
13 |
|
usefulness is still being debated. |
14 |
|
|
15 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Remove |
16 |
|
code that saves the state of the layer's use_mask flag. Its |
17 |
|
usefulness is still being debated. |
18 |
|
|
19 |
|
* Thuban/UI/baserenderer.py (BaseRenderer.draw_raster_layer): Pass |
20 |
|
options to ProjectRasterFile based on the state of layer.UseMask(). |
21 |
|
Catch more exceptions from ProjectRasterFile so that Thuban doesn't |
22 |
|
quit is there is a problem projecting. |
23 |
|
(BaseRenderer.draw_raster_data): Change the documentation to |
24 |
|
describe the new format (XBM) that the mask data will be in. |
25 |
|
|
26 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_raster_data): The mask |
27 |
|
data is in XBM format when format='RAW' which means it doesn't |
28 |
|
need to be converted to a wxImage before being used as a mask |
29 |
|
for a wxBitmap. Assume that if format != 'RAW' that the image |
30 |
|
data and mask data are in the same format. |
31 |
|
|
32 |
|
* libraries/thuban/gdalwarp.cpp (GetImageData): If alpha is enabled |
33 |
|
and a mask is requested, convert the alpha band to a bit array in |
34 |
|
XBM format. if an alpha channel is requested, simply return the |
35 |
|
data in the alpha band. Provide better error handling by returning |
36 |
|
python error messages (also fixes RT #2947). |
37 |
|
(ProjectRasterFile): Support multiple mask options, rather than simply |
38 |
|
a flag indicating that a mask should or should not be used. Provide |
39 |
|
better error handling by returning python error messages. |
40 |
|
|
41 |
|
* test/test_baserenderer.py (TestBaseRenderer.test_raster_no_projection): |
42 |
|
Add mask data to test. |
43 |
|
|
44 |
|
* test/test_layer.py (TestLayer.test_raster_layer): Test that a layer |
45 |
|
should use the mask by default. |
46 |
|
(TestLayerModificaton.test_raster_layer): Test that a layer should use |
47 |
|
the mask by default. |
48 |
|
|
49 |
|
* test/test_load.py (TestRasterLayer.test): Remove testing for |
50 |
|
use_mask flag in file. |
51 |
|
|
52 |
|
* test/test_save.py (SaveSessionTest.testRasterLayer): Remove testing |
53 |
|
for use_mask in file. |
54 |
|
|
55 |
|
* test/test_load_1_0_1.py: Removed. Shouldn't have been checked in. |
56 |
|
|
57 |
|
2005-01-26 Jonathan Coles <[email protected]> |
58 |
|
|
59 |
|
Add a new dialog box for raster layers. The dialog box allows |
60 |
|
the user to toggle a mask that is generated by ProjectRasterFile |
61 |
|
and is used to only draw the real parts of the projected image. |
62 |
|
|
63 |
|
* Thuban/UI/baserenderer.py (BaseRenderer.draw_raster_layer): |
64 |
|
Instruct the warping code to generate a mask if the raster layer |
65 |
|
requests one. |
66 |
|
(BaseRenderer.draw_raster_data): Removed obsolete optional mask argument. |
67 |
|
|
68 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_raster_data): Removed |
69 |
|
obsolete optional mask argument. |
70 |
|
|
71 |
|
* Thuban/UI/classifier.py (Classifier): Change the parent class |
72 |
|
to LayerProperties and rework the code to support layout calls |
73 |
|
from the parent. |
74 |
|
(Classifier.dialog_layout): New. Layout the dialog box. |
75 |
|
(Classifier.map_layers_removed): Removed. Moved to parent class. |
76 |
|
(Classifier.map_replaced): Removed. Moved to parent class. |
77 |
|
(Classifier._OnTry): Renamed to OnTry to support parent class. |
78 |
|
(Classifier.OnClose): Removed. Supplied in parent class. |
79 |
|
(Classifier._OnCloseBtn): Removed. Supplied in parent class as OnCloseBtn. |
80 |
|
(Classifier._OnOK): Renamed to OnOK to support parent class. |
81 |
|
(Classifier._OnRevert): Renamed to OnRevert to support parent class. |
82 |
|
|
83 |
|
* Thuban/UI/layerproperties.py: New. Base class for layer properties |
84 |
|
dialog boxes. |
85 |
|
|
86 |
|
* Thuban/UI/rasterlayerproperties.py: New. Class for displaying |
87 |
|
raster layer properties. |
88 |
|
|
89 |
|
* libraries/thuban/gdalwarp.cpp: Replace the old gdalwarp.cpp code |
90 |
|
with the non-simple version supplied with gdal. This allows added |
91 |
|
features such as creating an alpha band. |
92 |
|
(GetImageData): Generate a mask array from the alpha band that is |
93 |
|
generated by gdal if the user has selected it. Try to support images |
94 |
|
that have more than three bands, such as images with RGB plus an |
95 |
|
alpha band. |
96 |
|
(ProjectRasterFile): Convert python argument for mask and tell |
97 |
|
gdal to enable or disable an alpha band. |
98 |
|
|
99 |
|
* Thuban/Model/layer.py (BaseLayer.Type): New. Returns a string |
100 |
|
describing what kind of layer the class is. Defaults to "Unknown", |
101 |
|
but should be overridden by subclasses. |
102 |
|
(Layer.Type): New. Override base class method. |
103 |
|
(RasterLayer.__init__): Create a flag for using a mask. Record extra |
104 |
|
data from gdal for display in the properties dialog. |
105 |
|
(RasterLayer.Type): New. Override base class method. |
106 |
|
(RasterLayer.UseMask): New. Returns True if the mask should be used. |
107 |
|
(RasterLayer.SetUseMask): New. Set if the mask should be used. |
108 |
|
(RasterLayer.ImageInfo): New. Return extra information about the image. |
109 |
|
|
110 |
|
* Thuban/Model/load.py (SessionLoader.start_rasterlayer): Load |
111 |
|
the mask information. |
112 |
|
|
113 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save mask information. |
114 |
|
|
115 |
|
* Thuban/UI/mainwindow.py: Register the RasterLayerProperties and |
116 |
|
Classifier classes as dialogs to use with the proper layer types. |
117 |
|
|
118 |
|
* test/test_baserenderer.py (TestBaseRenderer.test_raster_no_projection): |
119 |
|
Fix test. |
120 |
|
|
121 |
|
* test/test_layer.py (TestLayer.test_raster_layer): Test new methods. |
122 |
|
(TestLayerModification.build_path): New. Support function. |
123 |
|
(TestLayerModification.test_raster_layer): New. Test new methods. |
124 |
|
|
125 |
|
* test/test_save.py (SaveSessionTest.testRasterLayer): Add tests for mask. |
126 |
|
|
127 |
|
* test/test_load.py (TestRasterLayer): Add tests for mask. |
128 |
|
|
129 |
|
* test/test_load_1_0_1.py: New. Copied from test_load.py. |
130 |
|
|
131 |
|
* test/test_baserenderer.py (SimpleRenderer.draw_raster_data): Removed |
132 |
|
obsolete optional mask argument. |
133 |
|
|
134 |
|
2005-01-26 Nina H�ffmeyer <[email protected]> |
135 |
|
|
136 |
|
* Extensions/ogr/ogrshapes.py: Added two dictionaries to ShapeStore |
137 |
|
which maps the ids and the ordinals. Fixed RowIdToOrdinal(), |
138 |
|
RowOrdinalToId() and ReadRowAsDict(). |
139 |
|
|
140 |
|
* Extensions/ogr/ogrstart.py: Added menu item which opens database |
141 |
|
layers for existing database connections. |
142 |
|
|
143 |
|
* Extensions/ogr/test/test_OGRShapestore.py: Fixed a message string. |
144 |
|
|
145 |
|
|
146 |
|
2005-01-26 Jan-Oliver Wagner <[email protected]> |
147 |
|
|
148 |
|
* Doc/manual/thuban-manual-de.xml: More translations. |
149 |
|
|
150 |
|
2005-01-24 Bernhard Herzog <[email protected]> |
151 |
|
|
152 |
|
Rework the status bar updates a bit to make sure the message about |
153 |
|
the projections is produced at the right times. |
154 |
|
|
155 |
|
* Thuban/UI/mainwindow.py (MainWindow.update_status_bar_messages): |
156 |
|
New class variable with messages that may require a status bar |
157 |
|
update. |
158 |
|
(MainWindow.view_position_changed) |
159 |
|
(MainWindow.update_status_bar): Rename from view_position_changed |
160 |
|
to update_status_bar. It's meaning has changed now that it may |
161 |
|
also generate messages about problems with projection settings. |
162 |
|
(MainWindow.__init__): Use the new update_status_bar_messages |
163 |
|
class variable to subscribe update_status_bar |
164 |
|
(MainWindow.set_position_text): Update doc-string. This method |
165 |
|
has to be renamed at some point. See doc-string and comments. |
166 |
|
(MainWindow.OnClose): Unsubscribe update_status_bar from all |
167 |
|
messages in update_status_bar_messages |
168 |
|
|
169 |
|
* Thuban/UI/viewport.py (ViewPort.forwarded_map_messages): New |
170 |
|
class attribute. map messages to be forwarded by the viewport. |
171 |
|
(ViewPort._subscribe_map, ViewPort._unsubscribe_map): (un)subscribe |
172 |
|
the messages in forwarded_map_messages |
173 |
|
|
174 |
|
2005-01-21 Bernhard Herzog <[email protected]> |
175 |
|
|
176 |
|
* test/postgissupport.py (PostGISDatabase.__init__): Tweak |
177 |
|
doc-string |
178 |
|
(find_postgis_sql): Update for postgis-1.0.0-rc1, which uses a |
179 |
|
different name for the initialization SQL file. |
180 |
|
|
181 |
|
2005-01-21 Jonathan Coles <[email protected]> |
182 |
|
|
183 |
|
* Thuban/UI/baserenderer.py (proj_params_to_str): New. Takes |
184 |
|
a projection and returns a formatted string representing the |
185 |
|
parameters to feed to gdalwarp. This function eliminates |
186 |
|
redundancy in draw_raster_layer(). |
187 |
|
(BaseRenderer.render_map_incrementally): Removed the optimization which |
188 |
|
drew the top most raster layer first and then only those vector- |
189 |
|
based layers that are above it. With the support for transparency |
190 |
|
this optimization breaks correct behaviour. |
191 |
|
(BaseRenderer.draw_raster_layer): Reorganize code to support possible |
192 |
|
future enhancements to raster layer bounding box. The old behaviour has |
193 |
|
not changed. Also, change calling parameters to draw_raster_data() |
194 |
|
to specify new RAW data format and mask. |
195 |
|
(BaseRenderer.draw_raster_data): Change signature to include an optional |
196 |
|
parameter for mask information. Change documentation to mention |
197 |
|
support for new parameter and added option for RAW data format. |
198 |
|
The data argument is now a list of [width, height, data]. |
199 |
|
|
200 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_raster_data): Add new optional |
201 |
|
mask parameter. Add new condition for RAW format, which |
202 |
|
significantly reduces rendering time. Add condition for |
203 |
|
mask parameter. |
204 |
|
|
205 |
|
* libraries/thuban/gdalwarp.cpp (GetImageData): New. Creates a |
206 |
|
data array of RGB values from the projected image returned from |
207 |
|
the gdal warping functions. In the case of palette based images, it |
208 |
|
converts the NO_DATA index to the mask color. |
209 |
|
(ProjectRasterFile): Removed all custom memory driver references |
210 |
|
and replaced it with the standard in-memory dataset provided |
211 |
|
by gdal. The return data is no longer a BMP file, but an array |
212 |
|
of RGB values, one set triple per pixel. |
213 |
|
|
214 |
|
* libraries/thuban/bmpdataset.cpp: Removed. Unnecessary. |
215 |
|
* libraries/thuban/cpl_mfile.h: Removed. Unnecessary. |
216 |
|
* libraries/thuban/cpl_mfile.cpp: Removed. Unnecessary. |
217 |
|
|
218 |
|
* setup.py (thuban_build_ext.finalize_options): Removed mention |
219 |
|
of cpl_mfile.cpp and bmpdataset.cpp files in the list of source |
220 |
|
files. These are obsolete with the new version of gdalwarp.cpp |
221 |
|
|
222 |
|
* test/test_baserenderer.py (SimpleRenderer.draw_raster_data): |
223 |
|
Updated signature. |
224 |
|
(TestBaseRenderer.test_raster_no_projection): Changed the test |
225 |
|
data to be data in the uncompressed RAW format returned from |
226 |
|
ProjectRasterFile. |
227 |
|
|
228 |
2005-01-21 Jan-Oliver Wagner <[email protected]> |
2005-01-21 Jan-Oliver Wagner <[email protected]> |
229 |
|
|
230 |
* Thuban/UI/mainwindow.py (view_position_changed): Made string |
* Thuban/UI/mainwindow.py (MainWindow.view_position_changed): Made |
231 |
available for i18n. |
string available for i18n. |
232 |
|
|
233 |
2005-01-20 Russell Nelson <[email protected]> |
2005-01-20 Russell Nelson <[email protected]> |
234 |
|
|
241 |
|
|
242 |
2005-01-20 Bernhard Reiter <[email protected]> |
2005-01-20 Bernhard Reiter <[email protected]> |
243 |
|
|
244 |
* Thuban/UI/mainwindow.py(view_position_changed): Added docstring |
* Thuban/UI/mainwindow.py (MainWindow.view_position_changed): Added |
245 |
and comment that the warning code here is a hack. |
docstring and comment that the warning code here is a hack. |
246 |
|
|
247 |
2005-01-20 Russell Nelson <[email protected]> |
2005-01-20 Russell Nelson <[email protected]> |
248 |
|
|
249 |
* Thuban/UI/mainwindow.py(view_position_changed): Warn user about |
* Thuban/UI/mainwindow.py (MainWindow.view_position_changed): Warn |
250 |
misprojected layers when their lat/lon bounding |
user about misprojected layers when their lat/lon bounding |
251 |
box exceeds rational lat/lon values. |
box exceeds rational lat/lon values. |
252 |
|
|
253 |
2005-01-20 Bernhard Reiter <[email protected]> |
2005-01-20 Bernhard Reiter <[email protected]> |
254 |
|
|
255 |
* Thuban/UI/about.py (unicodeToLocale()): Improved: |
* Thuban/UI/about.py (unicodeToLocale): Improved: |
256 |
Use 'ascii' and then 'replace' for other characters |
Use 'ascii' and then 'replace' for other characters |
257 |
when getdefaultlocale returns None. Thanks to Bernhard H. . |
when getdefaultlocale returns None. Thanks to Bernhard H. . |
258 |
|
|
259 |
2005-01-20 Bernhard Reiter <[email protected]> |
2005-01-20 Bernhard Reiter <[email protected]> |
260 |
|
|
261 |
* Thuban/UI/classgen.py (OnRetrieve()): Added a comment |
* Thuban/UI/classgen.py (GenQuantilesPanel.OnRetrieve): Added a comment |
262 |
that OnRangeText might be called twice and using None as argument. |
that OnRangeText might be called twice and using None as argument. |
263 |
|
|
264 |
2005-01-20 Bernhard Reiter <[email protected]> |
2005-01-20 Bernhard Reiter <[email protected]> |
265 |
|
|
266 |
* Thuban/UI/classgen.py (OnRetrieve()): Add a OnRangeText(0) |
* Thuban/UI/classgen.py (GenQuantilesPanel.OnRetrieve): Add a |
267 |
to work around a different in wx Behaviour noticed on MacOSX, |
OnRangeText(0) to work around a different in wx Behaviour noticed |
268 |
thanks to Lorenzo Moretti and Daniel Calvelo for the fix. |
on MacOSX, thanks to Lorenzo Moretti and Daniel Calvelo for the fix. |
269 |
|
|
270 |
2005-01-20 Bernhard Reiter <[email protected]> |
2005-01-20 Bernhard Reiter <[email protected]> |
271 |
|
|
272 |
* Thuban/UI/about.py: take iso-8859-15 when getdefaultlocale returns |
* Thuban/UI/about.py: take iso-8859-15 when getdefaultlocale returns |