1 |
|
2003-05-07 Bernhard Herzog <[email protected]> |
2 |
|
|
3 |
|
* Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict): |
4 |
|
Add comments about the optimizations used. |
5 |
|
(AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New. |
6 |
|
Implement the ReadValue table interface method. |
7 |
|
|
8 |
|
* test/test_transientdb.py |
9 |
|
(TestTransientTable.run_iceland_political_tests) |
10 |
|
(TestTransientTable.test_transient_joined_table): Add tests for |
11 |
|
ReadValue |
12 |
|
|
13 |
|
2003-05-07 Frank Koormann <[email protected]> |
14 |
|
|
15 |
|
* Resources/Bitmaps/fulllayerextent.xpm, |
16 |
|
Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with |
17 |
|
new icons. |
18 |
|
|
19 |
|
2003-05-06 Bernhard Herzog <[email protected]> |
20 |
|
|
21 |
|
* Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery): |
22 |
|
New. Simply delegate to the transient table's version. |
23 |
|
|
24 |
|
* test/test_transientdb.py |
25 |
|
(TestTransientTable.test_auto_transient_table_query): New. Test |
26 |
|
case for AutoTransientTable's SimpleQuery |
27 |
|
|
28 |
|
2003-05-06 Bernhard Herzog <[email protected]> |
29 |
|
|
30 |
|
* Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery): |
31 |
|
Implement a simple query method for the query dialog |
32 |
|
(TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds |
33 |
|
the row index or shapeid. |
34 |
|
(TransientTable.create): Insert the right value of the row index |
35 |
|
(TransientJoinedTable.create): Copy the row index of the left |
36 |
|
table to the joined result table |
37 |
|
|
38 |
|
* test/test_transientdb.py |
39 |
|
(TestTransientTable.test_transient_table_read_twice): Fix |
40 |
|
doc-string |
41 |
|
(TestTransientTable.test_transient_table_query): New. Test for the |
42 |
|
SimpleQuery method |
43 |
|
|
44 |
|
2003-05-06 Bernhard Herzog <[email protected]> |
45 |
|
|
46 |
|
Convert all table users to use the new table interface. This only |
47 |
|
covers Thuban itself, not GREAT-ER or other applications built on |
48 |
|
Thuban yet, so the compatibility interface stays in place for the |
49 |
|
time being but it now issues DeprecationWarnings. |
50 |
|
|
51 |
|
Finally, the new Table interface has a new method, HasColumn. |
52 |
|
|
53 |
|
* Thuban/Model/table.py (OldTableInterfaceMixin): All methods |
54 |
|
issue deprecation warnings when they're. The warnings refer to the |
55 |
|
caller of the method. |
56 |
|
(OldTableInterfaceMixin.__deprecation_warning): New. Helper method |
57 |
|
for the deprecation warnings |
58 |
|
|
59 |
|
* test/test_table.py: Ignore the deprecation warnings for the old |
60 |
|
table in the tests in this module. The purpose of the tests is to |
61 |
|
test the old interface, after all. |
62 |
|
|
63 |
|
* test/test_transientdb.py |
64 |
|
(TestTransientTable.run_iceland_political_tests): Use the |
65 |
|
constants for the types. Add a test for HasColumn |
66 |
|
(TestTransientTable.test_transient_joined_table): Adapt to new |
67 |
|
table interface. Add a test for HasColumn |
68 |
|
(TestTransientTable.test_transient_table_read_twice): Adapt to new |
69 |
|
table interface |
70 |
|
|
71 |
|
* Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue): |
72 |
|
Adapt to new table interface |
73 |
|
|
74 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to |
75 |
|
new table interface |
76 |
|
|
77 |
|
* Thuban/UI/controls.py (RecordListCtrl.fill_list) |
78 |
|
(RecordTable.SetTable): Adapt to new table interface |
79 |
|
|
80 |
|
* Thuban/UI/classifier.py (Classifier.__init__) |
81 |
|
(Classifier.__init__): Adapt to new table interface |
82 |
|
|
83 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__) |
84 |
|
(GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt |
85 |
|
to new table interface |
86 |
|
|
87 |
|
* Thuban/Model/transientdb.py (TransientTableBase.HasColumn) |
88 |
|
(AutoTransientTable.HasColumn): Implement the new table interface |
89 |
|
method |
90 |
|
(AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange) |
91 |
|
(AutoTransientTable.UniqueValues): Adapt to new table interface |
92 |
|
|
93 |
|
* Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType): |
94 |
|
Adapt to new table interface |
95 |
|
|
96 |
|
* test/test_layer.py (TestLayer.open_shapefile): Helper method to |
97 |
|
simplify opening shapefiles a bit easier. |
98 |
|
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer) |
99 |
|
(TestLayer.test_point_layer): Use the new helper method |
100 |
|
(TestLayer.test_get_field_type): New. Test for the GetFieldType |
101 |
|
method |
102 |
|
|
103 |
|
* test/test_dbf_table.py (TestDBFTable.test_has_column): Test for |
104 |
|
the new table method |
105 |
|
|
106 |
|
* test/test_memory_table.py (TestMemoryTable.test_has_column): |
107 |
|
Test for the new table method HasColumn |
108 |
|
|
109 |
|
2003-05-06 Jonathan Coles <[email protected]> |
110 |
|
|
111 |
|
Addresses the "Selection Extent" wish of RTbug #1787. |
112 |
|
|
113 |
|
* Resources/Bitmaps/fulllayerextent.xpm, |
114 |
|
Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection |
115 |
|
extent. These are just place holders for the real bitmaps. |
116 |
|
|
117 |
|
* Thuban/Model/layer.py (Shape): Since a Shape is immutable only |
118 |
|
calculate the bounding box once (the first time compute_bbox() is |
119 |
|
called). |
120 |
|
(Layer.ShapesBoundingBox): New. Given a list of shape ids, return |
121 |
|
the bounding box for the shapes in lat/long coordinates. |
122 |
|
|
123 |
|
* Thuban/UI/mainwindow.py: Added new "Full selection extent" menu |
124 |
|
option. |
125 |
|
(MainWindow.has_selected_shapes): New. Returns true if there are |
126 |
|
any selected shapes. |
127 |
|
(MainWindow.FullSelectionExtent): New. Calls |
128 |
|
MapCanvas.FitSelectedToWindow() when the user selects the menu option. |
129 |
|
(_has_selected_shapes): New. Returns true if there are any |
130 |
|
selected shapes. |
131 |
|
|
132 |
|
* Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns |
133 |
|
true if there are any selected shapes. |
134 |
|
|
135 |
|
* Thuban/UI/view.py (MapCanvas): Added delegated method |
136 |
|
HasSelectedShapes. |
137 |
|
(MapCanvas.FitSelectedToWindow): New. Centers and scales any selected |
138 |
|
shapes on the canvas using the map projection (if any). |
139 |
|
|
140 |
|
* test/test_layer.py (TestLayer.test_arc_layer): Add some tests |
141 |
|
for Layer.ShapesBoundingBox(). |
142 |
|
|
143 |
|
2003-05-06 Bernhard Herzog <[email protected]> |
144 |
|
|
145 |
|
* Resources/Projections/defaults.proj: Fix spelling of Mercator |
146 |
|
|
147 |
|
2003-05-05 Jonathan Coles <[email protected]> |
148 |
|
|
149 |
|
Addresses the "Full Layer Extent" wish of RTbug #1787. |
150 |
|
|
151 |
|
* Resources/Projections/defaults.proj: Added UK National Grid. |
152 |
|
|
153 |
|
* Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option. |
154 |
|
(MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow() |
155 |
|
when the user selects the menu option. |
156 |
|
|
157 |
|
* Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and |
158 |
|
scales the given layer on the canvas using the map projection. |
159 |
|
|
160 |
|
2003-05-05 Bernhard Herzog <[email protected]> |
161 |
|
|
162 |
|
Convert the table implementations to a new table interface. All |
163 |
|
tables use a common mixin class to provide backwards compatibility |
164 |
|
until all table users have been updated. |
165 |
|
|
166 |
|
* Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to |
167 |
|
provide backwards compatibility for table classes implementing the |
168 |
|
new interface |
169 |
|
(DBFTable, MemoryTable): Implement the new table interface. Use |
170 |
|
OldTableInterfaceMixin as base for compatibility |
171 |
|
(DBFColumn, MemoryColumn): New. Column description for DBFTable |
172 |
|
and MemoryTable resp. |
173 |
|
|
174 |
|
* test/test_dbf_table.py: New. Test cases for the DBFTable with |
175 |
|
the new table interface. |
176 |
|
|
177 |
|
* test/test_memory_table.py: New. Test cases for the MemoryTable |
178 |
|
with the new table interface. |
179 |
|
|
180 |
|
* test/test_table.py: Document the all tests in this file as only |
181 |
|
for backwards compatibility. The equivalent tests for the new |
182 |
|
interface are in test_memory_table.py and test_dbf_table.py |
183 |
|
(MemoryTableTest.test_read): field_info should be returning tuples |
184 |
|
with four items |
185 |
|
(MemoryTableTest.test_write): Make doc-string a more precise. |
186 |
|
|
187 |
|
* Thuban/Model/transientdb.py (TransientTableBase): Convert to new |
188 |
|
table interface. Derive from from OldTableInterfaceMixin for |
189 |
|
compatibility. |
190 |
|
(TransientTableBase.create): New intance variable column_map to |
191 |
|
map from names and indices to column objects |
192 |
|
(TransientTable.create): Use the new table interface of the input |
193 |
|
table |
194 |
|
(AutoTransientTable): Convert to new table interface. Derive from |
195 |
|
from OldTableInterfaceMixin for compatibility. |
196 |
|
(AutoTransientTable.write_record): Removed. It's not implemented |
197 |
|
yet and we still have to decide how to handle writing with the new |
198 |
|
table and data framework. |
199 |
|
|
200 |
|
* test/test_transientdb.py |
201 |
|
(TestTransientTable.run_iceland_political_tests) |
202 |
|
(TestTransientTable.test_transient_joined_table): Use the new |
203 |
|
table interface |
204 |
|
|
205 |
|
2003-05-05 Jonathan Coles <[email protected]> |
206 |
|
|
207 |
|
This is namely a collection of UI updates to improve user interactivity. |
208 |
|
Tabbing between controls now exists and you can use ESC to close dialog |
209 |
|
boxes; ENTER will active the default button. |
210 |
|
|
211 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the |
212 |
|
order that the controls are created so that tabbing works correctly. |
213 |
|
(ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the |
214 |
|
wxDialog can handle the default button correctly. |
215 |
|
(ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the |
216 |
|
same reasons as for OnOK. |
217 |
|
(GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor |
218 |
|
when we ask the table for the maximum/minimum values of a field |
219 |
|
which could take a very long time. |
220 |
|
|
221 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Rearrange the |
222 |
|
order that the controls are created so that tabbing works correctly. |
223 |
|
(SelectPropertiesDialog.__init__): Rearrange the order that the |
224 |
|
controls are created so that tabbing works correctly. |
225 |
|
|
226 |
|
* Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it |
227 |
|
to derive from a wxDialog but behave like the original implementation |
228 |
|
which was derived from a wxFrame. wxDialog provides useful key |
229 |
|
handling functionality like ESC calling OnCancel and ENTER calling |
230 |
|
OnOK which is lost with wxFrame. |
231 |
|
|
232 |
|
* Thuban/UI/mainwindow.py: Add "..." to menu items that will open |
233 |
|
new dialogs. |
234 |
|
|
235 |
|
* Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the |
236 |
|
order that the controls are created so that tabbing works correctly. |
237 |
|
(ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour. |
238 |
|
(ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour. |
239 |
|
(ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour. |
240 |
|
(ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we |
241 |
|
can provide the "UK National Grid" as a default projection. |
242 |
|
(UTMPanel.__init__): Rearrange the order that the controls are |
243 |
|
created so that tabbing works correctly. |
244 |
|
|
245 |
|
2003-05-05 Bernhard Herzog <[email protected]> |
246 |
|
|
247 |
|
* extensions/thuban/wxproj.cpp: Fix some of the comments. |
248 |
|
(project_point): If a map projection but no layer projection is |
249 |
|
given, convert degrees to radians before applying the map |
250 |
|
projection. |
251 |
|
|
252 |
|
* Thuban/UI/tableview.py (TableGrid.disallow_messages) |
253 |
|
(TableGrid.allow_messages): New methods to make it possible to |
254 |
|
inhibit message sending. |
255 |
|
(TableGrid.issue): Only send the message if not inhibited. |
256 |
|
(LayerTableGrid.select_shape): Use the new methods to make sure |
257 |
|
that no ROW_SELECTED message is sent while we're updating the |
258 |
|
selected rows to match the selected shapes. |
259 |
|
|
260 |
|
2003-05-02 Jan-Oliver Wagner <[email protected]> |
261 |
|
|
262 |
|
Implementation of MemoryTable. |
263 |
|
|
264 |
|
* Thuban/Model/table.py (MemoryTable): New. Quite simple table |
265 |
|
implementation that operates on a list of tuples. All of the data |
266 |
|
are kept in the memory. |
267 |
|
|
268 |
|
* test/test_table.py (MemoryTableTest): New. |
269 |
|
|
270 |
|
* test/test_transientdb.py (SimpleTable): Removed. |
271 |
|
(TestTransientTable.test_transient_joined_table, |
272 |
|
(TestTransientTable.test_transient_table_read_twice): Replaced |
273 |
|
SimpleTable by MemoryTable. |
274 |
|
|
275 |
|
2003-04-30 Jonathan Coles <[email protected]> |
276 |
|
|
277 |
|
* Data/iceland_sample.thuban: Now contains correct projections |
278 |
|
for each of the layers. |
279 |
|
|
280 |
|
* Resources/Projections/defaults.proj: Geographic projection |
281 |
|
contains unit conversion parameter. |
282 |
|
|
283 |
|
2003-04-30 Jonathan Coles <[email protected]> |
284 |
|
|
285 |
|
The most important part of this putback is the projection changes. |
286 |
|
It should now be possible to specify the projection that a layer |
287 |
|
is in and then specify a different projection for the map. The |
288 |
|
projection dialog has an extra parameter for a geographic projection |
289 |
|
which lets the user select if the input is in degrees or radians. |
290 |
|
|
291 |
|
* Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring |
292 |
|
to say that the parameter is a tuple of unprojected |
293 |
|
points (which is what the callers to this method were assuming). |
294 |
|
Also, since the points are unprojected we need to projected them. |
295 |
|
|
296 |
|
* Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp, |
297 |
|
LegendTree.MoveCurrentItemDown): If the layer or any of the layer's |
298 |
|
groups are selected, move the layer up/down. Fixes RTbug #1833. |
299 |
|
|
300 |
|
* Thuban/UI/mainwindow.py: Move menu item map_rename up. |
301 |
|
|
302 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing |
303 |
|
parameter in call to SetClientData. |
304 |
|
(GeoPanel): Add support for selecting the units that the |
305 |
|
source data is in (Radians or Degrees). |
306 |
|
|
307 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize |
308 |
|
the rendering loop by reducing the number of if's, removing the |
309 |
|
unnecessary try/except block, and checking if the old group |
310 |
|
is the same as the new one (which happens a lot if there is |
311 |
|
no classification, or lots of shapes are in the same group). |
312 |
|
|
313 |
|
* Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block |
314 |
|
around the redraw routine to try to catch problems that the user |
315 |
|
may create by selecting invalid projections for the data set and |
316 |
|
map. Clears the display if there are any problems and prints the |
317 |
|
error. |
318 |
|
(MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled |
319 |
|
rectangle. |
320 |
|
|
321 |
|
* extensions/thuban/wxproj.cpp (project_point): First invert the |
322 |
|
supplied point (which should be in projected coordinates) using |
323 |
|
the layer's projection and then project the point using the |
324 |
|
map's projection. |
325 |
|
(project_points): Use project_point() to project each point. |
326 |
|
|
327 |
|
2003-04-30 Jan-Oliver Wagner <[email protected]> |
328 |
|
|
329 |
|
* Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug: |
330 |
|
don't set the Classification to None if the classfication field |
331 |
|
is None (ie only a DEFAULT). |
332 |
|
|
333 |
|
2003-04-30 Bernhard Herzog <[email protected]> |
334 |
|
|
335 |
|
* Thuban/UI/view.py: Fix some typos. |
336 |
|
|
337 |
|
* Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do |
338 |
|
not pop up the dialog if the selection becomes empty (this could |
339 |
|
happen if e.g. a new selection is opened while the identify tool |
340 |
|
is active and dialog had been closed) |
341 |
|
|
342 |
|
2003-04-30 Bernhard Herzog <[email protected]> |
343 |
|
|
344 |
|
* Thuban/Model/transientdb.py (TransientTableBase.__init__): New |
345 |
|
instance variable read_record_last_result |
346 |
|
(TransientTableBase.read_record): Make sure reading the same |
347 |
|
record twice works. The implementation uses the new instance |
348 |
|
variable read_record_last_result |
349 |
|
|
350 |
|
* test/test_transientdb.py |
351 |
|
(TestTransientTable.test_transient_table_read_twice): New test |
352 |
|
case for the above bug-fix. |
353 |
|
|
354 |
|
2003-04-29 Jonathan Coles <[email protected]> |
355 |
|
|
356 |
|
* Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832. |
357 |
|
|
358 |
|
* Thuban/UI/classgen.py: Remove all uses of Str2Num. |
359 |
|
|
360 |
|
* Thuban/UI/classifier.py: Remove all uses of Str2Num. |
361 |
|
(ClassTable.SetValueAsCustom): Rename keyword argument in |
362 |
|
ClassGroup* constructors to match argument name. |
363 |
|
|
364 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
365 |
|
|
366 |
|
* Thuban/Model/session.py (Session.Destroy): Explicitly close the |
367 |
|
transient DB if it exists to make sure it doesn't leave a journal |
368 |
|
file in the temp directory. |
369 |
|
|
370 |
|
* Thuban/Model/transientdb.py (TransientDatabase.close): Set |
371 |
|
self.conn to None after closing the connection to make sure it's |
372 |
|
not closed twice |
373 |
|
|
374 |
|
2003-04-29 Jonathan Coles <[email protected]> |
375 |
|
|
376 |
|
Add a visible parameter in the layer XML tag. The default value is |
377 |
|
"true". If anything other than "false" is specified we also assume |
378 |
|
"true". Addresses RTbug #1025. |
379 |
|
|
380 |
|
* Doc/thuban.dtd: Add visible parameter to a layer. |
381 |
|
|
382 |
|
* Thuban/Model/layer.py (BaseLayer.__init__): Change default value |
383 |
|
of visible from 1 to True. |
384 |
|
(Layer.__init__): Change default value of visible from 1 to True. |
385 |
|
|
386 |
|
* Thuban/Model/load.py (SessionLoader.start_layer): Read visible |
387 |
|
parameter. |
388 |
|
|
389 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save visible |
390 |
|
parameter. |
391 |
|
|
392 |
|
* test/test_load.py: Add new test data contents_test_visible. |
393 |
|
(LoadSessionTest.setUp): save test data. |
394 |
|
(LoadSessionTest.testLayerVisibility): Test if the visible flag |
395 |
|
is loaded correctly. |
396 |
|
|
397 |
|
* test/test_save.py (SaveSessionTest.testSingleLayer): Add test |
398 |
|
for saving an invisible layer. |
399 |
|
|
400 |
|
2003-04-29 Jonathan Coles <[email protected]> |
401 |
|
|
402 |
|
* Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the |
403 |
|
legend dialog box and tell it to change its map to the one |
404 |
|
supplied to SetMap(). Fixes RTbug #1770. |
405 |
|
|
406 |
2003-04-29 Bernhard Herzog <[email protected]> |
2003-04-29 Bernhard Herzog <[email protected]> |
407 |
|
|
408 |
Next step of table implementation. Introduce a transient database |
Next step of table implementation. Introduce a transient database |
456 |
once. Plus it introduces a reference cycle that keeps can keep the |
once. Plus it introduces a reference cycle that keeps can keep the |
457 |
session object alive for a long time. |
session object alive for a long time. |
458 |
|
|
459 |
2003-04-25 Jonathan Coles <[email protected]> |
2003-04-29 Jonathan Coles <[email protected]> |
460 |
|
|
461 |
* Thuban/Model/proj.py (Projection): Removed Set*() methods to make |
* Thuban/Model/proj.py (Projection): Removed Set*() methods to make |
462 |
Projection an immutable item. Fixes RTbug #1825. |
Projection an immutable item. Fixes RTbug #1825. |