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