/[thuban]/branches/WIP-pyshapelib-bramz/ChangeLog
ViewVC logotype

Contents of /branches/WIP-pyshapelib-bramz/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2342 - (show annotations)
Fri Sep 3 17:02:28 2004 UTC (20 years, 6 months ago) by jschuengel
Original Path: trunk/thuban/ChangeLog
File size: 397802 byte(s)
updated ChangeLog

1 2004-09-03 Jan Schüngel <[email protected]>
2
3 * Extensions/umn_mapserver/mapfile(MF_Class.add_thubanstyle): Fix a
4 small bug with the line color. Now the line color will now only set
5 if it is set in Thuban an not Transparent.
6
7 * Extensions/umn_mapserver/mf_export(tblayer_to_map): Fixed a bug with
8 deleting the layers from mapfile. Now all layers will delete backwards
9 from the last.
10
11 2004-08-20 Silke Reimer <[email protected]>
12
13 * Thuban/Model/layer.py:
14 Fixes bug in projection handling: Otherwise very large region might not
15 have valid values in the layer's projection.
16
17 2004-08-20 Silke Reimer <[email protected]>
18
19 * Thuban/UI/about.py:
20 small changes to be consistent with coding style.
21
22 2004-08-13 Martin Schulze <[email protected]>
23
24 * Extensions/wms/test/test_ogclib.py (TestOGCLib.compare_URLs):
25 Adjusted a comment
26
27 2004-08-11 Silke Reimer <[email protected]>
28
29 * Thuban/UI/about.py: Small changes to encoding related stuff to avoid
30 too many and too enhanced imports of locale
31
32 2004-08-10 Silke Reimer <[email protected]>
33
34 * Thuban/UI/about.py: Fixed encoding problem of about dialog: Added
35 function unicodeToLocale() to convert special characters to users
36 locale encoding
37
38 2004-08-10 Jan-Oliver Wagner <[email protected]>
39
40 * Doc/technotes/coding_guidelines.txt: Added rule 'Method names start with
41 lower case letter'
42
43 2004-08-09 Jan Schüngel <[email protected]>
44
45 * ChangeLog: Rewrite the last ChangeLog entry to follow
46 the standard way.
47
48 * Extensions/umn_mapserver/mapfile: Moved the import AnnotationLayer to
49 the function where it is needed, because it don't works if it stands
50 at the beginning.
51 (MF_Layer.__init__): Removed the extra numclassed variable. Now
52 numclasses from the mapscript will be used.
53 (MF_Layer.get_index): New. Return the index of the layer in mapfile.
54 (MF_Layer.set_classes): New. A Classlist will be set to the layer.
55 (MF_Layer.set_metadata): New. A Metadata mapscript object will set.
56 (MF_Layer.remove_allclasses): New. All class of the layer will remove.
57 (MF_Map.create_new_layer): New. A new Layer is created and associated
58 with the mapscript object.
59 (MF_Map.set_layerorder): New. The Layer order like in thuban is set in
60 the mapscript.
61 (MF_Map.add_thubanlayer): Now a new layerobj is created if no one is
62 linked to the layer in thuban, else the layerobject linked to the
63 thubanlayer will be used.
64 AnnotationLayer will now store the filename of the shapefile.
65 (MF_Map.remove_layer): If a layer is removed the associated object
66 must be set new.
67
68 * Extensions/umn_mapserver/mf_export.py(tb_layer_to_map): Add all
69 layers which are exists in thuban to the mapobj. All removed Layers
70 will be removed from the mapobj.
71 Added comments to all functions.
72 (thuban_to_map): No layer will be removed here.
73
74 * Extensions/umn_mapserver/mf_handle.py
75 (_has_umn_mapobj_and_selectedlayer): Activating the layer menu. Now
76 Layersettings for the mapserver kann be edited.
77
78 * Extensions/umn_mapserver/mf_import.py: Now all layers which are
79 imported, will be linked with the associated MF_Layer.
80 (import_mapfile): All layers, which are not selected, will be removed.
81 Disable the "import layer from mapfile" menu option.
82
83 * Extensions/umn_mapserver/sample/iceland.map: Set the status of the
84 Annotation Layer from DEFAULT to OFF. The DEFAULT setting turns the
85 layer on permanently.
86
87 2004-08-03 Jan Schüngel <[email protected]>
88
89 * Extensions/umn_mapserver/mapfile.py(MF_Metadata.remove_allmetadata):
90 New. This function removes all metadata
91 (MF_Layer.set_group): New. Set the group setting.
92 (MF_Layer.get_group): New. Get the group setting.
93 (MF_Map): Removed the extra numlayers variable, used the mapscript
94 parameter instead.
95 (MF_Map.get_numlayers): New. This get numlayers.
96 (MF_Map.remove_all_layers): New. Removes all layers from the mapobj.
97 (MF_Map.add_thubanlayer): Replaced the exception handling by a check
98 if the object is an instance. Also added the annotation layer here to
99 export, but only the layer is created in the mapfile.
100
101 * Extensions/umn_mapserver/mf_export.py(export_mapfile): Removed
102 the check if a mapobj exist, because its not needed anymore. The
103 export function is only available if a mapobj exist.
104 Use the new function to remove all layers.
105
106 * Extensions/umn_mapserver/mf_handle.py(Layer_Dialog): Added a group
107 option and the metadata button. The layer dialog is temporary disabled.
108 (Metadata_CustomDataTable): Added some functions to show the grid
109 correct.
110
111 * Extensions/umn_mapserver/mf_import.py: Moved the code for showing
112 the number of layer from import_mapfile to this function.
113 (AnnotationLayer): New. This Class shows the Annotation layer in
114 thuban. The layer don't do anything. It's only to show the layer
115 and to save the layer order.
116 (add_annotationlayer): New. Import an annotation layer to thuban.
117 (select_layer2import): New. Import only layers to thuban and not
118 the other settings like projection or scalebar.
119 (create_new_mapfile): Moved the _has_umn_mapobj function and the
120 create_new_mapfile functions from mf_handle.py to mf_import.py.
121
122 * Extensions/umn_mapserver/sample/iceland.map: Added the group
123 parameter to the roads and cultural layers. Also added a new
124 Annotation Layer for the cultural points.
125
126 * Extensions/umn_mapserver/sample/iceland.html: Added the select
127 option for the annotation layer.
128
129 * Extensions/umn_mapserver/sample/index.html: Added the start
130 parameter for the annotation layer.
131
132 2004-08-01 Jan-Oliver Wagner <[email protected]>
133
134 * Doc/manual/thuban-manual-de.xml (Chapter Session Management):
135 translation completed.
136
137 * Doc/manual/thuban-manual.xml (Chapter Session Management):
138 Fixed unprecise description for Save Session.
139
140 2004-07-31 Jan-Oliver Wagner <[email protected]>
141
142 Started translation of Users Manual into german.
143
144 * Doc/manual/thuban-manual-de.xml: New. German Users Manual.
145
146 * Doc/manual/Makefile: Added build instructions for german
147 users manual.
148
149 * Doc/manual/thuban-manual.xml: Minor corrections in Introduction.
150
151 2004-07-28 Jan Schüngel <[email protected]>
152
153 * Extensions/umn_mapserver/mapfile.py(MF_Metadata): Changed all class
154 functions. Now all metadata will handle by the function and its not
155 needed to initialize it from outside. Therefor the associated mapobj
156 will be stored in the Metadata Object. So we can use the special
157 functions from the associated mapobj to get the Metadata.
158 Therefor all initialization code for the metadata is removed from the
159 other classes.
160 (MF_Layer): Added a function to get the metadata object.
161 (MF_Map): Added a function to set the mappath, the path where
162 the mapfile ist stored.
163
164 * Extensions/umn_mapserver/mf_export.py(thuban_to_map): Changed the code
165 to set the extent in the mapfile. Now the code is set by the displayed
166 data in the Thuban-view.
167 (export_mapfile): The shapepath is now set empty, until relative
168 pathnames are supported.
169
170 * Extension/umn_mapserver/mf_handle.py: Added a dialog to handle
171 metadata. Yet only mapfile metadata are supported. Layer and class
172 supported are not implemented.
173 Added a dialog to handle layer informations. The dialog only shows the
174 selected layer at the moment.
175
176 * Extensions/umn_mapserver/mf_import.py(import_mapfile): Changed the
177 code for setting the extent in thuban. Now the extent is set to the
178 given extent from the mapfile.
179 Fixed a logical mistake. Now the extent is set when realy a layer is
180 loaded, and not if one is selected to load.
181
182 * Extensions/umn_mapserver/sample/iceland.html: Added code to zoom and
183 move the shown map in the browser.
184
185 * Extensions/umn_mapserver/sample/iceland.map: Added a new metadata
186 line to the mapobj and added metadata to the political layer.
187
188 * Extensions/umn_mapserver/test/test_mapserver.py: Changed the test
189 for Metadata.
190
191 2004-07-26 Martin Schulze <[email protected]>
192
193 * Thuban/Lib/classmapper.py (ClassMapper.has): Added the new
194 ClassMapper
195
196 * test/test_classmapper.py (TestMapping.test_mapper): Added a Test
197 case for the new ClassMapper
198
199
200 2004-07-22 Bernhard Herzog <[email protected]>
201
202 * Thuban/UI/viewport.py (ViewPort.VisibleExtent): New. Return the
203 visible extent of the map in projected coordinates
204
205 * test/test_viewport.py (SimpleViewPortTest.test_default_size)
206 (SimpleViewPortTest.test_init_with_size): Add some VisibleExtent()
207 tests.
208 (SimpleViewPortTest.test_visible_extent): New. The real test for
209 VisibleExtent()
210
211 2004-07-22 Bernhard Herzog <[email protected]>
212
213 * test/test_viewport.py: Use support.run_tests as the main
214 function when running asa script.
215
216 2004-07-22 Jan Schüngel <[email protected]>
217
218 * Extensions/umn_mapserver/mf_export.py: Added "import os"
219 Removed the old "import Thuban.UI.mainwindow" code.
220 (tbextent_to_map): Removed the extra function and at the code direct
221 to "thuban_to_map" function.
222 (write_creatorcomment): Added. Now a short comment is added to the
223 beginning of an generated mapfile.
224 (export_mapfile): Now the Path and filename are saved in to variables,
225 and not together in one variable. This is needed for the new
226 write_creatorcomment function.
227
228 * Extensions/umn_mapserver/mf_import.py (import_mapfile): Added the
229 import module "re". Also added Range and the ClassGroupRange import
230 from Thuban. Both are needed for the new range expression import.
231 (create_rangeexpression): Added. Creates a Range Expression in Thuban
232 style from a given mapfile expression.
233 (added_rasterlayer): Make some small code changes. The shapepath is
234 now stored in an extra variable and the clazz_name is set empty if no
235 class name set in the mapfile.
236 Changed the Error message for Range Expressions, becaus the new
237 function create a error string which will be shown in the dialog.
238
239 * Extensions/umn_mapserver/test/test_mapserver.py: Added a test for the
240 range expression import.
241
242 2004-07-21 Jan-Oliver Wagner <[email protected]>
243
244 * Extensions/umn_mapserver/README: Added hint that
245 installation as root can be avoided. Removed all tabs.
246
247 2004-07-16 Bernhard Herzog <[email protected]>
248
249 * test/test_viewport.py
250 (ViewPortTest.test_changing_map_projection): Check that changing
251 the projection of an empty map shown in a viewport doesn't lead to
252 exceptions in the viewport's handler for the
253 MAP_PROJECTION_CHANGED messages
254
255 * Thuban/UI/viewport.py (ViewPort.map_projection_changed): Only
256 try to keep the same region visible when the map actually contains
257 something
258
259 2004-07-15 Jan Schüngel <[email protected]>
260
261 * Extensions/umn_mapserver/mapfile.py: Added a function to get the
262 mappath directly from the mapobj. Is needed because of the changes
263 in mf_import.py.
264 (MF_Layer.add_thubanclass): Added a new comment.
265 (MF_Map.set_extent): Fixed a bug with exporting empty mapobj. If the
266 mapobj is empty there is no extent get from thuban an so no one can
267 set to th mapobj.
268
269 * Extensions/umn_mapserver/mf_import.py (import_mapfile): Updated
270 the discription.
271 Split the funktion in to three smaller ones. The new functions are
272 add_rasterlayer, add_polygonlayer and select_layer2import.
273 Removed the mapfilepath and filepath initialisation, because its know
274 include in the new functions.
275 Now nothing will be imported if cancel is pressed in the
276 layer choice dialog.
277
278 2004-07-14 Jan Schüngel <[email protected]>
279
280 * Extensions/umn_mapserver/mapfile.py: Added ClassGroupDefault to
281 import.
282 (MF_Symbolset): Removed the extra variable for numsymbols.
283 (MF_Class.__init__): Added a comment to the exception clause.
284 Removed the extent init, because it was not needed anymore.
285 (MF_Layer.add_thubanclass): Added the code to set the class name to
286 the expression value from thuban if no label is defined.
287 Added the code to export Range expressions from thuban to the mapfile.
288 (MF_Map.set_extent): Removed the exception and replace it by some if
289 code. If the size of a map is not defined the size will be set to 1,1.
290 This is necessary because if the extent is set, mapscript checks if
291 the size is greater than zero.
292 (MF_Web): Added the get and set function for the template.
293
294 * Extensions/umn_mapserver/mf_export.py: Added the function to check
295 if a mapobject exists and used it to set the status of the menu items.
296 If no mapfile exists the settings could not be edditied.
297 Define after which menuitem the exportitem will include.
298
299 * Extensions/umn_mapserver/mf_handle.py: Removed the import
300 Thuban.UI.mainwindow clause, because it is not needed.
301 Added the command Refresh() to all "OnChangeColor()" functions,
302 because the color preview window was not updated on a color change.
303 Added the function to check if a mapobject exists and used it to set the
304 status of the menu items. If no mapobject exists the settings could not
305 be edditied.
306 (Map_Dialog): Moved the imagetype selector from the
307 Outputformat_Dialog to Map_Dialog and removed Outputformat_Dialog.
308 (Web_Dialog): Removed the name label and added the template textbox.
309
310 * Extensions/umn_mapserver/mf_import.py (import_mapfile): Replace
311 the exception handling on loading the layers by an if statement. It
312 is not necessary to us the exception there.
313 The Filepath creation now use os.path.join to build the path.
314
315 * Extensions/umn_mapserver/test/test_mapserver.py: Moved the testMap
316 definition from global to the setUp function. Now the testMap will
317 initialize new on each test.
318
319 * Extensions/umn_mapserver/sample/iceland.map: Include three new
320 classes in the Line Layer, to test logical Expressions.
321 Set the status of the class "Point9" in the Point Layer to off
322
323 2004-07-13 Bernhard Herzog <[email protected]>
324
325 * Thuban/UI/baserenderer.py
326 (BaseRenderer.render_map_incrementally): Fix a logic bug in the
327 optimization that tries not to draw layers under a raster layer.
328 The bug was harmless. All it effectively did was to produce The a
329 strange messages about not being able to draw Layer instances for
330 all vector layers below a raster layer which would be invisible
331 anyway because the raster layer currently always covers the entire
332 window
333
334 2004-07-08 Jan Schüngel <[email protected]>
335
336 * Extensions/umn_mapserver/mapfile.py: Added code to generade and get
337 a list of supported outputformats. This formats are not alle supported
338 because there is no possibility to get the outputformat without the
339 name known. Make some formal changes to the code.
340 (MF_Map.set_name()): Fixed a bug if the name is None.
341
342 * Extensions/umn_mapserver/mf_handle.py: Removed the image_type import
343 statement, because its not needed anymore. The Outputformat is now
344 given as string from the object. Make some formal changes to the code.
345
346 * Extensions/umn_mapserver/test/test_mapserver.py: Added new test for
347 most of the new setting which were added during the last changes.
348 Removed the MF_Size Test.
349
350 * Extensions/umn_mapserver/test/test.map: Added a new class to the
351 cultural Layer to test expressions and the the status of that layer
352 from on to default.
353 Changed the data path the the correct Thuban Data
354 Added the Outputformat Object and Symbol Object
355
356 2004-07-07 Jan Schüngel <[email protected]>
357
358 * Extensions/umn_mapserver/mapfile.py: Added some new
359 settings to edit (outputformat, label, imagetype)
360
361 * Extensions/umn_mapserver/mf_handle.py: Added some setting to
362 the Label Dialog and add the OutputDialog.
363 Make some changes to the code order.
364
365 2004-07-06 Jan Schüngel <[email protected]>
366
367 * Extensions/umn_mapserver/mapfile.py: Added the symbolObj, pointObj
368 and line Obj and add the scalebar_status_type, scalebar_style_type and
369 scalebar_position_type.
370 Added the symbol- and symbolsetObject (MF_Symbol,MF_Symbolset). The
371 are only used to create a Symbol like the circle in Thuban.
372 Added the scalebarObject (MF_Scalebar)
373 (MF_Class): Added set_status and get_status.
374 (MF_Layer.add_thubanclass): Added code to set the class status
375 (MF_Map): Added code to handle the symbols and scalebar
376 (MF_Label): Added the set_partials and get_partials functions
377
378 * Extensions/umn_mapserver/mf_export.py: Added MF_Symbol to import
379 from mapfile. Added a function to create a circle object like the one
380 from thuban if no one exists.
381
382 * Extensions/umn_mapserver/mf_handle.py: All colors are now set when
383 press ok in the assosiated dialog and not at the end of the
384 colordialog.
385 Added the Dialog for the Scalebar.
386 (Label_Dialog): Added the offset option
387
388 * Extensions/umn_mapserver/mf_import.py: Added code to import the
389 status of the Classes.
390 Fixed a bug with the projection. Now the to_meter parameter will be
391 added to the Projection only if it doesn't exists.
392
393 2004-07-01 Jan Schüngel <[email protected]>
394
395 Added the functionality to handle the content thuban is not
396 able to handle directly.
397
398 * Extensions/umn_mapserver/mf_handle.py: New. This module extents
399 Thuban with the possibility to edit the mapfile content.
400
401 * Extensions/umn_mapserver/mf_import.py: Added the possibility
402 to import mapfiles without any layer selected. So it is possible
403 to edit the other settings in a mapfile.
404 (import_mapfile): Added code to use the editing functions.
405 Added the possibility to import the projection to a layer if one
406 is defined.
407 Status settings (On,Off) will now set in thuban (visible, invisible).
408 fixed a bug with with classnames. If no classname is set in mapfile
409 the value in Thuban will set to the expression.
410
411 * Extensions/umn_mapserver/mf_export.py(export_mapfile): Added the
412 possibility to save a new mapfile or use the old one which is
413 imported or new created.
414 Added code to use the editing functions.
415 Remove some not needed import statements
416
417 * Extensions/umn_mapserver/mapfile.py: Added new types which are
418 need for the editing functions.
419 Added needed set-functions for the editing functions.
420 Added the possibility to export rasterimages.
421 Added new classes (MF_Web, MF_Label, MF_Legend, MF_Symbol,
422 MF_SymbolSet). MF_Symbol and MF_SymbolSet are not needed at the
423 moment.
424 (MF_Class.set_thubanstyle): Now point layers will set to a default
425 symbol to show a circle in mapserver and not only a 1px dot.
426 (MF_Style.__init__): Fixed a bug with the color. Color was not set
427 correct before.
428 (MF_Size): Removed, because it is not needed.
429
430 * Extensions/umn_mapserver/README: Added the hints to use the
431 export and editing functions, too.
432
433 * Extensions/umn_mapserver/sample/iceland.map: Added the
434 new parameter "UNITS METERS".
435 Change the political layer to status OFF.
436
437 * Extensions/umn_mapserver/sample/README: Added some
438 more details to setup the sample in the MapServer.
439
440 2004-06-26 Bernhard Reiter <[email protected]>
441
442 * Extensions/svgexport/test/test_svgmapwriter.py:
443 Removed class VFile and used standard StringIO instead.
444
445 2004-06-23 Jan Schüngel <[email protected]>
446
447 Add the export function to the umn_mapserver extension.
448
449 * Extension/umn_mapserver/mf_export.py: New. This module extents
450 Thuban with the possibility to export the Thuban content.
451
452 * Extensions/umn_mapserver/mapfile.py: Expand the classes to use
453 with the export module. Especially added the possibility to
454 add thuban objects directly to the map objects.
455
456 * Extensions/umn_mapserver/mf_import.py: Removed the wxCHANGE_DIR,
457 because of the hint from Bernhard Herzog.
458 Corrected the handling of absolute pathnames.
459 Changed the Text of the Menu-Item, now the beginning is upper case.
460
461 * Extensions/umn_mapserver/README: Added the --with-tiff statement.
462
463 2004-06-16 Jan Schüngel <[email protected]>
464
465 Add a sample and make some changes.
466
467 * Extension/umn_mapserver/mf_import.py: Changed the wxPython.wx
468 import from * to explicit used statements. Changed the
469 Thuban.UI.mainwindow import phrase, too.
470 (import_mapfile):Corrected a clerical mistake.
471 Added wxCHANGE_DIR in OpenFile Dialog.
472 Added a MultipleChoiceDialog, to select the layers to load from
473 mapfile into thuban. Thereby the projection is only set if one layer
474 is selected.
475 Added the possibility to handle relative pathnames which uses
476 up-level references.
477 Removed some doubled code.
478 Corrected an error with integer values used as label in thuban
479 ClassGroup.
480
481 * Extensions/umn_mapserver/sample: New.
482
483 * Extensions/umn_mapserver/sample/README: New. Describes the
484 usage of the sample files.
485
486 * Extensions/umn_mapserver/sample/iceland.map: New. This is
487 a suitable .map-file for the iceland data.
488
489 * Extensions/umn_mapserver/sample/index.html: New. The template
490 for the mapfile.
491
492 * Extensions/umn_mapserver/sample/iceland.html: New. Initialisation
493 file for the Iceland Application on web.
494
495 * Extensions/umn_mapserver/README: Corrected a inaccuracy and added
496 some details.
497
498 * Extensions/umn_mapserver/test/test_mapserver
499 (mapserver_import_Test_generalClasses.test_MF_Color):
500 Corrected the thubancolor test.
501
502 2004-06-15 Jan Schüngel <[email protected]>
503
504 * Extensions/umn_mapserver/README: New. Install instruction.
505
506 2004-06-14 Bernhard Reiter <[email protected]>
507
508 * libraries/thuban/cpl_mfile.h: Added copyright header.
509
510 * libraries/thuban/ cpl_mfile.cpp, cpl_mfile.h: Added non-protecting
511 Free Software License so that it is most useful with gdalwarp
512 and bmpdataset.
513
514 2004-06-14 Bernhard Herzog <[email protected]>
515
516 * Thuban/UI/multiplechoicedialog.py (__version__): Add missing
517 import of wxPython.wx itself (as opposed to the contents of
518 wxPython.wx). For some reason wxPython.wx is available as
519 wxPython.wx.wx in at least some 2.4 releases. Fixes RT#2482
520 wrt. wxPython 2.4.
521
522 2004-06-10 Jan Schüngel <[email protected]>
523
524 Initial version of new extension "umn_mapserver". This extension aims
525 to manage configuration for the UMN MapServer application. This
526 inital version just imports the .map-files and displays all, Thuban is
527 capable of.
528
529 * Extensions/umn_mapserver, Extensions/umn_mapserver/test: New.
530
531 * Extensions/umn_mapserver/test/README: New. Describes how to run the
532 tests.
533
534 * Extensions/umn_mapserver/test/test.map: New. This is a test
535 .map-file for automated tests of the umn_mapserver extension of
536 Thuban.
537
538 * Extensions/umn_mapserver/test/test_mapserver.py: New. Tests for
539 UMN Mapserver classes.
540
541 * Extensions/umn_mapserver/__init__.py: New. Init to make this
542 directory a package.
543
544 * Extensions/umn_mapserver/mapfile.py: New. Classes to represent
545 '.map'-file objects.
546
547 * Extensions/umn_mapserver/mf_import.py: New. This module extends
548 Thuban with the possibility to handle UMN MapServer mapfiles.
549
550 2004-06-03 Bernhard Herzog <[email protected]>
551
552 * Thuban/Model/layer.py (Layer.TreeInfo): Convert the bounding box
553 to a tuple before using it as arguments to the % operator. This
554 fixes the formatting issue filed in RT#2239 on 2004-01-13 and
555 reported today on thuban-list by Jan Schüngel
556
557 * test/test_layer.py (TestLayerModification.setUp): Save the
558 filename as an instance variable so we can refer to it in tests
559 (TestLayerModification.test_tree_info): Uncomment this method
560 again and make it work. This tests for the formatting issue
561 filed in RT#2239 on 2004-01-13
562
563 2004-05-28 Bernhard Herzog <[email protected]>
564
565 * Thuban/UI/baserenderer.py: Fix some typos.
566
567 2004-05-18 Jan-Oliver Wagner <[email protected]>
568
569 * Extensions/gns2shp/gns2shp.py (gns2shp): Fixed a bug
570 by increasing a field size.
571
572 2004-05-17 Bernhard Herzog <[email protected]>
573
574 Update to newest shapelib and get rid of Thuban specific
575 extensions, i.e. use the new DBFUpdateHeader instead of our
576 DBFCommit kludge
577
578 * libraries/shapelib/shpopen.c: Update to version from current
579 shapelib CVS.
580
581 * libraries/shapelib/shapefil.h: Update to version from current
582 shapelib CVS.
583
584 * libraries/shapelib/dbfopen.c: Update to version from current
585 shapelib CVS.
586 (DBFCommit): Effectively removed since shapelib itself has
587 DBFUpdateHeader now which is better for what DBFCommit wanted to
588 achieve.
589 We're now using an unmodified version of dbfopen.
590
591 * setup.py (extensions): Add the HAVE_UPDATE_HEADER macro with
592 value '1' to the Lib.dbflibc extension. This simply reflects the
593 shapelib and pyshapelib updates
594
595 2004-05-16 Jan-Oliver Wagner <[email protected]>
596
597 Finished introduction of Menu.FindOrInsertMenu.
598
599 * Extensions/drawshape/drawshape.py: Add the command
600 to the experimental menu additionally to the toolbar.
601
602 * Extensions/svgexport/svgsaver.py: Use FindOrInsertMenu() instead of
603 finding menu on its own.
604
605 * Doc/manual/thuban-manual.xml: updated sample file
606 to use FindOrInsertMenu().
607
608 * Examples/simple_extensions/hello_world.py: Use FindOrInsertMenu()
609 instead of finding menu on its own.
610
611 2004-05-11 Jan-Oliver Wagner <[email protected]>
612
613 * test/test_menu.py (MenuTest.test): Added testing
614 of method Menu.FindOrInsertMenu.
615
616 2004-05-10 Jan-Oliver Wagner <[email protected]>
617
618 Introduce and use Menu.FindOrInsertMenu.
619
620 * Thuban/UI/menu.py (Menu.FindOrInsertMenu): New. Find a
621 given menu or, if not found, insert it.
622
623 * Extensions/bboxdump/bboxdump.py, /Extensions/gns2shp/gns2shp.py,
624 /Extensions/importAPR/importAPR.py, Extensions/profiling/profiling.py,
625 /Extensions/wms/wms.py: Use FindOrInsertMenu() instead of finding
626 menu on its own.
627
628 2004-05-06 Jan-Oliver Wagner <[email protected]>
629
630 Introduce a abstract ColorDialog class and remove
631 and outdated file.
632
633 * Thuban/UI/proj4dialog.py: Removed. It is has been
634 replaced by projdialog for quite a while and is not used
635 anymore.
636
637 * Thuban/UI/colordialog.py: New. Abstraction for color selection
638 dialog(s).
639
640 * Thuban/UI/classifier.py (SelectPropertiesDialog.__GetColor):
641 Now calls the abstract ColorDialog instead of wxColourDialog.
642 This also removed the dependency to Color class conversion
643 from this function.
644
645 2004-05-04 Frank Koormann <[email protected]>
646
647 * Extensions/bboxdump/__init__.py: Fixed string left over from
648 copying.
649
650 * Extensions/bboxdump/bboxdump.py (bboxdump):
651 Use layer.ShapeStore().AllShapes() to loop over shapes instead of
652 xrange(layer.NumShapes()). Compile the bboxmessage from a list
653 of formatted outputs (string.join) instead of appending to the
654 message. Two progress bar dialogs to report progress on the sometimes
655 lenghty processing.
656
657 2004-04-22 Frank Koormann <[email protected]>
658
659 New Extension to dump bounding boxes of all shapes of the selected
660 layer. An optional column can be specified to group the objects,
661 in this case the bounding box is a union of the separate boxes.
662 Dump can be displayed in a ScrolledMessageDialog or written to file.
663 The Extension is simply a combination of available and well tested
664 Thuban functionality.
665
666 * Extensions/bboxdump/__init__.py: New: Init to make this
667 directory a package.
668
669 * Extensions/bboxdump/bboxdump.py: New: Dump bounding boxes of
670 all shapes of the selected layer.
671
672 2004-04-22 Jan-Oliver Wagner <[email protected]>
673
674 * Thuban/UI/classgen.py (GenUniquePanel.__init__): Fixed two
675 strings to be i18n now.
676
677 2004-04-18 Jan-Oliver Wagner <[email protected]>
678
679 Changing popup menu of legend from direct building
680 to using the Menu construction as used for the mainwindow.
681
682 * Thuban/UI/mainwindow.py: New method commands: layer_to_top,
683 layer_to_bottom, layer_visibility
684 (MainWindow.LayerToTop): New. Put current layer to the top.
685 (MainWindow.LayerToBottom): New. Put current layer to bottom.
686 (MainWindow.HideLayer, MainWindow.ShowLayer, _has_visible_map):
687 Replace 1,0 by True, False.
688 (MainWindow.ToggleLayerVisibility): New. Toggle visibility of
689 current layer.
690 (MainWindow.LayerShowTable): Removed raising of dialog.
691 (_has_selected_layer_visible): New. Support function.
692
693 * Thuban/UI/legend.py: ID_POP_xxx: removed.
694 (LegendPanel.__init__): Removed EVT_MENU bindings.
695 (LegendTree._OnRightClick): Replace direct creation of
696 menu via wx Classes by applying the menu definition
697 as of Menu class of menu.py.
698
699 2004-04-16 Jan-Oliver Wagner <[email protected]>
700
701 * Thuban/UI/exceptiondialog.py (ExceptionDialog.dialog_layout): Improved
702 button string to stronger clearify that Thuban will be closed when hitting
703 the button.
704
705 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Added docstring.
706 Now for layers without a ShapeStore a corresponding message is given
707 to the user, that this layer has no table to show.
708
709 2004-04-15 Martin Schulze <[email protected]>
710
711 * Extensions/wms/layer.py (WMSLayer.setWMSFormat): Need to
712 recalculate the format for the internal render engine as well.
713
714 * Extensions/wms/properties.py (wmsProperties): First start for a
715 properties dialog. It's functional for a first selection of
716 layers, but still has some weired wxWidgets/GTK problems but
717 beautification can be done later.
718
719 * Extensions/wms/layer.py: Added more documentation
720 (WMSLayer.getFormats): New: Return list of supported image formats
721 by the WMS server
722 (WMSLayer.getLayers): New: Return the list of layer names
723 supported by the WMS server
724 (WMSLayer.getLayerTitle): New: Return the title of the named layer
725 (WMSLayer.getWMSFormat): New: Return the image format that is used
726 for WMS GetMap requests
727 (WMSLayer.setWMSFormat): New: Set the image format that is used
728 for WMS GetMap requests
729 (WMSLayer.__init__): Move away from using only one layer to using
730 a list of layers (unsorted at the moment, though).
731 (WMSLayer.getVisibleLayers): New: Return the list of names for all
732 visible layers
733 (WMSLayer.setVisibleLayers): New: Set the list of names for all
734 visible layers
735
736 * Extensions/wms/wms.py: Moved the WMS layer into layer.py in
737 order to establish a clean structure.
738
739 * Extensions/wms/layer.py: Moved the WMS layer into a file on its
740 own in order to establish a clean structure.
741
742 2004-04-13 Martin Schulze <[email protected]>
743
744 * Extensions/wms/parser.py (WMSCapabilitiesParser.grok): Added
745 support for oldstyle (WMS 1.0 apparently) image format
746 specification.
747
748 * Extensions/wms/wms.py (WMSLayer.calcFormat): Reduce the list of
749 supported graphic formats back to JPEG and BMP, PNG and others are
750 too *cough* experimental... Sorry, I meant to filter this out
751 before I committed this part. This should make the WMS extension
752 run from CVS again.
753 (wms_dialog): Reset an empty URL to None so that the subsequent
754 program can depend on this, since the dialog will indeed return an
755 empty URL, causing another declaration of love by Python.
756
757 * Extensions/wms/parser.py (WMSCapabilitiesParser.getLayerBBox):
758 Whenever a native BoundingBox request cannot be fulfilled, check
759 whether the requested SRS is EPSG:3426, in which case return the
760 LatLonBoundingBox values.
761
762 * Extensions/wms/test/test_parser.py
763 (TestWMSCapabilitiesParser.test_LayerSRS): Added a test for
764 ignoring AUTO:* SRS.
765 (TestWMSCapabilitiesParser.test_LatLonBoundingBoxes_as_bboxes):
766 Added another test method to test whether the LatLonBoundingBox
767 values will be returned if BoundingBox values are requested with
768 SRS set to EPSG:3426.
769
770 * Extensions/wms/parser.py (WMSCapabilitiesParser.peekLayers):
771 Added rudimentary support for non-EPSG SRS, i.e. ignore them for
772 the moment by placing them into a variable which is currently
773 unused. Also test whether the EPSG SRS is numerical as it should
774 be and add an error message if it is not.
775
776 * Extensions/wms/test/sample.xml: Added AUTO:* SRS since they
777 appear in the real world as well. Since we cannot handle them yet
778 (OGCLib can't either), we will ignore them for the moment.
779
780 * Extensions/wms/parser.py: Use a variable for denoting the sample
781 filename
782 (WMSCapabilitiesParser.peekLayers): Added support for error
783 messages during grok(). They will be aggregated in an array and
784 may be displayed later. We may have to add a classification
785 "Warning" and "Error" to this. That requires more experience,
786 though, since not every error may be lethal.
787
788 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Raise the
789 ShowTable() dialog/frame when the user attempts to display it
790 while it has been opened before already and not closed again.
791
792 2004-04-11 Martin Schulze <[email protected]>
793
794 * Extensions/wms/infodialog.py: Adjusted the class documentation
795
796 * Extensions/wms/wms.py (WMSLayer.__init__, WMSLayer.GetMapImg):
797 Switch to using Thuban{Begin,End}BusyCursor instead of the pure
798 wxWidgets variants.
799 (WMSLayer.__init__): The epsg_id variable is named top_srs now.
800
801 * Extensions/wms/infodialog.py: Added an information dialog that
802 will display various information about the WMS current resource,
803 so that additional information such as the title, the abstract,
804 fees and access constraints can be displayed for the user if they
805 are documented in the WMS XML.
806
807 2004-04-10 Martin Schulze <[email protected]>
808
809 * Extensions/wms/parser.py (WMSCapabilitiesParser.grok): Adjusted
810 string handling. It's "foo".lower() and not lower(foo) without
811 lower imported from strings or something.
812
813 * Extensions/wms/wms.py (WMSLayer): Incorporated WMSCapabilities
814 from capabilities.py and parser.py. Implement priority list for
815 supported graphics formats, take care of wbmp != bmp. PNG, TIFF
816 and GIF are supported here, but not yet by main Thuban. Hence,
817 support for them may be removed later. Special contribution to
818 usability: get wxWidgets to change the cursor when we're waiting
819 for data from the network so the user won't start to worry. This
820 causes a redrawing error/warning, though.
821
822 * Extensions/wms/parser.py (WMSCapabilitiesParser.grok): Unlink
823 the DOM object.
824
825 2004-04-01 Martin Schulze <[email protected]>
826
827 * Extensions/wms/capabilities.py: Adjusted documentation
828 (WMSCapabilities.__init__): Improved documentation, fixed syntax
829 (WMSCapabilities.saveCapabilities): Only catch IOError when
830 handling files
831 (WMSCapabilities.loadCapabilities): Only catch IOError when
832 handling files
833 __main__: corrected variable naming
834 (WMSCapabilities.fetchCapabilities,loadCapabilities): Make this
835 class a specialisation of WMSCapabilitiesParser as well. Also
836 execute grok() after loading or fetching capabilities, if that
837 went well, so that subsequent calls can already access the data.
838 (WMSCapabilities.getVersion): Export the used version of the
839 GetCapabilities request, so we can use it for subsequent calls,
840 i.e. for GetMap requests.
841 (WMSCapabilities.fetchCapabilities): Added proper error handling
842 when the GetCapabilities request failed, so that the surrounding
843 program can act accordingly.
844
845 2004-03-30 Martin Schulze <[email protected]>
846
847 * Extensions/wms/parser.py (WMSCapabilitiesParser.getLayerSRS):
848 Adjusted the getLayerSRS method to return the list of SRSes
849 extracted from <SRS> elements instead of <BoundingBox> elements.
850 Added a bit of documentation as well.
851 (WMSCapabilitiesParser.checkLayerSRS): Removed integrity test
852 since it was only implemented due to a misunderstanding.
853
854 * Extensions/wms/test/test_parser.py
855 (TestWMSCapabilitiesParser.test_LayerSRS): Adjust the tests to
856 reflect the corrected interpretation of the standard: i.e. a layer
857 does not have to define a BoundingBox for all SRSes it supports.
858 Hence the <SRS></SRS> specification is authoritative, not the list
859 of BoundingBoxes.
860 (TestWMSCapabilitiesParser.test_BoundingBoxes): Added a new test
861 to ensure None is returned for a non-existing SRS.
862 (TestWMSCapabilitiesParser.test_grok): Removed test_grok method
863 since it is not applicable anymore. Listing more SRSes in <SRS>
864 elements is valid according to the specs.
865
866 2004-03-26 Bernhard Reiter <[email protected]>
867
868 * README: Nicer formatting of text. Improved descriptions.
869 Reflected wxWidgets name change.
870
871 * Thuban/UI/about.py: Extended copyright to 2004 and added
872 information about the thuban-devel mailinglist.
873
874 2004-03-24 Martin Schulze <[email protected]>
875
876 * Extensions/wms/capabilities.py: Renamed the class to contain
877 'WMS', also added a linebreak where required
878
879 * Extensions/wms/parser.py: Finally added the XML parser for the
880 GetCapabilities response.
881
882 * Extensions/wms/test/sample.xml: Adjusted the sample file so that
883 <SRS> elements match the <BoundingBox> elements, except for the
884 layer 'beschriftung'.
885
886 * Extensions/wms/test/test_parser.py: Encode non-ascii strings
887 since Python uses unicode strings internally, otherwise
888 comparisons will fail. Removed tests for getLayerBBoxSRS() since
889 the SRS will be calculated anyway and this method is obsoleted by
890 getLayerSRS(). Denote SRS as strings and not as cardinal numbers.
891 Move loading the sample file into the setUp method. Added a test
892 for finding the integrity problem in the sample response.
893 Improved formatting.
894
895 * Extensions/wms/domutils.py: Added convenience routines for
896 handling of Document Object Model (DOM) nodes.
897
898 * Extensions/wms/test/test_domutils.py: Added a test for the
899 domutils module
900
901 2004-03-19 Martin Schulze <[email protected]>
902
903 * Extensions/wms/test/test_parser.py (TestWMSCapabilitiesParser):
904 Moved path detection and adding into a module of its own,
905 adjustpath, which exports thubandir as main Thuban directory.
906
907 * Extensions/wms/test/test_ogclib.py (TestWMSLib): Moved path
908 detection and adding into a module of its own, adjustpath, which
909 exports thubandir as main Thuban directory. Reorganised the
910 module in order to support the SkipTest feature for Thuban test
911 cases.
912
913 * Extensions/wms/test/adjustpath.py: Moved path detection and
914 adding into a module of its own.
915
916 2004-03-18 Martin Schulze <[email protected]>
917
918 * Extensions/wms/test/test_parser.py: Added another test for
919 checking whether the WMS XML parser (to be implemented) returns
920 the information we expect. This requires a sample WMS WML file
921 (sample.xml) which has been extracted from the frida server and
922 "improved" manually.
923
924 * Extensions/wms/test/test_ogclib.py: Added legacy code to add the
925 main Thuban directory to the path in order to be able to import
926 random modules. Adjusted the PyOGCLib detection to reuse the
927 information gathered. Also added a note about the PYTHONPATH
928 environment variable.
929
930 * Extensions/wms/test/test_ogclib.py: The format specification is
931 a mime-type, not a graphic format, hence image/jpeg wou ld be the
932 proper format and not JPEG. We'll also have to take care of the
933 encoding of / as %2F.
934
935 2004-03-16 Martin Schulze <[email protected]>
936
937 * Extensions/wms/test/test_ogclib.py: Added a (hopefully)
938 comprehensive test for the getMapURL method, built compare URLs
939 according to the documentation in OGC 01-068r3
940
941 * Extensions/wms/capabilities.py (WMSCapabilities): Added the
942 class WMSCapabilities to manage capabilites, will incorporate
943 parsing the capabilities response and provide details for other
944 classes.
945
946 2004-03-12 Bernhard Herzog <[email protected]>
947
948 Support views in addition to normal tables in the postgis
949 shapestore
950
951 * Thuban/Model/postgisdb.py
952 (PostGISShapeStore._fetch_table_information): Add a fallback for
953 the case where the table name is not in the geometry_columns
954 table. This is usually the case for views. Also, set
955 self.shapestore here.
956 (PostGISShapeStore.ShapeType): No need to query the database all
957 the time. The shape type is now determined in
958 _fetch_table_information
959
960 * test/postgissupport.py (PostgreSQLServer.new_postgis_db)
961 (PostgreSQLServer.get_static_data_db, PostGISDatabase.__init__):
962 New parameter to specify views.
963 (PostGISDatabase.has_data): Also compare the views. New views
964 parameter
965 (PostGISDatabase.initdb): Create the views.
966 (PostgreSQLServer.get_default_static_data_db): Add the v_landmarks
967 view
968
969 * test/test_postgis_db.py
970 (TestPostGISShapestorePointFromViews): New. Test a
971 PostGISShapeStore with a view
972 (TestPostGISShapestorePointOIDAsGIDColumn.setUp): Pass the name of
973 the geometry_column explicitly to test whether that works
974
975 2004-03-12 Bernhard Herzog <[email protected]>
976
977 Final step for explicit id/geometry columns: Loading and saving
978
979 * Resources/XML/thuban-1.1.dtd: New. Derived from thuban-1.0.dtd
980 with the following changes:
981 (dbshapesource): Two new attributes id_column and geometry_column
982
983 * Thuban/Model/save.py (SessionSaver.write): Use the new dtd
984 (SessionSaver.write_session): Use the new namespace
985 (SessionSaver.write_data_containers): Write the new dbshapesource
986 parameters
987
988 * Thuban/Model/load.py (SessionLoader.__init__): New namespace for
989 the new file format version
990 (SessionLoader.start_dbshapesource): Handle the new db parameters
991
992 * test/test_save.py: Update to the new dtd and namespace
993 (SaveSessionTest.test_save_postgis): Update the NonConnectionStore
994 mock object to provide a working IDColumn method.
995
996 * test/test_load_1_0.py: New. Copy of the test_load.py before
997 today's changes but with the round-trip tests removed.
998
999 * test/test_load_0_9.py: Update doc-string.
1000
1001 * test/test_load.py: Update all .thuban files to the new dtd and
1002 namespace.
1003 (TestPostGISLayer.file_contents): Add the new dbshapesource
1004 paramters
1005
1006 2004-03-11 Bernhard Herzog <[email protected]>
1007
1008 Next step for explicit id/geometry columns: User interaction
1009
1010 * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Rework how
1011 the dialog is constructed. Add combo boxes to select id and
1012 geometry column. Rename some instance variables.
1013 (ChooseDBTableDialog.GetTable): Return id and geometry column
1014 names
1015 (ChooseDBTableDialog.OnTableSelect): New. Event handler for
1016 selections in the table list
1017
1018 * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Use id_column
1019 and geometry_column
1020
1021 * Thuban/Model/session.py (Session.OpenDBShapeStore): Add the new
1022 parameters for id_column and geometry column of PostGISShapeStore
1023 here as well.
1024
1025 * Thuban/Model/postgisdb.py (type_map): Add ROWID psycog type.
1026 (_raw_type_map): New. Map raw PostgreSQL type ints to thuban types
1027 (PostGISConnection.GeometryTables): Use a better query to
1028 determine which relations in the database might be usable for
1029 shapestores. Now supports views as well but is more PostgreSQL
1030 specific
1031 (PostGISConnection.table_columns): New. Somewhat experimental
1032 method to let the db dialogs provide lists of columns to users so
1033 that they can select id and geometry columns.
1034 (PostGISTable.__init__): The default value of the id_column
1035 parameter is now None it still means "gid" effectively, though.
1036 (PostGISTable.IDColumn): New introspection method to return a
1037 column object for the id column
1038 (PostGISShapeStore.GeometryColumn): New introspection method to
1039 return a column object for the geometry column
1040
1041 * test/test_postgis_db.py
1042 (TestPostGISConnection.test_gis_tables_non_empty):
1043 Removed. Subsumed by the new:
1044 (TestPostGISConnection.test_gis_tables_with_views_and_tables):
1045 New. Tes the GeometryTables and table_columns methods with actual
1046 tables and views.
1047 (PointTests.test_id_column, PointTests.test_geometry_column):
1048 New. tests for the new methods.
1049 (TestPostGISShapestorePoint.setUp)
1050 (TestPostGISShapestorePointSRID.setUp)
1051 (TestPostGISShapestorePointExplicitGIDColumn.setUp): Fill the
1052 instance variables needed by the new tests
1053
1054 2004-03-11 Bernhard Herzog <[email protected]>
1055
1056 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): The row
1057 numbers given to ReadValue are ordinals.
1058
1059 2004-03-11 Bernhard Herzog <[email protected]>
1060
1061 Elimiate the requirement for PostGIS tables to have a column
1062 called "gid".
1063
1064 * Thuban/Model/postgisdb.py (PostGISTable.__init__): New parameter
1065 id_column to specify which column to use to identify rows. Also
1066 new instance variables id_column and quoted_id_column
1067 (PostGISTable.RowIdToOrdinal, PostGISTable.RowOrdinalToId)
1068 (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue)
1069 (PostGISTable.SimpleQuery): Use the id column name provided to the
1070 constructor instead of "gid"
1071 (PostGISShapeStore.__init__): New parameter id_column analogously
1072 to PostGISTable.__init__. This parameter is simply passed through
1073 to the base class constructor
1074 (PostGISShapeStore._create_col_from_description): Fix typo in
1075 doc-string
1076 (PostGISShapeStore.Shape, PostGISShapeStore.AllShapes)
1077 (PostGISShapeStore.ShapesInRegion): Use the id column name
1078 provided to the constructor instead of "gid"
1079
1080 * test/postgissupport.py
1081 (PostgreSQLServer.get_default_static_data_db): New static table
1082 landmarks_point_id with an id column != "gid. Update the comments
1083 a bit.
1084 (skip_if_addgeometrycolumn_does_not_use_quote_ident): Fix typo in
1085 doc-
1086 (upload_shapefile): New parameter gid_column to use a name other
1087 than "gid" for the column to store the shape ids
1088
1089 * test/test_postgis_db.py (TableTests): New. Mixin-class
1090 containing all tests previously in TestPostGISTable. The actual
1091 tests are the same but the code is a bit more configurable to
1092 allow for different id columns etc.
1093 (TestPostGISTable): Derive from TableTests now for the actual
1094 tests.
1095 (TestPostGISTableExplicitGIDColumn): New. Like TestPostGISTable
1096 except that it the landmarks_point_id table to test the id_column
1097 parameter
1098 (PointTests): Extend the doc-string
1099 (TestPostGISShapestorePointExplicitGIDColumn)
1100 (TestPostGISShapestorePointOIDAsGIDColumn): New classes derived
1101 from PointTests to test the explicit id_column parameter. One
1102 tests with the name of the column holding the shape ids, the other
1103 uses PostgreSQL's OID column. For the latter a number of methods
1104 have to be overwritten to make them independent of the actual id
1105 values.
1106
1107 2004-03-08 Silke Reimer <[email protected]>
1108
1109 Update debian directory:
1110
1111 * debian/changelog: Added new version.
1112 * deiban/rules: Updated management of patches (with cbds)
1113 * debian/control: Added cbds to dependencies
1114 * debian/patches/*: New. Adds better support for patches of thuban in
1115 debian
1116 * debian/menu: Syntax of menu changed slightly
1117 * debian/setup.py.patch: removed because it has been moved to
1118 debian/patechs/setup.py.patch
1119
1120
1121 2004-02-26 Bernhard Herzog <[email protected]>
1122
1123 Create the Doc/technotes directory for text files with information
1124 for developers
1125
1126 * Doc/technotes/README: New. README for the technotes
1127
1128 * Doc/technotes/coding_guidelines.txt: New. Coding guidelines for
1129 Thuban
1130
1131 * Doc/technotes/release_process.txt: New. Used to be
1132 HOWTO-Release. Now slightly adapted to technote formatting style.
1133
1134 * HOWTO-Release: Removed. It's contents are now in
1135 Doc/technotes/release_process.txt
1136
1137 2004-02-25 Bernhard Herzog <[email protected]>
1138
1139 * libraries/thuban/wxproj.cpp (get_wx_version): New. Return the
1140 version of wxWindows the module was compiled with so we can check
1141 that against the wxPython version.
1142
1143 * Thuban/version.py (thuban_branch, thuban_release): New variables
1144 controlling which and how Thuban versions are shown. See the
1145 comments for details.
1146 (verify_versions): Also check that the wx version that wxproj is
1147 compiled against matches that of the wxPython we use at runtime
1148
1149 2004-02-20 Bernhard Herzog <[email protected]>
1150
1151 * Extensions/wms/wms.py (epsg_code_to_projection): Use
1152 get_system_proj_file to read the epsg projections. The old way
1153 depended on the current directory being the top Thuban directory.
1154
1155 2004-02-20 Bernhard Herzog <[email protected]>
1156
1157 * Extensions/svgexport/test/test_svgmapwriter.py
1158 (TestVirtualDC.test_clippath): Remove a debug print
1159
1160 2004-02-20 Bernhard Herzog <[email protected]>
1161
1162 * Extensions/svgexport/__init__.py: New. Turn
1163 Extensions/svgexport into a package.
1164
1165 * Extensions/svgexport/svgmapwriter.py: Reorder the imports and
1166 doc-string a bit. The doc-string must come first, otherwise it's
1167 not a doc-string. The __future__ import must be the first thing
1168 after the doc-string. Use only double quotes in doc-strings.
1169 Single quotes trip up emacs syntax highlighting if the text
1170 contains apostrophes.
1171
1172 2004-02-20 Bernhard Herzog <[email protected]>
1173
1174 * Extensions/svgexport/test/__init__.py,
1175 Extensions/svgexport/test/test_svgmapwriter.py: New. Initial test
1176 suite for svgexport
1177
1178 * test/runtests.py (find_test_modules): New. Function with the
1179 module finding code from main.
1180 (main): Use find_test_modules to figure out the default test
1181 modules and take modules from Extensions.svgexport.test too.
1182
1183 2004-02-19 Bernhard Herzog <[email protected]>
1184
1185 * Thuban/UI/application.py (ThubanApplication.OnInit): Make sure
1186 the mainwindow has a reference to the map of the initial session.
1187 This fixes a bug introduced with the fix for RT#2245
1188
1189 2004-02-19 Bernhard Herzog <[email protected]>
1190
1191 * Extensions/svgexport/svgsaver.py,
1192 Extensions/svgexport/svgmapwriter.py,
1193 Extensions/svgexport/maplegend.py: Added again. This time in the
1194 correct place.
1195
1196 2004-02-17 Bernhard Herzog <[email protected]>
1197
1198 Fix for RT#2245
1199
1200 * Thuban/UI/application.py (ThubanApplication.OnInit): Initialize
1201 instance variables before trying to create any windows. Creating
1202 windows can start an event loop if e.g. message boxes are popped
1203 up for some reason, and event handlers, especially EVT_UPDATE_UI
1204 may want to access things from the application.
1205 (ThubanApplication.maps_changed): The mainwindow may not have been
1206 created yet, so check whether it has been created before calling
1207 its methods
1208
1209 * Thuban/UI/view.py (MapCanvas.OnIdle): Only try to redraw if we
1210 have a map
1211
1212 2004-02-17 Bernhard Herzog <[email protected]>
1213
1214 * test/test_svgmapwriter.py, Extensions/svgsaver.py,
1215 Extensions/svgmapwriter.py, Extensions/maplegend.py,
1216 extensions/svgexport/svgsaver.py,
1217 extensions/svgexport/svgmapwriter.py,
1218 extensions/svgexport/maplegend.py: Removed. These files were in
1219 the wrong places or didn't work at all.
1220
1221 2004-02-16 Bernhard Herzog <[email protected]>
1222
1223 * Thuban/UI/view.py (MapCanvas.Export): Remove accidentally added
1224 line
1225
1226 2004-02-16 Bernhard Herzog <[email protected]>
1227
1228 * Thuban/UI/view.py (MapCanvas.Export): Avoid UnboundLocalError.
1229
1230 2004-02-15 Markus Rechtien <[email protected]>
1231
1232 * Extensions/svgexport/svgmapwriter.py: New. Adds the capability
1233 to write a session to a file in SVG format.
1234 * Extensions/svgexport/svgsaver.py: New. Uses svgmapwriter.py
1235 to write a SVG map of a session.
1236 * Extensions/svgexport/maplegend: New. Writes a basic maplegend
1237 in SVG format for the current session.
1238
1239 2004-02-13 Bernhard Herzog <[email protected]>
1240
1241 * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): When the layer
1242 can't be created, return immediately after displaying the error
1243 message.
1244
1245 2004-02-11 Bernhard Herzog <[email protected]>
1246
1247 Handle postgis tables with more than one geometry column.
1248
1249 * Thuban/Model/postgisdb.py
1250 (PostGISTable._fetch_table_information): Delegate the creation of
1251 column objects to a different method so that we can extend that in
1252 derived classes
1253 (PostGISTable._create_col_from_description): New. Column object
1254 creation part of _fetch_table_information
1255 (PostGISShapeStore._create_col_from_description): New. Extend
1256 inherited method to handle geometry columns
1257 (PostGISShapeStore.__init__): New parameter geometry_column to
1258 specify which geometry column to use. Optional but mandatory for
1259 tables with more than one geometry column
1260 (PostGISShapeStore._fetch_table_information): Also use the name of
1261 the geometry column when looking for the srid
1262 (PostGISShapeStore.ShapeType): Also use the name of the geometry
1263 column when looking for the shape type
1264
1265 * test/test_save.py (SaveSessionTest.test_save_postgis): Adapt
1266 NonConnectionStore to changes in the PostGISShapeStore
1267
1268 * test/test_postgis_db.py
1269 (TestPostGISSpecialCases.test_shapestore_two_geom_cols): Test
1270 PostGISShapeStore with tables having two geometry columns.
1271
1272 2004-02-10 Bernhard Herzog <[email protected]>
1273
1274 Fix some postgis problems. What remains to be done is real
1275 handling of SRIDs as they affect how reprojection is done
1276
1277 * Thuban/Model/postgisdb.py (quote_identifier): Fix typo in
1278 doc-string
1279 (PostGISShapeStore._fetch_table_information): New. Extend
1280 inherited method to retrieve srid
1281 (PostGISShapeStore.BoundingBox): Handle tables without data.
1282 extent yields NULL for those
1283 (PostGISShapeStore.ShapesInRegion): Use the srid of the table.
1284
1285 * test/test_postgis_db.py
1286 (TestPostGISSpecialCases.test_shapestore_empty_table): New test
1287 for the special case of a table without any data
1288 (TestPostGISShapestorePointSRID): New class with tests for a table
1289 that uses srids
1290 (PolygonTests): Fix a doc-string typo
1291
1292 * test/postgissupport.py (PostGISDatabase.__init__): New parameter
1293 reference_systems with a specification of spacial reference
1294 systems to create in the new db.
1295 (PostgreSQLServer.new_postgis_db)
1296 (PostgreSQLServer.get_static_data_db): New parameter
1297 reference_systems to be passed through ultimately to
1298 PostGISDatabase. In new_postgis_db also check whether an existing
1299 db already has the right srids
1300 (PostgreSQLServer.get_default_static_data_db): Add srids and a
1301 table that uses srids
1302 (PostGISDatabase.initdb): Create the entries for the reference
1303 systems
1304 (PostGISDatabase.has_data): Add reference_systems parameter to
1305 check for those too
1306 (upload_shapefile): New parameter srid to create tables with a
1307 specific srid
1308
1309 2004-02-06 Frank Koormann <[email protected]>
1310
1311 * po/pt_BR.po: Fixed charset
1312
1313 2004-02-05 Frank Koormann <[email protected]>
1314
1315 * po/pt_BR.po: Fixed format string for error message, missing %s
1316 added (Thuban/UI/application.py:273)
1317
1318 2004-02-03 Frank Koormann <[email protected]>
1319
1320 First version of Portuguese (Brazilian) translation
1321
1322 * po/pt_BR.po: New, translation of pot (2004-01-15 16:07+0300) for
1323 Brazilian Portuguese by Eduardo Patto Kanegae.
1324
1325 * Thuban/UI/about.py (About.__init.py__): Added Eduardo to the list of
1326 translators.
1327
1328
1329 2004-01-22 Frank Koormann <[email protected]>
1330
1331 * Doc/manual/thuban-manual.xml: Added section on installation of
1332 Thuban under Win32 systems. Fixed image path references in the postgis
1333 section. Some minor source formattings.
1334
1335 2004-01-21 Frank Koormann <[email protected]>
1336
1337 Make Thuban remember path selections (at least for one application run).
1338
1339 * Thuban/UI/application.py (Application.OnInit): Initialize path as a
1340 attribute of application object. Path is a dictionary of
1341 strings, currently with the items "data" and "projection".
1342 (Application.SetPath): New, stores path for the specified item.
1343 (Application.Path): New, return path for the specified item.
1344
1345 * Thuban/UI/mainwindow.py
1346 (MainWindow.OpenSession, MainWindow.SaveSessionAs,
1347 MainWindow.AddLayer, MainWindow.AddRasterLayer,
1348 MainWindow.TableOpen): Access "data" path information of the
1349 application.
1350
1351 * Thuban/UI/projdialog.py (ProjFrame._OnImport, ProjFrame._OnExport):
1352 Access "projection" path information of the application.
1353
1354 2004-01-05 Bernhard Herzog <[email protected]>
1355
1356 * po/ru.po: Updated translations from Alex Shevlakov
1357
1358 2004-01-05 Bernhard Herzog <[email protected]>
1359
1360 * po/Makefile, po/README: Move the description of how to generate
1361 the translation statistics to the README.
1362
1363 2003-12-23 Bernhard Herzog <[email protected]>
1364
1365 * NEWS: Update for 1.0.0
1366
1367 * po/it.po: Another update from Maurizio Napolitano
1368
1369 2003-12-23 Bernhard Herzog <[email protected]>
1370
1371 * po/it.po: Updated translation from Maurizio Napolitano
1372
1373 2003-12-23 Bernhard Herzog <[email protected]>
1374
1375 * Thuban/UI/join.py (JoinDialog.__init__): Mark one more string
1376 for translation
1377
1378 * Thuban/UI/mainwindow.py (MainWindow.TableRename)
1379 (MainWindow.RenameMap, MainWindow.RenameLayer): Mark some more
1380 strings for translation
1381
1382 * po/de.po: Update with the newly marked strings.
1383
1384 2003-12-22 Bernhard Herzog <[email protected]>
1385
1386 * HOWTO-Release: Fix the places where version numbers have to be
1387 updated
1388
1389 2003-12-22 Bernhard Herzog <[email protected]>
1390
1391 * setup.py (setup call): 1.0.0, yeah!
1392
1393 * Thuban/version.py (longversion): 1.0.0, yeah!
1394
1395 * Thuban/Model/load.py (SessionLoader.__init__): Accept the
1396 1.0.0 namespace too
1397
1398 * Thuban/Model/save.py (SessionSaver.write_session): Save with
1399 1.0.0 namespace
1400
1401 * test/test_load.py (LoadSessionTest.dtd)
1402 (TestSingleLayer.file_contents)
1403 (TestNonAsciiColumnName.file_contents)
1404 (TestLayerVisibility.file_contents)
1405 (TestClassification.file_contents, TestLabels.file_contents)
1406 (TestLayerProjection.file_contents)
1407 (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
1408 (TestLabelLayer.file_contents, TestPostGISLayer.file_contents)
1409 (TestPostGISLayerPassword.file_contents)
1410 (TestLoadError.file_contents, TestLoadError.test): Update for
1411 1.0.0 namespace
1412
1413 * test/test_save.py (SaveSessionTest.dtd)
1414 (SaveSessionTest.testEmptySession)
1415 (SaveSessionTest.testSingleLayer)
1416 (SaveSessionTest.testLayerProjection)
1417 (SaveSessionTest.testRasterLayer)
1418 (SaveSessionTest.testClassifiedLayer)
1419 (SaveSessionTest.test_dbf_table)
1420 (SaveSessionTest.test_joined_table)
1421 (SaveSessionTest.test_save_postgis): Update for 1.0.0 namespace
1422
1423 2003-12-22 Bernhard Herzog <[email protected]>
1424
1425 * Thuban/Model/load.py (SessionLoader.start_label): Make sure the
1426 alignment flags are byte strings not unicode and that they have
1427 valid values
1428
1429 * test/test_load.py (TestLabelLayer): New. Test loading (and
1430 indirectly saving) of maps with labels.
1431
1432 2003-12-22 Bernhard Herzog <[email protected]>
1433
1434 * Thuban/UI/tableview.py (TableGrid.OnDestroy)
1435 (TableGrid.__init__): Handle EVT_WINDOW_DESTROY in the grid to
1436 unsubscribe all subscribers.
1437 (LayerTableFrame.OnDestroy): Do not unsubscribe any messages from
1438 self.grid since it may already have been destroyed.
1439 Fixes RT #2256
1440
1441 2003-12-19 Bernhard Herzog <[email protected]>
1442
1443 * po/fr.po, po/es.po: Updated translations from Daniel Calvelo
1444
1445 2003-12-16 Bernhard Herzog <[email protected]>
1446
1447 * debian/bitmappath.patch, debian/setup.py.patch:
1448 added to ensure compliance with FHS for debian
1449 * debian/rules, debian/changelog:
1450 added patches in rules to ensure compliance with FHS for debian
1451
1452 2003-12-16 Bernhard Herzog <[email protected]>
1453
1454 * po/Makefile (mo): Make the output a bit nicer so that it prints
1455 statistics about the translations. Add a comment how produce even
1456 nicer statistics with sed.
1457
1458 2003-12-09 Frank Koormann <[email protected]>
1459
1460 * Resources/Projections/defaults.proj:
1461 French projection sample with correct accents (UNICODE).
1462
1463 2003-12-05 Bernhard Herzog <[email protected]>
1464
1465 * MANIFEST.in: Add the devtools directory
1466
1467 * setup.py (setup call): Use license instead of licence. This
1468 silences a deprecation warning on Python 2.3
1469
1470 2003-12-05 Frank Koormann <[email protected]>
1471
1472 Documentation synced with 1.0rc1
1473
1474 * Doc/manual/thuban-manual.xml:
1475 Minor formatting changes and references to database layers .
1476 Introduction.Internationalization: New section on i18n.
1477 MapManagement.AddingandRemovingLayers: Added item on database layers.
1478 MapManagement.TheLegend: Added section and screenshot on popup menu.
1479 ProjectionManagement: Updated screenshot and sentence on EPSG.
1480 Appendix.SupportedDataSources: Added PostGIS.
1481 Appendix.WorkingwithPostGIS: New section.
1482
1483 * Doc/manual/images/6_projection.png: Updated screenshot including
1484 EPSG checkboxes.
1485
1486 * Doc/manual/images/3_5_popup_menu.png: New, popup menu screenshot.
1487
1488 * Doc/manual/images/app_postgis_add_layer.png,
1489 Doc/manual/images/app_postgis_db_add.png,
1490 Doc/manual/images/app_postgis_db_management.png:
1491 New screenshots focussing on database layers
1492
1493 2003-12-05 Frank Koormann <[email protected]>
1494
1495 * Thuban/UI/projdialog.py (load_user_proj): If user.proj is missing
1496 write warning to stderr instead of rising a warning dialog
1497
1498 2003-12-03 Bernhard Herzog <[email protected]>
1499
1500 Fix for RT #2243
1501
1502 * Thuban/UI/mainwindow.py (MainWindow.has_selected_shape_layer):
1503 New. Like has_selected_layer but for shape layers only
1504 (_has_selected_shape_layer): New. Like _has_selected_layer but for
1505 shape layers only
1506 (layer_show_table command, layer_jointable command): Use these
1507 commands should only be available for shape layers
1508
1509 2003-12-03 Bernhard Herzog <[email protected]>
1510
1511 * Thuban/UI/mainwindow.py (MainWindow.Unsubscribe): Deal with
1512 publishers that are wx objects and may have been destroyed by wx
1513 already. Fixes RT #2242.
1514
1515 2003-12-03 Bernhard Herzog <[email protected]>
1516
1517 * po/ru.po: Updates from Alex Shevlakov
1518
1519 2003-12-03 Silke Reimer <silkeintevation.de>
1520
1521 * debian/control, debian/changelog: Added gdal-support to
1522 debian package, updated to new thuban version
1523
1524
1525 2003-12-03 Bernhard Herzog <[email protected]>
1526
1527 * Thuban/Lib/version.py: New. Module for version number
1528 manipulations. The version of make_tuple here also deals better
1529 with more unusual version number strings, such as e.g.
1530 "1.2+cvs20031111"
1531
1532 * Thuban/version.py (make_tuple): Removed. It's now in
1533 Thuban.Lib.version. Use that implementation instead.
1534
1535 * test/test_lib_version.py: New. Tests for Thuban/Lib/version.py
1536
1537 2003-12-02 Bernhard Herzog <[email protected]>
1538
1539 * MANIFEST.in: Add debian files
1540
1541 * setup.py (setup call): Add packages for the Extensions so that
1542 they're installed too
1543 (data_files): Add READMEs and sample data from some Extensions
1544
1545 * NEWS: Add note about the extensions in binary packages
1546
1547 2003-12-02 Bernhard Herzog <[email protected]>
1548
1549 * Thuban/Model/save.py (SessionSaver.write_session): Save files
1550 with the thuban-1.0rc1
1551
1552 * Thuban/Model/load.py (SessionLoader.__init__): Recognize the
1553 thuban-1.0rc1 namespace too
1554
1555 * test/test_save.py (SaveSessionTest.dtd)
1556 (SaveSessionTest.testEmptySession)
1557 (SaveSessionTest.testSingleLayer)
1558 (SaveSessionTest.testLayerProjection)
1559 (SaveSessionTest.testRasterLayer)
1560 (SaveSessionTest.testClassifiedLayer)
1561 (SaveSessionTest.test_dbf_table)
1562 (SaveSessionTest.test_joined_table)
1563 (SaveSessionTest.test_save_postgis): Update to thuban-1.0rc1
1564 namespace
1565
1566 * test/test_load.py (LoadSessionTest.dtd): Update to thuban-1.0rc1
1567 namespace
1568 (TestSingleLayer.file_contents)
1569 (TestNonAsciiColumnName.file_contents)
1570 (TestLayerVisibility.file_contents)
1571 (TestClassification.file_contents, TestLabels.file_contents)
1572 (TestLayerProjection.file_contents)
1573 (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
1574 (TestPostGISLayer.file_contents)
1575 (TestPostGISLayerPassword.file_contents)
1576 (TestLoadError.file_contents, TestLoadError.test): Update to
1577 thuban-1.0rc1 namespace
1578
1579 2003-12-01 Bernhard Herzog <[email protected]>
1580
1581 * setup.py (proj4_prefix, wx_prefix, gdal_prefix): Fix these for
1582 nt to better match Intevation's current w32 setup
1583
1584 * HOWTO-Release: Add note about updating MANIFEST.in
1585
1586 * MANIFEST.in: Add the Extensions
1587
1588 * NEWS: Update for 1.0rc1
1589
1590 2003-12-01 Bernhard Herzog <[email protected]>
1591
1592 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Change the wild
1593 cards for the dialog so that shapefiles ending in all uppercase
1594 SHP are listed too
1595
1596 2003-11-28 Bernhard Herzog <[email protected]>
1597
1598 * Thuban/version.py (longversion): Update to 1.0rc1
1599
1600 * setup.py (setup call): Update version to 1.0rc1. Use the
1601 [email protected] email address as author email instead of my
1602 personal one.
1603
1604 2003-11-28 Bernhard Herzog <[email protected]>
1605
1606 * po/de.po: Update german translation.
1607
1608 2003-11-28 Bernhard Herzog <[email protected]>
1609
1610 Unify the filenames stored in .thuban files so that the .thuban
1611 files are more platform independend
1612
1613 * Thuban/Model/save.py (unify_filename): New. Unify filenames so
1614 that they can be used on both windows and unix
1615 (SessionSaver.prepare_filename): New. Handle all filename
1616 transformations for filenames stored in the thuban file
1617 (SessionSaver.write_data_containers, SessionSaver.write_layer):
1618 Use prepare_filename
1619
1620 * test/test_save.py (SaveSessionTest.testSingleLayer)
1621 (SaveSessionTest.testLayerProjection)
1622 (SaveSessionTest.testRasterLayer)
1623 (SaveSessionTest.testClassifiedLayer)
1624 (SaveSessionTest.test_dbf_table)
1625 (SaveSessionTest.test_joined_table): Filenames are always stored
1626 with slashes on all currently supported platforms so adapt all
1627 tests to this
1628
1629 * test/test_load.py (LoadSessionTest.filenames): With the new
1630 filename scheme the filenames in the tests should be
1631 understandable on all currently supported platforms so we turn
1632 this into an empty list because we don't have to normalize them
1633 anymore
1634
1635 2003-11-28 Bernhard Herzog <[email protected]>
1636
1637 * test/test_layer.py (TestLayer.test_arc_layer_with_projection):
1638 Add the ellipsoid to the projection since some Proj versions
1639 complain if it's missing.
1640
1641 2003-11-27 Bernhard Herzog <[email protected]>
1642
1643 Corect some bounding box projection problems
1644
1645 * Thuban/Model/proj.py (Projection.InverseBBox): New. Inverse
1646 version of ForwardBBox
1647 (Projection._transform_bbox): New. common implementation of
1648 ForwardBBox and InverseBBox
1649 (Projection.ForwardBBox): Use _transform_bbox.
1650
1651 * test/test_proj.py (TestProjection.test): Add test for
1652 InverseBBox
1653
1654 * Thuban/Model/layer.py (Layer.LatLongBoundingBox)
1655 (Layer.ShapesBoundingBox, RasterLayer.LatLongBoundingBox): Use the
1656 new InverseBBox method to determine the unprojected bounding box
1657 (Layer.ShapesInRegion): Use the ForwardBBox method to project the
1658 bbox.
1659
1660 * test/test_layer.py (TestLayer.test_point_layer_with_projection):
1661 Removed.
1662 (TestLayer.test_arc_layer_with_projection): New. This test is
1663 better able to test whether bounding boxes are projected correctly
1664 than test_point_layer_with_projection
1665
1666 * Thuban/UI/viewport.py (ViewPort.map_projection_changed): Use
1667 InverseBBox to unproject bboxes
1668
1669 2003-11-25 Bernhard Herzog <[email protected]>
1670
1671 * Thuban/UI/about.py (About.__init__): Make sure we have ASCII
1672 source code.
1673
1674 2003-11-25 Bernhard Herzog <[email protected]>
1675
1676 * Thuban/Model/layer.py (Layer.__getattr__): Removed. It was only
1677 there for backwards compatibility and all code relying on that
1678 should have been updated by now.
1679
1680 2003-11-25 Bernhard Herzog <[email protected]>
1681
1682 * test/test_load.py (TestClassification.test): Add the missing
1683 round trip test.
1684 (TestClassification.file_contents): Update to the newest file
1685 format
1686
1687 2003-11-25 Bernhard Herzog <[email protected]>
1688
1689 Add very experimental (and possibly dangerous) extension to draw
1690 polygons:
1691
1692 * Extensions/drawshape/README: New. Brief installation
1693 instructions
1694
1695 * Extensions/drawshape/drawshape.py: New. Implementation of the
1696 drawshape extensions
1697
1698 * Extensions/drawshape/patch.diff: Patch to apply before the
1699 extension can be used.
1700
1701 2003-11-24 Bernhard Herzog <[email protected]>
1702
1703 * Thuban/Model/data.py (ShapefileStore._open_shapefile)
1704 (ShapefileStore.__init__): Factor opening the shapefile into a
1705 separate method (the new _open_shapefile). This makes the code a
1706 bit more readable but the real reason is that it makes some evil
1707 hacks easier. :-)
1708
1709 2003-11-24 Bernhard Herzog <[email protected]>
1710
1711 * Thuban/Model/load.py (SessionLoader.check_attrs): If no
1712 converter is specified for an attribute assume it's a string
1713 containing only Latin1 characters. Update doc-string accordingly.
1714 This change should fix many places where unicode objects might
1715 accidentally enter Thuban.
1716
1717 * test/test_load.py (TestNonAsciiColumnName): New test to check
1718 what happens with column names in DBF files that contain non-ascii
1719 characters
1720
1721 2003-11-21 Bernhard Herzog <[email protected]>
1722
1723 Enable the experimental attribute editing again and introduce a
1724 command line switch to actually activate it
1725
1726 * Thuban/UI/main.py (options): New. Container for options set on
1727 the commmand line
1728 (main): Add the --enable-attribute-editing flag.
1729
1730 * Thuban/UI/identifyview.py (IdentifyView.__init__): If attribute
1731 editing is enabled use the grid ctrl which allows editing of the
1732 values
1733
1734 * Thuban/Model/transientdb.py (AutoTransientTable.write_record):
1735 New. Just delegate this to the underlying table.
1736
1737 2003-11-20 Bernhard Herzog <[email protected]>
1738
1739 * test/test_proj.py (ProjFileReadTests.test_read_unreadable_file):
1740 Skip this test if run under non-posix systems since it only works
1741 there
1742
1743 2003-11-19 Bernhard Herzog <[email protected]>
1744
1745 * Thuban/Model/resource.py: Rework the way gdal support is
1746 determined so that we can give a reason in the about why gdal is
1747 not supported.
1748 (gdal_support_status): New. Variable holding a string with the
1749 reason for no gdal support
1750
1751 * Thuban/UI/about.py (About.__init__): Add the reason why gdal is
1752 not supported to the message
1753
1754 2003-11-19 Bernhard Herzog <[email protected]>
1755
1756 Remove the old table interface and its test cases
1757
1758 * Thuban/Model/table.py (OldTableInterfaceMixin): Removed.
1759 (DBFTable, MemoryTable): Do not derive from OldTableInterfaceMixin
1760 anymore
1761
1762 * Thuban/Model/transientdb.py (TransientTableBase)
1763 (AutoTransientTable): Do not derive from OldTableInterfaceMixin
1764 anymore
1765
1766 * test/test_table.py: Removed since the old interface it tests is
1767 gone.
1768
1769 * test/runtests.py (main): The old table interface is gone and
1770 with it the deprecation warnings so remove the code that turns
1771 these warnings into errors
1772
1773 2003-11-19 Bernhard Herzog <[email protected]>
1774
1775 * test/test_table.py: Revert to revision 1.5 again. Changing the
1776 tests to use the new table interface is completely wrong since the
1777 whole purpose of the tests in this module is to test the old
1778 interface.
1779
1780 2003-11-18 Bernhard Herzog <[email protected]>
1781
1782 * Thuban/Model/postgisdb.py (PostGISConnection.MatchesParameters):
1783 New. Test whether the connection matches a set of connection
1784 parameters
1785
1786 * Thuban/UI/dbdialog.py (DBFrame.conns_changed): Fix doc-string
1787 (DBFrame.OnAdd): Use the new MatchesParameters method when looking
1788 for existing connections with the same parameters and break out of
1789 the loop correctly.
1790
1791 * test/test_postgis_db.py (TestBriefDescription)
1792 (TestPostGISSimple.test_brief_description): Rename
1793 TestBriefDescription to TestPostGISSimple and the test method to
1794 test_brief_description so that we can add more test methods.
1795 (TestPostGISSimple.test_matches_parameters): New. Test the new
1796 MatchesParameters method
1797
1798 2003-11-18 Bernhard Herzog <[email protected]>
1799
1800 * Thuban/Lib/connector.py (Publisher): Introduce a new flag,
1801 _was_destroyed, to indicate whether an publisher instance has
1802 already been destroyed.
1803 (Publisher.Unsubscribe): Only disconnect if the publisher has not
1804 been destroyed yet.
1805 (Publisher.Destroy): Set the _was_destroyed flag to true.
1806
1807 * test/test_connector.py
1808 (TestPublisher.test_unsubscribe_after_destroy): New. Test that
1809 calling Unsubscribe after Destroy doesn't raise an exception
1810
1811 2003-11-14 Bernhard Herzog <[email protected]>
1812
1813 * Thuban/UI/identifyview.py (IdentifyView.selected_shape): Fix
1814 typo in doc-string
1815
1816 2003-11-13 Bernhard Herzog <[email protected]>
1817
1818 Quote table and column names properly for postgis.
1819
1820 * Thuban/Model/postgisdb.py (quote_identifier): New. Function to
1821 quote an identifier for use in an sql statement
1822 (PostGISColumn.__init__): Add the quoted_name attribute
1823 (PostGISTable.__init__): New instance variable quoted_tablename
1824 (PostGISTable._fetch_table_information): Use the quoted table
1825 name. New isntance variable quoted_geo_col with a quoted version
1826 of geometry_column
1827 (PostGISTable.NumRows, PostGISTable.RowIdToOrdinal)
1828 (PostGISTable.RowOrdinalToId): Use the quoted table name
1829 (PostGISTable.ReadValue, PostGISTable.ValueRange)
1830 (PostGISTable.UniqueValues, PostGISTable.SimpleQuery)
1831 (PostGISShapeStore.BoundingBox, PostGISShapeStore.Shape)
1832 (PostGISShapeStore.AllShapes, PostGISShapeStore.ShapesInRegion):
1833 Use quoted table and column names
1834
1835 * test/test_postgis_db.py (TestPostGISSpecialCases)
1836 (TestPostGISIgnoredColumns): Rename the class to
1837 TestPostGISSpecialCases because that better describes the new
1838 cases
1839 (TestPostGISSpecialCases.test_unsupported_types)
1840 (TestPostGISSpecialCases.test): Rename the method to
1841 test_unsupported_types because we need a more descriptive name now
1842 that there are more methods
1843 (TestPostGISSpecialCases.test_table_name_quoting)
1844 (TestPostGISSpecialCases.test_column_name_quoting)
1845 (TestPostGISSpecialCases.test_shapestore_name_quoting): New test
1846 cases to test quoting of table and column names in PostGISTable
1847 and PostGISShapeStore
1848
1849 * test/postgissupport.py
1850 (skip_if_addgeometrycolumn_does_not_use_quote_ident): New. Skip if
1851 AddGeometryColumn desn't support table or column names with sapces
1852 or double quotes
1853
1854 2003-11-12 Jan-Oliver Wagner <[email protected]>
1855
1856 * Extensions/wms/__init__.py: New: Init to make this
1857 directory a package.
1858
1859 * Extensions/wms/wms.py: New: Provide layers via OGC WMS.
1860
1861 2003-11-11 Bernhard Herzog <[email protected]>
1862
1863 * Thuban/Model/resource.py (EPSG_DEPRECATED_PROJ_FILE): New.
1864 Constant for the file woth deprecated epsg projections
1865 (get_system_proj_file): Update doc-string
1866
1867 * Thuban/UI/projdialog.py (ProjFrame.build_dialog): Add a space
1868 above the EPS widgets, introduce a check box for the deprecated
1869 eps projections and a label for the epsg widgets
1870 (ProjFrame._OnShowEPSG): Handle the deprecated EPSG projections
1871 too
1872
1873 2003-11-11 Bernhard Herzog <[email protected]>
1874
1875 Avoid warnings when run under Python 2.3
1876
1877 * Thuban/UI/baserenderer.py (BaseRenderer.draw_point_shape)
1878 (BaseRenderer.draw_label_layer): Coordinates must be ints.
1879
1880 * Thuban/UI/renderer.py (MapRenderer.make_point): Turn this into a
1881 real method so that we can convert to int.
1882 (MapRenderer.label_font): The font size mist be an int.
1883
1884 * Thuban/UI/common.py (Color2wxColour): The color values must be
1885 ints. Also, remove the unnecessary asserts.
1886
1887 * test/test_load_0_8.py (TestUnicodeStrings.file_contents)
1888 (TestUnicodeStrings.test): Python source code should not contain
1889 non-ascii characters unless an encoding is specified in the file.
1890 Therefore use \x escapes in the string literals for non-ascii
1891 characters.
1892
1893 2003-11-11 Bernhard Herzog <[email protected]>
1894
1895 * Thuban/Model/resource.py (get_system_proj_file): Add a filename
1896 parameter so that this function can be used for all proj files in
1897 Resource/Projections
1898 (DEFAULT_PROJ_FILE, EPSG_PROJ_FILE): New. Predefined filenames for
1899 get_system_proj_file
1900
1901 * Thuban/UI/projdialog.py (ProjFrame.__init__): Instead of one
1902 ProjFile self.__sysProjFile use a dictionary of system ProjFile
1903 objects self._sys_proj_files
1904 (ProjFrame.build_dialog): Adapt to the new changes in the
1905 ProjectionList constructor. Add a check button to toggle whether
1906 EPSG projections are shown
1907 (ProjFrame._OnShowEPSG): New. Handler for the epsg check button
1908 events.
1909 (ProjFrame.load_user_proj, ProjFrame.load_system_proj): Only show
1910 the busy cursor if the files have not yet been loaded by the
1911 dialog.
1912 (ProjFrame.load_system_proj): Add a parameter for the name of the
1913 proj file. Maintain the dictionary of system projections
1914 self._sys_proj_files
1915
1916 * Thuban/UI/projlist.py (ProjectionList): Merge the system_projs,
1917 user_projs parameters into one parameter proj_files which is a
1918 list of proj files.
1919 (ProjectionList._subscribe_proj_files)
1920 (ProjectionList._unsubscribe_proj_files): New. Move
1921 subscription/unsubscription of projfile messages to separate
1922 methods
1923 (ProjectionList.Destroy): The unsubscribe is now done in
1924 _unsubscribe_proj_files
1925 (ProjectionList.update_projections): We now have a list of proj
1926 file objects
1927 (ProjectionList.SetProjFiles): New method to set a new list of
1928 proj file objects
1929
1930 * test/test_proj.py (ProjFileReadTests.test_get_system_proj_file):
1931 Specify explicitly which system proj file to load.
1932
1933 2003-11-11 Bernhard Herzog <[email protected]>
1934
1935 * Thuban/Model/load.py (SessionLoader.Destroy): New. Clear all
1936 instance variables to cut cyclic references. The GC would have
1937 collected the loader eventually but it can happen that it doesn't
1938 run at all until thuban is closed (2.3 but not 2.2 tries a bit
1939 harder and forces a collection when the interpreter terminates)
1940 (load_session): Call the handler's Destroy method to make sure
1941 that it gets garbage collected early. Otherwise it will be
1942 collected very late if at all and it holds some references to e.g.
1943 shapestores and the session which can lead to leaks (of e.g. the
1944 temporary files)
1945
1946 * test/test_load.py (TestSingleLayer.test_leak): New. test for the
1947 resource leak in load_session
1948
1949 2003-11-10 Bernhard Herzog <[email protected]>
1950
1951 * Thuban/UI/baserenderer.py: Add a way to specify how layers in
1952 extensions are to be rendered.
1953 (_renderer_extensions): New. List with renderer for layers in
1954 extensions
1955 (add_renderer_extension): New. Add a renderer extension
1956 (init_renderer_extensions): New. Init the renderer extensions
1957 (BaseRenderer.render_map_incrementally): Search
1958 _renderer_extensions for how to draw unknown layer types
1959 (BaseRenderer.draw_raster_data): Add format parameter so that
1960 formats other than BMP can be drawn
1961 (BaseRenderer.draw_raster_layer): Pass an explicit format to
1962 draw_raster_data
1963
1964 * Thuban/UI/renderer.py (raster_format_map): New. Mapping form the
1965 strings of the format parameter of draw_raster_data method to wx
1966 constants
1967 (MapRenderer.draw_raster_data): Add the format parameter and use
1968 raster_format_map to map it to the right wxwindows constant for
1969 wxImageFromStream
1970
1971 * test/test_baserenderer.py (SimpleRenderer.draw_raster_data): Add
1972 the format parameter and record it
1973 (TestBaseRenderer.test_raster_no_projection): check the format
1974 paramter of the draw_raster_data method
1975 (TestBaseRenderer.test_renderer_extension): New. Test the renderer
1976 extension facility
1977
1978 2003-11-07 Bernhard Herzog <[email protected]>
1979
1980 Tweak the usage of the sqlite database to make common use cases
1981 more responsive. In most cases copying the data to the sqlite
1982 database takes so long that using sqlite doesn't have enough
1983 advantages.
1984
1985 * Thuban/Model/transientdb.py (TransientTableBase.ValueRange): Add
1986 comments about performance and query the min and max in separate
1987 statements because only that way will indexes be used.
1988 (TransientTableBase.UniqueValues): Add some comments about
1989 performance.
1990 (AutoTransientTable.ValueRange, AutoTransientTable.UniqueValues):
1991 Do not copy the data to the transient DB but use the transient
1992 copy if it exists. See the new comments for the performance trade
1993 offs
1994
1995 * test/test_transientdb.py
1996 (TestTransientTable.test_auto_transient_table): Make sure that the
1997 data is copied to the transient database at some point.
1998
1999 2003-11-03 Bernhard Herzog <[email protected]>
2000
2001 * Thuban/Model/data.py (ShapefileStore.ShapesInRegion): Bind some
2002 globals to locals so that it's a bit faster
2003
2004 2003-11-03 Bernhard Herzog <[email protected]>
2005
2006 * Thuban/UI/baserenderer.py
2007 (BaseRenderer.draw_shape_layer_incrementally): Use the ReadValue
2008 method. ReadValue is faster than ReadRowAsDict since it only reads
2009 one cell especially now that the dbf file objects actually
2010 implement it.
2011
2012 * Thuban/Model/table.py (DBFTable.ReadValue): Use the new
2013 read_attribute method of the dbf objects
2014
2015 2003-11-03 Bernhard Herzog <[email protected]>
2016
2017 * Extensions/profiling/profiling.py (popup_dialog_box): New config
2018 variable to indicate whether the result should be shown in a
2019 dialog box
2020 (profile_screen_renderer, time_screen_renderer): Only show a
2021 dialog box if popup_dialog_box is true.
2022 (profile_screen_renderer): Flush stdout after the printing the
2023 first part of the "profiling..." message
2024
2025 * Thuban/UI/baserenderer.py
2026 (BaseRenderer.draw_shape_layer_incrementally): Cache the pens and
2027 brushes for the groups so that they're not created over and over
2028 again
2029
2030 * Thuban/Model/classification.py (Classification.__getattr__)
2031 (Classification._compile_classification)
2032 (Classification._clear_compiled_classification): New. Methods to
2033 manage a 'compiled' representation of the classification groups
2034 which is created on demand
2035 (Classification.InsertGroup, Classification.RemoveGroup)
2036 (Classification.ReplaceGroup): reset the compiled representation
2037 (Classification.FindGroup): Use the compiled representation to
2038 find the matching group
2039 (ClassGroupRange.GetRangeTuple): New. Return the range as a tuple
2040
2041 2003-10-31 Bernhard Herzog <[email protected]>
2042
2043 * Thuban/Model/classification.py (Classification.SetDefaultGroup):
2044 Send a CLASS_CHANGED message
2045 (Classification.RemoveGroup): Send a CLASS_CHANGED message and do
2046 not return the removed group since it wasn't used.
2047
2048 * test/test_classification.py
2049 (TestClassification.test_set_default_group): New. Test the
2050 SetDefaultGroup method
2051 (TestClassification.test_insert_group): New. Test the InsertGroup
2052 method
2053 (TestClassification.test_remove_group): New. Test the RemoveGroup
2054 method
2055 (TestClassification.test_replace_group): New. Test the
2056 ReplaceGroup method
2057
2058 2003-10-31 Bernhard Herzog <[email protected]>
2059
2060 * test/test_classification.py (TestClassification.setUp):
2061 Subscribe to the CLASS_CHANGED messages
2062 (TestClassification.tearDown): New. Destroy the classification
2063 properly
2064 (TestClassification.test_defaults): Add tests for the default line
2065 width and whether no messages were sent yet
2066 (TestClassification.test_set_default_properties): Add tests for
2067 messages and setting the default line width
2068 (TestClassification.test_add_singleton)
2069 (TestClassification.test_add_range)
2070 (TestClassification.test_multiple_groups): Add tests for messages
2071
2072 2003-10-31 Bernhard Herzog <[email protected]>
2073
2074 Some more refactoring in preparation for new tests:
2075
2076 * test/test_classification.py (TestClassification.setUp): New.
2077 Instantiate the classification here. Update the test methods
2078 accordingly.
2079 (TestClassification.test_multiple_groups): Make sure that the two
2080 singletons matching 1 are considered different.
2081
2082 2003-10-31 Bernhard Herzog <[email protected]>
2083
2084 * test/test_classification.py (red, green, blue): New. These
2085 constants were used in several cases. Update the relevant methods.
2086 (TestClassification.test_defaults)
2087 (TestClassification.test_set_default_properties)
2088 (TestClassification.test_add_singleton)
2089 (TestClassification.test_add_range)
2090 (TestClassification.test_multiple_groups)
2091 (TestClassification.test_deepcopy): New. These were formerly all
2092 part of the single method test.
2093 (TestClassification.test_deepcopy): Removed.
2094 (TestClassIterator): Removed. The test case is now a method of
2095 TestClassification since it tests part of the public interface of
2096 Classification
2097 (TestClassification.test_iterator): New. Used to be
2098 TestClassIterator effectively
2099
2100 2003-10-31 Jan-Oliver Wagner <[email protected]>
2101
2102 GUIfied the functions of the profiling extension.
2103
2104 * /Extensions/profiling/__init__.py: New: Init to make this
2105 directory a package.
2106
2107 * Extensions/profiling/profiling.py: Moved menu entries to
2108 the Extensions menu. Applied _() for strings.
2109 (profile_screen_renderer): Catch the detailed printout and present
2110 it in a dialog.
2111 (time_screen_renderer): Raise a dialog to present the result instead
2112 of printing it to stdout.
2113
2114 2003-10-31 Bernhard Herzog <[email protected]>
2115
2116 * test/test_classification.py (TestClassGroupProperties)
2117 (TestClassGroup, TestClassGroupDefault, TestClassGroupRange)
2118 (TestClassGroupSingleton, TestClassIterator, TestClassification):
2119 Split TestClassification into several classes, one for each class
2120 being tested. TestClassification itself now only tests
2121 Classification. This split makes changes to the tests a bit easier
2122
2123 2003-10-31 Bernhard Herzog <[email protected]>
2124
2125 * Extensions/profiling/profiling.py: New. Extension to measure
2126 Thuban performance
2127
2128 2003-10-31 Frank Koormann <[email protected]>
2129
2130 Added two items to legend popup menu: Remove Layer and Show Layer Table
2131
2132 * Thuban/UI/legend.py (LegendPanel._OnRemoveLayer,
2133 LegendPanel._OnShowTable): New event handlers, call the corresponding
2134 mainwindow methods.
2135 (LegendTree._OnRightClick): Added items to popup menu.
2136
2137 2003-10-30 Bernhard Herzog <[email protected]>
2138
2139 * Thuban/UI/dialogs.py (ThubanFrame.__init__): Handle
2140 EVT_WINDOW_DESTROY
2141 (ThubanFrame.OnDestroy): New. Handler for EVT_WINDOW_DESTROY. Does
2142 nothing but is convenient for the derived classes.
2143
2144 * Thuban/UI/tableview.py
2145 (TableFrame.OnDestroy, LayerTableFrame.OnDestroy): New.
2146 Unsubscribe the messages here not in OnClose because that might
2147 get called multiple times. Fixes RT #2196
2148 (TableFrame.OnClose, LayerTableFrame.OnClose): Removed. Not needed
2149 anymore.
2150
2151 * README: Update the minimum requirement for wxPython. Since we
2152 now use the EVT_WINDOW_DESTROY event, we need at least 2.4.0.4,
2153 the version in which that was introduced for all platforms
2154
2155 2003-10-30 Frank Koormann <[email protected]>
2156
2157 * Thuban/UI/join.py (JoinDialog.OnJoin): Wrapped the major parts of
2158 the join process in a ThubanBeginBusyCursor, ThubanEndBusyCursor
2159 frame.
2160
2161 2003-10-30 Jan-Oliver Wagner <[email protected]>
2162
2163 Improved APR import extension, added further EPSG definitions
2164 and some cleanup regarding string class.
2165
2166 * test/test_proj.py (TestProjection.test_get_projection_units_geo):
2167 Added test for alias 'longlat'.
2168
2169 * Resources/Projections/epsg-deprecated.proj: New. Contains
2170 deprecated EPSG definitions.
2171
2172 * Extensions/importAPR/odb.py (ODBBaseObject.TreeInfo): Added
2173 the variable names for objects.
2174
2175 * Extensions/importAPR/apr.py (APR_BLnSym, APR_BMkSym, APR_BShSym): New.
2176 Copied from importAPR and provided with documentation.
2177
2178 * Extensions/importAPR/importAPR.py (APR_BLnSym, APR_BMkSym, APR_BShSym):
2179 Moved to apr.py.
2180 (APR_View): Added object ref 'ITheme'.
2181
2182 * Thuban/Lib/fileutil.py, Thuban/UI/proj4dialog.py: Replaced string
2183 split function by corresponding use of the string class method.
2184
2185 * Thuban/Model/xmlwriter.py: Replaced string replace function by
2186 corresponding string method.
2187
2188 2003-10-29 Bernhard Herzog <[email protected]>
2189
2190 * Thuban/UI/baserenderer.py
2191 (BaseRenderer.draw_shape_layer_incrementally): Speed up the
2192 special case of a classification that only has the default group
2193
2194 2003-10-27 Bernhard Herzog <[email protected]>
2195
2196 * po/fr.po, po/es.po: Updated translations from Daniel Calvelo
2197
2198 * po/de.po: Update.
2199
2200 * Thuban/UI/application.py
2201 (ThubanApplication.ShowExceptionDialog): Handle translation of the
2202 dialog message properly
2203
2204 2003-10-27 Bernhard Herzog <[email protected]>
2205
2206 Rework how localization works so that we use wx's translation
2207 functions when running Thuban as a normal application but not when
2208 we don't need any UI, such as in the test suite. See the comment
2209 in Thuban/__init__.py for details
2210
2211 * Thuban/__init__.py (_): Add one level of indirection to make the
2212 translation handling more flexible and to make it possible to use
2213 either wx's translation services or not.
2214 (gettext_identity, translation_function_installed)
2215 (install_translation_function): New function to help with this
2216
2217 * Thuban/UI/__init__.py: Install the wx specific translation
2218 function if it's OK to do that
2219
2220 * test/support.py (initthuban): Install a dummy translation
2221 function so that importing Thuban.UI doesn't install a wx specific
2222 one for which would need to import wxPython
2223
2224 2003-10-27 Bernhard Herzog <[email protected]>
2225
2226 * HOWTO-Release: Source archives should be created first and the
2227 binary packages should be created from the source archives.
2228 There's an official debian package now so there's no need to test
2229 the rpm on debian anymore
2230
2231 2003-10-27 Bernhard Herzog <[email protected]>
2232
2233 Several rendering changes:
2234
2235 - Render the selection into a separate bitmap so that only that
2236 bitmap needs to be redrawn when the selection changes
2237
2238 - Render incrementally showing previews and allowing interaction
2239 before rendering is complete
2240
2241 - Update the renderer interface a bit. Most parameters of
2242 RenderMap are now parameters of the constructor
2243
2244 * Thuban/UI/baserenderer.py (BaseRenderer.__init__): Add the map
2245 and the update region as parameters. Update the doc-string
2246 (BaseRenderer.render_map_incrementally): New. Generator function
2247 to renders the map incrementally
2248 (BaseRenderer.render_map): Remove the map argument (it's now in
2249 the constructor) and simply iterate over the
2250 render_map_incrementally generator to draw the map.
2251 (BaseRenderer.draw_shape_layer_incrementally)
2252 (BaseRenderer.draw_shape_layer): Renamed to
2253 draw_shape_layer_incrementally and changed into a generator that
2254 yields True every 500 shapes. Used by render_map_incrementally to
2255 render shape layers incrementally
2256
2257 * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Removed the
2258 map and region parameters which are now in the constructor
2259 (ScreenRenderer.RenderMapIncrementally): New. Public frontend for
2260 the inherited render_map_incrementally.
2261 (BaseRenderer.draw_shape_layer): Removed.
2262 (ScreenRenderer.draw_selection_incrementally): New. The selection
2263 drawing part of the removed draw_shape_layer as a generator
2264 (ScreenRenderer.layer_shapes): Update because of the region
2265 parameter change
2266 (ExportRenderer.__init__): New. Extend the inherited constructor
2267 with the destination region for the drawing
2268 (ExportRenderer.RenderMap): Removed the map and region parameters
2269 which are now in the constructor
2270
2271 * Thuban/UI/view.py (MapCanvas.PreviewBitmap): New. Return a
2272 bitmap suitable for a preview in a tool
2273 (CanvasPanTool.MouseMove): Use the PreviewBitmap method to get the
2274 bitmap
2275 (MapPrintout.draw_on_dc): Adapt to new renderer interface
2276 (MapCanvas.OnPaint): Handle drawing the selection bitmap if it
2277 exists
2278 (MapCanvas.OnIdle): Update the logic to deal with incremental
2279 rendering and the selection bitmap
2280 (MapCanvas._do_redraw): Handle the instantiation of the render
2281 iterator and the redraws during rendering
2282 (MapCanvas._render_iterator): New. Generator to incrementally
2283 redraw both bitmaps
2284 (MapCanvas.Export): Adapt to new renderer interface.
2285 (MapCanvas.full_redraw): Reset the selection bitmap and the
2286 renderer iterator too
2287 (MapCanvas.redraw_selection): New. Force a redraw of the selection
2288 bitmap
2289 (MapCanvas.shape_selected): Only redraw the selection bitmap
2290
2291 * test/test_baserenderer.py
2292 (TestBaseRenderer.test_polygon_no_projection)
2293 (TestBaseRenderer.test_raster_no_projection)
2294 (TestBaseRenderer.test_point_map_projection)
2295 (TestBaseRenderer.test_point_layer_and_map_projection)
2296 (TestBaseRenderer.test_point_layer_projection)
2297 (TestBaseRenderer.test_point_with_classification): Adapt to new
2298 renderer interface
2299
2300 2003-10-24 Bernhard Herzog <[email protected]>
2301
2302 * libraries/thuban/wxproj.cpp (draw_polygon_shape)
2303 (point_in_polygon_shape, shape_centroid): Raise an exception if
2304 the shape can't be read. Previously invalid shape ids would lead
2305 to a segfault.
2306
2307 * test/test_wxproj.py (TestShapeCentroid.test_invalid_shape_id):
2308 New. test whether an exception is raised for invalid shape ids
2309
2310 2003-10-24 Jan-Oliver Wagner <[email protected]>
2311
2312 * Thuban/Model/proj.py (Projection.GetProjectedUnits): Added 'longlat'
2313 as alias for 'latlong'.
2314
2315 * Thuban/UI/projdialog.py (ProjFrame.__init__): Added 'longlat'
2316 as alias for 'latlong'.
2317
2318 2003-10-24 Jan-Oliver Wagner <[email protected]>
2319
2320 * Thuban/UI/projdialog.py (ProjFrame.proj_selection_changed): Set
2321 the projection even for the UnknownPanel.
2322 (UnknownProjPanel.__init__): Define the text and create the textctrl
2323 widget.
2324 (UnknownProjPanel._DoLayout): Replaced static text widget by the
2325 textctrl created in __init__.
2326 (UnknownProjPanel.SetProjection): Set the text for the text ctrl
2327 including the parameters of the projection.
2328
2329 2003-10-24 Jan-Oliver Wagner <[email protected]>
2330
2331 * Resources/Projections/epsg.proj: New. This is a list of
2332 EPSG codes with parameters for proj. The list has been
2333 generated using devtools/create_epsg.py based on the
2334 file nad/epsg of the proj 4.4.7 package. Four projection
2335 definitions have been deleted as they are not accepted by proj:
2336 "CH1903+ / LV95", "Bern 1898 (Bern) / LV03C", "CH1903 / LV03"
2337 and "HD72 / EOV".
2338
2339 2003-10-22 Bernhard Herzog <[email protected]>
2340
2341 Some more tweaks to the projection dialog which should fix RT
2342 #1886.
2343
2344 * Thuban/UI/projlist.py (ProjectionList.Destroy): Unsubscribe from
2345 the ProjFile's messages and call the base class methods correctly
2346 (ProjectionList.SelectProjection): Set the wxLIST_STATE_FOCUSED
2347 flag on the newly selected item too. Otherwise some other item is
2348 focused and the first time the focus is moved with the keyboard
2349 the selection moves in unexpected ways.
2350
2351 * Thuban/UI/projdialog.py (ProjFrame.__init__): Do not set the
2352 focus on the OK button, only on the projection list. That way the
2353 list really has the focus initially
2354 (ProjFrame.OnClose): Call the projection list's Destroy method to
2355 make it unsubscribe all messages
2356
2357 2003-10-21 Bernhard Herzog <[email protected]>
2358
2359 Rework the projection dialog to fix a few bugs, including RT 2166
2360 and most of 2168
2361
2362 * Thuban/UI/projlist.py: New. The class ProjectionList is a
2363 special wxListCtrl to show a list of projections in a more MVC
2364 fashion
2365
2366 * Thuban/UI/projdialog.py (ProjFrame): Substantial changes
2367 throughout the class. The main change is to use the ProjectionList
2368 class instead of a normal wxListBox. Also, add an explicit
2369 "Unknown" projection to the projection choice control.
2370 (ProjPanel.__init__): Add an "unknown" ellipsoid
2371 (TMPanel.__init__, LCCPanel.__init__): Tweak the order of
2372 instantiation of the panel's controls to make the tab-order more
2373 natural
2374
2375 2003-10-21 Bernhard Herzog <[email protected]>
2376
2377 * test/test_load.py (TestSingleLayer.file_contents)
2378 (TestSingleLayer.test): Add non-ascii characters to the titles of
2379 session, map and layer. This is effectively a port of the
2380 TestUnicodeStrings test in test_load_0_8.py which for some reason
2381 was only added there.
2382
2383 * test/test_load_0_9.py (TestSingleLayer.file_contents)
2384 (TestSingleLayer.test): Same as in test_load.py: add non-ascii
2385 characters to the titles of session, map and layer,.
2386
2387 2003-10-21 Bernhard Herzog <[email protected]>
2388
2389 Add EPSG projection handling to .thuban files
2390
2391 * test/test_save.py (SaveSessionTest.dtd)
2392 (SaveSessionTest.testEmptySession)
2393 (SaveSessionTest.testLayerProjection)
2394 (SaveSessionTest.testRasterLayer)
2395 (SaveSessionTest.testClassifiedLayer)
2396 (SaveSessionTest.test_dbf_table)
2397 (SaveSessionTest.test_joined_table)
2398 (SaveSessionTest.test_save_postgis): Update to 1.0-dev namespace
2399 (SaveSessionTest.testSingleLayer): Update to 1.0-dev namespace and
2400 use a and epsg projection to test saving them
2401
2402 * test/test_load.py (LoadSessionTest.dtd): Update to 1.0-dev
2403 namespace
2404 (TestLayerVisibility.file_contents, TestLabels.file_contents)
2405 (TestLayerProjection.file_contents)
2406 (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
2407 (TestPostGISLayer.file_contents)
2408 (TestPostGISLayerPassword.file_contents)
2409 (TestLoadError.file_contents, TestLoadError.test): Update to use
2410 1.0-dev namespace
2411 (TestSingleLayer.file_contents, TestSingleLayer.test): Update to
2412 use 1.0-dev namespace and use an EPSG projection to test whether
2413 loading it works
2414
2415 * test/test_load_0_9.py: New. Effectively a copy of test_load.py
2416 as of Thuban 0.9. These are now tests to determine whether Thuban
2417 can still read files generated by Thuban 0.9
2418
2419 * Thuban/Model/save.py (SessionSaver.write)
2420 (SessionSaver.write_session): Use the 1.0 dtd and 1.0-dev
2421 namespace
2422 (SessionSaver.write_projection): Write the projection's epsg
2423 attribute
2424
2425 * Thuban/Model/load.py (SessionLoader.__init__): Also accept the
2426 thuban-1.0-dev.dtd namespace
2427 (SessionLoader.check_attrs): Allow a callable object as conversion
2428 too
2429 (SessionLoader.start_projection, SessionLoader.end_projection)
2430 (SessionLoader.start_parameter): Handle the epsg attribute and
2431 rename a few instance variables to lower case
2432
2433 * Resources/XML/thuban-1.0.dtd: New. Only difference to
2434 thuban-0.9.dtd is the epsg attribute for projections.
2435
2436 2003-10-21 Bernhard Herzog <[email protected]>
2437
2438 * test/runtests.py (main): Let the user specify which tests to run
2439 on the command line
2440
2441 * test/support.py (ThubanTestResult.getDescription): Override to
2442 give a better short description. The description can be used as a
2443 parameter to run_tests to run that particular test in isolation.
2444
2445 2003-10-21 Frank Koormann <[email protected]>
2446
2447 Popup menu for legend. Scheduled for the 1.2 release this was too
2448 simple to implement: The popup menu is bound to the legend tree, while
2449 the events are hanlded by its anchestor, the legend panel. This
2450 allows reuse of all the event handlers already implemented for the
2451 legend toolbar buttons.
2452
2453 * Thuban/UI/legend.py (LegendPanel.__init__): EVT_MENU macros
2454 to add handlers for the events issued by the popup menu.
2455 (LegendPanel._OnToggleVisibility): Handler for toggling layer
2456 visibility event
2457 (LegendPanel._OnProjection): Handler for layer projection event.
2458 (LegendTree.__init__): Added EVT_TREE_ITEM_RIGHT_CLICK
2459 (LegendTree._OnRightClick): Event handler for right click, select item
2460 and pop up menu.
2461 (LegendTree.ToggleVisibility): Toggle layer visibility
2462 (LegendTree.LayerProjection): Raise layer projection dialog for
2463 current layer.
2464
2465 2003-10-21 Bernhard Herzog <[email protected]>
2466
2467 * Resources/Projections/defaults.proj: Use correct DOCTYPE
2468 declaration. The top-level element is projectionlist not projfile
2469
2470 2003-10-20 Bernhard Herzog <[email protected]>
2471
2472 * Thuban/UI/projdialog.py (ProjFrame.write_proj_file): New. helper
2473 method to write a projfile and display a busy cursor and error
2474 dialogs.
2475 (ProjFrame._OnSave, ProjFrame._OnAddToList, ProjFrame._OnImport)
2476 (ProjFrame._OnExport, ProjFrame._OnRemove): Use write_proj_file
2477 (ProjFrame.__FillAvailList): Translate "<None>" too and display a
2478 busy cursor while loading the user and system prj files.
2479
2480 2003-10-16 Bernhard Herzog <[email protected]>
2481
2482 * Thuban/Model/resource.py (projfile_cache): Introduce a cache for
2483 ProjFile objects
2484 (clear_proj_file_cache): New function to clear the cache. Mainly
2485 useful for use by the test suite
2486 (read_proj_file): Use the cache.
2487
2488 * test/test_proj.py (TestProjFile): Clarify the doc-string
2489 (ProjFileReadTests): Update doc-string
2490 (ProjFileReadTests.test_get_system_proj_file): Check whether the
2491 system proj files is cached.
2492 (ProjFileLoadTestCase): New base class for the proj file tests
2493 derived from support.FileLoadTestCase to provide some common
2494 behavior.
2495 (TestLoadingProjFile)
2496 (TestLoadingProjFileWithEmptyProjectionlist.file_contents)
2497 (TestProjFileWithInvalidParameters.file_contents): Derive from
2498 ProjFileLoadTestCase
2499 (TestLoadingProjFile.test_caching): New. Test whether the cache
2500 works
2501
2502 2003-10-16 Silke Reimer <[email protected]>
2503
2504 * debian/*: New directory with configuration files for building a thuban
2505 deb-package.
2506
2507 2003-10-14 Bernhard Herzog <[email protected]>
2508
2509 * test/test_proj.py: Execute support.run_tests when run as
2510 __main__ so that missing unsubscribes are detected
2511 (TestProjFile.tearDown): Destroy the proj_file properly
2512
2513 2003-10-14 Bernhard Herzog <[email protected]>
2514
2515 * Thuban/Model/messages.py (PROJECTION_ADDED)
2516 (PROJECTION_REPLACED, PROJECTION_REMOVED): New message types for
2517 the ProjFile objects
2518
2519 * Thuban/Model/proj.py (ProjFile): Derive from Publisher so we can
2520 easily send messages when the projections change
2521 (ProjFile.Add, ProjFile.Remove, ProjFile.Replace): Issue messages
2522 when the change was successful
2523
2524 * test/test_proj.py (TestProjFile.setUp): Subscribe to some of the
2525 proj file messages
2526 (TestProjFile.test_add_remove)
2527 (TestProjFile.test_remove_non_existing)
2528 (TestProjFile.test_replace)
2529 (TestProjFile.test_replace_non_existing): Test whether the right
2530 messages are sent
2531
2532 2003-10-14 Bernhard Herzog <[email protected]>
2533
2534 * test/test_proj.py (TestProjFile.test): Refactor into several
2535 tests
2536 (TestProjFile.test_add_remove)
2537 (TestProjFile.test_remove_non_existing)
2538 (TestProjFile.test_replace)
2539 (TestProjFile.test_replace_non_existing): Some of the new
2540 individual test cases
2541 (TestProjFileSimple): New class for the rest of the test cases
2542 that came out of the refactoring
2543 (ProjFileTest): Derive from xmlsupport.ValidationTest so that the
2544 derived classes don't have to
2545
2546 2003-10-13 Bernhard Herzog <[email protected]>
2547
2548 Add an optional EPSG code to the projection objects and extend the
2549 .proj file format accordingly.
2550
2551 * Resources/XML/projfile.dtd (element projection): Add epsg
2552 attribute
2553
2554 * Thuban/Model/proj.py (Projection.__init__): New parameter and
2555 instance variable epsg. Update doc-string
2556 (Projection.EPSGCode, Projection.Label): New methods to provide
2557 access to EPSG code and a label for use in dialogs
2558
2559 * Thuban/Model/resource.py (ProjFileReader.start_projection)
2560 (ProjFileReader.end_projection, ProjFileSaver.write_projfile):
2561 Handle the epsg code attribute when reading or writing proj files
2562
2563 * Thuban/UI/projdialog.py (ProjFrame._OnSave)
2564 (ProjFrame._OnAddToList, ProjFrame.__DoOnProjAvail)
2565 (ProjFrame.__FillAvailList): Use the projection's Label method to
2566 get the string for the list box
2567
2568 * test/test_proj.py (TestProjection.test_label)
2569 (TestProjection.test_label_epsg)
2570 (TestProjection.test_epsgcode_for_non_epsg_projection)
2571 (TestProjection.test_epsgcode_for_real_epsg_projection): New tests
2572 for the label and EPSGCode methods
2573 (WriteProjFileTests.doTestWrite, WriteProjFileTests.test_write)
2574 (WriteProjFileTests.test_write_empty_file): Create the ProjFile
2575 objects in the test cases and put the expected contents into the
2576 test case methods too. Update doTestWrite accordingly
2577 (TestLoadingProjFile)
2578 (TestLoadingProjFileWithEmptyProjectionlist): New classes with the
2579 read tests from TestProjFile.
2580 (TestProjFile.doTestRead, TestProjFile.testRead): Removed. These
2581 tests are now in the new classes.
2582 (sample_projfile, sample_projfile_data)
2583 (sample_projfile2, sample_projfile_data2): Removed. Not used
2584 anymore.
2585 (TestProjFile.test_read_unreadable_file): No need to reset the
2586 permissions at the end anymore since we use a unique filename
2587
2588 2003-10-13 Bernhard Herzog <[email protected]>
2589
2590 * test/test_proj.py: Some more refactoring of the test cases
2591 (ProjFileTest): New base class for the proj file tests.
2592 (TestProjFile): Derive from ProjFileTest
2593 (TestProjFile.test_read_unreadable_file)
2594 (TestProjFile.test_read_empty_file, TestProjFile.doTestRead): Use
2595 the new filename method to get a unique filename
2596 (TestProjFile.doTestWrite, TestProjFile.testWrite): Removed.
2597 (WriteProjFileTests): New class for proj file write tests.
2598 Contains the write test that were in TestProjFile originally.
2599
2600 2003-10-13 Bernhard Herzog <[email protected]>
2601
2602 * test/test_proj.py (TestProjFile.testRead)
2603 (TestProjFile.test_read_non_existing_file)
2604 (TestProjFile.test_read_unreadable_file)
2605 (TestProjFile.test_read_empty_file): Split into several methods.
2606
2607 2003-10-10 Bernhard Herzog <[email protected]>
2608
2609 * Thuban/UI/sizers.py: New file with custom sizers.
2610
2611 * Thuban/UI/projdialog.py (ProjFrame.build_dialog): Instantiate
2612 all projection type specific panels and put them into a
2613 NotebookLikeSizer. This way the dialog doesn't change its size
2614 when a different projection is selected
2615 (ProjFrame.__init__): Rename projection_panels
2616 projection_panel_defs and reuse projection_panels for a list of
2617 the instantiated panels.
2618 (ProjFrame._show_proj_panel, ProjFrame.__DoOnProjAvail)
2619 (ProjFrame.__DoOnProjChoice): Changes due to the new handling of
2620 the panels
2621 (UnknownProjPanel._DoLayout): Place the newlines in the message
2622 differently to make the panel narrower.
2623 (TMPanel._DoLayout): Layout the parameters in one column.
2624
2625 2003-10-10 Bernhard Herzog <[email protected]>
2626
2627 * Thuban/UI/projdialog.py (ProjFrame.build_dialog): New method
2628 that contains all the setup for the dialog's widgets, layout and
2629 event handling.
2630 (__): Call build_dialog to build the dialog.
2631 (ProjFrame.__set_properties, ProjFrame.__do_layout): Removed.
2632 Their functionality is now in build_dialog
2633 (ProjFrame.__VerifyButtons, ProjFrame.__VerifyButtons)
2634 (ProjFrame.__DoOnProjAvail, ProjFrame.__DoOnProjAvail)
2635 (ProjFrame.__DoOnProjChoice): Small updates due to slightly
2636 different widget names and hierarchy introduced with build_dialog.
2637
2638 2003-10-10 Bernhard Herzog <[email protected]>
2639
2640 * README: Fix typo.
2641
2642 2003-10-09 Bernhard Herzog <[email protected]>
2643
2644 * Thuban/Model/proj.py (ProjFile.Add): Do not check whether the
2645 projection is already in the list. This is *a lot* faster when
2646 loading files with hundreds of projections since it saves a linear
2647 search. OTOH this will allow adding the same projection to the
2648 user.proj file multiple times in the projection dialog but we'll
2649 deal with that later
2650
2651 2003-10-09 Jan-Oliver Wagner <[email protected]>
2652
2653 * devtools: New. Directory for developer tools that are not intended
2654 for the regular user.
2655
2656 * devtools/create_epsg.py: New. Convert the epsg file of proj into
2657 a python .proj file.
2658
2659 2003-10-09 Bernhard Herzog <[email protected]>
2660
2661 * test/test_proj.py
2662 (TestProjection.test_get_parameter_without_equals_sign): New. Test
2663 whether GetParameter handles parameters without "=" sign correctly
2664
2665 * Thuban/Model/proj.py (Projection.GetParameter): Handle
2666 parameters that do not contain a "=". Update the doc-string
2667
2668 2003-10-08 Bernhard Herzog <[email protected]>
2669
2670 * Thuban/UI/projdialog.py (ProjFrame.__set_properties): Remove the
2671 length limit on the projname text control
2672
2673 2003-10-08 Bernhard Herzog <[email protected]>
2674
2675 * test/test_proj.py (TestProjection.test_get_projection_units_geo)
2676 (TestProjection.test_get_projection_units_normal): New. Tests for
2677 the Projection.GetProjectedUnits method
2678
2679 2003-10-08 Jan-Oliver Wagner <[email protected]>
2680
2681 * Thuban/Model/resource.py (get_user_proj_file): small bug-fix:
2682 Added missing 'val' parameter.
2683
2684 2003-10-08 Bernhard Herzog <[email protected]>
2685
2686 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): When the
2687 projection type of the currently selected projection is not known,
2688 i.e. there's no panel for it, use the UnknownProjPanel
2689 (ProjFrame.__DoOnProjChoice, ProjFrame._show_proj_panel): Split
2690 the actual replacing of the proj panel into the new method
2691 _show_proj_panel.
2692 (UnknownProjPanel): Add doc-string.
2693 (UnknownProjPanel._DoLayout): Insert a newline into the text so
2694 that the panel is not so wide.
2695
2696 2003-10-08 Bernhard Herzog <[email protected]>
2697
2698 * Thuban/Model/resource.py (read_proj_file): Return the warnings
2699 too. Update the doc-string
2700 (get_proj_files): Removed. It wasn't used anywhere
2701 (get_system_proj_files, get_system_proj_file): Rename to
2702 get_system_proj_file and return the ProjFile object and not a list
2703 of ProjFile objects. Update the callers.
2704 (get_user_proj_files, get_user_proj_file): Rename to
2705 get_user_proj_file return the ProjFile object and not a list of
2706 ProjFile objects. Update the callers.
2707 (ProjFileReader.__init__): New instance variable for the warnings.
2708 Rename the __pf ivar to projfile. Update the methods referring to
2709 __pf
2710 (ProjFileReader.end_projection): Catch any errors raised when
2711 instantiating the projection and record that as an error. The
2712 projection will not be in the final ProjFile object.
2713 (ProjFileReader.GetWarnings): New method to return the warnings.
2714
2715 * Thuban/UI/projdialog.py (ProjFrame.show_warnings): New method to
2716 show the warnings from the projfile reader
2717 (ProjFrame._OnImport): Deal with any warnings returned by
2718 read_proj_file
2719 (ProjFrame.__FillAvailList): Deal with any warnings returned by
2720 get_system_proj_file or get_user_proj_file.
2721
2722 * test/test_proj.py (TestProjFile.doTestRead): Check the warnings.
2723 (TestProjFileWithInvalidParameters.file_contents): New test cases
2724 to test whether read_proj_file handles invalid projection
2725 parameters correctly
2726 (TestProjFile.test_get_system_proj_file): New. Simple test for
2727 resource.get_system_proj_file
2728
2729 2003-10-07 Bernhard Herzog <[email protected]>
2730
2731 * test/test_derivedshapestore.py
2732 (TestDerivedShapeStoreExceptions.tearDown): Clear the session
2733 properly so that the temporary directories get deleted correctly
2734
2735 2003-10-06 Bernhard Herzog <[email protected]>
2736
2737 Handle the title changes in a proper MVC way.
2738
2739 * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
2740 canvas' TITLE_CHANGED messages
2741 (MainWindow.update_title): New. Update the main window's title
2742 (MainWindow.__SetTitle): Removed. Use update_title instead.
2743 (MainWindow.SetMap): Use update_title instead of __SetTitle
2744 (MainWindow.RenameMap): Do change the window title explicitly
2745 here. That's handled in a proper MVC way now.
2746 (MainWindow.title_changed): New. Subscriber for the TITLE_CHANGED
2747 messages
2748
2749 * Thuban/Lib/connector.py (Conduit): New class to help classes
2750 that forward messages
2751
2752 * Thuban/UI/viewport.py: Forward the map's TITLE_CHANGED messages
2753 (ViewPort): Derive from Conduit instead of Publisher
2754 (ViewPort.Subscribe, ViewPort.Unsubscribe): Use the new base class
2755 when calling the inherited versions
2756 (ViewPort._subscribe_map, ViewPort._unsubscribe_map): New helper
2757 methods to subscribe and unsubscribe map messages
2758 (ViewPort.SetMap, ViewPort.Destroy): Use the new helper methods to
2759 handle the map subscriptions
2760 (ViewPort.Map, ViewPort.map_projection_changed)
2761 (ViewPort.layer_projection_changed): Add or update doc-strings
2762
2763 * test/test_connector.py (TestPublisher.test_issue_simple): Fix
2764 typo
2765 (MyConduit): Helper class for the Conduit test.
2766 (TestConduit): Test cases for Conduit
2767
2768 * test/test_connector.py: Use support.run_tests as main.
2769
2770 * test/test_viewport.py (ViewPortTest.setUp): Also subscribe to
2771 the TITLE_CHANGED messages
2772 (ViewPortTest.test_forwarding_title_changed): New test to check
2773 whether the viewport forwards the map's TITLE_CHANGED messages
2774 (TestViewportWithPostGIS.tearDown): Call the map's Destroy method
2775 after the port's because the latter may require a still functional
2776 map.
2777
2778 2003-10-06 Bernhard Herzog <[email protected]>
2779
2780 * Thuban/UI/application.py (ThubanApplication.maps_changed): Add
2781 doc-string
2782
2783 2003-10-06 Bernhard Herzog <[email protected]>
2784
2785 * test/test_viewport.py (ViewPortTest.setUp)
2786 (SimpleViewPortTest.test_init_with_size): Move the test for the
2787 initial size as a constructor parameter from ViewPortTest.setUp
2788 method to a new separate test in SimpleViewPortTest.
2789
2790 2003-10-06 Bernhard Herzog <[email protected]>
2791
2792 * test/test_viewport.py (MockView): New class derived from
2793 ViewPort with a mock implementation of GetTextExtent to be used in
2794 the test cases
2795 (ViewPortTest.setUp): Use MockView instead of ViewPort
2796
2797 * Thuban/UI/viewport.py (ViewPort.GetTextExtent): Turn this method
2798 into what would be a "pure virtual function" in C++: always raise
2799 NotImplementedError. Mock implementations for test cases don't
2800 belong into the real code
2801
2802 2003-10-02 Bernhard Herzog <[email protected]>
2803
2804 * test/test_layer.py (TestLayer.test_empty_layer): Explicitly
2805 close the dbf file we create so that it's contents have been
2806 written properly.
2807
2808 * libraries/shapelib/shptree.c, libraries/shapelib/shpopen.c,
2809 libraries/shapelib/shapefil.h, libraries/shapelib/dbfopen.c:
2810 Update to shapelib 1.2.10
2811
2812 2003-10-01 Jan-Oliver Wagner <[email protected]>
2813
2814 * Thuban/UI/tree.py, Thuban/UI/main.py: Remove the #! line as
2815 it annoys lintian which warns about these files not being
2816 executable. The #! isn't necessary here since if you absolutely
2817 must execute them you can always say "python <filename>".
2818
2819 2003-09-26 Bernhard Herzog <[email protected]>
2820
2821 * Thuban/Model/classgen.py (GenQuantiles0): Removed since it's
2822 only used in GREAT-ER but not used in Thuban itself. When GREAT-ER
2823 is ported to a newer the import will fail, so it should be noticed
2824 immediately that this function is gone.
2825 Fixes RT#1919
2826
2827 2003-09-26 Bernhard Herzog <[email protected]>
2828
2829 Add a DTD for the projection files and make thuban write valid
2830 projection files
2831
2832 * Resources/XML/projfile.dtd: New. DTD for thuban's projection
2833 files
2834
2835 * Thuban/Model/resource.py (ProjFileSaver.write): Use
2836 'projectionlist' as the name in the document type declaration so
2837 that it matches the element type of the root element.
2838
2839 * test/test_proj.py (sample_projfile, sample_projfile2): Use
2840 'projectionlist' as the name in the document type declaration just
2841 as it is done now in the files thuban would write
2842 (sample_projfile, sample_projfile_data): Fix spelling of
2843 "Mercator"
2844 (TestProjFile.doTestWrite): Validate the written and the expected
2845 XML data
2846 (TestProjFile): Derive from ValidationTest so that we can run xml
2847 validation tests
2848
2849 2003-09-24 Bernhard Herzog <[email protected]>
2850
2851 * Thuban/UI/renderer.py (ExportRenderer.render_legend): Do not
2852 modify the list returned by map.Layers() in place since it is the
2853 actual list of layers used by the map.
2854
2855 2003-09-23 Jan-Oliver Wagner <[email protected]>
2856
2857 * Doc/manual/thuban-manual.xml: Added subsection to chapter
2858 Extensions to describe the extensions coming with the Thuban
2859 standard package (gns2shp and importAPR).
2860
2861 2003-09-23 Bernhard Herzog <[email protected]>
2862
2863 * libraries/thuban/wxproj.cpp (project_point): if there's an
2864 inverse but no forward projection, convert to degrees after
2865 applying the inverse projection. Fixes RT#2096
2866
2867 * test/test_wxproj.py: New. Test cases for wxproj.so. One test
2868 implicitly tests for the fix to RT#2096
2869
2870 * test/support.py (FloatComparisonMixin.assertFloatSeqEqual):
2871 Check that the sequences have the same lengths
2872
2873 * Resources/Projections/defaults.proj (Geographic projection): Use
2874 a much more precise value for the to_meter attribute.
2875
2876 2003-09-22 Bernhard Herzog <[email protected]>
2877
2878 * test/support.py (initthuban): Make sure to unset the LANG env.
2879 var. so that tests that compare translated strings work. Solves RT
2880 #2094
2881
2882 2003-09-22 Jan-Oliver Wagner <[email protected]>
2883
2884 Small improvement of APR import.
2885
2886 * Extensions/importAPR/test/test_apr.py (aprTest.test_LClass):
2887 Added tests for text-ranges.
2888
2889 * Extensions/importAPR/apr.py (APR_LClass.GetThubanRange): Now
2890 returns a string object if the range is based on text.
2891
2892 * Extensions/importAPR/importAPR.py (import_apr_dialog): Unified
2893 range retrieval.
2894
2895 2003-09-22 Jan-Oliver Wagner <[email protected]>
2896
2897 Initial version of the importAPR extension which is in
2898 experimental state.
2899
2900 * /Extensions/importAPR/, /Extensions/importAPR/samples/,
2901 /Extensions/importAPR/test/: New directories.
2902
2903 * /Extensions/importAPR/samples/README: New: Howto load the samples.
2904
2905 * /Extensions/importAPR/samples/iceland.apr: New: A sample APR
2906 file which refers to the Thuban Iceland demo data.
2907
2908 * /Extensions/importAPR/test/README: New: Howto execute the tests.
2909
2910 * /Extensions/importAPR/test/test_apr.py: New: Tests for APR classes.
2911
2912 * /Extensions/importAPR/apr.py: New: Classes for ArcView Objects
2913 as in '.apr'-files.
2914
2915 * /Extensions/importAPR/odb.py: New: Classes for generic ArcView
2916 ODB Objects as in '.apr', '.avl' and other files.
2917
2918 * /Extensions/importAPR/__init__.py: New: Init to make this
2919 directory a package.
2920
2921 * /Extensions/importAPR/importAPR.py: New: Import a ArcView
2922 project file (.apr) and convert it to Thuban.
2923
2924 2003-09-22 Jan-Oliver Wagner <[email protected]>
2925
2926 * Extensions/gns2shp.gns2shp.py: The main module of gns2shp.
2927
2928 2003-09-19 Jan-Oliver Wagner <[email protected]>
2929
2930 * Doc/manual/thuban-manual.xml: Extended section 'Installation'
2931 with description on RPM installation and RPM binary package
2932 creation.
2933
2934 2003-09-18 Bernhard Herzog <[email protected]>
2935
2936 * setup.py (data_files): Only add the mo files if the Locales
2937 directory actually exists, so that setup.py works with a fresh CVS
2938 checkout
2939
2940 2003-09-12 Jan-Oliver Wagner <[email protected]>
2941
2942 * Examples/simple_extensions/simple_tool.py: bugfix: Tool is now
2943 in viewport, not anymore in view
2944
2945 2003-09-04 Jan-Oliver Wagner <[email protected]>
2946
2947 Introducing first Extension (gns2shp).
2948
2949 * Extensions, Extensions/gns2shp, Extensions/gns2shp/test: New.
2950
2951 * Extensions/__init__.py: New. init to make this dir a package.
2952
2953 * Extensions/gns2shp/__init__.py: New. init to make this dir a package.
2954
2955 * Extensions/gns2shp/test/README: New. some info on this test directory.
2956
2957 * Extensions/gns2shp/test/ls.txt: New. test data set (Liechtenstein).
2958
2959 * Extensions/gns2shp/test/test_gns2shp.py: New. Test for correct creation
2960 of Shapefile from GNS text file format
2961
2962 2003-09-03 Jan-Oliver Wagner <[email protected]>
2963
2964 Fix/workaround for bug #2019:
2965 https://intevation.de/rt/webrt?serial_num=2019
2966
2967 * Thuban/UI/identifyview.py (IdentifyView.ID_STOP): New.
2968 (IdentifyView.__init__): Added another button that allows to
2969 stop the identify mode.
2970 (IdentifyView.OnStop): New. Stops the identify mode.
2971
2972 2003-09-03 Jan-Oliver Wagner <[email protected]>
2973
2974 Introducing a new exception dialog that allows to exit the
2975 application immediately.
2976 This fixes bug #2060: https://intevation.de/rt/webrt?serial_num=2060
2977
2978 * Thuban/UI/exceptiondialog.py: New. A special exception dialog.
2979
2980 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
2981 Made strings available to translations. Exchanged the simple
2982 ScrolledMessageDialog by the new ExceptionDialog.
2983
2984 2003-09-01 Bernhard Herzog <[email protected]>
2985
2986 * NEWS: New. Summary of changes and release notes.
2987
2988 * MANIFEST.in: Add NEWS
2989
2990 2003-09-01 Bernhard Herzog <[email protected]>
2991
2992 * MANIFEST.in: Correct the include statement for the mo-files and
2993 include the documentation too.
2994
2995 * setup.py (data_files): Add the .mo files
2996 (setup call): Up to version 0.9.0
2997
2998 2003-09-01 Bernhard Herzog <[email protected]>
2999
3000 * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Change the
3001 parameter list to just parent and session
3002 (ChooseDBTableDialog.__set_properties): Removed. Setting the
3003 selection of empty list boxes is not allowed (and produces C++
3004 assertion errors) and the rest of the setup is better done in
3005 __init__ anyway.
3006 (ChooseDBTableDialog.OnCancel, ChooseDBTableDialog.OnOK)
3007 (ChooseDBTableDialog.OnLBDClick, DBDialog.OnOK): Use the Python
3008 builtins True/False for booleans to avoid warnings from wxPython
3009
3010 * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Adapt to new
3011 ChooseDBTableDialog constructor parameters.
3012
3013 2003-09-01 Bernhard Herzog <[email protected]>
3014
3015 * Thuban/Model/postgisdb.py
3016 (PostGISTable): Extend doc-string
3017 (PostGISTable._fetch_table_information): Set the column index
3018 correctly, pretending ignored columns don't exist.
3019
3020 * test/test_postgis_db.py (TestPostGISIgnoredColumns): New tests
3021 for postgis tables with data types not yet supported by thuban.
3022
3023 2003-08-29 Bernhard Herzog <[email protected]>
3024
3025 * HOWTO-Release: Tweak item about running the tests.
3026
3027 2003-08-29 Jan-Oliver Wagner <[email protected]>
3028
3029 * /Doc/manual/thuban-manual.xml: updated to version 1.0pre2.
3030
3031 2003-08-29 Bernhard Herzog <[email protected]>
3032
3033 Add some missing parameters to projections. Proj complains about
3034 them on windows but for some reason not on Linux.
3035
3036 * test/test_save.py (SaveSessionTest.testLayerProjection): Add
3037 missing required projection parameters
3038
3039 * test/test_proj.py (TestProjFile.test): Add missing required
3040 projection parameters
3041
3042 * test/test_load_0_8.py (TestLayerProjection.file_contents)
3043 (TestLayerProjection.test): Add missing required projection
3044 parameters and tests for them
3045
3046 * test/test_load.py (TestLayerProjection.file_contents)
3047 (TestLayerProjection.test): Add missing required projection
3048 parameters and tests for them
3049
3050 * test/test_layer.py (TestLayer.test_base_layer): Add missing
3051 required projection parameters
3052
3053 2003-08-29 Bernhard Herzog <[email protected]>
3054
3055 * libraries/pyprojection/Projection.i: Use pj_get_errno_ref to
3056 access the pj_errno because directly accessing pj_errno doesn't
3057 work on windows if the proj library is in a DLL
3058
3059 * libraries/pyprojection/Projection_wrap.c: Update from Projection.i
3060
3061 2003-08-28 Bernhard Herzog <[email protected]>
3062
3063 * test/test_proj.py: Import things from Thuban after calling
3064 initthuban
3065
3066 * test/test_load.py (LoadSessionTest.filenames): New class
3067 variable with the filename attributes to normalize
3068 (LoadSessionTest.check_format): Pass self.filenames to
3069 sax_eventlist to normalize the filename attributes
3070
3071 * test/xmlsupport.py: Add cvs keywords
3072 (SaxEventLister.__init__): New parameter filenames which indicates
3073 attributes that contain filenames
3074 (SaxEventLister.startElementNS): Normalize the filename attributes
3075 with os.path.normpath
3076 (sax_eventlist): New parameter filenames to pass through to
3077 SaxEventLister
3078
3079 * test/test_derivedshapestore.py: Make this file callable as a
3080 program to execute the tests
3081 (TestDerivedShapeStoreExceptions.test_table_with_wrong_size): Bind
3082 the session to self.session so that it gets destroyed properly
3083
3084 * test/test_layer.py (TestLayer.tearDown): Call the session's
3085 Destroy method
3086
3087 * test/test_map.py (TestMapBase.tearDown): Destroy self.session
3088 too if it exists
3089 (TestMapAddLayer.test_add_layer): Bind the session to self.session
3090 so that it gets destroyed properly
3091
3092 * test/postgissupport.py (reason_for_not_running_tests): Add a
3093 test for the existence of popen2.Popen4.
3094
3095 * test/test_save.py (SaveSessionTest.tearDown): New. Provide a
3096 reliable way to destroy the sessions created in the test cases
3097 (SaveSessionTest.test_dbf_table): Bind the session to self.session
3098 so that it gets destroyed properly
3099 (SaveSessionTest.testLayerProjection): Bind the session to
3100 self.session so that it gets destroyed properly
3101
3102 * test/test_session.py (UnreferencedTablesTests.tearDown): Make
3103 sure that the session is destroyed properly
3104
3105 * test/test_shapefilestore.py: Make this callable as a program to
3106 execute the tests
3107
3108 * test/test_scalebar.py: Remove unnecessary import of _ from
3109 Thuban
3110
3111 * test/support.py (print_garbage_information): Call initthuban
3112 here because it may be called indirectly from test cases that test
3113 test support modules which do not use anything from thuban itself
3114 (ThubanTestProgram.runTests): Remove unnecessary debug print
3115
3116 2003-08-28 Bernhard Herzog <[email protected]>
3117
3118 * Thuban/version.py (longversion): Update to 0.9
3119
3120 * Thuban/UI/mainwindow.py: Remove some unused imports
3121
3122 * README: Add section about required additional software. Add date
3123 and revision CVS keywords
3124
3125 * HOWTO-Release: Add item about the translations. Add date and
3126 revision CVs keywords and change formatting to match README a bit
3127 better
3128
3129 * po/de.po: Update for 0.9
3130
3131 * test/README: Tweak the wording a little because many tests are
3132 not really unittest.
3133
3134 2003-08-27 Bernhard Herzog <[email protected]>
3135
3136 As preparation for the 0.9 release, switch thuban files to a
3137 non-dev namespace
3138
3139 * Thuban/Model/save.py (SessionSaver.write_session): Write files
3140 with the http://thuban.intevation.org/dtds/thuban-0.9.dtd
3141 namespace
3142
3143 * Thuban/Model/load.py (SessionLoader.__init__): Accept the
3144 http://thuban.intevation.org/dtds/thuban-0.9.dtd namespace too
3145
3146 * test/test_save.py (SaveSessionTest.dtd)
3147 (SaveSessionTest.testEmptySession)
3148 (SaveSessionTest.testSingleLayer)
3149 (SaveSessionTest.testLayerProjection)
3150 (SaveSessionTest.testRasterLayer)
3151 (SaveSessionTest.testClassifiedLayer)
3152 (SaveSessionTest.test_dbf_table)
3153 (SaveSessionTest.test_joined_table)
3154 (SaveSessionTest.test_save_postgis): Update for new namespace
3155
3156 * test/test_load.py (LoadSessionTest.dtd, TestSingleLayer)
3157 (TestLayerVisibility.file_contents, TestLabels.file_contents)
3158 (TestLayerProjection.file_contents)
3159 (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
3160 (TestPostGISLayer.file_contents)
3161 (TestPostGISLayerPassword.file_contents)
3162 (TestLoadError.file_contents, TestLoadError.test): Update for new
3163 namespace
3164
3165 2003-08-27 Bernhard Herzog <[email protected]>
3166
3167 Make the table interface distinguish between row ids (an integer
3168 that uniquely identifies a row) and row ordinals (a simple row
3169 count from 0 to NumRows() - 1)
3170
3171 * Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
3172 (PostGISTable.RowOrdinalToId): New methods to conver between row
3173 ids and row ordinals
3174 (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
3175 parameter row_is_ordinal to indicate whether the row parameter is
3176 the row id or the ordinal
3177
3178 * Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
3179 (TransientTableBase.RowOrdinalToId)
3180 (AutoTransientTable.RowIdToOrdinal)
3181 (AutoTransientTable.RowOrdinalToId): Same new methods as in
3182 PostGISTable.
3183 (TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
3184 (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
3185 Same new parameter as in PostGISTable.
3186
3187 * Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
3188 (DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
3189 (MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
3190 (DBFTable.ReadValue, DBFTable.ReadRowAsDict)
3191 (MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
3192 parameter as in PostGISTable.
3193
3194 * Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
3195 (DataTable.RowOrdinalToId): New methods to convert between row ids
3196 and row ordinals.
3197 (TableGrid.SelectRowById): New method to select a row based on its
3198 ID as opposed to its ordinal
3199 (DataTable.GetValue, TableGrid.OnRangeSelect)
3200 (TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
3201 (QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
3202 (LayerTableFrame.__init__): Convert between row ids and row
3203 ordinals as appropriate
3204
3205 * test/postgissupport.py (PostGISDatabase.__init__): Add
3206 doc-string.
3207 (PostGISDatabase.initdb): The optional third item in a tuple in
3208 tables is now a (key, value) list with additional arguments to
3209 pass to upload_shapefile
3210 (upload_shapefile): New parameter gid_offset to allow gids that
3211 are not the same as the shapeids in the shapefile
3212 (PostgreSQLServer.get_default_static_data_db): Use the new
3213 gid_offset to make the gids in landmarks 1000 higher than the
3214 shapeids in the shapefile
3215
3216 * test/test_viewport.py
3217 (TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
3218 new shapeids in the landmarks table
3219
3220 * test/test_transientdb.py
3221 (TestTransientTable.run_iceland_political_tests)
3222 (TestTransientTable.test_transient_joined_table): Add tests for
3223 the new table methods and new keywords arguments.
3224
3225 * test/test_postgis_db.py
3226 (TestPostGISTable.test_read_row_as_dict_row_count_mode)
3227 (TestPostGISTable.test_read_value_row_count_mode)
3228 (TestPostGISTable.test_row_id_to_ordinal)
3229 (TestPostGISTable.test_row_oridnal_to_id): New test for the new
3230 table methods and the new arguments
3231 (TestPostGISShapestorePoint.test_shapes_in_region)
3232 (TestPostGISShapestorePoint.test_shape_raw_data)
3233 (TestPostGISShapestorePoint.test_shape_points)
3234 (TestPostGISShapestorePoint.test_shape_shapeid)
3235 (TestPostGISShapestorePoint.test_all_shapes)
3236 (TestPostGISTable.test_simple_query)
3237 (TestPostGISTable.test_simple_query)
3238 (TestPostGISTable.test_simple_query)
3239 (TestPostGISTable.test_read_value)
3240 (TestPostGISTable.test_read_row_as_dict): Adapt to the new
3241 shapeids in the landmarks table
3242
3243 * test/test_memory_table.py
3244 (TestMemoryTable.test_read_row_as_dict_row_count_mode)
3245 (TestMemoryTable.test_read_value_row_count_mode)
3246 (TestMemoryTable.test_row_id_to_ordinal)
3247 (TestMemoryTable.test_row_oridnal_to_id): New test for the new
3248 table methods and the new arguments
3249
3250 * test/test_dbf_table.py
3251 (TestDBFTable.test_read_row_as_dict_row_count_mode)
3252 (TestDBFTable.test_read_value_row_count_mode)
3253 (TestDBFTable.test_row_id_to_ordinal)
3254 (TestDBFTable.test_row_oridnal_to_id): New test for the new table
3255 methods and the new arguments
3256
3257 2003-08-26 Bernhard Herzog <[email protected]>
3258
3259 * Thuban/Model/postgisdb.py (PostGISShapeStore.BoundingBox): Use a
3260 more postgis specific but much faster method to get the bounding
3261 box
3262
3263 2003-08-26 Bernhard Herzog <[email protected]>
3264
3265 * Thuban/Model/postgisdb.py (PostGISTable.Title)
3266 (PostGISShapeStore.AllShapes): Add these missing methods.
3267 (PostGISShapeStore.ShapesInRegion): No need to raise
3268 StopIteration. We can simply return
3269
3270 * test/test_postgis_db.py (TestPostGISTable.test_title)
3271 (TestPostGISShapestorePoint.test_all_shapes): New tests for the
3272 new methods
3273
3274 2003-08-25 Bernhard Herzog <[email protected]>
3275
3276 * Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON.
3277
3278 * test/test_postgis_db.py (PolygonTests): New class containing
3279 those tests from TestPostGISShapestorePolygon that can also be
3280 used to test MUTLIPOLYGON tables
3281 (TestPostGISShapestorePolygon): Most tests are now in PolygonTests
3282 so derive from that
3283 (TestPostGISShapestoreMultiPolygon): New class with tests for
3284 MUTLIPOLYGON tables
3285
3286 * test/postgissupport.py (PostGISDatabase.initdb): Allow the
3287 tables argument to have tuples with three items to override the
3288 WKT type used.
3289 (PostgreSQLServer.get_default_static_data_db): Use the above to
3290 create a polygon table with MUTLIPOLYGONs
3291 (point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon)
3292 (arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to
3293 coords_to*
3294 (coords_to_multipolygon): New. Convert to MUTLIPOLYGON
3295 (wkt_converter): New. Map WKT types to converters
3296 (upload_shapefile): New parameter force_wkt_type to use a
3297 different WKT type than the default
3298
3299 2003-08-25 Bernhard Herzog <[email protected]>
3300
3301 * Thuban/UI/application.py
3302 (ThubanApplication.run_db_param_dialog): New. Suitable as a
3303 db_connection_callback. Main difference is that the dialog run
3304 from this method doesn't have a parent so it can be used even when
3305 there is no main window
3306 (ThubanApplication.OpenSession): Use self.run_db_param_dialog if
3307 no db_connection_callback was given. This way the dialog pops up
3308 even when the .thuban file was given as a command line parameter.
3309
3310 2003-08-25 Bernhard Herzog <[email protected]>
3311
3312 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse
3313 before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs
3314 which leads to an effectively frozen X session because the user
3315 can only interact with the dialog but the mouse is still grabbed
3316 by the canvas.
3317 Also, call the tool's Hide method before MouseLeftUp because
3318 MouseLeftUp may change the tool's coordinates.
3319
3320 2003-08-25 Bernhard Herzog <[email protected]>
3321
3322 * Thuban/UI/application.py (ThubanApplication.OpenSession): Catch
3323 LoadCancelled exceptions and handle them by returning immediately.
3324
3325 2003-08-25 Bernhard Herzog <[email protected]>
3326
3327 GUI part of loading sessions with postgis connections which may
3328 require user interaction to get passwords or updated parameters
3329
3330 * Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a
3331 bit nucer and be more generic.
3332 (DBFrame.OnAdd): Adapt to new DBDialog interface
3333
3334 * Thuban/UI/application.py (ThubanApplication.OpenSession): New
3335 optional parameter db_connection_callback which is passed to
3336 load_session.
3337
3338 * Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New.
3339 Suitable as a db_connection_callback
3340 (MainWindow.OpenSession): Use self.run_db_param_dialog as the
3341 db_connection_callback of the application's OpenSession method
3342
3343
3344 2003-08-25 Bernhard Herzog <[email protected]>
3345
3346 Basic loading of sessions containing postgis connections:
3347
3348 * Thuban/Model/load.py (LoadError): Add doc-string
3349 (LoadCancelled): New exception class to indicate a cancelled load
3350 (SessionLoader.__init__): Add the db_connection_callback parameter
3351 which will be used by the loader to get updated parameters and a
3352 password for a database connection
3353 (SessionLoader.__init__): Add the new XML elements to the
3354 dispatchers dictionary
3355 (SessionLoader.check_attrs): Two new conversions, ascii to convert
3356 to a byte-string object and idref as a generic id reference
3357 (SessionLoader.start_dbconnection)
3358 (SessionLoader.start_dbshapesource): New. Handlers for the new XML
3359 elements
3360 (load_session): Add the db_connection_callback to pass through the
3361 SessionLoader
3362
3363 * test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword):
3364 New classes to test loading of sessions with postgis database
3365 connections.
3366
3367 2003-08-25 Bernhard Herzog <[email protected]>
3368
3369 * Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and
3370 replace it and the comment with __BuildDate__ by the Source: and
3371 Id: cvs keywords as used in the other files.
3372
3373 2003-08-25 Bernhard Herzog <[email protected]>
3374
3375 * Thuban/Model/load.py (SessionLoader.check_attrs): Raise a
3376 LoadError when a required attribute is missing. The code used to
3377 be commented out for some reason, but probably should have been
3378 active.
3379
3380 * test/test_load.py (TestLoadError.test): Test the message in the
3381 LoadError too to make sure it really is about the missing
3382 attribute
3383
3384 2003-08-22 Bernhard Herzog <[email protected]>
3385
3386 * test/test_save.py (SaveSessionTest.test_dbf_table)
3387 (SaveSessionTest.test_joined_table): Add XML validation tests.
3388
3389 2003-08-22 Bernhard Herzog <[email protected]>
3390
3391 Implement saving a session with a postgis connection
3392
3393 * Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New
3394 elements for database connections and shapestores using db
3395 connections
3396 (session): Add the dbconnections to the content model
3397
3398 * Thuban/Model/save.py (SessionSaver.write_db_connections): New.
3399 Write the db connections
3400 (SessionSaver.write_session): Call write_db_connections to write
3401 the connection before the data sources
3402 (SessionSaver.write_data_containers): Handle postgis shapestores
3403
3404 * test/test_save.py (SaveSessionTest.thubanids)
3405 (SaveSessionTest.thubanidrefs): Update for new DTD
3406 (SaveSessionTest.test_save_postgis): New. Test saving a session
3407 with postgis connections
3408
3409 * Thuban/Model/postgisdb.py (PostGISTable.DBConnection)
3410 (PostGISTable.TableName): New accessor methods for the connection
3411 and table name
3412
3413 * test/test_postgis_db.py (TestPostGISTable.test_dbconn)
3414 (TestPostGISTable.test_dbname): New methods to test the new
3415 PostGISConnection methods
3416
3417 2003-08-22 Bernhard Herzog <[email protected]>
3418
3419 * Thuban/Model/postgisdb.py (ConnectionError): New exception class
3420 for exceptions occurring when establishing a Database connection
3421 (PostGISConnection.connect): Catch psycopg.OperationalError during
3422 connects and raise ConnectionError.
3423
3424 * test/test_postgis_db.py (TestPostgisDBExceptions): New class for
3425 tests for database exceptions
3426
3427 2003-08-22 Bernhard Herzog <[email protected]>
3428
3429 Prepare the test suite for tests with required authentication
3430
3431 * test/postgissupport.py (PostgreSQLServer.__init__): Add instance
3432 variables with two predefined users/passwords, one for the admin
3433 and one for a non-privileged user.
3434 (PostgreSQLServer.createdb): Pass the admin name to initdb and add
3435 the non-privileged user to the database and set the admin password
3436 (PostgreSQLServer.wait_for_postmaster): Use the admin user name.
3437 Better error reporting
3438 (PostgreSQLServer.connection_params)
3439 (PostgreSQLServer.connection_string): New methods to return
3440 information about how to connect to the server
3441 (PostgreSQLServer.execute_sql): New. Convenience method to execute
3442 SQL statements
3443 (PostgreSQLServer.require_authentication): Toggle whether the
3444 server requires authentication
3445 (PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New.
3446 Add or alter users
3447 (PostGISDatabase.initdb): Pass the admin name one the
3448 subprocesses' command lines. Grant select rights on
3449 geometry_columns to everybody.
3450 (upload_shapefile): Use the admin name and password when
3451 connecting. Grant select rights on the new table to everybody.
3452
3453 * test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the
3454 server's new methods to get the connection parameters.
3455
3456 * test/test_postgis_session.py (TestSessionWithPostGIS.setUp)
3457 (TestSessionWithPostGIS.test_remove_dbconn_exception): Use the
3458 server's new methods to get the connection parameters.
3459
3460 * test/test_postgis_db.py
3461 (TestPostGISConnection.test_gis_tables_empty)
3462 (TestPostGISConnection.test_gis_tables_non_empty)
3463 (PostGISStaticTests.setUp): Use the server's new methods to get
3464 the connection parameters.
3465
3466 2003-08-22 Bernhard Herzog <[email protected]>
3467
3468 * Thuban/UI/about.py (About.__init__): Add the psycopg version.
3469
3470 * Thuban/version.py: Add psycopg version
3471
3472 * Thuban/Model/postgisdb.py (psycopg_version): New. Return the
3473 version of the psycopg module
3474
3475 2003-08-22 Bernhard Herzog <[email protected]>
3476
3477 * Thuban/UI/dbdialog.py (DBPwdDlg): Removed because it's not used.
3478 (DBFrame.OnEdit): Removed because it's not used and wouldn't work
3479 at the moment. The functionality should probably be implemented
3480 some time, though.
3481 (DBFrame.OnRemove): Display a message if the connection can't be
3482 removed because it's still in use.
3483
3484 2003-08-22 Jan-Oliver Wagner <[email protected]>
3485
3486 * Thuban/UI/about.py (About.__init__): split up the huge about
3487 text into elements/lists for easier translation. This fixes bug
3488 https://intevation.de/rt/webrt?serial_num=2058
3489 Also, made some forgotten string available for the i18n.
3490
3491 2003-08-21 Bernhard Herzog <[email protected]>
3492
3493 Make postgis support really optional including insensitive menu
3494 items.
3495
3496 * Thuban/Model/postgisdb.py (has_postgis_support): New. Return
3497 whether the postgis is supported.
3498
3499 * Thuban/UI/dbdialog.py: Put the psycopg import into try..except
3500 to make postgis support optional
3501
3502 * Thuban/UI/mainwindow.py (_has_postgis_support): New. Context
3503 version of Thuban.Model.postgisdb.has_postgis_support
3504 (database_management command): Make it only sensitive if postgis
3505 is supported.
3506
3507 2003-08-21 Jan-Oliver Wagner <[email protected]>
3508
3509 * Doc/manual/thuban-manual.xml: Added CVS revision for rev-history.
3510 (section Adding and Removing Layers): Added text and described
3511 multi-selection.
3512 (chapter Extensions): New.
3513
3514 2003-08-21 Jan-Oliver Wagner <[email protected]>
3515
3516 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Changed dialog
3517 settings to allow multiple files to load into the map.
3518 Also reduced selection to *.shp as a default.
3519
3520 2003-08-20 Bernhard Herzog <[email protected]>
3521
3522 Add dialogs and commands to open database connections and add
3523 database layers.
3524
3525 * Thuban/UI/mainwindow.py (MainWindow.DatabaseManagement): New
3526 method to open the database connection management dialog
3527 (MainWindow.AddDBLayer): New method to add a layer from a database
3528 (_has_dbconnections): New helper function to use for sensitivity
3529 (database_management command, layer_add_db command): New commands
3530 that call the above new methods.
3531 (main_menu): Add the new commands to the menu.
3532
3533 * Thuban/Model/postgisdb.py (PostGISConnection.__init__)
3534 (PostGISConnection.connect): Establish the actual connection in a
3535 separate method and call it in __init__. This makes it easier to
3536 override the behavior in test cases
3537 (PostGISConnection.BriefDescription): New method to return a brief
3538 description for use in dialogs.
3539
3540 * test/test_postgis_db.py (NonConnection): DB connection that
3541 doesn't actually connect
3542 (TestBriefDescription): New class with tests for the new
3543 BriefDescription method
3544
3545 2003-08-19 Jan-Oliver Wagner <[email protected]>
3546
3547 Moved anything from extensions to libraries.
3548
3549 * libraries: New.
3550
3551 * libraries/ pyprojection, pyshapelib, shapelib, thuban: New.
3552
3553 * libraries/pyprojection/ LICENSE, MANIFEST.in, Projection.i,
3554 Projection.py, Projection_wrap.c, setup.py, swighelp.txt: These files have
3555 been moved here from thuban/extensions/pyprojection/
3556 See there in the Attic for the older history.
3557
3558 * libraries/pyshapelib/ COPYING, ChangeLog, NEWS, README, dbflib.i,
3559 dbflib.py, dbflib_wrap.c, pyshapelib_api.h, pytest.py, setup.py,
3560 shapelib.i, shapelib.py, shapelib_wrap.c, shptreemodule.c: These files
3561 have been moved here from thuban/extensions/pyshapelib/
3562 See there in the Attic for the older history.
3563
3564 * libraries/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: These
3565 files have been moved here from thuban/extensions/shapelib/
3566 See there in the Attic for the older history.
3567
3568 * libraries/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
3569 gdalwarp.cpp, wxproj.cpp: These files have been moved here from
3570 thuban/extensions/thuban/
3571 See there in the Attic for the older history.
3572
3573 * MANIFEST.in, setup.cfg, setup.py: renamed extensions to libraries.
3574
3575 * extensions/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
3576 gdalwarp.cpp, wxproj.cpp: Moved to libraries/thuban.
3577
3578 * extensions/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c:
3579 Moved to libraries/shapelib.
3580
3581 * extensions/pyshapelib/ COPYING, NEWS, dbflib.py, pytest.py,
3582 shapelib.py, README, dbflib_wrap.c, setup.py, shapelib_wrap.c,
3583 ChangeLog, dbflib.i, pyshapelib_api.h, shapelib.i, shptreemodule.c:
3584 Moved to libraries/pyshapelib.
3585
3586 * extensions/pyprojection/ MANIFEST.in, Projection.py, setup.py,
3587 LICENSE, Projection.i, Projection_wrap.c, swighelp.txt:
3588 Moved to libraries/pyprojection.
3589
3590 * extensions/ pyprojection, pyshapelib, shapelib, thuban: Removed.
3591
3592 * extensions: Removed.
3593
3594 2003-08-19 Bernhard Herzog <[email protected]>
3595
3596 * test/test_viewport.py (ViewPortTest): We don't use the
3597 facilities of FileTestMixin so don't derive from it.
3598 (TestViewportWithPostGIS): New class with tests for using a
3599 viewport on a map with postgis layers.
3600
3601 2003-08-19 Bernhard Herzog <[email protected]>
3602
3603 Add the db connection management to the session.
3604
3605 * Thuban/Model/session.py (Session.__init__): New instance
3606 variable db_connections
3607 (Session.AddDBConnection, Session.DBConnections)
3608 (Session.HasDBConnections, Session.CanRemoveDBConnection)
3609 (Session.RemoveDBConnection): New methods to manage and query the
3610 db connections managed by the session
3611 (Session.OpenDBShapeStore): New method to open a shapestore from a
3612 db connection
3613
3614 * Thuban/Model/messages.py (DBCONN_REMOVED, DBCONN_ADDED): New
3615 messages for the db connection handling in the session
3616
3617 * test/test_postgis_session.py: New. test cases for the session's
3618 db connection handling with postgis connections
3619
3620 2003-08-19 Bernhard Herzog <[email protected]>
3621
3622 Add very basic postgis database support and the corresponding test
3623 cases. The test cases require a PostgreSQL + postgis installation
3624 but no existing database. The database will be created
3625 automatically by the test cases
3626
3627 * test/README: Add note about skipped tests and the requirements
3628 of the postgis tests.
3629
3630 * Thuban/Model/postgisdb.py: New. Basic postgis database support.
3631
3632 * test/test_postgis_db.py: New. Test cases for the postgis
3633 support.
3634
3635 * Thuban/Model/wellknowntext.py: New. Parser for well-known-text
3636 format
3637
3638 * test/test_wellknowntext.py: New. Test cases for the
3639 wellknowntext parser
3640
3641 * test/postgissupport.py: New. Support module for tests involving
3642 a postgis database.
3643
3644 * test/support.py (execute_as_testsuite): Shut down the postmaster
3645 if it's still running after the tests
3646
3647 * Thuban/Model/data.py (RAW_WKT): New constant for raw data in
3648 well known text format
3649
3650 2003-08-19 Jan-Oliver Wagner <[email protected]>
3651
3652 * Examples/simple_extensions/hello_world.py: New. Raises a Hello World
3653 message dialog.
3654
3655 2003-08-18 Bernhard Herzog <[email protected]>
3656
3657 * test/support.py (ThubanTestResult.printErrors): Indent the
3658 reason for the skips in the output to make it a bit more readable.
3659 (execute_as_testsuite): New helper function to run a test suite
3660 and print some more information.
3661 (run_tests): Use execute_as_testsuite to run the tests
3662
3663 * test/runtests.py (main): Use execute_as_testsuite to run the
3664 tests
3665
3666 2003-08-18 Bernhard Herzog <[email protected]>
3667
3668 Fix some bugs in Thuban and the test suite that were uncovered by
3669 changes introduced in Python 2.3:
3670
3671 * Thuban/Model/table.py (DBFTable.__init__): Make sure the
3672 filename is an absolute name
3673
3674 * Thuban/Model/layer.py (RasterLayer.__init__): Make sure the
3675 filename is an absolute name
3676
3677 * test/test_save.py (SaveSessionTest.testRasterLayer): Use a
3678 unique filename to save to and use the correct relative filename
3679 in the expected output.
3680 (SaveSessionTest.test_dbf_table): Use the correct relative
3681 filename in the expected output.
3682
3683 * test/test_layer.py (TestLayer.test_raster_layer): Update the
3684 test to check whether the filename is absolute.
3685
3686 2003-08-18 Jan-Oliver Wagner <[email protected]>
3687
3688 * Thuban/UI/about.py (About.__init__): Added Silke Reimer.
3689
3690 2003-08-15 Bernhard Herzog <[email protected]>
3691
3692 Change the way shapes are returned by a shape store. The
3693 ShapesInRegion method returns an iterator over actual shape
3694 objects instead of a list of shape ids.
3695
3696 * Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
3697 id.
3698 (ShapefileStore.ShapesInRegion): Return an iterator over the
3699 shapes which yields shape objects instead of returning a list of
3700 shape ids
3701 (ShapefileStore.AllShapes): New. Return an iterator over all
3702 shapes in the shape store
3703 (DerivedShapeStore.AllShapes): New. Like in ShapefileStore
3704
3705 * Thuban/Model/layer.py (Layer.ShapesInRegion): Update
3706 doc-string.
3707
3708 * Thuban/UI/baserenderer.py
3709 (BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
3710 layer_shapes and make it return an iterator containg shapes
3711 instead of a list of ids.
3712 (BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
3713 layer_shapes() change
3714
3715 * Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
3716 (ScreenRenderer.layer_shapes): Rename as in BaseRenderer
3717
3718 * Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
3719 changes in the ShapesInRegion return value.
3720 (ViewPort._get_hit_tester): Remove commented out code
3721
3722 * test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
3723 new return value.
3724 (SimpleShapeStore.AllShapes): New. Implement this method too.
3725
3726 * test/test_layer.py (TestLayer.test_arc_layer)
3727 (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
3728 (TestLayer.test_point_layer_with_projection)
3729 (TestLayer.test_derived_store): Adapt to changes in the
3730 ShapesInRegion return value.
3731
3732 * test/test_shapefilestore.py
3733 (TestShapefileStoreArc.test_shapes_in_region)
3734 (TestShapefileStorePolygon.test_shapes_in_region)
3735 (TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
3736 in the ShapesInRegion return value.
3737 (TestShapefileStorePoint.test_all_shapes)
3738 (TestShapefileStoreArc.test_shape_shapeid): New tests for the new
3739 methods
3740
3741 * test/test_derivedshapestore.py
3742 (TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
3743 the ShapesInRegion return value.
3744 (TestDerivedShapeStore.test_all_shapes)
3745 (TestDerivedShapeStore.test_shape_shapeid): New tests for the new
3746 methods
3747
3748 2003-08-15 Bernhard Herzog <[email protected]>
3749
3750 Make the renderers deal correctly with raw vs. python level
3751 representation of shape geometries
3752
3753 * Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer):
3754 Return a flag useraw in addition to the callable and the parameter
3755 to indicate whether the callable can deal with the raw shape data
3756 or uses the higher level python lists of coordinates. The callable
3757 now should accept either the raw data or the return value of the
3758 shape's Points() method.
3759 (BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer
3760 change
3761 (BaseRenderer.projected_points): Instead of the shape id use the
3762 points list as parameter.
3763 (BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape)
3764 (BaseRenderer.draw_point_shape): Adapt to projected_points()
3765 change and accept the points list as parameter instead of the
3766 shape id.
3767
3768 * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return
3769 the useraw flag as required by the BaseRenderer
3770 (ScreenRenderer.draw_shape_layer): Adapt to low-level renderer
3771 changes.
3772
3773 * test/test_baserenderer.py
3774 (TestBaseRenderer.test_point_with_classification): New test for
3775 rendering a map with classifications.
3776
3777 2003-08-15 Bernhard Herzog <[email protected]>
3778
3779 * Thuban/UI/viewport.py (ViewPort.find_shape_at)
3780 (ViewPort._find_shape_in_layer, ViewPort._find_shape_in_layer)
3781 (ViewPort._get_hit_tester, ViewPort.projected_points)
3782 (ViewPort._hit_point, ViewPort._hit_arc, ViewPort._hit_polygon)
3783 (ViewPort._find_label_at): Split the find_shape_at method into
3784 several new methods and use the functions in the hit-test module.
3785
3786 * Thuban/UI/hittest.py: New module with Python-level hit-testing
3787 functions
3788
3789 * test/test_hittest.py: New. Test for the new hittest module
3790
3791 2003-08-15 Bernhard Herzog <[email protected]>
3792
3793 * Thuban/Model/layer.py (Layer.ShapesInRegion): Apply the layer
3794 projection to all corners of the bounding box to get a better
3795 approximation of the projected bounding box
3796
3797 * test/test_layer.py (TestLayer.test_point_layer_with_projection):
3798 New. Test coordinate handling of a layer with a projection.
3799 Catches the bug fixed in Layer.ShapesInRegion
3800
3801 2003-08-15 Bernhard Herzog <[email protected]>
3802
3803 Move some of the mock objects in test_baserenderer into their own
3804 module so they can easily be used from other tests
3805
3806 * test/mockgeo.py: New test helper module with some mock objects
3807 for geometry related things like shapes, shapestores and
3808 projections.
3809
3810 * test/test_mockgeo.py: New. Tests for the new helper module
3811
3812 * test/test_baserenderer.py: Some of the mock-objects are in
3813 mockgeo now.
3814
3815 2003-08-12 Jan-Oliver Wagner <[email protected]>
3816
3817 * Thuban/UI/about.py (About.__init__): Added Björn Broscheit.
3818
3819 2003-08-12 Bernhard Herzog <[email protected]>
3820
3821 * po/de.po: New. German translations by Bjoern Broscheit
3822
3823 2003-08-12 Bernhard Herzog <[email protected]>
3824
3825 * Thuban/UI/projdialog.py (UnknownProjPanel._DoLayout): Translated
3826 strings have to be one string literal.
3827
3828 2003-08-11 Bernhard Herzog <[email protected]>
3829
3830 * test/support.py (FloatComparisonMixin.assertPointListEquals):
3831 New. This method was used in various derived classes, but it's
3832 better to have it here.
3833
3834 * test/test_shapefilestore.py
3835 (ShapefileStoreTests.assertPointListEquals): Removed. It's now in
3836 FloatComparisonMixin
3837
3838 * test/test_layer.py (TestLayer.assertPointListEquals): Removed.
3839 It's now in FloatComparisonMixin
3840
3841 * test/test_derivedshapestore.py
3842 (TestDerivedShapeStore.assertPointListEquals): Removed. It's now
3843 in FloatComparisonMixin
3844
3845 2003-08-11 Bernhard Herzog <[email protected]>
3846
3847 * Thuban/UI/join.py (JoinDialog.OnJoin): Add missing space to
3848 error message
3849
3850 2003-08-08 Jan-Oliver Wagner <[email protected]>
3851
3852 * Doc/manual/thuban-manual.xml: Now use authorgroup. Added revhistory
3853 with version number.
3854 Changed title to reflect version number of Thuban.
3855
3856 2003-08-08 Jan-Oliver Wagner <[email protected]>
3857
3858 * Thuban/UI/about.py (About.__init__): Reworked the hall of fame. Now
3859 the list corresponds to the "About" web page.
3860
3861 2003-08-08 Bernhard Herzog <[email protected]>
3862
3863 * Thuban/UI/projdialog.py (UTMProposeZoneDialog.dialogLayout):
3864 Make sure translated strings are recognized as one string literal.
3865
3866 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog.dialogLayout):
3867 Make sure translated strings are recognized as one string literal.
3868
3869 * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Make sure
3870 translated strings are recognized as one string literal.
3871
3872 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
3873 sure translated strings are recognized as one string literal.
3874
3875 2003-08-07 Bernhard Herzog <[email protected]>
3876
3877 * Thuban/Model/data.py (DerivedShapeStore.RawShapeFormat): New.
3878 Simply delegates to the original shapestore.
3879
3880 * test/test_derivedshapestore.py
3881 (TestDerivedShapeStore.test_raw_format): New. Test case for
3882 DerivedShapeStore.RawShapeFormat
3883
3884 2003-08-07 Bernhard Herzog <[email protected]>
3885
3886 Add raw data interface to shape objects.
3887
3888 * Thuban/Model/data.py (ShapefileShape, Shape): Rname the shape
3889 class to ShapefileShape which now holds shapefile specific
3890 information.
3891 (ShapefileShape.compute_bbox): Simplified to not cache any
3892 information. The way this method is used that shouldn't matter
3893 performance wise.
3894 (ShapefileShape.RawData): New. Return the shapeid which is the raw
3895 data format for shapes from shapefiles.
3896 (ShapefileStore.RawShapeFormat): New. Return the raw datatype used
3897 in the shape objects returned by a shapestore. For a
3898 ShapefileStore this is always RAW_SHAPEFILE.
3899 (RAW_PYTHON, RAW_SHAPEFILE): Constants for the RawShapeFormat
3900 method.
3901
3902 * test/test_shapefilestore.py
3903 (TestShapefileStore.test_raw_format): New test to test the raw
3904 format feature of shapes.
3905
3906 * Thuban/Model/layer.py: Remove the unused import of Shape from
3907 data. It was only there for interface compatibility but it's not
3908 used inside of Thuban and the generic Shape class has gone away.
3909
3910 * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Check
3911 the raw data format and only use an optimized version of its a
3912 shapefile.
3913
3914 2003-08-07 Bernhard Herzog <[email protected]>
3915
3916 * test/test_baserenderer.py (SimpleShape): Shape class for the
3917 tests.
3918 (SimpleShapeStore.Shape): Use SimpleShape instead of
3919 Thuban.Model.data.Shape to make the tests independed of the coming
3920 changes.
3921
3922 2003-08-07 Bernhard Herzog <[email protected]>
3923
3924 * test/support.py (SkipTest, ThubanTestResult, ThubanTestRunner)
3925 (ThubanTestProgram): New classes that extend the respective
3926 classes from unittest. These new version support skipping tests
3927 under certain expected conditions. In the Thuban test suite we
3928 uses this for tests that require the optional gdal support.
3929 (run_tests): Use ThubanTestProgram instead of the unittest.main()
3930
3931 * test/runtests.py (main): Use the new ThubanTestRunner instead of
3932 the normal one from unittest
3933
3934 * test/test_layer.py (TestLayer.test_raster_layer): If this test
3935 is not run because gdal support isn't available report this to the
3936 runner.
3937
3938 * test/test_baserenderer.py
3939 (TestBaseRenderer.test_raster_no_projection): Do not run this test
3940 if gdal support isn't available and report this to the runner.
3941
3942 2003-08-06 Bernhard Herzog <[email protected]>
3943
3944 Rearrange the renderers a bit, partly in preparation for changes
3945 required for the postgis merge, partly to make it more testable.
3946 Also make the representation of coordinates in Shapes more
3947 consistent.
3948
3949 * Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
3950 this class is now in BaseRenderer. This class is now practically
3951 only a specialization of BaseRenderer for rendering to an actual
3952 wx DC.
3953 (ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
3954 to get the shapetype specific rendering functions.
3955
3956 * Thuban/UI/baserenderer.py: New file with the basic rendering
3957 logic. The code in this file is completely independend of wx.
3958 (BaseRenderer): Class with the basic rendering logic
3959
3960 * test/test_baserenderer.py: New. Test cases for BaseRenderer
3961
3962 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
3963 error_on_redraw to guard agains endless loops and stack overflows
3964 when there's a bug in the rendering code that raises exceptions.
3965 (MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
3966 rendering into a separate method _do_redraw so that error handling
3967 is a bit easier. When an exception occurs, set error_on_redraw to
3968 true. When it's true on entry to OnIdle do nothing and return
3969 immediately.
3970
3971 * Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a
3972 Shape object will always have the coordinates as a list of list of
3973 coordinate pairs (tuples).
3974 (Shape.compute_bbox): Adapt to new representation.
3975
3976 * Thuban/UI/viewport.py (ViewPort.find_shape_at)
3977 (ViewPort.LabelShapeAt): Adapt to new coordinate representation in
3978 Shape objects.
3979
3980 * test/test_shapefilestore.py
3981 (ShapefileStoreTests.assertFloatTuplesEqual)
3982 (ShapefileStoreTests.assertPointListEquals): Rename to
3983 assertPointListEquals and change purpose to checking equality of
3984 the lists returned by Shape.Points().
3985 (TestShapefileStoreArc.test_shape)
3986 (TestShapefileStorePolygon.test_shape)
3987 (TestShapefileStorePoint.test_shape): Use the new
3988 assertPointListEquals instead of assertFloatTuplesEqual
3989
3990 * test/test_layer.py (TestLayer.assertFloatTuplesEqual)
3991 (TestLayer.assertPointListEquals): Rename to assertPointListEquals
3992 and change purpose to checking equality of the lists returned by
3993 Shape.Points().
3994 (TestLayer.test_arc_layer, TestLayer.test_arc_layer)
3995 (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
3996 (TestLayer.test_derived_store): Use the new assertPointListEquals
3997 instead of assertFloatTuplesEqual
3998
3999 * test/test_derivedshapestore.py
4000 (TestDerivedShapeStore.assertFloatTuplesEqual)
4001 (TestDerivedShapeStore.assertPointListEquals): Rename to
4002 assertPointListEquals and change purpose to checking equality of
4003 the lists returned by Shape.Points().
4004 (TestDerivedShapeStore.test_shape): Use the new
4005 assertPointListEquals instead of assertFloatTuplesEqual
4006
4007 2003-08-06 Jan-Oliver Wagner <[email protected]>
4008
4009 * Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for
4010 a bounding box. A dialog is raised in case, no bounding box
4011 is found. This fixes bug #2043:
4012 https://intevation.de/rt/webrt?serial_num=2043
4013
4014 2003-08-05 Bernhard Herzog <[email protected]>
4015
4016 * Thuban/Model/color.py (Color.__repr__): Make the repr of a color
4017 object look like a Color instantiation. Formerly it looked like a
4018 tuple.
4019
4020 * test/test_color.py (TestColor.test_repr)
4021 (TestColor.test_equality, TestColor.test_inequality): New. test
4022 some more apects of the Color class
4023 (TestTransparent.test_repr, TestTransparent.test_hex)
4024 (TestTransparent.test_equality): New. Test cases for the
4025 Transparent object.
4026
4027 2003-08-04 Jan-Oliver Wagner <[email protected]>
4028
4029 * Doc/manual/thuban-manual.xml: a number of small improvements.
4030 The resulting file is the version submitted for GREAT-ER II.
4031
4032 2003-08-01 Bernhard Herzog <[email protected]>
4033
4034 * Thuban/UI/resource.py, Thuban/UI/projdialog.py,
4035 Thuban/UI/join.py, Thuban/UI/classgen.py, Thuban/UI/about.py,
4036 Thuban/Model/resource.py: Insert cvs keywords and doc-strings.
4037
4038 * Thuban/UI/common.py: Insert cvs keywords and doc-strings.
4039 (Color2wxColour, wxColour2Color, ThubanBeginBusyCursor)
4040 (ThubanEndBusyCursor): Add doc-strings
4041
4042 2003-08-01 Bernhard Herzog <[email protected]>
4043
4044 First step towards PostGIS integration. More abstraction by movin
4045 more code from the layer to the shapestore. More methods of the
4046 layer are now simply delegated to the equivalent method of the
4047 shapestore. The SHAPETYPE_* constants are now in data not in
4048 layer.
4049
4050 * Thuban/Model/data.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
4051 (SHAPETYPE_POINT, Shape): Move these constants and classes from
4052 layer.py to data.py
4053 (ShapefileStore.__init__): More Initialization for the new methods
4054 and functionality.
4055 (ShapefileStore.ShapeType, ShapefileStore.NumShapes)
4056 (ShapefileStore.BoundingBox, ShapefileStore.ShapesInRegion)
4057 (ShapefileStore.Shape): New methods that were formerly implemented
4058 in the layer.
4059 (DerivedShapeStore.Shape, DerivedShapeStore.ShapesInRegion)
4060 (DerivedShapeStore.ShapeType, DerivedShapeStore.NumShapes)
4061 (DerivedShapeStore.BoundingBox): New. DerivedShapeStore
4062 equivalents of the new shape methods. These versions are simply
4063 delegated to the original shapstore.
4064
4065 * Thuban/Model/layer.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
4066 (SHAPETYPE_POINT, Shape): Removed. They're now in data.py
4067 (Layer.SetShapeStore): Removed the initializatin of instance
4068 variables that were needed for the stuff that's now in
4069 ShapefileStore
4070 (Layer.BoundingBox, Layer.NumShapes, Layer.ShapeType)
4071 (Layer.Shape, Layer.ShapesInRegion): Simply delegate to the
4072 shapestore.
4073
4074 * Thuban/UI/classifier.py, Thuban/UI/renderer.py,
4075 Thuban/UI/viewport.py: Import the SHAPETYPE_* constants from data
4076 instead of layer.
4077
4078 * test/test_shapefilestore.py: New. Tests for ShapefileStore.
4079
4080 * test/test_derivedshapestore.py: New. Tests for DerivedShapeStore.
4081
4082 * test/test_layer.py: Import the SHAPETYPE_* constants from data
4083 instead of layer.
4084 (TestLayer.test_derived_store): Remove the test for the exception
4085 when instantiating the DerivedShapeStore with an incompatible
4086 table which is now in test_derivedshapestore.py. Add some more
4087 tests of the layer methods to determine whether they work for a
4088 DerivedShapeStore as well.
4089
4090 2003-07-31 Jonathan Coles <[email protected]>
4091
4092 * Doc/manual/thuban-manual.xml: Fix the list of required packages
4093 by just listing the name and where they can be found.
4094
4095 2003-07-31 Frank Koormann <[email protected]>
4096
4097 * Doc/manual/thuban-manual.xml:
4098 Changed the screenshot elements to figure.
4099 Changed some variablelist elements to itemizedlist.
4100 Added section on GDAL formats.
4101
4102 2003-07-31 Jonathan Coles <[email protected]>
4103
4104 * Doc/manual/thuban-manual.xml: Added a few sentences about
4105 the Fix Border Color option when generating classes.
4106
4107 2003-07-30 Jonathan Coles <[email protected]>
4108
4109 * Thuban/Model/classgen.py: Add docstrings. Rename specific
4110 Ramp instances to use lower_case_style.
4111
4112 * Thuban/UI/classgen.py: Use renamed Ramp instances.
4113
4114 * Thuban/UI/classifier.py: Add docstrings.
4115
4116 * Thuban/UI/dock.py: Add docstrings.
4117
4118 * test/test_classgen.py: Use renamed Ramp instances.
4119
4120 2003-07-30 Bernhard Herzog <[email protected]>
4121
4122 * Thuban/Lib/connector.py (QueueingPublisher): Removed. This class
4123 was never used in Thuban.
4124
4125 2003-07-30 Bernhard Herzog <[email protected]>
4126
4127 * Thuban/UI/join.py (JoinDialog.__init__): Use the table's Title()
4128 method directly instead of going through the transient_table
4129 method. This faster because transient_table may force the copy of
4130 a DBF file into the transient database and setting a table's title
4131 doesnm't affect the title of the associated transient table, so
4132 this fixes RT #2042
4133
4134 * Thuban/UI/main.py (__version__): Don't import the already
4135 removed show_exception_dialog.
4136
4137 2003-07-29 Jonathan Coles <[email protected]>
4138
4139 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
4140 Put back this method and remove the equivalent function since we
4141 are setting the exception hook from within this class (OnInit).
4142
4143 2003-07-29 Jonathan Coles <[email protected]>
4144
4145 * Doc/manual/images/5_2_custom_ramp.png,
4146 Doc/manual/images/5_2_quantiles.png,
4147 Doc/manual/images/5_2_uniform_dist.png,
4148 Doc/manual/images/5_2_unique_values.png,
4149 Doc/manual/images/8_int_error.png: New screen shots.
4150
4151 * Doc/manual/thuban-manual.xml: Fixed typos and wording, clarified
4152 some points, and added more screen shots.
4153
4154 2003-07-29 Bernhard Herzog <[email protected]>
4155
4156 * Thuban/Model/data.py: Remove the now unused import of warnings
4157
4158 2003-07-29 Bernhard Herzog <[email protected]>
4159
4160 * Thuban/Model/data.py (SimpleStore): Removed. This class has been
4161 deprecated since before the 0.8 release and isn't used in Thuban
4162 itself anymore.
4163
4164 * Thuban/Model/transientdb.py: Remove some unnecessary imports
4165
4166 2003-07-29 Jonathan Coles <[email protected]>
4167
4168 * Thuban/UI/application.py (ThubanApplication.OnInit): set the
4169 python exception hook here so that we are sure to catch any
4170 Thuban exception that happen during initialization.
4171
4172 * Thuban/UI/main.py (main): Don't set the exception hook here,
4173 it will get set in ThubanApplication.OnInit.
4174
4175 2003-07-29 Jonathan Coles <[email protected]>
4176
4177 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
4178 Removed and called it show_exception_dialog() so that the exception
4179 handler can be set before the class is created.
4180
4181 * Thuban/UI/main.py (main): Install the exception handler before
4182 a ThubanApplication is created.
4183
4184 2003-07-29 Bernhard Herzog <[email protected]>
4185
4186 * po/it.po: New. Italian translation by Maurizio Napolitano
4187
4188 * po/ru.po: New. Russian translation by Alex Shevlakov
4189
4190 2003-07-29 Frank Koormann <[email protected]>
4191
4192 * Doc/manual/thuban-manual.xml: Extended section on supported
4193 projections.
4194
4195 2003-07-29 Frank Koormann <[email protected]>
4196
4197 * Doc/manual/thuban-manual.xml: gaspell-checked.
4198
4199 2003-07-29 Jonathan Coles <[email protected]>
4200
4201 * Doc/manual/images/3_5_legend.png: Added border to improve look
4202 on white background.
4203
4204 2003-07-29 Jonathan Coles <[email protected]>
4205
4206 * Doc/manual/thuban-manual.xml: Fixed grammar and typos. Added
4207 descriptions for the legend toolbar.
4208
4209 * Doc/manual/images/4_2_raster_layer_properties.png: Removed
4210 cursor from dialog box.
4211
4212 2003-07-28 Jonathan Coles <[email protected]>
4213
4214 * Doc/manual/thuban-manual.xml: More screenshots and more chapters.
4215
4216 * Doc/manual/images/2_4_session_tree.png,
4217 Doc/manual/images/3_5_legend.png, Doc/manual/images/3_rename_map.png,
4218 Doc/manual/images/4_2_layer_properties.png,
4219 Doc/manual/images/4_2_raster_layer_properties.png,
4220 Doc/manual/images/5_3_genclass.png,
4221 Doc/manual/images/5_classification.png,
4222 Doc/manual/images/6_projection.png,
4223 Doc/manual/images/7_1_table_view.png,
4224 Doc/manual/images/7_2_5_join.png: New screenshots.
4225
4226 2003-07-24 Jonathan Coles <[email protected]>
4227
4228 * Doc/manual/thuban-manual.xml: Chapter on Projection Management.
4229
4230 2003-07-24 Jonathan Coles <[email protected]>
4231
4232 * Doc/manual/thuban-manual.xml: Added EPS images and wrote
4233 chapter on Layer Management.
4234
4235 * Doc/manual/Makefile: New. Makefile to generate all formats for the
4236 manual and images.
4237
4238 2003-07-24 Bernhard Herzog <[email protected]>
4239
4240 * Thuban/Model/range.py, Thuban/version.py: Remove the #! line as
4241 it annoys lintian which warns about these files not being
4242 executable. The #! isn't necessary here since if you absolutely
4243 must execute them you can always say "python <filename>".
4244
4245 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Remove
4246 superfluous code to set brush and pen for point shapes
4247
4248 * Thuban/UI/viewport.py: Remove commented out code that wouldn't
4249 belong in viewport anyway
4250
4251 2003-07-24 Frank Koormann <[email protected]>
4252
4253 * Doc/manual/thuban-manual.xml: Added section on table management.
4254
4255 2003-07-24 Bernhard Herzog <[email protected]>
4256
4257 * test/runtests.py (main): Recognize the long "verbose" option
4258 correctly.
4259
4260 2003-07-22 Jonathan Coles <[email protected]>
4261
4262 * Doc/manual/thuban-manual.xml: Continue to write first revision
4263 of the manual.
4264
4265 * Thuban/UI/renderer.py (MapRenderer.render_map): Wrap method
4266 with Begin/EndDrawing() calls to ensure we aren't doing to
4267 many updates to the dc during rendering.
4268 (ScreenRenderer.draw_shape_layer): self.draw_point_shape takes
4269 a pen and brush argument so they need to be passed to the function.
4270
4271 * Thuban/UI/viewport.py (ViewPort.calc_min_max_scales): New.
4272 Calculates the minimum and maximum scale values. Factored out
4273 of set_view_transform so that it could be used to zoom all the
4274 way into a single point.
4275 (ViewPort.set_view_transform): Call calc_min_max_scales().
4276 (ViewPort.FitSelectedToWindow): Zoom to the maximum scale
4277 if only a single point is selected.
4278
4279 * Doc/manual/images/1_2_legend_close.png,
4280 Doc/manual/images/1_2_legend_dock.png,
4281 Doc/manual/images/1_2_mainwindow.png,
4282 Doc/manual/images/1_2_mainwindow.ps,
4283 Doc/manual/images/1_2_mainwindow.sk,
4284 Doc/manual/images/3_2_fullextent.png,
4285 Doc/manual/images/3_2_fulllayerextent.png,
4286 Doc/manual/images/3_2_fullshapeextent.png,
4287 Doc/manual/images/3_2_pan.png,
4288 Doc/manual/images/3_2_zoomin.png,
4289 Doc/manual/images/3_2_zoomout.png,
4290 Doc/manual/images/3_3_identify.png,
4291 Doc/manual/images/3_3_label.png,
4292 Doc/manual/images/3_5_invisible.png,
4293 Doc/manual/images/3_5_movedown.png,
4294 Doc/manual/images/3_5_moveup.png,
4295 Doc/manual/images/3_5_props.png,
4296 Doc/manual/images/3_5_tobottom.png,
4297 Doc/manual/images/3_5_totop.png,
4298 Doc/manual/images/3_5_visible.png: New. Images for the documentation.
4299
4300 2003-07-18 Bernhard Herzog <[email protected]>
4301
4302 * Thuban/UI/messages.py (MAP_REPLACED): New message.
4303
4304 * Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED
4305 after the new map has been assigned
4306
4307 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages):
4308 Delegate MAP_REPLACED to the canvas too
4309 (MainWindow.prepare_new_session): Removed. Thanks to the new
4310 MAP_REPLACED message it's no longer needed
4311 (MainWindow.OpenSession, MainWindow.NewSession):
4312 prepare_new_session has been removed.
4313
4314 * Thuban/UI/classifier.py (Classifier.__init__): Subscribe to
4315 MAP_REPLACED so that we can close the dialog if a new map is set.
4316 (Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED
4317 (Classifier.map_replaced): Handle MAP_REPLACED by closing the
4318 dialog
4319
4320 * test/test_viewport.py (SimpleViewPortTest)
4321 (SimpleViewPortTest.test_default_size): Add doc-strings
4322 (ViewPortTest.setUp): Bind map to self.map so we can use it in
4323 tests. Subscribe to MAP_REPLACED messages too.
4324 (ViewPortTest.tearDown): No need to explicitly unsubscribe
4325 (ViewPortTest.test_set_map): New test for the SetMap method.
4326
4327 2003-07-18 Bernhard Herzog <[email protected]>
4328
4329 * test/test_viewport.py (SimpleViewPortTest.test_default_size):
4330 Move this test from ViewPortTest.setUp to this new separate test
4331 case. setUp is not the place for the actual tests.
4332 (ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
4333 more of the test from setUp to the new test test_inital_settings.
4334 (ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
4335 (ViewPortTest.test_proj_conv): Split test_proj_conv into
4336 test_win_to_proj and test_proj_to_win and make the tests easier to
4337 understand
4338 (ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
4339 (ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
4340 (ViewPortTest.test_unprojected_rect_around_point)
4341 (ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
4342 Reformat to increase readability.
4343
4344 2003-07-18 Bernhard Herzog <[email protected]>
4345
4346 * Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.
4347
4348 2003-07-18 Bernhard Herzog <[email protected]>
4349
4350 * test/runtests.py: The test suite can now be run without an X
4351 connection. To make sure this remains true, remove the DISPLAY
4352 environment variable so that an error occurs if the wxGTK is
4353 imported accidentally
4354
4355 2003-07-18 Bernhard Herzog <[email protected]>
4356
4357 * Thuban/UI/viewport.py: Remove unused imports
4358
4359 * Thuban/UI/view.py: Remove unused imports
4360
4361 2003-07-18 Bernhard Herzog <[email protected]>
4362
4363 * test/test_export.py Remove unused imports. The OutputTransform
4364 function is now in viewport.py and is called output_transform
4365 (TestScalebar.test_output_transform)
4366 (TestScalebar.test_OutputTransform): Renamed to
4367 test_output_transform and updated to use output_transform instead
4368 of OutputTransform
4369
4370 * Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
4371 renamed.
4372 (MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
4373 renamed to output_transform
4374
4375 * Thuban/UI/viewport.py (OutputTransform, output_transform):
4376 Rename to output_transform
4377
4378 2003-07-18 Bernhard Herzog <[email protected]>
4379
4380 * Thuban/Model/layer.py (Layer.__init__): Rename
4381 classificationField to classificatin_column and init it here so
4382 that it can be used in SetClassificationColumn
4383 (Layer.GetClassificationColumn, Layer.GetClassificationField):
4384 Rename to GetClassificationColumn.
4385 (Layer.SetClassificationColumn, Layer.SetClassificationField):
4386 Rename to SetClassificationColumn and issue a LAYER_CHANGED
4387 message if the column changes.
4388 (Layer._classification_changed, Layer.ClassChanged): Rename to
4389 _classification_changed. Update the callers.
4390 (Layer.SetShapeStore): Further field->column renames.
4391
4392 * Thuban/Model/load.py (SessionLoader.start_classification)
4393 (SessionLoader.start_clpoint): Updates because of
4394 field->column method name changes in the Layer class
4395
4396 * Thuban/Model/save.py (SessionSaver.write_classification): Updates
4397 because of field->column method name changes in the Layer class
4398
4399 * Thuban/UI/classifier.py (Classifier.__init__)
4400 (Classifier._OnTry, Classifier._OnRevert): Updates because of
4401 field->column method name changes in the Layer class
4402
4403 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
4404 because of field->column method name changes in the Layer class
4405
4406 * Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
4407 of field->column method name changes in the Layer class
4408
4409 * test/test_save.py (SaveSessionTest.testClassifiedLayer)
4410 (SaveSessionTest.testClassifiedLayer): Update because of
4411 field->column method name changes in the Layer class
4412
4413 * test/test_layer.py (SetShapeStoreTests.setUp)
4414 (SetShapeStoreTests.test_sanity): Update because of field->column
4415 method name changes in the Layer class
4416 (TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
4417 (TestLayerModification.test_sanity)
4418 (TestLayerModification.test_initial_settings): remove unsued code
4419 and rename to test_sanity.
4420 (TestLayerModification.test_set_classification): New test for
4421 SetClassification and SetClassificationField.
4422
4423 2003-07-18 Bernhard Herzog <[email protected]>
4424
4425 * test/test_classgen.py (TestFixedRamp.test): Extend test to check
4426 the non-fixed values as well. The old test would have accepted a
4427 fixed ramp that only returnes the fixed properties
4428
4429 2003-07-17 Jonathan Coles <[email protected]>
4430
4431 * Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
4432 shots for the manual. The XCF file is the source image and
4433 has additional layers to support changes.
4434
4435 * Doc/manual/thuban-manual.xml: Wrote an initial Introduction.
4436
4437 * Thuban/UI/classifier.py (Classifier.__BuildClassification):
4438 Return both the new class and the field name.
4439
4440 * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't
4441 fit the map to the window as this changes any zoom level that
4442 the user may have set.
4443
4444 2003-07-16 Jonathan Coles <[email protected]>
4445
4446 * Thuban/Model/classgen.py (generate_singletons,
4447 generate_uniform_distribution, generate_quantiles): Remove
4448 fixes parameter, but maintain the same functionality by having
4449 the calling function pass a FixedRamp object for the ramp.
4450 (FixedRamp): New. Adapts a ramp to have fixed property values.
4451
4452 * Thuban/Model/classification.py: Use new CLASS_CHANGED message.
4453 (Classification): Inherit from Publisher.
4454 (Classification.__init__): Remove the layer parameter.
4455 Classifications no longer need to have a parent layer.
4456 (Classification.GetField, Classification.GetFieldType,
4457 Classification.SetFieldInfo): Removed. The field name is stored
4458 in the layer, and the type can be retreived by calling
4459 Layer.GetFieldType().
4460 (Classification._set_layer, Classification.GetLayer): Removed.
4461 Classifications no longer have a parent layer.
4462
4463 * Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
4464 classification.
4465 (Layer.SetShapeStore): Reset the classification first while
4466 we still have the old shape store to work with.
4467 (Layer.GetClassificationField, Layer.SetClassificationField):
4468 New. Method for getting/setting the field to classify on.
4469 (Layer.SetClassification): Simplified now that the layer
4470 simply has to hold a reference to the classification and not
4471 tell the classification who owns it.
4472 Fixes RTbug #2023.
4473
4474 * Thuban/Model/load.py (SessionLoader.start_classification):
4475 Set the field name on the layer, not the classification.
4476
4477 * Thuban/Model/messages.py: Add CLASS_CHANGED for when a
4478 classification is modified.
4479
4480 * Thuban/Model/save.py (SessionSaver.write_classification):
4481 Get the field name and type from the layer.
4482
4483 * Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
4484 parameter records to rows and add docstring. Fixes RTbug #1997.
4485
4486 * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
4487 ramp when we need to fix certain values of a ramp rather than
4488 using the old fixes parameter. Fixes RTbug #2024.
4489
4490 * Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
4491 parameter.
4492 (ClassTable.Reset): Add fieldType parameter and use it, rather
4493 than asking the classification.
4494 (Classifier.__init__): Remember the original class's field
4495 and ask the layer for the field type, rather than the classification.
4496 (Classifier.__SetGridTable): Retrieve the field and field type
4497 for the table because they are not in the classification.
4498 (Classifier._OnTry, Classifier._OnRevert): Set the classification
4499 field on the layer in addition to the classification itself.
4500
4501 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
4502 classification field from layer.
4503
4504 * Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
4505 classification field from layer. Split up tests and remove
4506 *-imports. Fixes RTbug #1992.
4507
4508 * test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.
4509
4510 * test/test_classification.py
4511 (TestClassification.test_classification): Remove tests for methods
4512 that no longer exist.
4513
4514 * test/test_layer.py (SetShapeStoreTests.setUp): Classification
4515 __init__ no longer has a field parameter, use SetClassificationField.
4516 (SetShapeStoreTests.test_sanity): Use layer object to get class
4517 field info.
4518
4519 * test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
4520 SetClassificationField on layer to set class field info.
4521
4522 * test/test_viewport.py: Renamed from test/test_view.py.
4523
4524 2003-07-16 Jan-Oliver Wagner <[email protected]>
4525
4526 * Doc/manual/thuban-manual.xml: Added authors and an initial
4527 coarse structure.
4528
4529 2003-07-15 Bernhard Herzog <[email protected]>
4530
4531 * test/support.py (FloatComparisonMixin): This is a mix-in class
4532 and therefore should not be derived from any other class.
4533
4534 * test/test_range.py (RangeTest): FloatComparisonMixin is a
4535 mix-in, so derive from TestCase as well.
4536
4537 2003-07-15 Bernhard Herzog <[email protected]>
4538
4539 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
4540 draw_func handling a bit to remove one layer of indirection. This
4541 makes the renderer about 10% faster in the non-classifying case
4542 and the code a bit cleaner
4543 (MapRenderer.draw_point_shape): Add the pen and brush parameters
4544 and set them in the dc. Now the draw_point_shape method and
4545 wxproj's draw_polygon_shape function have basically the same
4546 signature so that both can be directly used as draw_func
4547
4548 2003-07-15 Bernhard Herzog <[email protected]>
4549
4550 * Thuban/Model/save.py (SessionSaver.write_classification): Encode
4551 string values (in addition to the labels) as UTF 8
4552
4553 * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
4554 values if the field type is string
4555
4556 * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
4557 saving a session with non-ascii string classification values.
4558
4559 * test/test_load.py (TestClassification.file_contents)
4560 (TestClassification.test): Check for non-ascii values in string
4561 classifications
4562
4563 2003-07-14 Jonathan Coles <[email protected]>
4564
4565 * test/test_view.py: New. Tests for ViewPort.
4566
4567 2003-07-14 Frank Koormann <[email protected]>
4568
4569 * Thuban/Model/load.py (SessionLoader.start_map): Encode map
4570 title to latin1. Fixes https://intevation.de/rt/webrt?serial_num=2013
4571
4572 * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
4573 unicode strings from session file: session title, map title and
4574 projection name.
4575
4576 2003-07-10 Jonathan Coles <[email protected]>
4577
4578 * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
4579 drag_stop, not drag_move when the mouse is released.
4580
4581 2003-07-10 Jonathan Coles <[email protected]>
4582
4583 The most important part of this is the seperation of view.py into
4584 two pieces. viewport.py now has a class called ViewPort which
4585 contains all the non-wx parts of view.py and can therefore be
4586 tested. view.py contains only the wx-specific parts and is fairly
4587 simple.
4588
4589 * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
4590 RTTbug #1992.
4591 * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
4592 RTTbug #1992.
4593
4594 * Thuban/Model/classgen.py (generate_singletons,
4595 generate_uniform_distribution, generate_quantiles):
4596 Added 'fixes' parameter so that property attributes can
4597 be held constant over the generated classification groups.
4598 (CustomRamp.GetProperties): Remove unused variables.
4599
4600 * Thuban/Model/map.py (Map.SetProjection): Send the old
4601 projection as an argument to listeners of the MAP_PROJECTION_CHANGED
4602 event.
4603
4604 * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
4605 parameter which is a list of records that restricts which
4606 records are saved. Fixes RTbug #1997.
4607
4608 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
4609 Port exception dialog from GREAT-ER. Fixes RTbug #1993.
4610
4611 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
4612 to allow the user to fix line color/width on generated groups.
4613 (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
4614 functions to optionally fix group properties.
4615
4616 * Thuban/UI/main.py (main): Set exception hook to the
4617 ShowExceptionDialog. Fixes RTbug #1993.
4618
4619 * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
4620 the table window when it is selectd to be shown.
4621
4622 * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
4623 Export Selection button and move the export buttons underneath
4624 the table.
4625 (QueryTableFrame.UpdateStatusText): Added event argument so
4626 that it can respond to grid selection events. The status text
4627 is now updated even when the table is not associated with a
4628 layer as was previously assumed.
4629 (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
4630 UpdateStatusText responds to these events.
4631 (QueryTableFrame.OnSaveAs): Renamed to doExport.
4632 (QueryTableFrame.doExport): Helper function that saves the
4633 entire table, or selected rows, to a file.
4634 (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
4635 Respond to export button events and call doExport.
4636
4637 * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
4638 the function doesn't return NULL without first setting a Python
4639 Error.
4640
4641 * test/runtests.py (main): Only print "Unknown option" for
4642 unsupported options.
4643
4644 * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
4645 optional epsilon argument to specify floating point accuracy.
4646 (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
4647 for each item test.
4648
4649 * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
4650 tests for saving selected records.
4651
4652 * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
4653 tests for saving selected records.
4654
4655 * test/test_map.py (TestMapWithContents.test_set_projection):
4656 MAP_PROJECTION_CHANGED events send the old projection.
4657
4658 * test/test_session.py
4659 (TestSessionWithContent.test_forward_map_projection):
4660 MAP_PROJECTION_CHANGED events send the old projection.
4661
4662 * test/test_table.py (TableTest): Update tests to use non-deprecated
4663 functions.
4664
4665 2003-07-08 Bernhard Herzog <[email protected]>
4666
4667 * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
4668 constants in the column objects are the standard ones defined in
4669 the table module.
4670
4671 * test/test_transientdb.py
4672 (TestTransientTable.test_transienttable_to_dbf): New. Test whether
4673 exporting transient tables as DBF works. This should catch the bug
4674 just fixed in TransientTableBase.Width.
4675
4676 2003-07-08 Bernhard Herzog <[email protected]>
4677
4678 * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
4679 interpolated colors correctly.
4680
4681 * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
4682 New. Test case for the fix in classgen.py
4683
4684 2003-07-08 Bernhard Herzog <[email protected]>
4685
4686 * test/runtests.py (main): Make the default output less verbose
4687 and add a verbosity option (-v) to get the old output
4688
4689 2003-07-08 Bernhard Herzog <[email protected]>
4690
4691 * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
4692 0.9.
4693
4694 * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
4695 New. Return the join type
4696
4697 * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
4698 DTD
4699 (SessionSaver.write_data_containers): Save the join type for
4700 joined tables
4701
4702 * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
4703 namespace
4704 (SessionLoader.start_jointable): Handle the jointype attribute
4705
4706 * test/test_load_0_8.py: New. Effectively a copy of test_load.py
4707 as of Thuban 0.8. These are now tests to determine whether Thuban
4708 can still read files generated by Thuban 0.8
4709
4710 * test/test_load.py (LoadSessionTest.dtd)
4711 (TestSingleLayer.file_contents)
4712 (TestLayerVisibility.file_contents, TestLabels.file_contents)
4713 (TestLayerProjection.file_contents)
4714 (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
4715 (TestJoinedTable.file_contents)
4716 (TestLoadError.file_contents): Update for new DTD
4717 (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
4718 for new join type attribute
4719
4720 * test/test_save.py (SaveSessionTest.dtd)
4721 (SaveSessionTest.testEmptySession)
4722 (SaveSessionTest.testSingleLayer)
4723 (SaveSessionTest.testLayerProjection)
4724 (SaveSessionTest.testRasterLayer)
4725 (SaveSessionTest.testClassifiedLayer)
4726 (SaveSessionTest.test_dbf_table)
4727 (SaveSessionTest.test_joined_table): Update for new DTD
4728 (SaveSessionTest.test_joined_table): Add test for new join type
4729 attribute
4730
4731 2003-07-04 Bernhard Herzog <[email protected]>
4732
4733 * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
4734 function for table_to_dbf
4735 (table_to_dbf): Deal with names longer than the 10 character limit
4736
4737 * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
4738 doc-string
4739 (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
4740 long column names
4741
4742 2003-07-03 Bernhard Herzog <[email protected]>
4743
4744 * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
4745
4746 2003-07-03 Bernhard Herzog <[email protected]>
4747
4748 * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
4749 for the Thuban manual and README with some basic information about
4750 the manual
4751
4752 2003-07-03 Bernhard Herzog <[email protected]>
4753
4754 * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
4755 Update doc-string
4756 (TransientJoinedTable.create): Do not modify the column objects of
4757 the input tables in place and copy all columns of the input tables
4758 into the joined table after all.
4759
4760 * test/test_transientdb.py
4761 (TestTransientTable.test_transient_joined_table_same_column_name):
4762 Update to reflect the new behavior
4763 (TestTransientTable.test_transient_joined_table_with_equal_column_names):
4764 Update to reflect the new behavior
4765 (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
4766 New test case for a bug which modified the column objects in place
4767
4768 2003-07-02 Jonathan Coles <[email protected]>
4769
4770 * Thuban/Model/classgen.py (generate_singletons,
4771 generate_uniform_distribution, generate_quantiles,
4772 GenQuantiles0): Make sure maxValue isn't less than
4773 one, otherwise we could divide by zero.
4774
4775 * test/test_classgen.py (ClassGenTest.doClassRangeTest,
4776 ClassGenTest.doClassSingleTest): Call doBoundsTest to
4777 check the end classification groups against the
4778 proper property values.
4779 (ClassGenTest.doBoundsTest): New. Checks the first and
4780 last classification groups to make sure their properties
4781 are the correct upper and lower bounds for a color ramp.
4782
4783 2003-07-02 Jonathan Coles <[email protected]>
4784
4785 * Thuban/Model/classgen.py (generate_singletons,
4786 generate_uniform_distribution, generate_quantiles,
4787 GenQuantiles0): The denominator was one to high when
4788 calculating the index for the ramp causing the index
4789 to never to reach one.
4790
4791 2003-07-02 Jonathan Coles <[email protected]>
4792
4793 Changed the singature of ClassGroupRange.__init__ and
4794 ClassGroupRange.SetRange() so that the min/max values are
4795 passed as a tuple. This makes a better calling scheme for
4796 when a Range object is passed instead.
4797
4798 * Thuban/Model/classgen.py: Fixed parameters to
4799 ClassGroupRange constructor.
4800
4801 * Thuban/Model/classification.py (ClassGroupRange.__init__):
4802 Consolidate the min/max parameters into a single _range which
4803 can either be a tuple or a Range object.
4804 (ClassGroupRange.SetRange): Consolidate the min/max parameters
4805 into a single _range which can either be a tuple or a Range object.
4806
4807 * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
4808 call to ClassGroupRange constructor to use a tuple.
4809
4810 * Thuban/Model/layer.py (Layer.SetClassification): Switch
4811 the classification instance variable to the new class
4812 before calling _set_layer otherwise subscribers to a
4813 LAYER_CHANGED event will not see any difference.
4814
4815 * test/test_classification.py: Fix tests of ClassGroupRange
4816 so that they use the new signature.
4817
4818 * test/test_load.py: Fix use of ClassGroupRange so that it
4819 uses the new signature.
4820
4821 * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
4822 uses the new signature.
4823
4824 * test/test_save.py: Fix use of ClassGroupRange so that it
4825 uses the new signature.
4826
4827
4828 2003-07-01 Jonathan Coles <[email protected]>
4829
4830 * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
4831 Import used objects/class from color.
4832 (generate_singletons): We don't
4833 need the numGroups parameter anymore because we are using
4834 the new ramps with GetProperties().
4835 (generate_uniform_distribution): Use new ramp method
4836 GetProperties().
4837 (generate_quantiles, GenQuantiles0): Use new ramp method
4838 GetProperties().
4839 (CustomRamp.SetNumGroups): Removed. The ramps now map
4840 a value from 0 to 1 to class properties so the number
4841 of groups is not needed ahead of time.
4842 (CustomRamp.next): Removed. CustomRamp does not support
4843 interation anymore.
4844 (CustomRamp.GetProperties): Returns a ClassGroupProperties
4845 object based on the index value from 0 to 1 that is
4846 passed to it.
4847 (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
4848 Made into instances of Monochromatic class instread of
4849 deriving from it.
4850 (HotToCold.SetNumGroups): Removed. See CustomRamp.
4851 (HotToCold.next): Removed. See CustomRamp.
4852
4853 * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
4854 (Classification.SetField, Classification.SetFieldType):
4855 Replaced with SetFieldInfo.
4856 (Classification.SetFieldInfo): New. Does a better job of
4857 what SetField and SetFieldType used to do by combining
4858 their function since they should really always be done
4859 at the same time.
4860 (Classification.SetLayer): Renamed to _set_layer.
4861 (Classification._set_layer): Should only be called from
4862 Layer's SetClassification. This does not cause a recursive
4863 call as SetLayer did because we know that Layer knows about
4864 the classification.
4865
4866 * Thuban/Model/color.py: Fixes RTbug #1971.
4867 (_Transparent): Renamed from Transparent so it doesn't
4868 conflict with the module variable.
4869 (Transparent, Black): Renamed from Color.Transparent,
4870 Color.Black so they are not class variables.
4871
4872 * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
4873 (Layer.Destroy): We don't need to call SetClassification
4874 anymore to clear out the back reference in the classifcation
4875 to the layer. It's better to set it to None using _set_layer,
4876 and we won't be creating another clas object too.
4877 (Layer.SetClassification): Classification._set_layer is not
4878 recursive so remove all the locking variables. Also clean
4879 up the code so that it remains unchanged if something fails.
4880
4881 * Thuban/Model/load.py: Fixes RTbug #1971.
4882 (SessionLoader.start_classification): Call
4883 Classification.SetFieldInfo().
4884
4885 * Thuban/Model/save.py: Removed import of Color which wasn't
4886 being used.
4887
4888 * Thuban/UI/classgen.py: Fixes RTbug #1972.
4889 (ClassGenDialog.__init__): Color ramps are now instances
4890 already so we don't need to create any new objects.
4891 (ClassGenDialog.OnOK): Check for numGroups is no longer
4892 necessary because we never use it.
4893
4894 * Thuban/UI/classifier.py: Fixes RTbug #1971.
4895 (Classifier.__BuildClassification, Classifier.__SetGridTable):
4896 Call Classification.SetFieldInfo() instead of SetFieldType.
4897
4898 * Thuban/UI/renderer.py: Fixes RTbug #1971.
4899
4900 * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
4901 (MapCanvas.__init__): Subscribe to the idle time event. Set
4902 background color to white.
4903 (MapCanvas.OnPaint): Set a flag indicating that we should
4904 render the map during idle time. If we already have a bitmap
4905 just draw it now.
4906 (MapCanvas.OnIdle): New. Render the map only during idle time.
4907 This also fixes a problem with the busy cursor under gtk.
4908
4909 * test/test_classgen.py (ClassGenTest.test_generate_singletons):
4910 Fix calls to generate_singletons because the signature changed.
4911
4912 * test/test_classification.py: Fix color references and
4913 change calls to Classification.[SetField|SetFieldType] to
4914 SetFieldInfo.
4915
4916 * test/test_load.py: Fix color references.
4917
4918 * test/test_load_0_2.py: Fix color references.
4919
4920 * test/test_save.py (SaveSessionTest.testClassifiedLayer):
4921 Change calls to Classification.[SetField|SetFieldType] to
4922 SetFieldInfo.
4923
4924 2003-07-01 Frank Koormann <[email protected]>
4925
4926 MERGE from the greater-ms3 branch.
4927
4928 * test/test_transientdb.py
4929 (TestTransientTable.test_transient_joined_table_with_equal_column_names):
4930 New. Test join of two tables with partly equal column names.
4931
4932 * Thuban/Model/transientdb.py (TransientJoinedTable.create):
4933 If duplicates in left and right tables column names are found,
4934 append '_' (underscores) to the name until it is unique.
4935 Create always new internal names for the resulting table and reference
4936 columns in the join statement with <table>.<column>
4937
4938 2003-07-01 Bernhard Herzog <[email protected]>
4939
4940 * test/test_transientdb.py
4941 (TestTransientTable.test_transient_joined_table_same_column_name):
4942 New. Test whether joining on columns with the same names in both
4943 tables works.
4944
4945 * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
4946 sure to use the right internal names even when joining on field
4947 with the same names in both tables. Also, detect duplicate names
4948 in the joined table correctly.
4949
4950 2003-07-01 Frank Koormann <[email protected]>
4951
4952 * Thuban/UI/renderer.py (ExportRenderer.render_legend):
4953 Reverse List of layers to render in same order as in desktop legend.
4954
4955 2003-06-30 Jonathan Coles <[email protected]>
4956
4957 * Thuban/version.py (make_tuple): Takes a version string
4958 and splits it into a tuple of at most three integers.
4959 Used make_tuple() to make tuple versions of the version
4960 numbers.
4961
4962 * Thuban/UI/about.py: Add Thuban email addresses.
4963
4964 2003-06-30 Jonathan Coles <[email protected]>
4965
4966 * Thuban/version.py: SQLite/PySQLite version dependencies
4967 were too high.
4968
4969 2003-06-30 Jonathan Coles <[email protected]>
4970
4971 * Thuban/version.py: Update version to 0.8.1
4972
4973 * MANIFEST.in: Added Projections so that default.proj is
4974 included.
4975
4976 2003-06-26 Jonathan Coles <[email protected]>
4977
4978 New About box with lots more information including library
4979 versions and credits. More/better version checking before
4980 Thuban starts.
4981
4982 * Thuban/UI/about.py: New. New About box that displays
4983 library version information and credits.
4984
4985 * Thuban/version.py: Added new 'versions' dictionary which
4986 contains the verions of various libraries which are checked
4987 when the module loads.
4988 (verify_versions): Check all version numbers and returns
4989 a list of errors.
4990
4991 * Thuban/UI/classifier.py (Classifier.__EnableButtons):
4992 Reset the status of the buttons as the situation warrants,
4993 but in a better more reliable way by not relying on the
4994 current status to determine what needs to change.
4995
4996 * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
4997 (verify_versions): Remove most of the code since it is
4998 now in Thuban.version.verify_versions.o
4999
5000 * Thuban/UI/mainwindow.py (MainWindow.About): Call new
5001 About box in Thuban.UI.about.
5002
5003 * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
5004 Returns the version of gdal library being used as a string.
5005
5006 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
5007 Removed.
5008 (get_proj_version): Return the version of PROJ that the file
5009 was compiled with.
5010 (get_gtk_version): Return th version of GTK that the file
5011 was compiled with.
5012
5013 2003-06-25 Jonathan Coles <[email protected]>
5014
5015 * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
5016 of the SelectPropertiesDialog should be self so the window
5017 appears on top.
5018 (ClassGroupPropertiesCtrl.DoEdit): The parent
5019 of the SelectPropertiesDialog should be self so the window
5020 appears on top.
5021
5022 * Thuban/UI/resource.py: Cleaned up how we determine file
5023 extensions.
5024 (GetImageResource): Return an wxImage from our Resources.
5025
5026 2003-06-24 Jonathan Coles <[email protected]>
5027
5028 * Thuban/UI/renderer.py (ExportRenderer.render_legend):
5029 Check that a layer has a classification before trying
5030 to get it. Raster layers don't have classifications.
5031
5032 2003-06-23 Jonathan Coles <[email protected]>
5033
5034 * setup.py: Add Resources/XML to resource list.
5035
5036 2003-06-23 Jonathan Coles <[email protected]>
5037
5038 * setup.cfg: Fix copyright dates
5039
5040 2003-06-23 Jonathan Coles <[email protected]>
5041
5042 * MANIFEST.in: Update with Resources/XML
5043
5044 * setup.py: Don't include Locale resources yet as we don't
5045 have any and it causes problems building the distribution
5046 for Windows. Update version to 0.8.0.
5047
5048 * Doc/thuban.dtd: Removed since it is now in Resources/XML.
5049
5050 * Thuban/UI/mainwindow.py: Add blank line at the end because
5051 file was not being read correctly building the Windows
5052 distribution.
5053
5054 2003-06-23 Jonathan Coles <[email protected]>
5055
5056 * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
5057
5058 * Thuban/version.py: Temporarily update longversion for
5059 the 0.8 release so that it doesn't have the cvs revision.
5060
5061 2003-06-23 Jonathan Coles <[email protected]>
5062
5063 * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
5064 to make sure that we don't create reentrant possibilities with
5065 wxYield.
5066
5067 * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
5068 directly to avoid the wxSafeYield() call which generates an
5069 OnPaint event causing infinite recursion. Don't try to catch
5070 exception anymore. This was for before there were limits on map
5071 scaling.
5072
5073 2003-06-23 Bernhard Herzog <[email protected]>
5074
5075 Bug fix for RT #1961:
5076
5077 * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
5078 Register DerivedShapestores with the session
5079
5080 * Thuban/Model/session.py (Session.Tables): Make sure each table
5081 is only listed once.
5082
5083 * test/test_load.py (TestJoinedTable.test): Add check_format call.
5084 Update file contents to match the one written out.
5085
5086 2003-06-20 Bernhard Herzog <[email protected]>
5087
5088 * test/xmlsupport.py (SaxEventLister.startElementNS)
5089 (SaxEventLister.endElementNS): Do not include the qname. Python
5090 2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
5091 is (presumably incorrectly) None, whereas it's a string with the
5092 element name in the later versions.
5093
5094 * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
5095 (TestEventList.test_even_list_namespace): Update tests to reflect
5096 the new behaviour
5097 (TestEventList.test_even_list_id_normalization): Fix doc-string
5098
5099 2003-06-20 Jonathan Coles <[email protected]>
5100
5101 * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
5102 by deriving classes to determine if that layer supports shapes.
5103 (Layer): Override HasShapes and return true.
5104
5105 * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
5106 instead of a direct call to wx[Begin|End]CusyCursor().
5107 (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
5108 table data.
5109
5110 * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
5111 New. Wrappers around the wxWindows functions that allow us to
5112 make additional calls such as wxYield which gives the native
5113 system a chance to update the cursor correctly.
5114
5115 * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
5116 instead of a direct call to wx[Begin|End]CusyCursor().
5117
5118 * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
5119 instead of a direct call to wx[Begin|End]CusyCursor().
5120 (MapCanvas.find_shape_at): Check if the current search layer
5121 support shapes, otherwise go on to the next layer.
5122
5123 * test/test_layer.py: Add tests in each type of layer for
5124 HasClassification() and HasShapes()
5125
5126 2003-06-20 Jonathan Coles <[email protected]>
5127
5128 * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
5129 turning on the busy cursor to allow the system to change the
5130 cursor before we begin painting. This fixes a problem that
5131 was occuring only under GTK. Fixes RTbug #1840.
5132
5133 2003-06-20 Bernhard Herzog <[email protected]>
5134
5135 * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
5136 version.
5137
5138 * Thuban/Model/save.py (sort_data_stores): New. Make topological
5139 sort of the data sources so they can be written with sources that
5140 data sources that depend on other data sources come after the
5141 sources they depend on.
5142 (SessionSaver.__init__): Add idmap instance variable to map from
5143 objects to the ids used in the file.
5144 (SessionSaver.get_id, SessionSaver.define_id)
5145 (SessionSaver.has_id): New. Methods to manage the idmap
5146 (SessionSaver.write): Use thuban-0.8.dtd
5147 (SessionSaver.write_session): Add a namespace on the session and
5148 write out the data sources before the maps.
5149 (SessionSaver.write_data_containers): New. Write the data
5150 containers.
5151 (SessionSaver.write_layer): Layer elements now refer to a
5152 shapestore and don't contain filenames anymore.
5153
5154 * Thuban/Model/load.py (LoadError): Exception class to raise when
5155 errors in the files are discovered
5156 (SessionLoader.__init__): Define dispatchers for elements with a
5157 thuban-0.8 namespace too.
5158 (SessionLoader.check_attrs): New helper method to check and
5159 convert attributes
5160 (AttrDesc): New. Helper class for SessionLoader.check_attrs
5161 (SessionLoader.start_fileshapesource)
5162 (SessionLoader.start_derivedshapesource)
5163 (SessionLoader.start_filetable, SessionLoader.start_jointable):
5164 Handlers for the new elements in the new fileformat
5165 (SessionLoader.start_layer): Handle the shapestore attribute in
5166 addition to filename.
5167 (SessionLoader.start_table, SessionLoader.end_table): Removed.
5168 They were never used in the old formats and aren't needed for the
5169 new.
5170
5171 * Thuban/Model/session.py (Session.DataContainers): New method to
5172 return all "data containers", i.e. shapestores and tables
5173
5174 * test/xmlsupport.py (SaxEventLister.__init__)
5175 (SaxEventLister.startElementNS, sax_eventlist): Add support to
5176 normalize IDs.
5177
5178 * test/test_xmlsupport.py
5179 (TestEventList.test_even_list_id_normalization): New test case for
5180 id normalization
5181
5182 * test/test_load.py (LoadSessionTest.check_format): Use ID
5183 normalization
5184 (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
5185 class atrributes used for ID normalization
5186 (TestSingleLayer, TestLayerVisibility, TestLabels.test)
5187 (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
5188 file format
5189 (TestJoinedTable): New test for loading sessions with joined
5190 tables.
5191 (TestLoadError): New. Test whether missing required attributes
5192 cause a LoadError.
5193
5194 * test/test_save.py (SaveSessionTest.thubanids)
5195 (SaveSessionTest.thubanidrefs): New class attributes for ID
5196 normalization in .thuban files.
5197 (SaveSessionTest.compare_xml): Use id-normalization.
5198 (SaveSessionTest.testEmptySession)
5199 (SaveSessionTest.testLayerProjection)
5200 (SaveSessionTest.testRasterLayer)
5201 (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
5202 (SaveSessionTest.testLayerProjection): The filename used was the
5203 same as for testSingleLayer. Use a different one.
5204 (SaveSessionTest.test_dbf_table)
5205 (SaveSessionTest.test_joined_table): New test cases for saving the
5206 new data sources structures.
5207 (TestStoreSort, MockDataStore): Classes to test the sorting of the
5208 data stores for writing.
5209
5210 * test/runtests.py: Add CVS keywords
5211
5212 2003-06-20 Jonathan Coles <[email protected]>
5213
5214 * test/test_session.py
5215 (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
5216 Use the cultural_landmark-point.dbf file for the store so that
5217 the table rows and shape count match.
5218
5219 2003-06-20 Jonathan Coles <[email protected]>
5220
5221 * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
5222 an exception if the number of shapes is different from the
5223 number of rows in the table. Address RTbug #1933.
5224
5225 * test/test_layer.py (TestLayer.test_derived_store): Add
5226 a test for the new exception in DerivedShapeStore.__init__.
5227
5228 * test/support.py (FloatTestCase): Removed since there is
5229 already FloatComparisonMixin. Fixes RTbug #1954.
5230 (FloatComparisonMixin.assertFloatEqual): Include test for
5231 infinity that was part of FloatTestCase.
5232
5233 * test/test_range.py (RangeTest): Inherit from
5234 support.FloatComparisonMixin now that we don't have
5235 support.FloatTestCase.
5236
5237 2003-06-20 Bernhard Herzog <[email protected]>
5238
5239 * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
5240 the implementation in xmlsupport instead.
5241 (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
5242
5243 * test/test_proj.py: Import sax_eventlist from xmlsupport instead
5244 of test_save
5245
5246 2003-06-20 Bernhard Herzog <[email protected]>
5247
5248 * test/test_load.py (LoadSessionTest.check_format): New helper
5249 method to make sure the test files we load might have been written
5250 by the current thuban version.
5251 (ClassificationTest.TestLayers, TestSingleLayer.test)
5252 (TestLayerVisibility.test, TestClassification.test)
5253 (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
5254 Add check_format() calls and fix the thuban data to match the data
5255 that would be written by saving the session loaded from it.
5256
5257 * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
5258 the same class and function in test_save.
5259
5260 * test/test_xmlsupport.py (TestEventList): New. test cases for
5261 sax_eventlist
5262
5263 2003-06-20 Bernhard Herzog <[email protected]>
5264
5265 * Resources/XML/thuban.dtd: Add comment about which versions of
5266 Thuban are covered by this DTD
5267 (map): Fix content model for layers and raster layers. There can
5268 be any number or layers and raster layers in any order.
5269
5270 2003-06-20 Jonathan Coles <[email protected]>
5271
5272 This is mainly about fixing RTbug #1949.
5273
5274 * Thuban/Model/classification.py: Remove "from __future__"
5275 import statement since python 2.2 is the earliest supported
5276 version.
5277
5278 * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
5279 Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
5280 depending on the units this projection *forwards* into.
5281
5282 * Thuban/Model/save.py (SessionSaver.write_classification):
5283 Remove unnecessary use of lambdas and nested functions.
5284
5285 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
5286 adjustment here if the map projection uses degrees.
5287
5288 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
5289 scale adjust code since it is now done before calling
5290 this method. Don't do anything if the map projection
5291 is None.
5292
5293 2003-06-19 Bernhard Herzog <[email protected]>
5294
5295 Move version specific load tests to their own file.
5296
5297 * test/test_load.py: Expand the doc-string to explain a bit how to
5298 handle file format changes.
5299 (TestClassification.test): Update the docstring as this test is
5300 not about Thuban 0.2 anymore.
5301
5302 * test/test_load_0_2.py: New file with the load tests for thuban
5303 files created with Thuban 0.2 and earlier.
5304
5305 2003-06-19 Bernhard Herzog <[email protected]>
5306
5307 Add XML validation to some of the tests. Validation will only be
5308 done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
5309 To make the DTD available to the test cases it's moved into
5310 Resources/XML
5311
5312 * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
5313 for versions up to and including 0.2. Two slight changes: added an
5314 encoding specification and fixed the comment which refered to
5315 GRASS, not Thuban
5316
5317 * test/xmlsupport.py: New support module for tests involving XML.
5318 Currently there's a mix-in class for XML validation.
5319
5320 * test/test_xmlsupport.py: New. Tests for the xmlsupport module
5321
5322 * test/test_save.py (SaveSessionTest): Derive from ValidationTest
5323 so that we can validate the
5324 (SaveSessionTest.testEmptySession)
5325 (SaveSessionTest.testSingleLayer)
5326 (SaveSessionTest.testSingleLayer)
5327 (SaveSessionTest.testLayerProjection)
5328 (SaveSessionTest.testRasterLayer)
5329 (SaveSessionTest.testClassifiedLayer): Validate the generated XML
5330
5331 * test/runtests.py (main): Call print_additional_summary instead
5332 of print_garbage_information
5333
5334 * test/support.py (resource_dir): New function to return the
5335 "Resource" subdirectory
5336 (print_additional_summary): New function to combine several
5337 summary functions
5338 (run_tests): Use print_additional_summary instead of calling
5339 print_garbage_information directly
5340
5341 2003-06-19 Bernhard Herzog <[email protected]>
5342
5343 * Doc/thuban.dtd (classification): Correct the content model of
5344 the classification element.
5345 (projection): Add the "name" attribute
5346
5347 2003-06-19 Frank Koormann <[email protected]>
5348
5349 MERGE from the greater-ms3 branch.
5350
5351 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
5352 scale if projection is latlong to get better estimate.
5353
5354 Fix problem of hidden properties dialog under windows after double
5355 click on layer tree:
5356 The tree control always gets an Expanded / Collapsed event after
5357 the ItemActivated on double click, which raises the main window again.
5358 We add a second ItemActivated event to the queue, which simply
5359 raises the already displayed window.
5360
5361 * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
5362 raiseProperties initialized to prevent endless loops
5363 (LegendTree._OnItemActivated): Depending on self.raiseProperties
5364 simply raise the properties or open the dialog and issue a second
5365 event.
5366
5367 2003-06-18 Jonathan Coles <[email protected]>
5368
5369 * setup.py: Fix a few problems that occured under Windows.
5370
5371 2003-06-18 Jonathan Coles <[email protected]>
5372
5373 When Thuban loaded the map was redrawn twice because the
5374 legend was being opened after the mainwindow was created
5375 and not during its creation. This meant the map was drawn
5376 initially and then had to be redrawn when the legend
5377 caused the display to change. Now the legend is opened
5378 in the mainwindow constructor which resolves this issue.
5379
5380 Also, although we were checking for the existence of
5381 gdal and gdalwarp modules, the gdalwarp extension was
5382 still being compiled (which may fail if the system doesn't
5383 have gdal installed). the build_ext command to setup.py
5384 now accepts the flags --with-gdal and --without-gdal.
5385 If --without-gdal is specified setup.py will try to
5386 use the gdal parameters specified by gdal-config. Under
5387 windows, those parameters have to be set in setup.py
5388 as with proj4 an wxWindows.
5389
5390 * setup.py: Use a list instead of seperate variables for
5391 extension parameters so we can create a generic function
5392 that runs an appropriate *-config script.
5393 (run_cs_script): Renamed from run_wx_script and modified
5394 to accept a second argument which is a list of lists to
5395 be filled in by the values returned from running the command.
5396 (thuban_build_ext): New. Extends the build_ext command and
5397 provides the options --with-gdal/--without-gdal which then
5398 optionally includes the gdalwarp extension.
5399
5400 * Thuban/Model/resource.py: First check if we can import
5401 the gdalwarp Thuban extension before checking for gdal.
5402 Also added some comments.
5403
5404 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
5405 the map is None which may be the case if none has been loaded
5406 yet.
5407
5408 * Thuban/UI/main.py (main): Remove call to ShowLegend.
5409
5410 * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
5411
5412 * Thuban/UI/renderer.py: Check for gdal support before importing
5413 gdalwarp.
5414 (MapRenderer.render_map): Only try to optimize if we have gdal
5415 support otherwise nothing will get drawn.
5416
5417 * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
5418 during startup before a map has been created. Check if map is None
5419 before using it and do nothing if it is.
5420
5421 2003-06-17 Jonathan Coles <[email protected]>
5422
5423 Fix the problem with raster layers under Windows that caused
5424 Thuban to crash. The view should respond to layer projection
5425 changed events to update the display. Changes to a projection
5426 should not cause the map to be set to full extent.
5427
5428 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
5429 current_map_proj to remember the current map projection so that
5430 when the projection changes we know what the previous projection
5431 was.
5432 (MapCanvas.SetMap): Unsubscribe and subscribe to
5433 LAYER_PROJECTION_CHANGED events.
5434 (MapCanvas.projection_changed): Split into two methods that respond
5435 to map and layer projection changes.
5436 (MapCanvas.map_projection_changed): New. Takes the current view and
5437 projects it using the new projection. This does not cause the
5438 map to be redrawn at full extent.
5439 (MapCanvas.layer_projection_changed): New. Cause a redraw which
5440 will draw each layer in its new projection.
5441
5442 * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
5443 VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
5444 under Windows.
5445
5446 * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
5447 to twice sizeof(void*) because there are two digits for each
5448 hex byte.
5449
5450 2003-06-16 Bernhard Herzog <[email protected]>
5451
5452 Update to the layer interface: Direct access to the table,
5453 shapetable, shapefile and filename attributes is now actively
5454 deprecated by issuing deprecation warnings for all places where
5455 this happens.
5456
5457 * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
5458 to the instance variables table, shapetable, shapefile and
5459 filename via __getattr__ so that we can issue a deprecation
5460 warning.
5461 (Layer.SetShapeStore): Don't set the deprecated instance variables
5462 any more
5463 (Layer.SetShapeStore): Don't use deprecated layer instance
5464 variables
5465 (Layer.Destroy): No need to explicitly remove the instance
5466 variables any more
5467 (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
5468 instance variables
5469
5470 * Thuban/UI/classgen.py (ClassGenDialog.__init__)
5471 (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
5472 (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
5473 use deprecated layer instance variables
5474
5475 * Thuban/UI/classifier.py (Classifier.__init__): Don't use
5476 deprecated layer instance variables
5477
5478 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
5479 (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
5480 instance variables
5481
5482 * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
5483 deprecated layer instance variables
5484
5485 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
5486 deprecated layer instance variables
5487
5488 * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
5489 deprecated layer instance variables
5490
5491 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
5492 (MapRenderer.polygon_render_param): Don't use deprecated layer instance
5493 variables
5494
5495 * test/runtests.py (main): Turn Thuban's deprecation warnings into
5496 errors so that they're cought by the tests
5497
5498 * test/test_load.py (TestSingleLayer.test): Don't use deprecated
5499 layer instance variables
5500
5501 2003-06-16 Jonathan Coles <[email protected]>
5502
5503 Fix a problem under Windows whereby if the user double-clicks on a
5504 layer in the legend that tree item will expand or collapse as well
5505 as open the layer properties dialog. The state of the tree item
5506 should not be affected.
5507
5508 * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
5509 preventExpandCollapse and subscribe to expanding and collapsing
5510 events.
5511 (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
5512 collapsing events and will veto the event if it has been triggered
5513 by the user double clicking on a layer.
5514 (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
5515 that an expanding/collapsing event should be vetoed.
5516
5517 2003-06-13 Bernhard Herzog <[email protected]>
5518
5519 * Thuban/UI/classifier.py (Classifier.OnClose)
5520 (Classifier.map_layers_removed)
5521 (Classifier.layer_shapestore_replaced): Unsubscribe the messages
5522 in OnClose and not in map_layers_removed or
5523 layer_shapestore_replaced to make sure it always happens when the
5524 dialog is closed
5525
5526 2003-06-13 Jonathan Coles <[email protected]>
5527
5528 This puts back a fix for Windows where a panel is needed so that
5529 the background of the table view appears correctly.
5530
5531 * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
5532 object that can be used by derived classes to place any
5533 controls (including the grid) onto.
5534 (QueryTableFrame.__init__): Use the panel as the parent window
5535 for all the controls. Reparent the grid so that the panel is
5536 the parent. Call UpdateStatusText() to correctly initialize
5537 the status bar.
5538
5539 2003-06-13 Jonathan Coles <[email protected]>
5540
5541 * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
5542 from wxFrame (as opposed to wxDialog like the other classes)
5543 but otherwise behaves like the other classes. This is needed
5544 for the TableView which isn't really a dialog and needs to
5545 have a status bar and control buttons.
5546
5547 * Thuban/UI/tableview.py (TableGrid.__init__): Create an
5548 instance variable to keep track of how many rows are selected.
5549 Subscribe once to the the events we are interested in.
5550 (ThubanGrid.OnRangeSelect): Only handle event if event handling
5551 hasn't been turned off.
5552 (ThubanGrid.OnSelectCell): Only handle event if event handling
5553 hasn't been turned off.
5554 (ThubanGrid.ToggleEventListeners): Rather than subscribe None
5555 as an event listener (which changes the event handler stack)
5556 simply set an instance variable to False. This is checked in
5557 the event handlers.
5558 (ThubanGrid.GetNumberSelected): Return the number of currently
5559 selected rows.
5560 (TableFrame): Inherit from ThubanFrame so we can have a
5561 status bar and control buttons.
5562 (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
5563 Explicitly set which items are selected in the operator choice and
5564 action choice so there is always a valid selection. Fixes RTbug #1941.
5565 Subscribe to grid cell selection events so we can update the
5566 status bar.
5567 (QueryTableFrame.UpdateStatusText): Update the status bar with
5568 how many rows are in the grid, how many columns, and how many
5569 rows are selected.
5570 (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
5571 Call UpdateStatusText when cells are (de)selected.
5572 (QueryTableFrame.OnQuery): Use the string value in the value
5573 combo if either the selected item index is 0 or if the string
5574 cannot be found in the predefined list (this happens if the
5575 user changes the text). Fixes RTbug #1940.
5576 Only turn off the grid event listeners if there a query comes
5577 back with a none empty list of ids. in the case that the list
5578 is empty this causes a grid.ClearSelection() call to actually
5579 clear the grid selection which causes the selected items in
5580 the map to be deselected. Fixes RTbug #1939.
5581
5582 * test/test_save.py (XMLWriterTest.Encode): Check return values.
5583 Fixes RTbug #1851.
5584
5585 2003-06-13 Bernhard Herzog <[email protected]>
5586
5587 * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
5588 self.selected_shape with the current selection to make sure the
5589 contents of the dialog are up to date when it's shown for the
5590 first time.
5591 The dialog used to work without this by luck. The recent fix to
5592 the connector module 'broke' a 'feature' the identify view was
5593 relying on, i.e that subscribing to a message in response to
5594 receiving a message of that type would mean that the new
5595 subscriber would also be called for the same message.
5596
5597 2003-06-12 Jonathan Coles <[email protected]>
5598
5599 * extensions/thuban/gdalwarp.cpp: Removed debug printing as
5600 the image is rendered. Fixes RTbug #1937.
5601
5602 2003-06-12 Jonathan Coles <[email protected]>
5603
5604 * Thuban/Lib/fileutil.py: As is done under Windows, create the
5605 user directory if it doesn't exist on a posix system.
5606 Fixes RTbug #1815.
5607
5608 * Thuban/Model/resource.py (get_user_proj_files): Moved the
5609 called to get_application_dir here, so that the directory
5610 will only be called if this method is invoked.
5611
5612 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
5613 the projfilepath if no projection is selected.
5614
5615 2003-06-12 Jonathan Coles <[email protected]>
5616
5617 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
5618 the scalebar if the current map has no projection set.
5619
5620 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
5621 projfilepath label to just the basename of the projection file
5622 rather than include the entire path.
5623
5624 * Thuban/Model/resource.py: Fix missed proj functions that
5625 needed to be renamed.
5626
5627 2003-06-12 Jonathan Coles <[email protected]>
5628
5629 * Thuban/Model/classification.py: Removed assert statements that
5630 tested if the variable was an instance of Color.
5631
5632 * Thuban/Model/color.py (Color): Remove commented code that isn't
5633 used.
5634 (Transparent): Renamed from NoColor. Doesn't inherit from Color.
5635 Fixes RTbug #1835.
5636 (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
5637 Needed now that the class doesn't inherit from Color.
5638
5639 2003-06-12 Jonathan Coles <[email protected]>
5640
5641 * test/test_save.py (XMLWriterTest.testEncode): Explicitly
5642 check unicode strings.
5643
5644 * test/test_layer.py: Check for existence of gdal.
5645
5646 2003-06-12 Jonathan Coles <[email protected]>
5647
5648 * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
5649 that was in load.py
5650
5651 * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
5652 that was in save.py
5653
5654 2003-06-12 Jonathan Coles <[email protected]>
5655
5656 This is largely a collection of bug fixes. We also handle the
5657 case where gdal is not on the system. The XMLReader and XMLWriter
5658 classes were moved into there own files to resolve some circular
5659 import references and because they shouldn't really be in the
5660 file that is dediciated to reading/writing session files since
5661 they are also used elsewhere.
5662
5663 * Thuban/Model/classgen.py: Renamed functions to follow the
5664 function_names_with_underscores style. Fixes RTbug #1903.
5665 (calculate_quantiles): Raise ValueError if 'percents' is invalid.
5666
5667 * Thuban/Model/layer.py: Import gdal only if it available.
5668 (RasterLayer): Handle the case where the gdal library is unavailable.
5669 Addresses RTbug #1877.
5670
5671 * Thuban/Model/load.py (XMLReader): Moved into seperate file
5672 xmlreader.py.
5673
5674 2003-06-12 Jonathan Coles <[email protected]>
5675
5676 This is largely a collection of bug fixes. We also handle the
5677 case where gdal is not on the system. The XMLReader and XMLWriter
5678 classes were moved into there own files to resolve some circular
5679 import references and because they shouldn't really be in the
5680 file that is dediciated to reading/writing session files since
5681 they are also used elsewhere.
5682
5683 * Thuban/Model/classgen.py: Renamed functions to follow the
5684 function_names_with_underscores style. Fixes RTbug #1903.
5685 (calculate_quantiles): Raise ValueError if 'percents' is invalid.
5686
5687 * Thuban/Model/layer.py: Import gdal only if it available.
5688 (RasterLayer): Handle the case where the gdal library is unavailable.
5689 Addresses RTbug #1877.
5690
5691 * Thuban/Model/load.py (XMLReader): Moved into seperate file
5692 xmlreader.py.
5693
5694 * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
5695 file xmlwriter.py.
5696
5697 * Thuban/Model/resource.py: Renamed functions to following the
5698 function_names_with_underscores style.
5699 (has_gdal_support): New function that returns true if the gdal
5700 library is available. Addresses RTbug #1877.
5701
5702 * Thuban/UI/application.py (ThubanApplication.OpenSession):
5703 Display a message box if the gdal library is not available, but
5704 only if there are any layers that would use it. Addresses RTbug #1877.
5705
5706 * Thuban/UI/classgen.py: Use renamed projection resource functions.
5707 (GenUniformPanel.__CalcStepping): Fix a slight discrepency
5708 when using integers versus floats.
5709
5710 * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
5711 determine if the "Add Image Layer" menu option should be
5712 greyed out or not. Addresses RTbug #1877.
5713
5714 * Thuban/UI/projdialog.py: Use renamed projection resource functions.
5715
5716 * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
5717 optimize if a raster layer is visible. Fixes RTbug #1931.
5718 Only draw the raster layer if the gdal library is available.
5719 Addresses RTbug #1877.
5720
5721 * test/test_classgen.py: Add tests for generate_singletons,
5722 generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
5723 (test_calculate_quantiles): Fix some tests to catch the new
5724 ValueError that is raised.
5725
5726 * test/test_proj.py: Use renamed projection resource functions.
5727
5728 * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
5729 test for saving classified layers. Fixes RTbug #1902.
5730 (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
5731
5732 2003-06-12 Jan-Oliver Wagner <[email protected]>
5733
5734 Fix for http://intevation.de/rt/webrt?serial_num=1900.
5735
5736 * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
5737
5738 * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
5739 multiplechoicedialog.py rather than from the wxPython library.
5740
5741 2003-06-11 Frank Koormann <[email protected]>
5742
5743 * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
5744 update.
5745
5746 2003-06-11 Frank Koormann <[email protected]>
5747
5748 * Thuban/Lib/fileutil.py (get_application_dir): New function to
5749 determine the absolute .thuban/thuban directory under
5750 "posix" (os.expanduser) and "nt" (read AppData registry key).
5751
5752 * Thuban/Model/resource.py: Use get_application_dir
5753
5754 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
5755 Use get_application_dir.
5756
5757 2003-06-10 Bernhard Herzog <[email protected]>
5758
5759 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
5760 the messages MAP_LAYERS_REMOVED messages
5761 (LayerTableFrame.OnClose): Unsubscribe from it.
5762 (LayerTableFrame.map_layers_removed): New. Receiver for
5763 MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
5764 dialog is showing is removed.
5765
5766 2003-06-10 Bernhard Herzog <[email protected]>
5767
5768 * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
5769 of the receivers list so that unsubscribing in a receiver doesn't
5770 modify it while iterating over it.
5771
5772 * test/test_connector.py
5773 (ConnectorTest.test_disconnect_in_receiver): New. Test whether
5774 unsubscribing in a receiver works correctly. See docstring for
5775 details
5776
5777 2003-06-10 Bernhard Herzog <[email protected]>
5778
5779 * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
5780 message.
5781
5782 * Thuban/Model/layer.py (Layer.SetShapeStore): Send
5783 LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
5784 LAYER_CHANGED will still be sent if the classification changes.
5785
5786 * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
5787 parameter so we can subscribe to some of its messages
5788 (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
5789 and the layer's LAYER_SHAPESTORE_REPLACED
5790 (Classifier.unsubscribe_messages): New. Unsubscribe from message
5791 subscribed to in __init__
5792 (Classifier.map_layers_removed)
5793 (Classifier.layer_shapestore_replaced): receivers for the messages
5794 subscribed to in __init__. Unsubscribe and close the dialog
5795
5796 * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
5797 the map to the Classifier dialog
5798
5799 * test/test_layer.py (SetShapeStoreTests): Derive from
5800 SubscriberMixin as well so we can test messages
5801 (SetShapeStoreTests.setUp): Subscribe to some of the layer's
5802 messages
5803 (SetShapeStoreTests.tearDown): Clear the messages again
5804 (SetShapeStoreTests.test_sanity): Expand the doc-string and check
5805 for the modified flag too
5806 (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
5807 to check whether SetShapeStore sets the modified flag
5808 (SetShapeStoreTests.test_set_shape_store_different_field_name)
5809 (SetShapeStoreTests.test_set_shape_store_same_field)
5810 (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
5811 Add tests for the messages. This checks both the new
5812 LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
5813
5814 2003-06-06 Jan-Oliver Wagner <[email protected]>
5815
5816 * Thuban/UI/mainwindow.py: Improved and partly added help texts for
5817 the menu items.
5818
5819 2003-06-05 Frank Koormann <[email protected]>
5820
5821 * Thuban/UI/identifyview.py (IdentifyView.__init__):
5822 Layout reimplemented without panel. Make life easier to fit the list
5823 in the dialog.
5824
5825 2003-06-05 Frank Koormann <[email protected]>
5826
5827 * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
5828 once on initialisation (Former implementation resulted in multiple
5829 entries for each projection).
5830 (ProjFrame.__FillAvailList): selectProj as second optional parameter,
5831 if set, select the projection found under the specified name. This
5832 overwrites any other selection estimate.
5833 Removed projchoice filling from this method.
5834 (ProjFrame._OnSave, ProjFrame._OnAddToList):
5835 Updated call of ProjFrame.__FillAvailList
5836 (LCCPanel._DoLayout): Moved parameter controls in more common order.
5837
5838 * Resources/Projections/defaults.proj: Extended defaults representing
5839 various common European projections.
5840
5841 2003-06-05 Frank Koormann <[email protected]>
5842
5843 * Thuban/UI/identifyview.py (IdentifyView.__init__):
5844 Use ListCtrl instead of GridCtrl
5845
5846 * Thuban/Model/resource.py:
5847 Guess location of .thuban directory from tempdir parent directory.
5848
5849 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
5850 Guess location of .thuban directory from tempdir parent directory.
5851
5852 2003-06-04 Bernhard Herzog <[email protected]>
5853
5854 Do not cache the values returned by the tree widget's
5855 GetFirstChild and GetNextChild methods because it led to lots of
5856 segfaults. The new way requires more brute force but is more
5857 reliable.
5858
5859 * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
5860 variable layer2id
5861 (LegendTree.find_layer): New method to do with brute force what
5862 layer2id tried to accomplish
5863 (LegendTree._OnMsgLayerChanged)
5864 (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
5865 Use find_layer instead of layer2id
5866 (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
5867 update layer2id anymore
5868 (LegendTree._OnMsgMapLayersRemoved)
5869 (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
5870
5871 2003-06-03 Thomas Koester <[email protected]>
5872
5873 * Thuban/Model/classgen.py (GenQuantiles0): New function.
5874
5875 2003-06-02 Bernhard Herzog <[email protected]>
5876
5877 * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
5878 New commands.
5879 (main_menu): Add the new commands.
5880 (MainWindow.TableRename): New. Implementation of the table_rename
5881 command.
5882 (MainWindow.RenameLayer): New. Implementation of the layer_rename
5883 command.
5884
5885 * Thuban/Model/session.py (Session.AddTable): call self.changed to
5886 set the modified flag
5887
5888 * test/test_session.py (TestSessionSimple.test_add_table): Test
5889 whether the modified flag is set properly
5890
5891 * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
5892 instead of issue so that the modified flags get updated.
5893
5894 * test/test_base.py (SomeTitledObject): Derive from Modifiable
5895 instead of Publisher to reflect reality better and to accomodate
5896 the fact that SetTitle now calls changed instead of issue
5897
5898 2003-06-02 Bernhard Herzog <[email protected]>
5899
5900 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
5901 acquisition has to happen before the try in a try-finally.
5902
5903 2003-06-02 Bernhard Herzog <[email protected]>
5904
5905 * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
5906 possible that a layer is removed that is not currently selected in
5907 the legend so don't check for this.
5908
5909 2003-05-30 Bernhard Herzog <[email protected]>
5910
5911 * Thuban/Model/layer.py (Layer.Destroy): Set all instance
5912 variables to None that have direct or indirect references to
5913 shapefiles or dbf files to make sure that they do go away and the
5914 files are closed.
5915
5916 2003-05-30 Bernhard Herzog <[email protected]>
5917
5918 * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
5919 availImgListIndices when a new image list is created
5920
5921 2003-05-30 Bernhard Herzog <[email protected]>
5922
5923 * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
5924 changing_selection to indicate whether the LegendTree code itself
5925 is currently changing the selection
5926 (LegendTree.normalize_selection): New method to normalize the
5927 selection by selecting the layer item even if the user clicked on
5928 the classification.
5929 (LegendTree._OnSelChanged): normalize the selection. This works
5930 around a bug in wx which doesn't keep track of the selection
5931 properly when subtrees are deleted.
5932
5933 2003-05-30 Bernhard Herzog <[email protected]>
5934
5935 * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
5936 maximum and minimum scale factors.
5937
5938 * test/test_classgen.py (ClassGenTest.test): Update to reflect the
5939 changes in classgen.py
5940
5941 2003-05-30 Jonathan Coles <[email protected]>
5942
5943 * Thuban/Model/classgen.py: Remove ClassGenerator class but make
5944 all the methods functions. Fixes RTBug #1903.
5945
5946 * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
5947 to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
5948 RTBug #1907.
5949
5950 * Thuban/UI/classgen.py: Use classgen functions that were part
5951 of the ClassGenerator class. Put try/finally blocks around
5952 code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
5953 RTBug #1904.
5954
5955 * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
5956
5957 * Thuban/UI/legend.py: The legend was cleared and repopulated any
5958 time something changed which caused some state to be lost such
5959 as which children were expanded or collapsed. Fixes RTBug #1901.
5960 (LegendTree._OnMsgMapLayersAdded): Add only new layers.
5961 (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
5962 the legend but not in the map.
5963 (LegendTree.__FillTree): Move main functionality out into smaller
5964 methods that can be used by other methods.
5965 (LegendTree.__FillTreeLayer): Reuse old slots in the image list
5966 if they are available.
5967 (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
5968 that we override the wxTreeCtrl method. Iterate over children
5969 and call __RemoveLayer.
5970 (LegendTree.__AddLayer): New. Add a new layer to the legend.
5971 (LegendTree.__RemoveLayer): Remove a layer from the legend.
5972 (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
5973 Should only be called with the id of a layer branch.
5974 (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
5975 Returns the root item or creates one if necessary.
5976
5977 * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
5978 ProjectRasterFile with tuple arguments instead of strings.
5979
5980 * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
5981 with try/finally. Fixes RTBug #1904.
5982
5983 * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
5984 with try/finally. Fixes RTBug #1904.
5985 (MapCanvas.FitSelectedToWindow): If a single point is selected
5986 simply center it on the display. Fixes RTBug #1849.
5987
5988 * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
5989 to be compiled as a standalone app. Now the code can only be
5990 called from Python which simplifies the parameter passing.
5991 (ProjectRasterFile): Handle Python arguments. Remove code that
5992 checks for a destination dataset. Add more clean up code.
5993
5994 * test/test_map.py (TestMapWithContents.test_raise_layer_top,
5995 TestMapWithContents.test_lower_layer_bottom):
5996 Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
5997 Fixes RTBug #1907.
5998
5999 * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
6000 extent to the map when the legend is toggled. Fixes RTBug #1881.
6001
6002 2003-05-29 Jan-Oliver Wagner <[email protected]>
6003
6004 * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
6005 unsubscribes all that is subcribed in __init__.
6006
6007 2003-05-28 Bernhard Herzog <[email protected]>
6008
6009 * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
6010 (MainWindow.CanDuplicateLayer): New methods to implement the
6011 Layer/Duplicate command.
6012 (layer_duplicate command): New.
6013 (main_menu): Add layer_duplicate to the Layer menu.
6014
6015 2003-05-28 Bernhard Herzog <[email protected]>
6016
6017 * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
6018 renderer so that NULL/None values get displayed differently (by a
6019 gray rectangle).
6020 (TableGrid.__init__): Override the default renderers
6021
6022 2003-05-28 Bernhard Herzog <[email protected]>
6023
6024 * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
6025 classification to "None" if the type of the field has changed.
6026
6027 * test/test_layer.py (SetShapeStoreTests): New. Class with a few
6028 test for the Layer.SetShapeStore method
6029
6030 2003-05-28 Jan-Oliver Wagner <[email protected]>
6031
6032 * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
6033 does not necessarily have a filename).
6034
6035 2003-05-28 Jan-Oliver Wagner <[email protected]>
6036
6037 * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
6038 sort the selection list for the dialog.
6039
6040 2003-05-28 Frank Koormann <[email protected]>
6041
6042 * extensions/thuban/wxproj.cpp
6043 (project_point): Removed cast to int for projected point coordinates.
6044 (shape_centroid): Return last point if all polygon vertices fall
6045 to one point.
6046
6047 2003-05-28 Bernhard Herzog <[email protected]>
6048
6049 * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
6050 with layers that don't have shapestores, i.e. raster layers.
6051
6052 2003-05-28 Bernhard Herzog <[email protected]>
6053
6054 * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
6055 when determining the title from the filename.
6056
6057 * test/test_dbf_table.py (TestDBFTable.test_title): Update to
6058 reflect changes in the way the title is derived from the filename
6059
6060 2003-05-28 Frank Koormann <[email protected]>
6061
6062 * Thuban/UI/mainwindow.py (MainWindow.TableShow):
6063 Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
6064
6065 2003-05-27 Bernhard Herzog <[email protected]>
6066
6067 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
6068 delegate SelectedLayer.
6069 (MainWindow.LayerUnjoinTable): Implement.
6070 (_can_unjoin): New. Helper function for the sensitivity of the
6071 layer/unjoin command.
6072
6073 * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
6074 (DerivedShapeStore.OrigShapeStore): New. Return the original
6075 shapestore. Used to figure out how to unjoin.
6076 (DerivedShapeStore.Shapefile): Fix a typo.
6077
6078 2003-05-27 Bernhard Herzog <[email protected]>
6079
6080 * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
6081 well
6082 (JoinDialog.__init__): Use the layer parameter and only build the
6083 left choice when a layer is given
6084 (JoinDialog.OnJoin): Handle layer joins as well
6085 (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
6086 that the user selects the "Select..." item. The sensitivitly
6087 updating is now in update_sensitivity
6088 (JoinDialog.y): New method to refactor the sensitivity update of
6089 the join button into its own method.
6090
6091 * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
6092
6093 2003-05-27 Bernhard Herzog <[email protected]>
6094
6095 * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
6096 iff there are unreferenced tables in the session
6097
6098 2003-05-27 Bernhard Herzog <[email protected]>
6099
6100 * Thuban/Model/messages.py (TABLE_REMOVED): New message.
6101
6102 * Thuban/Model/session.py (Session.UnreferencedTables): New method
6103 to return tables that are not referenced by other tables or shape
6104 stores and can be removed.
6105 (Session.RemoveTable): Issue a TABLE_REMOVED message after
6106 removing the table
6107
6108 * Thuban/UI/mainwindow.py: Remove unused imports
6109 (MainWindow.TableClose): Implement.
6110
6111 * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
6112 messages so that the frame will be automatically closed when a new
6113 session is opened or the table is removed.
6114 (TableFrame.OnClose): Unsubscribe the Subscriptions made in
6115 __init__
6116 (TableFrame.close_on_session_replaced)
6117 (TableFrame.close_on_table_removed): New. Subscribers that close
6118 the window
6119
6120 * test/test_session.py (TestSessionMessages.test_remove_table)
6121 (TestSessionSimple.test_remove_table): Move the test to
6122 TestSessionSimple and add test for the TABLE_REMOVED message
6123 (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
6124 (TestSessionSimple.test_unreferenced_tables) New. Test for the
6125 UnreferencedTables method.
6126 (UnreferencedTablesTests): New. Class with some more sophisticated
6127 tests for UnreferencedTables.
6128
6129 2003-05-27 Frank Koormann <[email protected]>
6130
6131 * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
6132 display has some unwanted side effects. Removed again.
6133
6134 2003-05-27 Frank Koormann <[email protected]>
6135
6136 * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
6137
6138 * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
6139
6140 2003-05-27 Jan-Oliver Wagner <[email protected]>
6141
6142 * test/test_menu.py (MenuTest.test): Added test for
6143 Menu.RemoveItem().
6144
6145 * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
6146 the menu.
6147
6148 2003-05-27 Frank Koormann <[email protected]>
6149
6150 Nonmodal dialogs without parent (i.e. they can fall behind the main
6151 window)
6152
6153 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
6154 all dialogs in the dialogs dictionary and the canvas.
6155
6156 * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
6157 parent, i.e. can fall behind other windows.
6158 (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
6159 dictionary before removing it.
6160
6161 * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
6162
6163 * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
6164 * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
6165 * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
6166
6167 2003-05-27 Bernhard Herzog <[email protected]>
6168
6169 * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
6170 tableview dialog
6171 (MainWindow.TableShow): Use ShowTableView to open the dialogs.
6172 Also, don't use the table's titles as the dialog names. The titles
6173 aren't guaranteed to be unique.
6174 (MainWindow.TableOpen): Open a table view dialog after opening the
6175 table
6176
6177 2003-05-27 Bernhard Herzog <[email protected]>
6178
6179 * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
6180 effect can be achieved by simply closing the window showing the
6181 table.
6182 (MainWindow.TableHide): Removed.
6183 (main_menu): Removed "table_hide"
6184
6185 2003-05-27 Frank Koormann <[email protected]>
6186
6187 Fix legend tree display problems under Win32
6188
6189 * Thuban/UI/legend.py: BMP_SIZE_W = 15
6190 (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
6191 (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
6192
6193 * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
6194
6195 2003-05-27 Jan-Oliver Wagner <[email protected]>
6196
6197 * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
6198 'after' now allows to insert separators almost anywhere in the menu.
6199
6200 2003-05-27 Frank Koormann <[email protected]>
6201
6202 * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
6203 "S" of selection box label to hint on hot key (Alt-S). Works under
6204 Win32 but is ignored under GTK.
6205
6206 2003-05-26 Frank Koormann <[email protected]>
6207
6208 * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
6209 Center Choices.
6210
6211 2003-05-26 Bernhard Herzog <[email protected]>
6212
6213 Remove the Precision methods again. They're too DBF specific to be
6214 part of the table interface and they're only used in table_to_dbf
6215 anyway.
6216
6217 * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
6218 fixed precision of 12 for doubles.
6219 (TransientTableBase.Precision): Removed
6220 (AutoTransientTable.Width): Delegate to self.table.
6221
6222 * Thuban/Model/table.py (DBFTable.Precision)
6223 (MemoryTable.Precision): Removed.
6224 (MemoryTable.Width): Use a fixed precision of 12 for doubles.
6225 (table_to_dbf): Use a fixed precision of 12 for floats unless the
6226 column object specifies something else.
6227
6228 * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
6229 test for table_to_dbf
6230
6231 2003-05-26 Bernhard Herzog <[email protected]>
6232
6233 * test/test_transientdb.py
6234 (TestTransientTable.run_iceland_political_tests): Fix a comment.
6235
6236 2003-05-26 Bernhard Herzog <[email protected]>
6237
6238 * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
6239 implementation. Mark parts of the file format strings for
6240 localization.
6241
6242 * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
6243 file and add the table to the tables managed by the session
6244
6245 * test/test_session.py (TestSessionSimple.test_open_table_file):
6246 New. test case for OpenTableFile
6247
6248 2003-05-26 Jan-Oliver Wagner <[email protected]>
6249
6250 * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
6251 Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
6252 Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
6253 Replace the true/false of wxWindows by True/False of Python 2.2.1.
6254
6255 2003-05-26 Jan-Oliver Wagner <[email protected]>
6256
6257 * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
6258 already a selection present, update the grid accordingly.
6259
6260 * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
6261 resizeable and increase its initial size.
6262
6263 2003-05-26 Frank Koormann <[email protected]>
6264
6265 Table export functionality
6266
6267 * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
6268 Return width (in characters) for a column.
6269 (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
6270 (table_to_dbf): Write table to dbf file.
6271 (table_to_csv): Write table to csv file.
6272
6273 * Thuban/Model/transientdb.py (TransientTableBase.Width,
6274 TransientTableBase.Precision): Return column width and precision.
6275
6276 * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
6277 or table_to_csv depending on file selection.
6278
6279 * test/test_dbf_table.py:
6280 Test table_to_dbf (extension of former part of test).
6281
6282 * test/test_csv_table.py:
6283 Test table_to_csv.
6284
6285 2003-05-23 Jan-Oliver Wagner <[email protected]>
6286
6287 * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
6288 Use QueryTableFrame instead of TableFrame.
6289
6290 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
6291 table window with 'Layer Table:' instead of 'Table:'.
6292
6293 2003-05-23 Jan-Oliver Wagner <[email protected]>
6294
6295 Give all tables a title via mix-in TitledObject.LayerShowTable
6296
6297 * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
6298 only if it exists.
6299
6300 * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
6301 and call its init-method with a default title. Remove Title() method.
6302
6303 * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
6304 AutoTransientTable): mix-in TitledObject and call its init-method with
6305 a default title. Remove Title() method.
6306
6307 2003-05-23 Bernhard Herzog <[email protected]>
6308
6309 * Thuban/Model/session.py (Session.AddShapeStore): Define
6310 AddShapeStore analogously to AddTable.
6311
6312 * test/test_session.py (TestSessionSimple.test_add_shapestore):
6313 New. Test for AddShapeStore
6314
6315 2003-05-23 Jan-Oliver Wagner <[email protected]>
6316
6317 Introducing QueryTableFrame and a very coarse ShowTable implementation.
6318
6319 * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
6320 class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
6321 The latter implements the selection GUI without dependency on a layer.
6322 LayerTableFrame now is derived from QueryTableFrame and connects
6323 to a layer.
6324
6325 * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
6326 implementation that still needs work.
6327
6328 * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
6329
6330 2003-05-22 Frank Koormann <[email protected]>
6331
6332 * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
6333 Added "outer_join = False" as optional parameter.
6334 (TransientJoinedTable.create): If outer join is true, perform a
6335 "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
6336 the left table. Records not matching are filled with 0 / None.
6337
6338 * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
6339 (JoinDialog.OnJoin): Consider outer join check box.
6340
6341 2003-05-22 Bernhard Herzog <[email protected]>
6342
6343 * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
6344 somewhat safer way. Storing the traceback in a local variable can
6345 lead to memory leaks
6346
6347 2003-05-22 Bernhard Herzog <[email protected]>
6348
6349 * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
6350 the wxMessageDialog's Destroy() method.
6351
6352 2003-05-22 Frank Koormann <[email protected]>
6353
6354 * Thuban/UI/join.py (JoinDialog.__init__): Make use of
6355 TransientTable.Title()
6356
6357 2003-05-22 Frank Koormann <[email protected]>
6358
6359 Join Dialog, initial version.
6360
6361 * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
6362
6363 * Thuban/UI/join.py (JoinDialog): Functional implementation of
6364 former framework. Renamed Table1/Table2 to LeftTable/RightTable
6365 in all occurences.
6366
6367 * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
6368 Typo fixed.
6369
6370 2003-05-22 Bernhard Herzog <[email protected]>
6371
6372 Give the tables titles so that the GUI can display more meaningful
6373 names. For now the titles are fixed but depend on e.g. filenames
6374 or the titles of the joined tables.
6375
6376 * Thuban/Model/transientdb.py (TransientTable.Title)
6377 (TransientJoinedTable.Title, AutoTransientTable.Title): New.
6378
6379 * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
6380
6381 * test/test_transientdb.py
6382 (TestTransientTable.test_auto_transient_table_title): New. Test
6383 for the Title method
6384 (TestTransientTable.test_transient_joined_table)
6385 (TestTransientTable.test_transient_table): Add test for the Title
6386 methods
6387
6388 * test/test_memory_table.py (TestMemoryTable.test_title): New.
6389 Test for the Title method
6390
6391 * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
6392 the Title method
6393
6394 2003-05-22 Bernhard Herzog <[email protected]>
6395
6396 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
6397 Provide a better way to destroy the layers
6398 (TestLayer.test_base_layer, TestLayer.test_arc_layer)
6399 (TestLayer.test_point_layer, TestLayer.test_empty_layer)
6400 (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
6401 the new way to destroy the layers.
6402 (TestLayer.test_derived_store): New. Test for using a layer with a
6403 DerivedShapeStore
6404
6405 * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
6406 filename if the shape store actually has one.
6407
6408 2003-05-22 Bernhard Herzog <[email protected]>
6409
6410 * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
6411 for the filename
6412
6413 * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
6414 for the FileName method
6415 (TestDBFTableWriting.test_write): Fix spelling of filename
6416
6417 2003-05-22 Thomas Koester <[email protected]>
6418
6419 * Thuban/Model/range.py, test/test_range.py: Brought over new Range
6420 from SciParam that now really is immutable.
6421
6422 2003-05-22 Frank Koormann <[email protected]>
6423
6424 Layer Top/Bottom placement added to legend.
6425
6426 * Thuban/UI/legend.py
6427 (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
6428 bound to tool events.
6429 (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
6430 New, methods binding the event methods with the map methods.
6431
6432 * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
6433 layer at top/bottom of layer stack.
6434
6435 * Resources/Bitmaps/top_layer.xpm: New button icon.
6436
6437 * Resources/Bitmaps/bottom_layer.xpm: New button icon.
6438
6439 2003-05-22 Bernhard Herzog <[email protected]>
6440
6441 * Thuban/Model/session.py (Session.RemoveTable): New method to
6442 remove tables
6443
6444 * test/test_session.py (TestSessionSimple.test_remove_table): New.
6445 Test for RemoveTable
6446
6447 2003-05-22 Thomas Koester <[email protected]>
6448
6449 * Thuban/Model/classgen.py: Added short module doc string and CVS id.
6450 (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
6451
6452 2003-05-22 Bernhard Herzog <[email protected]>
6453
6454 Implement a way to discover dependencies between tables and
6455 shapestores.
6456
6457 * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
6458 (TransientJoinedTable.Dependencies)
6459 (AutoTransientTable.SimpleQuery): New. Implement the dependencies
6460 interface
6461 (TransientJoinedTable.__init__): Keep tack of the original table
6462 objects in addition to the corresponding transient tables.
6463
6464 * Thuban/Model/table.py (DBFTable.Dependencies)
6465 (MemoryTable.Dependencies): New. Implement the dependencies
6466 interface
6467
6468 * Thuban/Model/data.py (ShapeTable): New. Helper class for
6469 ShapefileStore
6470 (ShapefileStore.__init__): Use ShapeTable instead of
6471 AutoTransientTable
6472 (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
6473 (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
6474 methods for filename and type
6475 (ShapefileStore.Dependencies): New. Implement the dependencies
6476 interface
6477 (DerivedShapeStore): New class to replace SimpleStore. The main
6478 difference to SimpleStore is that it depends not on a shapefile
6479 but another shapestore which expresses the dependencies a bit
6480 better
6481 (SimpleStore.__init__): Add deprecation warning.
6482
6483 * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
6484 Test for the Dependencies method.
6485
6486 * test/test_memory_table.py (TestMemoryTable.test_dependencies):
6487 New. Test for the Dependencies method.
6488
6489 * test/test_transientdb.py
6490 (TestTransientTable.test_auto_transient_table_dependencies): New.
6491 Test for the Dependencies method.
6492 (TestTransientTable.test_transient_joined_table): Add test for the
6493 Dependencies method.
6494
6495 * test/test_session.py (TestSessionSimple.setUp)
6496 (TestSessionSimple.tearDown): New. Implement a better way to
6497 destroy the sessions.
6498 (TestSessionSimple.test_initial_state)
6499 (TestSessionSimple.test_add_table): Bind session to self.session
6500 so that it's destroyed by tearDown
6501 (TestSessionSimple.test_open_shapefile): New. Test for
6502 OpenShapefile and the object it returns
6503
6504 2003-05-22 Bernhard Herzog <[email protected]>
6505
6506 * Thuban/Model/session.py (Session.AddTable): New method to
6507 register tables with the session.
6508 (Session.Tables): Return the tables registered with AddTable too.
6509
6510 * test/test_session.py (TestSessionSimple.test_add_table): New.
6511 Test case for the AddTable method
6512
6513 2003-05-22 Frank Koormann <[email protected]>
6514
6515 UI polishing updates: Place main buttons (OK, Cancel, etc) in the
6516 lower right corner, center labels for selections, initialize controls
6517 in reasonable order for keyboard navigation.
6518
6519 * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
6520 (ProjFrame.__DoOnProjAvail): Determine position of current projection
6521 using the wxListBox.FindString() method. Still a problem (#1886)
6522
6523 * Thuban/UI/classifier.py
6524 (Classifier.__init__, SelectPropertiesDialog.__init__)
6525
6526 * Thuban/UI/classgen.py (ClassGenDialog.__init__,
6527 (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
6528 different classification types from here to __init__.
6529 (GenUniquePanel.__init__): Set the column width of the first field
6530 in the Field ListCtrl to the full width.
6531
6532 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
6533 Button to 'Export'. Center Buttons in Selection Box, set Focus to
6534 Grid.
6535 (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
6536 changes focus to the Selection when pressing "Alt-S".
6537
6538 * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
6539 the text if not visible. The italic font sometimes exceeds the
6540 rendering area.
6541
6542 2003-05-21 Jonathan Coles <[email protected]>
6543
6544 * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
6545 to OnClose so that Thuban closes correctly.
6546
6547 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
6548 DockFrame.OnClose, not DockFrame._OnClose.
6549
6550 2003-05-21 Jonathan Coles <[email protected]>
6551
6552 * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
6553 references to 'inf' and use new Range __init__ to pass floats
6554 directly rather than converting them to strings first.
6555 Fixes RTBug #1876.
6556
6557 * Thuban/Model/classification.py (ClassGroupRange.SetRange):
6558 Use new Range ___init__ to pass floats.
6559
6560 * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
6561 filename is a valid image file. Throw IOError otherwise.
6562
6563 * Thuban/Model/range.py: Brought over new Range from SciParam that
6564 is immutable and has an __init__ which can accept floats.
6565
6566 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
6567 into try block. AddLayer doesn't throw any exceptions anymore.
6568 (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
6569 try block.
6570
6571 * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
6572 the first item in choices. Fixes RTBug #1882.
6573
6574 * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
6575 has gone to 0 which is a serious problem. abort.
6576 (MapRenderer.draw_raster_layer): Catch IOError seperately and
6577 print the error from GDAL.
6578
6579 * Thuban/UI/tableview.py (TableGrid.__init__): Call
6580 ToggleEventListeners to turn on listening.
6581 (TableGrid.ToggleEventListeners): New. Turns event listening on
6582 and off so as to prevent excessive messages.
6583 (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
6584 to suppress excessive messages when selecting many rows.
6585 Fixes RTBug #1880.
6586
6587 * Thuban/UI/view.py: Added checks against if scale == 0. This
6588 is a serious problem that can occur when an image without
6589 geo data is loading and causes the map projection bounds to
6590 go to infinity. Right now, the solution is to simply try
6591 to recover.
6592
6593 * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
6594 to set the MFILEReceiver attributes even if the data is NULL.
6595
6596 * extensions/thuban/gdalwarp.cpp: Improved the error handling
6597 and passed GDAL messages back up to the Python layer. Also
6598 tried to fix some memory leaks that were present in the original
6599 utility but didn't matter because the program aborted.
6600
6601 * test/test_range.py: Copied over tests from SciParam. Removed
6602 tests against importing. Fixes RTBug #1867.
6603
6604 2003-05-21 Bernhard Herzog <[email protected]>
6605
6606 * test/test_load.py: Remove unused imports and restructure the
6607 test code
6608 (LoadSessionTest): Split into one class for each test and turn
6609 LoadSessionTest itself into the base class for all such session
6610 tests.
6611 (ClassificationTest): New base class for load tests that test
6612 classifications
6613 (TestSingleLayer, TestLayerVisibility, TestClassification)
6614 (TestLabels, TestLayerProjection, TestRasterLayer): New classes
6615 for the individual tests
6616
6617 * test/support.py (FileLoadTestCase.filename): New base class for
6618 file loading tests
6619
6620 2003-05-21 Jan-Oliver Wagner <[email protected]>
6621
6622 * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
6623 Mercator' to 'UTM Zone 32' as a more convenient example.
6624 Added 'Gauss Krueger Zone 6'.
6625
6626 * Data/iceland_sample_raster.thuban: political polygon now
6627 filled transparent to have the raster image visible at once.
6628
6629 2003-05-21 Frank Koormann <[email protected]>
6630
6631 * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
6632 OnClose() to keep in sync with extensions. Internally Thuban
6633 still uses "underscored" names.
6634
6635 2003-05-20 Jonathan Coles <[email protected]>
6636
6637 This puts back Raster layer support. These layers support projections
6638 through the GDAL library. Currently, the CVS version is being used.
6639 There are no Debian packages available although this may change soon.
6640 A GDAL driver was extended to support writing to memory rather to
6641 files.
6642
6643 There is still some work that needs to be done, such as some error
6644 handling when loading invalid images or when there is a problem
6645 projecting the image. This putback simply checks in the majority
6646 of the work.
6647
6648 * setup.py: Add gdalwarp library extension.
6649
6650 * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
6651 Defaults to False, but can be overridden by subclasses if they
6652 support classification.
6653 (RasterLayer): New. Defines a new layer that represents an
6654 image.
6655
6656 * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
6657 tag handler.
6658 (SessionLoader.start_layer): Encode the filename.
6659 (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
6660 New. Supports reading a rasterlayer tag.
6661
6662 * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
6663
6664 * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
6665 get a string in Latin1. If we get such as string convert it to
6666 unicode first, otherwise leave if alone before encoding.
6667 (SessionSaver.write_layer): Add support for writing both Layers
6668 and RasterLayers.
6669
6670 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
6671 The right argument may not be a string, it could also be a Column.
6672
6673 * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
6674 Make initial window size 600x400. Fixes RTBug #1872.
6675
6676 * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
6677 the dialog is constructed so that we can support layers that
6678 do not have classifications.
6679 (Classifier._OnTry): Only build a classification if the layer
6680 supports one.
6681
6682 * Thuban/UI/legend.py: Change all checks that a layer is an
6683 instance of Layer into checks against BaseLayer.
6684 (LegendTree.__FillTreeLayer): Only add children to a branch if
6685 the layer supports classification.
6686
6687 * Thuban/UI/mainwindow.py (MainWindow.NewSession,
6688 MainWindow.OpenSession): Don't proceed with an action if the
6689 user chooses Cancel when they are asked to save changes.
6690 (MainWindow.AddRasterLayer): New. Open a dialog to allow the
6691 user to select an image file. Create a new RasterLayer and add
6692 it to the map.
6693
6694 * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
6695 for rendering RasterLayer layers.
6696 (MapRenderer.draw_raster_layer): Actually method that calls
6697 the GDALWarp python wrapper and constructs an image from the
6698 data returned.
6699
6700 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
6701 Choices symbols to match those used in the table query method.
6702 Replace deprecated method calls on table with new method names.
6703
6704 * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
6705 how small the scale can get. This still needs more testing.
6706
6707 * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
6708 Provides a driver to output in .bmp format.
6709
6710 * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
6711 New. Provides IO routines which write to memory, rather than a file.
6712
6713 * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
6714 of the gdalwarp utility provided in GDAL. Added function calls
6715 that can be accessed from python.
6716
6717 * Data/iceland_sample_raster.thuban: New. Sample file that uses
6718 a raster layer.
6719
6720 * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
6721 layer image data.
6722
6723 * Doc/thuban.dtd: Added rasterlayer attribute definition.
6724
6725 * test/test_layer.py, test/test_load.py, test/test_save.py: Added
6726 tests associated with the raster layer code.
6727
6728 * test/test_transientdb.py
6729 (TestTransientTable.test_auto_transient_table_query): Added a test
6730 for using a Column object as the "right" parameter to a query.
6731
6732 2003-05-19 Frank Koormann <[email protected]>
6733
6734 * Thuban/version.py (get_changelog_date):
6735 Catch exceptions if ChangeLog does not exist.
6736
6737 * Thuban/UI/view.py (MapCanvas.Export): Bugfix
6738
6739 2003-05-19 Frank Koormann <[email protected]>
6740
6741 Extended version information for Thuban
6742
6743 * Thuban/version.py: New, version information for Thuban: Last
6744 modification date and last ChangeLog entry date.
6745
6746 * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
6747 information: Display Thuban, wxPython and Python version.
6748
6749 2003-05-16 Bernhard Herzog <[email protected]>
6750
6751 * Thuban/Model/save.py: Remove some unused imports including the
6752 __future__ import for nested_scopes as Thuban relies on Python 2.2
6753 now.
6754 (XMLWriter.encode): Remove the special case for a None argument.
6755 In the saver encode is always called with a string argument.
6756
6757 2003-05-16 Bernhard Herzog <[email protected]>
6758
6759 * Thuban/UI/__init__.py: Remove the work-around for the locale bug
6760 in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
6761 of the bug was that e.g. float("1.2") would fail. Thuban now
6762 requires 2.4.x.
6763
6764 2003-05-16 Frank Koormann <[email protected]>
6765
6766 Printing enhancement and WMF export (under Win32)
6767
6768 * Thuban/UI/renderer.py (ExportRenderer): New, derived from
6769 ScreenRenderer. Renders Map, Legend and Scalebar for export.
6770 (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
6771 PrintRender.
6772
6773 * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
6774 to fullfil information needed for PrinterRenderer.
6775 (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
6776 (MapCanvas.Print): Adapted to new MapPrintout.
6777 (OutputTransform): General calculations to transform from canvas
6778 coordinates to export/printing devices.
6779
6780 * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
6781 new method_command to call ExportMap, with platform dependency (only
6782 __WXMSW__)
6783
6784 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
6785 of scalebar drawing area as new parameters.
6786
6787 * Thuban/Model/scalebar.py (roundInterval): round long instead of int
6788
6789 * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
6790 Update to extended scalebar.DrawScalebar header.
6791
6792 * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
6793
6794 * test/test_scalebar.py: Made test executable as standalone.
6795
6796 2003-05-16 Bernhard Herzog <[email protected]>
6797
6798 * Thuban/Model/table.py (Table): Remove this compatibility alias
6799 for DBFTable.
6800
6801 * test/test_table.py: Import DBFTable as Table because that alias
6802 doesn't exist anymore.
6803
6804 * Thuban/UI/classgen.py: Remove some unused imports
6805
6806 2003-05-14 Jonathan Coles <[email protected]>
6807
6808 * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
6809 Fix docstring.
6810 (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
6811 (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
6812 values of the supplied range to determine the beginning and end
6813 bounds of the generated classes.
6814
6815 * Thuban/Model/range.py (Range.number_re): Now accepts floats that
6816 do not have a leading 0 (.5 is now accepted as well as 0.5).
6817
6818 * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
6819 call to ClassGenerator.GenUniformDistribution.
6820
6821 * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
6822 layout bug with the 'Projection' label.
6823
6824 * test/support.py (FloatTestCase): New. Needed for the Range tests.
6825
6826 * test/test_range.py: New. Imported from SciParam.
6827
6828 2003-05-12 Jonathan Coles <[email protected]>
6829
6830 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
6831 to table.UniqueValues() with calls that retrieve all the values
6832 from the table. This will need to be replaced by a method on table
6833 which can simply return the list (perhaps more efficiently).
6834
6835 2003-05-12 Jonathan Coles <[email protected]>
6836
6837 The return value of ClassGenerator.CalculateQuantiles has changed.
6838 Refer to the documentation for details.
6839
6840 * test/test_classgen.py: Modified Quantile tests to use the
6841 new return values.
6842
6843 * Thuban/Model/classgen.py
6844 (ClassGenerator.GenQuantiles): Add comments describing the parameters,
6845 use new return values from CalculateQuantiles to produce the correct
6846 range bounds in the Classification.
6847 (ClassGenerator.CalculateQuantiles): Add more comments describing
6848 the return values and parameters. Make minor adjustments to improve
6849 the legibility of the code. Fix problem with adjusted not being set
6850 in most cases.
6851
6852 2003-05-12 Frank Koormann <[email protected]>
6853
6854 * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
6855 and latin1. Fixes #1851 finally.
6856
6857 2003-05-09 Jonathan Coles <[email protected]>
6858
6859 * test/test_classgen.py: New. Tests the Quantile algorithm.
6860
6861 * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
6862 Clean up debugging statement, add comments, fix a small bug in the
6863 returned adjusted percentiles.
6864
6865 2003-05-09 Jonathan Coles <[email protected]>
6866
6867 Introduces Range class from SciParam into the ClassGroupRange class,
6868 and such ranges can now be saved and loaded from disk.
6869
6870 Quantiles are now available in the Classification Generator.
6871
6872 Initial support for building Queries on a table. Doesn't do anything
6873 but run some tests.
6874
6875 * Thuban/Model/classification.py: Explicit imports.
6876 (ClassGroupRange): Use the Range class to store the underlying
6877 range information. The interface remains the same, except for
6878 GetRange(), and you can also supply a Range object as the min
6879 parameter to SetRange or __init__.
6880
6881 * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
6882 string appropriately for use in Thuban. Fixes RTbug #1851.
6883 (SessionLoader.end_projection): Handle the context of the
6884 projection tag a bit better by looking at what objects are not
6885 None. There was an assumption that a projection tag for a map
6886 could occur before any layers.
6887 (SessionLoader.start_clrange): Provide backward compatibility for
6888 reading min/max values as well as the new range parameter.
6889
6890 * Thuban/Model/map.py: Explicit imports.
6891
6892 * Thuban/Model/resource.py: Import _.
6893 (ProjFileSaver.write): write header using projfile.dtd.
6894
6895 * Thuban/Model/save.py: Explicit imports.
6896 (XMLWriter.encode): New. Encode the given string from a format
6897 used by Thuban into UTF-8. Fixes RTbug #1851.
6898
6899 * Thuban/UI/classgen.py: Explicit imports.
6900 (ClassGenDialog.__init__): Clean up the code and add support
6901 for Quantiles.
6902 (ClassGenDialog.OnOK): Add support for Quantiles.
6903 (GenQuantilesPanel): New. Input panel for Quantiles.
6904 (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
6905 GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
6906
6907 * Thuban/Model/classgen.py: New. Contains all the classes named above.
6908
6909 * Thuban/UI/classifier.py: Explicit imports.
6910 (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
6911 ClassTable.SetValueAsCustom): Reworked to use new Range class.
6912
6913 * Thuban/UI/legend.py: Explicit imports.
6914
6915 * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
6916 a Table menu and associated method calls.
6917 (MainWindow.choose_color): Removed. No longer needed.
6918
6919 * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
6920 should be disabled if no projection is selected in the available
6921 list.
6922
6923 * Thuban/UI/renderer.py: Explicit imports.
6924
6925 * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
6926 with correctly selecting the rows and issuing the right events.
6927 Be sure to call Skip() to allow the grid to do some of its own
6928 handling which allows the rows to actually be selected.
6929 (LayerTableGrid.select_shapes): Rename from select_shape. Supports
6930 selecting multiple shapes.
6931 (LayerTableFrame): Support for building Queries.
6932 (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
6933
6934 * Thuban/UI/tree.py: Explicit imports.
6935
6936 * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
6937 table view can call it.
6938
6939 * test/test_classification.py: Explicit imports.
6940 (TestClassification.test_ClassGroupRange): Fix test for new
6941 Range class.
6942
6943 * Doc/thuban.dtd: Add range parameter for clrange.
6944
6945 * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
6946 object in ClassGroupRange, and also uesd for inputting ranges in
6947 the classifer table and elsewhere.
6948
6949 * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
6950 yet.
6951
6952 2003-05-09 Frank Koormann <[email protected]>
6953
6954 * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
6955
6956 2003-05-08 Frank Koormann <[email protected]>
6957
6958 Coding style updates
6959
6960 * test/test_scalebar.py: Replaced tab indentation by spaces.
6961
6962 * Thuban/UI/scalebar.py: Explicit imports.
6963
6964 2003-05-08 Frank Koormann <[email protected]>
6965
6966 * Thuban/UI/scalebar.py
6967 (ScaleBar.DrawScalebar): Format string bug fixed.
6968
6969 2003-05-08 Frank Koormann <[email protected]>
6970
6971 Reorganization of scalebar component (no wx in Thuban/Model)
6972
6973 * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
6974 (deriveInterval):
6975 Calculate scalebar interval and unit which fits in width for scale.
6976 (roundInterval): Round float.
6977
6978 * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
6979
6980 * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
6981
6982 * Thuban/UI/legend.py: Import Thuban.UI.scalebar
6983
6984 2003-05-08 Frank Koormann <[email protected]>
6985
6986 * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
6987 Initialize ScaleBar with canvas.map
6988
6989 * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
6990 round intervals to display smarter lengths
6991 (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
6992 layer. If the maps has no projection applied grey the scalebar.
6993
6994 2003-05-07 Frank Koormann <[email protected]>
6995
6996 Basic Scalebar features added.
6997
6998 * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
6999
7000 * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
7001 (ScaleBarBitmap): New, links the scalebar bitmap with view messages
7002 and the renderer.
7003
7004 * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
7005
7006 * Thuban/UI/messages.py: SCALE_CHANGED added.
7007
7008 2003-05-07 Bernhard Herzog <[email protected]>
7009
7010 * Thuban/Model/session.py (Session.__init__): New instance
7011 variable shapestores to hold a list of all open shapestore objects
7012 (Session.ShapeStores): New. Accessor method for the shapestores
7013 list.
7014 (Session._add_shapestore, Session._clean_weak_store_refs): New.
7015 Internal methods to maintain the shapestores list.
7016 (Session.Tables): New. Return all tables open in the session.
7017 (Session.OpenShapefile): Insert the new ShapeStore into the
7018 shapestores list.
7019
7020 * test/test_session.py (TestSessionSimple.test_initial_state): Add
7021 tests for ShapeStores and Tables
7022 (TestSessionWithContent.test_shape_stores)
7023 (TestSessionWithContent.test_tables): New. Test cases for
7024 ShapeStores and Tables
7025
7026 2003-05-07 Bernhard Herzog <[email protected]>
7027
7028 * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
7029 Add comments about the optimizations used.
7030 (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
7031 Implement the ReadValue table interface method.
7032
7033 * test/test_transientdb.py
7034 (TestTransientTable.run_iceland_political_tests)
7035 (TestTransientTable.test_transient_joined_table): Add tests for
7036 ReadValue
7037
7038 2003-05-07 Frank Koormann <[email protected]>
7039
7040 * Resources/Bitmaps/fulllayerextent.xpm,
7041 Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
7042 new icons.
7043
7044 2003-05-06 Bernhard Herzog <[email protected]>
7045
7046 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
7047 New. Simply delegate to the transient table's version.
7048
7049 * test/test_transientdb.py
7050 (TestTransientTable.test_auto_transient_table_query): New. Test
7051 case for AutoTransientTable's SimpleQuery
7052
7053 2003-05-06 Bernhard Herzog <[email protected]>
7054
7055 * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
7056 Implement a simple query method for the query dialog
7057 (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
7058 the row index or shapeid.
7059 (TransientTable.create): Insert the right value of the row index
7060 (TransientJoinedTable.create): Copy the row index of the left
7061 table to the joined result table
7062
7063 * test/test_transientdb.py
7064 (TestTransientTable.test_transient_table_read_twice): Fix
7065 doc-string
7066 (TestTransientTable.test_transient_table_query): New. Test for the
7067 SimpleQuery method
7068
7069 2003-05-06 Bernhard Herzog <[email protected]>
7070
7071 Convert all table users to use the new table interface. This only
7072 covers Thuban itself, not GREAT-ER or other applications built on
7073 Thuban yet, so the compatibility interface stays in place for the
7074 time being but it now issues DeprecationWarnings.
7075
7076 Finally, the new Table interface has a new method, HasColumn.
7077
7078 * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
7079 issue deprecation warnings when they're. The warnings refer to the
7080 caller of the method.
7081 (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
7082 for the deprecation warnings
7083
7084 * test/test_table.py: Ignore the deprecation warnings for the old
7085 table in the tests in this module. The purpose of the tests is to
7086 test the old interface, after all.
7087
7088 * test/test_transientdb.py
7089 (TestTransientTable.run_iceland_political_tests): Use the
7090 constants for the types. Add a test for HasColumn
7091 (TestTransientTable.test_transient_joined_table): Adapt to new
7092 table interface. Add a test for HasColumn
7093 (TestTransientTable.test_transient_table_read_twice): Adapt to new
7094 table interface
7095
7096 * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
7097 Adapt to new table interface
7098
7099 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
7100 new table interface
7101
7102 * Thuban/UI/controls.py (RecordListCtrl.fill_list)
7103 (RecordTable.SetTable): Adapt to new table interface
7104
7105 * Thuban/UI/classifier.py (Classifier.__init__)
7106 (Classifier.__init__): Adapt to new table interface
7107
7108 * Thuban/UI/classgen.py (ClassGenDialog.__init__)
7109 (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
7110 to new table interface
7111
7112 * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
7113 (AutoTransientTable.HasColumn): Implement the new table interface
7114 method
7115 (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
7116 (AutoTransientTable.UniqueValues): Adapt to new table interface
7117
7118 * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
7119 Adapt to new table interface
7120
7121 * test/test_layer.py (TestLayer.open_shapefile): Helper method to
7122 simplify opening shapefiles a bit easier.
7123 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
7124 (TestLayer.test_point_layer): Use the new helper method
7125 (TestLayer.test_get_field_type): New. Test for the GetFieldType
7126 method
7127
7128 * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
7129 the new table method
7130
7131 * test/test_memory_table.py (TestMemoryTable.test_has_column):
7132 Test for the new table method HasColumn
7133
7134 2003-05-06 Jonathan Coles <[email protected]>
7135
7136 Addresses the "Selection Extent" wish of RTbug #1787.
7137
7138 * Resources/Bitmaps/fulllayerextent.xpm,
7139 Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
7140 extent. These are just place holders for the real bitmaps.
7141
7142 * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
7143 calculate the bounding box once (the first time compute_bbox() is
7144 called).
7145 (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
7146 the bounding box for the shapes in lat/long coordinates.
7147
7148 * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
7149 option.
7150 (MainWindow.has_selected_shapes): New. Returns true if there are
7151 any selected shapes.
7152 (MainWindow.FullSelectionExtent): New. Calls
7153 MapCanvas.FitSelectedToWindow() when the user selects the menu option.
7154 (_has_selected_shapes): New. Returns true if there are any
7155 selected shapes.
7156
7157 * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
7158 true if there are any selected shapes.
7159
7160 * Thuban/UI/view.py (MapCanvas): Added delegated method
7161 HasSelectedShapes.
7162 (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
7163 shapes on the canvas using the map projection (if any).
7164
7165 * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
7166 for Layer.ShapesBoundingBox().
7167
7168 2003-05-06 Bernhard Herzog <[email protected]>
7169
7170 * Resources/Projections/defaults.proj: Fix spelling of Mercator
7171
7172 2003-05-05 Jonathan Coles <[email protected]>
7173
7174 Addresses the "Full Layer Extent" wish of RTbug #1787.
7175
7176 * Resources/Projections/defaults.proj: Added UK National Grid.
7177
7178 * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
7179 (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
7180 when the user selects the menu option.
7181
7182 * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
7183 scales the given layer on the canvas using the map projection.
7184
7185 2003-05-05 Bernhard Herzog <[email protected]>
7186
7187 Convert the table implementations to a new table interface. All
7188 tables use a common mixin class to provide backwards compatibility
7189 until all table users have been updated.
7190
7191 * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
7192 provide backwards compatibility for table classes implementing the
7193 new interface
7194 (DBFTable, MemoryTable): Implement the new table interface. Use
7195 OldTableInterfaceMixin as base for compatibility
7196 (DBFColumn, MemoryColumn): New. Column description for DBFTable
7197 and MemoryTable resp.
7198
7199 * test/test_dbf_table.py: New. Test cases for the DBFTable with
7200 the new table interface.
7201
7202 * test/test_memory_table.py: New. Test cases for the MemoryTable
7203 with the new table interface.
7204
7205 * test/test_table.py: Document the all tests in this file as only
7206 for backwards compatibility. The equivalent tests for the new
7207 interface are in test_memory_table.py and test_dbf_table.py
7208 (MemoryTableTest.test_read): field_info should be returning tuples
7209 with four items
7210 (MemoryTableTest.test_write): Make doc-string a more precise.
7211
7212 * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
7213 table interface. Derive from from OldTableInterfaceMixin for
7214 compatibility.
7215 (TransientTableBase.create): New intance variable column_map to
7216 map from names and indices to column objects
7217 (TransientTable.create): Use the new table interface of the input
7218 table
7219 (AutoTransientTable): Convert to new table interface. Derive from
7220 from OldTableInterfaceMixin for compatibility.
7221 (AutoTransientTable.write_record): Removed. It's not implemented
7222 yet and we still have to decide how to handle writing with the new
7223 table and data framework.
7224
7225 * test/test_transientdb.py
7226 (TestTransientTable.run_iceland_political_tests)
7227 (TestTransientTable.test_transient_joined_table): Use the new
7228 table interface
7229
7230 2003-05-05 Jonathan Coles <[email protected]>
7231
7232 This is namely a collection of UI updates to improve user interactivity.
7233 Tabbing between controls now exists and you can use ESC to close dialog
7234 boxes; ENTER will active the default button.
7235
7236 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
7237 order that the controls are created so that tabbing works correctly.
7238 (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
7239 wxDialog can handle the default button correctly.
7240 (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
7241 same reasons as for OnOK.
7242 (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
7243 when we ask the table for the maximum/minimum values of a field
7244 which could take a very long time.
7245
7246 * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
7247 order that the controls are created so that tabbing works correctly.
7248 (SelectPropertiesDialog.__init__): Rearrange the order that the
7249 controls are created so that tabbing works correctly.
7250
7251 * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
7252 to derive from a wxDialog but behave like the original implementation
7253 which was derived from a wxFrame. wxDialog provides useful key
7254 handling functionality like ESC calling OnCancel and ENTER calling
7255 OnOK which is lost with wxFrame.
7256
7257 * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
7258 new dialogs.
7259
7260 * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
7261 order that the controls are created so that tabbing works correctly.
7262 (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
7263 (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
7264 (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
7265 (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
7266 can provide the "UK National Grid" as a default projection.
7267 (UTMPanel.__init__): Rearrange the order that the controls are
7268 created so that tabbing works correctly.
7269
7270 2003-05-05 Bernhard Herzog <[email protected]>
7271
7272 * extensions/thuban/wxproj.cpp: Fix some of the comments.
7273 (project_point): If a map projection but no layer projection is
7274 given, convert degrees to radians before applying the map
7275 projection.
7276
7277 * Thuban/UI/tableview.py (TableGrid.disallow_messages)
7278 (TableGrid.allow_messages): New methods to make it possible to
7279 inhibit message sending.
7280 (TableGrid.issue): Only send the message if not inhibited.
7281 (LayerTableGrid.select_shape): Use the new methods to make sure
7282 that no ROW_SELECTED message is sent while we're updating the
7283 selected rows to match the selected shapes.
7284
7285 2003-05-02 Jan-Oliver Wagner <[email protected]>
7286
7287 Implementation of MemoryTable.
7288
7289 * Thuban/Model/table.py (MemoryTable): New. Quite simple table
7290 implementation that operates on a list of tuples. All of the data
7291 are kept in the memory.
7292
7293 * test/test_table.py (MemoryTableTest): New.
7294
7295 * test/test_transientdb.py (SimpleTable): Removed.
7296 (TestTransientTable.test_transient_joined_table,
7297 (TestTransientTable.test_transient_table_read_twice): Replaced
7298 SimpleTable by MemoryTable.
7299
7300 2003-04-30 Jonathan Coles <[email protected]>
7301
7302 * Data/iceland_sample.thuban: Now contains correct projections
7303 for each of the layers.
7304
7305 * Resources/Projections/defaults.proj: Geographic projection
7306 contains unit conversion parameter.
7307
7308 2003-04-30 Jonathan Coles <[email protected]>
7309
7310 The most important part of this putback is the projection changes.
7311 It should now be possible to specify the projection that a layer
7312 is in and then specify a different projection for the map. The
7313 projection dialog has an extra parameter for a geographic projection
7314 which lets the user select if the input is in degrees or radians.
7315
7316 * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
7317 to say that the parameter is a tuple of unprojected
7318 points (which is what the callers to this method were assuming).
7319 Also, since the points are unprojected we need to projected them.
7320
7321 * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
7322 LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
7323 groups are selected, move the layer up/down. Fixes RTbug #1833.
7324
7325 * Thuban/UI/mainwindow.py: Move menu item map_rename up.
7326
7327 * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
7328 parameter in call to SetClientData.
7329 (GeoPanel): Add support for selecting the units that the
7330 source data is in (Radians or Degrees).
7331
7332 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
7333 the rendering loop by reducing the number of if's, removing the
7334 unnecessary try/except block, and checking if the old group
7335 is the same as the new one (which happens a lot if there is
7336 no classification, or lots of shapes are in the same group).
7337
7338 * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
7339 around the redraw routine to try to catch problems that the user
7340 may create by selecting invalid projections for the data set and
7341 map. Clears the display if there are any problems and prints the
7342 error.
7343 (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
7344 rectangle.
7345
7346 * extensions/thuban/wxproj.cpp (project_point): First invert the
7347 supplied point (which should be in projected coordinates) using
7348 the layer's projection and then project the point using the
7349 map's projection.
7350 (project_points): Use project_point() to project each point.
7351
7352 2003-04-30 Jan-Oliver Wagner <[email protected]>
7353
7354 * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
7355 don't set the Classification to None if the classfication field
7356 is None (ie only a DEFAULT).
7357
7358 2003-04-30 Bernhard Herzog <[email protected]>
7359
7360 * Thuban/UI/view.py: Fix some typos.
7361
7362 * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
7363 not pop up the dialog if the selection becomes empty (this could
7364 happen if e.g. a new selection is opened while the identify tool
7365 is active and dialog had been closed)
7366
7367 2003-04-30 Bernhard Herzog <[email protected]>
7368
7369 * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
7370 instance variable read_record_last_result
7371 (TransientTableBase.read_record): Make sure reading the same
7372 record twice works. The implementation uses the new instance
7373 variable read_record_last_result
7374
7375 * test/test_transientdb.py
7376 (TestTransientTable.test_transient_table_read_twice): New test
7377 case for the above bug-fix.
7378
7379 2003-04-29 Jonathan Coles <[email protected]>
7380
7381 * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
7382
7383 * Thuban/UI/classgen.py: Remove all uses of Str2Num.
7384
7385 * Thuban/UI/classifier.py: Remove all uses of Str2Num.
7386 (ClassTable.SetValueAsCustom): Rename keyword argument in
7387 ClassGroup* constructors to match argument name.
7388
7389 2003-04-29 Bernhard Herzog <[email protected]>
7390
7391 * Thuban/Model/session.py (Session.Destroy): Explicitly close the
7392 transient DB if it exists to make sure it doesn't leave a journal
7393 file in the temp directory.
7394
7395 * Thuban/Model/transientdb.py (TransientDatabase.close): Set
7396 self.conn to None after closing the connection to make sure it's
7397 not closed twice
7398
7399 2003-04-29 Jonathan Coles <[email protected]>
7400
7401 Add a visible parameter in the layer XML tag. The default value is
7402 "true". If anything other than "false" is specified we also assume
7403 "true". Addresses RTbug #1025.
7404
7405 * Doc/thuban.dtd: Add visible parameter to a layer.
7406
7407 * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
7408 of visible from 1 to True.
7409 (Layer.__init__): Change default value of visible from 1 to True.
7410
7411 * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
7412 parameter.
7413
7414 * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
7415 parameter.
7416
7417 * test/test_load.py: Add new test data contents_test_visible.
7418 (LoadSessionTest.setUp): save test data.
7419 (LoadSessionTest.testLayerVisibility): Test if the visible flag
7420 is loaded correctly.
7421
7422 * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
7423 for saving an invisible layer.
7424
7425 2003-04-29 Jonathan Coles <[email protected]>
7426
7427 * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
7428 legend dialog box and tell it to change its map to the one
7429 supplied to SetMap(). Fixes RTbug #1770.
7430
7431 2003-04-29 Bernhard Herzog <[email protected]>
7432
7433 Next step of table implementation. Introduce a transient database
7434 using SQLite that some of the data is copied to on demand. This
7435 allows us to do joins and other operations that require an index
7436 for good performance with reasonable efficiency. Thuban now needs
7437 SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
7438 haven't tested that.
7439
7440 * Thuban/Model/transientdb.py: New. Transient database
7441 implementation.
7442
7443 * test/test_transientdb.py: New. Tests for the transient DB
7444 classes.
7445
7446 * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
7447 classes to help automatically remove temporary files and
7448 directories.
7449 (Session.__init__): New instance variables temp_dir for the
7450 temporary directory and transient_db for the SQLite database
7451 (Session.temp_directory): New. Create a temporary directory if not
7452 yet done and return its name. Use AutoRemoveDir to have it
7453 automatically deleted
7454 (Session.TransientDB): Instantiate the transient database if not
7455 done yet and return it.
7456
7457 * Thuban/Model/data.py (ShapefileStore.__init__): Use an
7458 AutoTransientTable so that data is copied to the transient DB on
7459 demand.
7460 (SimpleStore): New class that simply combines a table and a
7461 shapefile
7462
7463 * Thuban/Model/table.py (Table, DBFTable): Rename Table into
7464 DBFTable and update its doc-string to reflect the fact that this
7465 is only the table interface to a DBF file. Table is now an alias
7466 for DBFTable for temporary backwards compatibility.
7467
7468 * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
7469 the last reference to the session goes away so that the temporary
7470 files are removed properly.
7471
7472 * test/test_load.py (LoadSessionTest.tearDown): Remove the
7473 reference to the session to make sure the temporary files are
7474 removed.
7475
7476 2003-04-29 Bernhard Herzog <[email protected]>
7477
7478 * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
7479 the __parser instance variable into a normal local variable in
7480 read. It's only used there and read will never be called more than
7481 once. Plus it introduces a reference cycle that keeps can keep the
7482 session object alive for a long time.
7483
7484 2003-04-29 Jonathan Coles <[email protected]>
7485
7486 * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
7487 Projection an immutable item. Fixes RTbug #1825.
7488 (Projection.__init__): Initialize instance variables here.
7489 (ProjFile.Replace): New. Replace the given projection object with
7490 the new projection object. This solves the problem of needing the
7491 mutator Projection.SetProjection() in the ProjFrame class and
7492 allows a projection to change parameters without changing its
7493 location in the file.
7494
7495 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
7496 be of type wxSAVE and should verify overwriting a file.
7497
7498 * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
7499 ProjFile.Replace() method instead of the mutator
7500 Projection.SetProjection(). Also requires that we reassign the
7501 client data to the new projection.
7502
7503 * test/test_proj.py (TestProjection.test): Test GetName() and
7504 GetAllParameters()
7505 (TestProjFile.test): Remove tests for Set*() methods. Add tests
7506 for Replace().
7507
7508 2003-04-25 Jonathan Coles <[email protected]>
7509
7510 * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
7511 to save the name of the projection.
7512
7513 * test/test_save.py (SaveSessionTest.testLayerProjection): New
7514 test to verify layer projections are saved correctly.
7515
7516 2003-04-25 Jonathan Coles <[email protected]>
7517
7518 * Thuban/Model/proj.py (Projection.SetName): Set the name
7519 to "Unknown" if name is None.
7520 (Projection.SetAllParameters): New. Set the projection's
7521 parameter list to the one supplied.
7522 (Projection.SetProjection): New. Set the projection's
7523 properties to those of the supplied Projection.
7524
7525 * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
7526 the dialog title to include the map's title.
7527 (MainWindow.LayerProjection): Set the dialog title to include
7528 the layer's title.
7529
7530 * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
7531 error dialogs into a single method call.
7532 (ProjFrame.__VerifyButtons): Add more states to check.
7533 (ProjFrame.__GetProjection): Return the current state of an
7534 edited projection or None.
7535 (ProjFrame.__FillAvailList): Remove checks for states that
7536 shouldn't exist.
7537 (ProjFrame._OnNew): Clear all selected items and supply
7538 a projection panel if necessary.
7539
7540 * test/test_proj.py (TestProjFile.test): Add tests for
7541 ProjFile.SetAllParameters, ProjFile.SetProjection,
7542 ProjFile.SetName.
7543
7544 2003-04-25 Jonathan Coles <[email protected]>
7545
7546 * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
7547 takes an optional argument to select the current projection.
7548 This does not guarantee that the item is visible due to
7549 limited wxWindows functionality. Fixes RTBug #1821.
7550
7551 2003-04-25 Jonathan Coles <[email protected]>
7552
7553 * Thuban/Model/load.py (SessionLoader.start_projection): Remember
7554 the projection name and use it when constructing the Projection
7555 object.
7556
7557 * Thuban/Model/proj.py (Projection.__init__): Change the default
7558 value for 'name' to None and then test if name is equal to None
7559 in the body of the constructor. This way the caller doesn't have to
7560 know what the default value should be. Namely, useful in load.py
7561 where we have to pick a default value if the 'name' parameter
7562 doesn't exist in the XML file.
7563
7564 * test/test_load.py (LoadSessionTest.testLayerProjection): New.
7565 Tests a file where a layer has a projection.
7566
7567 2003-04-25 Jonathan Coles <[email protected]>
7568
7569 * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
7570 tree for projection information.
7571
7572 * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
7573 XMLReader.GetFileName.
7574 (SessionLoader): Added support for loading projection tags that
7575 appear inside a layer.
7576
7577 * Thuban/Model/proj.py (ProjFile): Document the class. Move
7578 back to using a list because the order of the projections in
7579 the file is important to maintain. Fixes RTbug #1817.
7580
7581 * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
7582 to ProjFile.GetFilename.
7583
7584 * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
7585 information.
7586
7587 * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
7588 ProjFrame._OnSaveAs. Removed old dead code from previous
7589 implementation.
7590 (ProjFrame._OnExport): Add support for exporting more than one
7591 projection to a single file.
7592 (ProjFrame.__FillAvailList): use string formatting (% operator)
7593 to build strings that are (partly) translated. Fixes RTbug #1818.
7594
7595 * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
7596 class.
7597
7598 2003-04-24 Bernhard Herzog <[email protected]>
7599
7600 * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
7601
7602 * po/fr.po: New. French translation by Daniel Calvelo Aros
7603
7604 * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
7605 empty strings.
7606
7607 2003-04-24 Jonathan Coles <[email protected]>
7608
7609 * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
7610 implement the interface that the ProjFrame dialog expects.
7611
7612 * Thuban/Model/proj.py (Projection.SetName): New. Allows the
7613 name of the projection to be changed.
7614 (ProjFile): Use a dictionary instead of a list so that removing
7615 projections is easier and we are sure about uniqueness.
7616 (ProjFile.Remove): Remove the given projection object.
7617
7618 * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
7619 Return a list with only one projection file instead of searching for
7620 any projection file. This simplifies many things if the user can
7621 only have one system file and one user file.
7622
7623 * Thuban/UI/classgen.py: Change all references to
7624 genCombo to genChoice.
7625
7626 * Thuban/UI/mainwindow.py: Add a Projection option under the
7627 layer menu.
7628 (MainWindow.LayerProjection): New. Open up a projection window
7629 for a layer.
7630
7631 * Thuban/UI/projdialog.py: Large changes to how the dialog is
7632 laid out. Use three panels instead of one. One for the list of
7633 projections, one for the edit controls, and one for the buttons.
7634 Fixed resizing problems so that the dialog resizes correctly
7635 when the projection panel changes. Added import/export, save, and
7636 new buttons/functionality.
7637
7638 2003-04-24 Bernhard Herzog <[email protected]>
7639
7640 First step towards table management. Introduce a simple data
7641 abstraction so that we replace the data a layer uses more easily
7642 in the next step.
7643
7644 * Thuban/Model/data.py: New file with a simple data abstraction
7645 that bundles shapefile and dbffile into one object.
7646
7647 * Thuban/Model/session.py (Session.OpenShapefile): New method to
7648 open shapefiles and return a shape store object
7649
7650 * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
7651 object instead of a shapefile filename. This introduces a new
7652 instance variable store holding the datastore. For intermediate
7653 backwards compatibility keep the old instance variables.
7654 (open_shapefile): Removed. No longer needed with the shape store.
7655 (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
7656 get the shape store used by a layer.
7657 (Layer.Destroy): No need to explicitly destroy the shapefile or
7658 table anymore.
7659
7660 * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
7661 (MainWindow.AddLayer): Use the session's OpenShapefile method to
7662 open shapefiles
7663
7664 * Thuban/Model/load.py (ProcessSession.start_layer): Use the
7665 session's OpenShapefile method to open shapefiles
7666
7667 * test/test_classification.py
7668 (TestClassification.test_classification): Use the session's
7669 OpenShapefile method to open shapefiles and build the filename in
7670 a more platform independed way
7671
7672 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
7673 Implement to have a session to use in the tests
7674 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
7675 (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
7676 session's OpenShapefile method to open shapefiles
7677 (TestLayerLegend.setUp): Instantiate a session so that we can use
7678 it to open shapefiles.
7679 (TestLayerLegend.tearDown): Make sure that all references to
7680 layers and session are removed otherwise we may get a resource
7681 leak
7682
7683 * test/test_map.py (TestMapAddLayer.test_add_layer)
7684 (TestMapWithContents.setUp): Instantiate a session so that we can
7685 use it to open shapefiles.
7686 (TestMapWithContents.tearDown): Make sure that all references to
7687 layers, maps and sessions are removed otherwise we may get a
7688 resource leak
7689 ("__main__"): use support.run_tests() so that more info about
7690 uncollected garbage is printed
7691
7692 * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
7693 session's OpenShapefile method to open shapefiles
7694 ("__main__"): use support.run_tests() so that more info about
7695 uncollected garbage is printed
7696
7697 * test/test_selection.py (TestSelection.tearDown): Make sure that
7698 all references to the session and the selection are removed
7699 otherwise we may get a resource leak
7700 (TestSelection.get_layer): Instantiate a session so that we can
7701 use it to open shapefiles.
7702 ("__main__"): use support.run_tests() so that more info about
7703 uncollected garbage is printed
7704
7705 * test/test_session.py (TestSessionBase.tearDown)
7706 (TestSessionWithContent.tearDown): Make sure that all references
7707 to the session and layers are removed otherwise we may get a
7708 resource leak
7709 (TestSessionWithContent.setUp): Use the session's OpenShapefile
7710 method to open shapefiles
7711
7712 2003-04-24 Jonathan Coles <[email protected]>
7713
7714 * Thuban/Model/load.py (XMLReader.read): Should have been checking
7715 if the file_or_filename object had the 'read' attribute.
7716
7717 2003-04-23 Jonathan Coles <[email protected]>
7718
7719 * Thuban/Model/resource.py: Fixes RTbug #1813.
7720 (ReadProjFile): Add documentation about which exceptions are raised.
7721 Always pass the exceptions up to the caller.
7722 (GetProjFiles): If the directory can't be read return an empty list.
7723 If any of the proj files can't be read skip that file and go
7724 on to the next one.
7725
7726 * test/test_proj.py: Added test cases to handle nonexistent files,
7727 unreadable files, and files that don't parse correctly.
7728
7729 2003-04-23 Jonathan Coles <[email protected]>
7730
7731 Projection dialog. Allows the user to select from a list
7732 of projection templates and optionally edit them and save new ones.
7733
7734 * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
7735 (ProjPanel): Base class for projection specific panels.
7736 (TMPanel): Projection panel for Transverse Mercartor.
7737 (UTMPanel): Projection panel for Universal Transverse Mercartor.
7738 (LCCPanel): Projection panel for Lambert Conic Conformal.
7739 (GeoPanel): Projetion panel for Geographic Projection.
7740
7741 2003-04-23 Jonathan Coles <[email protected]>
7742
7743 * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
7744 promote symmetry. There now exists XMLReader and XMLWriter.
7745 (XMLReader.read): New. Call to read the given file descriptor or
7746 filename.
7747 (XMLReader.close): New. Make sure the file is closed.
7748 (XMLReader.GetFileName): New. Return just the file name that is being
7749 read from.
7750 (XMLReader.GetDirectory): New. Return just the directory of the file
7751 that is being read.
7752 (XMLReader.AddDispatchers): New. Take a dictionary which contains
7753 the names of functions to call as the XML tree is parsed.
7754 (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
7755 (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
7756 (SessionLoader): Removed class variables start_dispatcher and
7757 end_dispatcher since this functionality is now part of a class
7758 instance. Fixes RTbug #1808.
7759 (SessionLoader.__init__): Add dispatcher functions.
7760 (load_xmlfile): Code was moved into the XMLReader.read().
7761 (load_session): Use modified SessionLoader.
7762
7763 * Thuban/Model/map.py (Map.GetProjection): New. Returns the
7764 map's projection.
7765
7766 * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
7767 GetAllParameters.
7768 (Projection.GetParameter): Returns the value for the given parameter.
7769
7770 * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
7771 (GetProjFiles): Renamed from GetProjections. Now returns a list
7772 of ProjFile objects.
7773 (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
7774 a list of ProjFile objects whose files are not user defined.
7775 (GetUserProjFiles): Renamed from GetUserProjections. Returns a
7776 list of ProjFile objects whose files are user defined.
7777 (ProjFileReader): Extend new XMLReader.
7778
7779 * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
7780 promote symmetry.
7781
7782 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
7783 control instead of a wxComboBox. wxChoice controls do not generate
7784 events as the uses highlights possible choices which fixes problems
7785 with resizing the dialog when the use selects an option.
7786
7787 * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
7788 control instead of a wxComboBox.
7789
7790 * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
7791 dialog.
7792
7793 * test/test_proj.py (TestProjection.test): New tests for GetParameter
7794 method.
7795
7796 2003-04-22 Bernhard Herzog <[email protected]>
7797
7798 * Thuban/UI/mainwindow.py: Remove some unused imports and global
7799 constants
7800
7801 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
7802 (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
7803
7804 2003-04-17 Bernhard Herzog <[email protected]>
7805
7806 * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
7807 (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
7808 anymore.
7809 (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
7810 (Layer.ShapeType, Layer.Shape): No need to call
7811 self.open_shapefile since it's always called in __init__
7812
7813 * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
7814 In wxPython 2.4 there's no need to extend MainLoop anymore since
7815 wxPython itself makes sure OnExit is called.
7816
7817 2003-04-16 Jonathan Coles <[email protected]>
7818
7819 Initial putback of projection management code. Includes new
7820 classes to read and write projection files. The current load
7821 and save classes were abstracted a bit so they could be reused.
7822 The Projection class was extended to provide new methods and
7823 have a name.
7824
7825 * Thuban/Model/load.py (XMLProcessor): New. Contains all the
7826 general XML reading methods that were part of ProcessSession.
7827
7828 * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
7829 name.
7830 (ProjFile): New. Represents a file that contains projection
7831 information.
7832
7833 * Thuban/Model/resource.py: New. Contains general utilities
7834 for read and writing projection files.
7835
7836 * Thuban/Model/save.py (XMLSaver): New. Contains all the
7837 general XML writing methods that were part of SessionSaver.
7838 (SessionSaver): Renamed from Saver.
7839
7840 * test/test_proj.py: New test cases for the projection
7841 file read and write functions.
7842
7843 2003-04-16 Jonathan Coles <[email protected]>
7844
7845 * Thuban/Model/classification.py: Use repr() around values
7846 in the ClassGroup*.__repr__() methods so it is clearer when
7847 a value is a string and when it is a number.
7848
7849 * test/test_load.py: Rework the classification test to test
7850 that we can load old files.
7851 (testLabels): Test a file where the groups have labels.
7852
7853 2003-04-16 Bernhard Herzog <[email protected]>
7854
7855 Safer implementation of the performance enhancements of the
7856 low-level renderer:
7857
7858 * extensions/thuban/wxproj.cpp (extract_projection)
7859 (extract_pointer): Rename extract_projection to extract_pointer
7860 and redefine its purpose to return the pointer stored in a CObject
7861 returned by the object's cobject method. Update all callers.
7862 (s_draw_info, free_draw_info, draw_polygon_init): Implement the
7863 handling of these low-level parameters so that each s_draw_info
7864 instance is handled as a CObject at python level that also
7865 contains real references to the actual python objects which
7866 contain the values in the struct. Add free_draw_info as the
7867 destructor.
7868 (draw_polygon_shape): Add the py_draw_info parameter which must a
7869 cobject containing an s_draw_info pointer.
7870
7871 * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
7872 method to instantiat the low-level render parameter
7873 (MapRenderer.draw_shape_layer): Use the new method. Remove some
7874 commented out code.
7875 (MapRenderer.draw_polygon_shape): Make the first parameter not the
7876 layer but the low-level render parameter
7877 (ScreenRenderer.draw_shape_layer): Use the low-level render
7878 parameter.
7879
7880 2003-04-15 Jonathan Coles <[email protected]>
7881
7882 * Thuban/Model/classification.py: Implemented __repr__ for
7883 the ClassGroup* classes to make debugging a bit easier.
7884 (ClassGroup.SetLabel): Check that the string is an instance
7885 of StringTypes not StringType. Accounts for Unicode strings.
7886
7887 * Thuban/Model/color.py: Implemented __repr__ to make
7888 debugging a bit easier.
7889
7890 * Thuban/Model/save.py (Saver.write_classification): Need to
7891 save the group label.
7892
7893 * test/test_load.py (testClassification): New. Loads the
7894 iceland_sample_test.thuban file and checks if it was loaded
7895 correctly.
7896
7897 2003-04-15 Jonathan Coles <[email protected]>
7898
7899 * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
7900 to improve rendering performance by initializing the variables
7901 that are not change each time draw_polygon_shape() is called.
7902 The values are stored in a global struct draw_info.
7903 (draw_polygon_shape): Removed initialization code that is
7904 now in draw_polygon_init().
7905
7906 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
7907 drawing initialization call to draw_polygon_init()
7908 (MapRenderer.draw_polygon_shape): Use new signature of
7909 draw_polygon_shape.
7910
7911 * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
7912 weirdness by setting the range to (1, maxint).
7913
7914 * Thuban/Model/classification.py (ClassGroupProperties): Make
7915 instance variables private and optimize comparison operator
7916 by first checking if the color references are the same.
7917 (ClassGroupSingleton): Make instance variables private.
7918 (ClassGroupRange): Make instance variables private.
7919
7920 * HOWTO-Release: Filled in missing steps for releasing packages.
7921
7922 2003-04-15 Bernhard Herzog <[email protected]>
7923
7924 First stab at internationalized messages:
7925
7926 * Thuban/__init__.py (_): Implement the translation function for
7927 real using the python gettext module.
7928
7929 * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
7930 translate empty strings.
7931
7932 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
7933 Add a missing space to a warning message
7934
7935 * po/README: New. Notes about the management of the translation
7936 files.
7937
7938 * po/Makefile: New. Makefile to help manage the translation files.
7939
7940 * po/es.po: New. Spanish translation by Daniel Calvelo Aros
7941
7942 * MANIFEST.in: Include the *.mo files in Resources/Locale and the
7943 translations and support files in po/
7944
7945 * setup.py (data_files): Add the *.mo files to the data_files too
7946
7947 * README: Add note about the translations when building from CVS
7948
7949 2003-04-14 Jonathan Coles <[email protected]>
7950
7951 * Thuban/UI/dock.py: Fixes some window resizing problems most
7952 noticable under windows. Always assume the button bitmaps will
7953 be there. Code clean up.
7954 (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
7955 images for the dock/undock button to the same images.
7956 Work around for RTbug #1801.
7957
7958 * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
7959 be allowed to grow within the sizer. Fixes a bug under Windows
7960 where the toolbar wasn't being drawn.
7961
7962 2003-04-14 Frank Koormann <[email protected]>
7963
7964 * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
7965 Updated design to try to make the button functionality more
7966 transparent.
7967
7968 2003-04-14 Jonathan Coles <[email protected]>
7969
7970 * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
7971 finalize the intialization of the panel.
7972
7973 * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
7974 creation of the panel. Should be the last thing called in the
7975 initializer of a subclass.
7976
7977 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
7978 set the current selections in the combo boxes. This is needed
7979 under Windows.
7980
7981 * Thuban/UI/classifier.py (Classifier.__init__): Add a top
7982 level panel to the dialog so that the background colors are
7983 consistent under Windows.
7984
7985 2003-04-11 Jonathan Coles <[email protected]>
7986
7987 * Thuban/UI/classgen.py: Change color ramps to start at white
7988 not black.
7989
7990 * Thuban/UI/legend.py: Enable/disable the legend buttons when
7991 the legend changes. Fixes RTbug #1793.
7992
7993 * test/test_classification.py: Added test for copying of
7994 classifications.
7995
7996 2003-04-11 Jonathan Coles <[email protected]>
7997
7998 * Thuban/UI/resource.py: New. Centralize the loading of resources
7999 such as bitmaps.
8000
8001 * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
8002 added images to the move buttons, added 'reverse' button.
8003 (CustomRampPanel.__init__): Added images to the move buttons.
8004 (GreyRamp): New. Generates a ramp from white to black.
8005 (HotToColdRamp): New. Generates a ramp from cold to hot colors.
8006
8007 * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
8008 ID_PROPERTY_*.
8009 (Classifier.__init__): Minor changes to the layout.
8010 (Classifier._OnTitleChanged): Listen for when the user edits the
8011 title and update the dialog's title and the layer's title.
8012
8013 * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
8014
8015 * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
8016 (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
8017 if the layer's title changes.
8018
8019 * Thuban/UI/mainwindow.py: Added new menu item and associated code
8020 to open a dialog to rename the map.
8021 (MainWindow): Use new resource class to import bitmaps.
8022
8023 2003-04-11 Jonathan Coles <[email protected]>
8024
8025 * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
8026 Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
8027 Resources/Bitmaps/group_use_none.xpm,
8028 Resources/Bitmaps/group_use_not.xpm,
8029 Resources/Bitmaps/hide_layer.xpm,
8030 Resources/Bitmaps/layer_properties.xpm,
8031 Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
8032 Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
8033 New.
8034
8035 2003-04-10 Jonathan Coles <[email protected]>
8036
8037 * Thuban/Model/classification.py: (ClassGroupRange.__init__):
8038 Should pass group to ClassGroup constructor.
8039
8040 2003-04-10 Jonathan Coles <[email protected]>
8041
8042 * Thuban/Model/classification.py: (ClassGroup): Move all the common
8043 methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
8044 here. Implement SetVisible(), IsVisible().
8045 (ClassGroup.__init__): Add group parameter which acts as a copy
8046 constructor.
8047
8048 * Thuban/UI/classifier.py (ClassTable): Add a new column for the
8049 "Visible" check boxes.
8050 (Classifier): Rename the buttons and refactor the code to match
8051 the new labels.
8052
8053 * Thuban/UI/legend.py: Classify button is now called "Properties".
8054 Refactored the code to change variable names.
8055 (LegendTree.__FillTreeLayer): Only list a group if it is visible.
8056
8057 * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
8058 MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
8059 renamed to MainWindow.LayerEditProperties.
8060 (MainWindow.ToggleLegend): Don't include map name in legend title.
8061 (MainWindow.SetMap): Added the map name to the window title.
8062 (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
8063 MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
8064 Functionality is found in the layer properties dialog.
8065
8066 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
8067 draw visible groups.
8068
8069 2003-04-09 Jonathan Coles <[email protected]>
8070
8071 * Thuban/UI/classgen.py: Modifications to allow simple
8072 addition and selection of new color schemes.
8073 (MonochromaticRamp): New. Generates a ramp between two colors.
8074 (RedRamp): New. Generates a ramp of all red.
8075 (GreenRamp): New. Generates a ramp of all green.
8076 (BlueRamp): New. Generates a ramp of all blue.
8077
8078 2003-04-09 Jonathan Coles <[email protected]>
8079
8080 * Thuban/Model/classification.py (Classification.__deepcopy__):
8081 Need to copy over field and fieldType attributes.
8082
8083 * Thuban/Model/table.py (Table.field_range): New. Retrive the
8084 maximum and minimum values over the entire table for a given
8085 field.
8086 (Table.GetUniqueValues): New. Retrieve all the unique values
8087 in the table for a given field.
8088
8089 * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
8090 (GenUniquePanel): New. Controls to allow the user to select
8091 which unique field values they would like in the classification.
8092 (CustomRampPanel): Code that was in ClassGenDialog that allows
8093 the user to select the properties for a custom ramp.
8094 (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
8095
8096 * Thuban/UI/classifier.py: Removed a lot of debugging code.
8097 (Classifier._SetClassification): Callback method so that the
8098 class generator can set the classification in the grid.
8099 (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
8100 editing of a group properties class into a wxWindows control.
8101
8102 * Thuban/UI/dock.py: It was decided that if the user closes
8103 a dockable window the window should simply hide itself. That
8104 way if the user wants to show the dock again it appears in the
8105 same place as it was when it was closed.
8106 (DockableWindow.Destroy): Call renamed method OnDockDestroy().
8107 (DockableWindow._OnButtonClose): Hide the window instead of
8108 destroying it.
8109 (DockableWindow._OnClose): Hide the window instead of
8110 destroying it.
8111
8112 * Thuban/UI/legend.py (LegendTree): Use a private method to
8113 consistently set the font and style of the text. Fixes RTbug #1786.
8114
8115 * Thuban/UI/mainwindow.py: Import just the Classifier class.
8116
8117 2003-04-07 Bernhard Herzog <[email protected]>
8118
8119 * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
8120 to the map module
8121
8122 2003-04-07 Bernhard Herzog <[email protected]>
8123
8124 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
8125 favor of ToggleSessionTree
8126 (MainWindow.ToggleSessionTree): New method to toggle visibility of
8127 the session tree.
8128 (MainWindow.SessionTreeShown): New method to return whether the
8129 session tree is currently shown.
8130 (MainWindow.ToggleLegend): New method to toggle visibility of the
8131 legend
8132 (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
8133 LegendShown
8134 (MainWindow.LegendShown): New method to return whether the legend
8135 is currently shown.
8136 (_method_command): Add checked parameter so we can define check
8137 menu items
8138 (_has_tree_window_shown, _has_legend_shown): Use the appropriate
8139 mainwindow methods.
8140 (show_session_tree, show_legend commands): Removed.
8141 (toggle_session_tree, toggle_legend commands): New commands to
8142 toggle the visibility of the dialogs
8143
8144 2003-04-07 Jonathan Coles <[email protected]>
8145
8146 * Thuban/UI/classgen.py: Fix Windows problem.
8147
8148 * Thuban/UI/dock.py: Fix Windows problem.
8149
8150 * Thuban/UI/mainwindow.py: Use False instead of false.
8151 (MainWindow.ShowLegend): Remove unnecessary switch parameter.
8152
8153 2003-04-07 Jonathan Coles <[email protected]>
8154
8155 Since we now say that the order of the groups in a classification
8156 matters, it makes sense to be able to manipulate that order. Most
8157 of the changes to Thuban/Model/classification.py are to that end.
8158
8159 * Thuban/Model/classification.py (Classification.AppendGroup,
8160 Classification.InsertGroup, Classification.ReplaceGroup,
8161 Classification.RemoveGroup, Classification.GetGroup): Do as the
8162 names imply.
8163 (Classification.FindGroup): This was called GetGroup, but GetGroup
8164 takes an index, while FindGroup takes a value.
8165 (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
8166 REFERENCE. Currently there is a cyclic reference between the layer
8167 and its classification. If the classification doesn't need to know
8168 its owning layer we can change this, since it may make sense to be
8169 able to use the same classification with different layers.
8170
8171 * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
8172
8173 * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
8174 not AddGroup()
8175
8176 * Thuban/UI/classifier.py: Now that we can depend on the order in
8177 a Classification and have methods to manipulate that order we don't
8178 need to use our own data structures in the grid. We can simply make
8179 the grid/table access the information they need from a copy of
8180 the classification object.
8181 (Classifier._OnCloseBtn): Event handler for when the user clicks
8182 'Close'. This is needed so if the user applies changes and then
8183 continues to change the table the user has the option of discarding
8184 the most recent changes and keeping what they applied.
8185
8186 * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
8187 into the same group.
8188
8189 * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
8190 with a really old version of proj, PJ_VERSION won't even be defined.
8191 If it isn't defined then just compile so that the function always
8192 returns Py_False.
8193
8194 * test/test_classification.py: Fix tests to use the renamed methods.
8195 Still need to write tests for the new methods.
8196
8197 2003-04-04 Jonathan Coles <[email protected]>
8198
8199 * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
8200 call to SetSelection out of the method and before the call
8201 to __SelectField in __init__. This prevents a recursion of events
8202 when _OnFieldSelect is triggered by the user.
8203
8204 2003-04-04 Jonathan Coles <[email protected]>
8205
8206 * Thuban/Model/classification.py: Rename Color.None to
8207 Color.Transparent.
8208 (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
8209 Don't bother copying the color, since Colors are immutable.
8210
8211 * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
8212 Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
8213 Thuban/UI/renderer.py, Thuban/UI/view.py:
8214 Rename Color.None to Color.Transparent.
8215
8216 * test/test_classification.py, test/test_load.py: Rename Color.None
8217 to Color.Transparent.
8218
8219 2003-04-04 Jonathan Coles <[email protected]>
8220
8221 * Thuban/Model/classification.py: Fix assert calls.
8222 (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
8223 Copy the color parameter rather than hold onto a reference.
8224
8225 * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
8226 the color object.
8227 (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
8228 are sure there exists only one refernce to Color.None in the system.
8229 This allows us to use 'is' rather than the comparision functions.
8230
8231 * Thuban/Model/save.py: Fix assert calls.
8232
8233 * Thuban/UI/classifier.py: Fix assert calls.
8234 (ClassGrid._OnCellDClick): Call up to the classifier to open the
8235 dialog to edit the groups properties.
8236 (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
8237 correctly if a cell is resized.
8238 (ClassTable.SetClassification): New. Changes the classification
8239 that is in the table.
8240 (ClassTable.__SetRow): Allow groups to be prepended.
8241 (Classifier): New code for opening the EditProperties and
8242 GenerateRanges dialogs.
8243 (SelectPropertiesDialog.__GetColor): Only set the color in the
8244 color dialog if the current color is not None.
8245
8246 * Thuban/UI/dock.py: Fix assert calls.
8247
8248 * Thuban/UI/legend.py: Fix assert calls.
8249
8250 * Thuban/UI/renderer.py: Fix assert calls.
8251
8252 * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
8253 classifications.
8254 (GenRangePanel): Panel specific to range generation.
8255 (GenSingletonPanel): Panel specific to singleton generation.
8256 (ClassGenerator): Class responsible for actually generating
8257 the classification from the data gathered in the dialog box.
8258 (PropertyRamp): Generates properties whose values range from
8259 a starting property to an ending property.
8260
8261 2003-04-03 Bernhard Herzog <[email protected]>
8262
8263 * test/support.py (print_garbage_information): New function that
8264 prints information about still connected messages and memory
8265 leaks.
8266 (run_suite): Removed.
8267 (run_tests): New function for use as a replacement of
8268 unittest.main in the test_* files. This one calls
8269 print_garbage_information at the end.
8270
8271 * test/runtests.py (main): Use support.print_garbage_information
8272
8273 * test/test_layer.py: Use support.run_tests instead of
8274 unittest.main so we get memory leak information
8275 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
8276 (TestLayer.test_point_layer, TestLayer.test_empty_layer)
8277 (TestLayerLegend.test_visibility): Call the layer's Destroy method
8278 to fix a memory leak.
8279
8280 * test/test_classification.py: Use support.run_tests instead of
8281 unittest.main so we get memory leak information
8282 (TestClassification.test_classification): Call the layer's Destroy
8283 method to fix a memory leak.
8284
8285 2003-04-02 Bernhard Herzog <[email protected]>
8286
8287 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
8288 Handle the reference counts of the return value and errors in
8289 PyArg_ParseTuple correctly.
8290
8291 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
8292 sure the filename is absolute to avoid problems when saving the
8293 session again
8294
8295 * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
8296
8297 2003-04-01 Jonathan Coles <[email protected]>
8298
8299 * Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
8300 that there actually are points in the returned list of points
8301 before trying to index into the list. The list may be empty if
8302 the shape is a Null Shape.
8303
8304 2003-04-01 Bernhard Herzog <[email protected]>
8305
8306 * test/test_map.py: Don't use from <module> import *
8307
8308 2003-04-01 Jonathan Coles <[email protected]>
8309
8310 * Thuban/Model/session.py: Use LAYER_CHANGED instead of
8311 LAYER_LEGEND_CHANGED
8312
8313 * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
8314 self.Destroy() to close the window after yesterday's changes.
8315
8316 * test/test_map.py, test/test_session.py: Fix messages that
8317 are sent from maps and layers.
8318
8319 2003-03-31 Jonathan Coles <[email protected]>
8320
8321 * Thuban/UI/classifier.py: Commented out some debugging statements.
8322 (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
8323 RTbug #1769.
8324
8325 * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
8326 position (although position doesn't work yet under GTK).
8327 (DockableWindow.Destroy): New. Called when the window must be
8328 closed. Namely needed when the DockFrame closes and must close
8329 its children.
8330 (DockFrame): Listen for EVT_CLOSE and destroy all children.
8331
8332 * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
8333 when then window is told to close.
8334 (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
8335 comment in source for more info.
8336
8337 * Thuban/UI/main.py: Show the legend by default when Thuban starts.
8338
8339 * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
8340 symmetry with other such methods.
8341 (MainWindow.ShowLegend): Show the legend docked by default.
8342
8343 2003-03-28 Jonathan Coles <[email protected]>
8344
8345 * Thuban/UI/classifier.py: Support for highlighting a specific
8346 group within the grid when the classification dialog is opened.
8347 Also contains a lot of debugging printouts which will later
8348 be removed.
8349
8350 * Thuban/UI/dock.py: Complete rework on the dock code so that
8351 that it is fairly removed from the rest of the Thuban application.
8352 It is easy to add new docks which the rest of the program having
8353 to be aware of them.
8354
8355 * Thuban/UI/legend.py: Modifications to support selecting a
8356 specific group in the classification dialog. Changed how layers
8357 are drawn when the layer is visible/invisible.
8358
8359 * Thuban/UI/mainwindow.py: Removed legend specific code and
8360 replaced it with calls to the new dock code.
8361
8362 * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
8363 to check if scale > 0. Trying to track down a divide by zero.
8364
8365 2003-03-26 Jonathan Coles <[email protected]>
8366
8367 * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
8368 (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
8369 now part of DockableWindow.
8370 (LegendPanel.DoOnSelChanged): Select the current layer in the
8371 map.
8372 (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
8373 with the selected layer and/or group.
8374
8375 2003-03-26 Jonathan Coles <[email protected]>
8376
8377 This putback contains the code for dockable windows. There is
8378 no support in wxWindows as of this date for windows that can
8379 attach themselves to other windows.
8380
8381 The current model contains a DockableWindow which has a parent
8382 window for when it is detached and a dock window that it puts
8383 its contents in when it is docked. The contents of a DockableWindow
8384 must be a DockPanel. DockPanel itself derives from wxPanel.
8385
8386 * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
8387 message, not a LAYER_LEGEND_CHANGED message.
8388
8389 * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
8390
8391 * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
8392 as one of the style properties for the fieldTypeText item to
8393 be sure that its size is correct when the text changes.
8394
8395 * Thuban/UI/dock.py: New. Classes for the DockPanel and
8396 DockableWindow.
8397
8398 * Thuban/UI/legend.py: Added some more buttons and made the
8399 LegendPanel a DockPanel.
8400
8401 * Thuban/UI/mainwindow.py: Added sash windows to the main window
8402 and supporting functions for manipulating the sashes.
8403 (MainWindow.ShowLegend): Create a DockableWindow with the
8404 LegendPanel as the contents.
8405
8406 * Thuban/UI/messages.py: Added DOCKABLE_* messages
8407
8408 * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
8409 not LAYER_LEGEND_CHANGED, messages.
8410
8411 2003-03-25 Jonathan Coles <[email protected]>
8412
8413 * setup.py: Added custom script bdist_rpm_build_script so that
8414 when the rpm is built the path to wx-config is correct.
8415
8416 * setup.cfg: Added line saying to use the custom build script
8417
8418 2003-03-20 Jonathan Coles <[email protected]>
8419
8420 Initial implementation of the Legend.
8421
8422 * Thuban/UI/legend.py: New. Creates a window that shows the map's
8423 Legend information and allows the user to add/modify classifications
8424 and how the layers are drawn on the map.
8425
8426 * setup.py: New command 'build_docs' which currently uses
8427 happydoc to generate html documentation for Thuban.
8428
8429 * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
8430 Returns a string which is appropriately describes the group.
8431
8432 * Thuban/Model/layer.py (Layer.SetClassification): Generate a
8433 LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
8434
8435 * Thuban/Model/map.py (Map): Rename messages and use new, more
8436 specific, messages.
8437
8438 * Thuban/Model/messages.py: New message to indicate that a layer's
8439 data has changed (LAYER_CHANGED). New map messages to indicate
8440 when layers have been added/removed/changed or if the stacking order
8441 of the layers has changed.
8442
8443 * Thuban/Model/session.py: Rename and use new messages.
8444
8445 * Thuban/UI/classifier.py: Remember if any changes have actually
8446 been applied so that if the dialog is cancelled without an application
8447 of changes we don't have to set a new classification.
8448 (ClassDataPreviewer): Pulled out the window specific code and put it
8449 ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
8450 symbols on any DC.
8451
8452 * Thuban/UI/mainwindow.py: New code to open the legend.
8453
8454 * Thuban/UI/view.py: Use new message names.
8455
8456 2003-03-19 Jonathan Coles <[email protected]>
8457
8458 * Thuban/UI/main.py (verify_versions): New. Checks the versions
8459 of Python, wxPython, and some other libraries.
8460
8461 * extensions/thuban/wxproj.cpp (check_version): Checks the given
8462 version against what wxproj was compiled with.
8463 (check_version_gtk): If wxproj was compiled with gtk then check
8464 the given version against the version of the gtk library
8465 currently being used.
8466
8467 2003-03-14 Bernhard Herzog <[email protected]>
8468
8469 * test/test_command.py: Run the tests when the module is run as a
8470 script
8471
8472 2003-03-14 Bernhard Herzog <[email protected]>
8473
8474 Implement selection of multiple selected shapes in the same layer:
8475
8476 - Introduce a new class to hold the selection. This basically
8477 replaces the interactor which was nothing more than the
8478 selection anyway. A major difference is of course that the new
8479 selection class supports multiple selected shapes in one layer
8480
8481 - Move the object that represents the selection from the
8482 application to the canvas. The canvas is a better place than the
8483 application because the selection represents which shapes and
8484 layer of the map displayed by the canvas are selected and
8485 affects how the map is drawn.
8486
8487 - Make the selection and its messages publicly available through
8488 the mainwindow.
8489
8490 - The non-modal dialogs do not get a reference to the interactor
8491 anymore as they can simply refer to their parent, the
8492 mainwindow, for the what the interactor had to offer.
8493
8494 * Thuban/UI/selection.py: New module with a class to represent the
8495 selection.
8496
8497 * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
8498 these unused messages
8499
8500 * Thuban/UI/application.py (ThubanApplication.OnInit)
8501 (ThubanApplication.OnExit, ThubanApplication.SetSession): The
8502 interactor is gone now.
8503 (ThubanApplication.CreateMainWindow): There is no interactor
8504 anymore so we pass None as the interactor argument for now for
8505 compatibility.
8506
8507 * Thuban/UI/view.py (MapCanvas.delegated_messages)
8508 (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
8509 Unsubscribe, delegate messages according to the delegated_messages
8510 class variable.
8511 (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
8512 attributes from instance variables as described with the
8513 delegated_methods class variable.
8514 (MapCanvas.__init__): New instance variable selection holding the
8515 current selection
8516 (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
8517 pass them on to the renderer
8518 (MapCanvas.SetMap): Clear the selection when a different map is
8519 selected.
8520 (MapCanvas.shape_selected): Simple force a complete redraw. The
8521 selection class now takes care of only issueing SHAPES_SELECTED
8522 messages when the set of selected shapes actually does change.
8523 (MapCanvas.SelectShapeAt): The selection is now managed in
8524 self.selection
8525
8526 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
8527 (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
8528 Unsubscribe, delegate messages according to the delegated_messages
8529 class variable.
8530 (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
8531 attributes from instance variables as described with the
8532 delegated_methods class variable.
8533 (MainWindow.__init__): The interactor as ivar is gone. The
8534 parameter is still there for compatibility. The selection messages
8535 now come from the canvas.
8536 (MainWindow.current_layer, MainWindow.has_selected_layer):
8537 Delegate to the the canvas.
8538 (MainWindow.LayerShowTable, MainWindow.Classify)
8539 (MainWindow.identify_view_on_demand): The dialogs don't need the
8540 interactor parameter anymore.
8541
8542 * Thuban/UI/tableview.py (TableFrame.__init__)
8543 (LayerTableFrame.__init__, LayerTableFrame.OnClose)
8544 (LayerTableFrame.row_selected): The interactor is gone. It's job
8545 from the dialog's point of view is now done by the mainwindow,
8546 i.e. the parent. Subscribe to SHAPES_SELECTED instead
8547 of SELECTED_SHAPE
8548
8549 * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
8550 is gone. It's job from the dialog's point of view is now done by
8551 the mainwindow, i.e. the parent.
8552
8553 * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
8554 gone. It's job from the dialog's point of view is now done by the
8555 mainwindow, i.e. the parent.
8556
8557 * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
8558 gone. It's job from the dialog's point of view is now done by the
8559 mainwindow, i.e. the parent.
8560 (SessionTreeCtrl.__init__): New parameter mainwindow which is
8561 stored as self.mainwindow. The mainwindow is need so that the tree
8562 can still subscribe to the selection messages.
8563 (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
8564 (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
8565 selection is now accessible through the mainwindow. Subscribe to
8566 SHAPES_SELECTED instead of SELECTED_SHAPE
8567
8568 * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
8569 SHAPES_SELECTED message now.
8570 (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
8571 so deal with multiple shapes
8572 (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
8573 gone. It's job from the dialog's point of view is now done by the
8574 mainwindow, i.e. the parent.
8575
8576 * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
8577 parameter is now a list of shape ids.
8578 (RecordTable.SetTable): The second parameter is now a list of
8579 indices.
8580
8581 * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
8582 selected_shape parameter and ivar to selected_shapes. It's now a
8583 list of shape ids.
8584 (MapRenderer.draw_label_layer): Deal with multiple selected
8585 shapes. Rearrange the code a bit so that the setup and shape type
8586 distinctions are only executed once.
8587
8588 * test/test_selection.py: Test cases for the selection class
8589
8590 2003-03-11 Jonathan Coles <[email protected]>
8591
8592 * Thuban/Model/load.py: Temporary fix so that the xml reader
8593 doesn't cause Thuban to crash.
8594
8595 * Thuban/Model/layer.py: Handle the cyclic references between
8596 a layer and its classification better, and be sure to disconnect
8597 the classification from the layer when the layer is destroyed
8598 so that we don't maintain a cyclic reference that may not be
8599 garbage collected.
8600
8601 * Thuban/Model/classification.py: See comment for layer.py.
8602
8603 2003-03-12 Jan-Oliver Wagner <[email protected]>
8604
8605 * HOWTO-Release: New. Information on the steps for releasing
8606 a new version of Thuban.
8607
8608 2003-03-11 Jonathan Coles <[email protected]>
8609
8610 * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
8611 Use True instead of true.
8612 (Classifier): Should have a single panel in which all the controls lie.
8613
8614 * Thuban/UI/proj4dialog.py: Add normal border.
8615
8616 * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
8617
8618 * Thuban/UI/mainwindow.py: Use True instead of true.
8619
8620 * setup.py: Update some definitions to use wxWindows2.4 files
8621
8622 * Data/iceland_sample_class.thuban: Fixed file so that the
8623 field_type information is present.
8624
8625 2003-03-10 Jonathan Coles <[email protected]>
8626
8627 * Thuban/UI/classifier.py (Classifier.__init__): Make the
8628 field type label grow so that when the text changes the
8629 size is updated correctly. This may be a wxWindows bug.
8630
8631 2003-03-10 Jonathan Coles <[email protected]>
8632
8633 * Thuban/UI/application.py: Changed SESSION_CHANGED to
8634 SESSION_REPLACED.
8635
8636 * Thuban/UI/classifier.py: Wrap text with _().
8637 (ClassGrid.CreateTable): Set dimensions and size hints here,
8638 instead of in Reset, so we only set the size once.
8639
8640 * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
8641
8642 * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
8643 Call Close() instead of Shutdown().
8644
8645 * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
8646
8647 * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
8648 Go back to using OnClose() instead of Shutdown().
8649
8650 2003-03-10 Jonathan Coles <[email protected]>
8651
8652 * Thuban/UI/classifier.py (Classifier): SelectField() needed
8653 to know the old field index as well as the new one.
8654
8655 2003-03-10 Jonathan Coles <[email protected]>
8656
8657 * Thuban/UI/classifier.py (Classifier): Use __SelectField()
8658 to correctly set the table information and call this from
8659 __init__ and from _OnFieldSelect so that all the information
8660 is up to date when the dialog opens and when a field is changed.
8661
8662 2003-03-10 Jonathan Coles <[email protected]>
8663
8664 * Thuban/Model/classification.py (Classification): Don't use
8665 layer's message function directly, use the ClassChanged() method
8666 when then classification changes. SetField/SetFieldType/SetLayer
8667 must keep the information about field name and field type in
8668 sync when an owning layer is set or removed.
8669
8670 * Thuban/Model/layer.py: Added ClassChanged() so that the
8671 classification can tell the layer when its data has changed.
8672 (Layer.SetClassification): Accepts None as an arguement to
8673 remove the current classification and correctly handles
8674 adding a new classification.
8675
8676 * Thuban/Model/load.py: Comment out print statement
8677
8678 * test/test_classification.py, test/test_save.py: New and
8679 improved tests.
8680
8681 2003-03-07 Jonathan Coles <[email protected]>
8682
8683 * Thuban/Model/classification.py: Implemented __copy__ and
8684 __deepcopy__ for ClassGroup* and ClassGroupProperites so
8685 they can easily be copied by the classifier dialog.
8686 (ClassGroupProperites.__init__): The default line color should
8687 have been Color.Black.
8688
8689 * Thuban/UI/classifier.py: Setting and Getting table values now
8690 uses a consistent set of functions.
8691 (Classifier): Now non-modal. Has field type label which changes
8692 as the field changes. Keep track of buttons in a list so that
8693 we can enable/disable the buttons when the None field is selected.
8694 (SelectPropertiesDialog): Add buttons to make the colors transparent.
8695
8696 * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
8697 does what OnClose did, but can be called by the application to
8698 close a window. Needed when a session changes, and we have to
8699 close the classifier windows.
8700
8701 * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
8702 Shuts down open dialogs. Used when a new session is created
8703 or a session is opened.
8704 (MainWindow.SaveSession): Should only call application.SaveSession()
8705 if we don't call SaveSessionAs first.
8706 (MainWindow.Classify): Allow different classifier dialogs for
8707 different layers.
8708
8709 * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
8710 the parent class handle it. Add Shutdown() to unsubscibe from
8711 event notification and call the parent Shutdown(). This was
8712 necessary so the application can close the tree window.
8713
8714 2003-03-06 Jonathan Coles <[email protected]>
8715
8716 * Thuban/Model/classification.py: Minor documentation changes,
8717 Addition of __eq__ and __ne__ methods.
8718 (Classification.SetLayer): prevent recursion between this method
8719 and Layer.SetClassification().
8720
8721 * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
8722
8723 * Thuban/Model/layer.py (SetClassification): prevent recursion
8724 between this method and Classification.SetLayer().
8725
8726 * test/test_classification.py, test/test_load.py,
8727 test/test_session.py: Fixed and added tests for the classification
8728 classes.
8729
8730 2003-03-06 Bernhard Herzog <[email protected]>
8731
8732 * Thuban/UI/classifier.py (ClassGrid.__init__)
8733 (ClassGrid.CreateTable): Move the SetSelectionMode call to
8734 CreateTable because otherwise it triggers an assertion in
8735 wxPython/wxGTK 2.4.
8736
8737 2003-03-05 Jonathan Coles <[email protected]>
8738
8739 * Thuban/common.py: Move FIELDTYPE constants back to table.py.
8740
8741 * Thuban/Model/load.py: import FIELDTYPE constants from table.
8742
8743 * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
8744
8745 * Thuban/Model/table.py: Put FIELDTYPE constants back.
8746
8747 2003-03-05 Jonathan Coles <[email protected]>
8748
8749 * Thuban/UI/classifier.py: Added class documentation.
8750 Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
8751 Store just the groups in the table and generate the other
8752 column information when it is requested. Add "None" field
8753 to pull-down to select no classification.
8754
8755 * Thuban/common.py: Moved FIELDTYPE constants from table.py
8756 (Str2Num): Only catch ValueError exceptions.
8757
8758 * Thuban/Model/classification.py: Class documentation. Renaming
8759 of methods with Stroke to Line. Groups are stored in a single
8760 list with the default as the first element. Groups are searched
8761 in the order they appear in the list.
8762
8763 * Thuban/Model/color.py: Documentation.
8764
8765 * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
8766 the kind of data represented by a field.
8767
8768 * Thuban/Model/load.py (ProcessSession): Use proper string
8769 conversion function; fixes RTbug #1713.
8770
8771 * Thuban/Model/save.py (Saver): Store field type information.
8772
8773 * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
8774 (Table): Add field_info_by_name() to retrieve field information
8775 by specifying the field name, not the number.
8776
8777 * Thuban/UI/mainwindow.py: Function name changes.
8778
8779 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
8780 get the layer classification once. Don't try to classify
8781 values when the field is None: just use the default properties.
8782
8783 * Thuban/UI/view.py: Function name changes.
8784
8785 * Doc/thuban.dtd: Add field_type attribute to a classification.
8786
8787 2003-03-04 Bernhard Herzog <[email protected]>
8788
8789 * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
8790 the fill and stroke layer attributes optional with suitable
8791 default values. Add the stroke_width layer attribute. Use correct
8792 syntax for empty elements. Make the attribute list for labels
8793 refer to the label element.
8794
8795 2003-03-04 Bernhard Herzog <[email protected]>
8796
8797 * setup.py (thuban_build_py.build): Add a comment about distutils in
8798 Python 2.3 containing some of the functionality we implement in
8799 setup.py ourselves.
8800
8801 * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
8802 before the selection mode. Doing it the other way round triggers
8803 an assertion in wxWindows.
8804
8805 * Thuban/Model/save.py (escape): Fix typo in doc-string
8806
8807 * Thuban/Model/classification.py: Remove unnecessary wxPython
8808 import
8809
8810 2003-03-04 Jonathan Coles <[email protected]>
8811
8812 * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
8813 Parameter 'value' should default to None.
8814
8815 * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
8816 the class attribute __classification is now private.
8817
8818 * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
8819 Classifier to ClassGrid. Added support for removing selected rows,
8820 which including code for keeping track of when cells are selected,
8821 and deselected.
8822 (ClassTable): Support for added/removing rows. Fixed a problem
8823 with __ParseInput whereby it would not allow strings (only numbers)
8824 to be entered.
8825 (Classifier): Added button and supporting code for removing
8826 selected rows.
8827
8828 2003-02-27 Jonathan Coles <[email protected]>
8829
8830 * Thuban/common.py: Moved color conversion functions into
8831 Thuban/UI/common.py.
8832 (Str2Num): Now converts the float (not the string) to a long/int
8833 so that an exception isn't thrown.
8834
8835 * Thuban/UI/common.py: Common functions used in several UI modules
8836
8837 * Thuban/Model/classification.py: Changed the class hierarchy
8838 so that a Classification consists of Groups which return
8839 Properties when a value matches a Group.
8840
8841 * Thuban/Model/layer.py: Fixed name resolution problem.
8842
8843 * Thuban/Model/load.py: Use new Classification and Group functions.
8844
8845 * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
8846 failure.
8847 (Saver.write_classification): Use new Classification and Group
8848 functions.
8849
8850 * Thuban/UI/classifier.py: Changes to use new Classification and Group
8851 functions. Fix to create a tuple with a single value instead of
8852 simply returning the value.
8853
8854 * Thuban/UI/renderer.py: Use new Classification and Group functions.
8855 Use common.py functions.
8856
8857 * Thuban/UI/tree.py: Use common.py functions.
8858
8859 * test/test_classification.py: Use new Classification and Group
8860 classes.
8861
8862 2003-02-24 Jonathan Coles <[email protected]>
8863
8864 * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
8865 functions from Thuban color objects to wxWindow colour objects.
8866
8867 * Thuban/Model/classification.py (Classification): Renamed
8868 GetProperties() to GetClassData(). Used the new iterator
8869 in TreeInfo().
8870 (ClassIterator): Iterator implementation to iterate over the
8871 ClassData objects in a classification object.
8872
8873 * Thuban/Model/save.py (Saver.write_classificaton): Uses
8874 the new iterator to save the classification information.
8875
8876 * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
8877 for changing the stroke and fill colors and previewing the
8878 changes.
8879
8880 * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
8881 MainWindow.SaveSessionAs): Text string changes so the dialogs
8882 have more meaningful titles.
8883
8884 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
8885 Classification method name from GetProperties to GetClassData.
8886
8887 * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
8888 instead of accessing now non-existent class variables.
8889
8890 2003-02-24 Bernhard Herzog <[email protected]>
8891
8892 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
8893 unneeded Shape() call. Rendering is substantially faster without
8894 it and it avoids some problems with broken shape files.
8895
8896 2003-02-20 Frank Koormann <[email protected]>
8897
8898 Force minimal size of identify and label dialogs. The autosizing
8899 looked too ugly.
8900
8901 * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
8902 * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
8903 Set size of listctrl.
8904 * Thuban/UI/identifyview.py (IdentifyView.__init__):
8905 Set size of dialog.
8906
8907 2003-02-19 Jonathan Coles <[email protected]>
8908
8909 * test/test_classification.py, test/test_layer.py,
8910 test/test_load.py, test/test_map.py, test/test_session.py:
8911 Updated the tests to use the new functions that are in the
8912 respective classes.
8913
8914 * Thuban/Model/classification.py (Classification):
8915 Uses the new ClassData* classes. Modification messages are
8916 passed up to the parent layer (if it exists).
8917 (ClassData): New class to encapsulate the common data in each
8918 classification property.
8919 (ClassDataDefault): Represents the Default class. data.
8920 (ClassDataPoint): Represents a single class. data point
8921 (ClassDataRange): Represents a class. range
8922 (ClassDataMap): Represents a class. map (unused).
8923
8924 * Thuban/Model/color.py: Added Color.None to represent something
8925 with no color. Color.Black represents the color black.
8926 (NoColor): Helper class derived from Color to represent something
8927 with no color.
8928
8929 * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
8930 stroke_width attributes. Made the 'classification' attribute private.
8931 New methods for setting/getting the classification.
8932
8933 * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
8934 to get the classifcation and use the new ClassData* classes to
8935 hold the classification data. Use Str2Num to convert numbers
8936 properly.
8937
8938 * Thuban/Model/save.py (Saver): Use new Color and Classification
8939 methods
8940
8941 * Thuban/UI/classifier.py (ClassGrid): New class to represent a
8942 custom grid.
8943 (ClassTable): Support for editing Values and Labels and for
8944 changing what type (point or range) of data is stored in each
8945 property based on how the user enters the data.
8946 (Classifier): Support for saving the new classifications and
8947 launching the dialog to edit a property.
8948 (SelectPropertiesDialog): New class for editing the visual
8949 properties of a classification (stroke color, width, and fill color)
8950 (ClassPreviewer): Took the Draw method from ClassRenderer and
8951 made most of it into this new class. Intend to use this class in
8952 the SelectPropertiesDialog for previewing changes.
8953
8954 * Thuban/UI/renderer.py: Use new Color and Classification methods.
8955
8956 * Thuban/UI/tree.py: Formatting changes.
8957
8958 * Doc/thuban.dtd: Add 'label' element
8959
8960 * Thuban/common.py: New. Contains common routines used throughout
8961 the code.
8962 (Str2Num): Takes a string and converts it to the "best" type of
8963 number.
8964
8965 2003-02-14 Bernhard Herzog <[email protected]>
8966
8967 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
8968 dragging flag is always set to 0 even when the tool implementation
8969 raises an exception
8970
8971 2003-02-11 Bernhard Herzog <[email protected]>
8972
8973 * Thuban/UI/application.py (ThubanApplication.splash_screen): New
8974 method to create a splash screen.
8975 (ThubanApplication.ShowMainWindow): New. Show the main window.
8976 Needed so the splash screen can display the mainwindow
8977 (ThubanApplication.OnInit): Call the
8978 new splash_screen method to determine whether the application
8979 should display a splash screen. If it displays a splash screen do
8980 not immediately show the main window.
8981
8982 2003-02-11 Jonathan Coles <[email protected]>
8983
8984 * Thuban/Model/classification.py: Added import line to fix
8985 feature conflicts between running on python2.2 and python2.1.
8986
8987 * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
8988 onto the clinfo parameter, so removed the deepcopy().
8989
8990 2003-02-10 Jonathan Coles <[email protected]>
8991
8992 * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
8993 Added element_open variable to track opening and closing of tags
8994 so that tags that don't span more than one line are closed with
8995 /> instead of </tag_name>. Use the GetDefault*() methods of
8996 the Classification class.
8997
8998 * Thuban/Model/classification.py (Classificaton): Added set and
8999 get methods for the default data. The class also takes a layer
9000 reference so that modification messages can be sent. Fixed the
9001 methods to use the new ClassData class.
9002 (ClassData): New class to encapsulate the classification data
9003
9004 * Thuban/Model/layer.py (Layer): Remove the
9005 Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
9006 SetDefault*() methods on the layer's classification object.
9007 (Layer.__init__): Use the new SetDefault*() methods in the
9008 Classification class.
9009
9010 * Thuban/Model/load.py (ProcessSession): Use the new ClassData
9011 object instead of a dictionary.
9012
9013 * Thuban/UI/classifier.py (ClassRenderer): New class to
9014 draw the classifications in the dialog box's table.
9015 (Classifier): Modified to use the ClassRenderer class.
9016
9017 * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
9018 methods of the Classification class.
9019
9020 * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
9021 of the ClassData class.
9022
9023 * test/test_classification.py, test/test_layer.py,
9024 test/test_map.py, test/test_session.py: Fix the tests to work
9025 with the above code changes.
9026
9027 2003-02-03 Jonathan Coles <[email protected]>
9028
9029 * Thuban/Model/classification.py (Classification): Added getNull()
9030 to return the NullData reference
9031
9032 * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
9033 Layer.SetStrokeWidth): Modified these functions to change the
9034 null data in the classification rather than keep these values
9035 directly in the Layer class. Menu options to change these values
9036 work again.
9037
9038 2003-01-28 Jonathan Coles <[email protected]>
9039
9040 * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
9041 Fixed crashing problem on some systems. Dialog box shows
9042 classification data.
9043
9044 * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
9045 Colors in the tree view.
9046
9047 * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
9048 the tree info for classifications. Commented out unnecessary lines.
9049
9050 * Thuban/Model/classification.py (Classification.TreeInfo): New
9051 function to add information about the classification into the
9052 tree view.
9053
9054 2003-01-27 Jan-Oliver Wagner <[email protected]>
9055
9056 * Thuban/__init__.py (_): New.
9057
9058 * Thuban/Model/classification.py, Thuban/Model/extension.py,
9059 Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
9060 Thuban/Model/session.py, Thuban/UI/application.py,
9061 Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
9062 Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
9063 Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
9064 Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
9065 Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
9066
9067 2003-01-27 Jonathan Coles <[email protected]>
9068
9069 * Thuban/Model/layer.py: Classification initialization calls.
9070
9071 * Thuban/Model/classification.py: Created class to encapsulate
9072 a layer classification. Supports specific data points and
9073 ranges.
9074
9075 * Thuban/Model/load.py: Added support for loading classification
9076 information.
9077
9078 * Thuban/Model/save.py: Added support for saving classification
9079 information.
9080
9081 * Thuban/UI/classifier.py: Initial class for a dialog box for
9082 specifying classification information.
9083
9084 * Thuban/UI/mainwindows.py: Support for opening the classifier
9085 dialog.
9086
9087 * Thuban/UI/renderer.py: Support for drawing a layer with the
9088 classification information.
9089
9090 * Data/iceland_sample_class.thuban: iceland_sample with
9091 classification data.
9092
9093 * test/test_classification: Tests for the Classification class.
9094
9095 2002-12-09 Bernhard Herzog <[email protected]>
9096
9097 * test/test_command.py: New. Tests for the command classes.
9098
9099 * Thuban/UI/command.py (ToolCommand): New class for tool commands.
9100 (Command.IsTool): New method to distinguish between command
9101 switching tools and other commands.
9102
9103 * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
9104 the tool to avoid direct assignments to instance variables
9105 (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
9106 (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
9107 change the tool
9108
9109 * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
9110 active tool's command turns insensitive, disable the tool.
9111 (_tool_command): Use the new ToolCommand class
9112
9113 * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
9114 SelectTool method to change the tool
9115 (iconfile): Use the ToolCommand class
9116
9117 2002-12-03 Bernhard Herzog <[email protected]>
9118
9119 * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
9120 the case of selected items that are not children of Layers or Maps
9121 properly. Previously this bug would trigger an assertion in
9122 wxWindows.
9123
9124 2002-11-06 Frank Koormann <[email protected]>
9125
9126 * Thuban/UI/mainwindow.py: Altered the order of tools in the
9127 toolbar: First now are all navigation tools (Zoom In/Out, Pan,
9128 Full Extent).
9129
9130 2002-10-23 Bernhard Herzog <[email protected]>
9131
9132 * setup.py (setup call): version now 0.1.3
9133
9134 * MANIFEST.in: Add the files in test/
9135
9136 * test/README: Add note about tests requiring the iceland data
9137
9138 * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
9139 copyright notice.
9140
9141 2002-10-18 Bernhard Herzog <[email protected]>
9142
9143 * test/test_map.py
9144 (TestMapWithContents.test_projected_bounding_box): Use an explicit
9145 epsilon.
9146
9147 * test/support.py (FloatComparisonMixin.assertFloatEqual)
9148 (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
9149 message if the assertion fails and don't return the return value
9150 of self.assert_. In assertFloatSeqEqual the return meant that not
9151 all items of the sequence were compared.
9152
9153 2002-09-20 Bernhard Herzog <[email protected]>
9154
9155 * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
9156
9157 * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
9158
9159 * test/test_map.py (TestMapWithContents.test_tree_info): Create
9160 the string with the bounding box on the fly because of platform
9161 differences in the way %g is handled.
9162
9163 * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
9164 DBFfile too because Thuban layers can't yet cope missing DBF
9165 files.
9166
9167 2002-09-20 Bernhard Herzog <[email protected]>
9168
9169 * test/test_menu.py: Use initthuban instead of
9170 add_thuban_dir_to_path to initialize Thuban.
9171
9172 * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
9173 Mixin class for float comparisons
9174 (SubscriberMixin): New. Mixin class to test messages sent through
9175 the Connector class
9176
9177 * test/README: Fix a typo and add the -v flag to the command for
9178 individual tests
9179
9180 * test/test_session.py: New. Test cases for Thuban.Model.session
9181
9182 * test/test_proj.py: New. Test cases for Thuban.Model.proj
9183
9184 * test/test_map.py: New. Test cases for Thuban.Model.map
9185
9186 * test/test_layer.py: New. Test cases for Thuban.Model.layer
9187
9188 * test/test_label.py: New. Test cases for Thuban.Model.label
9189
9190 * test/test_connector.py: New. Test cases for Thuban.Lib.connector
9191
9192 * test/test_color.py: New. Test cases for Thuban.Model.color
9193
9194 * test/test_base.py: New. Test cases for Thuban.Model.base
9195
9196 2002-09-13 Bernhard Herzog <[email protected]>
9197
9198 * Thuban/Model/session.py (Session.forwarded_channels): Forward
9199 the CHANGED channel too.
9200
9201 * Thuban/Model/map.py (Map.forwarded_channels): Forward the
9202 CHANGED channel too.
9203 (Map.__init__): Call the Modifiable constructor as well.
9204
9205 * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
9206 event if the modified flag changes.
9207 (Modifiable.changed): Tweak the doc-string.
9208
9209 * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
9210 (MainWindow.set_position_text): Put the code that puts the text
9211 with the mouse position into the status bar into the new method
9212 set_position_text so that it can overwritten in derived classes.
9213
9214 2002-09-12 Bernhard Herzog <[email protected]>
9215
9216 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
9217 message box on the main window.
9218
9219 2002-09-11 Bernhard Herzog <[email protected]>
9220
9221 * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
9222 the 'E' because it's less likely to interfere with other menu
9223 entries.
9224 (MainWindow.build_menu): remove an incorrect comment.
9225
9226 2002-09-10 Bernhard Herzog <[email protected]>
9227
9228 * Thuban/UI/mainwindow.py (MainWindow.Map): New.
9229 (_tool_command): Add sensitive parameter
9230 (_has_visible_map): Sensitivity callback to tools and other
9231 commands that require a visible map. Use it in map_zoom_in_tool,
9232 map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
9233 and map_full_extent
9234
9235 2002-09-06 Bernhard Herzog <[email protected]>
9236
9237 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
9238 VIEW_POSITION
9239
9240 2002-09-04 Frank Koormann <[email protected]>
9241
9242 * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
9243
9244 2002-09-02 Bernhard Herzog <[email protected]>
9245
9246 * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
9247 wxWindows already and our implementation doesn't work correctly
9248 with wxGTK 2.3:
9249 (MapCanvas.__init__): Remove the instance variable
9250 (MapCanvas.OnPaint): Always call do_redraw when there's a map to
9251 be drawin
9252 (MapCanvas.OnIdle): Removed.
9253
9254 * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
9255 a parameter to determine the size of the rectangle.
9256 (MapCanvas.find_shape_at): Create the box around the point on a
9257 layer by layer basis and make the size depend on the shape type.
9258 This solves a problem with the selection of point shapes at the
9259 border of the layer's bounding box
9260
9261 2002-08-30 Bernhard Herzog <[email protected]>
9262
9263 * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
9264 for the sensitivity of remove layer.
9265 (_can_remove_layer): New. Sensitivity callback for remove layer
9266 (Command layer_remove): Use _can_remove_layer
9267
9268 * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
9269 determine whether a given layer can be deleted.
9270
9271 * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
9272 (MapCanvas.do_redraw): Get rid of the unused update_region
9273 instance variable
9274
9275 * Thuban/UI/view.py: Add/update some doc-strings.
9276
9277 * test/: new subdirectory with a bunch of unit tests.
9278
9279 * test/README, test/test_table.py, test/test_save.py,
9280 test/test_menu.py, test/test_load.py: Initial set of tests and
9281 brief instructions on how to run them
9282
9283 2002-08-29 Bernhard Herzog <[email protected]>
9284
9285 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
9286 arcs with multiple parts.
9287
9288 * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
9289 Handle degenrate rectangles.
9290
9291 * Thuban/Model/table.py: Make writing records work correctly:
9292 (Table.__init__): Keep track of whether the DBF is open for
9293 writing
9294 (Table.write_record): Open the DBF file for writing when necessary
9295
9296 2002-08-27 Bernhard Herzog <[email protected]>
9297
9298 * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
9299 dbf files only for reading by default. Use a new writable dbf
9300 object for writing.
9301
9302 2002-08-26 Bernhard Herzog <[email protected]>
9303
9304 * Thuban/UI/mainwindow.py: Refactor the context creation:
9305 (MainWindow.Context): New method to return a context
9306 (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
9307 new method
9308
9309 * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
9310 layer table specific code from TableGrid into LayerTableGrid
9311 (TableFrame, LayerTableFrame): Split the layer table specific code
9312 from TableFrame into LayerTableFrame
9313 (LayerTableGrid.select_shape): Remove a debug print
9314
9315 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
9316 LayerTableFrame
9317
9318 2002-08-23 Bernhard Herzog <[email protected]>
9319
9320 * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
9321 absolute filename.
9322
9323 2002-08-22 Bernhard Herzog <[email protected]>
9324
9325 * Thuban/Model/table.py (Table.write_record): New method to write
9326 records.
9327 (Table.__init__): Open the DBF file for writing too.
9328
9329 * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
9330 into the underlying table.
9331
9332 * extensions/shapelib/shapefil.h (DBFCommit),
9333 extensions/shapelib/dbfopen.c (DBFCommit): New API function to
9334 commit any changes made to the DBF file.
9335
9336 * Thuban/UI/mainwindow.py (make_check_current_tool)
9337 (_tool_command): Put the code that generates the "checked"
9338 callback into a separate function so that we can reuse it
9339 elsewhere
9340
9341 * Thuban/Model/save.py (Saver): New class to handle serializing a
9342 session into an XML file. The main reason to introduce a class is
9343 that applications built on Thuban can derive from it so that they
9344 can save additional information in a session file.
9345 (save_session): Delegate almost all the work to the Saver class.
9346 Rename the filename argument to file because it may be a file like
9347 object now.
9348
9349 * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
9350 code. Remove the little test code which would be executed when the
9351 module is run as a script which didn't work anymore since it can't
9352 import the other Thuban modules.
9353 (ProcessSession, load_session): Refactor the ProcessSession to
9354 have one method for each element start and end tag so that derived
9355 classes can easily override the processing of individual tags.
9356 Also, always parse with namespaces enabled because applications
9357 built on top of Thuban will likely use namespaces if they extend
9358 the session file format.
9359
9360 2002-08-21 Bernhard Herzog <[email protected]>
9361
9362 * setup.py (ThubanInstall.run): Don't repr install_lib_orig
9363 because thubaninit_contents will do it for us.
9364
9365 2002-08-16 Jan-Oliver Wagner <[email protected]>
9366
9367 * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
9368 tree window already open
9369
9370 2002-08-15 Bernhard Herzog <[email protected]>
9371
9372 * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
9373 with self.
9374
9375 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
9376 when we have actually captured it.
9377
9378 * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
9379 shapefile and destroy the table.
9380
9381 * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
9382
9383 2002-08-14 Bernhard Herzog <[email protected]>
9384
9385 * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
9386 instance variable columns
9387 (RecordTable.GetTypeName): row and col may be negative in some
9388 cases.
9389
9390 * setup.py (InstallLocal.initialize_options)
9391 (InstallLocal.finalize_options, InstallLocal.user_options): New
9392 option create-init-file to build a thubaninit.py when running
9393 install_local
9394 (InstallLocal.run): Create the thubaninit.py module when requested
9395 (thubaninit_contents): Split the template into several parts and
9396 create a new function thubaninit_contents that creates the
9397 contents of a thubaninit module.
9398 (ThubanInstall.run): Use the new function to create the thubaninit
9399 module.
9400
9401 2002-07-30 Bernhard Herzog <[email protected]>
9402
9403 * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
9404 cleanup.
9405 (ThubanApplication.MainLoop): Extend to automatically call OnExit.
9406
9407 * Thuban/Model/session.py (Session.Destroy): Don't bypass the
9408 direct base class' Destroy method.
9409
9410 * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
9411 layers.
9412 (Map.Destroy): Destroy the label_layer as well and call the
9413 inherited Desatroymethod first so that no more messages are
9414 issued.
9415 (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
9416 message if the stacking order actually has changed. Add
9417 doc-strings.
9418 (Map.BoundingBox): Correct the doc-string.
9419 (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
9420 (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
9421
9422 * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
9423 all labels.
9424
9425 2002-07-29 Bernhard Herzog <[email protected]>
9426
9427 * Thuban/Model/map.py (Map.subscribe_layer_channels)
9428 (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
9429 to a layer's channels into separate methods.
9430 (Map.RemoveLayer, Map.AddLayer): Call the new methods
9431 (Map.Destroy): Unsubscribe from a layer's channels before
9432 destroying it.
9433
9434 * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
9435 selected_layer parameter to searched_layer which is the layer to
9436 search in.
9437 (MapCanvas.SelectShapeAt): New parameter layer to restrict the
9438 search to that layer. Return the selected layer and shape.
9439
9440 * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
9441 typo
9442
9443 2002-07-24 Bernhard Herzog <[email protected]>
9444
9445 * Thuban/UI/application.py (ThubanApplication.create_session):
9446 Extend the doc string.
9447 (ThubanApplication.subscribe_session)
9448 (ThubanApplication.unsubscribe_session): New methods to
9449 subscribe/unsubscribe to/from session channels.
9450 (ThubanApplication.SetSession): Call the new methods here.
9451 (ThubanApplication.maps_changed, ThubanApplication.set_map):
9452 Renamed set_map to maps_changed. Its now a subscriber for
9453 MAPS_CHANGED.
9454
9455 * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
9456 x-coordinate in case of simple clicks
9457
9458 * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
9459 don't pass it as a parameter
9460
9461 * Thuban/Model/session.py (Session.RemoveMap): New
9462
9463 * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
9464 window size into a parameter.
9465
9466 2002-07-23 Bernhard Herzog <[email protected]>
9467
9468 * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
9469 just commands.
9470
9471 * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
9472 parameter list a bit to allow setting the window title and the
9473 initial message in the status bar. Update the callers.
9474
9475 * Thuban/UI/application.py (ThubanApplication.OnInit)
9476 (ThubanApplication.CreateMainWindow): Put the mainwindow
9477 instantiation into a separate method so that it can be overridden
9478 by a subclass.
9479
9480 2002-07-19 Bernhard Herzog <[email protected]>
9481
9482 * Thuban/Model/session.py: Issue a CHANGED message every time
9483 another changed message is issued to make it easier to get
9484 notified of changes.
9485 (Session): Update the doc string
9486 (Session.forward): Issue changed-events as CHANGED as well.
9487 (Session.changed): Overwrite the inherited version to issue
9488 CHANGED events as well.
9489
9490 * Thuban/UI/tree.py: We can now simply subscribe to the session's
9491 CHANGED channel to be informed of changes.
9492 (SessionTreeCtrl.session_channels): Not needed any longer.
9493 (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
9494 Only have to (un)subscribe CHANGED
9495
9496 * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
9497
9498 * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
9499 for the wxPython locale bug to __init__.py so that it's
9500 automatically executed by anybody using UI code from Thuban.
9501
9502 2002-07-18 Bernhard Herzog <[email protected]>
9503
9504 * Thuban/UI/main.py (main): app no longer needs to be global
9505
9506 * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
9507 as parameter and store it in an instance variable
9508 (MainWindow.invoke_command, MainWindow.update_command_ui)
9509 (MainWindow.save_modified_session, MainWindow.NewSession)
9510 (MainWindow.OpenSession, MainWindow.SaveSession)
9511 (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
9512 application object.
9513
9514 * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
9515 the main window with self.
9516
9517 * Thuban/UI/context.py: New module with the context class
9518
9519 * Thuban/UI/command.py (Command): Update doc string.
9520
9521 * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
9522 MainWindow.update_command_ui): Pass an instance of the context
9523 class to the command's methods
9524 (check_current_tool, call_method): Handle the new context
9525 implementation
9526
9527 * Examples/simple_extensions/simple_tool.py (simple_tool,
9528 check_simple_tool): Handle the new context implementation
9529
9530 * Examples/simple_extensions/simple_command.py (simple_command):
9531 Handle the new context implementation. Update the comments about
9532 the context.
9533
9534 * Thuban/UI/application.py (ThubanApplication.SetSession): Add
9535 doc-string
9536 (ThubanApplication.Session): New method to return the session
9537 object
9538
9539 * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
9540 interactor's selected_layer may not be a layer of the current
9541 session when the tree is updated while a new session is being set.
9542
9543 2002-07-17 Bernhard Herzog <[email protected]>
9544
9545 * Thuban/UI/tree.py (color_string): Removed. No longer used.
9546 (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
9547 update_tree into update_tree and add_items. The tree now uses a
9548 more generic way to display the contents of the tree.
9549 (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
9550
9551 * Thuban/Model/layer.py (Layer.TreeInfo),
9552 Thuban/Model/extension.py (Extension.TreeInfo),
9553 Thuban/Model/map.py (Map.TreeInfo),
9554 Thuban/Model/session.py (Session.TreeInfo):
9555 Add TreeInfo methods to implement the new tree view update scheme
9556
9557 2002-07-16 Bernhard Herzog <[email protected]>
9558
9559 * Thuban/UI/application.py: Don't use "import from" for the
9560 MainWindow. It can't always be resolved.
9561 (ThubanApplication.OnInit): change reference to MainWindow
9562 accordingly.
9563
9564 * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
9565 completely
9566
9567 2002-07-10 Bernhard Herzog <[email protected]>
9568
9569 * setup.py (create_init_module): New configurable variable whose
9570 default depends on the platform we're running on.
9571 (ThubanInstall.initialize_options): Initialize
9572 self.create_init_module from the global create_init_module
9573 (ThubanInstall.user_options): indictate that the options
9574 create-init-module and init-module-dir have arguments.
9575
9576 * setup.py: In the setup call change the version number to include
9577 cvs.
9578
9579 * MANIFEST.in: Add the files in Examples
9580
9581 2002-07-09 Bernhard Herzog <[email protected]>
9582
9583 * setup.py: In the setup call, use the thuban homepage as the
9584 value of the url parameter.
9585
9586 * Examples: New subdirectory for examples.
9587
9588 * Examples/simple_extensions/simple_tool.xpm,
9589 Examples/simple_extensions/simple_tool.py,
9590 Examples/simple_extensions/simple_command.py,
9591 Examples/simple_extensions/README: Simple examples showing how to
9592 add new commands and tools.
9593
9594 * setup.cfg (bdist_rpm): Add the default value for prefix and tell
9595 bdist_rpm that we also have an install script.
9596 (bdist_inno): Add 2002 to the copyright notice.
9597
9598 * setup.py: Create a file in python's site-packages directory to
9599 make installation of Thuban as a library easier.
9600 (ThubanInstall.user_options): Add two new options,
9601 create-init-module and init-module-dir
9602 (ThubanInstall.expand_with_pure_python_dirs): New method to expand
9603 filenames for installation in the default directories.
9604 (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
9605 the inherited methods to capture some filenames before they're
9606 transformed too much by distutils.
9607 (ThubanInstall.run): Create the init module if requested.
9608 (ThubanInstall.thuban_init_filename): New method to return the
9609 full name of the init module.
9610 (ThubanInstall.get_outputs): Append the filename of the init
9611 module.
9612
9613 2002-07-08 Bernhard Herzog <[email protected]>
9614
9615 * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
9616 handle the prefix properly which means that the default for the
9617 installation prefix should be /usr for RPMs and /usr/local when
9618 doing a normal source install.
9619 (bdist_rpm_install_script): Script to override the default install
9620 commands in the specfile generated by the bdist_rpm command.
9621 (thuban_bdist_rpm.user_options): Add a prefix option
9622 (thuban_bdist_rpm.initialize_options): Init the prefix option.
9623 Create the script files for the spec files as empty files here
9624 (thuban_bdist_rpm._make_spec_file): Override the inherited method
9625 to fill the script files with content.
9626
9627 * Thuban/Model/save.py (relative_filename): Wrapper around
9628 Thuban.Lib.fileutil.relative_filename that accepts an empty dir
9629 argument. save_session now automatically uses this version,
9630 solving a problem when saving to a relative filename.
9631
9632 * setup.py: In the setup call, make sure that the library
9633 directories are under $prefix/lib not directly under $prefix.
9634
9635 2002-06-20 Jan-Oliver Wagner <[email protected]>
9636
9637 * Thuban/Model/extension.py: new module to handle extension objects.
9638 * Thuban/Model/messages.py: new messages for extensions.
9639 * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
9640 Session.AddExtension): new for handling extensions.
9641 Also some other minor changes to round up extension handling.
9642 * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
9643 of Extension titles and title and names of its objects.
9644
9645 2002-05-29 Bernhard Herzog <[email protected]>
9646
9647 * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
9648 the events for a command.
9649 (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
9650 Call bind_command_events to bind the events. add_toolbar_command
9651 can now bind events too so that it's possible to have commands
9652 that are only available through the toolbar.
9653 (MainWindow.init_ids): New instance variable events_bound to keep
9654 track of for which commands events have been bound.
9655
9656 2002-05-28 Bernhard Herzog <[email protected]>
9657
9658 * Thuban/UI/menu.py: New module to build and manage menus.
9659
9660 * Thuban/UI/mainwindow.py: Remove some unused imports.
9661 (MainWindow.__init__, main_menu): move the definition of the main
9662 menu from __init__ to the Menu instance main_menu.
9663 (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
9664 build the menu bar and sub-menus from a menu description.
9665
9666 * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
9667 startup file
9668 (ThubanApplication.read_startup_files): New method to run
9669 ~/.thuban/thubanstart.py
9670
9671 * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
9672 Move the toolbar definition to the Menu instance main_toolbar.
9673 (MainWindow.build_toolbar): New method to build the toolbar
9674 similar to the build_menu methods
9675
9676 2002-05-23 Bernhard Herzog <[email protected]>
9677
9678 * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
9679 layer_outline_color. Fix it in the definition of the command too.
9680
9681 * Thuban/UI/command.py (Command): Fix typo in doc string
9682
9683 2002-05-22 Bernhard Herzog <[email protected]>
9684
9685 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
9686 in the docstring
9687
9688 2002-05-15 Bernhard Herzog <[email protected]>
9689
9690 * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
9691 when the shapefile is empty.
9692 (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
9693 now return None for empty shapefiles. Update doc-strings.
9694
9695 * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
9696 the layer's bbox being None.
9697
9698 * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
9699 layer's bbox being None.
9700
9701 * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
9702 necessary.
9703 (MapCanvas.__init__): New instance variables, last_selected_layer
9704 and last_selected_shape to determine how the selection has
9705 changed.
9706
9707 * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
9708 AutoSizeColumns because it will cause a traversal of the entire
9709 table which for large .dbf files will take a very long time.
9710
9711 2002-05-14 Bernhard Herzog <[email protected]>
9712
9713 * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
9714 maximum depth for the tree than shapelib does by default.
9715
9716 2002-05-10 Bernhard Herzog <[email protected]>
9717
9718 * setup.py (py_modules): The shptree modules doesn't have a
9719 wrapper, so don't include it in the py_modules
9720
9721 2002-05-08 Bernhard Herzog <[email protected]>
9722
9723 * extensions/shapelib/shptree.c (compare_ints): Make arguments
9724 const void * as in the qsort prototype
9725 (SHPTreeFindLikelyShapes): Remove some unused variables.
9726
9727 * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
9728 maintains to redraw the window during a drag.
9729 (MapCanvas.unprojected_rect_around_point): New method to determine
9730 a small region around a point for hit-testing.
9731 (MapCanvas.find_shape_at): Only test the shapes in a small region
9732 around the point.
9733
9734 * setup.py: Increment the version to 0.1.2
9735
9736 * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
9737 debug print and set session to None after unsubscribing
9738
9739 2002-05-07 Bernhard Herzog <[email protected]>
9740
9741 * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
9742 the file to have a .thuban extension.
9743
9744 * Thuban/UI/tree.py (session_channels): New class constant with
9745 all the session channels to subscribe to to update the tree
9746 (SessionTreeCtrl.session_changed): Remember the session so that we
9747 can unsubscribe properly. Use the new class constant to
9748 unsubscribe from the old session and subscribe to the new one.
9749 (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
9750 subscriptions of the SessionTreeCtrl.
9751 (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
9752
9753 * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
9754 Session Tree" command to the file menu.
9755
9756 * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
9757 as update_region to the renderer.
9758
9759 * Thuban/UI/renderer.py
9760 (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
9761 update box is now directly a tuple, not a wxRect anymore.
9762
9763 * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
9764 prints.
9765
9766 2002-05-07 Bernhard Herzog <[email protected]>
9767
9768 * setup.py: Add the shptree extension module. See
9769 extensions/pyshapelib/ChangeLog for more details.
9770
9771 * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
9772 extensions/shapelib/dbfopen.c: Really update to the versions of
9773 shapelib 1.2.9. For some reason it wasn't really done on
9774 2002-04-11.
9775
9776 * extensions/shapelib/shptree.c: Modified version of shptree.c of
9777 shapelib 1.2.9. The only real difference is the use of qsort
9778 instead of a bubble sort implementation
9779
9780 * Thuban/Model/layer.py (Layer.__init__): New instance variable
9781 shapetree to hold the shapelib quadtree for the shapefile
9782 (Layer.open_shapefile): Create the quad tree.
9783 (Layer.ShapesInRegion): New method to return the ids of shapes in
9784 a given region using the quad tree.
9785
9786 * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
9787 comment
9788 (draw_polygon_shape): Accept both arcs and polygons.
9789 (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
9790 the api.
9791
9792 * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
9793 return the shape ids to be rendered in a given layer.
9794 (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
9795 ids. Use draw_polygon_shape to draw arc shapes as well.
9796 (ScreenRenderer.RenderMap): New parameter for the rectangle that
9797 has to be updated
9798 (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
9799 calling it's ShapesInRegion method.
9800
9801 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
9802 update_region for the update region.
9803 (MapCanvas.OnPaint): Maintain the update region
9804 (MapCanvas.do_redraw): Pass the bounding box of the update_region
9805 to the renderer when drawing the bitmap. Reset the update_region.
9806
9807 2002-05-03 Bernhard Herzog <[email protected]>
9808
9809 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
9810 MainWindow.OpenSession): Change the file extension of the session
9811 files to .thuban
9812
9813 * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
9814 Move the map channels to be forwarded by the session into the
9815 class constant with forwarded_channels. Also add
9816 LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
9817 forwarded_channels
9818
9819 * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
9820 typo and some rewording).
9821
9822 2002-05-02 Bernhard Herzog <[email protected]>
9823
9824 * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
9825 around to speed up most redraws:
9826 (MapCanvas.__init__): New instance variable bitmap which holds the
9827 bitmap
9828 (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
9829 self.bitmap to draw.
9830 (MapCanvas.full_redraw): New method to force a full redraw
9831 including the bitmap
9832 (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
9833 make sure the bitmap is redrawn.
9834 (MapCanvas.projection_changed, MapCanvas.set_view_transform,
9835 MapCanvas.shape_selected): Call full_redraw instead of readraw to
9836 make sure the bitmap is redrawn.
9837 (MapCanvas.OnSize): New method to handle size events so that the
9838 bitmap can be redrawn.
9839
9840 2002-04-29 Bernhard Herzog <[email protected]>
9841
9842 * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
9843 canvas' VIEW_POSITION event
9844 (MainWindow.view_position_changed): Handler for VIEW_POSITION.
9845 Update the text in the status-bar accordingly.
9846
9847 * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
9848 (MapCanvas.__del__): Implement because Publisher.__del__ has to be
9849 called.
9850 (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
9851 current_position
9852 (MapCanvas.set_current_position): New method to set
9853 current_position. Issue a VIEW_POSITION event
9854 (MapCanvas.CurrentPosition): New public method to return the value
9855 of current_position. Should be called when the VIEW_POSITION event
9856 is processed.
9857 (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
9858 Update the position.
9859 (MapCanvas.OnLeaveWindow): Set the position to None.
9860
9861 * Thuban/UI/messages.py (VIEW_POSITION): New message for the
9862 position in the statusbar
9863
9864 2002-04-26 Frank Koormann <[email protected]>
9865
9866 * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
9867
9868 2002-04-24 Frank Koormann <[email protected]>
9869
9870 * Resources/Bitmaps/identify.xpm: shadow added
9871
9872 * Resources/Bitmaps/fullextent.xpm: new
9873
9874 2002-04-22 Jan-Oliver Wagner <[email protected]>
9875
9876 * Thuban/UI/tree.py (update_tree): added test for None on map bounding
9877 box
9878
9879 2002-04-21 Jan-Oliver Wagner <[email protected]>
9880
9881 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
9882
9883 * Thuban/UI/tree.py (update_tree): added added map extent
9884
9885 * Thuban/UI/mainwindow.py (_method_command): extended by parameter
9886 icon; added map_full_extend as tool
9887
9888 2002-04-19 Jan-Oliver Wagner <[email protected]>
9889
9890 * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
9891 saving _new_ sessions
9892
9893 * Thuban/Model/session.py (create_empty_session): new session
9894 don't have a filename (set to None)
9895
9896 * Thuban/UI/tree.py (update_tree): added filename and modified flag
9897
9898 * Thuban/Model/load.py (ProcessSession): convert projection
9899 parameters from unicode to regular string
9900
9901 * Data/iceland_sample.session: Added UTM Zone 26 projection.
9902
9903 2002-04-11 Bernhard Herzog <[email protected]>
9904
9905 * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
9906 extensions/shapelib/dbfopen.c: Update to the versions of shapelib
9907 1.2.9
9908
9909 * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
9910 the pyshapelib directoy into the list of include dirs, so that
9911 pyshapelib_api.h can be found.
9912
9913 * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
9914 holds the pyshapelib C-API
9915 (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
9916 pyshapelib_api to access the shapelib functions.
9917 (initwxproj): Import the c_api from the shapelib module and
9918 initialize pyshapelib_api.
9919
9920 2002-04-04 Bernhard Herzog <[email protected]>
9921
9922 * setup.py (thuban_bdist_rpm.initialize_options): Use
9923 initialize_options to create the scripts for the rpm.
9924
9925 * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
9926
9927 2002-04-03 Bernhard Herzog <[email protected]>
9928
9929 * setup.py: Increment version to 0.1.1
9930
9931 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
9932 Layer" and "Remove Layer" commands from the layer menu to the map
9933 menu
9934
9935 2002-02-15 Bernhard Herzog <[email protected]>
9936
9937 * Thuban/Model/layer.py (Layer.Shape): list append only takes one
9938 argument (python <= 1.5.2 erroneously accepted multiuple
9939 arguments)
9940
9941 2002-02-04 Bernhard Herzog <[email protected]>
9942
9943 * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
9944 RecordGrid in the identifyview.
9945 (IdentifyView.__init__): Use IdentifyGridCtrl instead of
9946 IdentifyListCtrl. The grid allows editing of the values.
9947
9948 * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
9949 implementing a grid for a single row of a thuban table.
9950
9951 * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
9952 layers by default. Easier to use than the previous default of only
9953 searching through the select layer which meant that if no layer
9954 was selected, you couldn't select a shape.
9955
9956 * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
9957
9958 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
9959 stroke_width attribute
9960
9961 * Thuban/Model/save.py (save_session): Write the new stroke_width
9962 attribute
9963
9964 * Thuban/Model/load.py (ProcessSession.startElement): Read the
9965 stroke_width attribute
9966
9967 * Thuban/Model/layer.py (Layer.__init__): New parameter and
9968 instance variable stroke_width
9969 (Layer.SetStrokeWidth): Set the stroke_width.
9970
9971 2002-02-01 Bernhard Herzog <[email protected]>
9972
9973 * extensions/thuban/wxproj.cpp (project_points): Fix two
9974 off-by-one errors in the last loop that joins the various parts
9975 together.
9976
9977 2002-01-14 Bernhard Herzog <[email protected]>
9978
9979 * setup.py (data_dist.make_distribution): Fix some typos
9980
9981 2001-09-18 Bernhard Herzog <[email protected]>
9982
9983 * README: Slight tweaking in preparation for the 0.1 release
9984
9985 * setup.cfg: Add section for sdist to create both tgz and zip
9986 archives
9987
9988 * setup.py: increase version number to 0.1
9989 (data_dist): New command class for data distribution
9990
9991 2001-09-14 Bernhard Herzog <[email protected]>
9992
9993 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
9994 Handle the case of no layer (i.e. layer is None) properly.
9995
9996 * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
9997 Set the initial selection of the combo boxes to reflect the
9998 projection we're starting with in a way that works on windows,
9999 too.
10000
10001 * Thuban/Lib/connector.py (Connector.print_connections): Print the
10002 puiblisher's ids in hex to make it easier to compare them to the
10003 standard repr of python methods
10004
10005 * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
10006 messages
10007
10008 2001-09-13 Bernhard Herzog <[email protected]>
10009
10010 * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
10011 deselect the layer if no layer is selected
10012
10013 * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
10014 idle time when there actually is something to draw. If there's
10015 nothing to draw simply clear the window
10016 (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
10017 (MapCanvas.SetMap): force a redraw in all cases because
10018 FitMapToWindow doesn't always do it.
10019 (MapCanvas.ZoomFactor): Add an optional parameter, center, to
10020 specify the point to move into the center of the window
10021 (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
10022 dragged, zoon in/out by a factor of 2
10023 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
10024 index, i.e. reversed drawing order) so that objects appearing to
10025 be in from of others are selected first. This is probably mostly
10026 relevant for point shapes where the symbols used may overlap
10027
10028 * Thuban/Model/session.py (create_empty_session): Unset the
10029 modified bit before returning it
10030
10031 * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
10032 create_empty_session session to create the new, empty session.
10033
10034 * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
10035 the tool bitmaps.
10036 (MainWindow.OnClose, MainWindow.save_modified_session): Separate
10037 the code that asks whether the session should be saved into the
10038 new method save_modified_session.
10039 (MainWindow.OpenSession, MainWindow.NewSession): Use the new
10040 method to save modified session here too.
10041
10042 2001-09-11 Bernhard Herzog <[email protected]>
10043
10044 * setup.py (InnoIconItem): fix typo
10045
10046 (thuban_bdist_inno.run):
10047 (bdist_inno.run): Move the decision not to create symlinks on
10048 non-nt platforms to thuban_bdist_inno and do it unconditinally
10049 since we never want to create the symlinks here
10050
10051 2001-09-10 Bernhard Herzog <[email protected]>
10052
10053 * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
10054 identify view immediately
10055
10056 * Thuban/UI/controls.py: New file with two classes RecordListCtrl
10057 and SelectableRecordListCtrl that implement the code shared by the
10058 identify view and the label dialog
10059
10060 * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
10061 new class RecordListCtrl
10062
10063 * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
10064 return value of GetValue is None instead of using it as a boolean
10065 directly so that Zero numbers are handled properly.
10066 (LabelListCtrl): Derive from the new class
10067 SelectableRecordListCtrl
10068
10069 * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
10070 (Proj4Dialog.dialogLayout): Make the window resizable and set the
10071 size of the text control explicitly to make the sizers work on
10072 both Windows and X.
10073
10074 2001-09-07 Bernhard Herzog <[email protected]>
10075
10076 * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
10077 that can limit the search to the currently selected layer.
10078 (MapCanvas.SelectShapeAt): Make sure that the currently selected
10079 layer stays selected even when no shape is found
10080 (MapCanvas.FitRectToWindow): If the rect has zero with or zero
10081 height do nothing (avoids zero division errors)
10082
10083 2001-09-06 Bernhard Herzog <[email protected]>
10084
10085 * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
10086 Correct the spelling of SessionTreeCtrl. dabbrev is too damn
10087 convenient :-)
10088 (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
10089 a new instvar layer_to_item to map layers to tree items
10090 (SessionTreeCtrl.layer_selected): Select the appropriate tree item
10091 to match the current selection in the interactor
10092
10093 * Thuban/UI/interactor.py (Interactor.SelectedLayer):
10094 (Interactor.HasSelectedLayer): New methods to query the current
10095 selection
10096
10097 * Thuban/UI/mainwindow.py (MainWindow.current_layer):
10098 (MainWindow.has_selected_layer): Simply call the appropriate
10099 interactor method
10100
10101 * Thuban/UI/mainwindow.py (MainWindow.__init__):
10102 (MainWindow.LayerShowTable):
10103 (MainWindow.identify_view_on_demand): Store the interactor in an
10104 instvar and use that reference instead of going through main.app
10105
10106 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
10107 * Thuban/UI/application.py (ThubanApplication.OnInit):
10108 * Thuban/UI/main.py (main): Create the session tree view in main
10109 with the new mainwindow method ShowSessionTree and not directly
10110 the application's OnInit method
10111
10112 * Thuban/UI/tree.py (myTreeCtrlPanel):
10113 (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
10114 TreeCtrl isntead of a panel. This affects most method since we now
10115 refer to self instead of self.tree
10116 (SessionTreeView): New class implementing a non-modal dialog
10117 showing the session tree.
10118
10119 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
10120 layer to the tableview dialog.
10121
10122 * Thuban/UI/tableview.py: Add some doc-strings
10123 (TableGrid):
10124 (TableGrid.OnRangeSelect):
10125 (TableGrid.OnSelectCell):
10126 (TableFrame.__init__):
10127 (TableFrame.row_selected):
10128 Selecting rows in the grid view now updates the selected shapes
10129 through the TableFrame. To achieve this we derive TableGrid from
10130 Publisher and introduce the message type ROW_SELECTED which the
10131 TableFrame subscribes to and which is issued by OnRangeSelect and
10132 OnSelectCell
10133
10134 (DataTable.SelectRow): Removed because it's no longer needed in
10135 the row/shape selection scheme
10136
10137 * Thuban/UI/dialogs.py: New file implementing common classes for
10138 dialogs
10139
10140 * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
10141 the SELECTED_SHAPE message anymore. This is now handled by the
10142 parent.
10143 (TableGrid.select_shape): Only update the selection if the shape
10144 is not None.
10145 (TableFrame): Inherit from the new NonModalDialog class.
10146 (TableFrame.__init__, TableFrame.select_shape): Handle the
10147 SELECT_SHAPE message.
10148 (TableFrame.OnClose): Extend the inherited method to unsubscribe
10149 SELECT_SHAPE
10150
10151 * Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
10152 (MainWindow.add_dialog):
10153 (MainWindow.dialog_open):
10154 (MainWindow.remove_dialog):
10155 (MainWindow.get_open_dialog): New methods to maintain a dictionary
10156 of opened non-modal dialogs.
10157
10158 (MainWindow.__init__): Initialize the new non-modal dictionary
10159 management code
10160 (MainWindow.LayerShowTable): maintain separate dialogs for each
10161 table using the non-modal dialog management code to only open a
10162 view once for each table.
10163
10164 (MainWindow.IdentifyTool):
10165 (MainWindow.__init__):
10166 (MainWindow.identify_view_on_demand): Don't open the identify view
10167 in IdentifyTool anymore. This will be done automatically by the
10168 new method identify_view_on_demand which handles the
10169 SELECTED_SHAPE message so that the identify view will be opened on
10170 demand
10171
10172 * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
10173 the interactor argument. The SELECTED_SHAPE message is now handled
10174 by the parent.
10175 (IdentifyView.__init__): Add the interactor argument so that we
10176 can handle the SELECTED_SHAPE message here
10177 (IdentifyView.selected_shape): New method to handle the
10178 SELECTED_SHAPE messages
10179
10180 * Thuban/UI/identifyview.py (IdentifyView): Derive from the new
10181 NonModalDialog class
10182 (IdentifyView.OnClose): Extend the inherited version to
10183 unsubscribe SELECT_SHAPE
10184
10185 * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints
10186
10187 2001-09-05 Bernhard Herzog <[email protected]>
10188
10189 * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
10190
10191 * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
10192 interactor to pass through to the MapCanvas
10193
10194 * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
10195 argument to the MainWindow constructor to get rid of the ugly hack
10196 that made main.app available early just so that the mapcanvas
10197 could access the interactor object.
10198
10199 2001-09-04 Bernhard Herzog <[email protected]>
10200
10201 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
10202 that runs a modal message box
10203 (MainWindow.OnClose): Use the new method
10204 (MainWindow.RemoveLayer): Just do nothing in case no layer is
10205 selected. The command should be grayed out anyway, so there's no
10206 need to pop up a message box.
10207 (MainWindow.AddLayer): Pop up a message box with an error message
10208 if the shape file can't be opened
10209
10210 * Thuban/Model/layer.py (Layer.__init__): Open the shapefile
10211 immediately. This will cause an exception in case the file can't
10212 be opened and we can display an appropriate message.
10213
10214 * MANIFEST.in: Add extensions/pyprojection/LICENSE
10215
10216 * setup.py (thuban_bdist_rpm): New class implementing a Thuban
10217 specific bdist_rpm command.
10218
10219 * Thuban/UI/main.py: Catch ImportError exceptions when importing
10220 the locale module because it may not be available on some
10221 installations.
10222
10223 * extensions/pyprojection/LICENSE: Copy of the license text in
10224 Projection.i. Having it in a separate file makes it easier to
10225 refer to license text in e.g. RPMs
10226
10227 2001-09-03 Bernhard Herzog <[email protected]>
10228
10229 * setup.py: use wx-config instead of wxgtk-config because it's
10230 more generic
10231
10232 * setup.py (ThubanInstall.get_outputs): Add the symlink in
10233 <prefix>/bin to the outputs
10234 (ThubanInstall.link_file): New method to link files. We need this
10235 because the standard copy_files refuses to link non-existing
10236 files.
10237 (ThubanInstall.run): Remove the leading install root from the
10238 script filename if an install root was specified and use the new
10239 link_file method
10240
10241 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
10242 the window when the first layer is added to the map.
10243
10244 * setup.py (ThubanInstall.run): Honor the build root (self.root)
10245 when linking thuban.py to <prefix>/bin
10246
10247 2001-08-31 Bernhard Herzog <[email protected]>
10248
10249 * setup.py: In the setup call, the install parameters shouldn't
10250 have trailing slashes because distutils on non-posix platforms
10251 doesn't like that. The same applies to other directories like
10252 "Resources/Bitmaps"
10253
10254 In the configuration section for nt, move the wxWindows directory
10255 optins into the part clearly marked as editable.
10256
10257 (InstallLocal.initialize_options):
10258 (InstallLocal.user_options): remove the currently unused debug
10259 flag
10260 (thuban_build_py.find_all_modules): Add this method so that it
10261 works for our case of having packages and modules in one
10262 distribution as well.
10263 (ThubanInstall.initialize_options):
10264 (ThubanInstall.finalize_options):
10265 (ThubanInstall.user_options):
10266 (ThubanInstall.boolean_options): Add new options, do-symlink and
10267 extra files. Since these are the first ThubanInstall specific
10268 options, override user_options and boolean_options
10269 (ThubanInstall.run): Honor the new do-symlink and extra-files
10270 options.
10271 (ThubanInstall.get_outputs): Add to override the base-class's
10272 version and add the extra-files to the outputs
10273 (bdist_inno): New class for windows distributions with Inno Setup
10274 (InnoIconItem): Helper class for bdist_inno
10275 (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
10276 this together with the appropriate parameters, to the setup call.
10277
10278 * setup.cfg (bdist_inno): added new section for the inno setup
10279 installer
10280
10281 * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
10282 changing_selection to avoid recursive selection events when
10283 modifying the selection in response to a selection event.
10284 (myTreeCtrlPanel.normalize_selection): Set the new inst var when
10285 changing the tree's selection.
10286 (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
10287 we're not being called indirectly from normalize_selection.
10288
10289 * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
10290 event.Check only if the command is actuall checkable.
10291 (MainWindow.__init__): Call the toolbar's Realize method to make
10292 sure that the items are actually shown
10293
10294 2001-08-28 Bernhard Herzog <[email protected]>
10295
10296 * setup.py: Fix some doc strings
10297
10298 * ChangeLog: started
10299

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26