1 |
|
2003-04-24 Bernhard Herzog <[email protected]> |
2 |
|
|
3 |
|
First step towards table management. Introduce a simple data |
4 |
|
abstraction so that we replace the data a layer uses more easily |
5 |
|
in the next step. |
6 |
|
|
7 |
|
* Thuban/Model/data.py: New file with a simple data abstraction |
8 |
|
that bundles shapefile and dbffile into one object. |
9 |
|
|
10 |
|
* Thuban/Model/session.py (Session.OpenShapefile): New method to |
11 |
|
open shapefiles and return a shape store object |
12 |
|
|
13 |
|
* Thuban/Model/layer.py (Layer.__init__): Pass the data as a store |
14 |
|
object instead of a shapefile filename. This introduces a new |
15 |
|
instance variable store holding the datastore. For intermediate |
16 |
|
backwards compatibility keep the old instance variables. |
17 |
|
(open_shapefile): Removed. No longer needed with the shape store. |
18 |
|
(Layer.SetShapeStore, Layer.ShapeStore): New methods to set and |
19 |
|
get the shape store used by a layer. |
20 |
|
(Layer.Destroy): No need to explicitly destroy the shapefile or |
21 |
|
table anymore. |
22 |
|
|
23 |
|
* Thuban/UI/mainwindow.py (MainWindow.AddLayer) |
24 |
|
(MainWindow.AddLayer): Use the session's OpenShapefile method to |
25 |
|
open shapefiles |
26 |
|
|
27 |
|
* Thuban/Model/load.py (ProcessSession.start_layer): Use the |
28 |
|
session's OpenShapefile method to open shapefiles |
29 |
|
|
30 |
|
* test/test_classification.py |
31 |
|
(TestClassification.test_classification): Use the session's |
32 |
|
OpenShapefile method to open shapefiles and build the filename in |
33 |
|
a more platform independed way |
34 |
|
|
35 |
|
* test/test_layer.py (TestLayer.setUp, TestLayer.tearDown): |
36 |
|
Implement to have a session to use in the tests |
37 |
|
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer) |
38 |
|
(TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the |
39 |
|
session's OpenShapefile method to open shapefiles |
40 |
|
(TestLayerLegend.setUp): Instantiate a session so that we can use |
41 |
|
it to open shapefiles. |
42 |
|
(TestLayerLegend.tearDown): Make sure that all references to |
43 |
|
layers and session are removed otherwise we may get a resource |
44 |
|
leak |
45 |
|
|
46 |
|
* test/test_map.py (TestMapAddLayer.test_add_layer) |
47 |
|
(TestMapWithContents.setUp): Instantiate a session so that we can |
48 |
|
use it to open shapefiles. |
49 |
|
(TestMapWithContents.tearDown): Make sure that all references to |
50 |
|
layers, maps and sessions are removed otherwise we may get a |
51 |
|
resource leak |
52 |
|
("__main__"): use support.run_tests() so that more info about |
53 |
|
uncollected garbage is printed |
54 |
|
|
55 |
|
* test/test_save.py (SaveSessionTest.testSingleLayer): Use the |
56 |
|
session's OpenShapefile method to open shapefiles |
57 |
|
("__main__"): use support.run_tests() so that more info about |
58 |
|
uncollected garbage is printed |
59 |
|
|
60 |
|
* test/test_selection.py (TestSelection.tearDown): Make sure that |
61 |
|
all references to the session and the selection are removed |
62 |
|
otherwise we may get a resource leak |
63 |
|
(TestSelection.get_layer): Instantiate a session so that we can |
64 |
|
use it to open shapefiles. |
65 |
|
("__main__"): use support.run_tests() so that more info about |
66 |
|
uncollected garbage is printed |
67 |
|
|
68 |
|
* test/test_session.py (TestSessionBase.tearDown) |
69 |
|
(TestSessionWithContent.tearDown): Make sure that all references |
70 |
|
to the session and layers are removed otherwise we may get a |
71 |
|
resource leak |
72 |
|
(TestSessionWithContent.setUp): Use the session's OpenShapefile |
73 |
|
method to open shapefiles |
74 |
|
|
75 |
|
2003-04-24 Jonathan Coles <[email protected]> |
76 |
|
|
77 |
|
* Thuban/Model/load.py (XMLReader.read): Should have been checking |
78 |
|
if the file_or_filename object had the 'read' attribute. |
79 |
|
|
80 |
|
2003-04-23 Jonathan Coles <[email protected]> |
81 |
|
|
82 |
|
* Thuban/Model/resource.py: Fixes RTbug #1813. |
83 |
|
(ReadProjFile): Add documentation about which exceptions are raised. |
84 |
|
Always pass the exceptions up to the caller. |
85 |
|
(GetProjFiles): If the directory can't be read return an empty list. |
86 |
|
If any of the proj files can't be read skip that file and go |
87 |
|
on to the next one. |
88 |
|
|
89 |
|
* test/test_proj.py: Added test cases to handle nonexistent files, |
90 |
|
unreadable files, and files that don't parse correctly. |
91 |
|
|
92 |
|
2003-04-23 Jonathan Coles <[email protected]> |
93 |
|
|
94 |
|
Projection dialog. Allows the user to select from a list |
95 |
|
of projection templates and optionally edit them and save new ones. |
96 |
|
|
97 |
|
* Thuban/UI/projdialog.py (ProjFrame): New. Main dialog. |
98 |
|
(ProjPanel): Base class for projection specific panels. |
99 |
|
(TMPanel): Projection panel for Transverse Mercartor. |
100 |
|
(UTMPanel): Projection panel for Universal Transverse Mercartor. |
101 |
|
(LCCPanel): Projection panel for Lambert Conic Conformal. |
102 |
|
(GeoPanel): Projetion panel for Geographic Projection. |
103 |
|
|
104 |
|
2003-04-23 Jonathan Coles <[email protected]> |
105 |
|
|
106 |
|
* Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to |
107 |
|
promote symmetry. There now exists XMLReader and XMLWriter. |
108 |
|
(XMLReader.read): New. Call to read the given file descriptor or |
109 |
|
filename. |
110 |
|
(XMLReader.close): New. Make sure the file is closed. |
111 |
|
(XMLReader.GetFileName): New. Return just the file name that is being |
112 |
|
read from. |
113 |
|
(XMLReader.GetDirectory): New. Return just the directory of the file |
114 |
|
that is being read. |
115 |
|
(XMLReader.AddDispatchers): New. Take a dictionary which contains |
116 |
|
the names of functions to call as the XML tree is parsed. |
117 |
|
(XMLReader.startElementNS): Updated to use new dispatcher dictionary. |
118 |
|
(XMLReader.endElementNS): Updated to use new dispatcher dictionary. |
119 |
|
(SessionLoader): Removed class variables start_dispatcher and |
120 |
|
end_dispatcher since this functionality is now part of a class |
121 |
|
instance. Fixes RTbug #1808. |
122 |
|
(SessionLoader.__init__): Add dispatcher functions. |
123 |
|
(load_xmlfile): Code was moved into the XMLReader.read(). |
124 |
|
(load_session): Use modified SessionLoader. |
125 |
|
|
126 |
|
* Thuban/Model/map.py (Map.GetProjection): New. Returns the |
127 |
|
map's projection. |
128 |
|
|
129 |
|
* Thuban/Model/proj.py (Projection.GetParameters): Renamed to |
130 |
|
GetAllParameters. |
131 |
|
(Projection.GetParameter): Returns the value for the given parameter. |
132 |
|
|
133 |
|
* Thuban/Model/resource.py: Use XMLReader and XMLWriter. |
134 |
|
(GetProjFiles): Renamed from GetProjections. Now returns a list |
135 |
|
of ProjFile objects. |
136 |
|
(GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns |
137 |
|
a list of ProjFile objects whose files are not user defined. |
138 |
|
(GetUserProjFiles): Renamed from GetUserProjections. Returns a |
139 |
|
list of ProjFile objects whose files are user defined. |
140 |
|
(ProjFileReader): Extend new XMLReader. |
141 |
|
|
142 |
|
* Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to |
143 |
|
promote symmetry. |
144 |
|
|
145 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice |
146 |
|
control instead of a wxComboBox. wxChoice controls do not generate |
147 |
|
events as the uses highlights possible choices which fixes problems |
148 |
|
with resizing the dialog when the use selects an option. |
149 |
|
|
150 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice |
151 |
|
control instead of a wxComboBox. |
152 |
|
|
153 |
|
* Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection |
154 |
|
dialog. |
155 |
|
|
156 |
|
* test/test_proj.py (TestProjection.test): New tests for GetParameter |
157 |
|
method. |
158 |
|
|
159 |
|
2003-04-22 Bernhard Herzog <[email protected]> |
160 |
|
|
161 |
|
* Thuban/UI/mainwindow.py: Remove some unused imports and global |
162 |
|
constants |
163 |
|
|
164 |
|
* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape) |
165 |
|
(IdentifyGridCtrl.selected_shape): Use table, not shapetable. |
166 |
|
|
167 |
|
2003-04-17 Bernhard Herzog <[email protected]> |
168 |
|
|
169 |
|
* Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED. |
170 |
|
(Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used |
171 |
|
anymore. |
172 |
|
(Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes) |
173 |
|
(Layer.ShapeType, Layer.Shape): No need to call |
174 |
|
self.open_shapefile since it's always called in __init__ |
175 |
|
|
176 |
|
* Thuban/UI/application.py (ThubanApplication.MainLoop): Removed. |
177 |
|
In wxPython 2.4 there's no need to extend MainLoop anymore since |
178 |
|
wxPython itself makes sure OnExit is called. |
179 |
|
|
180 |
|
2003-04-16 Jonathan Coles <[email protected]> |
181 |
|
|
182 |
|
Initial putback of projection management code. Includes new |
183 |
|
classes to read and write projection files. The current load |
184 |
|
and save classes were abstracted a bit so they could be reused. |
185 |
|
The Projection class was extended to provide new methods and |
186 |
|
have a name. |
187 |
|
|
188 |
|
* Thuban/Model/load.py (XMLProcessor): New. Contains all the |
189 |
|
general XML reading methods that were part of ProcessSession. |
190 |
|
|
191 |
|
* Thuban/Model/proj.py (Projection.__init__): Accepts an optional |
192 |
|
name. |
193 |
|
(ProjFile): New. Represents a file that contains projection |
194 |
|
information. |
195 |
|
|
196 |
|
* Thuban/Model/resource.py: New. Contains general utilities |
197 |
|
for read and writing projection files. |
198 |
|
|
199 |
|
* Thuban/Model/save.py (XMLSaver): New. Contains all the |
200 |
|
general XML writing methods that were part of SessionSaver. |
201 |
|
(SessionSaver): Renamed from Saver. |
202 |
|
|
203 |
|
* test/test_proj.py: New test cases for the projection |
204 |
|
file read and write functions. |
205 |
|
|
206 |
|
2003-04-16 Jonathan Coles <[email protected]> |
207 |
|
|
208 |
|
* Thuban/Model/classification.py: Use repr() around values |
209 |
|
in the ClassGroup*.__repr__() methods so it is clearer when |
210 |
|
a value is a string and when it is a number. |
211 |
|
|
212 |
|
* test/test_load.py: Rework the classification test to test |
213 |
|
that we can load old files. |
214 |
|
(testLabels): Test a file where the groups have labels. |
215 |
|
|
216 |
|
2003-04-16 Bernhard Herzog <[email protected]> |
217 |
|
|
218 |
|
Safer implementation of the performance enhancements of the |
219 |
|
low-level renderer: |
220 |
|
|
221 |
|
* extensions/thuban/wxproj.cpp (extract_projection) |
222 |
|
(extract_pointer): Rename extract_projection to extract_pointer |
223 |
|
and redefine its purpose to return the pointer stored in a CObject |
224 |
|
returned by the object's cobject method. Update all callers. |
225 |
|
(s_draw_info, free_draw_info, draw_polygon_init): Implement the |
226 |
|
handling of these low-level parameters so that each s_draw_info |
227 |
|
instance is handled as a CObject at python level that also |
228 |
|
contains real references to the actual python objects which |
229 |
|
contain the values in the struct. Add free_draw_info as the |
230 |
|
destructor. |
231 |
|
(draw_polygon_shape): Add the py_draw_info parameter which must a |
232 |
|
cobject containing an s_draw_info pointer. |
233 |
|
|
234 |
|
* Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New |
235 |
|
method to instantiat the low-level render parameter |
236 |
|
(MapRenderer.draw_shape_layer): Use the new method. Remove some |
237 |
|
commented out code. |
238 |
|
(MapRenderer.draw_polygon_shape): Make the first parameter not the |
239 |
|
layer but the low-level render parameter |
240 |
|
(ScreenRenderer.draw_shape_layer): Use the low-level render |
241 |
|
parameter. |
242 |
|
|
243 |
|
2003-04-15 Jonathan Coles <[email protected]> |
244 |
|
|
245 |
|
* Thuban/Model/classification.py: Implemented __repr__ for |
246 |
|
the ClassGroup* classes to make debugging a bit easier. |
247 |
|
(ClassGroup.SetLabel): Check that the string is an instance |
248 |
|
of StringTypes not StringType. Accounts for Unicode strings. |
249 |
|
|
250 |
|
* Thuban/Model/color.py: Implemented __repr__ to make |
251 |
|
debugging a bit easier. |
252 |
|
|
253 |
|
* Thuban/Model/save.py (Saver.write_classification): Need to |
254 |
|
save the group label. |
255 |
|
|
256 |
|
* test/test_load.py (testClassification): New. Loads the |
257 |
|
iceland_sample_test.thuban file and checks if it was loaded |
258 |
|
correctly. |
259 |
|
|
260 |
|
2003-04-15 Jonathan Coles <[email protected]> |
261 |
|
|
262 |
|
* extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used |
263 |
|
to improve rendering performance by initializing the variables |
264 |
|
that are not change each time draw_polygon_shape() is called. |
265 |
|
The values are stored in a global struct draw_info. |
266 |
|
(draw_polygon_shape): Removed initialization code that is |
267 |
|
now in draw_polygon_init(). |
268 |
|
|
269 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make |
270 |
|
drawing initialization call to draw_polygon_init() |
271 |
|
(MapRenderer.draw_polygon_shape): Use new signature of |
272 |
|
draw_polygon_shape. |
273 |
|
|
274 |
|
* Thuban/UI/classgen.py (GenUniformPanel): Fix spin control |
275 |
|
weirdness by setting the range to (1, maxint). |
276 |
|
|
277 |
|
* Thuban/Model/classification.py (ClassGroupProperties): Make |
278 |
|
instance variables private and optimize comparison operator |
279 |
|
by first checking if the color references are the same. |
280 |
|
(ClassGroupSingleton): Make instance variables private. |
281 |
|
(ClassGroupRange): Make instance variables private. |
282 |
|
|
283 |
|
* HOWTO-Release: Filled in missing steps for releasing packages. |
284 |
|
|
285 |
|
2003-04-15 Bernhard Herzog <[email protected]> |
286 |
|
|
287 |
|
First stab at internationalized messages: |
288 |
|
|
289 |
|
* Thuban/__init__.py (_): Implement the translation function for |
290 |
|
real using the python gettext module. |
291 |
|
|
292 |
|
* Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't |
293 |
|
translate empty strings. |
294 |
|
|
295 |
|
* Thuban/UI/application.py (ThubanApplication.read_startup_files): |
296 |
|
Add a missing space to a warning message |
297 |
|
|
298 |
|
* po/README: New. Notes about the management of the translation |
299 |
|
files. |
300 |
|
|
301 |
|
* po/Makefile: New. Makefile to help manage the translation files. |
302 |
|
|
303 |
|
* po/es.po: New. Spanish translation by Daniel Calvelo Aros |
304 |
|
|
305 |
|
* MANIFEST.in: Include the *.mo files in Resources/Locale and the |
306 |
|
translations and support files in po/ |
307 |
|
|
308 |
|
* setup.py (data_files): Add the *.mo files to the data_files too |
309 |
|
|
310 |
|
* README: Add note about the translations when building from CVS |
311 |
|
|
312 |
|
2003-04-14 Jonathan Coles <[email protected]> |
313 |
|
|
314 |
|
* Thuban/UI/dock.py: Fixes some window resizing problems most |
315 |
|
noticable under windows. Always assume the button bitmaps will |
316 |
|
be there. Code clean up. |
317 |
|
(DockabelWindow.Dock, DockableWindow.UnDock): Force all the |
318 |
|
images for the dock/undock button to the same images. |
319 |
|
Work around for RTbug #1801. |
320 |
|
|
321 |
|
* Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should |
322 |
|
be allowed to grow within the sizer. Fixes a bug under Windows |
323 |
|
where the toolbar wasn't being drawn. |
324 |
|
|
325 |
|
2003-04-14 Frank Koormann <[email protected]> |
326 |
|
|
327 |
|
* Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm: |
328 |
|
Updated design to try to make the button functionality more |
329 |
|
transparent. |
330 |
|
|
331 |
|
2003-04-14 Jonathan Coles <[email protected]> |
332 |
|
|
333 |
|
* Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to |
334 |
|
finalize the intialization of the panel. |
335 |
|
|
336 |
|
* Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the |
337 |
|
creation of the panel. Should be the last thing called in the |
338 |
|
initializer of a subclass. |
339 |
|
|
340 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively |
341 |
|
set the current selections in the combo boxes. This is needed |
342 |
|
under Windows. |
343 |
|
|
344 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Add a top |
345 |
|
level panel to the dialog so that the background colors are |
346 |
|
consistent under Windows. |
347 |
|
|
348 |
|
2003-04-11 Jonathan Coles <[email protected]> |
349 |
|
|
350 |
|
* Thuban/UI/classgen.py: Change color ramps to start at white |
351 |
|
not black. |
352 |
|
|
353 |
|
* Thuban/UI/legend.py: Enable/disable the legend buttons when |
354 |
|
the legend changes. Fixes RTbug #1793. |
355 |
|
|
356 |
|
* test/test_classification.py: Added test for copying of |
357 |
|
classifications. |
358 |
|
|
359 |
|
2003-04-11 Jonathan Coles <[email protected]> |
360 |
|
|
361 |
|
* Thuban/UI/resource.py: New. Centralize the loading of resources |
362 |
|
such as bitmaps. |
363 |
|
|
364 |
|
* Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons, |
365 |
|
added images to the move buttons, added 'reverse' button. |
366 |
|
(CustomRampPanel.__init__): Added images to the move buttons. |
367 |
|
(GreyRamp): New. Generates a ramp from white to black. |
368 |
|
(HotToColdRamp): New. Generates a ramp from cold to hot colors. |
369 |
|
|
370 |
|
* Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to |
371 |
|
ID_PROPERTY_*. |
372 |
|
(Classifier.__init__): Minor changes to the layout. |
373 |
|
(Classifier._OnTitleChanged): Listen for when the user edits the |
374 |
|
title and update the dialog's title and the layer's title. |
375 |
|
|
376 |
|
* Thuban/UI/dock.py: Use new bitmaps for the control buttons. |
377 |
|
|
378 |
|
* Thuban/UI/legend.py: Use new bitmaps for the control buttons. |
379 |
|
(LegendTree._OnMsgLayerTitleChanged): Change the displayed title |
380 |
|
if the layer's title changes. |
381 |
|
|
382 |
|
* Thuban/UI/mainwindow.py: Added new menu item and associated code |
383 |
|
to open a dialog to rename the map. |
384 |
|
(MainWindow): Use new resource class to import bitmaps. |
385 |
|
|
386 |
|
2003-04-11 Jonathan Coles <[email protected]> |
387 |
|
|
388 |
|
* Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm, |
389 |
|
Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm, |
390 |
|
Resources/Bitmaps/group_use_none.xpm, |
391 |
|
Resources/Bitmaps/group_use_not.xpm, |
392 |
|
Resources/Bitmaps/hide_layer.xpm, |
393 |
|
Resources/Bitmaps/layer_properties.xpm, |
394 |
|
Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm, |
395 |
|
Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm: |
396 |
|
New. |
397 |
|
|
398 |
|
2003-04-10 Jonathan Coles <[email protected]> |
399 |
|
|
400 |
|
* Thuban/Model/classification.py: (ClassGroupRange.__init__): |
401 |
|
Should pass group to ClassGroup constructor. |
402 |
|
|
403 |
|
2003-04-10 Jonathan Coles <[email protected]> |
404 |
|
|
405 |
|
* Thuban/Model/classification.py: (ClassGroup): Move all the common |
406 |
|
methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__) |
407 |
|
here. Implement SetVisible(), IsVisible(). |
408 |
|
(ClassGroup.__init__): Add group parameter which acts as a copy |
409 |
|
constructor. |
410 |
|
|
411 |
|
* Thuban/UI/classifier.py (ClassTable): Add a new column for the |
412 |
|
"Visible" check boxes. |
413 |
|
(Classifier): Rename the buttons and refactor the code to match |
414 |
|
the new labels. |
415 |
|
|
416 |
|
* Thuban/UI/legend.py: Classify button is now called "Properties". |
417 |
|
Refactored the code to change variable names. |
418 |
|
(LegendTree.__FillTreeLayer): Only list a group if it is visible. |
419 |
|
|
420 |
|
* Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to |
421 |
|
MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties |
422 |
|
renamed to MainWindow.LayerEditProperties. |
423 |
|
(MainWindow.ToggleLegend): Don't include map name in legend title. |
424 |
|
(MainWindow.SetMap): Added the map name to the window title. |
425 |
|
(MainWindow.LayerFillColor, MainWindow.LayerTransparentFill, |
426 |
|
MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed. |
427 |
|
Functionality is found in the layer properties dialog. |
428 |
|
|
429 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only |
430 |
|
draw visible groups. |
431 |
|
|
432 |
|
2003-04-09 Jonathan Coles <[email protected]> |
433 |
|
|
434 |
|
* Thuban/UI/classgen.py: Modifications to allow simple |
435 |
|
addition and selection of new color schemes. |
436 |
|
(MonochromaticRamp): New. Generates a ramp between two colors. |
437 |
|
(RedRamp): New. Generates a ramp of all red. |
438 |
|
(GreenRamp): New. Generates a ramp of all green. |
439 |
|
(BlueRamp): New. Generates a ramp of all blue. |
440 |
|
|
441 |
|
2003-04-09 Jonathan Coles <[email protected]> |
442 |
|
|
443 |
|
* Thuban/Model/classification.py (Classification.__deepcopy__): |
444 |
|
Need to copy over field and fieldType attributes. |
445 |
|
|
446 |
|
* Thuban/Model/table.py (Table.field_range): New. Retrive the |
447 |
|
maximum and minimum values over the entire table for a given |
448 |
|
field. |
449 |
|
(Table.GetUniqueValues): New. Retrieve all the unique values |
450 |
|
in the table for a given field. |
451 |
|
|
452 |
|
* Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel. |
453 |
|
(GenUniquePanel): New. Controls to allow the user to select |
454 |
|
which unique field values they would like in the classification. |
455 |
|
(CustomRampPanel): Code that was in ClassGenDialog that allows |
456 |
|
the user to select the properties for a custom ramp. |
457 |
|
(ClassGenerator.GenUniformDistribution): Was called GenerateRanges. |
458 |
|
|
459 |
|
* Thuban/UI/classifier.py: Removed a lot of debugging code. |
460 |
|
(Classifier._SetClassification): Callback method so that the |
461 |
|
class generator can set the classification in the grid. |
462 |
|
(ClassGroupPropertiesCtrl): New. Encapsulates the drawing and |
463 |
|
editing of a group properties class into a wxWindows control. |
464 |
|
|
465 |
|
* Thuban/UI/dock.py: It was decided that if the user closes |
466 |
|
a dockable window the window should simply hide itself. That |
467 |
|
way if the user wants to show the dock again it appears in the |
468 |
|
same place as it was when it was closed. |
469 |
|
(DockableWindow.Destroy): Call renamed method OnDockDestroy(). |
470 |
|
(DockableWindow._OnButtonClose): Hide the window instead of |
471 |
|
destroying it. |
472 |
|
(DockableWindow._OnClose): Hide the window instead of |
473 |
|
destroying it. |
474 |
|
|
475 |
|
* Thuban/UI/legend.py (LegendTree): Use a private method to |
476 |
|
consistently set the font and style of the text. Fixes RTbug #1786. |
477 |
|
|
478 |
|
* Thuban/UI/mainwindow.py: Import just the Classifier class. |
479 |
|
|
480 |
|
2003-04-07 Bernhard Herzog <[email protected]> |
481 |
|
|
482 |
|
* Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item |
483 |
|
to the map module |
484 |
|
|
485 |
|
2003-04-07 Bernhard Herzog <[email protected]> |
486 |
|
|
487 |
|
* Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in |
488 |
|
favor of ToggleSessionTree |
489 |
|
(MainWindow.ToggleSessionTree): New method to toggle visibility of |
490 |
|
the session tree. |
491 |
|
(MainWindow.SessionTreeShown): New method to return whether the |
492 |
|
session tree is currently shown. |
493 |
|
(MainWindow.ToggleLegend): New method to toggle visibility of the |
494 |
|
legend |
495 |
|
(MainWindow.ShowLegend): Implement in terms of ToggleLegend and |
496 |
|
LegendShown |
497 |
|
(MainWindow.LegendShown): New method to return whether the legend |
498 |
|
is currently shown. |
499 |
|
(_method_command): Add checked parameter so we can define check |
500 |
|
menu items |
501 |
|
(_has_tree_window_shown, _has_legend_shown): Use the appropriate |
502 |
|
mainwindow methods. |
503 |
|
(show_session_tree, show_legend commands): Removed. |
504 |
|
(toggle_session_tree, toggle_legend commands): New commands to |
505 |
|
toggle the visibility of the dialogs |
506 |
|
|
507 |
|
2003-04-07 Jonathan Coles <[email protected]> |
508 |
|
|
509 |
|
* Thuban/UI/classgen.py: Fix Windows problem. |
510 |
|
|
511 |
|
* Thuban/UI/dock.py: Fix Windows problem. |
512 |
|
|
513 |
|
* Thuban/UI/mainwindow.py: Use False instead of false. |
514 |
|
(MainWindow.ShowLegend): Remove unnecessary switch parameter. |
515 |
|
|
516 |
|
2003-04-07 Jonathan Coles <[email protected]> |
517 |
|
|
518 |
|
Since we now say that the order of the groups in a classification |
519 |
|
matters, it makes sense to be able to manipulate that order. Most |
520 |
|
of the changes to Thuban/Model/classification.py are to that end. |
521 |
|
|
522 |
|
* Thuban/Model/classification.py (Classification.AppendGroup, |
523 |
|
Classification.InsertGroup, Classification.ReplaceGroup, |
524 |
|
Classification.RemoveGroup, Classification.GetGroup): Do as the |
525 |
|
names imply. |
526 |
|
(Classification.FindGroup): This was called GetGroup, but GetGroup |
527 |
|
takes an index, while FindGroup takes a value. |
528 |
|
(Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER |
529 |
|
REFERENCE. Currently there is a cyclic reference between the layer |
530 |
|
and its classification. If the classification doesn't need to know |
531 |
|
its owning layer we can change this, since it may make sense to be |
532 |
|
able to use the same classification with different layers. |
533 |
|
|
534 |
|
* Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup() |
535 |
|
|
536 |
|
* Thuban/UI/classgen.py: Use Classification.AppendGroup(), |
537 |
|
not AddGroup() |
538 |
|
|
539 |
|
* Thuban/UI/classifier.py: Now that we can depend on the order in |
540 |
|
a Classification and have methods to manipulate that order we don't |
541 |
|
need to use our own data structures in the grid. We can simply make |
542 |
|
the grid/table access the information they need from a copy of |
543 |
|
the classification object. |
544 |
|
(Classifier._OnCloseBtn): Event handler for when the user clicks |
545 |
|
'Close'. This is needed so if the user applies changes and then |
546 |
|
continues to change the table the user has the option of discarding |
547 |
|
the most recent changes and keeping what they applied. |
548 |
|
|
549 |
|
* Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree" |
550 |
|
into the same group. |
551 |
|
|
552 |
|
* extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled |
553 |
|
with a really old version of proj, PJ_VERSION won't even be defined. |
554 |
|
If it isn't defined then just compile so that the function always |
555 |
|
returns Py_False. |
556 |
|
|
557 |
|
* test/test_classification.py: Fix tests to use the renamed methods. |
558 |
|
Still need to write tests for the new methods. |
559 |
|
|
560 |
|
2003-04-04 Jonathan Coles <[email protected]> |
561 |
|
|
562 |
|
* Thuban/UI/classifier.py (Classifier.__SelectField): Move the |
563 |
|
call to SetSelection out of the method and before the call |
564 |
|
to __SelectField in __init__. This prevents a recursion of events |
565 |
|
when _OnFieldSelect is triggered by the user. |
566 |
|
|
567 |
|
2003-04-04 Jonathan Coles <[email protected]> |
568 |
|
|
569 |
|
* Thuban/Model/classification.py: Rename Color.None to |
570 |
|
Color.Transparent. |
571 |
|
(ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill): |
572 |
|
Don't bother copying the color, since Colors are immutable. |
573 |
|
|
574 |
|
* Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py, |
575 |
|
Thuban/UI/classifier.py, Thuban/UI/mainwindow.py, |
576 |
|
Thuban/UI/renderer.py, Thuban/UI/view.py: |
577 |
|
Rename Color.None to Color.Transparent. |
578 |
|
|
579 |
|
* test/test_classification.py, test/test_load.py: Rename Color.None |
580 |
|
to Color.Transparent. |
581 |
|
|
582 |
|
2003-04-04 Jonathan Coles <[email protected]> |
583 |
|
|
584 |
|
* Thuban/Model/classification.py: Fix assert calls. |
585 |
|
(ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill): |
586 |
|
Copy the color parameter rather than hold onto a reference. |
587 |
|
|
588 |
|
* Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy |
589 |
|
the color object. |
590 |
|
(NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we |
591 |
|
are sure there exists only one refernce to Color.None in the system. |
592 |
|
This allows us to use 'is' rather than the comparision functions. |
593 |
|
|
594 |
|
* Thuban/Model/save.py: Fix assert calls. |
595 |
|
|
596 |
|
* Thuban/UI/classifier.py: Fix assert calls. |
597 |
|
(ClassGrid._OnCellDClick): Call up to the classifier to open the |
598 |
|
dialog to edit the groups properties. |
599 |
|
(ClassGrid._OnCellResize): Make sure that the scollbars are drawn |
600 |
|
correctly if a cell is resized. |
601 |
|
(ClassTable.SetClassification): New. Changes the classification |
602 |
|
that is in the table. |
603 |
|
(ClassTable.__SetRow): Allow groups to be prepended. |
604 |
|
(Classifier): New code for opening the EditProperties and |
605 |
|
GenerateRanges dialogs. |
606 |
|
(SelectPropertiesDialog.__GetColor): Only set the color in the |
607 |
|
color dialog if the current color is not None. |
608 |
|
|
609 |
|
* Thuban/UI/dock.py: Fix assert calls. |
610 |
|
|
611 |
|
* Thuban/UI/legend.py: Fix assert calls. |
612 |
|
|
613 |
|
* Thuban/UI/renderer.py: Fix assert calls. |
614 |
|
|
615 |
|
* Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating |
616 |
|
classifications. |
617 |
|
(GenRangePanel): Panel specific to range generation. |
618 |
|
(GenSingletonPanel): Panel specific to singleton generation. |
619 |
|
(ClassGenerator): Class responsible for actually generating |
620 |
|
the classification from the data gathered in the dialog box. |
621 |
|
(PropertyRamp): Generates properties whose values range from |
622 |
|
a starting property to an ending property. |
623 |
|
|
624 |
|
2003-04-03 Bernhard Herzog <[email protected]> |
625 |
|
|
626 |
|
* test/support.py (print_garbage_information): New function that |
627 |
|
prints information about still connected messages and memory |
628 |
|
leaks. |
629 |
|
(run_suite): Removed. |
630 |
|
(run_tests): New function for use as a replacement of |
631 |
|
unittest.main in the test_* files. This one calls |
632 |
|
print_garbage_information at the end. |
633 |
|
|
634 |
|
* test/runtests.py (main): Use support.print_garbage_information |
635 |
|
|
636 |
|
* test/test_layer.py: Use support.run_tests instead of |
637 |
|
unittest.main so we get memory leak information |
638 |
|
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer) |
639 |
|
(TestLayer.test_point_layer, TestLayer.test_empty_layer) |
640 |
|
(TestLayerLegend.test_visibility): Call the layer's Destroy method |
641 |
|
to fix a memory leak. |
642 |
|
|
643 |
|
* test/test_classification.py: Use support.run_tests instead of |
644 |
|
unittest.main so we get memory leak information |
645 |
|
(TestClassification.test_classification): Call the layer's Destroy |
646 |
|
method to fix a memory leak. |
647 |
|
|
648 |
|
2003-04-02 Bernhard Herzog <[email protected]> |
649 |
|
|
650 |
|
* extensions/thuban/wxproj.cpp (check_version, check_version_gtk): |
651 |
|
Handle the reference counts of the return value and errors in |
652 |
|
PyArg_ParseTuple correctly. |
653 |
|
|
654 |
|
* Thuban/UI/application.py (ThubanApplication.OpenSession): Make |
655 |
|
sure the filename is absolute to avoid problems when saving the |
656 |
|
session again |
657 |
|
|
658 |
|
* Thuban/Model/table.py: Remove unnecessary import. Fix a typo. |
659 |
|
|
660 |
|
2003-04-01 Jonathan Coles <[email protected]> |
661 |
|
|
662 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check |
663 |
|
that there actually are points in the returned list of points |
664 |
|
before trying to index into the list. The list may be empty if |
665 |
|
the shape is a Null Shape. |
666 |
|
|
667 |
|
2003-04-01 Bernhard Herzog <[email protected]> |
668 |
|
|
669 |
|
* test/test_map.py: Don't use from <module> import * |
670 |
|
|
671 |
|
2003-04-01 Jonathan Coles <[email protected]> |
672 |
|
|
673 |
|
* Thuban/Model/session.py: Use LAYER_CHANGED instead of |
674 |
|
LAYER_LEGEND_CHANGED |
675 |
|
|
676 |
|
* Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call |
677 |
|
self.Destroy() to close the window after yesterday's changes. |
678 |
|
|
679 |
|
* test/test_map.py, test/test_session.py: Fix messages that |
680 |
|
are sent from maps and layers. |
681 |
|
|
682 |
|
2003-03-31 Jonathan Coles <[email protected]> |
683 |
|
|
684 |
|
* Thuban/UI/classifier.py: Commented out some debugging statements. |
685 |
|
(ClassDataPreviewer.Draw): Draw rectangles for polygon layers per |
686 |
|
RTbug #1769. |
687 |
|
|
688 |
|
* Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and |
689 |
|
position (although position doesn't work yet under GTK). |
690 |
|
(DockableWindow.Destroy): New. Called when the window must be |
691 |
|
closed. Namely needed when the DockFrame closes and must close |
692 |
|
its children. |
693 |
|
(DockFrame): Listen for EVT_CLOSE and destroy all children. |
694 |
|
|
695 |
|
* Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up |
696 |
|
when then window is told to close. |
697 |
|
(LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See |
698 |
|
comment in source for more info. |
699 |
|
|
700 |
|
* Thuban/UI/main.py: Show the legend by default when Thuban starts. |
701 |
|
|
702 |
|
* Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for |
703 |
|
symmetry with other such methods. |
704 |
|
(MainWindow.ShowLegend): Show the legend docked by default. |
705 |
|
|
706 |
|
2003-03-28 Jonathan Coles <[email protected]> |
707 |
|
|
708 |
|
* Thuban/UI/classifier.py: Support for highlighting a specific |
709 |
|
group within the grid when the classification dialog is opened. |
710 |
|
Also contains a lot of debugging printouts which will later |
711 |
|
be removed. |
712 |
|
|
713 |
|
* Thuban/UI/dock.py: Complete rework on the dock code so that |
714 |
|
that it is fairly removed from the rest of the Thuban application. |
715 |
|
It is easy to add new docks which the rest of the program having |
716 |
|
to be aware of them. |
717 |
|
|
718 |
|
* Thuban/UI/legend.py: Modifications to support selecting a |
719 |
|
specific group in the classification dialog. Changed how layers |
720 |
|
are drawn when the layer is visible/invisible. |
721 |
|
|
722 |
|
* Thuban/UI/mainwindow.py: Removed legend specific code and |
723 |
|
replaced it with calls to the new dock code. |
724 |
|
|
725 |
|
* Thuban/UI/renderer.py (MapRenderer.__init__): Added assert |
726 |
|
to check if scale > 0. Trying to track down a divide by zero. |
727 |
|
|
728 |
|
2003-03-26 Jonathan Coles <[email protected]> |
729 |
|
|
730 |
|
* Thuban/UI/legend.py: Removed unnecessary LegendDialog class. |
731 |
|
(LegendPanel): Removed _OnDock()/_OnUnDock() methods which are |
732 |
|
now part of DockableWindow. |
733 |
|
(LegendPanel.DoOnSelChanged): Select the current layer in the |
734 |
|
map. |
735 |
|
(LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged() |
736 |
|
with the selected layer and/or group. |
737 |
|
|
738 |
|
2003-03-26 Jonathan Coles <[email protected]> |
739 |
|
|
740 |
|
This putback contains the code for dockable windows. There is |
741 |
|
no support in wxWindows as of this date for windows that can |
742 |
|
attach themselves to other windows. |
743 |
|
|
744 |
|
The current model contains a DockableWindow which has a parent |
745 |
|
window for when it is detached and a dock window that it puts |
746 |
|
its contents in when it is docked. The contents of a DockableWindow |
747 |
|
must be a DockPanel. DockPanel itself derives from wxPanel. |
748 |
|
|
749 |
|
* Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED |
750 |
|
message, not a LAYER_LEGEND_CHANGED message. |
751 |
|
|
752 |
|
* Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages. |
753 |
|
|
754 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE |
755 |
|
as one of the style properties for the fieldTypeText item to |
756 |
|
be sure that its size is correct when the text changes. |
757 |
|
|
758 |
|
* Thuban/UI/dock.py: New. Classes for the DockPanel and |
759 |
|
DockableWindow. |
760 |
|
|
761 |
|
* Thuban/UI/legend.py: Added some more buttons and made the |
762 |
|
LegendPanel a DockPanel. |
763 |
|
|
764 |
|
* Thuban/UI/mainwindow.py: Added sash windows to the main window |
765 |
|
and supporting functions for manipulating the sashes. |
766 |
|
(MainWindow.ShowLegend): Create a DockableWindow with the |
767 |
|
LegendPanel as the contents. |
768 |
|
|
769 |
|
* Thuban/UI/messages.py: Added DOCKABLE_* messages |
770 |
|
|
771 |
|
* Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED, |
772 |
|
not LAYER_LEGEND_CHANGED, messages. |
773 |
|
|
774 |
|
2003-03-25 Jonathan Coles <[email protected]> |
775 |
|
|
776 |
|
* setup.py: Added custom script bdist_rpm_build_script so that |
777 |
|
when the rpm is built the path to wx-config is correct. |
778 |
|
|
779 |
|
* setup.cfg: Added line saying to use the custom build script |
780 |
|
|
781 |
|
2003-03-20 Jonathan Coles <[email protected]> |
782 |
|
|
783 |
|
Initial implementation of the Legend. |
784 |
|
|
785 |
|
* Thuban/UI/legend.py: New. Creates a window that shows the map's |
786 |
|
Legend information and allows the user to add/modify classifications |
787 |
|
and how the layers are drawn on the map. |
788 |
|
|
789 |
|
* setup.py: New command 'build_docs' which currently uses |
790 |
|
happydoc to generate html documentation for Thuban. |
791 |
|
|
792 |
|
* Thuban/Model/classification.py (ClassGroup.GetDisplayText): New. |
793 |
|
Returns a string which is appropriately describes the group. |
794 |
|
|
795 |
|
* Thuban/Model/layer.py (Layer.SetClassification): Generate a |
796 |
|
LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event. |
797 |
|
|
798 |
|
* Thuban/Model/map.py (Map): Rename messages and use new, more |
799 |
|
specific, messages. |
800 |
|
|
801 |
|
* Thuban/Model/messages.py: New message to indicate that a layer's |
802 |
|
data has changed (LAYER_CHANGED). New map messages to indicate |
803 |
|
when layers have been added/removed/changed or if the stacking order |
804 |
|
of the layers has changed. |
805 |
|
|
806 |
|
* Thuban/Model/session.py: Rename and use new messages. |
807 |
|
|
808 |
|
* Thuban/UI/classifier.py: Remember if any changes have actually |
809 |
|
been applied so that if the dialog is cancelled without an application |
810 |
|
of changes we don't have to set a new classification. |
811 |
|
(ClassDataPreviewer): Pulled out the window specific code and put it |
812 |
|
ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw |
813 |
|
symbols on any DC. |
814 |
|
|
815 |
|
* Thuban/UI/mainwindow.py: New code to open the legend. |
816 |
|
|
817 |
|
* Thuban/UI/view.py: Use new message names. |
818 |
|
|
819 |
|
2003-03-19 Jonathan Coles <[email protected]> |
820 |
|
|
821 |
|
* Thuban/UI/main.py (verify_versions): New. Checks the versions |
822 |
|
of Python, wxPython, and some other libraries. |
823 |
|
|
824 |
|
* extensions/thuban/wxproj.cpp (check_version): Checks the given |
825 |
|
version against what wxproj was compiled with. |
826 |
|
(check_version_gtk): If wxproj was compiled with gtk then check |
827 |
|
the given version against the version of the gtk library |
828 |
|
currently being used. |
829 |
|
|
830 |
2003-03-14 Bernhard Herzog <[email protected]> |
2003-03-14 Bernhard Herzog <[email protected]> |
831 |
|
|
832 |
* test/test_command.py: Run the tests when the module is run as a |
* test/test_command.py: Run the tests when the module is run as a |