1 |
|
2003-06-19 Bernhard Herzog <[email protected]> |
2 |
|
|
3 |
|
* Doc/thuban.dtd (classification): Correct the content model of |
4 |
|
the classification element. |
5 |
|
(projection): Add the "name" attribute |
6 |
|
|
7 |
|
2003-06-19 Frank Koormann <[email protected]> |
8 |
|
|
9 |
|
MERGE from the greater-ms3 branch. |
10 |
|
|
11 |
|
* Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to |
12 |
|
scale if projection is latlong to get better estimate. |
13 |
|
|
14 |
|
Fix problem of hidden properties dialog under windows after double |
15 |
|
click on layer tree: |
16 |
|
The tree control always gets an Expanded / Collapsed event after |
17 |
|
the ItemActivated on double click, which raises the main window again. We add a second ItemActivated event to the queue, which simply |
18 |
|
raises the already displayed window. |
19 |
|
|
20 |
|
* Thuban/UI/legend.py (LegendTree.__init__): Instance variable |
21 |
|
raiseProperties initialized to prevent endless loops |
22 |
|
(LegendTree._OnItemActivated): Depending on self.raiseProperties |
23 |
|
simply raise the properties or open the dialog and issue a second |
24 |
|
event. |
25 |
|
|
26 |
|
2003-06-18 Jonathan Coles <[email protected]> |
27 |
|
|
28 |
|
* setup.py: Fix a few problems that occured under Windows. |
29 |
|
|
30 |
|
2003-06-18 Jonathan Coles <[email protected]> |
31 |
|
|
32 |
|
When Thuban loaded the map was redrawn twice because the |
33 |
|
legend was being opened after the mainwindow was created |
34 |
|
and not during its creation. This meant the map was drawn |
35 |
|
initially and then had to be redrawn when the legend |
36 |
|
caused the display to change. Now the legend is opened |
37 |
|
in the mainwindow constructor which resolves this issue. |
38 |
|
|
39 |
|
Also, although we were checking for the existence of |
40 |
|
gdal and gdalwarp modules, the gdalwarp extension was |
41 |
|
still being compiled (which may fail if the system doesn't |
42 |
|
have gdal installed). the build_ext command to setup.py |
43 |
|
now accepts the flags --with-gdal and --without-gdal. |
44 |
|
If --without-gdal is specified setup.py will try to |
45 |
|
use the gdal parameters specified by gdal-config. Under |
46 |
|
windows, those parameters have to be set in setup.py |
47 |
|
as with proj4 an wxWindows. |
48 |
|
|
49 |
|
* setup.py: Use a list instead of seperate variables for |
50 |
|
extension parameters so we can create a generic function |
51 |
|
that runs an appropriate *-config script. |
52 |
|
(run_cs_script): Renamed from run_wx_script and modified |
53 |
|
to accept a second argument which is a list of lists to |
54 |
|
be filled in by the values returned from running the command. |
55 |
|
(thuban_build_ext): New. Extends the build_ext command and |
56 |
|
provides the options --with-gdal/--without-gdal which then |
57 |
|
optionally includes the gdalwarp extension. |
58 |
|
|
59 |
|
* Thuban/Model/resource.py: First check if we can import |
60 |
|
the gdalwarp Thuban extension before checking for gdal. |
61 |
|
Also added some comments. |
62 |
|
|
63 |
|
* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if |
64 |
|
the map is None which may be the case if none has been loaded |
65 |
|
yet. |
66 |
|
|
67 |
|
* Thuban/UI/main.py (main): Remove call to ShowLegend. |
68 |
|
|
69 |
|
* Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend(). |
70 |
|
|
71 |
|
* Thuban/UI/renderer.py: Check for gdal support before importing |
72 |
|
gdalwarp. |
73 |
|
(MapRenderer.render_map): Only try to optimize if we have gdal |
74 |
|
support otherwise nothing will get drawn. |
75 |
|
|
76 |
|
* Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called |
77 |
|
during startup before a map has been created. Check if map is None |
78 |
|
before using it and do nothing if it is. |
79 |
|
|
80 |
|
2003-06-17 Jonathan Coles <[email protected]> |
81 |
|
|
82 |
|
Fix the problem with raster layers under Windows that caused |
83 |
|
Thuban to crash. The view should respond to layer projection |
84 |
|
changed events to update the display. Changes to a projection |
85 |
|
should not cause the map to be set to full extent. |
86 |
|
|
87 |
|
* Thuban/UI/view.py (MapCanvas.__init__): New instance variable |
88 |
|
current_map_proj to remember the current map projection so that |
89 |
|
when the projection changes we know what the previous projection |
90 |
|
was. |
91 |
|
(MapCanvas.SetMap): Unsubscribe and subscribe to |
92 |
|
LAYER_PROJECTION_CHANGED events. |
93 |
|
(MapCanvas.projection_changed): Split into two methods that respond |
94 |
|
to map and layer projection changes. |
95 |
|
(MapCanvas.map_projection_changed): New. Takes the current view and |
96 |
|
projects it using the new projection. This does not cause the |
97 |
|
map to be redrawn at full extent. |
98 |
|
(MapCanvas.layer_projection_changed): New. Cause a redraw which |
99 |
|
will draw each layer in its new projection. |
100 |
|
|
101 |
|
* extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call |
102 |
|
VSIFClose() not VSIFCloseL() to close the file. Fixes a crash |
103 |
|
under Windows. |
104 |
|
|
105 |
|
* extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be |
106 |
|
to twice sizeof(void*) because there are two digits for each |
107 |
|
hex byte. |
108 |
|
|
109 |
|
2003-06-16 Bernhard Herzog <[email protected]> |
110 |
|
|
111 |
|
Update to the layer interface: Direct access to the table, |
112 |
|
shapetable, shapefile and filename attributes is now actively |
113 |
|
deprecated by issuing deprecation warnings for all places where |
114 |
|
this happens. |
115 |
|
|
116 |
|
* Thuban/Model/layer.py (Layer.__getattr__): New. Implement access |
117 |
|
to the instance variables table, shapetable, shapefile and |
118 |
|
filename via __getattr__ so that we can issue a deprecation |
119 |
|
warning. |
120 |
|
(Layer.SetShapeStore): Don't set the deprecated instance variables |
121 |
|
any more |
122 |
|
(Layer.SetShapeStore): Don't use deprecated layer instance |
123 |
|
variables |
124 |
|
(Layer.Destroy): No need to explicitly remove the instance |
125 |
|
variables any more |
126 |
|
(Layer.GetFieldType, Layer.Shape): Don't use deprecated layer |
127 |
|
instance variables |
128 |
|
|
129 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__) |
130 |
|
(GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve) |
131 |
|
(GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't |
132 |
|
use deprecated layer instance variables |
133 |
|
|
134 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Don't use |
135 |
|
deprecated layer instance variables |
136 |
|
|
137 |
|
* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape) |
138 |
|
(IdentifyGridCtrl.selected_shape): Don't set the deprecated layer |
139 |
|
instance variables |
140 |
|
|
141 |
|
* Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use |
142 |
|
deprecated layer instance variables |
143 |
|
|
144 |
|
* Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use |
145 |
|
deprecated layer instance variables |
146 |
|
|
147 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Don't use |
148 |
|
deprecated layer instance variables |
149 |
|
|
150 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer) |
151 |
|
(MapRenderer.polygon_render_param): Don't use deprecated layer instance |
152 |
|
variables |
153 |
|
|
154 |
|
* test/runtests.py (main): Turn Thuban's deprecation warnings into |
155 |
|
errors so that they're cought by the tests |
156 |
|
|
157 |
|
* test/test_load.py (TestSingleLayer.test): Don't use deprecated |
158 |
|
layer instance variables |
159 |
|
|
160 |
|
2003-06-16 Jonathan Coles <[email protected]> |
161 |
|
|
162 |
|
Fix a problem under Windows whereby if the user double-clicks on a |
163 |
|
layer in the legend that tree item will expand or collapse as well |
164 |
|
as open the layer properties dialog. The state of the tree item |
165 |
|
should not be affected. |
166 |
|
|
167 |
|
* Thuban/UI/legend.py (LegendTree.__init__): Add instance variable |
168 |
|
preventExpandCollapse and subscribe to expanding and collapsing |
169 |
|
events. |
170 |
|
(LegendTree.OnItemExpandCollapse): New. Responds to expanding and |
171 |
|
collapsing events and will veto the event if it has been triggered |
172 |
|
by the user double clicking on a layer. |
173 |
|
(LegendTree._OnItemActivated): Set preventExpandCollapse to indicate |
174 |
|
that an expanding/collapsing event should be vetoed. |
175 |
|
|
176 |
|
2003-06-13 Bernhard Herzog <[email protected]> |
177 |
|
|
178 |
|
* Thuban/UI/classifier.py (Classifier.OnClose) |
179 |
|
(Classifier.map_layers_removed) |
180 |
|
(Classifier.layer_shapestore_replaced): Unsubscribe the messages |
181 |
|
in OnClose and not in map_layers_removed or |
182 |
|
layer_shapestore_replaced to make sure it always happens when the |
183 |
|
dialog is closed |
184 |
|
|
185 |
|
2003-06-13 Jonathan Coles <[email protected]> |
186 |
|
|
187 |
|
This puts back a fix for Windows where a panel is needed so that |
188 |
|
the background of the table view appears correctly. |
189 |
|
|
190 |
|
* Thuban/UI/tableview.py (TableFrame.__init__): Add a panel |
191 |
|
object that can be used by derived classes to place any |
192 |
|
controls (including the grid) onto. |
193 |
|
(QueryTableFrame.__init__): Use the panel as the parent window |
194 |
|
for all the controls. Reparent the grid so that the panel is |
195 |
|
the parent. Call UpdateStatusText() to correctly initialize |
196 |
|
the status bar. |
197 |
|
|
198 |
|
2003-06-13 Jonathan Coles <[email protected]> |
199 |
|
|
200 |
|
* Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits |
201 |
|
from wxFrame (as opposed to wxDialog like the other classes) |
202 |
|
but otherwise behaves like the other classes. This is needed |
203 |
|
for the TableView which isn't really a dialog and needs to |
204 |
|
have a status bar and control buttons. |
205 |
|
|
206 |
|
* Thuban/UI/tableview.py (TableGrid.__init__): Create an |
207 |
|
instance variable to keep track of how many rows are selected. |
208 |
|
Subscribe once to the the events we are interested in. |
209 |
|
(ThubanGrid.OnRangeSelect): Only handle event if event handling |
210 |
|
hasn't been turned off. |
211 |
|
(ThubanGrid.OnSelectCell): Only handle event if event handling |
212 |
|
hasn't been turned off. |
213 |
|
(ThubanGrid.ToggleEventListeners): Rather than subscribe None |
214 |
|
as an event listener (which changes the event handler stack) |
215 |
|
simply set an instance variable to False. This is checked in |
216 |
|
the event handlers. |
217 |
|
(ThubanGrid.GetNumberSelected): Return the number of currently |
218 |
|
selected rows. |
219 |
|
(TableFrame): Inherit from ThubanFrame so we can have a |
220 |
|
status bar and control buttons. |
221 |
|
(QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942. |
222 |
|
Explicitly set which items are selected in the operator choice and |
223 |
|
action choice so there is always a valid selection. Fixes RTbug #1941. |
224 |
|
Subscribe to grid cell selection events so we can update the |
225 |
|
status bar. |
226 |
|
(QueryTableFrame.UpdateStatusText): Update the status bar with |
227 |
|
how many rows are in the grid, how many columns, and how many |
228 |
|
rows are selected. |
229 |
|
(QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell): |
230 |
|
Call UpdateStatusText when cells are (de)selected. |
231 |
|
(QueryTableFrame.OnQuery): Use the string value in the value |
232 |
|
combo if either the selected item index is 0 or if the string |
233 |
|
cannot be found in the predefined list (this happens if the |
234 |
|
user changes the text). Fixes RTbug #1940. |
235 |
|
Only turn off the grid event listeners if there a query comes |
236 |
|
back with a none empty list of ids. in the case that the list |
237 |
|
is empty this causes a grid.ClearSelection() call to actually |
238 |
|
clear the grid selection which causes the selected items in |
239 |
|
the map to be deselected. Fixes RTbug #1939. |
240 |
|
|
241 |
|
* test/test_save.py (XMLWriterTest.Encode): Check return values. |
242 |
|
Fixes RTbug #1851. |
243 |
|
|
244 |
|
2003-06-13 Bernhard Herzog <[email protected]> |
245 |
|
|
246 |
|
* Thuban/UI/identifyview.py (IdentifyView.__init__): Call |
247 |
|
self.selected_shape with the current selection to make sure the |
248 |
|
contents of the dialog are up to date when it's shown for the |
249 |
|
first time. |
250 |
|
The dialog used to work without this by luck. The recent fix to |
251 |
|
the connector module 'broke' a 'feature' the identify view was |
252 |
|
relying on, i.e that subscribing to a message in response to |
253 |
|
receiving a message of that type would mean that the new |
254 |
|
subscriber would also be called for the same message. |
255 |
|
|
256 |
|
2003-06-12 Jonathan Coles <[email protected]> |
257 |
|
|
258 |
|
* extensions/thuban/gdalwarp.cpp: Removed debug printing as |
259 |
|
the image is rendered. Fixes RTbug #1937. |
260 |
|
|
261 |
|
2003-06-12 Jonathan Coles <[email protected]> |
262 |
|
|
263 |
|
* Thuban/Lib/fileutil.py: As is done under Windows, create the |
264 |
|
user directory if it doesn't exist on a posix system. |
265 |
|
Fixes RTbug #1815. |
266 |
|
|
267 |
|
* Thuban/Model/resource.py (get_user_proj_files): Moved the |
268 |
|
called to get_application_dir here, so that the directory |
269 |
|
will only be called if this method is invoked. |
270 |
|
|
271 |
|
* Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear |
272 |
|
the projfilepath if no projection is selected. |
273 |
|
|
274 |
|
2003-06-12 Jonathan Coles <[email protected]> |
275 |
|
|
276 |
|
* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw |
277 |
|
the scalebar if the current map has no projection set. |
278 |
|
|
279 |
|
* Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the |
280 |
|
projfilepath label to just the basename of the projection file |
281 |
|
rather than include the entire path. |
282 |
|
|
283 |
|
* Thuban/Model/resource.py: Fix missed proj functions that |
284 |
|
needed to be renamed. |
285 |
|
|
286 |
|
2003-06-12 Jonathan Coles <[email protected]> |
287 |
|
|
288 |
|
* Thuban/Model/classification.py: Removed assert statements that |
289 |
|
tested if the variable was an instance of Color. |
290 |
|
|
291 |
|
* Thuban/Model/color.py (Color): Remove commented code that isn't |
292 |
|
used. |
293 |
|
(Transparent): Renamed from NoColor. Doesn't inherit from Color. |
294 |
|
Fixes RTbug #1835. |
295 |
|
(Transparent.__eq__, Transparent.__ne, Transparent.__repr): New. |
296 |
|
Needed now that the class doesn't inherit from Color. |
297 |
|
|
298 |
|
2003-06-12 Jonathan Coles <[email protected]> |
299 |
|
|
300 |
|
* test/test_save.py (XMLWriterTest.testEncode): Explicitly |
301 |
|
check unicode strings. |
302 |
|
|
303 |
|
* test/test_layer.py: Check for existence of gdal. |
304 |
|
|
305 |
|
2003-06-12 Jonathan Coles <[email protected]> |
306 |
|
|
307 |
|
* Thuban/Model/xmlreader.py: New. Contains the XMLReader class |
308 |
|
that was in load.py |
309 |
|
|
310 |
|
* Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class |
311 |
|
that was in save.py |
312 |
|
|
313 |
|
2003-06-12 Jonathan Coles <[email protected]> |
314 |
|
|
315 |
|
This is largely a collection of bug fixes. We also handle the |
316 |
|
case where gdal is not on the system. The XMLReader and XMLWriter |
317 |
|
classes were moved into there own files to resolve some circular |
318 |
|
import references and because they shouldn't really be in the |
319 |
|
file that is dediciated to reading/writing session files since |
320 |
|
they are also used elsewhere. |
321 |
|
|
322 |
|
* Thuban/Model/classgen.py: Renamed functions to follow the |
323 |
|
function_names_with_underscores style. Fixes RTbug #1903. |
324 |
|
(calculate_quantiles): Raise ValueError if 'percents' is invalid. |
325 |
|
|
326 |
|
* Thuban/Model/layer.py: Import gdal only if it available. |
327 |
|
(RasterLayer): Handle the case where the gdal library is unavailable. |
328 |
|
Addresses RTbug #1877. |
329 |
|
|
330 |
|
* Thuban/Model/load.py (XMLReader): Moved into seperate file |
331 |
|
xmlreader.py. |
332 |
|
|
333 |
2003-06-12 Jonathan Coles <[email protected]> |
2003-06-12 Jonathan Coles <[email protected]> |
334 |
|
|
335 |
This is largely a collection of bug fixes. We also handle the |
This is largely a collection of bug fixes. We also handle the |