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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2278 - (hide annotations)
Tue Jul 13 11:07:45 2004 UTC (20 years, 7 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 384244 byte(s)
(BaseRenderer.render_map_incrementally): Fix a logic bug in the
optimization that tries not to draw layers under a raster layer.
The bug was harmless.  All it effectively did was to produce The a
strange messages about not being able to draw Layer instances for
all vector layers below a raster layer which would be invisible
anyway because the raster layer currently always covers the entire
window

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26