1 |
|
2003-05-08 Frank Koormann <[email protected]> |
2 |
|
|
3 |
|
* Thuban/UI/legend.py (ScalebarBitmap.SetCanvas): |
4 |
|
Initialize ScaleBar with canvas.map |
5 |
|
|
6 |
|
* Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New, |
7 |
|
round intervals to display smarter lengths |
8 |
|
(ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a |
9 |
|
layer. If the maps has no projection applied grey the scalebar. |
10 |
|
|
11 |
|
2003-05-07 Frank Koormann <[email protected]> |
12 |
|
|
13 |
|
Basic Scalebar features added. |
14 |
|
|
15 |
|
* Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering. |
16 |
|
|
17 |
|
* Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap |
18 |
|
(ScaleBarBitmap): New, links the scalebar bitmap with view messages |
19 |
|
and the renderer. |
20 |
|
|
21 |
|
* Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED. |
22 |
|
|
23 |
|
* Thuban/UI/messages.py: SCALE_CHANGED added. |
24 |
|
|
25 |
|
2003-05-07 Bernhard Herzog <[email protected]> |
26 |
|
|
27 |
|
* Thuban/Model/session.py (Session.__init__): New instance |
28 |
|
variable shapestores to hold a list of all open shapestore objects |
29 |
|
(Session.ShapeStores): New. Accessor method for the shapestores |
30 |
|
list. |
31 |
|
(Session._add_shapestore, Session._clean_weak_store_refs): New. |
32 |
|
Internal methods to maintain the shapestores list. |
33 |
|
(Session.Tables): New. Return all tables open in the session. |
34 |
|
(Session.OpenShapefile): Insert the new ShapeStore into the |
35 |
|
shapestores list. |
36 |
|
|
37 |
|
* test/test_session.py (TestSessionSimple.test_initial_state): Add |
38 |
|
tests for ShapeStores and Tables |
39 |
|
(TestSessionWithContent.test_shape_stores) |
40 |
|
(TestSessionWithContent.test_tables): New. Test cases for |
41 |
|
ShapeStores and Tables |
42 |
|
|
43 |
|
2003-05-07 Bernhard Herzog <[email protected]> |
44 |
|
|
45 |
|
* Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict): |
46 |
|
Add comments about the optimizations used. |
47 |
|
(AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New. |
48 |
|
Implement the ReadValue table interface method. |
49 |
|
|
50 |
|
* test/test_transientdb.py |
51 |
|
(TestTransientTable.run_iceland_political_tests) |
52 |
|
(TestTransientTable.test_transient_joined_table): Add tests for |
53 |
|
ReadValue |
54 |
|
|
55 |
|
2003-05-07 Frank Koormann <[email protected]> |
56 |
|
|
57 |
|
* Resources/Bitmaps/fulllayerextent.xpm, |
58 |
|
Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with |
59 |
|
new icons. |
60 |
|
|
61 |
|
2003-05-06 Bernhard Herzog <[email protected]> |
62 |
|
|
63 |
|
* Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery): |
64 |
|
New. Simply delegate to the transient table's version. |
65 |
|
|
66 |
|
* test/test_transientdb.py |
67 |
|
(TestTransientTable.test_auto_transient_table_query): New. Test |
68 |
|
case for AutoTransientTable's SimpleQuery |
69 |
|
|
70 |
|
2003-05-06 Bernhard Herzog <[email protected]> |
71 |
|
|
72 |
|
* Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery): |
73 |
|
Implement a simple query method for the query dialog |
74 |
|
(TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds |
75 |
|
the row index or shapeid. |
76 |
|
(TransientTable.create): Insert the right value of the row index |
77 |
|
(TransientJoinedTable.create): Copy the row index of the left |
78 |
|
table to the joined result table |
79 |
|
|
80 |
|
* test/test_transientdb.py |
81 |
|
(TestTransientTable.test_transient_table_read_twice): Fix |
82 |
|
doc-string |
83 |
|
(TestTransientTable.test_transient_table_query): New. Test for the |
84 |
|
SimpleQuery method |
85 |
|
|
86 |
|
2003-05-06 Bernhard Herzog <[email protected]> |
87 |
|
|
88 |
|
Convert all table users to use the new table interface. This only |
89 |
|
covers Thuban itself, not GREAT-ER or other applications built on |
90 |
|
Thuban yet, so the compatibility interface stays in place for the |
91 |
|
time being but it now issues DeprecationWarnings. |
92 |
|
|
93 |
|
Finally, the new Table interface has a new method, HasColumn. |
94 |
|
|
95 |
|
* Thuban/Model/table.py (OldTableInterfaceMixin): All methods |
96 |
|
issue deprecation warnings when they're. The warnings refer to the |
97 |
|
caller of the method. |
98 |
|
(OldTableInterfaceMixin.__deprecation_warning): New. Helper method |
99 |
|
for the deprecation warnings |
100 |
|
|
101 |
|
* test/test_table.py: Ignore the deprecation warnings for the old |
102 |
|
table in the tests in this module. The purpose of the tests is to |
103 |
|
test the old interface, after all. |
104 |
|
|
105 |
|
* test/test_transientdb.py |
106 |
|
(TestTransientTable.run_iceland_political_tests): Use the |
107 |
|
constants for the types. Add a test for HasColumn |
108 |
|
(TestTransientTable.test_transient_joined_table): Adapt to new |
109 |
|
table interface. Add a test for HasColumn |
110 |
|
(TestTransientTable.test_transient_table_read_twice): Adapt to new |
111 |
|
table interface |
112 |
|
|
113 |
|
* Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue): |
114 |
|
Adapt to new table interface |
115 |
|
|
116 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to |
117 |
|
new table interface |
118 |
|
|
119 |
|
* Thuban/UI/controls.py (RecordListCtrl.fill_list) |
120 |
|
(RecordTable.SetTable): Adapt to new table interface |
121 |
|
|
122 |
|
* Thuban/UI/classifier.py (Classifier.__init__) |
123 |
|
(Classifier.__init__): Adapt to new table interface |
124 |
|
|
125 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__) |
126 |
|
(GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt |
127 |
|
to new table interface |
128 |
|
|
129 |
|
* Thuban/Model/transientdb.py (TransientTableBase.HasColumn) |
130 |
|
(AutoTransientTable.HasColumn): Implement the new table interface |
131 |
|
method |
132 |
|
(AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange) |
133 |
|
(AutoTransientTable.UniqueValues): Adapt to new table interface |
134 |
|
|
135 |
|
* Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType): |
136 |
|
Adapt to new table interface |
137 |
|
|
138 |
|
* test/test_layer.py (TestLayer.open_shapefile): Helper method to |
139 |
|
simplify opening shapefiles a bit easier. |
140 |
|
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer) |
141 |
|
(TestLayer.test_point_layer): Use the new helper method |
142 |
|
(TestLayer.test_get_field_type): New. Test for the GetFieldType |
143 |
|
method |
144 |
|
|
145 |
|
* test/test_dbf_table.py (TestDBFTable.test_has_column): Test for |
146 |
|
the new table method |
147 |
|
|
148 |
|
* test/test_memory_table.py (TestMemoryTable.test_has_column): |
149 |
|
Test for the new table method HasColumn |
150 |
|
|
151 |
|
2003-05-06 Jonathan Coles <[email protected]> |
152 |
|
|
153 |
|
Addresses the "Selection Extent" wish of RTbug #1787. |
154 |
|
|
155 |
|
* Resources/Bitmaps/fulllayerextent.xpm, |
156 |
|
Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection |
157 |
|
extent. These are just place holders for the real bitmaps. |
158 |
|
|
159 |
|
* Thuban/Model/layer.py (Shape): Since a Shape is immutable only |
160 |
|
calculate the bounding box once (the first time compute_bbox() is |
161 |
|
called). |
162 |
|
(Layer.ShapesBoundingBox): New. Given a list of shape ids, return |
163 |
|
the bounding box for the shapes in lat/long coordinates. |
164 |
|
|
165 |
|
* Thuban/UI/mainwindow.py: Added new "Full selection extent" menu |
166 |
|
option. |
167 |
|
(MainWindow.has_selected_shapes): New. Returns true if there are |
168 |
|
any selected shapes. |
169 |
|
(MainWindow.FullSelectionExtent): New. Calls |
170 |
|
MapCanvas.FitSelectedToWindow() when the user selects the menu option. |
171 |
|
(_has_selected_shapes): New. Returns true if there are any |
172 |
|
selected shapes. |
173 |
|
|
174 |
|
* Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns |
175 |
|
true if there are any selected shapes. |
176 |
|
|
177 |
|
* Thuban/UI/view.py (MapCanvas): Added delegated method |
178 |
|
HasSelectedShapes. |
179 |
|
(MapCanvas.FitSelectedToWindow): New. Centers and scales any selected |
180 |
|
shapes on the canvas using the map projection (if any). |
181 |
|
|
182 |
|
* test/test_layer.py (TestLayer.test_arc_layer): Add some tests |
183 |
|
for Layer.ShapesBoundingBox(). |
184 |
|
|
185 |
|
2003-05-06 Bernhard Herzog <[email protected]> |
186 |
|
|
187 |
|
* Resources/Projections/defaults.proj: Fix spelling of Mercator |
188 |
|
|
189 |
|
2003-05-05 Jonathan Coles <[email protected]> |
190 |
|
|
191 |
|
Addresses the "Full Layer Extent" wish of RTbug #1787. |
192 |
|
|
193 |
|
* Resources/Projections/defaults.proj: Added UK National Grid. |
194 |
|
|
195 |
|
* Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option. |
196 |
|
(MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow() |
197 |
|
when the user selects the menu option. |
198 |
|
|
199 |
|
* Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and |
200 |
|
scales the given layer on the canvas using the map projection. |
201 |
|
|
202 |
|
2003-05-05 Bernhard Herzog <[email protected]> |
203 |
|
|
204 |
|
Convert the table implementations to a new table interface. All |
205 |
|
tables use a common mixin class to provide backwards compatibility |
206 |
|
until all table users have been updated. |
207 |
|
|
208 |
|
* Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to |
209 |
|
provide backwards compatibility for table classes implementing the |
210 |
|
new interface |
211 |
|
(DBFTable, MemoryTable): Implement the new table interface. Use |
212 |
|
OldTableInterfaceMixin as base for compatibility |
213 |
|
(DBFColumn, MemoryColumn): New. Column description for DBFTable |
214 |
|
and MemoryTable resp. |
215 |
|
|
216 |
|
* test/test_dbf_table.py: New. Test cases for the DBFTable with |
217 |
|
the new table interface. |
218 |
|
|
219 |
|
* test/test_memory_table.py: New. Test cases for the MemoryTable |
220 |
|
with the new table interface. |
221 |
|
|
222 |
|
* test/test_table.py: Document the all tests in this file as only |
223 |
|
for backwards compatibility. The equivalent tests for the new |
224 |
|
interface are in test_memory_table.py and test_dbf_table.py |
225 |
|
(MemoryTableTest.test_read): field_info should be returning tuples |
226 |
|
with four items |
227 |
|
(MemoryTableTest.test_write): Make doc-string a more precise. |
228 |
|
|
229 |
|
* Thuban/Model/transientdb.py (TransientTableBase): Convert to new |
230 |
|
table interface. Derive from from OldTableInterfaceMixin for |
231 |
|
compatibility. |
232 |
|
(TransientTableBase.create): New intance variable column_map to |
233 |
|
map from names and indices to column objects |
234 |
|
(TransientTable.create): Use the new table interface of the input |
235 |
|
table |
236 |
|
(AutoTransientTable): Convert to new table interface. Derive from |
237 |
|
from OldTableInterfaceMixin for compatibility. |
238 |
|
(AutoTransientTable.write_record): Removed. It's not implemented |
239 |
|
yet and we still have to decide how to handle writing with the new |
240 |
|
table and data framework. |
241 |
|
|
242 |
|
* test/test_transientdb.py |
243 |
|
(TestTransientTable.run_iceland_political_tests) |
244 |
|
(TestTransientTable.test_transient_joined_table): Use the new |
245 |
|
table interface |
246 |
|
|
247 |
|
2003-05-05 Jonathan Coles <[email protected]> |
248 |
|
|
249 |
|
This is namely a collection of UI updates to improve user interactivity. |
250 |
|
Tabbing between controls now exists and you can use ESC to close dialog |
251 |
|
boxes; ENTER will active the default button. |
252 |
|
|
253 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the |
254 |
|
order that the controls are created so that tabbing works correctly. |
255 |
|
(ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the |
256 |
|
wxDialog can handle the default button correctly. |
257 |
|
(ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the |
258 |
|
same reasons as for OnOK. |
259 |
|
(GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor |
260 |
|
when we ask the table for the maximum/minimum values of a field |
261 |
|
which could take a very long time. |
262 |
|
|
263 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Rearrange the |
264 |
|
order that the controls are created so that tabbing works correctly. |
265 |
|
(SelectPropertiesDialog.__init__): Rearrange the order that the |
266 |
|
controls are created so that tabbing works correctly. |
267 |
|
|
268 |
|
* Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it |
269 |
|
to derive from a wxDialog but behave like the original implementation |
270 |
|
which was derived from a wxFrame. wxDialog provides useful key |
271 |
|
handling functionality like ESC calling OnCancel and ENTER calling |
272 |
|
OnOK which is lost with wxFrame. |
273 |
|
|
274 |
|
* Thuban/UI/mainwindow.py: Add "..." to menu items that will open |
275 |
|
new dialogs. |
276 |
|
|
277 |
|
* Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the |
278 |
|
order that the controls are created so that tabbing works correctly. |
279 |
|
(ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour. |
280 |
|
(ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour. |
281 |
|
(ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour. |
282 |
|
(ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we |
283 |
|
can provide the "UK National Grid" as a default projection. |
284 |
|
(UTMPanel.__init__): Rearrange the order that the controls are |
285 |
|
created so that tabbing works correctly. |
286 |
|
|
287 |
|
2003-05-05 Bernhard Herzog <[email protected]> |
288 |
|
|
289 |
|
* extensions/thuban/wxproj.cpp: Fix some of the comments. |
290 |
|
(project_point): If a map projection but no layer projection is |
291 |
|
given, convert degrees to radians before applying the map |
292 |
|
projection. |
293 |
|
|
294 |
|
* Thuban/UI/tableview.py (TableGrid.disallow_messages) |
295 |
|
(TableGrid.allow_messages): New methods to make it possible to |
296 |
|
inhibit message sending. |
297 |
|
(TableGrid.issue): Only send the message if not inhibited. |
298 |
|
(LayerTableGrid.select_shape): Use the new methods to make sure |
299 |
|
that no ROW_SELECTED message is sent while we're updating the |
300 |
|
selected rows to match the selected shapes. |
301 |
|
|
302 |
|
2003-05-02 Jan-Oliver Wagner <[email protected]> |
303 |
|
|
304 |
|
Implementation of MemoryTable. |
305 |
|
|
306 |
|
* Thuban/Model/table.py (MemoryTable): New. Quite simple table |
307 |
|
implementation that operates on a list of tuples. All of the data |
308 |
|
are kept in the memory. |
309 |
|
|
310 |
|
* test/test_table.py (MemoryTableTest): New. |
311 |
|
|
312 |
|
* test/test_transientdb.py (SimpleTable): Removed. |
313 |
|
(TestTransientTable.test_transient_joined_table, |
314 |
|
(TestTransientTable.test_transient_table_read_twice): Replaced |
315 |
|
SimpleTable by MemoryTable. |
316 |
|
|
317 |
|
2003-04-30 Jonathan Coles <[email protected]> |
318 |
|
|
319 |
|
* Data/iceland_sample.thuban: Now contains correct projections |
320 |
|
for each of the layers. |
321 |
|
|
322 |
|
* Resources/Projections/defaults.proj: Geographic projection |
323 |
|
contains unit conversion parameter. |
324 |
|
|
325 |
|
2003-04-30 Jonathan Coles <[email protected]> |
326 |
|
|
327 |
|
The most important part of this putback is the projection changes. |
328 |
|
It should now be possible to specify the projection that a layer |
329 |
|
is in and then specify a different projection for the map. The |
330 |
|
projection dialog has an extra parameter for a geographic projection |
331 |
|
which lets the user select if the input is in degrees or radians. |
332 |
|
|
333 |
|
* Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring |
334 |
|
to say that the parameter is a tuple of unprojected |
335 |
|
points (which is what the callers to this method were assuming). |
336 |
|
Also, since the points are unprojected we need to projected them. |
337 |
|
|
338 |
|
* Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp, |
339 |
|
LegendTree.MoveCurrentItemDown): If the layer or any of the layer's |
340 |
|
groups are selected, move the layer up/down. Fixes RTbug #1833. |
341 |
|
|
342 |
|
* Thuban/UI/mainwindow.py: Move menu item map_rename up. |
343 |
|
|
344 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing |
345 |
|
parameter in call to SetClientData. |
346 |
|
(GeoPanel): Add support for selecting the units that the |
347 |
|
source data is in (Radians or Degrees). |
348 |
|
|
349 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize |
350 |
|
the rendering loop by reducing the number of if's, removing the |
351 |
|
unnecessary try/except block, and checking if the old group |
352 |
|
is the same as the new one (which happens a lot if there is |
353 |
|
no classification, or lots of shapes are in the same group). |
354 |
|
|
355 |
|
* Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block |
356 |
|
around the redraw routine to try to catch problems that the user |
357 |
|
may create by selecting invalid projections for the data set and |
358 |
|
map. Clears the display if there are any problems and prints the |
359 |
|
error. |
360 |
|
(MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled |
361 |
|
rectangle. |
362 |
|
|
363 |
|
* extensions/thuban/wxproj.cpp (project_point): First invert the |
364 |
|
supplied point (which should be in projected coordinates) using |
365 |
|
the layer's projection and then project the point using the |
366 |
|
map's projection. |
367 |
|
(project_points): Use project_point() to project each point. |
368 |
|
|
369 |
|
2003-04-30 Jan-Oliver Wagner <[email protected]> |
370 |
|
|
371 |
|
* Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug: |
372 |
|
don't set the Classification to None if the classfication field |
373 |
|
is None (ie only a DEFAULT). |
374 |
|
|
375 |
|
2003-04-30 Bernhard Herzog <[email protected]> |
376 |
|
|
377 |
|
* Thuban/UI/view.py: Fix some typos. |
378 |
|
|
379 |
|
* Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do |
380 |
|
not pop up the dialog if the selection becomes empty (this could |
381 |
|
happen if e.g. a new selection is opened while the identify tool |
382 |
|
is active and dialog had been closed) |
383 |
|
|
384 |
|
2003-04-30 Bernhard Herzog <[email protected]> |
385 |
|
|
386 |
|
* Thuban/Model/transientdb.py (TransientTableBase.__init__): New |
387 |
|
instance variable read_record_last_result |
388 |
|
(TransientTableBase.read_record): Make sure reading the same |
389 |
|
record twice works. The implementation uses the new instance |
390 |
|
variable read_record_last_result |
391 |
|
|
392 |
|
* test/test_transientdb.py |
393 |
|
(TestTransientTable.test_transient_table_read_twice): New test |
394 |
|
case for the above bug-fix. |
395 |
|
|
396 |
|
2003-04-29 Jonathan Coles <[email protected]> |
397 |
|
|
398 |
|
* Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832. |
399 |
|
|
400 |
|
* Thuban/UI/classgen.py: Remove all uses of Str2Num. |
401 |
|
|
402 |
|
* Thuban/UI/classifier.py: Remove all uses of Str2Num. |
403 |
|
(ClassTable.SetValueAsCustom): Rename keyword argument in |
404 |
|
ClassGroup* constructors to match argument name. |
405 |
|
|
406 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
407 |
|
|
408 |
|
* Thuban/Model/session.py (Session.Destroy): Explicitly close the |
409 |
|
transient DB if it exists to make sure it doesn't leave a journal |
410 |
|
file in the temp directory. |
411 |
|
|
412 |
|
* Thuban/Model/transientdb.py (TransientDatabase.close): Set |
413 |
|
self.conn to None after closing the connection to make sure it's |
414 |
|
not closed twice |
415 |
|
|
416 |
|
2003-04-29 Jonathan Coles <[email protected]> |
417 |
|
|
418 |
|
Add a visible parameter in the layer XML tag. The default value is |
419 |
|
"true". If anything other than "false" is specified we also assume |
420 |
|
"true". Addresses RTbug #1025. |
421 |
|
|
422 |
|
* Doc/thuban.dtd: Add visible parameter to a layer. |
423 |
|
|
424 |
|
* Thuban/Model/layer.py (BaseLayer.__init__): Change default value |
425 |
|
of visible from 1 to True. |
426 |
|
(Layer.__init__): Change default value of visible from 1 to True. |
427 |
|
|
428 |
|
* Thuban/Model/load.py (SessionLoader.start_layer): Read visible |
429 |
|
parameter. |
430 |
|
|
431 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save visible |
432 |
|
parameter. |
433 |
|
|
434 |
|
* test/test_load.py: Add new test data contents_test_visible. |
435 |
|
(LoadSessionTest.setUp): save test data. |
436 |
|
(LoadSessionTest.testLayerVisibility): Test if the visible flag |
437 |
|
is loaded correctly. |
438 |
|
|
439 |
|
* test/test_save.py (SaveSessionTest.testSingleLayer): Add test |
440 |
|
for saving an invisible layer. |
441 |
|
|
442 |
|
2003-04-29 Jonathan Coles <[email protected]> |
443 |
|
|
444 |
|
* Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the |
445 |
|
legend dialog box and tell it to change its map to the one |
446 |
|
supplied to SetMap(). Fixes RTbug #1770. |
447 |
|
|
448 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
449 |
|
|
450 |
|
Next step of table implementation. Introduce a transient database |
451 |
|
using SQLite that some of the data is copied to on demand. This |
452 |
|
allows us to do joins and other operations that require an index |
453 |
|
for good performance with reasonable efficiency. Thuban now needs |
454 |
|
SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I |
455 |
|
haven't tested that. |
456 |
|
|
457 |
|
* Thuban/Model/transientdb.py: New. Transient database |
458 |
|
implementation. |
459 |
|
|
460 |
|
* test/test_transientdb.py: New. Tests for the transient DB |
461 |
|
classes. |
462 |
|
|
463 |
|
* Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New |
464 |
|
classes to help automatically remove temporary files and |
465 |
|
directories. |
466 |
|
(Session.__init__): New instance variables temp_dir for the |
467 |
|
temporary directory and transient_db for the SQLite database |
468 |
|
(Session.temp_directory): New. Create a temporary directory if not |
469 |
|
yet done and return its name. Use AutoRemoveDir to have it |
470 |
|
automatically deleted |
471 |
|
(Session.TransientDB): Instantiate the transient database if not |
472 |
|
done yet and return it. |
473 |
|
|
474 |
|
* Thuban/Model/data.py (ShapefileStore.__init__): Use an |
475 |
|
AutoTransientTable so that data is copied to the transient DB on |
476 |
|
demand. |
477 |
|
(SimpleStore): New class that simply combines a table and a |
478 |
|
shapefile |
479 |
|
|
480 |
|
* Thuban/Model/table.py (Table, DBFTable): Rename Table into |
481 |
|
DBFTable and update its doc-string to reflect the fact that this |
482 |
|
is only the table interface to a DBF file. Table is now an alias |
483 |
|
for DBFTable for temporary backwards compatibility. |
484 |
|
|
485 |
|
* Thuban/UI/application.py (ThubanApplication.OnExit): Make sure |
486 |
|
the last reference to the session goes away so that the temporary |
487 |
|
files are removed properly. |
488 |
|
|
489 |
|
* test/test_load.py (LoadSessionTest.tearDown): Remove the |
490 |
|
reference to the session to make sure the temporary files are |
491 |
|
removed. |
492 |
|
|
493 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
494 |
|
|
495 |
|
* Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn |
496 |
|
the __parser instance variable into a normal local variable in |
497 |
|
read. It's only used there and read will never be called more than |
498 |
|
once. Plus it introduces a reference cycle that keeps can keep the |
499 |
|
session object alive for a long time. |
500 |
|
|
501 |
|
2003-04-29 Jonathan Coles <[email protected]> |
502 |
|
|
503 |
|
* Thuban/Model/proj.py (Projection): Removed Set*() methods to make |
504 |
|
Projection an immutable item. Fixes RTbug #1825. |
505 |
|
(Projection.__init__): Initialize instance variables here. |
506 |
|
(ProjFile.Replace): New. Replace the given projection object with |
507 |
|
the new projection object. This solves the problem of needing the |
508 |
|
mutator Projection.SetProjection() in the ProjFrame class and |
509 |
|
allows a projection to change parameters without changing its |
510 |
|
location in the file. |
511 |
|
|
512 |
|
* Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should |
513 |
|
be of type wxSAVE and should verify overwriting a file. |
514 |
|
|
515 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new |
516 |
|
ProjFile.Replace() method instead of the mutator |
517 |
|
Projection.SetProjection(). Also requires that we reassign the |
518 |
|
client data to the new projection. |
519 |
|
|
520 |
|
* test/test_proj.py (TestProjection.test): Test GetName() and |
521 |
|
GetAllParameters() |
522 |
|
(TestProjFile.test): Remove tests for Set*() methods. Add tests |
523 |
|
for Replace(). |
524 |
|
|
525 |
|
2003-04-25 Jonathan Coles <[email protected]> |
526 |
|
|
527 |
|
* Thuban/Model/save.py (SessionSaver.write_projection): Make sure |
528 |
|
to save the name of the projection. |
529 |
|
|
530 |
|
* test/test_save.py (SaveSessionTest.testLayerProjection): New |
531 |
|
test to verify layer projections are saved correctly. |
532 |
|
|
533 |
|
2003-04-25 Jonathan Coles <[email protected]> |
534 |
|
|
535 |
|
* Thuban/Model/proj.py (Projection.SetName): Set the name |
536 |
|
to "Unknown" if name is None. |
537 |
|
(Projection.SetAllParameters): New. Set the projection's |
538 |
|
parameter list to the one supplied. |
539 |
|
(Projection.SetProjection): New. Set the projection's |
540 |
|
properties to those of the supplied Projection. |
541 |
|
|
542 |
|
* Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set |
543 |
|
the dialog title to include the map's title. |
544 |
|
(MainWindow.LayerProjection): Set the dialog title to include |
545 |
|
the layer's title. |
546 |
|
|
547 |
|
* Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate |
548 |
|
error dialogs into a single method call. |
549 |
|
(ProjFrame.__VerifyButtons): Add more states to check. |
550 |
|
(ProjFrame.__GetProjection): Return the current state of an |
551 |
|
edited projection or None. |
552 |
|
(ProjFrame.__FillAvailList): Remove checks for states that |
553 |
|
shouldn't exist. |
554 |
|
(ProjFrame._OnNew): Clear all selected items and supply |
555 |
|
a projection panel if necessary. |
556 |
|
|
557 |
|
* test/test_proj.py (TestProjFile.test): Add tests for |
558 |
|
ProjFile.SetAllParameters, ProjFile.SetProjection, |
559 |
|
ProjFile.SetName. |
560 |
|
|
561 |
|
2003-04-25 Jonathan Coles <[email protected]> |
562 |
|
|
563 |
|
* Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now |
564 |
|
takes an optional argument to select the current projection. |
565 |
|
This does not guarantee that the item is visible due to |
566 |
|
limited wxWindows functionality. Fixes RTBug #1821. |
567 |
|
|
568 |
|
2003-04-25 Jonathan Coles <[email protected]> |
569 |
|
|
570 |
|
* Thuban/Model/load.py (SessionLoader.start_projection): Remember |
571 |
|
the projection name and use it when constructing the Projection |
572 |
|
object. |
573 |
|
|
574 |
|
* Thuban/Model/proj.py (Projection.__init__): Change the default |
575 |
|
value for 'name' to None and then test if name is equal to None |
576 |
|
in the body of the constructor. This way the caller doesn't have to |
577 |
|
know what the default value should be. Namely, useful in load.py |
578 |
|
where we have to pick a default value if the 'name' parameter |
579 |
|
doesn't exist in the XML file. |
580 |
|
|
581 |
|
* test/test_load.py (LoadSessionTest.testLayerProjection): New. |
582 |
|
Tests a file where a layer has a projection. |
583 |
|
|
584 |
|
2003-04-25 Jonathan Coles <[email protected]> |
585 |
|
|
586 |
|
* Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the |
587 |
|
tree for projection information. |
588 |
|
|
589 |
|
* Thuban/Model/load.py (XMLReader.GetFilename): Renamed from |
590 |
|
XMLReader.GetFileName. |
591 |
|
(SessionLoader): Added support for loading projection tags that |
592 |
|
appear inside a layer. |
593 |
|
|
594 |
|
* Thuban/Model/proj.py (ProjFile): Document the class. Move |
595 |
|
back to using a list because the order of the projections in |
596 |
|
the file is important to maintain. Fixes RTbug #1817. |
597 |
|
|
598 |
|
* Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName |
599 |
|
to ProjFile.GetFilename. |
600 |
|
|
601 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save projection |
602 |
|
information. |
603 |
|
|
604 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from |
605 |
|
ProjFrame._OnSaveAs. Removed old dead code from previous |
606 |
|
implementation. |
607 |
|
(ProjFrame._OnExport): Add support for exporting more than one |
608 |
|
projection to a single file. |
609 |
|
(ProjFrame.__FillAvailList): use string formatting (% operator) |
610 |
|
to build strings that are (partly) translated. Fixes RTbug #1818. |
611 |
|
|
612 |
|
* test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile |
613 |
|
class. |
614 |
|
|
615 |
|
2003-04-24 Bernhard Herzog <[email protected]> |
616 |
|
|
617 |
|
* po/es.po: Updated Spanish translation by Daniel Calvelo Aros |
618 |
|
|
619 |
|
* po/fr.po: New. French translation by Daniel Calvelo Aros |
620 |
|
|
621 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate |
622 |
|
empty strings. |
623 |
|
|
624 |
|
2003-04-24 Jonathan Coles <[email protected]> |
625 |
|
|
626 |
|
* Thuban/Model/layer.py (Layer.GetProjection): New. Needed to |
627 |
|
implement the interface that the ProjFrame dialog expects. |
628 |
|
|
629 |
|
* Thuban/Model/proj.py (Projection.SetName): New. Allows the |
630 |
|
name of the projection to be changed. |
631 |
|
(ProjFile): Use a dictionary instead of a list so that removing |
632 |
|
projections is easier and we are sure about uniqueness. |
633 |
|
(ProjFile.Remove): Remove the given projection object. |
634 |
|
|
635 |
|
* Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles): |
636 |
|
Return a list with only one projection file instead of searching for |
637 |
|
any projection file. This simplifies many things if the user can |
638 |
|
only have one system file and one user file. |
639 |
|
|
640 |
|
* Thuban/UI/classgen.py: Change all references to |
641 |
|
genCombo to genChoice. |
642 |
|
|
643 |
|
* Thuban/UI/mainwindow.py: Add a Projection option under the |
644 |
|
layer menu. |
645 |
|
(MainWindow.LayerProjection): New. Open up a projection window |
646 |
|
for a layer. |
647 |
|
|
648 |
|
* Thuban/UI/projdialog.py: Large changes to how the dialog is |
649 |
|
laid out. Use three panels instead of one. One for the list of |
650 |
|
projections, one for the edit controls, and one for the buttons. |
651 |
|
Fixed resizing problems so that the dialog resizes correctly |
652 |
|
when the projection panel changes. Added import/export, save, and |
653 |
|
new buttons/functionality. |
654 |
|
|
655 |
|
2003-04-24 Bernhard Herzog <[email protected]> |
656 |
|
|
657 |
|
First step towards table management. Introduce a simple data |
658 |
|
abstraction so that we replace the data a layer uses more easily |
659 |
|
in the next step. |
660 |
|
|
661 |
|
* Thuban/Model/data.py: New file with a simple data abstraction |
662 |
|
that bundles shapefile and dbffile into one object. |
663 |
|
|
664 |
|
* Thuban/Model/session.py (Session.OpenShapefile): New method to |
665 |
|
open shapefiles and return a shape store object |
666 |
|
|
667 |
|
* Thuban/Model/layer.py (Layer.__init__): Pass the data as a store |
668 |
|
object instead of a shapefile filename. This introduces a new |
669 |
|
instance variable store holding the datastore. For intermediate |
670 |
|
backwards compatibility keep the old instance variables. |
671 |
|
(open_shapefile): Removed. No longer needed with the shape store. |
672 |
|
(Layer.SetShapeStore, Layer.ShapeStore): New methods to set and |
673 |
|
get the shape store used by a layer. |
674 |
|
(Layer.Destroy): No need to explicitly destroy the shapefile or |
675 |
|
table anymore. |
676 |
|
|
677 |
|
* Thuban/UI/mainwindow.py (MainWindow.AddLayer) |
678 |
|
(MainWindow.AddLayer): Use the session's OpenShapefile method to |
679 |
|
open shapefiles |
680 |
|
|
681 |
|
* Thuban/Model/load.py (ProcessSession.start_layer): Use the |
682 |
|
session's OpenShapefile method to open shapefiles |
683 |
|
|
684 |
|
* test/test_classification.py |
685 |
|
(TestClassification.test_classification): Use the session's |
686 |
|
OpenShapefile method to open shapefiles and build the filename in |
687 |
|
a more platform independed way |
688 |
|
|
689 |
|
* test/test_layer.py (TestLayer.setUp, TestLayer.tearDown): |
690 |
|
Implement to have a session to use in the tests |
691 |
|
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer) |
692 |
|
(TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the |
693 |
|
session's OpenShapefile method to open shapefiles |
694 |
|
(TestLayerLegend.setUp): Instantiate a session so that we can use |
695 |
|
it to open shapefiles. |
696 |
|
(TestLayerLegend.tearDown): Make sure that all references to |
697 |
|
layers and session are removed otherwise we may get a resource |
698 |
|
leak |
699 |
|
|
700 |
|
* test/test_map.py (TestMapAddLayer.test_add_layer) |
701 |
|
(TestMapWithContents.setUp): Instantiate a session so that we can |
702 |
|
use it to open shapefiles. |
703 |
|
(TestMapWithContents.tearDown): Make sure that all references to |
704 |
|
layers, maps and sessions are removed otherwise we may get a |
705 |
|
resource leak |
706 |
|
("__main__"): use support.run_tests() so that more info about |
707 |
|
uncollected garbage is printed |
708 |
|
|
709 |
|
* test/test_save.py (SaveSessionTest.testSingleLayer): Use the |
710 |
|
session's OpenShapefile method to open shapefiles |
711 |
|
("__main__"): use support.run_tests() so that more info about |
712 |
|
uncollected garbage is printed |
713 |
|
|
714 |
|
* test/test_selection.py (TestSelection.tearDown): Make sure that |
715 |
|
all references to the session and the selection are removed |
716 |
|
otherwise we may get a resource leak |
717 |
|
(TestSelection.get_layer): Instantiate a session so that we can |
718 |
|
use it to open shapefiles. |
719 |
|
("__main__"): use support.run_tests() so that more info about |
720 |
|
uncollected garbage is printed |
721 |
|
|
722 |
|
* test/test_session.py (TestSessionBase.tearDown) |
723 |
|
(TestSessionWithContent.tearDown): Make sure that all references |
724 |
|
to the session and layers are removed otherwise we may get a |
725 |
|
resource leak |
726 |
|
(TestSessionWithContent.setUp): Use the session's OpenShapefile |
727 |
|
method to open shapefiles |
728 |
|
|
729 |
|
2003-04-24 Jonathan Coles <[email protected]> |
730 |
|
|
731 |
|
* Thuban/Model/load.py (XMLReader.read): Should have been checking |
732 |
|
if the file_or_filename object had the 'read' attribute. |
733 |
|
|
734 |
|
2003-04-23 Jonathan Coles <[email protected]> |
735 |
|
|
736 |
|
* Thuban/Model/resource.py: Fixes RTbug #1813. |
737 |
|
(ReadProjFile): Add documentation about which exceptions are raised. |
738 |
|
Always pass the exceptions up to the caller. |
739 |
|
(GetProjFiles): If the directory can't be read return an empty list. |
740 |
|
If any of the proj files can't be read skip that file and go |
741 |
|
on to the next one. |
742 |
|
|
743 |
|
* test/test_proj.py: Added test cases to handle nonexistent files, |
744 |
|
unreadable files, and files that don't parse correctly. |
745 |
|
|
746 |
|
2003-04-23 Jonathan Coles <[email protected]> |
747 |
|
|
748 |
|
Projection dialog. Allows the user to select from a list |
749 |
|
of projection templates and optionally edit them and save new ones. |
750 |
|
|
751 |
|
* Thuban/UI/projdialog.py (ProjFrame): New. Main dialog. |
752 |
|
(ProjPanel): Base class for projection specific panels. |
753 |
|
(TMPanel): Projection panel for Transverse Mercartor. |
754 |
|
(UTMPanel): Projection panel for Universal Transverse Mercartor. |
755 |
|
(LCCPanel): Projection panel for Lambert Conic Conformal. |
756 |
|
(GeoPanel): Projetion panel for Geographic Projection. |
757 |
|
|
758 |
|
2003-04-23 Jonathan Coles <[email protected]> |
759 |
|
|
760 |
|
* Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to |
761 |
|
promote symmetry. There now exists XMLReader and XMLWriter. |
762 |
|
(XMLReader.read): New. Call to read the given file descriptor or |
763 |
|
filename. |
764 |
|
(XMLReader.close): New. Make sure the file is closed. |
765 |
|
(XMLReader.GetFileName): New. Return just the file name that is being |
766 |
|
read from. |
767 |
|
(XMLReader.GetDirectory): New. Return just the directory of the file |
768 |
|
that is being read. |
769 |
|
(XMLReader.AddDispatchers): New. Take a dictionary which contains |
770 |
|
the names of functions to call as the XML tree is parsed. |
771 |
|
(XMLReader.startElementNS): Updated to use new dispatcher dictionary. |
772 |
|
(XMLReader.endElementNS): Updated to use new dispatcher dictionary. |
773 |
|
(SessionLoader): Removed class variables start_dispatcher and |
774 |
|
end_dispatcher since this functionality is now part of a class |
775 |
|
instance. Fixes RTbug #1808. |
776 |
|
(SessionLoader.__init__): Add dispatcher functions. |
777 |
|
(load_xmlfile): Code was moved into the XMLReader.read(). |
778 |
|
(load_session): Use modified SessionLoader. |
779 |
|
|
780 |
|
* Thuban/Model/map.py (Map.GetProjection): New. Returns the |
781 |
|
map's projection. |
782 |
|
|
783 |
|
* Thuban/Model/proj.py (Projection.GetParameters): Renamed to |
784 |
|
GetAllParameters. |
785 |
|
(Projection.GetParameter): Returns the value for the given parameter. |
786 |
|
|
787 |
|
* Thuban/Model/resource.py: Use XMLReader and XMLWriter. |
788 |
|
(GetProjFiles): Renamed from GetProjections. Now returns a list |
789 |
|
of ProjFile objects. |
790 |
|
(GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns |
791 |
|
a list of ProjFile objects whose files are not user defined. |
792 |
|
(GetUserProjFiles): Renamed from GetUserProjections. Returns a |
793 |
|
list of ProjFile objects whose files are user defined. |
794 |
|
(ProjFileReader): Extend new XMLReader. |
795 |
|
|
796 |
|
* Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to |
797 |
|
promote symmetry. |
798 |
|
|
799 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice |
800 |
|
control instead of a wxComboBox. wxChoice controls do not generate |
801 |
|
events as the uses highlights possible choices which fixes problems |
802 |
|
with resizing the dialog when the use selects an option. |
803 |
|
|
804 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice |
805 |
|
control instead of a wxComboBox. |
806 |
|
|
807 |
|
* Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection |
808 |
|
dialog. |
809 |
|
|
810 |
|
* test/test_proj.py (TestProjection.test): New tests for GetParameter |
811 |
|
method. |
812 |
|
|
813 |
|
2003-04-22 Bernhard Herzog <[email protected]> |
814 |
|
|
815 |
|
* Thuban/UI/mainwindow.py: Remove some unused imports and global |
816 |
|
constants |
817 |
|
|
818 |
|
* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape) |
819 |
|
(IdentifyGridCtrl.selected_shape): Use table, not shapetable. |
820 |
|
|
821 |
|
2003-04-17 Bernhard Herzog <[email protected]> |
822 |
|
|
823 |
|
* Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED. |
824 |
|
(Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used |
825 |
|
anymore. |
826 |
|
(Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes) |
827 |
|
(Layer.ShapeType, Layer.Shape): No need to call |
828 |
|
self.open_shapefile since it's always called in __init__ |
829 |
|
|
830 |
|
* Thuban/UI/application.py (ThubanApplication.MainLoop): Removed. |
831 |
|
In wxPython 2.4 there's no need to extend MainLoop anymore since |
832 |
|
wxPython itself makes sure OnExit is called. |
833 |
|
|
834 |
|
2003-04-16 Jonathan Coles <[email protected]> |
835 |
|
|
836 |
|
Initial putback of projection management code. Includes new |
837 |
|
classes to read and write projection files. The current load |
838 |
|
and save classes were abstracted a bit so they could be reused. |
839 |
|
The Projection class was extended to provide new methods and |
840 |
|
have a name. |
841 |
|
|
842 |
|
* Thuban/Model/load.py (XMLProcessor): New. Contains all the |
843 |
|
general XML reading methods that were part of ProcessSession. |
844 |
|
|
845 |
|
* Thuban/Model/proj.py (Projection.__init__): Accepts an optional |
846 |
|
name. |
847 |
|
(ProjFile): New. Represents a file that contains projection |
848 |
|
information. |
849 |
|
|
850 |
|
* Thuban/Model/resource.py: New. Contains general utilities |
851 |
|
for read and writing projection files. |
852 |
|
|
853 |
|
* Thuban/Model/save.py (XMLSaver): New. Contains all the |
854 |
|
general XML writing methods that were part of SessionSaver. |
855 |
|
(SessionSaver): Renamed from Saver. |
856 |
|
|
857 |
|
* test/test_proj.py: New test cases for the projection |
858 |
|
file read and write functions. |
859 |
|
|
860 |
|
2003-04-16 Jonathan Coles <[email protected]> |
861 |
|
|
862 |
|
* Thuban/Model/classification.py: Use repr() around values |
863 |
|
in the ClassGroup*.__repr__() methods so it is clearer when |
864 |
|
a value is a string and when it is a number. |
865 |
|
|
866 |
|
* test/test_load.py: Rework the classification test to test |
867 |
|
that we can load old files. |
868 |
|
(testLabels): Test a file where the groups have labels. |
869 |
|
|
870 |
|
2003-04-16 Bernhard Herzog <[email protected]> |
871 |
|
|
872 |
|
Safer implementation of the performance enhancements of the |
873 |
|
low-level renderer: |
874 |
|
|
875 |
|
* extensions/thuban/wxproj.cpp (extract_projection) |
876 |
|
(extract_pointer): Rename extract_projection to extract_pointer |
877 |
|
and redefine its purpose to return the pointer stored in a CObject |
878 |
|
returned by the object's cobject method. Update all callers. |
879 |
|
(s_draw_info, free_draw_info, draw_polygon_init): Implement the |
880 |
|
handling of these low-level parameters so that each s_draw_info |
881 |
|
instance is handled as a CObject at python level that also |
882 |
|
contains real references to the actual python objects which |
883 |
|
contain the values in the struct. Add free_draw_info as the |
884 |
|
destructor. |
885 |
|
(draw_polygon_shape): Add the py_draw_info parameter which must a |
886 |
|
cobject containing an s_draw_info pointer. |
887 |
|
|
888 |
|
* Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New |
889 |
|
method to instantiat the low-level render parameter |
890 |
|
(MapRenderer.draw_shape_layer): Use the new method. Remove some |
891 |
|
commented out code. |
892 |
|
(MapRenderer.draw_polygon_shape): Make the first parameter not the |
893 |
|
layer but the low-level render parameter |
894 |
|
(ScreenRenderer.draw_shape_layer): Use the low-level render |
895 |
|
parameter. |
896 |
|
|
897 |
|
2003-04-15 Jonathan Coles <[email protected]> |
898 |
|
|
899 |
|
* Thuban/Model/classification.py: Implemented __repr__ for |
900 |
|
the ClassGroup* classes to make debugging a bit easier. |
901 |
|
(ClassGroup.SetLabel): Check that the string is an instance |
902 |
|
of StringTypes not StringType. Accounts for Unicode strings. |
903 |
|
|
904 |
|
* Thuban/Model/color.py: Implemented __repr__ to make |
905 |
|
debugging a bit easier. |
906 |
|
|
907 |
|
* Thuban/Model/save.py (Saver.write_classification): Need to |
908 |
|
save the group label. |
909 |
|
|
910 |
|
* test/test_load.py (testClassification): New. Loads the |
911 |
|
iceland_sample_test.thuban file and checks if it was loaded |
912 |
|
correctly. |
913 |
|
|
914 |
|
2003-04-15 Jonathan Coles <[email protected]> |
915 |
|
|
916 |
|
* extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used |
917 |
|
to improve rendering performance by initializing the variables |
918 |
|
that are not change each time draw_polygon_shape() is called. |
919 |
|
The values are stored in a global struct draw_info. |
920 |
|
(draw_polygon_shape): Removed initialization code that is |
921 |
|
now in draw_polygon_init(). |
922 |
|
|
923 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make |
924 |
|
drawing initialization call to draw_polygon_init() |
925 |
|
(MapRenderer.draw_polygon_shape): Use new signature of |
926 |
|
draw_polygon_shape. |
927 |
|
|
928 |
|
* Thuban/UI/classgen.py (GenUniformPanel): Fix spin control |
929 |
|
weirdness by setting the range to (1, maxint). |
930 |
|
|
931 |
|
* Thuban/Model/classification.py (ClassGroupProperties): Make |
932 |
|
instance variables private and optimize comparison operator |
933 |
|
by first checking if the color references are the same. |
934 |
|
(ClassGroupSingleton): Make instance variables private. |
935 |
|
(ClassGroupRange): Make instance variables private. |
936 |
|
|
937 |
|
* HOWTO-Release: Filled in missing steps for releasing packages. |
938 |
|
|
939 |
|
2003-04-15 Bernhard Herzog <[email protected]> |
940 |
|
|
941 |
|
First stab at internationalized messages: |
942 |
|
|
943 |
|
* Thuban/__init__.py (_): Implement the translation function for |
944 |
|
real using the python gettext module. |
945 |
|
|
946 |
|
* Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't |
947 |
|
translate empty strings. |
948 |
|
|
949 |
|
* Thuban/UI/application.py (ThubanApplication.read_startup_files): |
950 |
|
Add a missing space to a warning message |
951 |
|
|
952 |
|
* po/README: New. Notes about the management of the translation |
953 |
|
files. |
954 |
|
|
955 |
|
* po/Makefile: New. Makefile to help manage the translation files. |
956 |
|
|
957 |
|
* po/es.po: New. Spanish translation by Daniel Calvelo Aros |
958 |
|
|
959 |
|
* MANIFEST.in: Include the *.mo files in Resources/Locale and the |
960 |
|
translations and support files in po/ |
961 |
|
|
962 |
|
* setup.py (data_files): Add the *.mo files to the data_files too |
963 |
|
|
964 |
|
* README: Add note about the translations when building from CVS |
965 |
|
|
966 |
|
2003-04-14 Jonathan Coles <[email protected]> |
967 |
|
|
968 |
|
* Thuban/UI/dock.py: Fixes some window resizing problems most |
969 |
|
noticable under windows. Always assume the button bitmaps will |
970 |
|
be there. Code clean up. |
971 |
|
(DockabelWindow.Dock, DockableWindow.UnDock): Force all the |
972 |
|
images for the dock/undock button to the same images. |
973 |
|
Work around for RTbug #1801. |
974 |
|
|
975 |
|
* Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should |
976 |
|
be allowed to grow within the sizer. Fixes a bug under Windows |
977 |
|
where the toolbar wasn't being drawn. |
978 |
|
|
979 |
|
2003-04-14 Frank Koormann <[email protected]> |
980 |
|
|
981 |
|
* Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm: |
982 |
|
Updated design to try to make the button functionality more |
983 |
|
transparent. |
984 |
|
|
985 |
|
2003-04-14 Jonathan Coles <[email protected]> |
986 |
|
|
987 |
|
* Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to |
988 |
|
finalize the intialization of the panel. |
989 |
|
|
990 |
|
* Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the |
991 |
|
creation of the panel. Should be the last thing called in the |
992 |
|
initializer of a subclass. |
993 |
|
|
994 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively |
995 |
|
set the current selections in the combo boxes. This is needed |
996 |
|
under Windows. |
997 |
|
|
998 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Add a top |
999 |
|
level panel to the dialog so that the background colors are |
1000 |
|
consistent under Windows. |
1001 |
|
|
1002 |
|
2003-04-11 Jonathan Coles <[email protected]> |
1003 |
|
|
1004 |
|
* Thuban/UI/classgen.py: Change color ramps to start at white |
1005 |
|
not black. |
1006 |
|
|
1007 |
|
* Thuban/UI/legend.py: Enable/disable the legend buttons when |
1008 |
|
the legend changes. Fixes RTbug #1793. |
1009 |
|
|
1010 |
|
* test/test_classification.py: Added test for copying of |
1011 |
|
classifications. |
1012 |
|
|
1013 |
|
2003-04-11 Jonathan Coles <[email protected]> |
1014 |
|
|
1015 |
|
* Thuban/UI/resource.py: New. Centralize the loading of resources |
1016 |
|
such as bitmaps. |
1017 |
|
|
1018 |
|
* Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons, |
1019 |
|
added images to the move buttons, added 'reverse' button. |
1020 |
|
(CustomRampPanel.__init__): Added images to the move buttons. |
1021 |
|
(GreyRamp): New. Generates a ramp from white to black. |
1022 |
|
(HotToColdRamp): New. Generates a ramp from cold to hot colors. |
1023 |
|
|
1024 |
|
* Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to |
1025 |
|
ID_PROPERTY_*. |
1026 |
|
(Classifier.__init__): Minor changes to the layout. |
1027 |
|
(Classifier._OnTitleChanged): Listen for when the user edits the |
1028 |
|
title and update the dialog's title and the layer's title. |
1029 |
|
|
1030 |
|
* Thuban/UI/dock.py: Use new bitmaps for the control buttons. |
1031 |
|
|
1032 |
|
* Thuban/UI/legend.py: Use new bitmaps for the control buttons. |
1033 |
|
(LegendTree._OnMsgLayerTitleChanged): Change the displayed title |
1034 |
|
if the layer's title changes. |
1035 |
|
|
1036 |
|
* Thuban/UI/mainwindow.py: Added new menu item and associated code |
1037 |
|
to open a dialog to rename the map. |
1038 |
|
(MainWindow): Use new resource class to import bitmaps. |
1039 |
|
|
1040 |
|
2003-04-11 Jonathan Coles <[email protected]> |
1041 |
|
|
1042 |
|
* Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm, |
1043 |
|
Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm, |
1044 |
|
Resources/Bitmaps/group_use_none.xpm, |
1045 |
|
Resources/Bitmaps/group_use_not.xpm, |
1046 |
|
Resources/Bitmaps/hide_layer.xpm, |
1047 |
|
Resources/Bitmaps/layer_properties.xpm, |
1048 |
|
Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm, |
1049 |
|
Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm: |
1050 |
|
New. |
1051 |
|
|
1052 |
|
2003-04-10 Jonathan Coles <[email protected]> |
1053 |
|
|
1054 |
|
* Thuban/Model/classification.py: (ClassGroupRange.__init__): |
1055 |
|
Should pass group to ClassGroup constructor. |
1056 |
|
|
1057 |
|
2003-04-10 Jonathan Coles <[email protected]> |
1058 |
|
|
1059 |
|
* Thuban/Model/classification.py: (ClassGroup): Move all the common |
1060 |
|
methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__) |
1061 |
|
here. Implement SetVisible(), IsVisible(). |
1062 |
|
(ClassGroup.__init__): Add group parameter which acts as a copy |
1063 |
|
constructor. |
1064 |
|
|
1065 |
|
* Thuban/UI/classifier.py (ClassTable): Add a new column for the |
1066 |
|
"Visible" check boxes. |
1067 |
|
(Classifier): Rename the buttons and refactor the code to match |
1068 |
|
the new labels. |
1069 |
|
|
1070 |
|
* Thuban/UI/legend.py: Classify button is now called "Properties". |
1071 |
|
Refactored the code to change variable names. |
1072 |
|
(LegendTree.__FillTreeLayer): Only list a group if it is visible. |
1073 |
|
|
1074 |
|
* Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to |
1075 |
|
MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties |
1076 |
|
renamed to MainWindow.LayerEditProperties. |
1077 |
|
(MainWindow.ToggleLegend): Don't include map name in legend title. |
1078 |
|
(MainWindow.SetMap): Added the map name to the window title. |
1079 |
|
(MainWindow.LayerFillColor, MainWindow.LayerTransparentFill, |
1080 |
|
MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed. |
1081 |
|
Functionality is found in the layer properties dialog. |
1082 |
|
|
1083 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only |
1084 |
|
draw visible groups. |
1085 |
|
|
1086 |
|
2003-04-09 Jonathan Coles <[email protected]> |
1087 |
|
|
1088 |
|
* Thuban/UI/classgen.py: Modifications to allow simple |
1089 |
|
addition and selection of new color schemes. |
1090 |
|
(MonochromaticRamp): New. Generates a ramp between two colors. |
1091 |
|
(RedRamp): New. Generates a ramp of all red. |
1092 |
|
(GreenRamp): New. Generates a ramp of all green. |
1093 |
|
(BlueRamp): New. Generates a ramp of all blue. |
1094 |
|
|
1095 |
|
2003-04-09 Jonathan Coles <[email protected]> |
1096 |
|
|
1097 |
|
* Thuban/Model/classification.py (Classification.__deepcopy__): |
1098 |
|
Need to copy over field and fieldType attributes. |
1099 |
|
|
1100 |
|
* Thuban/Model/table.py (Table.field_range): New. Retrive the |
1101 |
|
maximum and minimum values over the entire table for a given |
1102 |
|
field. |
1103 |
|
(Table.GetUniqueValues): New. Retrieve all the unique values |
1104 |
|
in the table for a given field. |
1105 |
|
|
1106 |
|
* Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel. |
1107 |
|
(GenUniquePanel): New. Controls to allow the user to select |
1108 |
|
which unique field values they would like in the classification. |
1109 |
|
(CustomRampPanel): Code that was in ClassGenDialog that allows |
1110 |
|
the user to select the properties for a custom ramp. |
1111 |
|
(ClassGenerator.GenUniformDistribution): Was called GenerateRanges. |
1112 |
|
|
1113 |
|
* Thuban/UI/classifier.py: Removed a lot of debugging code. |
1114 |
|
(Classifier._SetClassification): Callback method so that the |
1115 |
|
class generator can set the classification in the grid. |
1116 |
|
(ClassGroupPropertiesCtrl): New. Encapsulates the drawing and |
1117 |
|
editing of a group properties class into a wxWindows control. |
1118 |
|
|
1119 |
|
* Thuban/UI/dock.py: It was decided that if the user closes |
1120 |
|
a dockable window the window should simply hide itself. That |
1121 |
|
way if the user wants to show the dock again it appears in the |
1122 |
|
same place as it was when it was closed. |
1123 |
|
(DockableWindow.Destroy): Call renamed method OnDockDestroy(). |
1124 |
|
(DockableWindow._OnButtonClose): Hide the window instead of |
1125 |
|
destroying it. |
1126 |
|
(DockableWindow._OnClose): Hide the window instead of |
1127 |
|
destroying it. |
1128 |
|
|
1129 |
|
* Thuban/UI/legend.py (LegendTree): Use a private method to |
1130 |
|
consistently set the font and style of the text. Fixes RTbug #1786. |
1131 |
|
|
1132 |
|
* Thuban/UI/mainwindow.py: Import just the Classifier class. |
1133 |
|
|
1134 |
|
2003-04-07 Bernhard Herzog <[email protected]> |
1135 |
|
|
1136 |
|
* Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item |
1137 |
|
to the map module |
1138 |
|
|
1139 |
|
2003-04-07 Bernhard Herzog <[email protected]> |
1140 |
|
|
1141 |
|
* Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in |
1142 |
|
favor of ToggleSessionTree |
1143 |
|
(MainWindow.ToggleSessionTree): New method to toggle visibility of |
1144 |
|
the session tree. |
1145 |
|
(MainWindow.SessionTreeShown): New method to return whether the |
1146 |
|
session tree is currently shown. |
1147 |
|
(MainWindow.ToggleLegend): New method to toggle visibility of the |
1148 |
|
legend |
1149 |
|
(MainWindow.ShowLegend): Implement in terms of ToggleLegend and |
1150 |
|
LegendShown |
1151 |
|
(MainWindow.LegendShown): New method to return whether the legend |
1152 |
|
is currently shown. |
1153 |
|
(_method_command): Add checked parameter so we can define check |
1154 |
|
menu items |
1155 |
|
(_has_tree_window_shown, _has_legend_shown): Use the appropriate |
1156 |
|
mainwindow methods. |
1157 |
|
(show_session_tree, show_legend commands): Removed. |
1158 |
|
(toggle_session_tree, toggle_legend commands): New commands to |
1159 |
|
toggle the visibility of the dialogs |
1160 |
|
|
1161 |
|
2003-04-07 Jonathan Coles <[email protected]> |
1162 |
|
|
1163 |
|
* Thuban/UI/classgen.py: Fix Windows problem. |
1164 |
|
|
1165 |
|
* Thuban/UI/dock.py: Fix Windows problem. |
1166 |
|
|
1167 |
|
* Thuban/UI/mainwindow.py: Use False instead of false. |
1168 |
|
(MainWindow.ShowLegend): Remove unnecessary switch parameter. |
1169 |
|
|
1170 |
|
2003-04-07 Jonathan Coles <[email protected]> |
1171 |
|
|
1172 |
|
Since we now say that the order of the groups in a classification |
1173 |
|
matters, it makes sense to be able to manipulate that order. Most |
1174 |
|
of the changes to Thuban/Model/classification.py are to that end. |
1175 |
|
|
1176 |
|
* Thuban/Model/classification.py (Classification.AppendGroup, |
1177 |
|
Classification.InsertGroup, Classification.ReplaceGroup, |
1178 |
|
Classification.RemoveGroup, Classification.GetGroup): Do as the |
1179 |
|
names imply. |
1180 |
|
(Classification.FindGroup): This was called GetGroup, but GetGroup |
1181 |
|
takes an index, while FindGroup takes a value. |
1182 |
|
(Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER |
1183 |
|
REFERENCE. Currently there is a cyclic reference between the layer |
1184 |
|
and its classification. If the classification doesn't need to know |
1185 |
|
its owning layer we can change this, since it may make sense to be |
1186 |
|
able to use the same classification with different layers. |
1187 |
|
|
1188 |
|
* Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup() |
1189 |
|
|
1190 |
|
* Thuban/UI/classgen.py: Use Classification.AppendGroup(), |
1191 |
|
not AddGroup() |
1192 |
|
|
1193 |
|
* Thuban/UI/classifier.py: Now that we can depend on the order in |
1194 |
|
a Classification and have methods to manipulate that order we don't |
1195 |
|
need to use our own data structures in the grid. We can simply make |
1196 |
|
the grid/table access the information they need from a copy of |
1197 |
|
the classification object. |
1198 |
|
(Classifier._OnCloseBtn): Event handler for when the user clicks |
1199 |
|
'Close'. This is needed so if the user applies changes and then |
1200 |
|
continues to change the table the user has the option of discarding |
1201 |
|
the most recent changes and keeping what they applied. |
1202 |
|
|
1203 |
|
* Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree" |
1204 |
|
into the same group. |
1205 |
|
|
1206 |
|
* extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled |
1207 |
|
with a really old version of proj, PJ_VERSION won't even be defined. |
1208 |
|
If it isn't defined then just compile so that the function always |
1209 |
|
returns Py_False. |
1210 |
|
|
1211 |
|
* test/test_classification.py: Fix tests to use the renamed methods. |
1212 |
|
Still need to write tests for the new methods. |
1213 |
|
|
1214 |
|
2003-04-04 Jonathan Coles <[email protected]> |
1215 |
|
|
1216 |
|
* Thuban/UI/classifier.py (Classifier.__SelectField): Move the |
1217 |
|
call to SetSelection out of the method and before the call |
1218 |
|
to __SelectField in __init__. This prevents a recursion of events |
1219 |
|
when _OnFieldSelect is triggered by the user. |
1220 |
|
|
1221 |
|
2003-04-04 Jonathan Coles <[email protected]> |
1222 |
|
|
1223 |
|
* Thuban/Model/classification.py: Rename Color.None to |
1224 |
|
Color.Transparent. |
1225 |
|
(ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill): |
1226 |
|
Don't bother copying the color, since Colors are immutable. |
1227 |
|
|
1228 |
|
* Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py, |
1229 |
|
Thuban/UI/classifier.py, Thuban/UI/mainwindow.py, |
1230 |
|
Thuban/UI/renderer.py, Thuban/UI/view.py: |
1231 |
|
Rename Color.None to Color.Transparent. |
1232 |
|
|
1233 |
|
* test/test_classification.py, test/test_load.py: Rename Color.None |
1234 |
|
to Color.Transparent. |
1235 |
|
|
1236 |
|
2003-04-04 Jonathan Coles <[email protected]> |
1237 |
|
|
1238 |
|
* Thuban/Model/classification.py: Fix assert calls. |
1239 |
|
(ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill): |
1240 |
|
Copy the color parameter rather than hold onto a reference. |
1241 |
|
|
1242 |
|
* Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy |
1243 |
|
the color object. |
1244 |
|
(NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we |
1245 |
|
are sure there exists only one refernce to Color.None in the system. |
1246 |
|
This allows us to use 'is' rather than the comparision functions. |
1247 |
|
|
1248 |
|
* Thuban/Model/save.py: Fix assert calls. |
1249 |
|
|
1250 |
|
* Thuban/UI/classifier.py: Fix assert calls. |
1251 |
|
(ClassGrid._OnCellDClick): Call up to the classifier to open the |
1252 |
|
dialog to edit the groups properties. |
1253 |
|
(ClassGrid._OnCellResize): Make sure that the scollbars are drawn |
1254 |
|
correctly if a cell is resized. |
1255 |
|
(ClassTable.SetClassification): New. Changes the classification |
1256 |
|
that is in the table. |
1257 |
|
(ClassTable.__SetRow): Allow groups to be prepended. |
1258 |
|
(Classifier): New code for opening the EditProperties and |
1259 |
|
GenerateRanges dialogs. |
1260 |
|
(SelectPropertiesDialog.__GetColor): Only set the color in the |
1261 |
|
color dialog if the current color is not None. |
1262 |
|
|
1263 |
|
* Thuban/UI/dock.py: Fix assert calls. |
1264 |
|
|
1265 |
|
* Thuban/UI/legend.py: Fix assert calls. |
1266 |
|
|
1267 |
|
* Thuban/UI/renderer.py: Fix assert calls. |
1268 |
|
|
1269 |
|
* Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating |
1270 |
|
classifications. |
1271 |
|
(GenRangePanel): Panel specific to range generation. |
1272 |
|
(GenSingletonPanel): Panel specific to singleton generation. |
1273 |
|
(ClassGenerator): Class responsible for actually generating |
1274 |
|
the classification from the data gathered in the dialog box. |
1275 |
|
(PropertyRamp): Generates properties whose values range from |
1276 |
|
a starting property to an ending property. |
1277 |
|
|
1278 |
|
2003-04-03 Bernhard Herzog <[email protected]> |
1279 |
|
|
1280 |
|
* test/support.py (print_garbage_information): New function that |
1281 |
|
prints information about still connected messages and memory |
1282 |
|
leaks. |
1283 |
|
(run_suite): Removed. |
1284 |
|
(run_tests): New function for use as a replacement of |
1285 |
|
unittest.main in the test_* files. This one calls |
1286 |
|
print_garbage_information at the end. |
1287 |
|
|
1288 |
|
* test/runtests.py (main): Use support.print_garbage_information |
1289 |
|
|
1290 |
|
* test/test_layer.py: Use support.run_tests instead of |
1291 |
|
unittest.main so we get memory leak information |
1292 |
|
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer) |
1293 |
|
(TestLayer.test_point_layer, TestLayer.test_empty_layer) |
1294 |
|
(TestLayerLegend.test_visibility): Call the layer's Destroy method |
1295 |
|
to fix a memory leak. |
1296 |
|
|
1297 |
|
* test/test_classification.py: Use support.run_tests instead of |
1298 |
|
unittest.main so we get memory leak information |
1299 |
|
(TestClassification.test_classification): Call the layer's Destroy |
1300 |
|
method to fix a memory leak. |
1301 |
|
|
1302 |
|
2003-04-02 Bernhard Herzog <[email protected]> |
1303 |
|
|
1304 |
|
* extensions/thuban/wxproj.cpp (check_version, check_version_gtk): |
1305 |
|
Handle the reference counts of the return value and errors in |
1306 |
|
PyArg_ParseTuple correctly. |
1307 |
|
|
1308 |
|
* Thuban/UI/application.py (ThubanApplication.OpenSession): Make |
1309 |
|
sure the filename is absolute to avoid problems when saving the |
1310 |
|
session again |
1311 |
|
|
1312 |
|
* Thuban/Model/table.py: Remove unnecessary import. Fix a typo. |
1313 |
|
|
1314 |
|
2003-04-01 Jonathan Coles <[email protected]> |
1315 |
|
|
1316 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check |
1317 |
|
that there actually are points in the returned list of points |
1318 |
|
before trying to index into the list. The list may be empty if |
1319 |
|
the shape is a Null Shape. |
1320 |
|
|
1321 |
2003-04-01 Bernhard Herzog <[email protected]> |
2003-04-01 Bernhard Herzog <[email protected]> |
1322 |
|
|
1323 |
* test/test_map.py: Don't use from <module> import * |
* test/test_map.py: Don't use from <module> import * |