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]> |
2003-04-29 Jonathan Coles <[email protected]> |
407 |
|
|
408 |
Add a visible parameter in the layer XML tag. The default value is |
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 |
"true". If anything other than "false" is specified we also assume |
410 |
"true". |
"true". Addresses RTbug #1025. |
411 |
|
|
412 |
* Doc/thuban.dtd: Add visible parameter to a layer. |
* Doc/thuban.dtd: Add visible parameter to a layer. |
413 |
|
|