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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2256 - (hide annotations)
Mon Jun 28 10:55:10 2004 UTC (20 years, 8 months ago) by bernhard
Original Path: trunk/thuban/ChangeLog
File size: 379252 byte(s)
* Extensions/svgexport/test/test_svgmapwriter.py:
	Removed class VFile and used standard StringIO instead.

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26