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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2289 - (hide annotations)
Fri Jul 16 19:47:29 2004 UTC (20 years, 7 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 387779 byte(s)
* test/test_viewport.py
(ViewPortTest.test_changing_map_projection): Check that changing
the projection of an empty map shown in a viewport doesn't lead to
exceptions in the viewport's handler for the
MAP_PROJECTION_CHANGED messages

* Thuban/UI/viewport.py (ViewPort.map_projection_changed): Only
try to keep the same region visible when the map actually contains
something

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26