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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.59  
changed lines
  Added in v.2217

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26