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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2264 - (hide annotations)
Thu Jul 1 14:43:26 2004 UTC (20 years, 8 months ago) by jschuengel
Original Path: trunk/thuban/ChangeLog
File size: 381207 byte(s)
Added the functionality to handle the content thuban is not able to handle
directly.

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26