1 |
|
2003-05-07 Frank Koormann <[email protected]> |
2 |
|
|
3 |
|
Basic Scalebar features added. |
4 |
|
|
5 |
|
* Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering. |
6 |
|
|
7 |
|
* Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap |
8 |
|
(ScaleBarBitmap): New, links the scalebar bitmap with view messages |
9 |
|
and the renderer. |
10 |
|
|
11 |
|
* Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED. |
12 |
|
|
13 |
|
* Thuban/UI/messages.py: SCALE_CHANGED added. |
14 |
|
|
15 |
|
2003-05-07 Bernhard Herzog <[email protected]> |
16 |
|
|
17 |
|
* Thuban/Model/session.py (Session.__init__): New instance |
18 |
|
variable shapestores to hold a list of all open shapestore objects |
19 |
|
(Session.ShapeStores): New. Accessor method for the shapestores |
20 |
|
list. |
21 |
|
(Session._add_shapestore, Session._clean_weak_store_refs): New. |
22 |
|
Internal methods to maintain the shapestores list. |
23 |
|
(Session.Tables): New. Return all tables open in the session. |
24 |
|
(Session.OpenShapefile): Insert the new ShapeStore into the |
25 |
|
shapestores list. |
26 |
|
|
27 |
|
* test/test_session.py (TestSessionSimple.test_initial_state): Add |
28 |
|
tests for ShapeStores and Tables |
29 |
|
(TestSessionWithContent.test_shape_stores) |
30 |
|
(TestSessionWithContent.test_tables): New. Test cases for |
31 |
|
ShapeStores and Tables |
32 |
|
|
33 |
|
2003-05-07 Bernhard Herzog <[email protected]> |
34 |
|
|
35 |
|
* Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict): |
36 |
|
Add comments about the optimizations used. |
37 |
|
(AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New. |
38 |
|
Implement the ReadValue table interface method. |
39 |
|
|
40 |
|
* test/test_transientdb.py |
41 |
|
(TestTransientTable.run_iceland_political_tests) |
42 |
|
(TestTransientTable.test_transient_joined_table): Add tests for |
43 |
|
ReadValue |
44 |
|
|
45 |
|
2003-05-07 Frank Koormann <[email protected]> |
46 |
|
|
47 |
|
* Resources/Bitmaps/fulllayerextent.xpm, |
48 |
|
Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with |
49 |
|
new icons. |
50 |
|
|
51 |
|
2003-05-06 Bernhard Herzog <[email protected]> |
52 |
|
|
53 |
|
* Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery): |
54 |
|
New. Simply delegate to the transient table's version. |
55 |
|
|
56 |
|
* test/test_transientdb.py |
57 |
|
(TestTransientTable.test_auto_transient_table_query): New. Test |
58 |
|
case for AutoTransientTable's SimpleQuery |
59 |
|
|
60 |
|
2003-05-06 Bernhard Herzog <[email protected]> |
61 |
|
|
62 |
|
* Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery): |
63 |
|
Implement a simple query method for the query dialog |
64 |
|
(TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds |
65 |
|
the row index or shapeid. |
66 |
|
(TransientTable.create): Insert the right value of the row index |
67 |
|
(TransientJoinedTable.create): Copy the row index of the left |
68 |
|
table to the joined result table |
69 |
|
|
70 |
|
* test/test_transientdb.py |
71 |
|
(TestTransientTable.test_transient_table_read_twice): Fix |
72 |
|
doc-string |
73 |
|
(TestTransientTable.test_transient_table_query): New. Test for the |
74 |
|
SimpleQuery method |
75 |
|
|
76 |
|
2003-05-06 Bernhard Herzog <[email protected]> |
77 |
|
|
78 |
|
Convert all table users to use the new table interface. This only |
79 |
|
covers Thuban itself, not GREAT-ER or other applications built on |
80 |
|
Thuban yet, so the compatibility interface stays in place for the |
81 |
|
time being but it now issues DeprecationWarnings. |
82 |
|
|
83 |
|
Finally, the new Table interface has a new method, HasColumn. |
84 |
|
|
85 |
|
* Thuban/Model/table.py (OldTableInterfaceMixin): All methods |
86 |
|
issue deprecation warnings when they're. The warnings refer to the |
87 |
|
caller of the method. |
88 |
|
(OldTableInterfaceMixin.__deprecation_warning): New. Helper method |
89 |
|
for the deprecation warnings |
90 |
|
|
91 |
|
* test/test_table.py: Ignore the deprecation warnings for the old |
92 |
|
table in the tests in this module. The purpose of the tests is to |
93 |
|
test the old interface, after all. |
94 |
|
|
95 |
|
* test/test_transientdb.py |
96 |
|
(TestTransientTable.run_iceland_political_tests): Use the |
97 |
|
constants for the types. Add a test for HasColumn |
98 |
|
(TestTransientTable.test_transient_joined_table): Adapt to new |
99 |
|
table interface. Add a test for HasColumn |
100 |
|
(TestTransientTable.test_transient_table_read_twice): Adapt to new |
101 |
|
table interface |
102 |
|
|
103 |
|
* Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue): |
104 |
|
Adapt to new table interface |
105 |
|
|
106 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to |
107 |
|
new table interface |
108 |
|
|
109 |
|
* Thuban/UI/controls.py (RecordListCtrl.fill_list) |
110 |
|
(RecordTable.SetTable): Adapt to new table interface |
111 |
|
|
112 |
|
* Thuban/UI/classifier.py (Classifier.__init__) |
113 |
|
(Classifier.__init__): Adapt to new table interface |
114 |
|
|
115 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__) |
116 |
|
(GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt |
117 |
|
to new table interface |
118 |
|
|
119 |
|
* Thuban/Model/transientdb.py (TransientTableBase.HasColumn) |
120 |
|
(AutoTransientTable.HasColumn): Implement the new table interface |
121 |
|
method |
122 |
|
(AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange) |
123 |
|
(AutoTransientTable.UniqueValues): Adapt to new table interface |
124 |
|
|
125 |
|
* Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType): |
126 |
|
Adapt to new table interface |
127 |
|
|
128 |
|
* test/test_layer.py (TestLayer.open_shapefile): Helper method to |
129 |
|
simplify opening shapefiles a bit easier. |
130 |
|
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer) |
131 |
|
(TestLayer.test_point_layer): Use the new helper method |
132 |
|
(TestLayer.test_get_field_type): New. Test for the GetFieldType |
133 |
|
method |
134 |
|
|
135 |
|
* test/test_dbf_table.py (TestDBFTable.test_has_column): Test for |
136 |
|
the new table method |
137 |
|
|
138 |
|
* test/test_memory_table.py (TestMemoryTable.test_has_column): |
139 |
|
Test for the new table method HasColumn |
140 |
|
|
141 |
|
2003-05-06 Jonathan Coles <[email protected]> |
142 |
|
|
143 |
|
Addresses the "Selection Extent" wish of RTbug #1787. |
144 |
|
|
145 |
|
* Resources/Bitmaps/fulllayerextent.xpm, |
146 |
|
Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection |
147 |
|
extent. These are just place holders for the real bitmaps. |
148 |
|
|
149 |
|
* Thuban/Model/layer.py (Shape): Since a Shape is immutable only |
150 |
|
calculate the bounding box once (the first time compute_bbox() is |
151 |
|
called). |
152 |
|
(Layer.ShapesBoundingBox): New. Given a list of shape ids, return |
153 |
|
the bounding box for the shapes in lat/long coordinates. |
154 |
|
|
155 |
|
* Thuban/UI/mainwindow.py: Added new "Full selection extent" menu |
156 |
|
option. |
157 |
|
(MainWindow.has_selected_shapes): New. Returns true if there are |
158 |
|
any selected shapes. |
159 |
|
(MainWindow.FullSelectionExtent): New. Calls |
160 |
|
MapCanvas.FitSelectedToWindow() when the user selects the menu option. |
161 |
|
(_has_selected_shapes): New. Returns true if there are any |
162 |
|
selected shapes. |
163 |
|
|
164 |
|
* Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns |
165 |
|
true if there are any selected shapes. |
166 |
|
|
167 |
|
* Thuban/UI/view.py (MapCanvas): Added delegated method |
168 |
|
HasSelectedShapes. |
169 |
|
(MapCanvas.FitSelectedToWindow): New. Centers and scales any selected |
170 |
|
shapes on the canvas using the map projection (if any). |
171 |
|
|
172 |
|
* test/test_layer.py (TestLayer.test_arc_layer): Add some tests |
173 |
|
for Layer.ShapesBoundingBox(). |
174 |
|
|
175 |
|
2003-05-06 Bernhard Herzog <[email protected]> |
176 |
|
|
177 |
|
* Resources/Projections/defaults.proj: Fix spelling of Mercator |
178 |
|
|
179 |
|
2003-05-05 Jonathan Coles <[email protected]> |
180 |
|
|
181 |
|
Addresses the "Full Layer Extent" wish of RTbug #1787. |
182 |
|
|
183 |
|
* Resources/Projections/defaults.proj: Added UK National Grid. |
184 |
|
|
185 |
|
* Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option. |
186 |
|
(MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow() |
187 |
|
when the user selects the menu option. |
188 |
|
|
189 |
|
* Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and |
190 |
|
scales the given layer on the canvas using the map projection. |
191 |
|
|
192 |
|
2003-05-05 Bernhard Herzog <[email protected]> |
193 |
|
|
194 |
|
Convert the table implementations to a new table interface. All |
195 |
|
tables use a common mixin class to provide backwards compatibility |
196 |
|
until all table users have been updated. |
197 |
|
|
198 |
|
* Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to |
199 |
|
provide backwards compatibility for table classes implementing the |
200 |
|
new interface |
201 |
|
(DBFTable, MemoryTable): Implement the new table interface. Use |
202 |
|
OldTableInterfaceMixin as base for compatibility |
203 |
|
(DBFColumn, MemoryColumn): New. Column description for DBFTable |
204 |
|
and MemoryTable resp. |
205 |
|
|
206 |
|
* test/test_dbf_table.py: New. Test cases for the DBFTable with |
207 |
|
the new table interface. |
208 |
|
|
209 |
|
* test/test_memory_table.py: New. Test cases for the MemoryTable |
210 |
|
with the new table interface. |
211 |
|
|
212 |
|
* test/test_table.py: Document the all tests in this file as only |
213 |
|
for backwards compatibility. The equivalent tests for the new |
214 |
|
interface are in test_memory_table.py and test_dbf_table.py |
215 |
|
(MemoryTableTest.test_read): field_info should be returning tuples |
216 |
|
with four items |
217 |
|
(MemoryTableTest.test_write): Make doc-string a more precise. |
218 |
|
|
219 |
|
* Thuban/Model/transientdb.py (TransientTableBase): Convert to new |
220 |
|
table interface. Derive from from OldTableInterfaceMixin for |
221 |
|
compatibility. |
222 |
|
(TransientTableBase.create): New intance variable column_map to |
223 |
|
map from names and indices to column objects |
224 |
|
(TransientTable.create): Use the new table interface of the input |
225 |
|
table |
226 |
|
(AutoTransientTable): Convert to new table interface. Derive from |
227 |
|
from OldTableInterfaceMixin for compatibility. |
228 |
|
(AutoTransientTable.write_record): Removed. It's not implemented |
229 |
|
yet and we still have to decide how to handle writing with the new |
230 |
|
table and data framework. |
231 |
|
|
232 |
|
* test/test_transientdb.py |
233 |
|
(TestTransientTable.run_iceland_political_tests) |
234 |
|
(TestTransientTable.test_transient_joined_table): Use the new |
235 |
|
table interface |
236 |
|
|
237 |
|
2003-05-05 Jonathan Coles <[email protected]> |
238 |
|
|
239 |
|
This is namely a collection of UI updates to improve user interactivity. |
240 |
|
Tabbing between controls now exists and you can use ESC to close dialog |
241 |
|
boxes; ENTER will active the default button. |
242 |
|
|
243 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the |
244 |
|
order that the controls are created so that tabbing works correctly. |
245 |
|
(ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the |
246 |
|
wxDialog can handle the default button correctly. |
247 |
|
(ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the |
248 |
|
same reasons as for OnOK. |
249 |
|
(GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor |
250 |
|
when we ask the table for the maximum/minimum values of a field |
251 |
|
which could take a very long time. |
252 |
|
|
253 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Rearrange the |
254 |
|
order that the controls are created so that tabbing works correctly. |
255 |
|
(SelectPropertiesDialog.__init__): Rearrange the order that the |
256 |
|
controls are created so that tabbing works correctly. |
257 |
|
|
258 |
|
* Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it |
259 |
|
to derive from a wxDialog but behave like the original implementation |
260 |
|
which was derived from a wxFrame. wxDialog provides useful key |
261 |
|
handling functionality like ESC calling OnCancel and ENTER calling |
262 |
|
OnOK which is lost with wxFrame. |
263 |
|
|
264 |
|
* Thuban/UI/mainwindow.py: Add "..." to menu items that will open |
265 |
|
new dialogs. |
266 |
|
|
267 |
|
* Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the |
268 |
|
order that the controls are created so that tabbing works correctly. |
269 |
|
(ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour. |
270 |
|
(ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour. |
271 |
|
(ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour. |
272 |
|
(ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we |
273 |
|
can provide the "UK National Grid" as a default projection. |
274 |
|
(UTMPanel.__init__): Rearrange the order that the controls are |
275 |
|
created so that tabbing works correctly. |
276 |
|
|
277 |
|
2003-05-05 Bernhard Herzog <[email protected]> |
278 |
|
|
279 |
|
* extensions/thuban/wxproj.cpp: Fix some of the comments. |
280 |
|
(project_point): If a map projection but no layer projection is |
281 |
|
given, convert degrees to radians before applying the map |
282 |
|
projection. |
283 |
|
|
284 |
|
* Thuban/UI/tableview.py (TableGrid.disallow_messages) |
285 |
|
(TableGrid.allow_messages): New methods to make it possible to |
286 |
|
inhibit message sending. |
287 |
|
(TableGrid.issue): Only send the message if not inhibited. |
288 |
|
(LayerTableGrid.select_shape): Use the new methods to make sure |
289 |
|
that no ROW_SELECTED message is sent while we're updating the |
290 |
|
selected rows to match the selected shapes. |
291 |
|
|
292 |
|
2003-05-02 Jan-Oliver Wagner <[email protected]> |
293 |
|
|
294 |
|
Implementation of MemoryTable. |
295 |
|
|
296 |
|
* Thuban/Model/table.py (MemoryTable): New. Quite simple table |
297 |
|
implementation that operates on a list of tuples. All of the data |
298 |
|
are kept in the memory. |
299 |
|
|
300 |
|
* test/test_table.py (MemoryTableTest): New. |
301 |
|
|
302 |
|
* test/test_transientdb.py (SimpleTable): Removed. |
303 |
|
(TestTransientTable.test_transient_joined_table, |
304 |
|
(TestTransientTable.test_transient_table_read_twice): Replaced |
305 |
|
SimpleTable by MemoryTable. |
306 |
|
|
307 |
|
2003-04-30 Jonathan Coles <[email protected]> |
308 |
|
|
309 |
|
* Data/iceland_sample.thuban: Now contains correct projections |
310 |
|
for each of the layers. |
311 |
|
|
312 |
|
* Resources/Projections/defaults.proj: Geographic projection |
313 |
|
contains unit conversion parameter. |
314 |
|
|
315 |
|
2003-04-30 Jonathan Coles <[email protected]> |
316 |
|
|
317 |
|
The most important part of this putback is the projection changes. |
318 |
|
It should now be possible to specify the projection that a layer |
319 |
|
is in and then specify a different projection for the map. The |
320 |
|
projection dialog has an extra parameter for a geographic projection |
321 |
|
which lets the user select if the input is in degrees or radians. |
322 |
|
|
323 |
|
* Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring |
324 |
|
to say that the parameter is a tuple of unprojected |
325 |
|
points (which is what the callers to this method were assuming). |
326 |
|
Also, since the points are unprojected we need to projected them. |
327 |
|
|
328 |
|
* Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp, |
329 |
|
LegendTree.MoveCurrentItemDown): If the layer or any of the layer's |
330 |
|
groups are selected, move the layer up/down. Fixes RTbug #1833. |
331 |
|
|
332 |
|
* Thuban/UI/mainwindow.py: Move menu item map_rename up. |
333 |
|
|
334 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing |
335 |
|
parameter in call to SetClientData. |
336 |
|
(GeoPanel): Add support for selecting the units that the |
337 |
|
source data is in (Radians or Degrees). |
338 |
|
|
339 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize |
340 |
|
the rendering loop by reducing the number of if's, removing the |
341 |
|
unnecessary try/except block, and checking if the old group |
342 |
|
is the same as the new one (which happens a lot if there is |
343 |
|
no classification, or lots of shapes are in the same group). |
344 |
|
|
345 |
|
* Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block |
346 |
|
around the redraw routine to try to catch problems that the user |
347 |
|
may create by selecting invalid projections for the data set and |
348 |
|
map. Clears the display if there are any problems and prints the |
349 |
|
error. |
350 |
|
(MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled |
351 |
|
rectangle. |
352 |
|
|
353 |
|
* extensions/thuban/wxproj.cpp (project_point): First invert the |
354 |
|
supplied point (which should be in projected coordinates) using |
355 |
|
the layer's projection and then project the point using the |
356 |
|
map's projection. |
357 |
|
(project_points): Use project_point() to project each point. |
358 |
|
|
359 |
|
2003-04-30 Jan-Oliver Wagner <[email protected]> |
360 |
|
|
361 |
|
* Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug: |
362 |
|
don't set the Classification to None if the classfication field |
363 |
|
is None (ie only a DEFAULT). |
364 |
|
|
365 |
|
2003-04-30 Bernhard Herzog <[email protected]> |
366 |
|
|
367 |
|
* Thuban/UI/view.py: Fix some typos. |
368 |
|
|
369 |
|
* Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do |
370 |
|
not pop up the dialog if the selection becomes empty (this could |
371 |
|
happen if e.g. a new selection is opened while the identify tool |
372 |
|
is active and dialog had been closed) |
373 |
|
|
374 |
|
2003-04-30 Bernhard Herzog <[email protected]> |
375 |
|
|
376 |
|
* Thuban/Model/transientdb.py (TransientTableBase.__init__): New |
377 |
|
instance variable read_record_last_result |
378 |
|
(TransientTableBase.read_record): Make sure reading the same |
379 |
|
record twice works. The implementation uses the new instance |
380 |
|
variable read_record_last_result |
381 |
|
|
382 |
|
* test/test_transientdb.py |
383 |
|
(TestTransientTable.test_transient_table_read_twice): New test |
384 |
|
case for the above bug-fix. |
385 |
|
|
386 |
|
2003-04-29 Jonathan Coles <[email protected]> |
387 |
|
|
388 |
|
* Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832. |
389 |
|
|
390 |
|
* Thuban/UI/classgen.py: Remove all uses of Str2Num. |
391 |
|
|
392 |
|
* Thuban/UI/classifier.py: Remove all uses of Str2Num. |
393 |
|
(ClassTable.SetValueAsCustom): Rename keyword argument in |
394 |
|
ClassGroup* constructors to match argument name. |
395 |
|
|
396 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
397 |
|
|
398 |
|
* Thuban/Model/session.py (Session.Destroy): Explicitly close the |
399 |
|
transient DB if it exists to make sure it doesn't leave a journal |
400 |
|
file in the temp directory. |
401 |
|
|
402 |
|
* Thuban/Model/transientdb.py (TransientDatabase.close): Set |
403 |
|
self.conn to None after closing the connection to make sure it's |
404 |
|
not closed twice |
405 |
|
|
406 |
|
2003-04-29 Jonathan Coles <[email protected]> |
407 |
|
|
408 |
|
Add a visible parameter in the layer XML tag. The default value is |
409 |
|
"true". If anything other than "false" is specified we also assume |
410 |
|
"true". Addresses RTbug #1025. |
411 |
|
|
412 |
|
* Doc/thuban.dtd: Add visible parameter to a layer. |
413 |
|
|
414 |
|
* Thuban/Model/layer.py (BaseLayer.__init__): Change default value |
415 |
|
of visible from 1 to True. |
416 |
|
(Layer.__init__): Change default value of visible from 1 to True. |
417 |
|
|
418 |
|
* Thuban/Model/load.py (SessionLoader.start_layer): Read visible |
419 |
|
parameter. |
420 |
|
|
421 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save visible |
422 |
|
parameter. |
423 |
|
|
424 |
|
* test/test_load.py: Add new test data contents_test_visible. |
425 |
|
(LoadSessionTest.setUp): save test data. |
426 |
|
(LoadSessionTest.testLayerVisibility): Test if the visible flag |
427 |
|
is loaded correctly. |
428 |
|
|
429 |
|
* test/test_save.py (SaveSessionTest.testSingleLayer): Add test |
430 |
|
for saving an invisible layer. |
431 |
|
|
432 |
|
2003-04-29 Jonathan Coles <[email protected]> |
433 |
|
|
434 |
|
* Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the |
435 |
|
legend dialog box and tell it to change its map to the one |
436 |
|
supplied to SetMap(). Fixes RTbug #1770. |
437 |
|
|
438 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
439 |
|
|
440 |
|
Next step of table implementation. Introduce a transient database |
441 |
|
using SQLite that some of the data is copied to on demand. This |
442 |
|
allows us to do joins and other operations that require an index |
443 |
|
for good performance with reasonable efficiency. Thuban now needs |
444 |
|
SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I |
445 |
|
haven't tested that. |
446 |
|
|
447 |
|
* Thuban/Model/transientdb.py: New. Transient database |
448 |
|
implementation. |
449 |
|
|
450 |
|
* test/test_transientdb.py: New. Tests for the transient DB |
451 |
|
classes. |
452 |
|
|
453 |
|
* Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New |
454 |
|
classes to help automatically remove temporary files and |
455 |
|
directories. |
456 |
|
(Session.__init__): New instance variables temp_dir for the |
457 |
|
temporary directory and transient_db for the SQLite database |
458 |
|
(Session.temp_directory): New. Create a temporary directory if not |
459 |
|
yet done and return its name. Use AutoRemoveDir to have it |
460 |
|
automatically deleted |
461 |
|
(Session.TransientDB): Instantiate the transient database if not |
462 |
|
done yet and return it. |
463 |
|
|
464 |
|
* Thuban/Model/data.py (ShapefileStore.__init__): Use an |
465 |
|
AutoTransientTable so that data is copied to the transient DB on |
466 |
|
demand. |
467 |
|
(SimpleStore): New class that simply combines a table and a |
468 |
|
shapefile |
469 |
|
|
470 |
|
* Thuban/Model/table.py (Table, DBFTable): Rename Table into |
471 |
|
DBFTable and update its doc-string to reflect the fact that this |
472 |
|
is only the table interface to a DBF file. Table is now an alias |
473 |
|
for DBFTable for temporary backwards compatibility. |
474 |
|
|
475 |
|
* Thuban/UI/application.py (ThubanApplication.OnExit): Make sure |
476 |
|
the last reference to the session goes away so that the temporary |
477 |
|
files are removed properly. |
478 |
|
|
479 |
|
* test/test_load.py (LoadSessionTest.tearDown): Remove the |
480 |
|
reference to the session to make sure the temporary files are |
481 |
|
removed. |
482 |
|
|
483 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
484 |
|
|
485 |
|
* Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn |
486 |
|
the __parser instance variable into a normal local variable in |
487 |
|
read. It's only used there and read will never be called more than |
488 |
|
once. Plus it introduces a reference cycle that keeps can keep the |
489 |
|
session object alive for a long time. |
490 |
|
|
491 |
|
2003-04-29 Jonathan Coles <[email protected]> |
492 |
|
|
493 |
|
* Thuban/Model/proj.py (Projection): Removed Set*() methods to make |
494 |
|
Projection an immutable item. Fixes RTbug #1825. |
495 |
|
(Projection.__init__): Initialize instance variables here. |
496 |
|
(ProjFile.Replace): New. Replace the given projection object with |
497 |
|
the new projection object. This solves the problem of needing the |
498 |
|
mutator Projection.SetProjection() in the ProjFrame class and |
499 |
|
allows a projection to change parameters without changing its |
500 |
|
location in the file. |
501 |
|
|
502 |
|
* Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should |
503 |
|
be of type wxSAVE and should verify overwriting a file. |
504 |
|
|
505 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new |
506 |
|
ProjFile.Replace() method instead of the mutator |
507 |
|
Projection.SetProjection(). Also requires that we reassign the |
508 |
|
client data to the new projection. |
509 |
|
|
510 |
|
* test/test_proj.py (TestProjection.test): Test GetName() and |
511 |
|
GetAllParameters() |
512 |
|
(TestProjFile.test): Remove tests for Set*() methods. Add tests |
513 |
|
for Replace(). |
514 |
|
|
515 |
|
2003-04-25 Jonathan Coles <[email protected]> |
516 |
|
|
517 |
|
* Thuban/Model/save.py (SessionSaver.write_projection): Make sure |
518 |
|
to save the name of the projection. |
519 |
|
|
520 |
|
* test/test_save.py (SaveSessionTest.testLayerProjection): New |
521 |
|
test to verify layer projections are saved correctly. |
522 |
|
|
523 |
|
2003-04-25 Jonathan Coles <[email protected]> |
524 |
|
|
525 |
|
* Thuban/Model/proj.py (Projection.SetName): Set the name |
526 |
|
to "Unknown" if name is None. |
527 |
|
(Projection.SetAllParameters): New. Set the projection's |
528 |
|
parameter list to the one supplied. |
529 |
|
(Projection.SetProjection): New. Set the projection's |
530 |
|
properties to those of the supplied Projection. |
531 |
|
|
532 |
|
* Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set |
533 |
|
the dialog title to include the map's title. |
534 |
|
(MainWindow.LayerProjection): Set the dialog title to include |
535 |
|
the layer's title. |
536 |
|
|
537 |
|
* Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate |
538 |
|
error dialogs into a single method call. |
539 |
|
(ProjFrame.__VerifyButtons): Add more states to check. |
540 |
|
(ProjFrame.__GetProjection): Return the current state of an |
541 |
|
edited projection or None. |
542 |
|
(ProjFrame.__FillAvailList): Remove checks for states that |
543 |
|
shouldn't exist. |
544 |
|
(ProjFrame._OnNew): Clear all selected items and supply |
545 |
|
a projection panel if necessary. |
546 |
|
|
547 |
|
* test/test_proj.py (TestProjFile.test): Add tests for |
548 |
|
ProjFile.SetAllParameters, ProjFile.SetProjection, |
549 |
|
ProjFile.SetName. |
550 |
|
|
551 |
|
2003-04-25 Jonathan Coles <[email protected]> |
552 |
|
|
553 |
|
* Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now |
554 |
|
takes an optional argument to select the current projection. |
555 |
|
This does not guarantee that the item is visible due to |
556 |
|
limited wxWindows functionality. Fixes RTBug #1821. |
557 |
|
|
558 |
|
2003-04-25 Jonathan Coles <[email protected]> |
559 |
|
|
560 |
|
* Thuban/Model/load.py (SessionLoader.start_projection): Remember |
561 |
|
the projection name and use it when constructing the Projection |
562 |
|
object. |
563 |
|
|
564 |
|
* Thuban/Model/proj.py (Projection.__init__): Change the default |
565 |
|
value for 'name' to None and then test if name is equal to None |
566 |
|
in the body of the constructor. This way the caller doesn't have to |
567 |
|
know what the default value should be. Namely, useful in load.py |
568 |
|
where we have to pick a default value if the 'name' parameter |
569 |
|
doesn't exist in the XML file. |
570 |
|
|
571 |
|
* test/test_load.py (LoadSessionTest.testLayerProjection): New. |
572 |
|
Tests a file where a layer has a projection. |
573 |
|
|
574 |
|
2003-04-25 Jonathan Coles <[email protected]> |
575 |
|
|
576 |
|
* Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the |
577 |
|
tree for projection information. |
578 |
|
|
579 |
|
* Thuban/Model/load.py (XMLReader.GetFilename): Renamed from |
580 |
|
XMLReader.GetFileName. |
581 |
|
(SessionLoader): Added support for loading projection tags that |
582 |
|
appear inside a layer. |
583 |
|
|
584 |
|
* Thuban/Model/proj.py (ProjFile): Document the class. Move |
585 |
|
back to using a list because the order of the projections in |
586 |
|
the file is important to maintain. Fixes RTbug #1817. |
587 |
|
|
588 |
|
* Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName |
589 |
|
to ProjFile.GetFilename. |
590 |
|
|
591 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save projection |
592 |
|
information. |
593 |
|
|
594 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from |
595 |
|
ProjFrame._OnSaveAs. Removed old dead code from previous |
596 |
|
implementation. |
597 |
|
(ProjFrame._OnExport): Add support for exporting more than one |
598 |
|
projection to a single file. |
599 |
|
(ProjFrame.__FillAvailList): use string formatting (% operator) |
600 |
|
to build strings that are (partly) translated. Fixes RTbug #1818. |
601 |
|
|
602 |
|
* test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile |
603 |
|
class. |
604 |
|
|
605 |
|
2003-04-24 Bernhard Herzog <[email protected]> |
606 |
|
|
607 |
|
* po/es.po: Updated Spanish translation by Daniel Calvelo Aros |
608 |
|
|
609 |
|
* po/fr.po: New. French translation by Daniel Calvelo Aros |
610 |
|
|
611 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate |
612 |
|
empty strings. |
613 |
|
|
614 |
|
2003-04-24 Jonathan Coles <[email protected]> |
615 |
|
|
616 |
|
* Thuban/Model/layer.py (Layer.GetProjection): New. Needed to |
617 |
|
implement the interface that the ProjFrame dialog expects. |
618 |
|
|
619 |
|
* Thuban/Model/proj.py (Projection.SetName): New. Allows the |
620 |
|
name of the projection to be changed. |
621 |
|
(ProjFile): Use a dictionary instead of a list so that removing |
622 |
|
projections is easier and we are sure about uniqueness. |
623 |
|
(ProjFile.Remove): Remove the given projection object. |
624 |
|
|
625 |
|
* Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles): |
626 |
|
Return a list with only one projection file instead of searching for |
627 |
|
any projection file. This simplifies many things if the user can |
628 |
|
only have one system file and one user file. |
629 |
|
|
630 |
|
* Thuban/UI/classgen.py: Change all references to |
631 |
|
genCombo to genChoice. |
632 |
|
|
633 |
|
* Thuban/UI/mainwindow.py: Add a Projection option under the |
634 |
|
layer menu. |
635 |
|
(MainWindow.LayerProjection): New. Open up a projection window |
636 |
|
for a layer. |
637 |
|
|
638 |
|
* Thuban/UI/projdialog.py: Large changes to how the dialog is |
639 |
|
laid out. Use three panels instead of one. One for the list of |
640 |
|
projections, one for the edit controls, and one for the buttons. |
641 |
|
Fixed resizing problems so that the dialog resizes correctly |
642 |
|
when the projection panel changes. Added import/export, save, and |
643 |
|
new buttons/functionality. |
644 |
|
|
645 |
|
2003-04-24 Bernhard Herzog <[email protected]> |
646 |
|
|
647 |
|
First step towards table management. Introduce a simple data |
648 |
|
abstraction so that we replace the data a layer uses more easily |
649 |
|
in the next step. |
650 |
|
|
651 |
|
* Thuban/Model/data.py: New file with a simple data abstraction |
652 |
|
that bundles shapefile and dbffile into one object. |
653 |
|
|
654 |
|
* Thuban/Model/session.py (Session.OpenShapefile): New method to |
655 |
|
open shapefiles and return a shape store object |
656 |
|
|
657 |
|
* Thuban/Model/layer.py (Layer.__init__): Pass the data as a store |
658 |
|
object instead of a shapefile filename. This introduces a new |
659 |
|
instance variable store holding the datastore. For intermediate |
660 |
|
backwards compatibility keep the old instance variables. |
661 |
|
(open_shapefile): Removed. No longer needed with the shape store. |
662 |
|
(Layer.SetShapeStore, Layer.ShapeStore): New methods to set and |
663 |
|
get the shape store used by a layer. |
664 |
|
(Layer.Destroy): No need to explicitly destroy the shapefile or |
665 |
|
table anymore. |
666 |
|
|
667 |
|
* Thuban/UI/mainwindow.py (MainWindow.AddLayer) |
668 |
|
(MainWindow.AddLayer): Use the session's OpenShapefile method to |
669 |
|
open shapefiles |
670 |
|
|
671 |
|
* Thuban/Model/load.py (ProcessSession.start_layer): Use the |
672 |
|
session's OpenShapefile method to open shapefiles |
673 |
|
|
674 |
|
* test/test_classification.py |
675 |
|
(TestClassification.test_classification): Use the session's |
676 |
|
OpenShapefile method to open shapefiles and build the filename in |
677 |
|
a more platform independed way |
678 |
|
|
679 |
|
* test/test_layer.py (TestLayer.setUp, TestLayer.tearDown): |
680 |
|
Implement to have a session to use in the tests |
681 |
|
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer) |
682 |
|
(TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the |
683 |
|
session's OpenShapefile method to open shapefiles |
684 |
|
(TestLayerLegend.setUp): Instantiate a session so that we can use |
685 |
|
it to open shapefiles. |
686 |
|
(TestLayerLegend.tearDown): Make sure that all references to |
687 |
|
layers and session are removed otherwise we may get a resource |
688 |
|
leak |
689 |
|
|
690 |
|
* test/test_map.py (TestMapAddLayer.test_add_layer) |
691 |
|
(TestMapWithContents.setUp): Instantiate a session so that we can |
692 |
|
use it to open shapefiles. |
693 |
|
(TestMapWithContents.tearDown): Make sure that all references to |
694 |
|
layers, maps and sessions are removed otherwise we may get a |
695 |
|
resource leak |
696 |
|
("__main__"): use support.run_tests() so that more info about |
697 |
|
uncollected garbage is printed |
698 |
|
|
699 |
|
* test/test_save.py (SaveSessionTest.testSingleLayer): Use the |
700 |
|
session's OpenShapefile method to open shapefiles |
701 |
|
("__main__"): use support.run_tests() so that more info about |
702 |
|
uncollected garbage is printed |
703 |
|
|
704 |
|
* test/test_selection.py (TestSelection.tearDown): Make sure that |
705 |
|
all references to the session and the selection are removed |
706 |
|
otherwise we may get a resource leak |
707 |
|
(TestSelection.get_layer): Instantiate a session so that we can |
708 |
|
use it to open shapefiles. |
709 |
|
("__main__"): use support.run_tests() so that more info about |
710 |
|
uncollected garbage is printed |
711 |
|
|
712 |
|
* test/test_session.py (TestSessionBase.tearDown) |
713 |
|
(TestSessionWithContent.tearDown): Make sure that all references |
714 |
|
to the session and layers are removed otherwise we may get a |
715 |
|
resource leak |
716 |
|
(TestSessionWithContent.setUp): Use the session's OpenShapefile |
717 |
|
method to open shapefiles |
718 |
|
|
719 |
2003-04-24 Jonathan Coles <[email protected]> |
2003-04-24 Jonathan Coles <[email protected]> |
720 |
|
|
721 |
* Thuban/Model/load.py (XMLReader.read): Should have been checking |
* Thuban/Model/load.py (XMLReader.read): Should have been checking |