1 |
|
2003-04-30 Jonathan Coles <[email protected]> |
2 |
|
|
3 |
|
The most important part of this putback is the projection changes. |
4 |
|
It should now be possible to specify the projection that a layer |
5 |
|
is in and then specify a different projection for the map. The |
6 |
|
projection dialog has an extra parameter for a geographic projection |
7 |
|
which lets the user select if the input is in degrees or radians. |
8 |
|
|
9 |
|
* Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring |
10 |
|
to say that the parameter is a tuple of unprojected |
11 |
|
points (which is what the callers to this method were assuming). |
12 |
|
Also, since the points are unprojected we need to projected them. |
13 |
|
|
14 |
|
* Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp, |
15 |
|
LegendTree.MoveCurrentItemDown): If the layer or any of the layer's |
16 |
|
groups are selected, move the layer up/down. Fixes RTbug #1833. |
17 |
|
|
18 |
|
* Thuban/UI/mainwindow.py: Move menu item map_rename up. |
19 |
|
|
20 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing |
21 |
|
parameter in call to SetClientData. |
22 |
|
(GeoPanel): Add support for selecting the units that the |
23 |
|
source data is in (Radians or Degrees). |
24 |
|
|
25 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize |
26 |
|
the rendering loop by reducing the number of if's, removing the |
27 |
|
unnecessary try/except block, and checking if the old group |
28 |
|
is the same as the new one (which happens a lot if there is |
29 |
|
no classification, or lots of shapes are in the same group). |
30 |
|
|
31 |
|
* Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block |
32 |
|
around the redraw routine to try to catch problems that the user |
33 |
|
may create by selecting invalid projections for the data set and |
34 |
|
map. Clears the display if there are any problems and prints the |
35 |
|
error. |
36 |
|
(MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled |
37 |
|
rectangle. |
38 |
|
|
39 |
|
* extensions/thuban/wxproj.cpp (project_point): First invert the |
40 |
|
supplied point (which should be in projected coordinates) using |
41 |
|
the layer's projection and then project the point using the |
42 |
|
map's projection. |
43 |
|
(project_points): Use project_point() to project each point. |
44 |
|
|
45 |
|
2003-04-30 Jan-Oliver Wagner <[email protected]> |
46 |
|
|
47 |
|
* Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug: |
48 |
|
don't set the Classification to None if the classfication field |
49 |
|
is None (ie only a DEFAULT). |
50 |
|
|
51 |
|
2003-04-30 Bernhard Herzog <[email protected]> |
52 |
|
|
53 |
|
* Thuban/UI/view.py: Fix some typos. |
54 |
|
|
55 |
|
* Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do |
56 |
|
not pop up the dialog if the selection becomes empty (this could |
57 |
|
happen if e.g. a new selection is opened while the identify tool |
58 |
|
is active and dialog had been closed) |
59 |
|
|
60 |
|
2003-04-30 Bernhard Herzog <[email protected]> |
61 |
|
|
62 |
|
* Thuban/Model/transientdb.py (TransientTableBase.__init__): New |
63 |
|
instance variable read_record_last_result |
64 |
|
(TransientTableBase.read_record): Make sure reading the same |
65 |
|
record twice works. The implementation uses the new instance |
66 |
|
variable read_record_last_result |
67 |
|
|
68 |
|
* test/test_transientdb.py |
69 |
|
(TestTransientTable.test_transient_table_read_twice): New test |
70 |
|
case for the above bug-fix. |
71 |
|
|
72 |
|
2003-04-29 Jonathan Coles <[email protected]> |
73 |
|
|
74 |
|
* Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832. |
75 |
|
|
76 |
|
* Thuban/UI/classgen.py: Remove all uses of Str2Num. |
77 |
|
|
78 |
|
* Thuban/UI/classifier.py: Remove all uses of Str2Num. |
79 |
|
(ClassTable.SetValueAsCustom): Rename keyword argument in |
80 |
|
ClassGroup* constructors to match argument name. |
81 |
|
|
82 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
83 |
|
|
84 |
|
* Thuban/Model/session.py (Session.Destroy): Explicitly close the |
85 |
|
transient DB if it exists to make sure it doesn't leave a journal |
86 |
|
file in the temp directory. |
87 |
|
|
88 |
|
* Thuban/Model/transientdb.py (TransientDatabase.close): Set |
89 |
|
self.conn to None after closing the connection to make sure it's |
90 |
|
not closed twice |
91 |
|
|
92 |
|
2003-04-29 Jonathan Coles <[email protected]> |
93 |
|
|
94 |
|
Add a visible parameter in the layer XML tag. The default value is |
95 |
|
"true". If anything other than "false" is specified we also assume |
96 |
|
"true". Addresses RTbug #1025. |
97 |
|
|
98 |
|
* Doc/thuban.dtd: Add visible parameter to a layer. |
99 |
|
|
100 |
|
* Thuban/Model/layer.py (BaseLayer.__init__): Change default value |
101 |
|
of visible from 1 to True. |
102 |
|
(Layer.__init__): Change default value of visible from 1 to True. |
103 |
|
|
104 |
|
* Thuban/Model/load.py (SessionLoader.start_layer): Read visible |
105 |
|
parameter. |
106 |
|
|
107 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save visible |
108 |
|
parameter. |
109 |
|
|
110 |
|
* test/test_load.py: Add new test data contents_test_visible. |
111 |
|
(LoadSessionTest.setUp): save test data. |
112 |
|
(LoadSessionTest.testLayerVisibility): Test if the visible flag |
113 |
|
is loaded correctly. |
114 |
|
|
115 |
|
* test/test_save.py (SaveSessionTest.testSingleLayer): Add test |
116 |
|
for saving an invisible layer. |
117 |
|
|
118 |
|
2003-04-29 Jonathan Coles <[email protected]> |
119 |
|
|
120 |
|
* Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the |
121 |
|
legend dialog box and tell it to change its map to the one |
122 |
|
supplied to SetMap(). Fixes RTbug #1770. |
123 |
|
|
124 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
125 |
|
|
126 |
|
Next step of table implementation. Introduce a transient database |
127 |
|
using SQLite that some of the data is copied to on demand. This |
128 |
|
allows us to do joins and other operations that require an index |
129 |
|
for good performance with reasonable efficiency. Thuban now needs |
130 |
|
SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I |
131 |
|
haven't tested that. |
132 |
|
|
133 |
|
* Thuban/Model/transientdb.py: New. Transient database |
134 |
|
implementation. |
135 |
|
|
136 |
|
* test/test_transientdb.py: New. Tests for the transient DB |
137 |
|
classes. |
138 |
|
|
139 |
|
* Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New |
140 |
|
classes to help automatically remove temporary files and |
141 |
|
directories. |
142 |
|
(Session.__init__): New instance variables temp_dir for the |
143 |
|
temporary directory and transient_db for the SQLite database |
144 |
|
(Session.temp_directory): New. Create a temporary directory if not |
145 |
|
yet done and return its name. Use AutoRemoveDir to have it |
146 |
|
automatically deleted |
147 |
|
(Session.TransientDB): Instantiate the transient database if not |
148 |
|
done yet and return it. |
149 |
|
|
150 |
|
* Thuban/Model/data.py (ShapefileStore.__init__): Use an |
151 |
|
AutoTransientTable so that data is copied to the transient DB on |
152 |
|
demand. |
153 |
|
(SimpleStore): New class that simply combines a table and a |
154 |
|
shapefile |
155 |
|
|
156 |
|
* Thuban/Model/table.py (Table, DBFTable): Rename Table into |
157 |
|
DBFTable and update its doc-string to reflect the fact that this |
158 |
|
is only the table interface to a DBF file. Table is now an alias |
159 |
|
for DBFTable for temporary backwards compatibility. |
160 |
|
|
161 |
|
* Thuban/UI/application.py (ThubanApplication.OnExit): Make sure |
162 |
|
the last reference to the session goes away so that the temporary |
163 |
|
files are removed properly. |
164 |
|
|
165 |
|
* test/test_load.py (LoadSessionTest.tearDown): Remove the |
166 |
|
reference to the session to make sure the temporary files are |
167 |
|
removed. |
168 |
|
|
169 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
170 |
|
|
171 |
|
* Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn |
172 |
|
the __parser instance variable into a normal local variable in |
173 |
|
read. It's only used there and read will never be called more than |
174 |
|
once. Plus it introduces a reference cycle that keeps can keep the |
175 |
|
session object alive for a long time. |
176 |
|
|
177 |
|
2003-04-29 Jonathan Coles <[email protected]> |
178 |
|
|
179 |
|
* Thuban/Model/proj.py (Projection): Removed Set*() methods to make |
180 |
|
Projection an immutable item. Fixes RTbug #1825. |
181 |
|
(Projection.__init__): Initialize instance variables here. |
182 |
|
(ProjFile.Replace): New. Replace the given projection object with |
183 |
|
the new projection object. This solves the problem of needing the |
184 |
|
mutator Projection.SetProjection() in the ProjFrame class and |
185 |
|
allows a projection to change parameters without changing its |
186 |
|
location in the file. |
187 |
|
|
188 |
|
* Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should |
189 |
|
be of type wxSAVE and should verify overwriting a file. |
190 |
|
|
191 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new |
192 |
|
ProjFile.Replace() method instead of the mutator |
193 |
|
Projection.SetProjection(). Also requires that we reassign the |
194 |
|
client data to the new projection. |
195 |
|
|
196 |
|
* test/test_proj.py (TestProjection.test): Test GetName() and |
197 |
|
GetAllParameters() |
198 |
|
(TestProjFile.test): Remove tests for Set*() methods. Add tests |
199 |
|
for Replace(). |
200 |
|
|
201 |
|
2003-04-25 Jonathan Coles <[email protected]> |
202 |
|
|
203 |
|
* Thuban/Model/save.py (SessionSaver.write_projection): Make sure |
204 |
|
to save the name of the projection. |
205 |
|
|
206 |
|
* test/test_save.py (SaveSessionTest.testLayerProjection): New |
207 |
|
test to verify layer projections are saved correctly. |
208 |
|
|
209 |
|
2003-04-25 Jonathan Coles <[email protected]> |
210 |
|
|
211 |
|
* Thuban/Model/proj.py (Projection.SetName): Set the name |
212 |
|
to "Unknown" if name is None. |
213 |
|
(Projection.SetAllParameters): New. Set the projection's |
214 |
|
parameter list to the one supplied. |
215 |
|
(Projection.SetProjection): New. Set the projection's |
216 |
|
properties to those of the supplied Projection. |
217 |
|
|
218 |
|
* Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set |
219 |
|
the dialog title to include the map's title. |
220 |
|
(MainWindow.LayerProjection): Set the dialog title to include |
221 |
|
the layer's title. |
222 |
|
|
223 |
|
* Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate |
224 |
|
error dialogs into a single method call. |
225 |
|
(ProjFrame.__VerifyButtons): Add more states to check. |
226 |
|
(ProjFrame.__GetProjection): Return the current state of an |
227 |
|
edited projection or None. |
228 |
|
(ProjFrame.__FillAvailList): Remove checks for states that |
229 |
|
shouldn't exist. |
230 |
|
(ProjFrame._OnNew): Clear all selected items and supply |
231 |
|
a projection panel if necessary. |
232 |
|
|
233 |
|
* test/test_proj.py (TestProjFile.test): Add tests for |
234 |
|
ProjFile.SetAllParameters, ProjFile.SetProjection, |
235 |
|
ProjFile.SetName. |
236 |
|
|
237 |
|
2003-04-25 Jonathan Coles <[email protected]> |
238 |
|
|
239 |
|
* Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now |
240 |
|
takes an optional argument to select the current projection. |
241 |
|
This does not guarantee that the item is visible due to |
242 |
|
limited wxWindows functionality. Fixes RTBug #1821. |
243 |
|
|
244 |
|
2003-04-25 Jonathan Coles <[email protected]> |
245 |
|
|
246 |
|
* Thuban/Model/load.py (SessionLoader.start_projection): Remember |
247 |
|
the projection name and use it when constructing the Projection |
248 |
|
object. |
249 |
|
|
250 |
|
* Thuban/Model/proj.py (Projection.__init__): Change the default |
251 |
|
value for 'name' to None and then test if name is equal to None |
252 |
|
in the body of the constructor. This way the caller doesn't have to |
253 |
|
know what the default value should be. Namely, useful in load.py |
254 |
|
where we have to pick a default value if the 'name' parameter |
255 |
|
doesn't exist in the XML file. |
256 |
|
|
257 |
|
* test/test_load.py (LoadSessionTest.testLayerProjection): New. |
258 |
|
Tests a file where a layer has a projection. |
259 |
|
|
260 |
|
2003-04-25 Jonathan Coles <[email protected]> |
261 |
|
|
262 |
|
* Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the |
263 |
|
tree for projection information. |
264 |
|
|
265 |
|
* Thuban/Model/load.py (XMLReader.GetFilename): Renamed from |
266 |
|
XMLReader.GetFileName. |
267 |
|
(SessionLoader): Added support for loading projection tags that |
268 |
|
appear inside a layer. |
269 |
|
|
270 |
|
* Thuban/Model/proj.py (ProjFile): Document the class. Move |
271 |
|
back to using a list because the order of the projections in |
272 |
|
the file is important to maintain. Fixes RTbug #1817. |
273 |
|
|
274 |
|
* Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName |
275 |
|
to ProjFile.GetFilename. |
276 |
|
|
277 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save projection |
278 |
|
information. |
279 |
|
|
280 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from |
281 |
|
ProjFrame._OnSaveAs. Removed old dead code from previous |
282 |
|
implementation. |
283 |
|
(ProjFrame._OnExport): Add support for exporting more than one |
284 |
|
projection to a single file. |
285 |
|
(ProjFrame.__FillAvailList): use string formatting (% operator) |
286 |
|
to build strings that are (partly) translated. Fixes RTbug #1818. |
287 |
|
|
288 |
|
* test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile |
289 |
|
class. |
290 |
|
|
291 |
|
2003-04-24 Bernhard Herzog <[email protected]> |
292 |
|
|
293 |
|
* po/es.po: Updated Spanish translation by Daniel Calvelo Aros |
294 |
|
|
295 |
|
* po/fr.po: New. French translation by Daniel Calvelo Aros |
296 |
|
|
297 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate |
298 |
|
empty strings. |
299 |
|
|
300 |
|
2003-04-24 Jonathan Coles <[email protected]> |
301 |
|
|
302 |
|
* Thuban/Model/layer.py (Layer.GetProjection): New. Needed to |
303 |
|
implement the interface that the ProjFrame dialog expects. |
304 |
|
|
305 |
|
* Thuban/Model/proj.py (Projection.SetName): New. Allows the |
306 |
|
name of the projection to be changed. |
307 |
|
(ProjFile): Use a dictionary instead of a list so that removing |
308 |
|
projections is easier and we are sure about uniqueness. |
309 |
|
(ProjFile.Remove): Remove the given projection object. |
310 |
|
|
311 |
|
* Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles): |
312 |
|
Return a list with only one projection file instead of searching for |
313 |
|
any projection file. This simplifies many things if the user can |
314 |
|
only have one system file and one user file. |
315 |
|
|
316 |
|
* Thuban/UI/classgen.py: Change all references to |
317 |
|
genCombo to genChoice. |
318 |
|
|
319 |
|
* Thuban/UI/mainwindow.py: Add a Projection option under the |
320 |
|
layer menu. |
321 |
|
(MainWindow.LayerProjection): New. Open up a projection window |
322 |
|
for a layer. |
323 |
|
|
324 |
|
* Thuban/UI/projdialog.py: Large changes to how the dialog is |
325 |
|
laid out. Use three panels instead of one. One for the list of |
326 |
|
projections, one for the edit controls, and one for the buttons. |
327 |
|
Fixed resizing problems so that the dialog resizes correctly |
328 |
|
when the projection panel changes. Added import/export, save, and |
329 |
|
new buttons/functionality. |
330 |
|
|
331 |
|
2003-04-24 Bernhard Herzog <[email protected]> |
332 |
|
|
333 |
|
First step towards table management. Introduce a simple data |
334 |
|
abstraction so that we replace the data a layer uses more easily |
335 |
|
in the next step. |
336 |
|
|
337 |
|
* Thuban/Model/data.py: New file with a simple data abstraction |
338 |
|
that bundles shapefile and dbffile into one object. |
339 |
|
|
340 |
|
* Thuban/Model/session.py (Session.OpenShapefile): New method to |
341 |
|
open shapefiles and return a shape store object |
342 |
|
|
343 |
|
* Thuban/Model/layer.py (Layer.__init__): Pass the data as a store |
344 |
|
object instead of a shapefile filename. This introduces a new |
345 |
|
instance variable store holding the datastore. For intermediate |
346 |
|
backwards compatibility keep the old instance variables. |
347 |
|
(open_shapefile): Removed. No longer needed with the shape store. |
348 |
|
(Layer.SetShapeStore, Layer.ShapeStore): New methods to set and |
349 |
|
get the shape store used by a layer. |
350 |
|
(Layer.Destroy): No need to explicitly destroy the shapefile or |
351 |
|
table anymore. |
352 |
|
|
353 |
|
* Thuban/UI/mainwindow.py (MainWindow.AddLayer) |
354 |
|
(MainWindow.AddLayer): Use the session's OpenShapefile method to |
355 |
|
open shapefiles |
356 |
|
|
357 |
|
* Thuban/Model/load.py (ProcessSession.start_layer): Use the |
358 |
|
session's OpenShapefile method to open shapefiles |
359 |
|
|
360 |
|
* test/test_classification.py |
361 |
|
(TestClassification.test_classification): Use the session's |
362 |
|
OpenShapefile method to open shapefiles and build the filename in |
363 |
|
a more platform independed way |
364 |
|
|
365 |
|
* test/test_layer.py (TestLayer.setUp, TestLayer.tearDown): |
366 |
|
Implement to have a session to use in the tests |
367 |
|
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer) |
368 |
|
(TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the |
369 |
|
session's OpenShapefile method to open shapefiles |
370 |
|
(TestLayerLegend.setUp): Instantiate a session so that we can use |
371 |
|
it to open shapefiles. |
372 |
|
(TestLayerLegend.tearDown): Make sure that all references to |
373 |
|
layers and session are removed otherwise we may get a resource |
374 |
|
leak |
375 |
|
|
376 |
|
* test/test_map.py (TestMapAddLayer.test_add_layer) |
377 |
|
(TestMapWithContents.setUp): Instantiate a session so that we can |
378 |
|
use it to open shapefiles. |
379 |
|
(TestMapWithContents.tearDown): Make sure that all references to |
380 |
|
layers, maps and sessions are removed otherwise we may get a |
381 |
|
resource leak |
382 |
|
("__main__"): use support.run_tests() so that more info about |
383 |
|
uncollected garbage is printed |
384 |
|
|
385 |
|
* test/test_save.py (SaveSessionTest.testSingleLayer): Use the |
386 |
|
session's OpenShapefile method to open shapefiles |
387 |
|
("__main__"): use support.run_tests() so that more info about |
388 |
|
uncollected garbage is printed |
389 |
|
|
390 |
|
* test/test_selection.py (TestSelection.tearDown): Make sure that |
391 |
|
all references to the session and the selection are removed |
392 |
|
otherwise we may get a resource leak |
393 |
|
(TestSelection.get_layer): Instantiate a session so that we can |
394 |
|
use it to open shapefiles. |
395 |
|
("__main__"): use support.run_tests() so that more info about |
396 |
|
uncollected garbage is printed |
397 |
|
|
398 |
|
* test/test_session.py (TestSessionBase.tearDown) |
399 |
|
(TestSessionWithContent.tearDown): Make sure that all references |
400 |
|
to the session and layers are removed otherwise we may get a |
401 |
|
resource leak |
402 |
|
(TestSessionWithContent.setUp): Use the session's OpenShapefile |
403 |
|
method to open shapefiles |
404 |
|
|
405 |
|
2003-04-24 Jonathan Coles <[email protected]> |
406 |
|
|
407 |
|
* Thuban/Model/load.py (XMLReader.read): Should have been checking |
408 |
|
if the file_or_filename object had the 'read' attribute. |
409 |
|
|
410 |
|
2003-04-23 Jonathan Coles <[email protected]> |
411 |
|
|
412 |
|
* Thuban/Model/resource.py: Fixes RTbug #1813. |
413 |
|
(ReadProjFile): Add documentation about which exceptions are raised. |
414 |
|
Always pass the exceptions up to the caller. |
415 |
|
(GetProjFiles): If the directory can't be read return an empty list. |
416 |
|
If any of the proj files can't be read skip that file and go |
417 |
|
on to the next one. |
418 |
|
|
419 |
|
* test/test_proj.py: Added test cases to handle nonexistent files, |
420 |
|
unreadable files, and files that don't parse correctly. |
421 |
|
|
422 |
|
2003-04-23 Jonathan Coles <[email protected]> |
423 |
|
|
424 |
|
Projection dialog. Allows the user to select from a list |
425 |
|
of projection templates and optionally edit them and save new ones. |
426 |
|
|
427 |
|
* Thuban/UI/projdialog.py (ProjFrame): New. Main dialog. |
428 |
|
(ProjPanel): Base class for projection specific panels. |
429 |
|
(TMPanel): Projection panel for Transverse Mercartor. |
430 |
|
(UTMPanel): Projection panel for Universal Transverse Mercartor. |
431 |
|
(LCCPanel): Projection panel for Lambert Conic Conformal. |
432 |
|
(GeoPanel): Projetion panel for Geographic Projection. |
433 |
|
|
434 |
|
2003-04-23 Jonathan Coles <[email protected]> |
435 |
|
|
436 |
|
* Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to |
437 |
|
promote symmetry. There now exists XMLReader and XMLWriter. |
438 |
|
(XMLReader.read): New. Call to read the given file descriptor or |
439 |
|
filename. |
440 |
|
(XMLReader.close): New. Make sure the file is closed. |
441 |
|
(XMLReader.GetFileName): New. Return just the file name that is being |
442 |
|
read from. |
443 |
|
(XMLReader.GetDirectory): New. Return just the directory of the file |
444 |
|
that is being read. |
445 |
|
(XMLReader.AddDispatchers): New. Take a dictionary which contains |
446 |
|
the names of functions to call as the XML tree is parsed. |
447 |
|
(XMLReader.startElementNS): Updated to use new dispatcher dictionary. |
448 |
|
(XMLReader.endElementNS): Updated to use new dispatcher dictionary. |
449 |
|
(SessionLoader): Removed class variables start_dispatcher and |
450 |
|
end_dispatcher since this functionality is now part of a class |
451 |
|
instance. Fixes RTbug #1808. |
452 |
|
(SessionLoader.__init__): Add dispatcher functions. |
453 |
|
(load_xmlfile): Code was moved into the XMLReader.read(). |
454 |
|
(load_session): Use modified SessionLoader. |
455 |
|
|
456 |
|
* Thuban/Model/map.py (Map.GetProjection): New. Returns the |
457 |
|
map's projection. |
458 |
|
|
459 |
|
* Thuban/Model/proj.py (Projection.GetParameters): Renamed to |
460 |
|
GetAllParameters. |
461 |
|
(Projection.GetParameter): Returns the value for the given parameter. |
462 |
|
|
463 |
|
* Thuban/Model/resource.py: Use XMLReader and XMLWriter. |
464 |
|
(GetProjFiles): Renamed from GetProjections. Now returns a list |
465 |
|
of ProjFile objects. |
466 |
|
(GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns |
467 |
|
a list of ProjFile objects whose files are not user defined. |
468 |
|
(GetUserProjFiles): Renamed from GetUserProjections. Returns a |
469 |
|
list of ProjFile objects whose files are user defined. |
470 |
|
(ProjFileReader): Extend new XMLReader. |
471 |
|
|
472 |
|
* Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to |
473 |
|
promote symmetry. |
474 |
|
|
475 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice |
476 |
|
control instead of a wxComboBox. wxChoice controls do not generate |
477 |
|
events as the uses highlights possible choices which fixes problems |
478 |
|
with resizing the dialog when the use selects an option. |
479 |
|
|
480 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice |
481 |
|
control instead of a wxComboBox. |
482 |
|
|
483 |
|
* Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection |
484 |
|
dialog. |
485 |
|
|
486 |
|
* test/test_proj.py (TestProjection.test): New tests for GetParameter |
487 |
|
method. |
488 |
|
|
489 |
|
2003-04-22 Bernhard Herzog <[email protected]> |
490 |
|
|
491 |
|
* Thuban/UI/mainwindow.py: Remove some unused imports and global |
492 |
|
constants |
493 |
|
|
494 |
|
* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape) |
495 |
|
(IdentifyGridCtrl.selected_shape): Use table, not shapetable. |
496 |
|
|
497 |
|
2003-04-17 Bernhard Herzog <[email protected]> |
498 |
|
|
499 |
|
* Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED. |
500 |
|
(Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used |
501 |
|
anymore. |
502 |
|
(Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes) |
503 |
|
(Layer.ShapeType, Layer.Shape): No need to call |
504 |
|
self.open_shapefile since it's always called in __init__ |
505 |
|
|
506 |
|
* Thuban/UI/application.py (ThubanApplication.MainLoop): Removed. |
507 |
|
In wxPython 2.4 there's no need to extend MainLoop anymore since |
508 |
|
wxPython itself makes sure OnExit is called. |
509 |
|
|
510 |
|
2003-04-16 Jonathan Coles <[email protected]> |
511 |
|
|
512 |
|
Initial putback of projection management code. Includes new |
513 |
|
classes to read and write projection files. The current load |
514 |
|
and save classes were abstracted a bit so they could be reused. |
515 |
|
The Projection class was extended to provide new methods and |
516 |
|
have a name. |
517 |
|
|
518 |
|
* Thuban/Model/load.py (XMLProcessor): New. Contains all the |
519 |
|
general XML reading methods that were part of ProcessSession. |
520 |
|
|
521 |
|
* Thuban/Model/proj.py (Projection.__init__): Accepts an optional |
522 |
|
name. |
523 |
|
(ProjFile): New. Represents a file that contains projection |
524 |
|
information. |
525 |
|
|
526 |
|
* Thuban/Model/resource.py: New. Contains general utilities |
527 |
|
for read and writing projection files. |
528 |
|
|
529 |
|
* Thuban/Model/save.py (XMLSaver): New. Contains all the |
530 |
|
general XML writing methods that were part of SessionSaver. |
531 |
|
(SessionSaver): Renamed from Saver. |
532 |
|
|
533 |
|
* test/test_proj.py: New test cases for the projection |
534 |
|
file read and write functions. |
535 |
|
|
536 |
|
2003-04-16 Jonathan Coles <[email protected]> |
537 |
|
|
538 |
|
* Thuban/Model/classification.py: Use repr() around values |
539 |
|
in the ClassGroup*.__repr__() methods so it is clearer when |
540 |
|
a value is a string and when it is a number. |
541 |
|
|
542 |
|
* test/test_load.py: Rework the classification test to test |
543 |
|
that we can load old files. |
544 |
|
(testLabels): Test a file where the groups have labels. |
545 |
|
|
546 |
|
2003-04-16 Bernhard Herzog <[email protected]> |
547 |
|
|
548 |
|
Safer implementation of the performance enhancements of the |
549 |
|
low-level renderer: |
550 |
|
|
551 |
|
* extensions/thuban/wxproj.cpp (extract_projection) |
552 |
|
(extract_pointer): Rename extract_projection to extract_pointer |
553 |
|
and redefine its purpose to return the pointer stored in a CObject |
554 |
|
returned by the object's cobject method. Update all callers. |
555 |
|
(s_draw_info, free_draw_info, draw_polygon_init): Implement the |
556 |
|
handling of these low-level parameters so that each s_draw_info |
557 |
|
instance is handled as a CObject at python level that also |
558 |
|
contains real references to the actual python objects which |
559 |
|
contain the values in the struct. Add free_draw_info as the |
560 |
|
destructor. |
561 |
|
(draw_polygon_shape): Add the py_draw_info parameter which must a |
562 |
|
cobject containing an s_draw_info pointer. |
563 |
|
|
564 |
|
* Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New |
565 |
|
method to instantiat the low-level render parameter |
566 |
|
(MapRenderer.draw_shape_layer): Use the new method. Remove some |
567 |
|
commented out code. |
568 |
|
(MapRenderer.draw_polygon_shape): Make the first parameter not the |
569 |
|
layer but the low-level render parameter |
570 |
|
(ScreenRenderer.draw_shape_layer): Use the low-level render |
571 |
|
parameter. |
572 |
|
|
573 |
|
2003-04-15 Jonathan Coles <[email protected]> |
574 |
|
|
575 |
|
* Thuban/Model/classification.py: Implemented __repr__ for |
576 |
|
the ClassGroup* classes to make debugging a bit easier. |
577 |
|
(ClassGroup.SetLabel): Check that the string is an instance |
578 |
|
of StringTypes not StringType. Accounts for Unicode strings. |
579 |
|
|
580 |
|
* Thuban/Model/color.py: Implemented __repr__ to make |
581 |
|
debugging a bit easier. |
582 |
|
|
583 |
|
* Thuban/Model/save.py (Saver.write_classification): Need to |
584 |
|
save the group label. |
585 |
|
|
586 |
|
* test/test_load.py (testClassification): New. Loads the |
587 |
|
iceland_sample_test.thuban file and checks if it was loaded |
588 |
|
correctly. |
589 |
|
|
590 |
|
2003-04-15 Jonathan Coles <[email protected]> |
591 |
|
|
592 |
|
* extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used |
593 |
|
to improve rendering performance by initializing the variables |
594 |
|
that are not change each time draw_polygon_shape() is called. |
595 |
|
The values are stored in a global struct draw_info. |
596 |
|
(draw_polygon_shape): Removed initialization code that is |
597 |
|
now in draw_polygon_init(). |
598 |
|
|
599 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make |
600 |
|
drawing initialization call to draw_polygon_init() |
601 |
|
(MapRenderer.draw_polygon_shape): Use new signature of |
602 |
|
draw_polygon_shape. |
603 |
|
|
604 |
|
* Thuban/UI/classgen.py (GenUniformPanel): Fix spin control |
605 |
|
weirdness by setting the range to (1, maxint). |
606 |
|
|
607 |
|
* Thuban/Model/classification.py (ClassGroupProperties): Make |
608 |
|
instance variables private and optimize comparison operator |
609 |
|
by first checking if the color references are the same. |
610 |
|
(ClassGroupSingleton): Make instance variables private. |
611 |
|
(ClassGroupRange): Make instance variables private. |
612 |
|
|
613 |
|
* HOWTO-Release: Filled in missing steps for releasing packages. |
614 |
|
|
615 |
|
2003-04-15 Bernhard Herzog <[email protected]> |
616 |
|
|
617 |
|
First stab at internationalized messages: |
618 |
|
|
619 |
|
* Thuban/__init__.py (_): Implement the translation function for |
620 |
|
real using the python gettext module. |
621 |
|
|
622 |
|
* Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't |
623 |
|
translate empty strings. |
624 |
|
|
625 |
|
* Thuban/UI/application.py (ThubanApplication.read_startup_files): |
626 |
|
Add a missing space to a warning message |
627 |
|
|
628 |
|
* po/README: New. Notes about the management of the translation |
629 |
|
files. |
630 |
|
|
631 |
|
* po/Makefile: New. Makefile to help manage the translation files. |
632 |
|
|
633 |
|
* po/es.po: New. Spanish translation by Daniel Calvelo Aros |
634 |
|
|
635 |
|
* MANIFEST.in: Include the *.mo files in Resources/Locale and the |
636 |
|
translations and support files in po/ |
637 |
|
|
638 |
|
* setup.py (data_files): Add the *.mo files to the data_files too |
639 |
|
|
640 |
|
* README: Add note about the translations when building from CVS |
641 |
|
|
642 |
2003-04-14 Jonathan Coles <[email protected]> |
2003-04-14 Jonathan Coles <[email protected]> |
643 |
|
|
644 |
* Thuban/UI/dock.py: Fixes some window resizing problems most |
* Thuban/UI/dock.py: Fixes some window resizing problems most |