/[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 766 by bh, Tue Apr 29 12:42:27 2003 UTC revision 2107 by bh, Fri Mar 12 12:59:40 2004 UTC
# Line 1  Line 1 
1    2004-03-12  Bernhard Herzog  <[email protected]>
2    
3            Support views in addition to normal tables in the postgis
4            shapestore
5    
6            * Thuban/Model/postgisdb.py
7            (PostGISShapeStore._fetch_table_information): Add a fallback for
8            the case where the table name is not in the geometry_columns
9            table.  This is usually the case for views.  Also, set
10            self.shapestore here.
11            (PostGISShapeStore.ShapeType): No need to query the database all
12            the time.  The shape type is now determined in
13            _fetch_table_information
14    
15            * test/postgissupport.py (PostgreSQLServer.new_postgis_db)
16            (PostgreSQLServer.get_static_data_db, PostGISDatabase.__init__):
17            New parameter to specify views.
18            (PostGISDatabase.has_data): Also compare the views.  New views
19            parameter
20            (PostGISDatabase.initdb): Create the views.
21            (PostgreSQLServer.get_default_static_data_db): Add the v_landmarks
22            view
23    
24            * test/test_postgis_db.py
25            (TestPostGISShapestorePointFromViews): New.  Test a
26            PostGISShapeStore with a view
27            (TestPostGISShapestorePointOIDAsGIDColumn.setUp): Pass the name of
28            the geometry_column explicitly to test whether that works
29    
30    2004-03-12  Bernhard Herzog  <[email protected]>
31    
32            Final step for explicit id/geometry columns: Loading and saving
33    
34            * Resources/XML/thuban-1.1.dtd: New.  Derived from thuban-1.0.dtd
35            with the following changes:
36            (dbshapesource): Two new attributes id_column and geometry_column
37    
38            * Thuban/Model/save.py (SessionSaver.write): Use the new dtd
39            (SessionSaver.write_session): Use the new namespace
40            (SessionSaver.write_data_containers): Write the new dbshapesource
41            parameters
42    
43            * Thuban/Model/load.py (SessionLoader.__init__): New namespace for
44            the new file format version
45            (SessionLoader.start_dbshapesource): Handle the new db parameters
46    
47            * test/test_save.py: Update to the new dtd and namespace
48            (SaveSessionTest.test_save_postgis): Update the NonConnectionStore
49            mock object to provide a working IDColumn method.
50    
51            * test/test_load_1_0.py: New.  Copy of the test_load.py before
52            today's changes but with the round-trip tests removed.
53    
54            * test/test_load_0_9.py: Update doc-string.
55    
56            * test/test_load.py: Update all .thuban files to the new dtd and
57            namespace.
58            (TestPostGISLayer.file_contents): Add the new dbshapesource
59            paramters
60    
61    2004-03-11  Bernhard Herzog  <[email protected]>
62    
63            Next step for explicit id/geometry columns: User interaction
64    
65            * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Rework how
66            the dialog is constructed. Add combo boxes to select id and
67            geometry column.  Rename some instance variables.
68            (ChooseDBTableDialog.GetTable): Return id and geometry column
69            names
70            (ChooseDBTableDialog.OnTableSelect): New. Event handler for
71            selections in the table list
72    
73            * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Use id_column
74            and geometry_column
75    
76            * Thuban/Model/session.py (Session.OpenDBShapeStore): Add the new
77            parameters for id_column and geometry column of PostGISShapeStore
78            here as well.
79    
80            * Thuban/Model/postgisdb.py (type_map): Add ROWID psycog type.
81            (_raw_type_map): New. Map raw PostgreSQL type ints to thuban types
82            (PostGISConnection.GeometryTables): Use a better query to
83            determine which relations in the database might be usable for
84            shapestores.  Now supports views as well but is more PostgreSQL
85            specific
86            (PostGISConnection.table_columns): New. Somewhat experimental
87            method to let the db dialogs provide lists of columns to users so
88            that they can select id and geometry columns.
89            (PostGISTable.__init__): The default value of the id_column
90            parameter is now None it still means "gid" effectively, though.
91            (PostGISTable.IDColumn): New introspection method to return a
92            column object for the id column
93            (PostGISShapeStore.GeometryColumn): New introspection method to
94            return a column object for the geometry column
95    
96            * test/test_postgis_db.py
97            (TestPostGISConnection.test_gis_tables_non_empty):
98            Removed. Subsumed by the new:
99            (TestPostGISConnection.test_gis_tables_with_views_and_tables):
100            New. Tes the GeometryTables and table_columns methods with actual
101            tables and views.
102            (PointTests.test_id_column, PointTests.test_geometry_column):
103            New. tests for the new methods.
104            (TestPostGISShapestorePoint.setUp)
105            (TestPostGISShapestorePointSRID.setUp)
106            (TestPostGISShapestorePointExplicitGIDColumn.setUp): Fill the
107            instance variables needed by the new tests
108    
109    2004-03-11  Bernhard Herzog  <[email protected]>
110    
111            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): The row
112            numbers given to ReadValue are ordinals.
113    
114    2004-03-11  Bernhard Herzog  <[email protected]>
115    
116            Elimiate the requirement for PostGIS tables to have a column
117            called "gid".
118    
119            * Thuban/Model/postgisdb.py (PostGISTable.__init__): New parameter
120            id_column to specify which column to use to identify rows.  Also
121            new instance variables id_column and quoted_id_column
122            (PostGISTable.RowIdToOrdinal, PostGISTable.RowOrdinalToId)
123            (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue)
124            (PostGISTable.SimpleQuery): Use the id column name provided to the
125            constructor instead of "gid"
126            (PostGISShapeStore.__init__): New parameter id_column analogously
127            to PostGISTable.__init__.  This parameter is simply passed through
128            to the base class constructor
129            (PostGISShapeStore._create_col_from_description): Fix typo in
130            doc-string
131            (PostGISShapeStore.Shape, PostGISShapeStore.AllShapes)
132            (PostGISShapeStore.ShapesInRegion): Use the id column name
133            provided to the constructor instead of "gid"
134    
135            * test/postgissupport.py
136            (PostgreSQLServer.get_default_static_data_db): New static table
137            landmarks_point_id with an id column != "gid.  Update the comments
138            a bit.
139            (skip_if_addgeometrycolumn_does_not_use_quote_ident): Fix typo in
140            doc-
141            (upload_shapefile): New parameter gid_column to use a name other
142            than "gid" for the column to store the shape ids
143    
144            * test/test_postgis_db.py (TableTests): New.  Mixin-class
145            containing all tests previously in TestPostGISTable.  The actual
146            tests are the same but the code is a bit more configurable to
147            allow for different id columns etc.
148            (TestPostGISTable): Derive from TableTests now for the actual
149            tests.
150            (TestPostGISTableExplicitGIDColumn): New. Like TestPostGISTable
151            except that it the landmarks_point_id table to test the id_column
152            parameter
153            (PointTests): Extend the doc-string
154            (TestPostGISShapestorePointExplicitGIDColumn)
155            (TestPostGISShapestorePointOIDAsGIDColumn): New classes derived
156            from PointTests to test the explicit id_column parameter.  One
157            tests with the name of the column holding the shape ids, the other
158            uses PostgreSQL's OID column.  For the latter a number of methods
159            have to be overwritten to make them independent of the actual id
160            values.
161    
162    2004-03-08  Silke Reimer  <[email protected]>
163    
164            Update debian directory:
165    
166            * debian/changelog: Added new version.
167            * deiban/rules: Updated management of patches (with cbds)
168            * debian/control: Added cbds to dependencies
169            * debian/patches/*: New. Adds better support for patches of thuban in
170                            debian
171            * debian/menu: Syntax of menu changed slightly
172            * debian/setup.py.patch: removed because it has been moved to
173                            debian/patechs/setup.py.patch
174            
175    
176    2004-02-26  Bernhard Herzog  <[email protected]>
177    
178            Create the Doc/technotes directory for text files with information
179            for developers
180    
181            * Doc/technotes/README: New. README for the technotes
182    
183            * Doc/technotes/coding_guidelines.txt: New. Coding guidelines for
184            Thuban
185    
186            * Doc/technotes/release_process.txt: New. Used to be
187            HOWTO-Release.  Now slightly adapted to technote formatting style.
188    
189            * HOWTO-Release: Removed.  It's contents are now in
190            Doc/technotes/release_process.txt
191    
192    2004-02-25  Bernhard Herzog  <[email protected]>
193    
194            * libraries/thuban/wxproj.cpp (get_wx_version): New.  Return the
195            version of wxWindows the module was compiled with so we can check
196            that against the wxPython version.
197    
198            * Thuban/version.py (thuban_branch, thuban_release): New variables
199            controlling which and how Thuban versions are shown.  See the
200            comments for details.
201            (verify_versions): Also check that the wx version that wxproj is
202            compiled against matches that of the wxPython we use at runtime
203    
204    2004-02-20  Bernhard Herzog  <[email protected]>
205    
206            * Extensions/wms/wms.py (epsg_code_to_projection): Use
207            get_system_proj_file to read the epsg projections.  The old way
208            depended on the current directory being the top Thuban directory.
209    
210    2004-02-20  Bernhard Herzog  <[email protected]>
211    
212            * Extensions/svgexport/test/test_svgmapwriter.py
213            (TestVirtualDC.test_clippath): Remove a debug print
214    
215    2004-02-20  Bernhard Herzog  <[email protected]>
216    
217            * Extensions/svgexport/__init__.py: New.  Turn
218            Extensions/svgexport into a package.
219    
220            * Extensions/svgexport/svgmapwriter.py: Reorder the imports and
221            doc-string a bit.  The doc-string must come first, otherwise it's
222            not a doc-string.  The __future__ import must be the first thing
223            after the doc-string.  Use only double quotes in doc-strings.
224            Single quotes trip up emacs syntax highlighting if the text
225            contains apostrophes.
226    
227    2004-02-20  Bernhard Herzog  <[email protected]>
228    
229            * Extensions/svgexport/test/__init__.py,
230            Extensions/svgexport/test/test_svgmapwriter.py: New. Initial test
231            suite for svgexport
232    
233            * test/runtests.py (find_test_modules): New. Function with the
234            module finding code from main.
235            (main): Use find_test_modules to figure out the default test
236            modules and take modules from Extensions.svgexport.test too.
237    
238    2004-02-19  Bernhard Herzog  <[email protected]>
239    
240            * Thuban/UI/application.py (ThubanApplication.OnInit): Make sure
241            the mainwindow has a reference to the map of the initial session.
242            This fixes a bug introduced with the fix for RT#2245
243    
244    2004-02-19  Bernhard Herzog  <[email protected]>
245    
246            * Extensions/svgexport/svgsaver.py,
247            Extensions/svgexport/svgmapwriter.py,
248            Extensions/svgexport/maplegend.py: Added again.  This time in the
249            correct place.
250    
251    2004-02-17  Bernhard Herzog  <[email protected]>
252    
253            Fix for RT#2245
254    
255            * Thuban/UI/application.py (ThubanApplication.OnInit): Initialize
256            instance variables before trying to create any windows.  Creating
257            windows can start an event loop if e.g. message boxes are popped
258            up for some reason, and event handlers, especially EVT_UPDATE_UI
259            may want to access things from the application.
260            (ThubanApplication.maps_changed): The mainwindow may not have been
261            created yet, so check whether it has been created before calling
262            its methods
263    
264            * Thuban/UI/view.py (MapCanvas.OnIdle): Only try to redraw if we
265            have a map
266    
267    2004-02-17  Bernhard Herzog  <[email protected]>
268    
269            * test/test_svgmapwriter.py, Extensions/svgsaver.py,
270            Extensions/svgmapwriter.py, Extensions/maplegend.py,
271            extensions/svgexport/svgsaver.py,
272            extensions/svgexport/svgmapwriter.py,
273            extensions/svgexport/maplegend.py: Removed.  These files were in
274            the wrong places or didn't work at all.
275    
276    2004-02-16  Bernhard Herzog  <[email protected]>
277    
278            * Thuban/UI/view.py (MapCanvas.Export): Remove accidentally added
279            line
280    
281    2004-02-16  Bernhard Herzog  <[email protected]>
282    
283            * Thuban/UI/view.py (MapCanvas.Export): Avoid UnboundLocalError.
284    
285    2004-02-15  Markus Rechtien  <[email protected]>
286            
287            * Extensions/svgexport/svgmapwriter.py: New. Adds the capability
288            to write a session to a file in SVG format.
289            * Extensions/svgexport/svgsaver.py: New. Uses svgmapwriter.py
290            to write a SVG map of a session.
291            * Extensions/svgexport/maplegend: New. Writes a basic maplegend
292            in SVG format for the current session.
293    
294    2004-02-13  Bernhard Herzog  <[email protected]>
295    
296            * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): When the layer
297            can't be created, return immediately after displaying the error
298            message.
299    
300    2004-02-11  Bernhard Herzog  <[email protected]>
301    
302            Handle postgis tables with more than one geometry column.
303    
304            * Thuban/Model/postgisdb.py
305            (PostGISTable._fetch_table_information): Delegate the creation of
306            column objects to a different method so that we can extend that in
307            derived classes
308            (PostGISTable._create_col_from_description): New. Column object
309            creation part of _fetch_table_information
310            (PostGISShapeStore._create_col_from_description): New. Extend
311            inherited method to handle geometry columns
312            (PostGISShapeStore.__init__): New parameter geometry_column to
313            specify which geometry column to use.  Optional but mandatory for
314            tables with more than one geometry column
315            (PostGISShapeStore._fetch_table_information): Also use the name of
316            the geometry column when looking for the srid
317            (PostGISShapeStore.ShapeType): Also use the name of the geometry
318            column when looking for the shape type
319    
320            * test/test_save.py (SaveSessionTest.test_save_postgis): Adapt
321            NonConnectionStore to changes in the PostGISShapeStore
322    
323            * test/test_postgis_db.py
324            (TestPostGISSpecialCases.test_shapestore_two_geom_cols): Test
325            PostGISShapeStore with tables having two geometry columns.
326    
327    2004-02-10  Bernhard Herzog  <[email protected]>
328    
329            Fix some postgis problems.  What remains to be done is real
330            handling of SRIDs as they affect how reprojection is done
331    
332            * Thuban/Model/postgisdb.py (quote_identifier): Fix typo in
333            doc-string
334            (PostGISShapeStore._fetch_table_information): New. Extend
335            inherited method to retrieve srid
336            (PostGISShapeStore.BoundingBox): Handle tables without data.
337            extent yields NULL for those
338            (PostGISShapeStore.ShapesInRegion): Use the srid of the table.
339    
340            * test/test_postgis_db.py
341            (TestPostGISSpecialCases.test_shapestore_empty_table): New test
342            for the special case of a table without any data
343            (TestPostGISShapestorePointSRID): New class with tests for a table
344            that uses srids
345            (PolygonTests): Fix a doc-string typo
346    
347            * test/postgissupport.py (PostGISDatabase.__init__): New parameter
348            reference_systems with a specification of spacial reference
349            systems to create in the new db.
350            (PostgreSQLServer.new_postgis_db)
351            (PostgreSQLServer.get_static_data_db): New parameter
352            reference_systems to be passed through ultimately to
353            PostGISDatabase.  In new_postgis_db also check whether an existing
354            db already has the right srids
355            (PostgreSQLServer.get_default_static_data_db): Add srids and a
356            table that uses srids
357            (PostGISDatabase.initdb): Create the entries for the reference
358            systems
359            (PostGISDatabase.has_data): Add reference_systems parameter to
360            check for those too
361            (upload_shapefile): New parameter srid to create tables with a
362            specific srid
363    
364    2004-02-06  Frank Koormann  <[email protected]>
365    
366            * po/pt_BR.po: Fixed charset
367    
368    2004-02-05  Frank Koormann  <[email protected]>
369    
370            * po/pt_BR.po: Fixed format string for error message, missing %s
371            added (Thuban/UI/application.py:273)
372    
373    2004-02-03  Frank Koormann  <[email protected]>
374            
375            First version of Portuguese (Brazilian) translation
376    
377            * po/pt_BR.po: New, translation of pot (2004-01-15 16:07+0300) for
378            Brazilian Portuguese by Eduardo Patto Kanegae.
379    
380            * Thuban/UI/about.py (About.__init.py__): Added Eduardo to the list of
381            translators.
382    
383    
384    2004-01-22  Frank Koormann  <[email protected]>
385    
386            * Doc/manual/thuban-manual.xml: Added section on installation of
387            Thuban under Win32 systems. Fixed image path references in the postgis
388            section. Some minor source formattings.
389    
390    2004-01-21  Frank Koormann  <[email protected]>
391    
392            Make Thuban remember path selections (at least for one application run).
393    
394            * Thuban/UI/application.py (Application.OnInit): Initialize path as a
395            attribute of application object. Path is a dictionary of
396            strings, currently with the items "data" and "projection".  
397            (Application.SetPath): New, stores path for the specified item.
398            (Application.Path): New, return path for the specified item.
399    
400            * Thuban/UI/mainwindow.py
401            (MainWindow.OpenSession, MainWindow.SaveSessionAs,
402            MainWindow.AddLayer, MainWindow.AddRasterLayer,
403            MainWindow.TableOpen): Access "data" path information of the
404            application.
405            
406            * Thuban/UI/projdialog.py (ProjFrame._OnImport, ProjFrame._OnExport):
407            Access "projection" path information of the application.
408    
409    2004-01-05  Bernhard Herzog  <[email protected]>
410    
411            * po/ru.po: Updated translations from Alex Shevlakov
412    
413    2004-01-05  Bernhard Herzog  <[email protected]>
414    
415            * po/Makefile, po/README: Move the description of how to generate
416            the translation statistics to the README.
417    
418    2003-12-23  Bernhard Herzog  <[email protected]>
419    
420            * NEWS: Update for 1.0.0
421    
422            * po/it.po: Another update from Maurizio Napolitano
423    
424    2003-12-23  Bernhard Herzog  <[email protected]>
425    
426            * po/it.po: Updated translation from Maurizio Napolitano
427    
428    2003-12-23  Bernhard Herzog  <[email protected]>
429    
430            * Thuban/UI/join.py (JoinDialog.__init__): Mark one more string
431            for translation
432    
433            * Thuban/UI/mainwindow.py (MainWindow.TableRename)
434            (MainWindow.RenameMap, MainWindow.RenameLayer): Mark some more
435            strings for translation
436    
437            * po/de.po: Update with the newly marked strings.
438    
439    2003-12-22  Bernhard Herzog  <[email protected]>
440    
441            * HOWTO-Release: Fix the places where version numbers have to be
442            updated
443    
444    2003-12-22  Bernhard Herzog  <[email protected]>
445    
446            * setup.py (setup call): 1.0.0, yeah!
447    
448            * Thuban/version.py (longversion): 1.0.0, yeah!
449    
450            * Thuban/Model/load.py (SessionLoader.__init__): Accept the
451            1.0.0 namespace too
452    
453            * Thuban/Model/save.py (SessionSaver.write_session): Save with
454            1.0.0 namespace
455    
456            * test/test_load.py (LoadSessionTest.dtd)
457            (TestSingleLayer.file_contents)
458            (TestNonAsciiColumnName.file_contents)
459            (TestLayerVisibility.file_contents)
460            (TestClassification.file_contents, TestLabels.file_contents)
461            (TestLayerProjection.file_contents)
462            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
463            (TestLabelLayer.file_contents, TestPostGISLayer.file_contents)
464            (TestPostGISLayerPassword.file_contents)
465            (TestLoadError.file_contents, TestLoadError.test): Update for
466            1.0.0 namespace
467    
468            * test/test_save.py (SaveSessionTest.dtd)
469            (SaveSessionTest.testEmptySession)
470            (SaveSessionTest.testSingleLayer)
471            (SaveSessionTest.testLayerProjection)
472            (SaveSessionTest.testRasterLayer)
473            (SaveSessionTest.testClassifiedLayer)
474            (SaveSessionTest.test_dbf_table)
475            (SaveSessionTest.test_joined_table)
476            (SaveSessionTest.test_save_postgis): Update for 1.0.0 namespace
477    
478    2003-12-22  Bernhard Herzog  <[email protected]>
479    
480            * Thuban/Model/load.py (SessionLoader.start_label): Make sure the
481            alignment flags are byte strings not unicode and that they have
482            valid values
483    
484            * test/test_load.py (TestLabelLayer): New. Test loading (and
485            indirectly saving) of maps with labels.
486    
487    2003-12-22  Bernhard Herzog  <[email protected]>
488    
489            * Thuban/UI/tableview.py (TableGrid.OnDestroy)
490            (TableGrid.__init__): Handle EVT_WINDOW_DESTROY in the grid to
491            unsubscribe all subscribers.
492            (LayerTableFrame.OnDestroy): Do not unsubscribe any messages from
493            self.grid since it may already have been destroyed.
494            Fixes RT #2256
495    
496    2003-12-19  Bernhard Herzog  <[email protected]>
497    
498            * po/fr.po, po/es.po: Updated translations from Daniel Calvelo
499    
500    2003-12-16  Bernhard Herzog  <[email protected]>
501            
502            * debian/bitmappath.patch, debian/setup.py.patch:
503                    added to ensure compliance with FHS for debian
504            * debian/rules, debian/changelog:
505                added patches in rules to ensure compliance with FHS for debian
506    
507    2003-12-16  Bernhard Herzog  <[email protected]>
508    
509            * po/Makefile (mo): Make the output a bit nicer so that it prints
510            statistics about the translations. Add a comment how produce even
511            nicer statistics with sed.
512    
513    2003-12-09  Frank Koormann   <[email protected]>
514    
515            * Resources/Projections/defaults.proj:
516            French projection sample with correct accents (UNICODE).
517    
518    2003-12-05  Bernhard Herzog  <[email protected]>
519    
520            * MANIFEST.in: Add the devtools directory
521    
522            * setup.py (setup call): Use license instead of licence. This
523            silences a deprecation warning on Python 2.3
524    
525    2003-12-05  Frank Koormann   <[email protected]>
526    
527            Documentation synced with 1.0rc1
528    
529            * Doc/manual/thuban-manual.xml:
530            Minor formatting changes and references to database layers .
531            Introduction.Internationalization: New section on i18n.
532            MapManagement.AddingandRemovingLayers: Added item on database layers.  
533            MapManagement.TheLegend: Added section and screenshot on popup menu.
534            ProjectionManagement: Updated screenshot and sentence on EPSG.
535            Appendix.SupportedDataSources: Added PostGIS.
536            Appendix.WorkingwithPostGIS: New section.
537    
538            * Doc/manual/images/6_projection.png: Updated screenshot including
539            EPSG checkboxes.
540    
541            * Doc/manual/images/3_5_popup_menu.png: New, popup menu screenshot.
542    
543            * Doc/manual/images/app_postgis_add_layer.png,
544            Doc/manual/images/app_postgis_db_add.png,
545            Doc/manual/images/app_postgis_db_management.png:
546            New screenshots focussing on database layers
547    
548    2003-12-05  Frank Koormann   <[email protected]>
549    
550            * Thuban/UI/projdialog.py (load_user_proj): If user.proj is missing
551            write warning to stderr instead of rising a warning dialog
552    
553    2003-12-03  Bernhard Herzog  <[email protected]>
554    
555            Fix for RT #2243
556    
557            * Thuban/UI/mainwindow.py (MainWindow.has_selected_shape_layer):
558            New. Like has_selected_layer but for shape layers only
559            (_has_selected_shape_layer): New. Like _has_selected_layer but for
560            shape layers only
561            (layer_show_table command, layer_jointable command): Use these
562            commands should only be available for shape layers
563    
564    2003-12-03  Bernhard Herzog  <[email protected]>
565    
566            * Thuban/UI/mainwindow.py (MainWindow.Unsubscribe): Deal with
567            publishers that are wx objects and may have been destroyed by wx
568            already. Fixes RT #2242.
569    
570    2003-12-03  Bernhard Herzog  <[email protected]>
571    
572            * po/ru.po: Updates from Alex Shevlakov
573    
574    2003-12-03  Silke Reimer <silkeintevation.de>
575    
576            * debian/control, debian/changelog: Added gdal-support to
577                    debian package, updated to new thuban version
578    
579    
580    2003-12-03  Bernhard Herzog  <[email protected]>
581    
582            * Thuban/Lib/version.py: New. Module for version number
583            manipulations. The version of make_tuple here also deals better
584            with more unusual version number strings, such as e.g.
585            "1.2+cvs20031111"
586    
587            * Thuban/version.py (make_tuple): Removed. It's now in
588            Thuban.Lib.version. Use that implementation instead.
589    
590            * test/test_lib_version.py: New. Tests for Thuban/Lib/version.py
591    
592    2003-12-02  Bernhard Herzog  <[email protected]>
593    
594            * MANIFEST.in: Add debian files
595    
596            * setup.py (setup call): Add packages for the Extensions so that
597            they're installed too
598            (data_files): Add READMEs and sample data from some Extensions
599    
600            * NEWS: Add note about the extensions in binary packages
601    
602    2003-12-02  Bernhard Herzog  <[email protected]>
603    
604            * Thuban/Model/save.py (SessionSaver.write_session): Save files
605            with the thuban-1.0rc1
606    
607            * Thuban/Model/load.py (SessionLoader.__init__): Recognize the
608            thuban-1.0rc1 namespace too
609    
610            * test/test_save.py (SaveSessionTest.dtd)
611            (SaveSessionTest.testEmptySession)
612            (SaveSessionTest.testSingleLayer)
613            (SaveSessionTest.testLayerProjection)
614            (SaveSessionTest.testRasterLayer)
615            (SaveSessionTest.testClassifiedLayer)
616            (SaveSessionTest.test_dbf_table)
617            (SaveSessionTest.test_joined_table)
618            (SaveSessionTest.test_save_postgis): Update to thuban-1.0rc1
619            namespace
620    
621            * test/test_load.py (LoadSessionTest.dtd): Update to thuban-1.0rc1
622            namespace
623            (TestSingleLayer.file_contents)
624            (TestNonAsciiColumnName.file_contents)
625            (TestLayerVisibility.file_contents)
626            (TestClassification.file_contents, TestLabels.file_contents)
627            (TestLayerProjection.file_contents)
628            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
629            (TestPostGISLayer.file_contents)
630            (TestPostGISLayerPassword.file_contents)
631            (TestLoadError.file_contents, TestLoadError.test): Update to
632            thuban-1.0rc1 namespace
633    
634    2003-12-01  Bernhard Herzog  <[email protected]>
635    
636            * setup.py (proj4_prefix, wx_prefix, gdal_prefix): Fix these for
637            nt to better match Intevation's current w32 setup
638    
639            * HOWTO-Release: Add note about updating MANIFEST.in
640    
641            * MANIFEST.in: Add the Extensions
642    
643            * NEWS: Update for 1.0rc1
644    
645    2003-12-01  Bernhard Herzog  <[email protected]>
646    
647            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Change the wild
648            cards for the dialog so that shapefiles ending in all uppercase
649            SHP are listed too
650    
651    2003-11-28  Bernhard Herzog  <[email protected]>
652    
653            * Thuban/version.py (longversion): Update to 1.0rc1
654    
655            * setup.py (setup call): Update version to 1.0rc1. Use the
656            [email protected] email address as author email instead of my
657            personal one.
658    
659    2003-11-28  Bernhard Herzog  <[email protected]>
660    
661            * po/de.po: Update german translation.
662    
663    2003-11-28  Bernhard Herzog  <[email protected]>
664    
665            Unify the filenames stored in .thuban files so that the .thuban
666            files are more platform independend
667    
668            * Thuban/Model/save.py (unify_filename): New. Unify filenames so
669            that they can be used on both windows and unix
670            (SessionSaver.prepare_filename): New. Handle all filename
671            transformations for filenames stored in the thuban file
672            (SessionSaver.write_data_containers, SessionSaver.write_layer):
673            Use prepare_filename
674    
675            * test/test_save.py (SaveSessionTest.testSingleLayer)
676            (SaveSessionTest.testLayerProjection)
677            (SaveSessionTest.testRasterLayer)
678            (SaveSessionTest.testClassifiedLayer)
679            (SaveSessionTest.test_dbf_table)
680            (SaveSessionTest.test_joined_table): Filenames are always stored
681            with slashes on all currently supported platforms so adapt all
682            tests to this
683    
684            * test/test_load.py (LoadSessionTest.filenames): With the new
685            filename scheme the filenames in the tests should be
686            understandable on all currently supported platforms so we turn
687            this into an empty list because we don't have to normalize them
688            anymore
689    
690    2003-11-28  Bernhard Herzog  <[email protected]>
691    
692            * test/test_layer.py (TestLayer.test_arc_layer_with_projection):
693            Add the ellipsoid to the projection since some Proj versions
694            complain if it's missing.
695    
696    2003-11-27  Bernhard Herzog  <[email protected]>
697    
698            Corect some bounding box projection problems
699    
700            * Thuban/Model/proj.py (Projection.InverseBBox): New. Inverse
701            version of ForwardBBox
702            (Projection._transform_bbox): New. common implementation of
703            ForwardBBox and InverseBBox
704            (Projection.ForwardBBox): Use _transform_bbox.
705    
706            * test/test_proj.py (TestProjection.test): Add test for
707            InverseBBox
708    
709            * Thuban/Model/layer.py (Layer.LatLongBoundingBox)
710            (Layer.ShapesBoundingBox, RasterLayer.LatLongBoundingBox): Use the
711            new InverseBBox method to determine the unprojected bounding box
712            (Layer.ShapesInRegion): Use the ForwardBBox method to project the
713            bbox.
714    
715            * test/test_layer.py (TestLayer.test_point_layer_with_projection):
716            Removed.
717            (TestLayer.test_arc_layer_with_projection): New. This test is
718            better able to test whether bounding boxes are projected correctly
719            than test_point_layer_with_projection
720    
721            * Thuban/UI/viewport.py (ViewPort.map_projection_changed): Use
722            InverseBBox to unproject bboxes
723    
724    2003-11-25  Bernhard Herzog  <[email protected]>
725    
726            * Thuban/UI/about.py (About.__init__): Make sure we have ASCII
727            source code.
728    
729    2003-11-25  Bernhard Herzog  <[email protected]>
730    
731            * Thuban/Model/layer.py (Layer.__getattr__): Removed. It was only
732            there for backwards compatibility and all code relying on that
733            should have been updated by now.
734    
735    2003-11-25  Bernhard Herzog  <[email protected]>
736    
737            * test/test_load.py (TestClassification.test): Add the missing
738            round trip test.
739            (TestClassification.file_contents): Update to the newest file
740            format
741    
742    2003-11-25  Bernhard Herzog  <[email protected]>
743    
744            Add very experimental (and possibly dangerous) extension to draw
745            polygons:
746    
747            * Extensions/drawshape/README: New. Brief installation
748            instructions
749    
750            * Extensions/drawshape/drawshape.py: New. Implementation of the
751            drawshape extensions
752    
753            * Extensions/drawshape/patch.diff: Patch to apply before the
754            extension can be used.
755    
756    2003-11-24  Bernhard Herzog  <[email protected]>
757    
758            * Thuban/Model/data.py (ShapefileStore._open_shapefile)
759            (ShapefileStore.__init__): Factor opening the shapefile into a
760            separate method (the new _open_shapefile). This makes the code a
761            bit more readable but the real reason is that it makes some evil
762            hacks easier. :-)
763    
764    2003-11-24  Bernhard Herzog  <[email protected]>
765    
766            * Thuban/Model/load.py (SessionLoader.check_attrs): If no
767            converter is specified for an attribute assume it's a string
768            containing only Latin1 characters. Update doc-string accordingly.
769            This change should fix many places where unicode objects might
770            accidentally enter Thuban.
771    
772            * test/test_load.py (TestNonAsciiColumnName): New test to check
773            what happens with column names in DBF files that contain non-ascii
774            characters
775    
776    2003-11-21  Bernhard Herzog  <[email protected]>
777    
778            Enable the experimental attribute editing again and introduce a
779            command line switch to actually activate it
780    
781            * Thuban/UI/main.py (options): New. Container for options set on
782            the commmand line
783            (main): Add the --enable-attribute-editing flag.
784    
785            * Thuban/UI/identifyview.py (IdentifyView.__init__): If attribute
786            editing is enabled use the grid ctrl which allows editing of the
787            values
788    
789            * Thuban/Model/transientdb.py (AutoTransientTable.write_record):
790            New. Just delegate this to the underlying table.
791    
792    2003-11-20  Bernhard Herzog  <[email protected]>
793    
794            * test/test_proj.py (ProjFileReadTests.test_read_unreadable_file):
795            Skip this test if run under non-posix systems since it only works
796            there
797    
798    2003-11-19  Bernhard Herzog  <[email protected]>
799    
800            * Thuban/Model/resource.py: Rework the way gdal support is
801            determined so that we can give a reason in the about why gdal is
802            not supported.
803            (gdal_support_status): New. Variable holding a string with the
804            reason for no gdal support
805    
806            * Thuban/UI/about.py (About.__init__): Add the reason why gdal is
807            not supported to the message
808    
809    2003-11-19  Bernhard Herzog  <[email protected]>
810    
811            Remove the old table interface and its test cases
812    
813            * Thuban/Model/table.py (OldTableInterfaceMixin): Removed.
814            (DBFTable, MemoryTable): Do not derive from OldTableInterfaceMixin
815            anymore
816    
817            * Thuban/Model/transientdb.py (TransientTableBase)
818            (AutoTransientTable): Do not derive from OldTableInterfaceMixin
819            anymore
820    
821            * test/test_table.py: Removed since the old interface it tests is
822            gone.
823    
824            * test/runtests.py (main): The old table interface is gone and
825            with it the deprecation warnings so remove the code that turns
826            these warnings into errors
827    
828    2003-11-19  Bernhard Herzog  <[email protected]>
829    
830            * test/test_table.py: Revert to revision 1.5 again. Changing the
831            tests to use the new table interface is completely wrong since the
832            whole purpose of the tests in this module is to test the old
833            interface.
834    
835    2003-11-18  Bernhard Herzog  <[email protected]>
836    
837            * Thuban/Model/postgisdb.py (PostGISConnection.MatchesParameters):
838            New. Test whether the connection matches a set of connection
839            parameters
840    
841            * Thuban/UI/dbdialog.py (DBFrame.conns_changed): Fix doc-string
842            (DBFrame.OnAdd): Use the new MatchesParameters method when looking
843            for existing connections with the same parameters and break out of
844            the loop correctly.
845    
846            * test/test_postgis_db.py (TestBriefDescription)
847            (TestPostGISSimple.test_brief_description): Rename
848            TestBriefDescription to TestPostGISSimple and the test method to
849            test_brief_description so that we can add more test methods.
850            (TestPostGISSimple.test_matches_parameters): New. Test the new
851            MatchesParameters method
852    
853    2003-11-18  Bernhard Herzog  <[email protected]>
854    
855            * Thuban/Lib/connector.py (Publisher): Introduce a new flag,
856            _was_destroyed, to indicate whether an publisher instance has
857            already been destroyed.
858            (Publisher.Unsubscribe): Only disconnect if the publisher has not
859            been destroyed yet.
860            (Publisher.Destroy): Set the _was_destroyed flag to true.
861    
862            * test/test_connector.py
863            (TestPublisher.test_unsubscribe_after_destroy): New. Test that
864            calling Unsubscribe after Destroy doesn't raise an exception
865    
866    2003-11-14  Bernhard Herzog  <[email protected]>
867    
868            * Thuban/UI/identifyview.py (IdentifyView.selected_shape): Fix
869            typo in doc-string
870    
871    2003-11-13  Bernhard Herzog  <[email protected]>
872    
873            Quote table and column names properly for postgis.
874    
875            * Thuban/Model/postgisdb.py (quote_identifier): New. Function to
876            quote an identifier for use in an sql statement
877            (PostGISColumn.__init__): Add the quoted_name attribute
878            (PostGISTable.__init__): New instance variable quoted_tablename
879            (PostGISTable._fetch_table_information): Use the quoted table
880            name. New isntance variable quoted_geo_col with a quoted version
881            of geometry_column
882            (PostGISTable.NumRows, PostGISTable.RowIdToOrdinal)
883            (PostGISTable.RowOrdinalToId): Use the quoted table name
884            (PostGISTable.ReadValue, PostGISTable.ValueRange)
885            (PostGISTable.UniqueValues, PostGISTable.SimpleQuery)
886            (PostGISShapeStore.BoundingBox, PostGISShapeStore.Shape)
887            (PostGISShapeStore.AllShapes, PostGISShapeStore.ShapesInRegion):
888            Use quoted table and column names
889    
890            * test/test_postgis_db.py (TestPostGISSpecialCases)
891            (TestPostGISIgnoredColumns): Rename the class to
892            TestPostGISSpecialCases because that better describes the new
893            cases
894            (TestPostGISSpecialCases.test_unsupported_types)
895            (TestPostGISSpecialCases.test): Rename the method to
896            test_unsupported_types because we need a more descriptive name now
897            that there are more methods
898            (TestPostGISSpecialCases.test_table_name_quoting)
899            (TestPostGISSpecialCases.test_column_name_quoting)
900            (TestPostGISSpecialCases.test_shapestore_name_quoting): New test
901            cases to test quoting of table and column names in PostGISTable
902            and PostGISShapeStore
903    
904            * test/postgissupport.py
905            (skip_if_addgeometrycolumn_does_not_use_quote_ident): New. Skip if
906            AddGeometryColumn desn't support table or column names with sapces
907            or double quotes
908    
909    2003-11-12  Jan-Oliver Wagner <[email protected]>
910    
911            * Extensions/wms/__init__.py: New: Init to make this
912            directory a package.
913    
914            * Extensions/wms/wms.py: New: Provide layers via OGC WMS.
915    
916    2003-11-11  Bernhard Herzog  <[email protected]>
917    
918            * Thuban/Model/resource.py (EPSG_DEPRECATED_PROJ_FILE): New.
919            Constant for the file woth deprecated epsg projections
920            (get_system_proj_file): Update doc-string
921    
922            * Thuban/UI/projdialog.py (ProjFrame.build_dialog): Add a space
923            above the EPS widgets, introduce a check box for the deprecated
924            eps projections and a label for the epsg widgets
925            (ProjFrame._OnShowEPSG): Handle the deprecated EPSG projections
926            too
927    
928    2003-11-11  Bernhard Herzog  <[email protected]>
929    
930            Avoid warnings when run under Python 2.3
931    
932            * Thuban/UI/baserenderer.py (BaseRenderer.draw_point_shape)
933            (BaseRenderer.draw_label_layer): Coordinates must be ints.
934    
935            * Thuban/UI/renderer.py (MapRenderer.make_point): Turn this into a
936            real method so that we can convert to int.
937            (MapRenderer.label_font): The font size mist be an int.
938    
939            * Thuban/UI/common.py (Color2wxColour): The color values must be
940            ints. Also, remove the unnecessary asserts.
941    
942            * test/test_load_0_8.py (TestUnicodeStrings.file_contents)
943            (TestUnicodeStrings.test): Python source code should not contain
944            non-ascii characters unless an encoding is specified in the file.
945            Therefore use \x escapes in the string literals for non-ascii
946            characters.
947    
948    2003-11-11  Bernhard Herzog  <[email protected]>
949    
950            * Thuban/Model/resource.py (get_system_proj_file): Add a filename
951            parameter so that this function can be used for all proj files in
952            Resource/Projections
953            (DEFAULT_PROJ_FILE, EPSG_PROJ_FILE): New. Predefined filenames for
954            get_system_proj_file
955    
956            * Thuban/UI/projdialog.py (ProjFrame.__init__): Instead of one
957            ProjFile self.__sysProjFile use a dictionary of system ProjFile
958            objects self._sys_proj_files
959            (ProjFrame.build_dialog): Adapt to the new changes in the
960            ProjectionList constructor. Add a check button to toggle whether
961            EPSG projections are shown
962            (ProjFrame._OnShowEPSG): New. Handler for the epsg check button
963            events.
964            (ProjFrame.load_user_proj, ProjFrame.load_system_proj): Only show
965            the busy cursor if the files have not yet been loaded by the
966            dialog.
967            (ProjFrame.load_system_proj): Add a parameter for the name of the
968            proj file. Maintain the dictionary of system projections
969            self._sys_proj_files
970    
971            * Thuban/UI/projlist.py (ProjectionList): Merge the system_projs,
972            user_projs parameters into one parameter proj_files which is a
973            list of proj files.
974            (ProjectionList._subscribe_proj_files)
975            (ProjectionList._unsubscribe_proj_files): New. Move
976            subscription/unsubscription of projfile messages to separate
977            methods
978            (ProjectionList.Destroy): The unsubscribe is now done in
979            _unsubscribe_proj_files
980            (ProjectionList.update_projections): We now have a list of proj
981            file objects
982            (ProjectionList.SetProjFiles): New method to set a new list of
983            proj file objects
984    
985            * test/test_proj.py (ProjFileReadTests.test_get_system_proj_file):
986            Specify explicitly which system proj file to load.
987    
988    2003-11-11  Bernhard Herzog  <[email protected]>
989    
990            * Thuban/Model/load.py (SessionLoader.Destroy): New. Clear all
991            instance variables to cut cyclic references. The GC would have
992            collected the loader eventually but it can happen that it doesn't
993            run at all until thuban is closed (2.3 but not 2.2 tries a bit
994            harder and forces a collection when the interpreter terminates)
995            (load_session): Call the handler's Destroy method to make sure
996            that it gets garbage collected early. Otherwise it will be
997            collected very late if at all and it holds some references to e.g.
998            shapestores and the session which can lead to leaks (of e.g. the
999            temporary files)
1000    
1001            * test/test_load.py (TestSingleLayer.test_leak): New. test for the
1002            resource leak in load_session
1003    
1004    2003-11-10  Bernhard Herzog  <[email protected]>
1005    
1006            * Thuban/UI/baserenderer.py: Add a way to specify how layers in
1007            extensions are to be rendered.
1008            (_renderer_extensions): New. List with renderer for layers in
1009            extensions
1010            (add_renderer_extension): New. Add a renderer extension
1011            (init_renderer_extensions): New. Init the renderer extensions
1012            (BaseRenderer.render_map_incrementally): Search
1013            _renderer_extensions for how to draw unknown layer types
1014            (BaseRenderer.draw_raster_data): Add format parameter so that
1015            formats other than BMP can be drawn
1016            (BaseRenderer.draw_raster_layer): Pass an explicit format to
1017            draw_raster_data
1018    
1019            * Thuban/UI/renderer.py (raster_format_map): New. Mapping form the
1020            strings of the format parameter of draw_raster_data method to wx
1021            constants
1022            (MapRenderer.draw_raster_data): Add the format parameter and use
1023            raster_format_map to map it to the right wxwindows constant for
1024            wxImageFromStream
1025    
1026            * test/test_baserenderer.py (SimpleRenderer.draw_raster_data): Add
1027            the format parameter and record it
1028            (TestBaseRenderer.test_raster_no_projection): check the format
1029            paramter of the draw_raster_data method
1030            (TestBaseRenderer.test_renderer_extension): New. Test the renderer
1031            extension facility
1032    
1033    2003-11-07  Bernhard Herzog  <[email protected]>
1034    
1035            Tweak the usage of the sqlite database to make common use cases
1036            more responsive. In most cases copying the data to the sqlite
1037            database takes so long that using sqlite doesn't have enough
1038            advantages.
1039    
1040            * Thuban/Model/transientdb.py (TransientTableBase.ValueRange): Add
1041            comments about performance and query the min and max in separate
1042            statements because only that way will indexes be used.
1043            (TransientTableBase.UniqueValues): Add some comments about
1044            performance.
1045            (AutoTransientTable.ValueRange, AutoTransientTable.UniqueValues):
1046            Do not copy the data to the transient DB but use the transient
1047            copy if it exists. See the new comments for the performance trade
1048            offs
1049    
1050            * test/test_transientdb.py
1051            (TestTransientTable.test_auto_transient_table): Make sure that the
1052            data is copied to the transient database at some point.
1053    
1054    2003-11-03  Bernhard Herzog  <[email protected]>
1055    
1056            * Thuban/Model/data.py (ShapefileStore.ShapesInRegion): Bind some
1057            globals to locals so that it's a bit faster
1058    
1059    2003-11-03  Bernhard Herzog  <[email protected]>
1060    
1061            * Thuban/UI/baserenderer.py
1062            (BaseRenderer.draw_shape_layer_incrementally): Use the ReadValue
1063            method. ReadValue is faster than ReadRowAsDict since it only reads
1064            one cell especially now that the dbf file objects actually
1065            implement it.
1066    
1067            * Thuban/Model/table.py (DBFTable.ReadValue): Use the new
1068            read_attribute method of the dbf objects
1069    
1070    2003-11-03  Bernhard Herzog  <[email protected]>
1071    
1072            * Extensions/profiling/profiling.py (popup_dialog_box): New config
1073            variable to indicate whether the result should be shown in a
1074            dialog box
1075            (profile_screen_renderer, time_screen_renderer): Only show a
1076            dialog box if popup_dialog_box is true.
1077            (profile_screen_renderer): Flush stdout after the printing the
1078            first part of the "profiling..." message
1079    
1080            * Thuban/UI/baserenderer.py
1081            (BaseRenderer.draw_shape_layer_incrementally): Cache the pens and
1082            brushes for the groups so that they're not created over and over
1083            again
1084    
1085            * Thuban/Model/classification.py (Classification.__getattr__)
1086            (Classification._compile_classification)
1087            (Classification._clear_compiled_classification): New. Methods to
1088            manage a 'compiled' representation of the classification groups
1089            which is created on demand
1090            (Classification.InsertGroup, Classification.RemoveGroup)
1091            (Classification.ReplaceGroup): reset the compiled representation
1092            (Classification.FindGroup): Use the compiled representation to
1093            find the matching group
1094            (ClassGroupRange.GetRangeTuple): New. Return the range as a tuple
1095    
1096    2003-10-31  Bernhard Herzog  <[email protected]>
1097    
1098            * Thuban/Model/classification.py (Classification.SetDefaultGroup):
1099            Send a CLASS_CHANGED message
1100            (Classification.RemoveGroup): Send a CLASS_CHANGED message and do
1101            not return the removed group since it wasn't used.
1102    
1103            * test/test_classification.py
1104            (TestClassification.test_set_default_group): New. Test the
1105            SetDefaultGroup method
1106            (TestClassification.test_insert_group): New. Test the InsertGroup
1107            method
1108            (TestClassification.test_remove_group): New. Test the RemoveGroup
1109            method
1110            (TestClassification.test_replace_group): New. Test the
1111            ReplaceGroup method
1112    
1113    2003-10-31  Bernhard Herzog  <[email protected]>
1114    
1115            * test/test_classification.py (TestClassification.setUp):
1116            Subscribe to the CLASS_CHANGED messages
1117            (TestClassification.tearDown): New. Destroy the classification
1118            properly
1119            (TestClassification.test_defaults): Add tests for the default line
1120            width and whether no messages were sent yet
1121            (TestClassification.test_set_default_properties): Add tests for
1122            messages and setting the default line width
1123            (TestClassification.test_add_singleton)
1124            (TestClassification.test_add_range)
1125            (TestClassification.test_multiple_groups): Add tests for messages
1126    
1127    2003-10-31  Bernhard Herzog  <[email protected]>
1128    
1129            Some more refactoring in preparation for new tests:
1130    
1131            * test/test_classification.py (TestClassification.setUp): New.
1132            Instantiate the classification here. Update the test methods
1133            accordingly.
1134            (TestClassification.test_multiple_groups): Make sure that the two
1135            singletons matching 1 are considered different.
1136    
1137    2003-10-31  Bernhard Herzog  <[email protected]>
1138    
1139            * test/test_classification.py (red, green, blue): New. These
1140            constants were used in several cases. Update the relevant methods.
1141            (TestClassification.test_defaults)
1142            (TestClassification.test_set_default_properties)
1143            (TestClassification.test_add_singleton)
1144            (TestClassification.test_add_range)
1145            (TestClassification.test_multiple_groups)
1146            (TestClassification.test_deepcopy): New. These were formerly all
1147            part of the single method test.
1148            (TestClassification.test_deepcopy): Removed.
1149            (TestClassIterator): Removed. The test case is now a method of
1150            TestClassification since it tests part of the public interface of
1151            Classification
1152            (TestClassification.test_iterator): New. Used to be
1153            TestClassIterator effectively
1154    
1155    2003-10-31  Jan-Oliver Wagner <[email protected]>
1156    
1157            GUIfied the functions of the profiling extension.
1158    
1159            * /Extensions/profiling/__init__.py: New: Init to make this
1160            directory a package.
1161    
1162            * Extensions/profiling/profiling.py: Moved menu entries to
1163            the Extensions menu. Applied _() for strings.
1164            (profile_screen_renderer): Catch the detailed printout and present
1165            it in a dialog.
1166            (time_screen_renderer): Raise a dialog to present the result instead
1167            of printing it to stdout.
1168    
1169    2003-10-31  Bernhard Herzog  <[email protected]>
1170    
1171            * test/test_classification.py (TestClassGroupProperties)
1172            (TestClassGroup, TestClassGroupDefault, TestClassGroupRange)
1173            (TestClassGroupSingleton, TestClassIterator, TestClassification):
1174            Split TestClassification into several classes, one for each class
1175            being tested. TestClassification itself now only tests
1176            Classification. This split makes changes to the tests a bit easier
1177    
1178    2003-10-31  Bernhard Herzog  <[email protected]>
1179    
1180            * Extensions/profiling/profiling.py: New. Extension to measure
1181            Thuban performance
1182    
1183    2003-10-31  Frank Koormann <[email protected]>
1184    
1185            Added two items to legend popup menu: Remove Layer and Show Layer Table
1186    
1187            * Thuban/UI/legend.py (LegendPanel._OnRemoveLayer,
1188            LegendPanel._OnShowTable): New event handlers, call the corresponding
1189            mainwindow methods.
1190            (LegendTree._OnRightClick): Added items to popup menu.
1191    
1192    2003-10-30  Bernhard Herzog  <[email protected]>
1193    
1194            * Thuban/UI/dialogs.py (ThubanFrame.__init__): Handle
1195            EVT_WINDOW_DESTROY
1196            (ThubanFrame.OnDestroy): New. Handler for EVT_WINDOW_DESTROY. Does
1197            nothing but is convenient for the derived classes.
1198    
1199            * Thuban/UI/tableview.py
1200            (TableFrame.OnDestroy, LayerTableFrame.OnDestroy): New.
1201            Unsubscribe the messages here not in OnClose because that might
1202            get called multiple times. Fixes RT #2196
1203            (TableFrame.OnClose, LayerTableFrame.OnClose): Removed. Not needed
1204            anymore.
1205    
1206            * README: Update the minimum requirement for wxPython. Since we
1207            now use the EVT_WINDOW_DESTROY event, we need at least 2.4.0.4,
1208            the version in which that was introduced for all platforms
1209    
1210    2003-10-30  Frank Koormann <[email protected]>
1211    
1212            * Thuban/UI/join.py (JoinDialog.OnJoin): Wrapped the major parts of
1213            the join process in a ThubanBeginBusyCursor, ThubanEndBusyCursor
1214            frame.
1215    
1216    2003-10-30  Jan-Oliver Wagner <[email protected]>
1217    
1218            Improved APR import extension, added further EPSG definitions
1219            and some cleanup regarding string class.
1220    
1221            * test/test_proj.py (TestProjection.test_get_projection_units_geo):
1222            Added test for alias 'longlat'.
1223    
1224            * Resources/Projections/epsg-deprecated.proj: New. Contains
1225            deprecated EPSG definitions.
1226    
1227            * Extensions/importAPR/odb.py (ODBBaseObject.TreeInfo): Added
1228            the variable names for objects.
1229    
1230            * Extensions/importAPR/apr.py (APR_BLnSym, APR_BMkSym, APR_BShSym): New.
1231            Copied from importAPR and provided with documentation.
1232    
1233            * Extensions/importAPR/importAPR.py (APR_BLnSym, APR_BMkSym, APR_BShSym):
1234            Moved to apr.py.
1235            (APR_View): Added object ref 'ITheme'.
1236    
1237            * Thuban/Lib/fileutil.py, Thuban/UI/proj4dialog.py: Replaced string
1238            split function by corresponding use of the string class method.
1239    
1240            * Thuban/Model/xmlwriter.py: Replaced string replace function by
1241            corresponding string method.
1242    
1243    2003-10-29  Bernhard Herzog  <[email protected]>
1244    
1245            * Thuban/UI/baserenderer.py
1246            (BaseRenderer.draw_shape_layer_incrementally): Speed up the
1247            special case of a classification that only has the default group
1248    
1249    2003-10-27  Bernhard Herzog  <[email protected]>
1250    
1251            * po/fr.po, po/es.po: Updated translations from Daniel Calvelo
1252    
1253            * po/de.po: Update.
1254    
1255            * Thuban/UI/application.py
1256            (ThubanApplication.ShowExceptionDialog): Handle translation of the
1257            dialog message properly
1258    
1259    2003-10-27  Bernhard Herzog  <[email protected]>
1260    
1261            Rework how localization works so that we use wx's translation
1262            functions when running Thuban as a normal application but not when
1263            we don't need any UI, such as in the test suite. See the comment
1264            in Thuban/__init__.py for details
1265    
1266            * Thuban/__init__.py (_): Add one level of indirection to make the
1267            translation handling more flexible and to make it possible to use
1268            either wx's translation services or not.
1269            (gettext_identity, translation_function_installed)
1270            (install_translation_function): New function to help with this
1271    
1272            * Thuban/UI/__init__.py: Install the wx specific translation
1273            function if it's OK to do that
1274    
1275            * test/support.py (initthuban): Install a dummy translation
1276            function so that importing Thuban.UI doesn't install a wx specific
1277            one for which would need to import wxPython
1278    
1279    2003-10-27  Bernhard Herzog  <[email protected]>
1280    
1281            * HOWTO-Release: Source archives should be created first and the
1282            binary packages should be created from the source archives.
1283            There's an official debian package now so there's no need to test
1284            the rpm on debian anymore
1285    
1286    2003-10-27  Bernhard Herzog  <[email protected]>
1287    
1288            Several rendering changes:
1289    
1290             - Render the selection into a separate bitmap so that only that
1291               bitmap needs to be redrawn when the selection changes
1292    
1293             - Render incrementally showing previews and allowing interaction
1294               before rendering is complete
1295    
1296             - Update the renderer interface a bit. Most parameters of
1297               RenderMap are now parameters of the constructor
1298    
1299            * Thuban/UI/baserenderer.py (BaseRenderer.__init__): Add the map
1300            and the update region as parameters. Update the doc-string
1301            (BaseRenderer.render_map_incrementally): New. Generator function
1302            to renders the map incrementally
1303            (BaseRenderer.render_map): Remove the map argument (it's now in
1304            the constructor) and simply iterate over the
1305            render_map_incrementally generator to draw the map.
1306            (BaseRenderer.draw_shape_layer_incrementally)
1307            (BaseRenderer.draw_shape_layer): Renamed to
1308            draw_shape_layer_incrementally and changed into a generator that
1309            yields True every 500 shapes. Used by render_map_incrementally to
1310            render shape layers incrementally
1311    
1312            * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Removed the
1313            map and region parameters which are now in the constructor
1314            (ScreenRenderer.RenderMapIncrementally): New. Public frontend for
1315            the inherited render_map_incrementally.
1316            (BaseRenderer.draw_shape_layer): Removed.
1317            (ScreenRenderer.draw_selection_incrementally): New. The selection
1318            drawing part of the removed draw_shape_layer as a generator
1319            (ScreenRenderer.layer_shapes): Update because of the region
1320            parameter change
1321            (ExportRenderer.__init__): New. Extend the inherited constructor
1322            with the destination region for the drawing
1323            (ExportRenderer.RenderMap): Removed the map and region parameters
1324            which are now in the constructor
1325    
1326            * Thuban/UI/view.py (MapCanvas.PreviewBitmap): New. Return a
1327            bitmap suitable for a preview in a tool
1328            (CanvasPanTool.MouseMove): Use the PreviewBitmap method to get the
1329            bitmap
1330            (MapPrintout.draw_on_dc): Adapt to new renderer interface
1331            (MapCanvas.OnPaint): Handle drawing the selection bitmap if it
1332            exists
1333            (MapCanvas.OnIdle): Update the logic to deal with incremental
1334            rendering and the selection bitmap
1335            (MapCanvas._do_redraw): Handle the instantiation of the render
1336            iterator and the redraws during rendering
1337            (MapCanvas._render_iterator): New. Generator to incrementally
1338            redraw both bitmaps
1339            (MapCanvas.Export): Adapt to new renderer interface.
1340            (MapCanvas.full_redraw): Reset the selection bitmap and the
1341            renderer iterator too
1342            (MapCanvas.redraw_selection): New. Force a redraw of the selection
1343            bitmap
1344            (MapCanvas.shape_selected): Only redraw the selection bitmap
1345    
1346            * test/test_baserenderer.py
1347            (TestBaseRenderer.test_polygon_no_projection)
1348            (TestBaseRenderer.test_raster_no_projection)
1349            (TestBaseRenderer.test_point_map_projection)
1350            (TestBaseRenderer.test_point_layer_and_map_projection)
1351            (TestBaseRenderer.test_point_layer_projection)
1352            (TestBaseRenderer.test_point_with_classification): Adapt to new
1353            renderer interface
1354    
1355    2003-10-24  Bernhard Herzog  <[email protected]>
1356    
1357            * libraries/thuban/wxproj.cpp (draw_polygon_shape)
1358            (point_in_polygon_shape, shape_centroid): Raise an exception if
1359            the shape can't be read. Previously invalid shape ids would lead
1360            to a segfault.
1361    
1362            * test/test_wxproj.py (TestShapeCentroid.test_invalid_shape_id):
1363            New. test whether an exception is raised for invalid shape ids
1364    
1365    2003-10-24  Jan-Oliver Wagner <[email protected]>
1366    
1367            * Thuban/Model/proj.py (Projection.GetProjectedUnits): Added 'longlat'
1368            as alias for 'latlong'.
1369    
1370            * Thuban/UI/projdialog.py (ProjFrame.__init__): Added 'longlat'
1371            as alias for 'latlong'.
1372    
1373    2003-10-24  Jan-Oliver Wagner <[email protected]>
1374    
1375            * Thuban/UI/projdialog.py (ProjFrame.proj_selection_changed): Set
1376            the projection even for the UnknownPanel.
1377            (UnknownProjPanel.__init__): Define the text and create the textctrl
1378            widget.
1379            (UnknownProjPanel._DoLayout): Replaced static text widget by the
1380            textctrl created in __init__.
1381            (UnknownProjPanel.SetProjection): Set the text for the text ctrl
1382            including the parameters of the projection.
1383            
1384    2003-10-24  Jan-Oliver Wagner <[email protected]>
1385    
1386            * Resources/Projections/epsg.proj: New. This is a list of
1387            EPSG codes with parameters for proj. The list has been
1388            generated using devtools/create_epsg.py based on the
1389            file nad/epsg of the proj 4.4.7 package. Four projection
1390            definitions have been deleted as they are not accepted by proj:
1391            "CH1903+ / LV95", "Bern 1898 (Bern) / LV03C", "CH1903 / LV03"
1392            and "HD72 / EOV".
1393    
1394    2003-10-22  Bernhard Herzog  <[email protected]>
1395    
1396            Some more tweaks to the projection dialog which should fix RT
1397            #1886.
1398    
1399            * Thuban/UI/projlist.py (ProjectionList.Destroy): Unsubscribe from
1400            the ProjFile's messages and call the base class methods correctly
1401            (ProjectionList.SelectProjection): Set the wxLIST_STATE_FOCUSED
1402            flag on the newly selected item too. Otherwise some other item is
1403            focused and the first time the focus is moved with the keyboard
1404            the selection moves in unexpected ways.
1405    
1406            * Thuban/UI/projdialog.py (ProjFrame.__init__): Do not set the
1407            focus on the OK button, only on the projection list. That way the
1408            list really has the focus initially
1409            (ProjFrame.OnClose): Call the projection list's Destroy method to
1410            make it unsubscribe all messages
1411    
1412    2003-10-21  Bernhard Herzog  <[email protected]>
1413    
1414            Rework the projection dialog to fix a few bugs, including RT 2166
1415            and most of 2168
1416    
1417            * Thuban/UI/projlist.py: New. The class ProjectionList is a
1418            special wxListCtrl to show a list of projections in a more MVC
1419            fashion
1420    
1421            * Thuban/UI/projdialog.py (ProjFrame): Substantial changes
1422            throughout the class. The main change is to use the ProjectionList
1423            class instead of a normal wxListBox. Also, add an explicit
1424            "Unknown" projection to the projection choice control.
1425            (ProjPanel.__init__): Add an "unknown" ellipsoid
1426            (TMPanel.__init__, LCCPanel.__init__): Tweak the order of
1427            instantiation of the panel's controls to make the tab-order more
1428            natural
1429    
1430    2003-10-21  Bernhard Herzog  <[email protected]>
1431    
1432            * test/test_load.py (TestSingleLayer.file_contents)
1433            (TestSingleLayer.test): Add non-ascii characters to the titles of
1434            session, map and layer. This is effectively a port of the
1435            TestUnicodeStrings test in test_load_0_8.py which for some reason
1436            was only added there.
1437    
1438            * test/test_load_0_9.py (TestSingleLayer.file_contents)
1439            (TestSingleLayer.test): Same as in test_load.py: add non-ascii
1440            characters to the titles of session, map and layer,.
1441    
1442    2003-10-21  Bernhard Herzog  <[email protected]>
1443    
1444            Add EPSG projection handling to .thuban files
1445    
1446            * test/test_save.py (SaveSessionTest.dtd)
1447            (SaveSessionTest.testEmptySession)
1448            (SaveSessionTest.testLayerProjection)
1449            (SaveSessionTest.testRasterLayer)
1450            (SaveSessionTest.testClassifiedLayer)
1451            (SaveSessionTest.test_dbf_table)
1452            (SaveSessionTest.test_joined_table)
1453            (SaveSessionTest.test_save_postgis): Update to 1.0-dev namespace
1454            (SaveSessionTest.testSingleLayer): Update to 1.0-dev namespace and
1455            use a and epsg projection to test saving them
1456    
1457            * test/test_load.py (LoadSessionTest.dtd): Update to 1.0-dev
1458            namespace
1459            (TestLayerVisibility.file_contents, TestLabels.file_contents)
1460            (TestLayerProjection.file_contents)
1461            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
1462            (TestPostGISLayer.file_contents)
1463            (TestPostGISLayerPassword.file_contents)
1464            (TestLoadError.file_contents, TestLoadError.test): Update to use
1465            1.0-dev namespace
1466            (TestSingleLayer.file_contents, TestSingleLayer.test): Update to
1467            use 1.0-dev namespace and use an EPSG projection to test whether
1468            loading it works
1469    
1470            * test/test_load_0_9.py: New. Effectively a copy of test_load.py
1471            as of Thuban 0.9. These are now tests to determine whether Thuban
1472            can still read files generated by Thuban 0.9
1473    
1474            * Thuban/Model/save.py (SessionSaver.write)
1475            (SessionSaver.write_session): Use the 1.0 dtd and 1.0-dev
1476            namespace
1477            (SessionSaver.write_projection): Write the projection's epsg
1478            attribute
1479    
1480            * Thuban/Model/load.py (SessionLoader.__init__): Also accept the
1481            thuban-1.0-dev.dtd namespace
1482            (SessionLoader.check_attrs): Allow a callable object as conversion
1483            too
1484            (SessionLoader.start_projection, SessionLoader.end_projection)
1485            (SessionLoader.start_parameter): Handle the epsg attribute and
1486            rename a few instance variables to lower case
1487    
1488            * Resources/XML/thuban-1.0.dtd: New. Only difference to
1489            thuban-0.9.dtd is the epsg attribute for projections.
1490    
1491    2003-10-21  Bernhard Herzog  <[email protected]>
1492    
1493            * test/runtests.py (main): Let the user specify which tests to run
1494            on the command line
1495    
1496            * test/support.py (ThubanTestResult.getDescription): Override to
1497            give a better short description. The description can be used as a
1498            parameter to run_tests to run that particular test in isolation.
1499    
1500    2003-10-21  Frank Koormann   <[email protected]>
1501    
1502            Popup menu for legend. Scheduled for the 1.2 release this was too
1503            simple to implement: The popup menu is bound to the legend tree, while
1504            the events are hanlded by its anchestor, the legend panel. This
1505            allows reuse of all the event handlers already implemented for the
1506            legend toolbar buttons.
1507    
1508            * Thuban/UI/legend.py (LegendPanel.__init__): EVT_MENU macros
1509            to add handlers for the events issued by the popup menu.
1510            (LegendPanel._OnToggleVisibility): Handler for toggling layer
1511            visibility event
1512            (LegendPanel._OnProjection): Handler for layer projection event.
1513            (LegendTree.__init__): Added EVT_TREE_ITEM_RIGHT_CLICK
1514            (LegendTree._OnRightClick): Event handler for right click, select item
1515            and pop up menu.
1516            (LegendTree.ToggleVisibility): Toggle layer visibility
1517            (LegendTree.LayerProjection): Raise layer projection dialog for
1518            current layer.
1519    
1520    2003-10-21  Bernhard Herzog  <[email protected]>
1521    
1522            * Resources/Projections/defaults.proj: Use correct DOCTYPE
1523            declaration. The top-level element is projectionlist not projfile
1524    
1525    2003-10-20  Bernhard Herzog  <[email protected]>
1526    
1527            * Thuban/UI/projdialog.py (ProjFrame.write_proj_file): New. helper
1528            method to write a projfile and display a busy cursor and error
1529            dialogs.
1530            (ProjFrame._OnSave, ProjFrame._OnAddToList, ProjFrame._OnImport)
1531            (ProjFrame._OnExport, ProjFrame._OnRemove): Use write_proj_file
1532            (ProjFrame.__FillAvailList): Translate "<None>" too and display a
1533            busy cursor while loading the user and system prj files.
1534    
1535    2003-10-16  Bernhard Herzog  <[email protected]>
1536    
1537            * Thuban/Model/resource.py (projfile_cache): Introduce a cache for
1538            ProjFile objects
1539            (clear_proj_file_cache): New function to clear the cache. Mainly
1540            useful for use by the test suite
1541            (read_proj_file): Use the cache.
1542    
1543            * test/test_proj.py (TestProjFile): Clarify the doc-string
1544            (ProjFileReadTests): Update doc-string
1545            (ProjFileReadTests.test_get_system_proj_file): Check whether the
1546            system proj files is cached.
1547            (ProjFileLoadTestCase): New base class for the proj file tests
1548            derived from support.FileLoadTestCase to provide some common
1549            behavior.
1550            (TestLoadingProjFile)
1551            (TestLoadingProjFileWithEmptyProjectionlist.file_contents)
1552            (TestProjFileWithInvalidParameters.file_contents): Derive from
1553            ProjFileLoadTestCase
1554            (TestLoadingProjFile.test_caching): New. Test whether the cache
1555            works
1556    
1557    2003-10-16      Silke Reimer    <[email protected]>
1558    
1559            * debian/*: New directory with configuration files for building a thuban
1560              deb-package.
1561    
1562    2003-10-14  Bernhard Herzog  <[email protected]>
1563    
1564            * test/test_proj.py: Execute support.run_tests when run as
1565            __main__ so that missing unsubscribes are detected
1566            (TestProjFile.tearDown): Destroy the proj_file properly
1567    
1568    2003-10-14  Bernhard Herzog  <[email protected]>
1569    
1570            * Thuban/Model/messages.py (PROJECTION_ADDED)
1571            (PROJECTION_REPLACED, PROJECTION_REMOVED): New message types for
1572            the ProjFile objects
1573    
1574            * Thuban/Model/proj.py (ProjFile): Derive from Publisher so we can
1575            easily send messages when the projections change
1576            (ProjFile.Add, ProjFile.Remove, ProjFile.Replace): Issue messages
1577            when the change was successful
1578    
1579            * test/test_proj.py (TestProjFile.setUp): Subscribe to some of the
1580            proj file messages
1581            (TestProjFile.test_add_remove)
1582            (TestProjFile.test_remove_non_existing)
1583            (TestProjFile.test_replace)
1584            (TestProjFile.test_replace_non_existing): Test whether the right
1585            messages are sent
1586    
1587    2003-10-14  Bernhard Herzog  <[email protected]>
1588    
1589            * test/test_proj.py (TestProjFile.test): Refactor into several
1590            tests
1591            (TestProjFile.test_add_remove)
1592            (TestProjFile.test_remove_non_existing)
1593            (TestProjFile.test_replace)
1594            (TestProjFile.test_replace_non_existing): Some of the new
1595            individual test cases
1596            (TestProjFileSimple): New class for the rest of the test cases
1597            that came out of the refactoring
1598            (ProjFileTest): Derive from xmlsupport.ValidationTest so that the
1599            derived classes don't have to
1600    
1601    2003-10-13  Bernhard Herzog  <[email protected]>
1602    
1603            Add an optional EPSG code to the projection objects and extend the
1604            .proj file format accordingly.
1605    
1606            * Resources/XML/projfile.dtd (element projection): Add epsg
1607            attribute
1608    
1609            * Thuban/Model/proj.py (Projection.__init__): New parameter and
1610            instance variable epsg. Update doc-string
1611            (Projection.EPSGCode, Projection.Label): New methods to provide
1612            access to EPSG code and a label for use in dialogs
1613    
1614            * Thuban/Model/resource.py (ProjFileReader.start_projection)
1615            (ProjFileReader.end_projection, ProjFileSaver.write_projfile):
1616            Handle the epsg code attribute when reading or writing proj files
1617    
1618            * Thuban/UI/projdialog.py (ProjFrame._OnSave)
1619            (ProjFrame._OnAddToList, ProjFrame.__DoOnProjAvail)
1620            (ProjFrame.__FillAvailList): Use the projection's Label method to
1621            get the string for the list box
1622    
1623            * test/test_proj.py (TestProjection.test_label)
1624            (TestProjection.test_label_epsg)
1625            (TestProjection.test_epsgcode_for_non_epsg_projection)
1626            (TestProjection.test_epsgcode_for_real_epsg_projection): New tests
1627            for the label and EPSGCode methods
1628            (WriteProjFileTests.doTestWrite, WriteProjFileTests.test_write)
1629            (WriteProjFileTests.test_write_empty_file): Create the ProjFile
1630            objects in the test cases and put the expected contents into the
1631            test case methods too. Update doTestWrite accordingly
1632            (TestLoadingProjFile)
1633            (TestLoadingProjFileWithEmptyProjectionlist): New classes with the
1634            read tests from TestProjFile.
1635            (TestProjFile.doTestRead, TestProjFile.testRead): Removed. These
1636            tests are now in the new classes.
1637            (sample_projfile, sample_projfile_data)
1638            (sample_projfile2, sample_projfile_data2): Removed. Not used
1639            anymore.
1640            (TestProjFile.test_read_unreadable_file): No need to reset the
1641            permissions at the end anymore since we use a unique filename
1642    
1643    2003-10-13  Bernhard Herzog  <[email protected]>
1644    
1645            * test/test_proj.py: Some more refactoring of the test cases
1646            (ProjFileTest): New base class for the proj file tests.
1647            (TestProjFile): Derive from ProjFileTest
1648            (TestProjFile.test_read_unreadable_file)
1649            (TestProjFile.test_read_empty_file, TestProjFile.doTestRead): Use
1650            the new filename method to get a unique filename
1651            (TestProjFile.doTestWrite, TestProjFile.testWrite): Removed.
1652            (WriteProjFileTests): New class for proj file write tests.
1653            Contains the write test that were in TestProjFile originally.
1654    
1655    2003-10-13  Bernhard Herzog  <[email protected]>
1656    
1657            * test/test_proj.py (TestProjFile.testRead)
1658            (TestProjFile.test_read_non_existing_file)
1659            (TestProjFile.test_read_unreadable_file)
1660            (TestProjFile.test_read_empty_file): Split into several methods.
1661    
1662    2003-10-10  Bernhard Herzog  <[email protected]>
1663    
1664            * Thuban/UI/sizers.py: New file with custom sizers.
1665    
1666            * Thuban/UI/projdialog.py (ProjFrame.build_dialog): Instantiate
1667            all projection type specific panels and put them into a
1668            NotebookLikeSizer. This way the dialog doesn't change its size
1669            when a different projection is selected
1670            (ProjFrame.__init__): Rename projection_panels
1671            projection_panel_defs and reuse projection_panels for a list of
1672            the instantiated panels.
1673            (ProjFrame._show_proj_panel, ProjFrame.__DoOnProjAvail)
1674            (ProjFrame.__DoOnProjChoice): Changes due to the new handling of
1675            the panels
1676            (UnknownProjPanel._DoLayout): Place the newlines in the message
1677            differently to make the panel narrower.
1678            (TMPanel._DoLayout): Layout the parameters in one column.
1679    
1680    2003-10-10  Bernhard Herzog  <[email protected]>
1681    
1682            * Thuban/UI/projdialog.py (ProjFrame.build_dialog): New method
1683            that contains all the setup for the dialog's widgets, layout and
1684            event handling.
1685            (__): Call build_dialog to build the dialog.
1686            (ProjFrame.__set_properties, ProjFrame.__do_layout): Removed.
1687            Their functionality is now in build_dialog
1688            (ProjFrame.__VerifyButtons, ProjFrame.__VerifyButtons)
1689            (ProjFrame.__DoOnProjAvail, ProjFrame.__DoOnProjAvail)
1690            (ProjFrame.__DoOnProjChoice): Small updates due to slightly
1691            different widget names and hierarchy introduced with build_dialog.
1692    
1693    2003-10-10  Bernhard Herzog  <[email protected]>
1694    
1695            * README: Fix typo.
1696    
1697    2003-10-09  Bernhard Herzog  <[email protected]>
1698    
1699            * Thuban/Model/proj.py (ProjFile.Add): Do not check whether the
1700            projection is already in the list. This is *a lot* faster when
1701            loading files with hundreds of projections since it saves a linear
1702            search. OTOH this will allow adding the same projection to the
1703            user.proj file multiple times in the projection dialog but we'll
1704            deal with that later
1705    
1706    2003-10-09  Jan-Oliver Wagner <[email protected]>
1707    
1708            * devtools: New. Directory for developer tools that are not intended
1709            for the regular user.
1710    
1711            * devtools/create_epsg.py: New. Convert the epsg file of proj into
1712            a python .proj file.
1713    
1714    2003-10-09  Bernhard Herzog  <[email protected]>
1715    
1716            * test/test_proj.py
1717            (TestProjection.test_get_parameter_without_equals_sign): New. Test
1718            whether GetParameter handles parameters without "=" sign correctly
1719    
1720            * Thuban/Model/proj.py (Projection.GetParameter): Handle
1721            parameters that do not contain a "=". Update the doc-string
1722    
1723    2003-10-08  Bernhard Herzog  <[email protected]>
1724    
1725            * Thuban/UI/projdialog.py (ProjFrame.__set_properties): Remove the
1726            length limit on the projname text control
1727    
1728    2003-10-08  Bernhard Herzog  <[email protected]>
1729    
1730            * test/test_proj.py (TestProjection.test_get_projection_units_geo)
1731            (TestProjection.test_get_projection_units_normal): New. Tests for
1732            the Projection.GetProjectedUnits method
1733    
1734    2003-10-08  Jan-Oliver Wagner <[email protected]>
1735    
1736            * Thuban/Model/resource.py (get_user_proj_file): small bug-fix:
1737            Added missing 'val' parameter.
1738    
1739    2003-10-08  Bernhard Herzog  <[email protected]>
1740    
1741            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): When the
1742            projection type of the currently selected projection is not known,
1743            i.e. there's no panel for it, use the UnknownProjPanel
1744            (ProjFrame.__DoOnProjChoice, ProjFrame._show_proj_panel): Split
1745            the actual replacing of the proj panel into the new method
1746            _show_proj_panel.
1747            (UnknownProjPanel): Add doc-string.
1748            (UnknownProjPanel._DoLayout): Insert a newline into the text so
1749            that the panel is not so wide.
1750    
1751    2003-10-08  Bernhard Herzog  <[email protected]>
1752    
1753            * Thuban/Model/resource.py (read_proj_file): Return the warnings
1754            too. Update the doc-string
1755            (get_proj_files): Removed. It wasn't used anywhere
1756            (get_system_proj_files, get_system_proj_file): Rename to
1757            get_system_proj_file and return the ProjFile object and not a list
1758            of ProjFile objects. Update the callers.
1759            (get_user_proj_files, get_user_proj_file): Rename to
1760            get_user_proj_file return the ProjFile object and not a list of
1761            ProjFile objects. Update the callers.
1762            (ProjFileReader.__init__): New instance variable for the warnings.
1763            Rename the __pf ivar to projfile. Update the methods referring to
1764            __pf
1765            (ProjFileReader.end_projection): Catch any errors raised when
1766            instantiating the projection and record that as an error. The
1767            projection will not be in the final ProjFile object.
1768            (ProjFileReader.GetWarnings): New method to return the warnings.
1769    
1770            * Thuban/UI/projdialog.py (ProjFrame.show_warnings): New method to
1771            show the warnings from the projfile reader
1772            (ProjFrame._OnImport): Deal with any warnings returned by
1773            read_proj_file
1774            (ProjFrame.__FillAvailList): Deal with any warnings returned by
1775            get_system_proj_file or get_user_proj_file.
1776    
1777            * test/test_proj.py (TestProjFile.doTestRead): Check the warnings.
1778            (TestProjFileWithInvalidParameters.file_contents): New test cases
1779            to test whether read_proj_file handles invalid projection
1780            parameters correctly
1781            (TestProjFile.test_get_system_proj_file): New. Simple test for
1782            resource.get_system_proj_file
1783    
1784    2003-10-07  Bernhard Herzog  <[email protected]>
1785    
1786            * test/test_derivedshapestore.py
1787            (TestDerivedShapeStoreExceptions.tearDown): Clear the session
1788            properly so that the temporary directories get deleted correctly
1789    
1790    2003-10-06  Bernhard Herzog  <[email protected]>
1791    
1792            Handle the title changes in a proper MVC way.
1793    
1794            * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
1795            canvas' TITLE_CHANGED messages
1796            (MainWindow.update_title): New. Update the main window's title
1797            (MainWindow.__SetTitle): Removed. Use update_title instead.
1798            (MainWindow.SetMap): Use update_title instead of __SetTitle
1799            (MainWindow.RenameMap): Do change the window title explicitly
1800            here. That's handled in a proper MVC way now.
1801            (MainWindow.title_changed): New. Subscriber for the TITLE_CHANGED
1802            messages
1803    
1804            * Thuban/Lib/connector.py (Conduit): New class to help classes
1805            that forward messages
1806    
1807            * Thuban/UI/viewport.py: Forward the map's TITLE_CHANGED messages
1808            (ViewPort): Derive from Conduit instead of Publisher
1809            (ViewPort.Subscribe, ViewPort.Unsubscribe): Use the new base class
1810            when calling the inherited versions
1811            (ViewPort._subscribe_map, ViewPort._unsubscribe_map): New helper
1812            methods to subscribe and unsubscribe map messages
1813            (ViewPort.SetMap, ViewPort.Destroy): Use the new helper methods to
1814            handle the map subscriptions
1815            (ViewPort.Map, ViewPort.map_projection_changed)
1816            (ViewPort.layer_projection_changed): Add or update doc-strings
1817    
1818            * test/test_connector.py (TestPublisher.test_issue_simple): Fix
1819            typo
1820            (MyConduit): Helper class for the Conduit test.
1821            (TestConduit): Test cases for Conduit
1822    
1823            * test/test_connector.py: Use support.run_tests as main.
1824    
1825            * test/test_viewport.py (ViewPortTest.setUp): Also subscribe to
1826            the TITLE_CHANGED messages
1827            (ViewPortTest.test_forwarding_title_changed): New test to check
1828            whether the viewport forwards the map's TITLE_CHANGED messages
1829            (TestViewportWithPostGIS.tearDown): Call the map's Destroy method
1830            after the port's because the latter may require a still functional
1831            map.
1832    
1833    2003-10-06  Bernhard Herzog  <[email protected]>
1834    
1835            * Thuban/UI/application.py (ThubanApplication.maps_changed): Add
1836            doc-string
1837    
1838    2003-10-06  Bernhard Herzog  <[email protected]>
1839    
1840            * test/test_viewport.py (ViewPortTest.setUp)
1841            (SimpleViewPortTest.test_init_with_size): Move the test for the
1842            initial size as a constructor parameter from ViewPortTest.setUp
1843            method to a new separate test in SimpleViewPortTest.
1844    
1845    2003-10-06  Bernhard Herzog  <[email protected]>
1846    
1847            * test/test_viewport.py (MockView): New class derived from
1848            ViewPort with a mock implementation of GetTextExtent to be used in
1849            the test cases
1850            (ViewPortTest.setUp): Use MockView instead of ViewPort
1851    
1852            * Thuban/UI/viewport.py (ViewPort.GetTextExtent): Turn this method
1853            into what would be a "pure virtual function" in C++: always raise
1854            NotImplementedError. Mock implementations for test cases don't
1855            belong into the real code
1856    
1857    2003-10-02  Bernhard Herzog  <[email protected]>
1858    
1859            * test/test_layer.py (TestLayer.test_empty_layer): Explicitly
1860            close the dbf file we create so that it's contents have been
1861            written properly.
1862    
1863            * libraries/shapelib/shptree.c, libraries/shapelib/shpopen.c,
1864            libraries/shapelib/shapefil.h, libraries/shapelib/dbfopen.c:
1865            Update to shapelib 1.2.10
1866    
1867    2003-10-01  Jan-Oliver Wagner <[email protected]>
1868    
1869            * Thuban/UI/tree.py, Thuban/UI/main.py: Remove the #! line as
1870            it annoys lintian which warns about these files not being
1871            executable. The #! isn't necessary here since if you absolutely
1872            must execute them you can always say "python <filename>".
1873    
1874    2003-09-26  Bernhard Herzog  <[email protected]>
1875    
1876            * Thuban/Model/classgen.py (GenQuantiles0): Removed since it's
1877            only used in GREAT-ER but not used in Thuban itself. When GREAT-ER
1878            is ported to a newer the import will fail, so it should be noticed
1879            immediately that this function is gone.
1880            Fixes RT#1919
1881    
1882    2003-09-26  Bernhard Herzog  <[email protected]>
1883    
1884            Add a DTD for the projection files and make thuban write valid
1885            projection files
1886    
1887            * Resources/XML/projfile.dtd: New. DTD for thuban's projection
1888            files
1889    
1890            * Thuban/Model/resource.py (ProjFileSaver.write): Use
1891            'projectionlist' as the name in the document type declaration so
1892            that it matches the element type of the root element.
1893    
1894            * test/test_proj.py (sample_projfile, sample_projfile2): Use
1895            'projectionlist' as the name in the document type declaration just
1896            as it is done now in the files thuban would write
1897            (sample_projfile, sample_projfile_data): Fix spelling of
1898            "Mercator"
1899            (TestProjFile.doTestWrite): Validate the written and the expected
1900            XML data
1901            (TestProjFile): Derive from ValidationTest so that we can run xml
1902            validation tests
1903    
1904    2003-09-24  Bernhard Herzog  <[email protected]>
1905    
1906            * Thuban/UI/renderer.py (ExportRenderer.render_legend): Do not
1907            modify the list returned by map.Layers() in place since it is the
1908            actual list of layers used by the map.
1909    
1910    2003-09-23  Jan-Oliver Wagner <[email protected]>
1911    
1912            * Doc/manual/thuban-manual.xml: Added subsection to chapter
1913            Extensions to describe the extensions coming with the Thuban
1914            standard package (gns2shp and importAPR).
1915    
1916    2003-09-23  Bernhard Herzog  <[email protected]>
1917    
1918            * libraries/thuban/wxproj.cpp (project_point): if there's an
1919            inverse but no forward projection, convert to degrees after
1920            applying the inverse projection. Fixes RT#2096
1921    
1922            * test/test_wxproj.py: New. Test cases for wxproj.so. One test
1923            implicitly tests for the fix to RT#2096
1924    
1925            * test/support.py (FloatComparisonMixin.assertFloatSeqEqual):
1926            Check that the sequences have the same lengths
1927    
1928            * Resources/Projections/defaults.proj (Geographic projection): Use
1929            a much more precise value for the to_meter attribute.
1930    
1931    2003-09-22  Bernhard Herzog  <[email protected]>
1932    
1933            * test/support.py (initthuban): Make sure to unset the LANG env.
1934            var. so that tests that compare translated strings work. Solves RT
1935            #2094
1936    
1937    2003-09-22  Jan-Oliver Wagner <[email protected]>
1938    
1939            Small improvement of APR import.
1940    
1941            * Extensions/importAPR/test/test_apr.py (aprTest.test_LClass):
1942            Added tests for text-ranges.
1943    
1944            * Extensions/importAPR/apr.py (APR_LClass.GetThubanRange): Now
1945            returns a string object if the range is based on text.
1946    
1947            * Extensions/importAPR/importAPR.py (import_apr_dialog): Unified
1948            range retrieval.
1949    
1950    2003-09-22  Jan-Oliver Wagner <[email protected]>
1951    
1952            Initial version of the importAPR extension which is in
1953            experimental state.
1954    
1955            * /Extensions/importAPR/, /Extensions/importAPR/samples/,
1956            /Extensions/importAPR/test/: New directories.
1957    
1958            * /Extensions/importAPR/samples/README: New: Howto load the samples.
1959    
1960            * /Extensions/importAPR/samples/iceland.apr: New: A sample APR
1961            file which refers to the Thuban Iceland demo data.
1962    
1963            * /Extensions/importAPR/test/README: New: Howto execute the tests.
1964    
1965            * /Extensions/importAPR/test/test_apr.py: New: Tests for APR classes.
1966    
1967            * /Extensions/importAPR/apr.py: New: Classes for ArcView Objects
1968            as in '.apr'-files.
1969    
1970            * /Extensions/importAPR/odb.py: New: Classes for generic ArcView
1971            ODB Objects as in '.apr', '.avl' and other files.
1972    
1973            * /Extensions/importAPR/__init__.py: New: Init to make this
1974            directory a package.
1975    
1976            * /Extensions/importAPR/importAPR.py: New: Import a ArcView
1977            project file (.apr) and convert it to Thuban.
1978    
1979    2003-09-22  Jan-Oliver Wagner <[email protected]>
1980    
1981            * Extensions/gns2shp.gns2shp.py: The main module of gns2shp.
1982    
1983    2003-09-19  Jan-Oliver Wagner <[email protected]>
1984    
1985            * Doc/manual/thuban-manual.xml: Extended section 'Installation'
1986            with description on RPM installation and RPM binary package
1987            creation.
1988    
1989    2003-09-18  Bernhard Herzog  <[email protected]>
1990    
1991            * setup.py (data_files): Only add the mo files if the Locales
1992            directory actually exists, so that setup.py works with a fresh CVS
1993            checkout
1994    
1995    2003-09-12  Jan-Oliver Wagner <[email protected]>
1996    
1997            * Examples/simple_extensions/simple_tool.py: bugfix: Tool is now
1998            in viewport, not anymore in view
1999    
2000    2003-09-04  Jan-Oliver Wagner <[email protected]>
2001    
2002            Introducing first Extension (gns2shp).
2003    
2004            * Extensions, Extensions/gns2shp, Extensions/gns2shp/test: New.
2005    
2006            * Extensions/__init__.py: New. init to make this dir a package.
2007    
2008            * Extensions/gns2shp/__init__.py: New. init to make this dir a package.
2009    
2010            * Extensions/gns2shp/test/README: New. some info on this test directory.
2011    
2012            * Extensions/gns2shp/test/ls.txt: New. test data set (Liechtenstein).
2013    
2014            * Extensions/gns2shp/test/test_gns2shp.py: New. Test for correct creation
2015            of Shapefile from GNS text file format
2016    
2017    2003-09-03  Jan-Oliver Wagner <[email protected]>
2018    
2019            Fix/workaround for bug #2019:
2020            https://intevation.de/rt/webrt?serial_num=2019
2021    
2022            * Thuban/UI/identifyview.py (IdentifyView.ID_STOP): New.
2023            (IdentifyView.__init__): Added another button that allows to
2024            stop the identify mode.
2025            (IdentifyView.OnStop): New. Stops the identify mode.
2026    
2027    2003-09-03  Jan-Oliver Wagner <[email protected]>
2028    
2029            Introducing a new exception dialog that allows to exit the
2030            application immediately.
2031            This fixes bug #2060: https://intevation.de/rt/webrt?serial_num=2060
2032    
2033            * Thuban/UI/exceptiondialog.py: New. A special exception dialog.
2034    
2035            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
2036            Made strings available to translations. Exchanged the simple
2037            ScrolledMessageDialog by the new ExceptionDialog.
2038    
2039    2003-09-01  Bernhard Herzog  <[email protected]>
2040    
2041            * NEWS: New. Summary of changes and release notes.
2042    
2043            * MANIFEST.in: Add NEWS
2044    
2045    2003-09-01  Bernhard Herzog  <[email protected]>
2046    
2047            * MANIFEST.in: Correct the include statement for the mo-files and
2048            include the documentation too.
2049    
2050            * setup.py (data_files): Add the .mo files
2051            (setup call): Up to version 0.9.0
2052    
2053    2003-09-01  Bernhard Herzog  <[email protected]>
2054    
2055            * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Change the
2056            parameter list to just parent and session
2057            (ChooseDBTableDialog.__set_properties): Removed. Setting the
2058            selection of empty list boxes is not allowed (and produces C++
2059            assertion errors) and the rest of the setup is better done in
2060            __init__ anyway.
2061            (ChooseDBTableDialog.OnCancel, ChooseDBTableDialog.OnOK)
2062            (ChooseDBTableDialog.OnLBDClick, DBDialog.OnOK): Use the Python
2063            builtins True/False for booleans to avoid warnings from wxPython
2064    
2065            * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Adapt to new
2066            ChooseDBTableDialog constructor parameters.
2067    
2068    2003-09-01  Bernhard Herzog  <[email protected]>
2069    
2070            * Thuban/Model/postgisdb.py
2071            (PostGISTable): Extend doc-string
2072            (PostGISTable._fetch_table_information): Set the column index
2073            correctly, pretending ignored columns don't exist.
2074    
2075            * test/test_postgis_db.py (TestPostGISIgnoredColumns): New tests
2076            for postgis tables with data types not yet supported by thuban.
2077    
2078    2003-08-29  Bernhard Herzog  <[email protected]>
2079    
2080            * HOWTO-Release: Tweak item about running the tests.
2081    
2082    2003-08-29  Jan-Oliver Wagner <[email protected]>
2083    
2084            * /Doc/manual/thuban-manual.xml: updated to version 1.0pre2.
2085    
2086    2003-08-29  Bernhard Herzog  <[email protected]>
2087    
2088            Add some missing parameters to projections. Proj complains about
2089            them on windows but for some reason not on Linux.
2090    
2091            * test/test_save.py (SaveSessionTest.testLayerProjection): Add
2092            missing required projection parameters
2093    
2094            * test/test_proj.py (TestProjFile.test): Add missing required
2095            projection parameters
2096    
2097            * test/test_load_0_8.py (TestLayerProjection.file_contents)
2098            (TestLayerProjection.test): Add missing required projection
2099            parameters and tests for them
2100    
2101            * test/test_load.py (TestLayerProjection.file_contents)
2102            (TestLayerProjection.test): Add missing required projection
2103            parameters and tests for them
2104    
2105            * test/test_layer.py (TestLayer.test_base_layer): Add missing
2106            required projection parameters
2107    
2108    2003-08-29  Bernhard Herzog  <[email protected]>
2109    
2110            * libraries/pyprojection/Projection.i: Use pj_get_errno_ref to
2111            access the pj_errno because directly accessing pj_errno doesn't
2112            work on windows if the proj library is in a DLL
2113    
2114            * libraries/pyprojection/Projection_wrap.c: Update from Projection.i
2115    
2116    2003-08-28  Bernhard Herzog  <[email protected]>
2117    
2118            * test/test_proj.py: Import things from Thuban after calling
2119            initthuban
2120    
2121            * test/test_load.py (LoadSessionTest.filenames): New class
2122            variable with the filename attributes to normalize
2123            (LoadSessionTest.check_format): Pass self.filenames to
2124            sax_eventlist to normalize the filename attributes
2125    
2126            * test/xmlsupport.py: Add cvs keywords
2127            (SaxEventLister.__init__): New parameter filenames which indicates
2128            attributes that contain filenames
2129            (SaxEventLister.startElementNS): Normalize the filename attributes
2130            with os.path.normpath
2131            (sax_eventlist): New parameter filenames to pass through to
2132            SaxEventLister
2133    
2134            * test/test_derivedshapestore.py: Make this file callable as a
2135            program to execute the tests
2136            (TestDerivedShapeStoreExceptions.test_table_with_wrong_size): Bind
2137            the session to self.session so that it gets destroyed properly
2138    
2139            * test/test_layer.py (TestLayer.tearDown): Call the session's
2140            Destroy method
2141    
2142            * test/test_map.py (TestMapBase.tearDown): Destroy self.session
2143            too if it exists
2144            (TestMapAddLayer.test_add_layer): Bind the session to self.session
2145            so that it gets destroyed properly
2146    
2147            * test/postgissupport.py (reason_for_not_running_tests): Add a
2148            test for the existence of popen2.Popen4.
2149    
2150            * test/test_save.py (SaveSessionTest.tearDown): New. Provide a
2151            reliable way to destroy the sessions created in the test cases
2152            (SaveSessionTest.test_dbf_table): Bind the session to self.session
2153            so that it gets destroyed properly
2154            (SaveSessionTest.testLayerProjection): Bind the session to
2155            self.session so that it gets destroyed properly
2156    
2157            * test/test_session.py (UnreferencedTablesTests.tearDown): Make
2158            sure that the session is destroyed properly
2159    
2160            * test/test_shapefilestore.py: Make this callable as a program to
2161            execute the tests
2162    
2163            * test/test_scalebar.py: Remove unnecessary import of _ from
2164            Thuban
2165    
2166            * test/support.py (print_garbage_information): Call initthuban
2167            here because it may be called indirectly from test cases that test
2168            test support modules which do not use anything from thuban itself
2169            (ThubanTestProgram.runTests): Remove unnecessary debug print
2170    
2171    2003-08-28  Bernhard Herzog  <[email protected]>
2172    
2173            * Thuban/version.py (longversion): Update to 0.9
2174    
2175            * Thuban/UI/mainwindow.py: Remove some unused imports
2176    
2177            * README: Add section about required additional software. Add date
2178            and revision CVS keywords
2179    
2180            * HOWTO-Release: Add item about the translations. Add date and
2181            revision CVs keywords and change formatting to match README a bit
2182            better
2183    
2184            * po/de.po: Update for 0.9
2185    
2186            * test/README: Tweak the wording a little because many tests are
2187            not really unittest.
2188    
2189    2003-08-27  Bernhard Herzog  <[email protected]>
2190    
2191            As preparation for the 0.9 release, switch thuban files to a
2192            non-dev namespace
2193    
2194            * Thuban/Model/save.py (SessionSaver.write_session): Write files
2195            with the http://thuban.intevation.org/dtds/thuban-0.9.dtd
2196            namespace
2197    
2198            * Thuban/Model/load.py (SessionLoader.__init__): Accept the
2199            http://thuban.intevation.org/dtds/thuban-0.9.dtd namespace too
2200    
2201            * test/test_save.py (SaveSessionTest.dtd)
2202            (SaveSessionTest.testEmptySession)
2203            (SaveSessionTest.testSingleLayer)
2204            (SaveSessionTest.testLayerProjection)
2205            (SaveSessionTest.testRasterLayer)
2206            (SaveSessionTest.testClassifiedLayer)
2207            (SaveSessionTest.test_dbf_table)
2208            (SaveSessionTest.test_joined_table)
2209            (SaveSessionTest.test_save_postgis): Update for new namespace
2210    
2211            * test/test_load.py (LoadSessionTest.dtd, TestSingleLayer)
2212            (TestLayerVisibility.file_contents, TestLabels.file_contents)
2213            (TestLayerProjection.file_contents)
2214            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
2215            (TestPostGISLayer.file_contents)
2216            (TestPostGISLayerPassword.file_contents)
2217            (TestLoadError.file_contents, TestLoadError.test): Update for new
2218            namespace
2219    
2220    2003-08-27  Bernhard Herzog  <[email protected]>
2221    
2222            Make the table interface distinguish between row ids (an integer
2223            that uniquely identifies a row) and row ordinals (a simple row
2224            count from 0 to NumRows() - 1)
2225    
2226            * Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
2227            (PostGISTable.RowOrdinalToId): New methods to conver between row
2228            ids and row ordinals
2229            (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
2230            parameter row_is_ordinal to indicate whether the row parameter is
2231            the row id or the ordinal
2232    
2233            * Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
2234            (TransientTableBase.RowOrdinalToId)
2235            (AutoTransientTable.RowIdToOrdinal)
2236            (AutoTransientTable.RowOrdinalToId): Same new methods as in
2237            PostGISTable.
2238            (TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
2239            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
2240            Same new parameter as in PostGISTable.
2241    
2242            * Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
2243            (DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
2244            (MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
2245            (DBFTable.ReadValue, DBFTable.ReadRowAsDict)
2246            (MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
2247            parameter as in PostGISTable.
2248    
2249            * Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
2250            (DataTable.RowOrdinalToId): New methods to convert between row ids
2251            and row ordinals.
2252            (TableGrid.SelectRowById): New method to select a row based on its
2253            ID as opposed to its ordinal
2254            (DataTable.GetValue, TableGrid.OnRangeSelect)
2255            (TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
2256            (QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
2257            (LayerTableFrame.__init__): Convert between row ids and row
2258            ordinals as appropriate
2259    
2260            * test/postgissupport.py (PostGISDatabase.__init__): Add
2261            doc-string.
2262            (PostGISDatabase.initdb): The optional third item in a tuple in
2263            tables is now a (key, value) list with additional arguments to
2264            pass to upload_shapefile
2265            (upload_shapefile): New parameter gid_offset to allow gids that
2266            are not the same as the shapeids in the shapefile
2267            (PostgreSQLServer.get_default_static_data_db): Use the new
2268            gid_offset to make the gids in landmarks 1000 higher than the
2269            shapeids in the shapefile
2270    
2271            * test/test_viewport.py
2272            (TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
2273            new shapeids in the landmarks table
2274    
2275            * test/test_transientdb.py
2276            (TestTransientTable.run_iceland_political_tests)
2277            (TestTransientTable.test_transient_joined_table): Add tests for
2278            the new table methods and new keywords arguments.
2279    
2280            * test/test_postgis_db.py
2281            (TestPostGISTable.test_read_row_as_dict_row_count_mode)
2282            (TestPostGISTable.test_read_value_row_count_mode)
2283            (TestPostGISTable.test_row_id_to_ordinal)
2284            (TestPostGISTable.test_row_oridnal_to_id): New test for the new
2285            table methods and the new arguments
2286            (TestPostGISShapestorePoint.test_shapes_in_region)
2287            (TestPostGISShapestorePoint.test_shape_raw_data)
2288            (TestPostGISShapestorePoint.test_shape_points)
2289            (TestPostGISShapestorePoint.test_shape_shapeid)
2290            (TestPostGISShapestorePoint.test_all_shapes)
2291            (TestPostGISTable.test_simple_query)
2292            (TestPostGISTable.test_simple_query)
2293            (TestPostGISTable.test_simple_query)
2294            (TestPostGISTable.test_read_value)
2295            (TestPostGISTable.test_read_row_as_dict): Adapt to the new
2296            shapeids in the landmarks table
2297    
2298            * test/test_memory_table.py
2299            (TestMemoryTable.test_read_row_as_dict_row_count_mode)
2300            (TestMemoryTable.test_read_value_row_count_mode)
2301            (TestMemoryTable.test_row_id_to_ordinal)
2302            (TestMemoryTable.test_row_oridnal_to_id): New test for the new
2303            table methods and the new arguments
2304    
2305            * test/test_dbf_table.py
2306            (TestDBFTable.test_read_row_as_dict_row_count_mode)
2307            (TestDBFTable.test_read_value_row_count_mode)
2308            (TestDBFTable.test_row_id_to_ordinal)
2309            (TestDBFTable.test_row_oridnal_to_id): New test for the new table
2310            methods and the new arguments
2311    
2312    2003-08-26  Bernhard Herzog  <[email protected]>
2313    
2314            * Thuban/Model/postgisdb.py (PostGISShapeStore.BoundingBox): Use a
2315            more postgis specific but much faster method to get the bounding
2316            box
2317    
2318    2003-08-26  Bernhard Herzog  <[email protected]>
2319    
2320            * Thuban/Model/postgisdb.py (PostGISTable.Title)
2321            (PostGISShapeStore.AllShapes): Add these missing methods.
2322            (PostGISShapeStore.ShapesInRegion): No need to raise
2323            StopIteration. We can simply return
2324    
2325            * test/test_postgis_db.py (TestPostGISTable.test_title)
2326            (TestPostGISShapestorePoint.test_all_shapes): New tests for the
2327            new methods
2328    
2329    2003-08-25  Bernhard Herzog  <[email protected]>
2330    
2331            * Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON.
2332    
2333            * test/test_postgis_db.py (PolygonTests): New class containing
2334            those tests from TestPostGISShapestorePolygon that can also be
2335            used to test MUTLIPOLYGON tables
2336            (TestPostGISShapestorePolygon): Most tests are now in PolygonTests
2337            so derive from that
2338            (TestPostGISShapestoreMultiPolygon): New class with tests for
2339            MUTLIPOLYGON tables
2340    
2341            * test/postgissupport.py (PostGISDatabase.initdb): Allow the
2342            tables argument to have tuples with three items to override the
2343            WKT type used.
2344            (PostgreSQLServer.get_default_static_data_db): Use the above to
2345            create a polygon table with MUTLIPOLYGONs
2346            (point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon)
2347            (arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to
2348            coords_to*
2349            (coords_to_multipolygon): New. Convert to MUTLIPOLYGON
2350            (wkt_converter): New. Map WKT types to converters
2351            (upload_shapefile): New parameter force_wkt_type to use a
2352            different WKT type than the default
2353    
2354    2003-08-25  Bernhard Herzog  <[email protected]>
2355    
2356            * Thuban/UI/application.py
2357            (ThubanApplication.run_db_param_dialog): New. Suitable as a
2358            db_connection_callback. Main difference is that the dialog run
2359            from this method doesn't have a parent so it can be used even when
2360            there is no main window
2361            (ThubanApplication.OpenSession): Use self.run_db_param_dialog if
2362            no db_connection_callback was given. This way the dialog pops up
2363            even when the .thuban file was given as a command line parameter.
2364    
2365    2003-08-25  Bernhard Herzog  <[email protected]>
2366    
2367            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse
2368            before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs
2369            which leads to an effectively frozen X session because the user
2370            can only interact with the dialog but the mouse is still grabbed
2371            by the canvas.
2372            Also, call the tool's Hide method before MouseLeftUp because
2373            MouseLeftUp may change the tool's coordinates.
2374    
2375    2003-08-25  Bernhard Herzog  <[email protected]>
2376    
2377            * Thuban/UI/application.py (ThubanApplication.OpenSession): Catch
2378            LoadCancelled exceptions and handle them by returning immediately.
2379    
2380    2003-08-25  Bernhard Herzog  <[email protected]>
2381    
2382            GUI part of loading sessions with postgis connections which may
2383            require user interaction to get passwords or updated parameters
2384    
2385            * Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a
2386            bit nucer and be more generic.
2387            (DBFrame.OnAdd): Adapt to new DBDialog interface
2388    
2389            * Thuban/UI/application.py (ThubanApplication.OpenSession): New
2390            optional parameter db_connection_callback which is passed to
2391            load_session.
2392    
2393            * Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New.
2394            Suitable as a db_connection_callback
2395            (MainWindow.OpenSession): Use self.run_db_param_dialog as the
2396            db_connection_callback of the application's OpenSession method
2397    
2398    
2399    2003-08-25  Bernhard Herzog  <[email protected]>
2400    
2401            Basic loading of sessions containing postgis connections:
2402    
2403            * Thuban/Model/load.py (LoadError): Add doc-string
2404            (LoadCancelled): New exception class to indicate a cancelled load
2405            (SessionLoader.__init__): Add the db_connection_callback parameter
2406            which will be used by the loader to get updated parameters and a
2407            password for a database connection
2408            (SessionLoader.__init__): Add the new XML elements to the
2409            dispatchers dictionary
2410            (SessionLoader.check_attrs): Two new conversions, ascii to convert
2411            to a byte-string object and idref as a generic id reference
2412            (SessionLoader.start_dbconnection)
2413            (SessionLoader.start_dbshapesource): New. Handlers for the new XML
2414            elements
2415            (load_session): Add the db_connection_callback to pass through the
2416            SessionLoader
2417    
2418            * test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword):
2419            New classes to test loading of sessions with postgis database
2420            connections.
2421    
2422    2003-08-25  Bernhard Herzog  <[email protected]>
2423    
2424            * Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and
2425            replace it and the comment with __BuildDate__ by the Source: and
2426            Id: cvs keywords as used in the other files.
2427    
2428    2003-08-25  Bernhard Herzog  <[email protected]>
2429    
2430            * Thuban/Model/load.py (SessionLoader.check_attrs): Raise a
2431            LoadError when a required attribute is missing. The code used to
2432            be commented out for some reason, but probably should have been
2433            active.
2434    
2435            * test/test_load.py (TestLoadError.test): Test the message in the
2436            LoadError too to make sure it really is about the missing
2437            attribute
2438    
2439    2003-08-22  Bernhard Herzog  <[email protected]>
2440    
2441            * test/test_save.py (SaveSessionTest.test_dbf_table)
2442            (SaveSessionTest.test_joined_table): Add XML validation tests.
2443    
2444    2003-08-22  Bernhard Herzog  <[email protected]>
2445    
2446            Implement saving a session with a postgis connection
2447    
2448            * Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New
2449            elements for database connections and shapestores using db
2450            connections
2451            (session): Add the dbconnections to the content model
2452    
2453            * Thuban/Model/save.py (SessionSaver.write_db_connections): New.
2454            Write the db connections
2455            (SessionSaver.write_session): Call write_db_connections to write
2456            the connection before the data sources
2457            (SessionSaver.write_data_containers): Handle postgis shapestores
2458    
2459            * test/test_save.py (SaveSessionTest.thubanids)
2460            (SaveSessionTest.thubanidrefs): Update for new DTD
2461            (SaveSessionTest.test_save_postgis): New. Test saving a session
2462            with postgis connections
2463    
2464            * Thuban/Model/postgisdb.py (PostGISTable.DBConnection)
2465            (PostGISTable.TableName): New accessor methods for the connection
2466            and table name
2467    
2468            * test/test_postgis_db.py (TestPostGISTable.test_dbconn)
2469            (TestPostGISTable.test_dbname): New methods to test the new
2470            PostGISConnection methods
2471    
2472    2003-08-22  Bernhard Herzog  <[email protected]>
2473    
2474            * Thuban/Model/postgisdb.py (ConnectionError): New exception class
2475            for exceptions occurring when establishing a Database connection
2476            (PostGISConnection.connect): Catch psycopg.OperationalError during
2477            connects and raise ConnectionError.
2478    
2479            * test/test_postgis_db.py (TestPostgisDBExceptions): New class for
2480            tests for database exceptions
2481    
2482    2003-08-22  Bernhard Herzog  <[email protected]>
2483    
2484            Prepare the test suite for tests with required authentication
2485    
2486            * test/postgissupport.py (PostgreSQLServer.__init__): Add instance
2487            variables with two predefined users/passwords, one for the admin
2488            and one for a non-privileged user.
2489            (PostgreSQLServer.createdb): Pass the admin name to initdb and add
2490            the non-privileged user to the database and set the admin password
2491            (PostgreSQLServer.wait_for_postmaster): Use the admin user name.
2492            Better error reporting
2493            (PostgreSQLServer.connection_params)
2494            (PostgreSQLServer.connection_string): New methods to return
2495            information about how to connect to the server
2496            (PostgreSQLServer.execute_sql): New. Convenience method to execute
2497            SQL statements
2498            (PostgreSQLServer.require_authentication): Toggle whether the
2499            server requires authentication
2500            (PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New.
2501            Add or alter users
2502            (PostGISDatabase.initdb): Pass the admin name one the
2503            subprocesses' command lines. Grant select rights on
2504            geometry_columns to everybody.
2505            (upload_shapefile): Use the admin name and password when
2506            connecting. Grant select rights on the new table to everybody.
2507    
2508            * test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the
2509            server's new methods to get the connection parameters.
2510    
2511            * test/test_postgis_session.py (TestSessionWithPostGIS.setUp)
2512            (TestSessionWithPostGIS.test_remove_dbconn_exception): Use the
2513            server's new methods to get the connection parameters.
2514    
2515            * test/test_postgis_db.py
2516            (TestPostGISConnection.test_gis_tables_empty)
2517            (TestPostGISConnection.test_gis_tables_non_empty)
2518            (PostGISStaticTests.setUp): Use the server's new methods to get
2519            the connection parameters.
2520    
2521    2003-08-22  Bernhard Herzog  <[email protected]>
2522    
2523            * Thuban/UI/about.py (About.__init__): Add the psycopg version.
2524    
2525            * Thuban/version.py: Add psycopg version
2526    
2527            * Thuban/Model/postgisdb.py (psycopg_version): New. Return the
2528            version of the psycopg module
2529    
2530    2003-08-22  Bernhard Herzog  <[email protected]>
2531    
2532            * Thuban/UI/dbdialog.py (DBPwdDlg): Removed because it's not used.
2533            (DBFrame.OnEdit): Removed because it's not used and wouldn't work
2534            at the moment. The functionality should probably be implemented
2535            some time, though.
2536            (DBFrame.OnRemove): Display a message if the connection can't be
2537            removed because it's still in use.
2538    
2539    2003-08-22  Jan-Oliver Wagner <[email protected]>
2540    
2541            * Thuban/UI/about.py (About.__init__): split up the huge about
2542            text into elements/lists for easier translation. This fixes bug
2543            https://intevation.de/rt/webrt?serial_num=2058
2544            Also, made some forgotten string available for the i18n.
2545    
2546    2003-08-21  Bernhard Herzog  <[email protected]>
2547    
2548            Make postgis support really optional including insensitive menu
2549            items.
2550    
2551            * Thuban/Model/postgisdb.py (has_postgis_support): New. Return
2552            whether the postgis is supported.
2553    
2554            * Thuban/UI/dbdialog.py: Put the psycopg import into try..except
2555            to make postgis support optional
2556    
2557            * Thuban/UI/mainwindow.py (_has_postgis_support): New. Context
2558            version of Thuban.Model.postgisdb.has_postgis_support
2559            (database_management command): Make it only sensitive if postgis
2560            is supported.
2561    
2562    2003-08-21  Jan-Oliver Wagner <[email protected]>
2563    
2564            * Doc/manual/thuban-manual.xml: Added CVS revision for rev-history.
2565            (section Adding and Removing Layers): Added text and described
2566            multi-selection.
2567            (chapter Extensions): New.
2568    
2569    2003-08-21  Jan-Oliver Wagner <[email protected]>
2570    
2571            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Changed dialog
2572            settings to allow multiple files to load into the map.
2573            Also reduced selection to *.shp as a default.
2574    
2575    2003-08-20  Bernhard Herzog  <[email protected]>
2576    
2577            Add dialogs and commands to open database connections and add
2578            database layers.
2579    
2580            * Thuban/UI/mainwindow.py (MainWindow.DatabaseManagement): New
2581            method to open the database connection management dialog
2582            (MainWindow.AddDBLayer): New method to add a layer from a database
2583            (_has_dbconnections): New helper function to use for sensitivity
2584            (database_management command, layer_add_db command): New commands
2585            that call the above new methods.
2586            (main_menu): Add the new commands to the menu.
2587    
2588            * Thuban/Model/postgisdb.py (PostGISConnection.__init__)
2589            (PostGISConnection.connect): Establish the actual connection in a
2590            separate method and call it in __init__. This makes it easier to
2591            override the behavior in test cases
2592            (PostGISConnection.BriefDescription): New method to return a brief
2593            description for use in dialogs.
2594    
2595            * test/test_postgis_db.py (NonConnection): DB connection that
2596            doesn't actually connect
2597            (TestBriefDescription): New class with tests for the new
2598            BriefDescription method
2599    
2600    2003-08-19  Jan-Oliver Wagner <[email protected]>
2601    
2602            Moved anything from extensions to libraries.
2603    
2604            * libraries: New.
2605    
2606            * libraries/ pyprojection, pyshapelib, shapelib, thuban: New.
2607    
2608            * libraries/pyprojection/ LICENSE, MANIFEST.in, Projection.i,
2609            Projection.py, Projection_wrap.c, setup.py, swighelp.txt: These files have
2610            been moved here from thuban/extensions/pyprojection/
2611            See there in the Attic for the older history.
2612    
2613            * libraries/pyshapelib/ COPYING, ChangeLog, NEWS, README, dbflib.i,
2614            dbflib.py, dbflib_wrap.c, pyshapelib_api.h, pytest.py, setup.py,
2615            shapelib.i, shapelib.py, shapelib_wrap.c, shptreemodule.c: These files
2616            have been moved here from thuban/extensions/pyshapelib/
2617            See there in the Attic for the older history.
2618    
2619            * libraries/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: These
2620            files have been moved here from thuban/extensions/shapelib/
2621            See there in the Attic for the older history.
2622    
2623            * libraries/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
2624            gdalwarp.cpp, wxproj.cpp: These files have been moved here from
2625            thuban/extensions/thuban/
2626            See there in the Attic for the older history.
2627    
2628            * MANIFEST.in, setup.cfg, setup.py: renamed extensions to libraries.
2629    
2630            * extensions/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
2631            gdalwarp.cpp, wxproj.cpp: Moved to libraries/thuban.
2632    
2633            * extensions/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c:
2634            Moved to libraries/shapelib.
2635    
2636            * extensions/pyshapelib/ COPYING, NEWS, dbflib.py, pytest.py,
2637            shapelib.py, README, dbflib_wrap.c, setup.py, shapelib_wrap.c,
2638            ChangeLog, dbflib.i, pyshapelib_api.h, shapelib.i, shptreemodule.c:
2639            Moved to libraries/pyshapelib.
2640    
2641            * extensions/pyprojection/ MANIFEST.in, Projection.py, setup.py,
2642            LICENSE, Projection.i, Projection_wrap.c, swighelp.txt:
2643            Moved to libraries/pyprojection.
2644    
2645            * extensions/ pyprojection, pyshapelib, shapelib, thuban: Removed.
2646    
2647            * extensions: Removed.
2648    
2649    2003-08-19  Bernhard Herzog  <[email protected]>
2650    
2651            * test/test_viewport.py (ViewPortTest): We don't use the
2652            facilities of FileTestMixin so don't derive from it.
2653            (TestViewportWithPostGIS): New class with tests for using a
2654            viewport on a map with postgis layers.
2655    
2656    2003-08-19  Bernhard Herzog  <[email protected]>
2657    
2658            Add the db connection management to the session.
2659    
2660            * Thuban/Model/session.py (Session.__init__): New instance
2661            variable db_connections
2662            (Session.AddDBConnection, Session.DBConnections)
2663            (Session.HasDBConnections, Session.CanRemoveDBConnection)
2664            (Session.RemoveDBConnection): New methods to manage and query the
2665            db connections managed by the session
2666            (Session.OpenDBShapeStore): New method to open a shapestore from a
2667            db connection
2668    
2669            * Thuban/Model/messages.py (DBCONN_REMOVED, DBCONN_ADDED): New
2670            messages for the db connection handling in the session
2671    
2672            * test/test_postgis_session.py: New. test cases for the session's
2673            db connection handling with postgis connections
2674    
2675    2003-08-19  Bernhard Herzog  <[email protected]>
2676    
2677            Add very basic postgis database support and the corresponding test
2678            cases. The test cases require a PostgreSQL + postgis installation
2679            but no existing database. The database will be created
2680            automatically by the test cases
2681    
2682            * test/README: Add note about skipped tests and the requirements
2683            of the postgis tests.
2684    
2685            * Thuban/Model/postgisdb.py: New. Basic postgis database support.
2686    
2687            * test/test_postgis_db.py: New. Test cases for the postgis
2688            support.
2689    
2690            * Thuban/Model/wellknowntext.py: New. Parser for well-known-text
2691            format
2692    
2693            * test/test_wellknowntext.py: New. Test cases for the
2694            wellknowntext parser
2695    
2696            * test/postgissupport.py: New. Support module for tests involving
2697            a postgis database.
2698    
2699            * test/support.py (execute_as_testsuite): Shut down the postmaster
2700            if it's still running after the tests
2701    
2702            * Thuban/Model/data.py (RAW_WKT): New constant for raw data in
2703            well known text format
2704    
2705    2003-08-19  Jan-Oliver Wagner <[email protected]>
2706    
2707            * Examples/simple_extensions/hello_world.py: New. Raises a Hello World
2708            message dialog.
2709    
2710    2003-08-18  Bernhard Herzog  <[email protected]>
2711    
2712            * test/support.py (ThubanTestResult.printErrors): Indent the
2713            reason for the skips in the output to make it a bit more readable.
2714            (execute_as_testsuite): New helper function to run a test suite
2715            and print some more information.
2716            (run_tests): Use execute_as_testsuite to run the tests
2717    
2718            * test/runtests.py (main): Use execute_as_testsuite to run the
2719            tests
2720    
2721    2003-08-18  Bernhard Herzog  <[email protected]>
2722    
2723            Fix some bugs in Thuban and the test suite that were uncovered by
2724            changes introduced in Python 2.3:
2725    
2726            * Thuban/Model/table.py (DBFTable.__init__): Make sure the
2727            filename is an absolute name
2728    
2729            * Thuban/Model/layer.py (RasterLayer.__init__): Make sure the
2730            filename is an absolute name
2731    
2732            * test/test_save.py (SaveSessionTest.testRasterLayer): Use a
2733            unique filename to save to and use the correct relative filename
2734            in the expected output.
2735            (SaveSessionTest.test_dbf_table): Use the correct relative
2736            filename in the expected output.
2737    
2738            * test/test_layer.py (TestLayer.test_raster_layer): Update the
2739            test to check whether the filename is absolute.
2740    
2741    2003-08-18  Jan-Oliver Wagner <[email protected]>
2742    
2743            * Thuban/UI/about.py (About.__init__): Added Silke Reimer.
2744    
2745    2003-08-15  Bernhard Herzog  <[email protected]>
2746    
2747            Change the way shapes are returned by a shape store. The
2748            ShapesInRegion method returns an iterator over actual shape
2749            objects instead of a list of shape ids.
2750    
2751            * Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
2752            id.
2753            (ShapefileStore.ShapesInRegion): Return an iterator over the
2754            shapes which yields shape objects instead of returning a list of
2755            shape ids
2756            (ShapefileStore.AllShapes): New. Return an iterator over all
2757            shapes in the shape store
2758            (DerivedShapeStore.AllShapes): New. Like in ShapefileStore
2759    
2760            * Thuban/Model/layer.py (Layer.ShapesInRegion): Update
2761            doc-string.
2762    
2763            * Thuban/UI/baserenderer.py
2764            (BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
2765            layer_shapes and make it return an iterator containg shapes
2766            instead of a list of ids.
2767            (BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
2768            layer_shapes() change
2769    
2770            * Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
2771            (ScreenRenderer.layer_shapes): Rename as in BaseRenderer
2772    
2773            * Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
2774            changes in the ShapesInRegion return value.
2775            (ViewPort._get_hit_tester): Remove commented out code
2776    
2777            * test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
2778            new return value.
2779            (SimpleShapeStore.AllShapes): New. Implement this method too.
2780    
2781            * test/test_layer.py (TestLayer.test_arc_layer)
2782            (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
2783            (TestLayer.test_point_layer_with_projection)
2784            (TestLayer.test_derived_store): Adapt to changes in the
2785            ShapesInRegion return value.
2786    
2787            * test/test_shapefilestore.py
2788            (TestShapefileStoreArc.test_shapes_in_region)
2789            (TestShapefileStorePolygon.test_shapes_in_region)
2790            (TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
2791            in the ShapesInRegion return value.
2792            (TestShapefileStorePoint.test_all_shapes)
2793            (TestShapefileStoreArc.test_shape_shapeid): New tests for the new
2794            methods
2795    
2796            * test/test_derivedshapestore.py
2797            (TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
2798            the ShapesInRegion return value.
2799            (TestDerivedShapeStore.test_all_shapes)
2800            (TestDerivedShapeStore.test_shape_shapeid): New tests for the new
2801            methods
2802    
2803    2003-08-15  Bernhard Herzog  <[email protected]>
2804    
2805            Make the renderers deal correctly with raw vs. python level
2806            representation of shape geometries
2807    
2808            * Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer):
2809            Return a flag useraw in addition to the callable and the parameter
2810            to indicate whether the callable can deal with the raw shape data
2811            or uses the higher level python lists of coordinates. The callable
2812            now should accept either the raw data or the return value of the
2813            shape's Points() method.
2814            (BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer
2815            change
2816            (BaseRenderer.projected_points): Instead of the shape id use the
2817            points list as parameter.
2818            (BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape)
2819            (BaseRenderer.draw_point_shape): Adapt to projected_points()
2820            change and accept the points list as parameter instead of the
2821            shape id.
2822    
2823            * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return
2824            the useraw flag as required by the BaseRenderer
2825            (ScreenRenderer.draw_shape_layer): Adapt to low-level renderer
2826            changes.
2827    
2828            * test/test_baserenderer.py
2829            (TestBaseRenderer.test_point_with_classification): New test for
2830            rendering a map with classifications.
2831    
2832    2003-08-15  Bernhard Herzog  <[email protected]>
2833    
2834            * Thuban/UI/viewport.py (ViewPort.find_shape_at)
2835            (ViewPort._find_shape_in_layer, ViewPort._find_shape_in_layer)
2836            (ViewPort._get_hit_tester, ViewPort.projected_points)
2837            (ViewPort._hit_point, ViewPort._hit_arc, ViewPort._hit_polygon)
2838            (ViewPort._find_label_at): Split the find_shape_at method into
2839            several new methods and use the functions in the hit-test module.
2840    
2841            * Thuban/UI/hittest.py: New module with Python-level hit-testing
2842            functions
2843    
2844            * test/test_hittest.py: New. Test for the new hittest module
2845    
2846    2003-08-15  Bernhard Herzog  <[email protected]>
2847    
2848            * Thuban/Model/layer.py (Layer.ShapesInRegion): Apply the layer
2849            projection to all corners of the bounding box to get a better
2850            approximation of the projected bounding box
2851    
2852            * test/test_layer.py (TestLayer.test_point_layer_with_projection):
2853            New. Test coordinate handling of a layer with a projection.
2854            Catches the bug fixed in Layer.ShapesInRegion
2855    
2856    2003-08-15  Bernhard Herzog  <[email protected]>
2857    
2858            Move some of the mock objects in test_baserenderer into their own
2859            module so they can easily be used from other tests
2860    
2861            * test/mockgeo.py: New test helper module with some mock objects
2862            for geometry related things like shapes, shapestores and
2863            projections.
2864    
2865            * test/test_mockgeo.py: New. Tests for the new helper module
2866    
2867            * test/test_baserenderer.py: Some of the mock-objects are in
2868            mockgeo now.
2869    
2870    2003-08-12  Jan-Oliver Wagner <[email protected]>
2871    
2872            * Thuban/UI/about.py (About.__init__): Added Bj�rn Broscheit.
2873    
2874    2003-08-12  Bernhard Herzog  <[email protected]>
2875    
2876            * po/de.po: New. German translations by Bjoern Broscheit
2877    
2878    2003-08-12  Bernhard Herzog  <[email protected]>
2879    
2880            * Thuban/UI/projdialog.py (UnknownProjPanel._DoLayout): Translated
2881            strings have to be one string literal.
2882    
2883    2003-08-11  Bernhard Herzog  <[email protected]>
2884    
2885            * test/support.py (FloatComparisonMixin.assertPointListEquals):
2886            New. This method was used in various derived classes, but it's
2887            better to have it here.
2888    
2889            * test/test_shapefilestore.py
2890            (ShapefileStoreTests.assertPointListEquals): Removed. It's now in
2891            FloatComparisonMixin
2892    
2893            * test/test_layer.py (TestLayer.assertPointListEquals): Removed.
2894            It's now in FloatComparisonMixin
2895    
2896            * test/test_derivedshapestore.py
2897            (TestDerivedShapeStore.assertPointListEquals): Removed. It's now
2898            in FloatComparisonMixin
2899    
2900    2003-08-11  Bernhard Herzog  <[email protected]>
2901    
2902            * Thuban/UI/join.py (JoinDialog.OnJoin): Add missing space to
2903            error message
2904    
2905    2003-08-08  Jan-Oliver Wagner <[email protected]>
2906    
2907            * Doc/manual/thuban-manual.xml: Now use authorgroup. Added revhistory
2908            with version number.
2909            Changed title to reflect version number of Thuban.
2910    
2911    2003-08-08  Jan-Oliver Wagner <[email protected]>
2912    
2913            * Thuban/UI/about.py (About.__init__): Reworked the hall of fame. Now
2914            the list corresponds to the "About" web page.
2915    
2916    2003-08-08  Bernhard Herzog  <[email protected]>
2917    
2918            * Thuban/UI/projdialog.py (UTMProposeZoneDialog.dialogLayout):
2919            Make sure translated strings are recognized as one string literal.
2920    
2921            * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog.dialogLayout):
2922            Make sure translated strings are recognized as one string literal.
2923    
2924            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Make sure
2925            translated strings are recognized as one string literal.
2926    
2927            * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
2928            sure translated strings are recognized as one string literal.
2929    
2930    2003-08-07  Bernhard Herzog  <[email protected]>
2931    
2932            * Thuban/Model/data.py (DerivedShapeStore.RawShapeFormat): New.
2933            Simply delegates to the original shapestore.
2934    
2935            * test/test_derivedshapestore.py
2936            (TestDerivedShapeStore.test_raw_format): New. Test case for
2937            DerivedShapeStore.RawShapeFormat
2938    
2939    2003-08-07  Bernhard Herzog  <[email protected]>
2940    
2941            Add raw data interface to shape objects.
2942    
2943            * Thuban/Model/data.py (ShapefileShape, Shape): Rname the shape
2944            class to ShapefileShape which now holds shapefile specific
2945            information.
2946            (ShapefileShape.compute_bbox): Simplified to not cache any
2947            information. The way this method is used that shouldn't matter
2948            performance wise.
2949            (ShapefileShape.RawData): New. Return the shapeid which is the raw
2950            data format for shapes from shapefiles.
2951            (ShapefileStore.RawShapeFormat): New. Return the raw datatype used
2952            in the shape objects returned by a shapestore. For a
2953            ShapefileStore this is always RAW_SHAPEFILE.
2954            (RAW_PYTHON, RAW_SHAPEFILE): Constants for the RawShapeFormat
2955            method.
2956    
2957            * test/test_shapefilestore.py
2958            (TestShapefileStore.test_raw_format): New test to test the raw
2959            format feature of shapes.
2960    
2961            * Thuban/Model/layer.py: Remove the unused import of Shape from
2962            data. It was only there for interface compatibility but it's not
2963            used inside of Thuban and the generic Shape class has gone away.
2964    
2965            * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Check
2966            the raw data format and only use an optimized version of its a
2967            shapefile.
2968    
2969    2003-08-07  Bernhard Herzog  <[email protected]>
2970    
2971            * test/test_baserenderer.py (SimpleShape): Shape class for the
2972            tests.
2973            (SimpleShapeStore.Shape): Use SimpleShape instead of
2974            Thuban.Model.data.Shape to make the tests independed of the coming
2975            changes.
2976    
2977    2003-08-07  Bernhard Herzog  <[email protected]>
2978    
2979            * test/support.py (SkipTest, ThubanTestResult, ThubanTestRunner)
2980            (ThubanTestProgram): New classes that extend the respective
2981            classes from unittest. These new version support skipping tests
2982            under certain expected conditions. In the Thuban test suite we
2983            uses this for tests that require the optional gdal support.
2984            (run_tests): Use ThubanTestProgram instead of the unittest.main()
2985    
2986            * test/runtests.py (main): Use the new ThubanTestRunner instead of
2987            the normal one from unittest
2988    
2989            * test/test_layer.py (TestLayer.test_raster_layer): If this test
2990            is not run because gdal support isn't available report this to the
2991            runner.
2992    
2993            * test/test_baserenderer.py
2994            (TestBaseRenderer.test_raster_no_projection): Do not run this test
2995            if gdal support isn't available and report this to the runner.
2996    
2997    2003-08-06  Bernhard Herzog  <[email protected]>
2998    
2999            Rearrange the renderers a bit, partly in preparation for changes
3000            required for the postgis merge, partly to make it more testable.
3001            Also make the representation of coordinates in Shapes more
3002            consistent.
3003    
3004            * Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
3005            this class is now in BaseRenderer. This class is now practically
3006            only a specialization of BaseRenderer for rendering to an actual
3007            wx DC.
3008            (ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
3009            to get the shapetype specific rendering functions.
3010    
3011            * Thuban/UI/baserenderer.py: New file with the basic rendering
3012            logic. The code in this file is completely independend of wx.
3013            (BaseRenderer): Class with the basic rendering logic
3014    
3015            * test/test_baserenderer.py: New. Test cases for BaseRenderer
3016    
3017            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
3018            error_on_redraw to guard agains endless loops and stack overflows
3019            when there's a bug in the rendering code that raises exceptions.
3020            (MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
3021            rendering into a separate method _do_redraw so that error handling
3022            is a bit easier. When an exception occurs, set error_on_redraw to
3023            true. When it's true on entry to OnIdle do nothing and return
3024            immediately.
3025    
3026            * Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a
3027            Shape object will always have the coordinates as a list of list of
3028            coordinate pairs (tuples).
3029            (Shape.compute_bbox): Adapt to new representation.
3030    
3031            * Thuban/UI/viewport.py (ViewPort.find_shape_at)
3032            (ViewPort.LabelShapeAt): Adapt to new coordinate representation in
3033            Shape objects.
3034    
3035            * test/test_shapefilestore.py
3036            (ShapefileStoreTests.assertFloatTuplesEqual)
3037            (ShapefileStoreTests.assertPointListEquals): Rename to
3038            assertPointListEquals and change purpose to checking equality of
3039            the lists returned by Shape.Points().
3040            (TestShapefileStoreArc.test_shape)
3041            (TestShapefileStorePolygon.test_shape)
3042            (TestShapefileStorePoint.test_shape): Use the new
3043            assertPointListEquals instead of assertFloatTuplesEqual
3044    
3045            * test/test_layer.py (TestLayer.assertFloatTuplesEqual)
3046            (TestLayer.assertPointListEquals): Rename to assertPointListEquals
3047            and change purpose to checking equality of the lists returned by
3048            Shape.Points().
3049            (TestLayer.test_arc_layer, TestLayer.test_arc_layer)
3050            (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
3051            (TestLayer.test_derived_store): Use the new assertPointListEquals
3052            instead of assertFloatTuplesEqual
3053    
3054            * test/test_derivedshapestore.py
3055            (TestDerivedShapeStore.assertFloatTuplesEqual)
3056            (TestDerivedShapeStore.assertPointListEquals): Rename to
3057            assertPointListEquals and change purpose to checking equality of
3058            the lists returned by Shape.Points().
3059            (TestDerivedShapeStore.test_shape): Use the new
3060            assertPointListEquals instead of assertFloatTuplesEqual
3061    
3062    2003-08-06  Jan-Oliver Wagner <[email protected]>
3063    
3064            * Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for
3065            a bounding box. A dialog is raised in case, no bounding box
3066            is found. This fixes bug #2043:
3067            https://intevation.de/rt/webrt?serial_num=2043
3068    
3069    2003-08-05  Bernhard Herzog  <[email protected]>
3070    
3071            * Thuban/Model/color.py (Color.__repr__): Make the repr of a color
3072            object look like a Color instantiation. Formerly it looked like a
3073            tuple.
3074    
3075            * test/test_color.py (TestColor.test_repr)
3076            (TestColor.test_equality, TestColor.test_inequality): New. test
3077            some more apects of the Color class
3078            (TestTransparent.test_repr, TestTransparent.test_hex)
3079            (TestTransparent.test_equality): New. Test cases for the
3080            Transparent object.
3081    
3082    2003-08-04  Jan-Oliver Wagner <[email protected]>
3083    
3084            * Doc/manual/thuban-manual.xml: a number of small improvements.
3085            The resulting file is the version submitted for GREAT-ER II.
3086    
3087    2003-08-01  Bernhard Herzog  <[email protected]>
3088    
3089            * Thuban/UI/resource.py, Thuban/UI/projdialog.py,
3090            Thuban/UI/join.py, Thuban/UI/classgen.py, Thuban/UI/about.py,
3091            Thuban/Model/resource.py: Insert cvs keywords and doc-strings.
3092    
3093            * Thuban/UI/common.py: Insert cvs keywords and doc-strings.
3094            (Color2wxColour, wxColour2Color, ThubanBeginBusyCursor)
3095            (ThubanEndBusyCursor): Add doc-strings
3096    
3097    2003-08-01  Bernhard Herzog  <[email protected]>
3098    
3099            First step towards PostGIS integration. More abstraction by movin
3100            more code from the layer to the shapestore. More methods of the
3101            layer are now simply delegated to the equivalent method of the
3102            shapestore. The SHAPETYPE_* constants are now in data not in
3103            layer.
3104    
3105            * Thuban/Model/data.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
3106            (SHAPETYPE_POINT, Shape): Move these constants and classes from
3107            layer.py to data.py
3108            (ShapefileStore.__init__): More Initialization for the new methods
3109            and functionality.
3110            (ShapefileStore.ShapeType, ShapefileStore.NumShapes)
3111            (ShapefileStore.BoundingBox, ShapefileStore.ShapesInRegion)
3112            (ShapefileStore.Shape): New methods that were formerly implemented
3113            in the layer.
3114            (DerivedShapeStore.Shape, DerivedShapeStore.ShapesInRegion)
3115            (DerivedShapeStore.ShapeType, DerivedShapeStore.NumShapes)
3116            (DerivedShapeStore.BoundingBox): New. DerivedShapeStore
3117            equivalents of the new shape methods. These versions are simply
3118            delegated to the original shapstore.
3119    
3120            * Thuban/Model/layer.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
3121            (SHAPETYPE_POINT, Shape): Removed. They're now in data.py
3122            (Layer.SetShapeStore): Removed the initializatin of instance
3123            variables that were needed for the stuff that's now in
3124            ShapefileStore
3125            (Layer.BoundingBox, Layer.NumShapes, Layer.ShapeType)
3126            (Layer.Shape, Layer.ShapesInRegion): Simply delegate to the
3127            shapestore.
3128    
3129            * Thuban/UI/classifier.py, Thuban/UI/renderer.py,
3130            Thuban/UI/viewport.py: Import the SHAPETYPE_* constants from data
3131            instead of layer.
3132    
3133            * test/test_shapefilestore.py: New. Tests for ShapefileStore.
3134    
3135            * test/test_derivedshapestore.py: New. Tests for DerivedShapeStore.
3136    
3137            * test/test_layer.py: Import the SHAPETYPE_* constants from data
3138            instead of layer.
3139            (TestLayer.test_derived_store): Remove the test for the exception
3140            when instantiating the DerivedShapeStore with an incompatible
3141            table which is now in test_derivedshapestore.py. Add some more
3142            tests of the layer methods to determine whether they work for a
3143            DerivedShapeStore as well.
3144    
3145    2003-07-31  Jonathan Coles   <[email protected]>
3146    
3147            * Doc/manual/thuban-manual.xml: Fix the list of required packages
3148            by just listing the name and where they can be found.
3149    
3150    2003-07-31  Frank Koormann   <[email protected]>
3151    
3152            * Doc/manual/thuban-manual.xml:
3153            Changed the screenshot elements to figure.
3154            Changed some variablelist elements to itemizedlist.
3155            Added section on GDAL formats.
3156    
3157    2003-07-31  Jonathan Coles   <[email protected]>
3158    
3159            * Doc/manual/thuban-manual.xml: Added a few sentences about
3160            the Fix Border Color option when generating classes.
3161    
3162    2003-07-30  Jonathan Coles   <[email protected]>
3163    
3164            * Thuban/Model/classgen.py: Add docstrings. Rename specific
3165            Ramp instances to use lower_case_style.
3166    
3167            * Thuban/UI/classgen.py: Use renamed Ramp instances.
3168            
3169            * Thuban/UI/classifier.py: Add docstrings.
3170    
3171            * Thuban/UI/dock.py: Add docstrings.
3172    
3173            * test/test_classgen.py: Use renamed Ramp instances.
3174    
3175    2003-07-30  Bernhard Herzog  <[email protected]>
3176    
3177            * Thuban/Lib/connector.py (QueueingPublisher): Removed. This class
3178            was never used in Thuban.
3179    
3180    2003-07-30  Bernhard Herzog  <[email protected]>
3181    
3182            * Thuban/UI/join.py (JoinDialog.__init__): Use the table's Title()
3183            method directly instead of going through the transient_table
3184            method. This faster because transient_table may force the copy of
3185            a DBF file into the transient database and setting a table's title
3186            doesnm't affect the title of the associated transient table, so
3187            this fixes RT #2042
3188    
3189            * Thuban/UI/main.py (__version__): Don't import the already
3190            removed show_exception_dialog.
3191    
3192    2003-07-29  Jonathan Coles   <[email protected]>
3193    
3194            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
3195            Put back this method and remove the equivalent function since we
3196            are setting the exception hook from within this class (OnInit).
3197    
3198    2003-07-29  Jonathan Coles   <[email protected]>
3199    
3200            * Doc/manual/images/5_2_custom_ramp.png,
3201            Doc/manual/images/5_2_quantiles.png,
3202            Doc/manual/images/5_2_uniform_dist.png,
3203            Doc/manual/images/5_2_unique_values.png,
3204            Doc/manual/images/8_int_error.png: New screen shots.
3205    
3206            * Doc/manual/thuban-manual.xml: Fixed typos and wording, clarified
3207            some points, and added more screen shots.
3208    
3209    2003-07-29  Bernhard Herzog  <[email protected]>
3210    
3211            * Thuban/Model/data.py: Remove the now unused import of warnings
3212    
3213    2003-07-29  Bernhard Herzog  <[email protected]>
3214    
3215            * Thuban/Model/data.py (SimpleStore): Removed. This class has been
3216            deprecated since before the 0.8 release and isn't used in Thuban
3217            itself anymore.
3218    
3219            * Thuban/Model/transientdb.py: Remove some unnecessary imports
3220    
3221    2003-07-29  Jonathan Coles   <[email protected]>
3222    
3223            * Thuban/UI/application.py (ThubanApplication.OnInit): set the
3224            python exception hook here so that we are sure to catch any
3225            Thuban exception that happen during initialization.
3226    
3227            * Thuban/UI/main.py (main): Don't set the exception hook here,
3228            it will get set in ThubanApplication.OnInit.
3229    
3230    2003-07-29  Jonathan Coles   <[email protected]>
3231                                                                                
3232            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
3233            Removed and called it show_exception_dialog() so that the exception
3234            handler can be set before the class is created.
3235                                                                                
3236            * Thuban/UI/main.py (main): Install the exception handler before
3237            a ThubanApplication is created.
3238                                                                                    
3239    2003-07-29  Bernhard Herzog  <[email protected]>
3240    
3241            * po/it.po: New. Italian translation by Maurizio Napolitano
3242    
3243            * po/ru.po: New. Russian translation by Alex Shevlakov
3244    
3245    2003-07-29  Frank Koormann   <[email protected]>
3246    
3247            * Doc/manual/thuban-manual.xml: Extended section on supported
3248            projections.
3249            
3250    2003-07-29  Frank Koormann   <[email protected]>
3251    
3252            * Doc/manual/thuban-manual.xml: gaspell-checked.
3253    
3254    2003-07-29  Jonathan Coles   <[email protected]>
3255    
3256            * Doc/manual/images/3_5_legend.png: Added border to improve look
3257            on white background.
3258    
3259    2003-07-29  Jonathan Coles   <[email protected]>
3260    
3261            * Doc/manual/thuban-manual.xml: Fixed grammar and typos. Added
3262            descriptions for the legend toolbar.
3263    
3264            * Doc/manual/images/4_2_raster_layer_properties.png: Removed
3265            cursor from dialog box.
3266    
3267    2003-07-28  Jonathan Coles   <[email protected]>
3268    
3269            * Doc/manual/thuban-manual.xml: More screenshots and more chapters.
3270    
3271            * Doc/manual/images/2_4_session_tree.png,
3272            Doc/manual/images/3_5_legend.png, Doc/manual/images/3_rename_map.png,
3273            Doc/manual/images/4_2_layer_properties.png,
3274            Doc/manual/images/4_2_raster_layer_properties.png,
3275            Doc/manual/images/5_3_genclass.png,
3276            Doc/manual/images/5_classification.png,
3277            Doc/manual/images/6_projection.png,
3278            Doc/manual/images/7_1_table_view.png,
3279            Doc/manual/images/7_2_5_join.png: New screenshots.
3280    
3281    2003-07-24  Jonathan Coles   <[email protected]>
3282    
3283            * Doc/manual/thuban-manual.xml: Chapter on Projection Management.
3284    
3285    2003-07-24  Jonathan Coles   <[email protected]>
3286    
3287            * Doc/manual/thuban-manual.xml: Added EPS images and wrote
3288            chapter on Layer Management.
3289    
3290            * Doc/manual/Makefile: New. Makefile to generate all formats for the
3291            manual and images.
3292    
3293    2003-07-24  Bernhard Herzog  <[email protected]>
3294    
3295            * Thuban/Model/range.py, Thuban/version.py: Remove the #! line as
3296            it annoys lintian which warns about these files not being
3297            executable. The #! isn't necessary here since if you absolutely
3298            must execute them you can always say "python <filename>".
3299    
3300            * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Remove
3301            superfluous code to set brush and pen for point shapes
3302    
3303            * Thuban/UI/viewport.py: Remove commented out code that wouldn't
3304            belong in viewport anyway
3305    
3306    2003-07-24  Frank Koormann   <[email protected]>
3307    
3308            * Doc/manual/thuban-manual.xml: Added section on table management.
3309    
3310    2003-07-24  Bernhard Herzog  <[email protected]>
3311    
3312            * test/runtests.py (main): Recognize the long "verbose" option
3313            correctly.
3314    
3315    2003-07-22  Jonathan Coles   <[email protected]>
3316    
3317            * Doc/manual/thuban-manual.xml: Continue to write first revision
3318            of the manual.
3319    
3320            * Thuban/UI/renderer.py (MapRenderer.render_map): Wrap method
3321            with Begin/EndDrawing() calls to ensure we aren't doing to
3322            many updates to the dc during rendering.
3323            (ScreenRenderer.draw_shape_layer): self.draw_point_shape takes
3324            a pen and brush argument so they need to be passed to the function.
3325    
3326            * Thuban/UI/viewport.py (ViewPort.calc_min_max_scales): New.
3327            Calculates the minimum and maximum scale values. Factored out
3328            of set_view_transform so that it could be used to zoom all the
3329            way into a single point.
3330            (ViewPort.set_view_transform): Call calc_min_max_scales().
3331            (ViewPort.FitSelectedToWindow): Zoom to the maximum scale
3332            if only a single point is selected.
3333    
3334            * Doc/manual/images/1_2_legend_close.png,
3335            Doc/manual/images/1_2_legend_dock.png,
3336            Doc/manual/images/1_2_mainwindow.png,
3337            Doc/manual/images/1_2_mainwindow.ps,
3338            Doc/manual/images/1_2_mainwindow.sk,
3339            Doc/manual/images/3_2_fullextent.png,
3340            Doc/manual/images/3_2_fulllayerextent.png,
3341            Doc/manual/images/3_2_fullshapeextent.png,
3342            Doc/manual/images/3_2_pan.png,
3343            Doc/manual/images/3_2_zoomin.png,
3344            Doc/manual/images/3_2_zoomout.png,
3345            Doc/manual/images/3_3_identify.png,
3346            Doc/manual/images/3_3_label.png,
3347            Doc/manual/images/3_5_invisible.png,
3348            Doc/manual/images/3_5_movedown.png,
3349            Doc/manual/images/3_5_moveup.png,
3350            Doc/manual/images/3_5_props.png,
3351            Doc/manual/images/3_5_tobottom.png,
3352            Doc/manual/images/3_5_totop.png,
3353            Doc/manual/images/3_5_visible.png: New. Images for the documentation.
3354    
3355    2003-07-18  Bernhard Herzog  <[email protected]>
3356    
3357            * Thuban/UI/messages.py (MAP_REPLACED): New message.
3358    
3359            * Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED
3360            after the new map has been assigned
3361    
3362            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages):
3363            Delegate MAP_REPLACED to the canvas too
3364            (MainWindow.prepare_new_session): Removed. Thanks to the new
3365            MAP_REPLACED message it's no longer needed
3366            (MainWindow.OpenSession, MainWindow.NewSession):
3367            prepare_new_session has been removed.
3368    
3369            * Thuban/UI/classifier.py (Classifier.__init__): Subscribe to
3370            MAP_REPLACED so that we can close the dialog if a new map is set.
3371            (Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED
3372            (Classifier.map_replaced): Handle MAP_REPLACED by closing the
3373            dialog
3374    
3375            * test/test_viewport.py (SimpleViewPortTest)
3376            (SimpleViewPortTest.test_default_size): Add doc-strings
3377            (ViewPortTest.setUp): Bind map to self.map so we can use it in
3378            tests. Subscribe to MAP_REPLACED messages too.
3379            (ViewPortTest.tearDown): No need to explicitly unsubscribe
3380            (ViewPortTest.test_set_map): New test for the SetMap method.
3381    
3382    2003-07-18  Bernhard Herzog  <[email protected]>
3383    
3384            * test/test_viewport.py (SimpleViewPortTest.test_default_size):
3385            Move this test from ViewPortTest.setUp to this new separate test
3386            case. setUp is not the place for the actual tests.
3387            (ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
3388            more of the test from setUp to the new test test_inital_settings.
3389            (ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
3390            (ViewPortTest.test_proj_conv): Split test_proj_conv into
3391            test_win_to_proj and test_proj_to_win and make the tests easier to
3392            understand
3393            (ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
3394            (ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
3395            (ViewPortTest.test_unprojected_rect_around_point)
3396            (ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
3397            Reformat to increase readability.
3398    
3399    2003-07-18  Bernhard Herzog  <[email protected]>
3400    
3401            * Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.
3402    
3403    2003-07-18  Bernhard Herzog  <[email protected]>
3404    
3405            * test/runtests.py: The test suite can now be run without an X
3406            connection. To make sure this remains true, remove the DISPLAY
3407            environment variable so that an error occurs if the wxGTK is
3408            imported accidentally
3409    
3410    2003-07-18  Bernhard Herzog  <[email protected]>
3411    
3412            * Thuban/UI/viewport.py: Remove unused imports
3413    
3414            * Thuban/UI/view.py: Remove unused imports
3415    
3416    2003-07-18  Bernhard Herzog  <[email protected]>
3417    
3418            * test/test_export.py Remove unused imports. The OutputTransform
3419            function is now in viewport.py and is called output_transform
3420            (TestScalebar.test_output_transform)
3421            (TestScalebar.test_OutputTransform): Renamed to
3422            test_output_transform and updated to use output_transform instead
3423            of OutputTransform
3424    
3425            * Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
3426            renamed.
3427            (MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
3428            renamed to output_transform
3429    
3430            * Thuban/UI/viewport.py (OutputTransform, output_transform):
3431            Rename to output_transform
3432    
3433    2003-07-18  Bernhard Herzog  <[email protected]>
3434    
3435            * Thuban/Model/layer.py (Layer.__init__): Rename
3436            classificationField to classificatin_column and init it here so
3437            that it can be used in SetClassificationColumn
3438            (Layer.GetClassificationColumn, Layer.GetClassificationField):
3439            Rename to GetClassificationColumn.
3440            (Layer.SetClassificationColumn, Layer.SetClassificationField):
3441            Rename to SetClassificationColumn and issue a LAYER_CHANGED
3442            message if the column changes.
3443            (Layer._classification_changed, Layer.ClassChanged): Rename to
3444            _classification_changed. Update the callers.
3445            (Layer.SetShapeStore): Further field->column renames.
3446    
3447            * Thuban/Model/load.py (SessionLoader.start_classification)
3448            (SessionLoader.start_clpoint): Updates because of
3449            field->column method name changes in the Layer class
3450    
3451            * Thuban/Model/save.py (SessionSaver.write_classification): Updates
3452            because of field->column method name changes in the Layer class
3453    
3454            * Thuban/UI/classifier.py (Classifier.__init__)
3455            (Classifier._OnTry, Classifier._OnRevert): Updates because of
3456            field->column method name changes in the Layer class
3457    
3458            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
3459            because of field->column method name changes in the Layer class
3460    
3461            * Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
3462            of field->column method name changes in the Layer class
3463    
3464            * test/test_save.py (SaveSessionTest.testClassifiedLayer)
3465            (SaveSessionTest.testClassifiedLayer): Update because of
3466            field->column method name changes in the Layer class
3467    
3468            * test/test_layer.py (SetShapeStoreTests.setUp)
3469            (SetShapeStoreTests.test_sanity): Update because of field->column
3470            method name changes in the Layer class
3471            (TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
3472            (TestLayerModification.test_sanity)
3473            (TestLayerModification.test_initial_settings): remove unsued code
3474            and rename to test_sanity.
3475            (TestLayerModification.test_set_classification): New test for
3476            SetClassification and SetClassificationField.
3477    
3478    2003-07-18  Bernhard Herzog  <[email protected]>
3479    
3480            * test/test_classgen.py (TestFixedRamp.test): Extend test to check
3481            the non-fixed values as well. The old test would have accepted a
3482            fixed ramp that only returnes the fixed properties
3483    
3484    2003-07-17  Jonathan Coles   <[email protected]>
3485    
3486            * Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
3487            shots for the manual. The XCF file is the source image and
3488            has additional layers to support changes.
3489    
3490            * Doc/manual/thuban-manual.xml: Wrote an initial Introduction.
3491    
3492            * Thuban/UI/classifier.py (Classifier.__BuildClassification):
3493            Return both the new class and the field name.
3494    
3495            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't
3496            fit the map to the window as this changes any zoom level that
3497            the user may have set.
3498    
3499    2003-07-16  Jonathan Coles   <[email protected]>
3500    
3501            * Thuban/Model/classgen.py (generate_singletons,
3502            generate_uniform_distribution, generate_quantiles): Remove
3503            fixes parameter, but maintain the same functionality by having
3504            the calling function pass a FixedRamp object for the ramp.
3505            (FixedRamp): New. Adapts a ramp to have fixed property values.
3506    
3507            * Thuban/Model/classification.py: Use new CLASS_CHANGED message.
3508            (Classification): Inherit from Publisher.
3509            (Classification.__init__): Remove the layer parameter.
3510            Classifications no longer need to have a parent layer.
3511            (Classification.GetField, Classification.GetFieldType,
3512            Classification.SetFieldInfo): Removed. The field name is stored
3513            in the layer, and the type can be retreived by calling
3514            Layer.GetFieldType().
3515            (Classification._set_layer, Classification.GetLayer): Removed.
3516            Classifications no longer have a parent layer.
3517    
3518            * Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
3519            classification.
3520            (Layer.SetShapeStore): Reset the classification first while
3521            we still have the old shape store to work with.
3522            (Layer.GetClassificationField, Layer.SetClassificationField):
3523            New. Method for getting/setting the field to classify on.
3524            (Layer.SetClassification): Simplified now that the layer
3525            simply has to hold a reference to the classification and not
3526            tell the classification who owns it.
3527            Fixes RTbug #2023.
3528    
3529            * Thuban/Model/load.py (SessionLoader.start_classification):
3530            Set the field name on the layer, not the classification.
3531    
3532            * Thuban/Model/messages.py: Add CLASS_CHANGED for when a
3533            classification is modified.
3534    
3535            * Thuban/Model/save.py (SessionSaver.write_classification):
3536            Get the field name and type from the layer.
3537    
3538            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
3539            parameter records to rows and add docstring. Fixes RTbug #1997.
3540    
3541            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
3542            ramp when we need to fix certain values of a ramp rather than
3543            using the old fixes parameter. Fixes RTbug #2024.
3544    
3545            * Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
3546            parameter.
3547            (ClassTable.Reset): Add fieldType parameter and use it, rather
3548            than asking the classification.
3549            (Classifier.__init__): Remember the original class's field
3550            and ask the layer for the field type, rather than the classification.
3551            (Classifier.__SetGridTable): Retrieve the field and field type
3552            for the table because they are not in the classification.
3553            (Classifier._OnTry, Classifier._OnRevert): Set the classification
3554            field on the layer in addition to the classification itself.
3555    
3556            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
3557            classification field from layer.
3558    
3559            * Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
3560            classification field from layer. Split up tests and remove
3561            *-imports. Fixes RTbug #1992.
3562    
3563            * test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.
3564    
3565            * test/test_classification.py
3566            (TestClassification.test_classification): Remove tests for methods
3567            that no longer exist.
3568    
3569            * test/test_layer.py (SetShapeStoreTests.setUp): Classification
3570            __init__ no longer has a field parameter, use SetClassificationField.
3571            (SetShapeStoreTests.test_sanity): Use layer object to get class
3572            field info.
3573    
3574            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
3575            SetClassificationField on layer to set class field info.
3576    
3577            * test/test_viewport.py: Renamed from test/test_view.py.
3578    
3579    2003-07-16  Jan-Oliver Wagner <[email protected]>
3580    
3581            * Doc/manual/thuban-manual.xml: Added authors and an initial
3582            coarse structure.
3583    
3584    2003-07-15  Bernhard Herzog  <[email protected]>
3585    
3586            * test/support.py (FloatComparisonMixin): This is a mix-in class
3587            and therefore should not be derived from any other class.
3588    
3589            * test/test_range.py (RangeTest): FloatComparisonMixin is a
3590            mix-in, so derive from TestCase as well.
3591    
3592    2003-07-15  Bernhard Herzog  <[email protected]>
3593    
3594            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
3595            draw_func handling a bit to remove one layer of indirection. This
3596            makes the renderer about 10% faster in the non-classifying case
3597            and the code a bit cleaner
3598            (MapRenderer.draw_point_shape): Add the pen and brush parameters
3599            and set them in the dc. Now the draw_point_shape method and
3600            wxproj's draw_polygon_shape function have basically the same
3601            signature so that both can be directly used as draw_func
3602    
3603    2003-07-15  Bernhard Herzog  <[email protected]>
3604    
3605            * Thuban/Model/save.py (SessionSaver.write_classification): Encode
3606            string values (in addition to the labels) as UTF 8
3607    
3608            * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
3609            values if the field type is string
3610    
3611            * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
3612            saving a session with non-ascii string classification values.
3613    
3614            * test/test_load.py (TestClassification.file_contents)
3615            (TestClassification.test): Check for non-ascii values in string
3616            classifications
3617    
3618    2003-07-14  Jonathan Coles   <[email protected]>
3619    
3620            * test/test_view.py: New. Tests for ViewPort.
3621    
3622    2003-07-14  Frank Koormann   <[email protected]>
3623    
3624            * Thuban/Model/load.py (SessionLoader.start_map): Encode map
3625            title to latin1.  Fixes https://intevation.de/rt/webrt?serial_num=2013
3626    
3627            * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
3628            unicode strings from session file: session title, map title and
3629            projection name.
3630            
3631    2003-07-10  Jonathan Coles   <[email protected]>
3632    
3633            * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
3634            drag_stop, not drag_move when the mouse is released.
3635    
3636    2003-07-10  Jonathan Coles   <[email protected]>
3637    
3638            The most important part of this is the seperation of view.py into
3639            two pieces. viewport.py now has a class called ViewPort which
3640            contains all the non-wx parts of view.py and can therefore be
3641            tested. view.py contains only the wx-specific parts and is fairly
3642            simple.
3643    
3644            * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
3645            RTTbug #1992.
3646            * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
3647            RTTbug #1992.
3648    
3649            * Thuban/Model/classgen.py (generate_singletons,
3650            generate_uniform_distribution, generate_quantiles):
3651            Added 'fixes' parameter so that property attributes can
3652            be held constant over the generated classification groups.
3653            (CustomRamp.GetProperties): Remove unused variables.
3654    
3655            * Thuban/Model/map.py (Map.SetProjection): Send the old
3656            projection as an argument to listeners of the MAP_PROJECTION_CHANGED
3657            event.
3658    
3659            * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
3660            parameter which is a list of records that restricts which
3661            records are saved. Fixes RTbug #1997.
3662    
3663            * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
3664            Port exception dialog from GREAT-ER. Fixes RTbug #1993.
3665    
3666            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
3667            to allow the user to fix line color/width on generated groups.
3668            (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
3669            functions to optionally fix group properties.
3670    
3671            * Thuban/UI/main.py (main): Set exception hook to the
3672            ShowExceptionDialog. Fixes RTbug #1993.
3673    
3674            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
3675            the table window when it is selectd to be shown.
3676    
3677            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
3678            Export Selection button and move the export buttons underneath
3679            the table.
3680            (QueryTableFrame.UpdateStatusText): Added event argument so
3681            that it can respond to grid selection events. The status text
3682            is now updated even when the table is not associated with a
3683            layer as was previously assumed.
3684            (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
3685            UpdateStatusText responds to these events.
3686            (QueryTableFrame.OnSaveAs): Renamed to doExport.
3687            (QueryTableFrame.doExport): Helper function that saves the
3688            entire table, or selected rows, to a file.
3689            (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
3690            Respond to export button events and call doExport.
3691    
3692            * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
3693            the function doesn't return NULL without first setting a Python
3694            Error.
3695    
3696            * test/runtests.py (main): Only print "Unknown option" for
3697            unsupported options.
3698    
3699            * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
3700            optional epsilon argument to specify floating point accuracy.
3701            (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
3702            for each item test.
3703    
3704            * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
3705            tests for saving selected records.
3706    
3707            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
3708            tests for saving selected records.
3709    
3710            * test/test_map.py (TestMapWithContents.test_set_projection):
3711            MAP_PROJECTION_CHANGED events send the old projection.
3712    
3713            * test/test_session.py
3714            (TestSessionWithContent.test_forward_map_projection):
3715            MAP_PROJECTION_CHANGED events send the old projection.
3716    
3717            * test/test_table.py (TableTest): Update tests to use non-deprecated
3718            functions.
3719    
3720    2003-07-08  Bernhard Herzog  <[email protected]>
3721    
3722            * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
3723            constants in the column objects are the standard ones defined in
3724            the table module.
3725    
3726            * test/test_transientdb.py
3727            (TestTransientTable.test_transienttable_to_dbf): New. Test whether
3728            exporting transient tables as DBF works. This should catch the bug
3729            just fixed in TransientTableBase.Width.
3730    
3731    2003-07-08  Bernhard Herzog  <[email protected]>
3732    
3733            * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
3734            interpolated colors correctly.
3735    
3736            * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
3737            New. Test case for the fix in classgen.py
3738    
3739    2003-07-08  Bernhard Herzog  <[email protected]>
3740    
3741            * test/runtests.py (main): Make the default output less verbose
3742            and add a verbosity option (-v) to get the old output
3743    
3744    2003-07-08  Bernhard Herzog  <[email protected]>
3745    
3746            * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
3747            0.9.
3748    
3749            * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
3750            New. Return the join type
3751    
3752            * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
3753            DTD
3754            (SessionSaver.write_data_containers): Save the join type for
3755            joined tables
3756    
3757            * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
3758            namespace
3759            (SessionLoader.start_jointable): Handle the jointype attribute
3760    
3761            * test/test_load_0_8.py: New. Effectively a copy of test_load.py
3762            as of Thuban 0.8. These are now tests to determine whether Thuban
3763            can still read files generated by Thuban 0.8
3764    
3765            * test/test_load.py (LoadSessionTest.dtd)
3766            (TestSingleLayer.file_contents)
3767            (TestLayerVisibility.file_contents, TestLabels.file_contents)
3768            (TestLayerProjection.file_contents)
3769            (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
3770            (TestJoinedTable.file_contents)
3771            (TestLoadError.file_contents): Update for new DTD
3772            (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
3773            for new join type attribute
3774    
3775            * test/test_save.py (SaveSessionTest.dtd)
3776            (SaveSessionTest.testEmptySession)
3777            (SaveSessionTest.testSingleLayer)
3778            (SaveSessionTest.testLayerProjection)
3779            (SaveSessionTest.testRasterLayer)
3780            (SaveSessionTest.testClassifiedLayer)
3781            (SaveSessionTest.test_dbf_table)
3782            (SaveSessionTest.test_joined_table): Update for new DTD
3783            (SaveSessionTest.test_joined_table): Add test for new join type
3784            attribute
3785    
3786    2003-07-04  Bernhard Herzog  <[email protected]>
3787    
3788            * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
3789            function for table_to_dbf
3790            (table_to_dbf): Deal with names longer than the 10 character limit
3791    
3792            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
3793            doc-string
3794            (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
3795            long column names
3796    
3797    2003-07-03  Bernhard Herzog  <[email protected]>
3798    
3799            * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
3800    
3801    2003-07-03  Bernhard Herzog  <[email protected]>
3802    
3803            * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
3804            for the Thuban manual and README with some basic information about
3805            the manual
3806    
3807    2003-07-03  Bernhard Herzog  <[email protected]>
3808    
3809            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
3810            Update doc-string
3811            (TransientJoinedTable.create): Do not modify the column objects of
3812            the input tables in place and copy all columns of the input tables
3813            into the joined table after all.
3814    
3815            * test/test_transientdb.py
3816            (TestTransientTable.test_transient_joined_table_same_column_name):
3817            Update to reflect the new behavior
3818            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
3819            Update to reflect the new behavior
3820            (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
3821            New test case for a bug which modified the column objects in place
3822    
3823    2003-07-02  Jonathan Coles   <[email protected]>
3824    
3825            * Thuban/Model/classgen.py (generate_singletons,
3826            generate_uniform_distribution, generate_quantiles,
3827            GenQuantiles0): Make sure maxValue isn't less than
3828            one, otherwise we could divide by zero.
3829    
3830            * test/test_classgen.py (ClassGenTest.doClassRangeTest,
3831            ClassGenTest.doClassSingleTest): Call doBoundsTest to
3832            check the end classification groups against the
3833            proper property values.
3834            (ClassGenTest.doBoundsTest): New. Checks the first and
3835            last classification groups to make sure their properties
3836            are the correct upper and lower bounds for a color ramp.
3837    
3838    2003-07-02  Jonathan Coles   <[email protected]>
3839    
3840            * Thuban/Model/classgen.py (generate_singletons,
3841            generate_uniform_distribution, generate_quantiles,
3842            GenQuantiles0): The denominator was one to high when
3843            calculating the index for the ramp causing the index
3844            to never to reach one.
3845    
3846    2003-07-02  Jonathan Coles   <[email protected]>
3847    
3848            Changed the singature of ClassGroupRange.__init__ and
3849            ClassGroupRange.SetRange() so that the min/max values are
3850            passed as a tuple. This makes a better calling scheme for
3851            when a Range object is passed instead.
3852    
3853            * Thuban/Model/classgen.py: Fixed parameters to
3854            ClassGroupRange constructor.
3855    
3856            * Thuban/Model/classification.py (ClassGroupRange.__init__):
3857            Consolidate the min/max parameters into a single _range which
3858            can either be a tuple or a Range object.
3859            (ClassGroupRange.SetRange): Consolidate the min/max parameters
3860            into a single _range which can either be a tuple or a Range object.
3861    
3862            * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
3863            call to ClassGroupRange constructor to use a tuple.
3864    
3865            * Thuban/Model/layer.py (Layer.SetClassification): Switch
3866            the classification instance variable to the new class
3867            before calling _set_layer otherwise subscribers to a
3868            LAYER_CHANGED event will not see any difference.
3869    
3870            * test/test_classification.py: Fix tests of ClassGroupRange
3871            so that they use the new signature.
3872    
3873            * test/test_load.py: Fix use of ClassGroupRange so that it
3874            uses the new signature.
3875    
3876            * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
3877            uses the new signature.
3878    
3879            * test/test_save.py: Fix use of ClassGroupRange so that it
3880            uses the new signature.
3881    
3882    
3883    2003-07-01  Jonathan Coles   <[email protected]>
3884    
3885            * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
3886            Import used objects/class from color.
3887            (generate_singletons): We don't
3888            need the numGroups parameter anymore because we are using
3889            the new ramps with GetProperties().
3890            (generate_uniform_distribution): Use new ramp method
3891            GetProperties().
3892            (generate_quantiles, GenQuantiles0): Use new ramp method
3893            GetProperties().
3894            (CustomRamp.SetNumGroups): Removed. The ramps now map
3895            a value from 0 to 1 to class properties so the number
3896            of groups is not needed ahead of time.
3897            (CustomRamp.next): Removed. CustomRamp does not support
3898            interation anymore.
3899            (CustomRamp.GetProperties): Returns a ClassGroupProperties
3900            object based on the index value from 0 to 1 that is
3901            passed to it.
3902            (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
3903            Made into instances of Monochromatic class instread of
3904            deriving from it.
3905            (HotToCold.SetNumGroups): Removed. See CustomRamp.
3906            (HotToCold.next): Removed. See CustomRamp.
3907    
3908            * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
3909            (Classification.SetField, Classification.SetFieldType):
3910            Replaced with SetFieldInfo.
3911            (Classification.SetFieldInfo): New. Does a better job of
3912            what SetField and SetFieldType used to do by combining
3913            their function since they should really always be done
3914            at the same time.
3915            (Classification.SetLayer): Renamed to _set_layer.
3916            (Classification._set_layer): Should only be called from
3917            Layer's SetClassification. This does not cause a recursive
3918            call as SetLayer did because we know that Layer knows about
3919            the classification.
3920    
3921            * Thuban/Model/color.py: Fixes RTbug #1971.
3922            (_Transparent): Renamed from Transparent so it doesn't
3923            conflict with the module variable.
3924            (Transparent, Black): Renamed from Color.Transparent,
3925            Color.Black so they are not class variables.
3926    
3927            * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
3928            (Layer.Destroy): We don't need to call SetClassification
3929            anymore to clear out the back reference in the classifcation
3930            to the layer. It's better to set it to None using _set_layer,
3931            and we won't be creating another clas object too.
3932            (Layer.SetClassification): Classification._set_layer is not
3933            recursive so remove all the locking variables. Also clean
3934            up the code so that it remains unchanged if something fails.
3935    
3936            * Thuban/Model/load.py: Fixes RTbug #1971.
3937            (SessionLoader.start_classification): Call
3938            Classification.SetFieldInfo().
3939    
3940            * Thuban/Model/save.py: Removed import of Color which wasn't
3941            being used.
3942    
3943            * Thuban/UI/classgen.py: Fixes RTbug #1972.
3944            (ClassGenDialog.__init__): Color ramps are now instances
3945            already so we don't need to create any new objects.
3946            (ClassGenDialog.OnOK): Check for numGroups is no longer
3947            necessary because we never use it.
3948    
3949            * Thuban/UI/classifier.py: Fixes RTbug #1971.
3950            (Classifier.__BuildClassification, Classifier.__SetGridTable):
3951            Call Classification.SetFieldInfo() instead of SetFieldType.
3952    
3953            * Thuban/UI/renderer.py: Fixes RTbug #1971.
3954    
3955            * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
3956            (MapCanvas.__init__): Subscribe to the idle time event. Set
3957            background color to white.
3958            (MapCanvas.OnPaint): Set a flag indicating that we should
3959            render the map during idle time. If we already have a bitmap
3960            just draw it now.
3961            (MapCanvas.OnIdle): New. Render the map only during idle time.
3962            This also fixes a problem with the busy cursor under gtk.
3963    
3964            * test/test_classgen.py (ClassGenTest.test_generate_singletons):
3965            Fix calls to generate_singletons because the signature changed.
3966    
3967            * test/test_classification.py: Fix color references and
3968            change calls to Classification.[SetField|SetFieldType] to
3969            SetFieldInfo.
3970    
3971            * test/test_load.py: Fix color references.
3972    
3973            * test/test_load_0_2.py: Fix color references.
3974    
3975            * test/test_save.py (SaveSessionTest.testClassifiedLayer):
3976            Change calls to Classification.[SetField|SetFieldType] to
3977            SetFieldInfo.
3978    
3979    2003-07-01  Frank Koormann   <[email protected]>
3980    
3981            MERGE from the greater-ms3 branch.
3982    
3983            * test/test_transientdb.py
3984            (TestTransientTable.test_transient_joined_table_with_equal_column_names):
3985            New. Test join of two tables with partly equal column names.
3986    
3987            * Thuban/Model/transientdb.py (TransientJoinedTable.create):
3988            If duplicates in left and right tables column names are found,
3989            append '_' (underscores) to the name until it is unique.
3990            Create always new internal names for the resulting table and reference
3991            columns in the join statement with <table>.<column>
3992    
3993    2003-07-01  Bernhard Herzog  <[email protected]>
3994    
3995            * test/test_transientdb.py
3996            (TestTransientTable.test_transient_joined_table_same_column_name):
3997            New. Test whether joining on columns with the same names in both
3998            tables works.
3999            
4000            * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
4001            sure to use the right internal names even when joining on field
4002            with the same names in both tables. Also, detect duplicate names
4003            in the joined table correctly.
4004    
4005    2003-07-01  Frank Koormann   <[email protected]>
4006    
4007            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
4008            Reverse List of layers to render in same order as in desktop legend.
4009    
4010    2003-06-30  Jonathan Coles   <[email protected]>
4011    
4012            * Thuban/version.py (make_tuple): Takes a version string
4013            and splits it into a tuple of at most three integers.
4014            Used make_tuple() to make tuple versions of the version
4015            numbers.
4016    
4017            * Thuban/UI/about.py: Add Thuban email addresses.
4018    
4019    2003-06-30  Jonathan Coles   <[email protected]>
4020    
4021            * Thuban/version.py: SQLite/PySQLite version dependencies
4022            were too high.
4023    
4024    2003-06-30  Jonathan Coles   <[email protected]>
4025    
4026            * Thuban/version.py: Update version to 0.8.1
4027            
4028            * MANIFEST.in: Added Projections so that default.proj is
4029            included.
4030    
4031    2003-06-26  Jonathan Coles   <[email protected]>
4032    
4033            New About box with lots more information including library
4034            versions and credits. More/better version checking before
4035            Thuban starts.
4036    
4037            * Thuban/UI/about.py: New. New About box that displays
4038            library version information and credits.
4039    
4040            * Thuban/version.py: Added new 'versions' dictionary which
4041            contains the verions of various libraries which are checked
4042            when the module loads.
4043            (verify_versions): Check all version numbers and returns
4044            a list of errors.
4045    
4046            * Thuban/UI/classifier.py (Classifier.__EnableButtons):
4047            Reset the status of the buttons as the situation warrants,
4048            but in a better more reliable way by not relying on the
4049            current status to determine what needs to change.
4050    
4051            * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
4052            (verify_versions): Remove most of the code since it is
4053            now in Thuban.version.verify_versions.o
4054    
4055            * Thuban/UI/mainwindow.py (MainWindow.About): Call new
4056            About box in Thuban.UI.about.
4057    
4058            * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
4059            Returns the version of gdal library being used as a string.
4060    
4061            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
4062            Removed.
4063            (get_proj_version): Return the version of PROJ that the file
4064            was compiled with.
4065            (get_gtk_version): Return th version of GTK that the file
4066            was compiled with.
4067    
4068    2003-06-25  Jonathan Coles   <[email protected]>
4069    
4070            * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
4071            of the SelectPropertiesDialog should be self so the window
4072            appears on top.
4073            (ClassGroupPropertiesCtrl.DoEdit): The parent
4074            of the SelectPropertiesDialog should be self so the window
4075            appears on top.
4076    
4077            * Thuban/UI/resource.py: Cleaned up how we determine file
4078            extensions.
4079            (GetImageResource): Return an wxImage from our Resources.
4080    
4081    2003-06-24  Jonathan Coles   <[email protected]>
4082    
4083            * Thuban/UI/renderer.py (ExportRenderer.render_legend):
4084            Check that a layer has a classification before trying
4085            to get it. Raster layers don't have classifications.
4086    
4087    2003-06-23  Jonathan Coles   <[email protected]>
4088            
4089            * setup.py: Add Resources/XML to resource list.
4090        
4091    2003-06-23  Jonathan Coles   <[email protected]>
4092    
4093            * setup.cfg: Fix copyright dates
4094        
4095    2003-06-23  Jonathan Coles   <[email protected]>
4096    
4097            * MANIFEST.in: Update with Resources/XML
4098    
4099            * setup.py: Don't include Locale resources yet as we don't
4100            have any and it causes problems building the distribution
4101            for Windows. Update version to 0.8.0.
4102    
4103            * Doc/thuban.dtd: Removed since it is now in Resources/XML.
4104    
4105            * Thuban/UI/mainwindow.py: Add blank line at the end because
4106            file was not being read correctly building the Windows
4107            distribution.
4108    
4109    2003-06-23  Jonathan Coles   <[email protected]>
4110    
4111            * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
4112    
4113            * Thuban/version.py: Temporarily update longversion for
4114            the 0.8 release so that it doesn't have the cvs revision.
4115    
4116    2003-06-23  Jonathan Coles   <[email protected]>
4117    
4118            * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
4119            to make sure that we don't create reentrant possibilities with
4120            wxYield.
4121    
4122            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
4123            directly to avoid the wxSafeYield() call which generates an
4124            OnPaint event causing infinite recursion. Don't try to catch
4125            exception anymore. This was for before there were limits on map
4126            scaling.
4127    
4128    2003-06-23  Bernhard Herzog  <[email protected]>
4129    
4130            Bug fix for RT #1961:
4131    
4132            * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
4133            Register DerivedShapestores with the session
4134    
4135            * Thuban/Model/session.py (Session.Tables): Make sure each table
4136            is only listed once.
4137    
4138            * test/test_load.py (TestJoinedTable.test): Add check_format call.
4139            Update file contents to match the one written out.
4140    
4141    2003-06-20  Bernhard Herzog  <[email protected]>
4142    
4143            * test/xmlsupport.py (SaxEventLister.startElementNS)
4144            (SaxEventLister.endElementNS): Do not include the qname. Python
4145            2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
4146            is (presumably incorrectly) None, whereas it's a string with the
4147            element name in the later versions.
4148    
4149            * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
4150            (TestEventList.test_even_list_namespace): Update tests to reflect
4151            the new behaviour
4152            (TestEventList.test_even_list_id_normalization): Fix doc-string
4153    
4154    2003-06-20  Jonathan Coles   <[email protected]>
4155    
4156            * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
4157            by deriving classes to determine if that layer supports shapes.
4158            (Layer): Override HasShapes and return true.
4159    
4160            * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
4161            instead of a direct call to wx[Begin|End]CusyCursor().
4162            (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
4163            table data.
4164    
4165            * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
4166            New. Wrappers around the wxWindows functions that allow us to
4167            make additional calls such as wxYield which gives the native
4168            system a chance to update the cursor correctly.
4169    
4170            * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
4171            instead of a direct call to wx[Begin|End]CusyCursor().
4172    
4173            * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
4174            instead of a direct call to wx[Begin|End]CusyCursor().
4175            (MapCanvas.find_shape_at): Check if the current search layer
4176            support shapes, otherwise go on to the next layer.
4177    
4178            * test/test_layer.py: Add tests in each type of layer for
4179            HasClassification() and HasShapes()
4180    
4181    2003-06-20  Jonathan Coles   <[email protected]>
4182    
4183            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
4184            turning on the busy cursor to allow the system to change the
4185            cursor before we begin painting. This fixes a problem that
4186            was occuring only under GTK. Fixes RTbug #1840.
4187    
4188    2003-06-20  Bernhard Herzog  <[email protected]>
4189    
4190            * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
4191            version.
4192    
4193            * Thuban/Model/save.py (sort_data_stores): New. Make topological
4194            sort of the data sources so they can be written with sources that
4195            data sources that depend on other data sources come after the
4196            sources they depend on.
4197            (SessionSaver.__init__): Add idmap instance variable to map from
4198            objects to the ids used in the file.
4199            (SessionSaver.get_id, SessionSaver.define_id)
4200            (SessionSaver.has_id): New. Methods to manage the idmap
4201            (SessionSaver.write): Use thuban-0.8.dtd
4202            (SessionSaver.write_session): Add a namespace on the session and
4203            write out the data sources before the maps.
4204            (SessionSaver.write_data_containers): New. Write the data
4205            containers.
4206            (SessionSaver.write_layer): Layer elements now refer to a
4207            shapestore and don't contain filenames anymore.
4208    
4209            * Thuban/Model/load.py (LoadError): Exception class to raise when
4210            errors in the files are discovered
4211            (SessionLoader.__init__): Define dispatchers for elements with a
4212            thuban-0.8 namespace too.
4213            (SessionLoader.check_attrs): New helper method to check and
4214            convert attributes
4215            (AttrDesc): New. Helper class for SessionLoader.check_attrs
4216            (SessionLoader.start_fileshapesource)
4217            (SessionLoader.start_derivedshapesource)
4218            (SessionLoader.start_filetable, SessionLoader.start_jointable):
4219            Handlers for the new elements in the new fileformat
4220            (SessionLoader.start_layer): Handle the shapestore attribute in
4221            addition to filename.
4222            (SessionLoader.start_table, SessionLoader.end_table): Removed.
4223            They were never used in the old formats and aren't needed for the
4224            new.
4225    
4226            * Thuban/Model/session.py (Session.DataContainers): New method to
4227            return all "data containers", i.e. shapestores and tables
4228    
4229            * test/xmlsupport.py (SaxEventLister.__init__)
4230            (SaxEventLister.startElementNS, sax_eventlist): Add support to
4231            normalize IDs.
4232    
4233            * test/test_xmlsupport.py
4234            (TestEventList.test_even_list_id_normalization): New test case for
4235            id normalization
4236    
4237            * test/test_load.py (LoadSessionTest.check_format): Use ID
4238            normalization
4239            (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
4240            class atrributes used for ID normalization
4241            (TestSingleLayer, TestLayerVisibility, TestLabels.test)
4242            (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
4243            file format
4244            (TestJoinedTable): New test for loading sessions with joined
4245            tables.
4246            (TestLoadError): New. Test whether missing required attributes
4247            cause a LoadError.
4248    
4249            * test/test_save.py (SaveSessionTest.thubanids)
4250            (SaveSessionTest.thubanidrefs): New class attributes for ID
4251            normalization in .thuban files.
4252            (SaveSessionTest.compare_xml): Use id-normalization.
4253            (SaveSessionTest.testEmptySession)
4254            (SaveSessionTest.testLayerProjection)
4255            (SaveSessionTest.testRasterLayer)
4256            (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
4257            (SaveSessionTest.testLayerProjection): The filename used was the
4258            same as for testSingleLayer. Use a different one.
4259            (SaveSessionTest.test_dbf_table)
4260            (SaveSessionTest.test_joined_table): New test cases for saving the
4261            new data sources structures.
4262            (TestStoreSort, MockDataStore): Classes to test the sorting of the
4263            data stores for writing.
4264    
4265            * test/runtests.py: Add CVS keywords
4266    
4267    2003-06-20  Jonathan Coles   <[email protected]>
4268    
4269            * test/test_session.py
4270            (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
4271            Use the cultural_landmark-point.dbf file for the store so that
4272            the table rows and shape count match.
4273    
4274    2003-06-20  Jonathan Coles   <[email protected]>
4275    
4276            * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
4277            an exception if the number of shapes is different from the
4278            number of rows in the table. Address RTbug #1933.
4279    
4280            * test/test_layer.py (TestLayer.test_derived_store): Add
4281            a test for the new exception in DerivedShapeStore.__init__.
4282    
4283            * test/support.py (FloatTestCase): Removed since there is
4284            already FloatComparisonMixin. Fixes RTbug #1954.
4285            (FloatComparisonMixin.assertFloatEqual): Include test for
4286            infinity that was part of FloatTestCase.
4287    
4288            * test/test_range.py (RangeTest): Inherit from
4289            support.FloatComparisonMixin now that we don't have
4290            support.FloatTestCase.
4291    
4292    2003-06-20  Bernhard Herzog  <[email protected]>
4293    
4294            * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
4295            the implementation in xmlsupport instead.
4296            (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
4297    
4298            * test/test_proj.py: Import sax_eventlist from xmlsupport instead
4299            of test_save
4300    
4301    2003-06-20  Bernhard Herzog  <[email protected]>
4302    
4303            * test/test_load.py (LoadSessionTest.check_format): New helper
4304            method to make sure the test files we load might have been written
4305            by the current thuban version.
4306            (ClassificationTest.TestLayers, TestSingleLayer.test)
4307            (TestLayerVisibility.test, TestClassification.test)
4308            (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
4309            Add check_format() calls and fix the thuban data to match the data
4310            that would be written by saving the session loaded from it.
4311    
4312            * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
4313            the same class and function in test_save.
4314    
4315            * test/test_xmlsupport.py (TestEventList): New. test cases for
4316            sax_eventlist
4317    
4318    2003-06-20  Bernhard Herzog  <[email protected]>
4319    
4320            * Resources/XML/thuban.dtd: Add comment about which versions of
4321            Thuban are covered by this DTD
4322            (map): Fix content model for layers and raster layers. There can
4323            be any number or layers and raster layers in any order.
4324    
4325    2003-06-20  Jonathan Coles   <[email protected]>
4326    
4327            This is mainly about fixing RTbug #1949.
4328    
4329            * Thuban/Model/classification.py: Remove "from __future__"
4330            import statement since python 2.2 is the earliest supported
4331            version.
4332    
4333            * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
4334            Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
4335            depending on the units this projection *forwards* into.
4336    
4337            * Thuban/Model/save.py (SessionSaver.write_classification):
4338            Remove unnecessary use of lambdas and nested functions.
4339    
4340            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
4341            adjustment here if the map projection uses degrees.
4342    
4343            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
4344            scale adjust code since it is now done before calling
4345            this method. Don't do anything if the map projection
4346            is None.
4347    
4348    2003-06-19  Bernhard Herzog  <[email protected]>
4349    
4350            Move version specific load tests to their own file.
4351    
4352            * test/test_load.py: Expand the doc-string to explain a bit how to
4353            handle file format changes.
4354            (TestClassification.test): Update the docstring as this test is
4355            not about Thuban 0.2 anymore.
4356    
4357            * test/test_load_0_2.py: New file with the load tests for thuban
4358            files created with Thuban 0.2 and earlier.
4359    
4360    2003-06-19  Bernhard Herzog  <[email protected]>
4361    
4362            Add XML validation to some of the tests. Validation will only be
4363            done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
4364            To make the DTD available to the test cases it's moved into
4365            Resources/XML
4366    
4367            * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
4368            for versions up to and including 0.2. Two slight changes: added an
4369            encoding specification and fixed the comment which refered to
4370            GRASS, not Thuban
4371    
4372            * test/xmlsupport.py: New support module for tests involving XML.
4373            Currently there's a mix-in class for XML validation.
4374    
4375            * test/test_xmlsupport.py: New. Tests for the xmlsupport module
4376    
4377            * test/test_save.py (SaveSessionTest): Derive from ValidationTest
4378            so that we can validate the
4379            (SaveSessionTest.testEmptySession)
4380            (SaveSessionTest.testSingleLayer)
4381            (SaveSessionTest.testSingleLayer)
4382            (SaveSessionTest.testLayerProjection)
4383            (SaveSessionTest.testRasterLayer)
4384            (SaveSessionTest.testClassifiedLayer): Validate the generated XML
4385    
4386            * test/runtests.py (main): Call print_additional_summary instead
4387            of print_garbage_information
4388    
4389            * test/support.py (resource_dir): New function to return the
4390            "Resource" subdirectory
4391            (print_additional_summary): New function to combine several
4392            summary functions
4393            (run_tests): Use print_additional_summary instead of calling
4394            print_garbage_information directly
4395    
4396    2003-06-19  Bernhard Herzog  <[email protected]>
4397    
4398            * Doc/thuban.dtd (classification): Correct the content model of
4399            the classification element.
4400            (projection): Add the "name" attribute
4401    
4402    2003-06-19  Frank Koormann   <[email protected]>
4403    
4404            MERGE from the greater-ms3 branch.
4405    
4406            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
4407            scale if projection is latlong to get better estimate.
4408    
4409            Fix problem of hidden properties dialog under windows after double
4410            click on layer tree:
4411            The tree control always gets an Expanded / Collapsed event after
4412            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
4413            raises the already displayed window.
4414    
4415            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
4416            raiseProperties initialized to prevent endless loops
4417            (LegendTree._OnItemActivated): Depending on self.raiseProperties
4418            simply raise the properties or open the dialog and issue a second
4419            event.
4420    
4421    2003-06-18  Jonathan Coles   <[email protected]>
4422    
4423            * setup.py: Fix a few problems that occured under Windows.
4424    
4425    2003-06-18  Jonathan Coles   <[email protected]>
4426    
4427            When Thuban loaded the map was redrawn twice because the
4428            legend was being opened after the mainwindow was created
4429            and not during its creation. This meant the map was drawn
4430            initially and then had to be redrawn when the legend
4431            caused the display to change. Now the legend is opened
4432            in the mainwindow constructor which resolves this issue.
4433    
4434            Also, although we were checking for the existence of
4435            gdal and gdalwarp modules, the gdalwarp extension was
4436            still being compiled (which may fail if the system doesn't
4437            have gdal installed). the build_ext command to setup.py
4438            now accepts the flags --with-gdal and --without-gdal.
4439            If --without-gdal is specified setup.py will try to
4440            use the gdal parameters specified by gdal-config. Under
4441            windows, those parameters have to be set in setup.py
4442            as with proj4 an wxWindows.
4443    
4444            * setup.py: Use a list instead of seperate variables for
4445            extension parameters so we can create a generic function
4446            that runs an appropriate *-config script.
4447            (run_cs_script): Renamed from run_wx_script and modified
4448            to accept a second argument which is a list of lists to
4449            be filled in by the values returned from running the command.
4450            (thuban_build_ext): New. Extends the build_ext command and
4451            provides the options --with-gdal/--without-gdal which then
4452            optionally includes the gdalwarp extension.
4453    
4454            * Thuban/Model/resource.py: First check if we can import
4455            the gdalwarp Thuban extension before checking for gdal.
4456            Also added some comments.
4457            
4458            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
4459            the map is None which may be the case if none has been loaded
4460            yet.
4461    
4462            * Thuban/UI/main.py (main): Remove call to ShowLegend.
4463    
4464            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
4465    
4466            * Thuban/UI/renderer.py: Check for gdal support before importing
4467            gdalwarp.
4468            (MapRenderer.render_map): Only try to optimize if we have gdal
4469            support otherwise nothing will get drawn.
4470    
4471            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
4472            during startup before a map has been created. Check if map is None
4473            before using it and do nothing if it is.
4474    
4475    2003-06-17  Jonathan Coles   <[email protected]>
4476    
4477            Fix the problem with raster layers under Windows that caused
4478            Thuban to crash. The view should respond to layer projection
4479            changed events to update the display. Changes to a projection
4480            should not cause the map to be set to full extent.
4481            
4482            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
4483            current_map_proj to remember the current map projection so that
4484            when the projection changes we know what the previous projection
4485            was.
4486            (MapCanvas.SetMap): Unsubscribe and subscribe to
4487            LAYER_PROJECTION_CHANGED events.
4488            (MapCanvas.projection_changed): Split into two methods that respond
4489            to map and layer projection changes.
4490            (MapCanvas.map_projection_changed): New. Takes the current view and
4491            projects it using the new projection. This does not cause the
4492            map to be redrawn at full extent.
4493            (MapCanvas.layer_projection_changed): New. Cause a redraw which
4494            will draw each layer in its new projection.
4495            
4496            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
4497            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
4498            under Windows.
4499            
4500            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
4501            to twice sizeof(void*) because there are two digits for each
4502            hex byte.
4503    
4504    2003-06-16  Bernhard Herzog  <[email protected]>
4505    
4506            Update to the layer interface: Direct access to the table,
4507            shapetable, shapefile and filename attributes is now actively
4508            deprecated by issuing deprecation warnings for all places where
4509            this happens.
4510    
4511            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
4512            to the instance variables table, shapetable, shapefile and
4513            filename via __getattr__ so that we can issue a deprecation
4514            warning.
4515            (Layer.SetShapeStore): Don't set the deprecated instance variables
4516            any more
4517            (Layer.SetShapeStore): Don't use deprecated layer instance
4518            variables
4519            (Layer.Destroy): No need to explicitly remove the instance
4520            variables any more
4521            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
4522            instance variables
4523    
4524            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
4525            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
4526            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
4527            use deprecated layer instance variables
4528    
4529            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
4530            deprecated layer instance variables
4531    
4532            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
4533            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
4534            instance variables
4535    
4536            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
4537            deprecated layer instance variables
4538    
4539            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
4540            deprecated layer instance variables
4541    
4542            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
4543            deprecated layer instance variables
4544    
4545            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
4546            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
4547            variables
4548    
4549            * test/runtests.py (main): Turn Thuban's deprecation warnings into
4550            errors so that they're cought by the tests
4551    
4552            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
4553            layer instance variables
4554    
4555    2003-06-16  Jonathan Coles   <[email protected]>
4556    
4557            Fix a problem under Windows whereby if the user double-clicks on a
4558            layer in the legend that tree item will expand or collapse as well
4559            as open the layer properties dialog. The state of the tree item
4560            should not be affected.
4561    
4562            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
4563            preventExpandCollapse and subscribe to expanding and collapsing
4564            events.
4565            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
4566            collapsing events and will veto the event if it has been triggered
4567            by the user double clicking on a layer.
4568            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
4569            that an expanding/collapsing event should be vetoed.
4570    
4571    2003-06-13  Bernhard Herzog  <[email protected]>
4572    
4573            * Thuban/UI/classifier.py (Classifier.OnClose)
4574            (Classifier.map_layers_removed)
4575            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
4576            in OnClose and not in map_layers_removed or
4577            layer_shapestore_replaced to make sure it always happens when the
4578            dialog is closed
4579    
4580    2003-06-13  Jonathan Coles   <[email protected]>
4581    
4582            This puts back a fix for Windows where a panel is needed so that
4583            the background of the table view appears correctly.
4584    
4585            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
4586            object that can be used by derived classes to place any
4587            controls (including the grid) onto.
4588            (QueryTableFrame.__init__): Use the panel as the parent window
4589            for all the controls. Reparent the grid so that the panel is
4590            the parent. Call UpdateStatusText() to correctly initialize
4591            the status bar.
4592    
4593    2003-06-13  Jonathan Coles   <[email protected]>
4594    
4595            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
4596            from wxFrame (as opposed to wxDialog like the other classes)
4597            but otherwise behaves like the other classes. This is needed
4598            for the TableView which isn't really a dialog and needs to
4599            have a status bar and control buttons.
4600    
4601            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
4602            instance variable to keep track of how many rows are selected.
4603            Subscribe once to the the events we are interested in.
4604            (ThubanGrid.OnRangeSelect): Only handle event if event handling
4605            hasn't been turned off.
4606            (ThubanGrid.OnSelectCell): Only handle event if event handling
4607            hasn't been turned off.
4608            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
4609            as an event listener (which changes the event handler stack)
4610            simply set an instance variable to False. This is checked in
4611            the event handlers.
4612            (ThubanGrid.GetNumberSelected): Return the number of currently
4613            selected rows.
4614            (TableFrame): Inherit from ThubanFrame so we can have a
4615            status bar and control buttons.
4616            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
4617            Explicitly set which items are selected in the operator choice and
4618            action choice so there is always a valid selection. Fixes RTbug #1941.
4619            Subscribe to grid cell selection events so we can update the
4620            status bar.
4621            (QueryTableFrame.UpdateStatusText): Update the status bar with
4622            how many rows are in the grid, how many columns, and how many
4623            rows are selected.
4624            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
4625            Call UpdateStatusText when cells are (de)selected.
4626            (QueryTableFrame.OnQuery): Use the string value in the value
4627            combo if either the selected item index is 0 or if the string
4628            cannot be found in the predefined list (this happens if the
4629            user changes the text). Fixes RTbug #1940.
4630            Only turn off the grid event listeners if there a query comes
4631            back with a none empty list of ids. in the case that the list
4632            is empty this causes a grid.ClearSelection() call to actually
4633            clear the grid selection which causes the selected items in
4634            the map to be deselected. Fixes RTbug #1939.
4635    
4636            * test/test_save.py (XMLWriterTest.Encode): Check return values.
4637            Fixes RTbug #1851.
4638    
4639    2003-06-13  Bernhard Herzog  <[email protected]>
4640    
4641            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
4642            self.selected_shape with the current selection to make sure the
4643            contents of the dialog are up to date when it's shown for the
4644            first time.
4645            The dialog used to work without this by luck. The recent fix to
4646            the connector module 'broke' a 'feature' the identify view was
4647            relying on, i.e that subscribing to a message in response to
4648            receiving a message of that type would mean that the new
4649            subscriber would also be called for the same message.
4650            
4651    2003-06-12  Jonathan Coles   <[email protected]>
4652    
4653            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
4654            the image is rendered. Fixes RTbug #1937.
4655    
4656    2003-06-12  Jonathan Coles   <[email protected]>
4657    
4658            * Thuban/Lib/fileutil.py: As is done under Windows, create the
4659            user directory if it doesn't exist on a posix system.
4660            Fixes RTbug #1815.
4661    
4662            * Thuban/Model/resource.py (get_user_proj_files): Moved the
4663            called to get_application_dir here, so that the directory
4664            will only be called if this method is invoked.
4665    
4666            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
4667            the projfilepath if no projection is selected.
4668    
4669    2003-06-12  Jonathan Coles   <[email protected]>
4670    
4671            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
4672            the scalebar if the current map has no projection set.
4673    
4674            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
4675            projfilepath label to just the basename of the projection file
4676            rather than include the entire path.
4677    
4678            * Thuban/Model/resource.py: Fix missed proj functions that
4679            needed to be renamed.
4680    
4681    2003-06-12  Jonathan Coles   <[email protected]>
4682    
4683            * Thuban/Model/classification.py: Removed assert statements that
4684            tested if the variable was an instance of Color.
4685    
4686            * Thuban/Model/color.py (Color): Remove commented code that isn't
4687            used.
4688            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
4689            Fixes RTbug #1835.
4690            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
4691            Needed now that the class doesn't inherit from Color.
4692    
4693    2003-06-12  Jonathan Coles   <[email protected]>
4694    
4695            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
4696            check unicode strings.
4697    
4698            * test/test_layer.py: Check for existence of gdal.
4699    
4700    2003-06-12  Jonathan Coles   <[email protected]>
4701        
4702            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
4703            that was in load.py
4704    
4705            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
4706            that was in save.py
4707    
4708    2003-06-12  Jonathan Coles   <[email protected]>
4709    
4710            This is largely a collection of bug fixes. We also handle the
4711            case where gdal is not on the system. The XMLReader and XMLWriter
4712            classes were moved into there own files to resolve some circular
4713            import references and because they shouldn't really be in the
4714            file that is dediciated to reading/writing session files since
4715            they are also used elsewhere.
4716    
4717            * Thuban/Model/classgen.py: Renamed functions to follow the
4718            function_names_with_underscores style. Fixes RTbug #1903.
4719            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
4720    
4721            * Thuban/Model/layer.py: Import gdal only if it available.
4722            (RasterLayer): Handle the case where the gdal library is unavailable.
4723            Addresses RTbug #1877.
4724    
4725            * Thuban/Model/load.py (XMLReader): Moved into seperate file
4726            xmlreader.py.
4727    
4728    2003-06-12  Jonathan Coles   <[email protected]>
4729    
4730            This is largely a collection of bug fixes. We also handle the
4731            case where gdal is not on the system. The XMLReader and XMLWriter
4732            classes were moved into there own files to resolve some circular
4733            import references and because they shouldn't really be in the
4734            file that is dediciated to reading/writing session files since
4735            they are also used elsewhere.
4736    
4737            * Thuban/Model/classgen.py: Renamed functions to follow the
4738            function_names_with_underscores style. Fixes RTbug #1903.
4739            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
4740    
4741            * Thuban/Model/layer.py: Import gdal only if it available.
4742            (RasterLayer): Handle the case where the gdal library is unavailable.
4743            Addresses RTbug #1877.
4744    
4745            * Thuban/Model/load.py (XMLReader): Moved into seperate file
4746            xmlreader.py.
4747    
4748            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
4749            file xmlwriter.py.
4750    
4751            * Thuban/Model/resource.py: Renamed functions to following the
4752            function_names_with_underscores style.
4753            (has_gdal_support): New function that returns true if the gdal
4754            library is available. Addresses RTbug #1877.
4755    
4756            * Thuban/UI/application.py (ThubanApplication.OpenSession):
4757            Display a message box if the gdal library is not available, but
4758            only if there are any layers that would use it. Addresses RTbug #1877.
4759    
4760            * Thuban/UI/classgen.py: Use renamed projection resource functions.
4761            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
4762            when using integers versus floats.
4763    
4764            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
4765            determine if the "Add Image Layer" menu option should be
4766            greyed out or not. Addresses RTbug #1877.
4767    
4768            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
4769    
4770            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
4771            optimize if a raster layer is visible. Fixes RTbug #1931.
4772            Only draw the raster layer if the gdal library is available.
4773            Addresses RTbug #1877.
4774    
4775            * test/test_classgen.py: Add tests for generate_singletons,
4776            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
4777            (test_calculate_quantiles): Fix some tests to catch the new
4778            ValueError that is raised.
4779    
4780            * test/test_proj.py: Use renamed projection resource functions.
4781    
4782            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
4783            test for saving classified layers. Fixes RTbug #1902.
4784            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
4785    
4786    2003-06-12  Jan-Oliver Wagner <[email protected]>
4787    
4788            Fix for http://intevation.de/rt/webrt?serial_num=1900.
4789    
4790            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
4791    
4792            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
4793            multiplechoicedialog.py rather than from the wxPython library.
4794    
4795    2003-06-11  Frank Koormann  <[email protected]>
4796    
4797            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
4798            update.
4799    
4800    2003-06-11  Frank Koormann  <[email protected]>
4801    
4802            * Thuban/Lib/fileutil.py (get_application_dir): New function to
4803            determine the absolute .thuban/thuban directory under
4804            "posix" (os.expanduser) and "nt" (read AppData registry key).
4805    
4806            * Thuban/Model/resource.py: Use get_application_dir
4807    
4808            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
4809            Use get_application_dir.
4810    
4811    2003-06-10  Bernhard Herzog  <[email protected]>
4812    
4813            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
4814            the messages MAP_LAYERS_REMOVED messages
4815            (LayerTableFrame.OnClose): Unsubscribe from it.
4816            (LayerTableFrame.map_layers_removed): New. Receiver for
4817            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
4818            dialog is showing is removed.
4819    
4820    2003-06-10  Bernhard Herzog  <[email protected]>
4821    
4822            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
4823            of the receivers list so that unsubscribing in a receiver doesn't
4824            modify it while iterating over it.
4825    
4826            * test/test_connector.py
4827            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
4828            unsubscribing in a receiver works correctly. See docstring for
4829            details
4830    
4831    2003-06-10  Bernhard Herzog  <[email protected]>
4832    
4833            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
4834            message.
4835    
4836            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
4837            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
4838            LAYER_CHANGED will still be sent if the classification changes.
4839    
4840            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
4841            parameter so we can subscribe to some of its messages
4842            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
4843            and the layer's LAYER_SHAPESTORE_REPLACED
4844            (Classifier.unsubscribe_messages): New. Unsubscribe from message
4845            subscribed to in __init__
4846            (Classifier.map_layers_removed)
4847            (Classifier.layer_shapestore_replaced): receivers for the messages
4848            subscribed to in __init__. Unsubscribe and close the dialog
4849    
4850            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
4851            the map to the Classifier dialog
4852    
4853            * test/test_layer.py (SetShapeStoreTests): Derive from
4854            SubscriberMixin as well so we can test messages
4855            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
4856            messages
4857            (SetShapeStoreTests.tearDown): Clear the messages again
4858            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
4859            for the modified flag too
4860            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
4861            to check whether SetShapeStore sets the modified flag
4862            (SetShapeStoreTests.test_set_shape_store_different_field_name)
4863            (SetShapeStoreTests.test_set_shape_store_same_field)
4864            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
4865            Add tests for the messages. This checks both the new
4866            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
4867    
4868    2003-06-06  Jan-Oliver Wagner <[email protected]>
4869    
4870            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
4871            the menu items.
4872    
4873    2003-06-05  Frank Koormann  <[email protected]>
4874    
4875            * Thuban/UI/identifyview.py (IdentifyView.__init__):
4876            Layout reimplemented without panel. Make life easier to fit the list
4877            in the dialog.
4878    
4879    2003-06-05  Frank Koormann  <[email protected]>
4880    
4881            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
4882            once on initialisation (Former implementation resulted in multiple
4883            entries for each projection).
4884            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
4885            if set, select the projection found under the specified name. This
4886            overwrites any other selection estimate.
4887            Removed projchoice filling from this method.
4888            (ProjFrame._OnSave, ProjFrame._OnAddToList):
4889            Updated call of ProjFrame.__FillAvailList
4890            (LCCPanel._DoLayout): Moved parameter controls in more common order.
4891    
4892            * Resources/Projections/defaults.proj: Extended defaults representing
4893            various common European projections.
4894    
4895    2003-06-05  Frank Koormann  <[email protected]>
4896    
4897            * Thuban/UI/identifyview.py (IdentifyView.__init__):
4898            Use ListCtrl instead of GridCtrl
4899    
4900            * Thuban/Model/resource.py:
4901            Guess location of .thuban directory from tempdir parent directory.
4902    
4903            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
4904            Guess location of .thuban directory from tempdir parent directory.
4905    
4906    2003-06-04  Bernhard Herzog  <[email protected]>
4907    
4908            Do not cache the values returned by the tree widget's
4909            GetFirstChild and GetNextChild methods because it led to lots of
4910            segfaults. The new way requires more brute force but is more
4911            reliable.
4912    
4913            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
4914            variable layer2id
4915            (LegendTree.find_layer): New method to do with brute force what
4916            layer2id tried to accomplish
4917            (LegendTree._OnMsgLayerChanged)
4918            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
4919            Use find_layer instead of layer2id
4920            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
4921            update layer2id anymore
4922            (LegendTree._OnMsgMapLayersRemoved)
4923            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
4924    
4925    2003-06-03  Thomas Koester  <[email protected]>
4926    
4927            * Thuban/Model/classgen.py (GenQuantiles0): New function.
4928    
4929    2003-06-02  Bernhard Herzog  <[email protected]>
4930    
4931            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
4932            New commands.
4933            (main_menu): Add the new commands.
4934            (MainWindow.TableRename): New. Implementation of the table_rename
4935            command.
4936            (MainWindow.RenameLayer): New. Implementation of the layer_rename
4937            command.
4938    
4939            * Thuban/Model/session.py (Session.AddTable): call self.changed to
4940            set the modified flag
4941    
4942            * test/test_session.py (TestSessionSimple.test_add_table): Test
4943            whether the modified flag is set properly
4944    
4945            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
4946            instead of issue so that the modified flags get updated.
4947    
4948            * test/test_base.py (SomeTitledObject): Derive from Modifiable
4949            instead of Publisher to reflect reality better and to accomodate
4950            the fact that SetTitle now calls changed instead of issue
4951    
4952    2003-06-02  Bernhard Herzog  <[email protected]>
4953    
4954            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
4955            acquisition has to happen before the try in a try-finally.
4956    
4957    2003-06-02  Bernhard Herzog  <[email protected]>
4958    
4959            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
4960            possible that a layer is removed that is not currently selected in
4961            the legend so don't check for this.
4962    
4963    2003-05-30  Bernhard Herzog  <[email protected]>
4964    
4965            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
4966            variables to None that have direct or indirect references to
4967            shapefiles or dbf files to make sure that they do go away and the
4968            files are closed.
4969    
4970    2003-05-30  Bernhard Herzog  <[email protected]>
4971    
4972            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
4973            availImgListIndices when a new image list is created
4974            
4975    2003-05-30  Bernhard Herzog  <[email protected]>
4976    
4977            * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
4978            changing_selection to indicate whether the LegendTree code itself
4979            is currently changing the selection
4980            (LegendTree.normalize_selection): New method to normalize the
4981            selection by selecting the layer item even if the user clicked on
4982            the classification.
4983            (LegendTree._OnSelChanged): normalize the selection. This works
4984            around a bug in wx which doesn't keep track of the selection
4985            properly when subtrees are deleted.
4986    
4987    2003-05-30  Bernhard Herzog  <[email protected]>
4988    
4989            * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
4990            maximum and minimum scale factors.
4991    
4992            * test/test_classgen.py (ClassGenTest.test): Update to reflect the
4993            changes in classgen.py
4994    
4995    2003-05-30  Jonathan Coles   <[email protected]>
4996    
4997            * Thuban/Model/classgen.py: Remove ClassGenerator class but make
4998            all the methods functions. Fixes RTBug #1903.
4999    
5000            * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
5001            to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
5002            RTBug #1907.
5003    
5004            * Thuban/UI/classgen.py: Use classgen functions that were part
5005            of the ClassGenerator class. Put try/finally blocks around
5006            code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
5007            RTBug #1904.
5008    
5009            * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
5010    
5011            * Thuban/UI/legend.py: The legend was cleared and repopulated any
5012            time something changed which caused some state to be lost such
5013            as which children were expanded or collapsed. Fixes RTBug #1901.
5014            (LegendTree._OnMsgMapLayersAdded): Add only new layers.
5015            (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
5016            the legend but not in the map.
5017            (LegendTree.__FillTree): Move main functionality out into smaller
5018            methods that can be used by other methods.
5019            (LegendTree.__FillTreeLayer): Reuse old slots in the image list
5020            if they are available.
5021            (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
5022            that we override the wxTreeCtrl method. Iterate over children
5023            and call __RemoveLayer.
5024            (LegendTree.__AddLayer): New. Add a new layer to the legend.
5025            (LegendTree.__RemoveLayer): Remove a layer from the legend.
5026            (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
5027            Should only be called with the id of a layer branch.
5028            (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
5029            Returns the root item or creates one if necessary.
5030    
5031            * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
5032            ProjectRasterFile with tuple arguments instead of strings.
5033    
5034            * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
5035            with try/finally. Fixes RTBug #1904.
5036    
5037            * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
5038            with try/finally. Fixes RTBug #1904.
5039            (MapCanvas.FitSelectedToWindow): If a single point is selected
5040            simply center it on the display. Fixes RTBug #1849.
5041    
5042            * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
5043            to be compiled as a standalone app. Now the code can only be
5044            called from Python which simplifies the parameter passing.
5045            (ProjectRasterFile): Handle Python arguments. Remove code that
5046            checks for a destination dataset. Add more clean up code.
5047    
5048            * test/test_map.py (TestMapWithContents.test_raise_layer_top,
5049            TestMapWithContents.test_lower_layer_bottom):
5050            Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
5051            Fixes RTBug #1907.
5052    
5053            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
5054            extent to the map when the legend is toggled. Fixes RTBug #1881.
5055    
5056    2003-05-29  Jan-Oliver Wagner <[email protected]>
5057    
5058            * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
5059            unsubscribes all that is subcribed in __init__.
5060    
5061    2003-05-28  Bernhard Herzog  <[email protected]>
5062    
5063            * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
5064            (MainWindow.CanDuplicateLayer): New methods to implement the
5065            Layer/Duplicate command.
5066            (layer_duplicate command): New.
5067            (main_menu): Add layer_duplicate to the Layer menu.
5068    
5069    2003-05-28  Bernhard Herzog  <[email protected]>
5070    
5071            * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
5072            renderer so that NULL/None values get displayed differently (by a
5073            gray rectangle).
5074            (TableGrid.__init__): Override the default renderers
5075    
5076    2003-05-28  Bernhard Herzog  <[email protected]>
5077    
5078            * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
5079            classification to "None" if the type of the field has changed.
5080    
5081            * test/test_layer.py (SetShapeStoreTests): New. Class with a few
5082            test for the Layer.SetShapeStore method
5083    
5084    2003-05-28  Jan-Oliver Wagner <[email protected]>
5085    
5086            * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
5087            does not necessarily have a filename).
5088    
5089    2003-05-28  Jan-Oliver Wagner <[email protected]>
5090    
5091            * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
5092            sort the selection list for the dialog.
5093    
5094    2003-05-28  Frank Koormann  <[email protected]>
5095    
5096            * extensions/thuban/wxproj.cpp
5097            (project_point): Removed cast to int for projected point coordinates.
5098            (shape_centroid): Return last point if all polygon vertices fall
5099            to one point.
5100    
5101    2003-05-28  Bernhard Herzog  <[email protected]>
5102    
5103            * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
5104            with layers that don't have shapestores, i.e. raster layers.
5105    
5106    2003-05-28  Bernhard Herzog  <[email protected]>
5107    
5108            * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
5109            when determining the title from the filename.
5110    
5111            * test/test_dbf_table.py (TestDBFTable.test_title): Update to
5112            reflect changes in the way the title is derived from the filename
5113    
5114    2003-05-28  Frank Koormann  <[email protected]>
5115    
5116            * Thuban/UI/mainwindow.py (MainWindow.TableShow):
5117            Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
5118    
5119    2003-05-27  Bernhard Herzog  <[email protected]>
5120    
5121            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
5122            delegate SelectedLayer.
5123            (MainWindow.LayerUnjoinTable): Implement.
5124            (_can_unjoin): New. Helper function for the sensitivity of the
5125            layer/unjoin command.
5126    
5127            * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
5128            (DerivedShapeStore.OrigShapeStore): New. Return the original
5129            shapestore. Used to figure out how to unjoin.
5130            (DerivedShapeStore.Shapefile): Fix a typo.
5131    
5132    2003-05-27  Bernhard Herzog  <[email protected]>
5133    
5134            * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
5135            well
5136            (JoinDialog.__init__): Use the layer parameter and only build the
5137            left choice when a layer is given
5138            (JoinDialog.OnJoin): Handle layer joins as well
5139            (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
5140            that the user selects the "Select..." item. The sensitivitly
5141            updating is now in update_sensitivity
5142            (JoinDialog.y): New method to refactor the sensitivity update of
5143            the join button into its own method.
5144    
5145            * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
5146    
5147    2003-05-27  Bernhard Herzog  <[email protected]>
5148    
5149            * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
5150            iff there are unreferenced tables in the session
5151    
5152    2003-05-27  Bernhard Herzog  <[email protected]>
5153    
5154            * Thuban/Model/messages.py (TABLE_REMOVED): New message.
5155    
5156            * Thuban/Model/session.py (Session.UnreferencedTables): New method
5157            to return tables that are not referenced by other tables or shape
5158            stores and can be removed.
5159            (Session.RemoveTable): Issue a TABLE_REMOVED message after
5160            removing the table
5161    
5162            * Thuban/UI/mainwindow.py: Remove unused imports
5163            (MainWindow.TableClose): Implement.
5164    
5165            * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
5166            messages so that the frame will be automatically closed when a new
5167            session is opened or the table is removed.
5168            (TableFrame.OnClose): Unsubscribe the Subscriptions made in
5169            __init__
5170            (TableFrame.close_on_session_replaced)
5171            (TableFrame.close_on_table_removed): New. Subscribers that close
5172            the window
5173    
5174            * test/test_session.py (TestSessionMessages.test_remove_table)
5175            (TestSessionSimple.test_remove_table): Move the test to
5176            TestSessionSimple and add test for the TABLE_REMOVED message
5177            (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
5178            (TestSessionSimple.test_unreferenced_tables) New. Test for the
5179            UnreferencedTables method.
5180            (UnreferencedTablesTests): New. Class with some more sophisticated
5181            tests for UnreferencedTables.
5182    
5183    2003-05-27  Frank Koormann  <[email protected]>
5184    
5185            * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
5186            display has some unwanted side effects. Removed again.
5187    
5188    2003-05-27  Frank Koormann  <[email protected]>
5189    
5190            * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
5191    
5192            * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
5193    
5194    2003-05-27  Jan-Oliver Wagner <[email protected]>
5195    
5196            * test/test_menu.py (MenuTest.test): Added test for
5197            Menu.RemoveItem().
5198    
5199            * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
5200            the menu.
5201    
5202    2003-05-27  Frank Koormann  <[email protected]>
5203            
5204            Nonmodal dialogs without parent (i.e. they can fall behind the main
5205            window)
5206    
5207            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
5208            all dialogs in the dialogs dictionary and the canvas.
5209    
5210            * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
5211            parent, i.e. can fall behind other windows.
5212            (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
5213            dictionary before removing it.
5214    
5215            * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
5216    
5217            * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
5218            * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
5219            * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
5220    
5221    2003-05-27  Bernhard Herzog  <[email protected]>
5222    
5223            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
5224            tableview dialog
5225            (MainWindow.TableShow): Use ShowTableView to open the dialogs.
5226            Also, don't use the table's titles as the dialog names. The titles
5227            aren't guaranteed to be unique.
5228            (MainWindow.TableOpen): Open a table view dialog after opening the
5229            table
5230    
5231    2003-05-27  Bernhard Herzog  <[email protected]>
5232    
5233            * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
5234            effect can be achieved by simply closing the window showing the
5235            table.
5236            (MainWindow.TableHide): Removed.
5237            (main_menu): Removed "table_hide"
5238    
5239    2003-05-27  Frank Koormann  <[email protected]>
5240    
5241            Fix legend tree display problems under Win32
5242    
5243            * Thuban/UI/legend.py:  BMP_SIZE_W = 15
5244            (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
5245            (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
5246    
5247            * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
5248    
5249    2003-05-27  Jan-Oliver Wagner <[email protected]>
5250    
5251            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
5252            'after' now allows to insert separators almost anywhere in the menu.
5253    
5254    2003-05-27  Frank Koormann  <[email protected]>
5255    
5256            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
5257            "S" of selection box label to hint on hot key (Alt-S). Works under
5258            Win32 but is ignored under GTK.
5259    
5260    2003-05-26  Frank Koormann  <[email protected]>
5261    
5262            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
5263            Center Choices.
5264    
5265    2003-05-26  Bernhard Herzog  <[email protected]>
5266    
5267            Remove the Precision methods again. They're too DBF specific to be
5268            part of the table interface and they're only used in table_to_dbf
5269            anyway.
5270            
5271            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
5272            fixed precision of 12 for doubles.
5273            (TransientTableBase.Precision): Removed
5274            (AutoTransientTable.Width): Delegate to self.table.
5275    
5276            * Thuban/Model/table.py (DBFTable.Precision)
5277            (MemoryTable.Precision): Removed.
5278            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
5279            (table_to_dbf): Use a fixed precision of 12 for floats unless the
5280            column object specifies something else.
5281    
5282            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
5283            test for table_to_dbf
5284    
5285    2003-05-26  Bernhard Herzog  <[email protected]>
5286    
5287            * test/test_transientdb.py
5288            (TestTransientTable.run_iceland_political_tests): Fix a comment.
5289    
5290    2003-05-26  Bernhard Herzog  <[email protected]>
5291    
5292            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
5293            implementation. Mark parts of the file format strings for
5294            localization.
5295    
5296            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
5297            file and add the table to the tables managed by the session
5298    
5299            * test/test_session.py (TestSessionSimple.test_open_table_file):
5300            New. test case for OpenTableFile
5301    
5302    2003-05-26  Jan-Oliver Wagner <[email protected]>
5303    
5304            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
5305            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
5306            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
5307            Replace the true/false of wxWindows by True/False of Python 2.2.1.
5308    
5309    2003-05-26  Jan-Oliver Wagner <[email protected]>
5310    
5311            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
5312            already a selection present, update the grid accordingly.
5313    
5314            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
5315            resizeable and increase its initial size.
5316    
5317    2003-05-26  Frank Koormann  <[email protected]>
5318    
5319            Table export functionality
5320    
5321            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
5322            Return width (in characters) for a column.
5323            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
5324            (table_to_dbf): Write table to dbf file.
5325            (table_to_csv): Write table to csv file.
5326    
5327            * Thuban/Model/transientdb.py (TransientTableBase.Width,
5328            TransientTableBase.Precision): Return column width and precision.
5329    
5330            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
5331            or table_to_csv depending on file selection.
5332    
5333            * test/test_dbf_table.py:
5334            Test table_to_dbf (extension of former part of test).
5335    
5336            * test/test_csv_table.py:
5337            Test table_to_csv.
5338    
5339    2003-05-23  Jan-Oliver Wagner <[email protected]>
5340    
5341            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
5342            Use QueryTableFrame instead of TableFrame.
5343    
5344            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
5345            table window with 'Layer Table:' instead of 'Table:'.
5346    
5347    2003-05-23  Jan-Oliver Wagner <[email protected]>
5348    
5349            Give all tables a title via mix-in TitledObject.LayerShowTable
5350    
5351            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
5352            only if it exists.
5353    
5354            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
5355            and call its init-method with a default title. Remove Title() method.
5356    
5357            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
5358            AutoTransientTable): mix-in TitledObject and call its init-method with
5359            a default title. Remove Title() method.
5360    
5361    2003-05-23  Bernhard Herzog  <[email protected]>
5362    
5363            * Thuban/Model/session.py (Session.AddShapeStore): Define
5364            AddShapeStore analogously to AddTable.
5365    
5366            * test/test_session.py (TestSessionSimple.test_add_shapestore):
5367            New. Test for AddShapeStore
5368    
5369    2003-05-23  Jan-Oliver Wagner <[email protected]>
5370    
5371            Introducing QueryTableFrame and a very coarse ShowTable implementation.
5372    
5373            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
5374            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
5375            The latter implements the selection GUI without dependency on a layer.
5376            LayerTableFrame now is derived from QueryTableFrame and connects
5377            to a layer.
5378    
5379            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
5380            implementation that still needs work.
5381    
5382            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
5383    
5384    2003-05-22  Frank Koormann  <[email protected]>
5385    
5386            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
5387            Added "outer_join = False" as optional parameter.
5388            (TransientJoinedTable.create): If outer join is true, perform a
5389            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
5390            the left table. Records not matching are filled with 0 / None.
5391    
5392            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
5393            (JoinDialog.OnJoin): Consider outer join check box.
5394    
5395    2003-05-22  Bernhard Herzog  <[email protected]>
5396    
5397            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
5398            somewhat safer way. Storing the traceback in a local variable can
5399            lead to memory leaks
5400    
5401    2003-05-22  Bernhard Herzog  <[email protected]>
5402    
5403            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
5404            the wxMessageDialog's Destroy() method.
5405    
5406    2003-05-22  Frank Koormann  <[email protected]>
5407    
5408            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
5409            TransientTable.Title()
5410    
5411    2003-05-22  Frank Koormann  <[email protected]>
5412    
5413            Join Dialog, initial version.
5414    
5415            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
5416    
5417            * Thuban/UI/join.py (JoinDialog): Functional implementation of
5418            former framework. Renamed Table1/Table2 to LeftTable/RightTable
5419            in all occurences.
5420    
5421            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
5422            Typo fixed.
5423    
5424    2003-05-22  Bernhard Herzog  <[email protected]>
5425    
5426            Give the tables titles so that the GUI can display more meaningful
5427            names. For now the titles are fixed but depend on e.g. filenames
5428            or the titles of the joined tables.
5429    
5430            * Thuban/Model/transientdb.py (TransientTable.Title)
5431            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
5432    
5433            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
5434    
5435            * test/test_transientdb.py
5436            (TestTransientTable.test_auto_transient_table_title): New. Test
5437            for the Title method
5438            (TestTransientTable.test_transient_joined_table)
5439            (TestTransientTable.test_transient_table): Add test for the Title
5440            methods
5441    
5442            * test/test_memory_table.py (TestMemoryTable.test_title): New.
5443            Test for the Title method
5444    
5445            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
5446            the Title method
5447    
5448    2003-05-22  Bernhard Herzog  <[email protected]>
5449    
5450            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
5451            Provide a better way to destroy the layers
5452            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
5453            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
5454            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
5455            the new way to destroy the layers.
5456            (TestLayer.test_derived_store): New. Test for using a layer with a
5457            DerivedShapeStore
5458    
5459            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
5460            filename if the shape store actually has one.
5461    
5462    2003-05-22  Bernhard Herzog  <[email protected]>
5463    
5464            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
5465            for the filename
5466    
5467            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
5468            for the FileName method
5469            (TestDBFTableWriting.test_write): Fix spelling of filename
5470    
5471    2003-05-22  Thomas Koester  <[email protected]>
5472    
5473            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
5474            from SciParam that now really is immutable.
5475    
5476    2003-05-22  Frank Koormann  <[email protected]>
5477    
5478            Layer Top/Bottom placement added to legend.
5479    
5480            * Thuban/UI/legend.py
5481            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
5482            bound to tool events.
5483            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
5484            New, methods binding the event methods with the map methods.
5485    
5486            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
5487            layer at top/bottom of layer stack.
5488    
5489            * Resources/Bitmaps/top_layer.xpm: New button icon.
5490    
5491            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
5492    
5493    2003-05-22  Bernhard Herzog  <[email protected]>
5494    
5495            * Thuban/Model/session.py (Session.RemoveTable): New method to
5496            remove tables
5497    
5498            * test/test_session.py (TestSessionSimple.test_remove_table): New.
5499            Test for RemoveTable
5500    
5501    2003-05-22  Thomas Koester  <[email protected]>
5502    
5503            * Thuban/Model/classgen.py: Added short module doc string and CVS id.
5504            (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
5505    
5506    2003-05-22  Bernhard Herzog  <[email protected]>
5507    
5508            Implement a way to discover dependencies between tables and
5509            shapestores.
5510    
5511            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
5512            (TransientJoinedTable.Dependencies)
5513            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
5514            interface
5515            (TransientJoinedTable.__init__): Keep tack of the original table
5516            objects in addition to the corresponding transient tables.
5517    
5518            * Thuban/Model/table.py (DBFTable.Dependencies)
5519            (MemoryTable.Dependencies): New. Implement the dependencies
5520            interface
5521    
5522            * Thuban/Model/data.py (ShapeTable): New. Helper class for
5523            ShapefileStore
5524            (ShapefileStore.__init__): Use ShapeTable instead of
5525            AutoTransientTable
5526            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
5527            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
5528            methods for filename and type
5529            (ShapefileStore.Dependencies): New. Implement the dependencies
5530            interface
5531            (DerivedShapeStore): New class to replace SimpleStore. The main
5532            difference to SimpleStore is that it depends not on a shapefile
5533            but another shapestore which expresses the dependencies a bit
5534            better
5535            (SimpleStore.__init__): Add deprecation warning.
5536    
5537            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
5538            Test for the Dependencies method.
5539    
5540            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
5541            New. Test for the Dependencies method.
5542    
5543            * test/test_transientdb.py
5544            (TestTransientTable.test_auto_transient_table_dependencies): New.
5545            Test for the Dependencies method.
5546            (TestTransientTable.test_transient_joined_table): Add test for the
5547            Dependencies method.
5548    
5549            * test/test_session.py (TestSessionSimple.setUp)
5550            (TestSessionSimple.tearDown): New. Implement a better way to
5551            destroy the sessions.
5552            (TestSessionSimple.test_initial_state)
5553            (TestSessionSimple.test_add_table): Bind session to self.session
5554            so that it's destroyed by tearDown
5555            (TestSessionSimple.test_open_shapefile): New. Test for
5556            OpenShapefile and the object it returns
5557    
5558    2003-05-22  Bernhard Herzog  <[email protected]>
5559    
5560            * Thuban/Model/session.py (Session.AddTable): New method to
5561            register tables with the session.
5562            (Session.Tables): Return the tables registered with AddTable too.
5563    
5564            * test/test_session.py (TestSessionSimple.test_add_table): New.
5565            Test case for the AddTable method
5566    
5567    2003-05-22  Frank Koormann  <[email protected]>
5568    
5569            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
5570            lower right corner, center labels for selections, initialize controls
5571            in reasonable order for keyboard navigation.
5572    
5573            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
5574            (ProjFrame.__DoOnProjAvail): Determine position of current projection
5575            using the wxListBox.FindString() method. Still a problem (#1886)
5576    
5577            * Thuban/UI/classifier.py
5578            (Classifier.__init__, SelectPropertiesDialog.__init__)
5579    
5580            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
5581            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
5582            different classification types from here to __init__.
5583            (GenUniquePanel.__init__): Set the column width of the first field
5584            in the Field ListCtrl to the full width.
5585    
5586            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
5587            Button to 'Export'. Center Buttons in Selection Box, set Focus to
5588            Grid.
5589            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
5590            changes focus to the Selection when pressing "Alt-S".
5591    
5592            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
5593            the text if not visible. The italic font sometimes exceeds the
5594            rendering area.
5595    
5596    2003-05-21  Jonathan Coles   <[email protected]>
5597    
5598            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
5599            to OnClose so that Thuban closes correctly.
5600    
5601            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
5602            DockFrame.OnClose, not DockFrame._OnClose.
5603    
5604    2003-05-21  Jonathan Coles   <[email protected]>
5605    
5606            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
5607            references to 'inf' and use new Range __init__ to pass floats
5608            directly rather than converting them to strings first.
5609            Fixes RTBug #1876.
5610    
5611            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
5612            Use new Range ___init__ to pass floats.
5613    
5614            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
5615            filename is a valid image file. Throw IOError otherwise.
5616    
5617            * Thuban/Model/range.py: Brought over new Range from SciParam that
5618            is immutable and has an __init__ which can accept floats.
5619    
5620            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
5621            into try block. AddLayer doesn't throw any exceptions anymore.
5622            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
5623            try block.
5624    
5625            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
5626            the first item in choices. Fixes RTBug #1882.
5627    
5628            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
5629            has gone to 0 which is a serious problem. abort.
5630            (MapRenderer.draw_raster_layer): Catch IOError seperately and
5631            print the error from GDAL.
5632    
5633            * Thuban/UI/tableview.py (TableGrid.__init__): Call
5634            ToggleEventListeners to turn on listening.
5635            (TableGrid.ToggleEventListeners): New. Turns event listening on
5636            and off so as to prevent excessive messages.
5637            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
5638            to suppress excessive messages when selecting many rows.
5639            Fixes RTBug #1880.
5640    
5641            * Thuban/UI/view.py: Added checks against if scale == 0. This
5642            is a serious problem that can occur when an image without
5643            geo data is loading and causes the map projection bounds to
5644            go to infinity. Right now, the solution is to simply try
5645            to recover.
5646    
5647            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
5648            to set the MFILEReceiver attributes even if the data is NULL.
5649    
5650            * extensions/thuban/gdalwarp.cpp: Improved the error handling
5651            and passed GDAL messages back up to the Python layer. Also
5652            tried to fix some memory leaks that were present in the original
5653            utility but didn't matter because the program aborted.
5654    
5655            * test/test_range.py: Copied over tests from SciParam. Removed
5656            tests against importing. Fixes RTBug #1867.
5657    
5658    2003-05-21  Bernhard Herzog  <[email protected]>
5659    
5660            * test/test_load.py: Remove unused imports and restructure the
5661            test code
5662            (LoadSessionTest): Split into one class for each test and turn
5663            LoadSessionTest itself into the base class for all such session
5664            tests.
5665            (ClassificationTest): New base class for load tests that test
5666            classifications
5667            (TestSingleLayer, TestLayerVisibility, TestClassification)
5668            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
5669            for the individual tests
5670    
5671            * test/support.py (FileLoadTestCase.filename): New base class for
5672            file loading tests
5673    
5674    2003-05-21  Jan-Oliver Wagner <[email protected]>
5675    
5676            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
5677            Mercator' to 'UTM Zone 32' as a more convenient example.
5678            Added 'Gauss Krueger Zone 6'.
5679    
5680            * Data/iceland_sample_raster.thuban: political polygon now
5681            filled transparent to have the raster image visible at once.
5682    
5683    2003-05-21  Frank Koormann  <[email protected]>
5684    
5685            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
5686            OnClose() to keep in sync with extensions. Internally Thuban
5687            still uses "underscored" names.
5688    
5689    2003-05-20  Jonathan Coles   <[email protected]>
5690    
5691            This puts back Raster layer support. These layers support projections
5692            through the GDAL library. Currently, the CVS version is being used.
5693            There are no Debian packages available although this may change soon.
5694            A GDAL driver was extended to support writing to memory rather to
5695            files.
5696    
5697            There is still some work that needs to be done, such as some error
5698            handling when loading invalid images or when there is a problem
5699            projecting the image. This putback simply checks in the majority
5700            of the work.
5701    
5702            * setup.py: Add gdalwarp library extension.
5703    
5704            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
5705            Defaults to False, but can be overridden by subclasses if they
5706            support classification.
5707            (RasterLayer): New. Defines a new layer that represents an
5708            image.
5709    
5710            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
5711            tag handler.
5712            (SessionLoader.start_layer): Encode the filename.
5713            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
5714            New. Supports reading a rasterlayer tag.
5715    
5716            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
5717    
5718            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
5719            get a string in Latin1. If we get such as string convert it to
5720            unicode first, otherwise leave if alone before encoding.
5721            (SessionSaver.write_layer): Add support for writing both Layers
5722            and RasterLayers.
5723    
5724            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
5725            The right argument may not be a string, it could also be a Column.
5726    
5727            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
5728            Make initial window size 600x400. Fixes RTBug #1872.
5729    
5730            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
5731            the dialog is constructed so that we can support layers that
5732            do not have classifications.
5733            (Classifier._OnTry): Only build a classification if the layer
5734            supports one.
5735    
5736            * Thuban/UI/legend.py: Change all checks that a layer is an
5737            instance of Layer into checks against BaseLayer.
5738            (LegendTree.__FillTreeLayer): Only add children to a branch if
5739            the layer supports classification.
5740    
5741            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
5742            MainWindow.OpenSession): Don't proceed with an action if the
5743            user chooses Cancel when they are asked to save changes.
5744            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
5745            user to select an image file. Create a new RasterLayer and add
5746            it to the map.
5747    
5748            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
5749            for rendering RasterLayer layers.
5750            (MapRenderer.draw_raster_layer): Actually method that calls
5751            the GDALWarp python wrapper and constructs an image from the
5752            data returned.
5753    
5754            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
5755            Choices symbols to match those used in the table query method.
5756            Replace deprecated method calls on table with new method names.
5757    
5758            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
5759            how small the scale can get. This still needs more testing.
5760    
5761            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
5762            Provides a driver to output in .bmp format.
5763    
5764            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
5765            New. Provides IO routines which write to memory, rather than a file.
5766    
5767            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
5768            of the gdalwarp utility provided in GDAL. Added function calls
5769            that can be accessed from python.
5770    
5771            * Data/iceland_sample_raster.thuban: New. Sample file that uses
5772            a raster layer.
5773    
5774            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
5775            layer image data.
5776    
5777            * Doc/thuban.dtd: Added rasterlayer attribute definition.
5778    
5779            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
5780            tests associated with the raster layer code.
5781    
5782            * test/test_transientdb.py
5783            (TestTransientTable.test_auto_transient_table_query): Added a test
5784            for using a Column object as the "right" parameter to a query.
5785    
5786    2003-05-19  Frank Koormann  <[email protected]>
5787    
5788            * Thuban/version.py (get_changelog_date):
5789            Catch exceptions if ChangeLog does not exist.
5790    
5791            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
5792    
5793    2003-05-19  Frank Koormann  <[email protected]>
5794    
5795            Extended version information for Thuban
5796    
5797            * Thuban/version.py: New, version information for Thuban: Last
5798            modification date and last ChangeLog entry date.
5799    
5800            * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
5801            information: Display Thuban, wxPython and Python version.
5802    
5803    2003-05-16  Bernhard Herzog  <[email protected]>
5804    
5805            * Thuban/Model/save.py: Remove some unused imports including the
5806            __future__ import for nested_scopes as Thuban relies on Python 2.2
5807            now.
5808            (XMLWriter.encode): Remove the special case for a None argument.
5809            In the saver encode is always called with a string argument.
5810    
5811    2003-05-16  Bernhard Herzog  <[email protected]>
5812    
5813            * Thuban/UI/__init__.py: Remove the work-around for the locale bug
5814            in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
5815            of the bug was that e.g. float("1.2") would fail. Thuban now
5816            requires 2.4.x.
5817            
5818    2003-05-16  Frank Koormann   <[email protected]>
5819    
5820            Printing enhancement and WMF export (under Win32)
5821    
5822            * Thuban/UI/renderer.py (ExportRenderer): New, derived from
5823            ScreenRenderer. Renders Map, Legend and Scalebar for export.
5824            (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
5825            PrintRender.
5826    
5827            * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
5828            to fullfil information needed for PrinterRenderer.
5829            (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
5830            (MapCanvas.Print): Adapted to new MapPrintout.
5831            (OutputTransform): General calculations to transform from canvas
5832            coordinates to export/printing devices.
5833    
5834            * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
5835            new method_command to call ExportMap, with platform dependency (only
5836            __WXMSW__)
5837      
5838            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
5839            of scalebar drawing area as new parameters.
5840            
5841            * Thuban/Model/scalebar.py (roundInterval): round long instead of int
5842    
5843            * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
5844            Update to extended scalebar.DrawScalebar header.
5845    
5846            * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
5847    
5848            * test/test_scalebar.py: Made test executable as standalone.
5849    
5850    2003-05-16  Bernhard Herzog  <[email protected]>
5851    
5852            * Thuban/Model/table.py (Table): Remove this compatibility alias
5853            for DBFTable.
5854    
5855            * test/test_table.py: Import DBFTable as Table because that alias
5856            doesn't exist anymore.
5857    
5858            * Thuban/UI/classgen.py: Remove some unused imports
5859    
5860    2003-05-14  Jonathan Coles   <[email protected]>
5861    
5862            * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
5863            Fix docstring.
5864            (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
5865            (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
5866            values of the supplied range to determine the beginning and end
5867            bounds of the generated classes.
5868    
5869            * Thuban/Model/range.py (Range.number_re): Now accepts floats that
5870            do not have a leading 0 (.5 is now accepted as well as 0.5).
5871    
5872            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
5873            call to ClassGenerator.GenUniformDistribution.
5874    
5875            * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
5876            layout bug with the 'Projection' label.
5877    
5878            * test/support.py (FloatTestCase): New. Needed for the Range tests.
5879    
5880            * test/test_range.py: New. Imported from SciParam.
5881    
5882    2003-05-12  Jonathan Coles   <[email protected]>
5883    
5884            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
5885            to table.UniqueValues() with calls that retrieve all the values
5886            from the table. This will need to be replaced by a method on table
5887            which can simply return the list (perhaps more efficiently).
5888    
5889    2003-05-12  Jonathan Coles   <[email protected]>
5890    
5891            The return value of ClassGenerator.CalculateQuantiles has changed.
5892            Refer to the documentation for details.
5893    
5894            * test/test_classgen.py: Modified Quantile tests to use the
5895            new return values.
5896    
5897            * Thuban/Model/classgen.py
5898            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
5899            use new return values from CalculateQuantiles to produce the correct
5900            range bounds in the Classification.
5901            (ClassGenerator.CalculateQuantiles): Add more comments describing
5902            the return values and parameters. Make minor adjustments to improve
5903            the legibility of the code. Fix problem with adjusted not being set
5904            in most cases.
5905    
5906    2003-05-12  Frank Koormann <[email protected]>
5907            
5908            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
5909            and latin1. Fixes #1851 finally.
5910    
5911    2003-05-09  Jonathan Coles   <[email protected]>
5912    
5913            * test/test_classgen.py: New. Tests the Quantile algorithm.
5914    
5915            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
5916            Clean up debugging statement, add comments, fix a small bug in the
5917            returned adjusted percentiles.
5918            
5919    2003-05-09  Jonathan Coles   <[email protected]>
5920    
5921            Introduces Range class from SciParam into the ClassGroupRange class,
5922            and such ranges can now be saved and loaded from disk.
5923    
5924            Quantiles are now available in the Classification Generator.
5925    
5926            Initial support for building Queries on a table. Doesn't do anything
5927            but run some tests.
5928    
5929            * Thuban/Model/classification.py: Explicit imports.
5930            (ClassGroupRange): Use the Range class to store the underlying
5931            range information. The interface remains the same, except for
5932            GetRange(), and you can also supply a Range object as the min
5933            parameter to SetRange or __init__.
5934    
5935            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
5936            string appropriately for use in Thuban. Fixes RTbug #1851.
5937            (SessionLoader.end_projection): Handle the context of the
5938            projection tag a bit better by looking at what objects are not
5939            None. There was an assumption that a projection tag for a map
5940            could occur before any layers.
5941            (SessionLoader.start_clrange): Provide backward compatibility for
5942            reading min/max values as well as the new range parameter.
5943    
5944            * Thuban/Model/map.py: Explicit imports.
5945    
5946            * Thuban/Model/resource.py: Import _.
5947            (ProjFileSaver.write): write header using projfile.dtd.
5948    
5949            * Thuban/Model/save.py: Explicit imports.
5950            (XMLWriter.encode): New. Encode the given string from a format
5951            used by Thuban into UTF-8. Fixes RTbug #1851.
5952    
5953            * Thuban/UI/classgen.py: Explicit imports.
5954            (ClassGenDialog.__init__): Clean up the code and add support
5955            for Quantiles.
5956            (ClassGenDialog.OnOK): Add support for Quantiles.
5957            (GenQuantilesPanel): New. Input panel for Quantiles.
5958            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
5959            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
5960    
5961            * Thuban/Model/classgen.py: New. Contains all the classes named above.
5962    
5963            * Thuban/UI/classifier.py: Explicit imports.
5964            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
5965            ClassTable.SetValueAsCustom): Reworked to use new Range class.
5966    
5967            * Thuban/UI/legend.py: Explicit imports.
5968    
5969            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
5970            a Table menu and associated method calls.
5971            (MainWindow.choose_color): Removed. No longer needed.
5972    
5973            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
5974            should be disabled if no projection is selected in the available
5975            list.
5976    
5977            * Thuban/UI/renderer.py: Explicit imports.
5978    
5979            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
5980            with correctly selecting the rows and issuing the right events.
5981            Be sure to call Skip() to allow the grid to do some of its own
5982            handling which allows the rows to actually be selected.
5983            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
5984            selecting multiple shapes.
5985            (LayerTableFrame): Support for building Queries.
5986            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
5987    
5988            * Thuban/UI/tree.py: Explicit imports.
5989    
5990            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
5991            table view can call it.
5992    
5993            * test/test_classification.py: Explicit imports.
5994            (TestClassification.test_ClassGroupRange): Fix test for new
5995            Range class.
5996    
5997            * Doc/thuban.dtd: Add range parameter for clrange.
5998    
5999            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
6000            object in ClassGroupRange, and also uesd for inputting ranges in
6001            the classifer table and elsewhere.
6002    
6003            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
6004            yet.
6005    
6006    2003-05-09  Frank Koormann <[email protected]>
6007    
6008            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
6009    
6010    2003-05-08  Frank Koormann <[email protected]>
6011    
6012            Coding style updates
6013    
6014            * test/test_scalebar.py: Replaced tab indentation by spaces.
6015    
6016            * Thuban/UI/scalebar.py: Explicit imports.
6017    
6018    2003-05-08  Frank Koormann <[email protected]>
6019    
6020            * Thuban/UI/scalebar.py
6021            (ScaleBar.DrawScalebar): Format string bug fixed.
6022    
6023    2003-05-08  Frank Koormann <[email protected]>
6024    
6025            Reorganization of scalebar component (no wx in Thuban/Model)
6026    
6027            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
6028            (deriveInterval):
6029            Calculate scalebar interval and unit which fits in width for scale.
6030            (roundInterval): Round float.
6031    
6032            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
6033    
6034            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
6035    
6036            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
6037    
6038    2003-05-08  Frank Koormann <[email protected]>
6039    
6040            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
6041            Initialize ScaleBar with canvas.map
6042    
6043            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
6044            round intervals to display smarter lengths
6045            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
6046            layer. If the maps has no projection applied grey the scalebar.
6047    
6048    2003-05-07  Frank Koormann <[email protected]>
6049            
6050            Basic Scalebar features added.
6051    
6052            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
6053    
6054            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
6055            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
6056            and the renderer.
6057    
6058            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
6059    
6060            * Thuban/UI/messages.py: SCALE_CHANGED added.
6061    
6062    2003-05-07  Bernhard Herzog  <[email protected]>
6063    
6064            * Thuban/Model/session.py (Session.__init__): New instance
6065            variable shapestores to hold a list of all open shapestore objects
6066            (Session.ShapeStores): New. Accessor method for the shapestores
6067            list.
6068            (Session._add_shapestore, Session._clean_weak_store_refs): New.
6069            Internal methods to maintain the shapestores list.
6070            (Session.Tables): New. Return all tables open in the session.
6071            (Session.OpenShapefile): Insert the new ShapeStore into the
6072            shapestores list.
6073    
6074            * test/test_session.py (TestSessionSimple.test_initial_state): Add
6075            tests for ShapeStores and Tables
6076            (TestSessionWithContent.test_shape_stores)
6077            (TestSessionWithContent.test_tables): New. Test cases for
6078            ShapeStores and Tables
6079    
6080    2003-05-07  Bernhard Herzog  <[email protected]>
6081    
6082            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
6083            Add comments about the optimizations used.
6084            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
6085            Implement the ReadValue table interface method.
6086    
6087            * test/test_transientdb.py
6088            (TestTransientTable.run_iceland_political_tests)
6089            (TestTransientTable.test_transient_joined_table): Add tests for
6090            ReadValue
6091    
6092    2003-05-07  Frank Koormann <[email protected]>
6093    
6094            * Resources/Bitmaps/fulllayerextent.xpm,
6095            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
6096            new icons.
6097    
6098    2003-05-06  Bernhard Herzog  <[email protected]>
6099    
6100            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
6101            New. Simply delegate to the transient table's version.
6102    
6103            * test/test_transientdb.py
6104            (TestTransientTable.test_auto_transient_table_query): New. Test
6105            case for AutoTransientTable's SimpleQuery
6106    
6107    2003-05-06  Bernhard Herzog  <[email protected]>
6108    
6109            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
6110            Implement a simple query method for the query dialog
6111            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
6112            the row index or shapeid.
6113            (TransientTable.create): Insert the right value of the row index
6114            (TransientJoinedTable.create): Copy the row index of the left
6115            table to the joined result table
6116    
6117            * test/test_transientdb.py
6118            (TestTransientTable.test_transient_table_read_twice): Fix
6119            doc-string
6120            (TestTransientTable.test_transient_table_query): New. Test for the
6121            SimpleQuery method
6122    
6123    2003-05-06  Bernhard Herzog  <[email protected]>
6124    
6125            Convert all table users to use the new table interface. This only
6126            covers Thuban itself, not GREAT-ER or other applications built on
6127            Thuban yet, so the compatibility interface stays in place for the
6128            time being but it now issues DeprecationWarnings.
6129    
6130            Finally, the new Table interface has a new method, HasColumn.
6131    
6132            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
6133            issue deprecation warnings when they're. The warnings refer to the
6134            caller of the method.
6135            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
6136            for the deprecation warnings
6137    
6138            * test/test_table.py: Ignore the deprecation warnings for the old
6139            table in the tests in this module. The purpose of the tests is to
6140            test the old interface, after all.
6141    
6142            * test/test_transientdb.py
6143            (TestTransientTable.run_iceland_political_tests): Use the
6144            constants for the types. Add a test for HasColumn
6145            (TestTransientTable.test_transient_joined_table): Adapt to new
6146            table interface. Add a test for HasColumn
6147            (TestTransientTable.test_transient_table_read_twice): Adapt to new
6148            table interface
6149    
6150            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
6151            Adapt to new table interface
6152    
6153            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
6154            new table interface
6155    
6156            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
6157            (RecordTable.SetTable): Adapt to new table interface
6158    
6159            * Thuban/UI/classifier.py (Classifier.__init__)
6160            (Classifier.__init__): Adapt to new table interface
6161    
6162            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
6163            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
6164            to new table interface
6165    
6166            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
6167            (AutoTransientTable.HasColumn): Implement the new table interface
6168            method
6169            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
6170            (AutoTransientTable.UniqueValues): Adapt to new table interface
6171    
6172            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
6173            Adapt to new table interface
6174    
6175            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
6176            simplify opening shapefiles a bit easier.
6177            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
6178            (TestLayer.test_point_layer): Use the new helper method
6179            (TestLayer.test_get_field_type): New. Test for the GetFieldType
6180            method
6181    
6182            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
6183            the new table method
6184    
6185            * test/test_memory_table.py (TestMemoryTable.test_has_column):
6186            Test for the new table method HasColumn
6187    
6188    2003-05-06  Jonathan Coles   <[email protected]>
6189    
6190            Addresses the "Selection Extent" wish of RTbug #1787.
6191    
6192            * Resources/Bitmaps/fulllayerextent.xpm,
6193            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
6194            extent. These are just place holders for the real bitmaps.
6195    
6196            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
6197            calculate the bounding box once (the first time compute_bbox() is
6198            called).
6199            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
6200            the bounding box for the shapes in lat/long coordinates.
6201    
6202            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
6203            option.
6204            (MainWindow.has_selected_shapes): New. Returns true if there are
6205            any selected shapes.
6206            (MainWindow.FullSelectionExtent): New. Calls
6207            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
6208            (_has_selected_shapes): New. Returns true if there are any
6209            selected shapes.
6210    
6211            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
6212            true if there are any selected shapes.
6213    
6214            * Thuban/UI/view.py (MapCanvas): Added delegated method
6215            HasSelectedShapes.
6216            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
6217            shapes on the canvas using the map projection (if any).
6218    
6219            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
6220            for Layer.ShapesBoundingBox().
6221    
6222    2003-05-06  Bernhard Herzog  <[email protected]>
6223    
6224            * Resources/Projections/defaults.proj: Fix spelling of Mercator
6225    
6226    2003-05-05  Jonathan Coles   <[email protected]>
6227    
6228            Addresses the "Full Layer Extent" wish of RTbug #1787.
6229    
6230            * Resources/Projections/defaults.proj: Added UK National Grid.
6231    
6232            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
6233            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
6234            when the user selects the menu option.
6235    
6236            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
6237            scales the given layer on the canvas using the map projection.
6238    
6239    2003-05-05  Bernhard Herzog  <[email protected]>
6240    
6241            Convert the table implementations to a new table interface. All
6242            tables use a common mixin class to provide backwards compatibility
6243            until all table users have been updated.
6244    
6245            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
6246            provide backwards compatibility for table classes implementing the
6247            new interface
6248            (DBFTable, MemoryTable): Implement the new table interface. Use
6249            OldTableInterfaceMixin as base for compatibility
6250            (DBFColumn, MemoryColumn): New. Column description for DBFTable
6251            and MemoryTable resp.
6252    
6253            * test/test_dbf_table.py: New. Test cases for the DBFTable with
6254            the new table interface.
6255    
6256            * test/test_memory_table.py: New. Test cases for the MemoryTable
6257            with the new table interface.
6258    
6259            * test/test_table.py: Document the all tests in this file as only
6260            for backwards compatibility. The equivalent tests for the new
6261            interface are in test_memory_table.py and test_dbf_table.py
6262            (MemoryTableTest.test_read): field_info should be returning tuples
6263            with four items
6264            (MemoryTableTest.test_write): Make doc-string a more precise.
6265    
6266            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
6267            table interface. Derive from from OldTableInterfaceMixin for
6268            compatibility.
6269            (TransientTableBase.create): New intance variable column_map to
6270            map from names and indices to column objects
6271            (TransientTable.create): Use the new table interface of the input
6272            table
6273            (AutoTransientTable): Convert to new table interface. Derive from
6274            from OldTableInterfaceMixin for compatibility.
6275            (AutoTransientTable.write_record): Removed. It's not implemented
6276            yet and we still have to decide how to handle writing with the new
6277            table and data framework.
6278    
6279            * test/test_transientdb.py
6280            (TestTransientTable.run_iceland_political_tests)
6281            (TestTransientTable.test_transient_joined_table): Use the new
6282            table interface
6283    
6284    2003-05-05  Jonathan Coles   <[email protected]>
6285    
6286            This is namely a collection of UI updates to improve user interactivity.
6287            Tabbing between controls now exists and you can use ESC to close dialog
6288            boxes; ENTER will active the default button.
6289    
6290            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
6291            order that the controls are created so that tabbing works correctly.
6292            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
6293            wxDialog can handle the default button correctly.
6294            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
6295            same reasons as for OnOK.
6296            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
6297            when we ask the table for the maximum/minimum values of a field
6298            which could take a very long time.
6299    
6300            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
6301            order that the controls are created so that tabbing works correctly.
6302            (SelectPropertiesDialog.__init__): Rearrange the order that the
6303            controls are created so that tabbing works correctly.
6304    
6305            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
6306            to derive from a wxDialog but behave like the original implementation
6307            which was derived from a wxFrame. wxDialog provides useful key
6308            handling functionality like ESC calling OnCancel and ENTER calling
6309            OnOK which is lost with wxFrame.
6310    
6311            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
6312            new dialogs.
6313    
6314            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
6315            order that the controls are created so that tabbing works correctly.
6316            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
6317            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
6318            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
6319            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
6320            can provide the "UK National Grid" as a default projection.
6321            (UTMPanel.__init__): Rearrange the order that the controls are
6322            created so that tabbing works correctly.
6323    
6324    2003-05-05  Bernhard Herzog  <[email protected]>
6325    
6326            * extensions/thuban/wxproj.cpp: Fix some of the comments.
6327            (project_point): If a map projection but no layer projection is
6328            given, convert degrees to radians before applying the map
6329            projection.
6330    
6331            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
6332            (TableGrid.allow_messages): New methods to make it possible to
6333            inhibit message sending.
6334            (TableGrid.issue): Only send the message if not inhibited.
6335            (LayerTableGrid.select_shape): Use the new methods to make sure
6336            that no ROW_SELECTED message is sent while we're updating the
6337            selected rows to match the selected shapes.
6338    
6339    2003-05-02  Jan-Oliver Wagner <[email protected]>
6340    
6341            Implementation of MemoryTable.
6342    
6343            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
6344            implementation that operates on a list of tuples. All of the data
6345            are kept in the memory.
6346    
6347            * test/test_table.py (MemoryTableTest): New.
6348    
6349            * test/test_transientdb.py (SimpleTable): Removed.
6350            (TestTransientTable.test_transient_joined_table,
6351            (TestTransientTable.test_transient_table_read_twice): Replaced
6352            SimpleTable by MemoryTable.
6353    
6354    2003-04-30  Jonathan Coles   <[email protected]>
6355    
6356            * Data/iceland_sample.thuban: Now contains correct projections
6357            for each of the layers.
6358    
6359            * Resources/Projections/defaults.proj: Geographic projection
6360            contains unit conversion parameter.
6361    
6362    2003-04-30  Jonathan Coles   <[email protected]>
6363    
6364            The most important part of this putback is the projection changes.
6365            It should now be possible to specify the projection that a layer
6366            is in and then specify a different projection for the map. The
6367            projection dialog has an extra parameter for a geographic projection
6368            which lets the user select if the input is in degrees or radians.
6369    
6370            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
6371            to say that the parameter is a tuple of unprojected
6372            points (which is what the callers to this method were assuming).
6373            Also, since the points are unprojected we need to projected them.
6374    
6375            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
6376            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
6377            groups are selected, move the layer up/down. Fixes RTbug #1833.
6378    
6379            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
6380    
6381            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
6382            parameter in call to SetClientData.
6383            (GeoPanel): Add support for selecting the units that the
6384            source data is in (Radians or Degrees).
6385    
6386            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
6387            the rendering loop by reducing the number of if's, removing the
6388            unnecessary try/except block, and checking if the old group
6389            is the same as the new one (which happens a lot if there is
6390            no classification, or lots of shapes are in the same group).
6391    
6392            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
6393            around the redraw routine to try to catch problems that the user
6394            may create by selecting invalid projections for the data set and
6395            map. Clears the display if there are any problems and prints the
6396            error.
6397            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
6398            rectangle.
6399    
6400            * extensions/thuban/wxproj.cpp (project_point): First invert the
6401            supplied point (which should be in projected coordinates) using
6402            the layer's projection and then project the point using the
6403            map's projection.
6404            (project_points): Use project_point() to project each point.
6405    
6406    2003-04-30  Jan-Oliver Wagner <[email protected]>
6407    
6408            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
6409            don't set the Classification to None if the classfication field
6410            is None (ie only a DEFAULT).
6411    
6412    2003-04-30  Bernhard Herzog  <[email protected]>
6413    
6414            * Thuban/UI/view.py: Fix some typos.
6415    
6416            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
6417            not pop up the dialog if the selection becomes empty (this could
6418            happen if e.g. a new selection is opened while the identify tool
6419            is active and dialog had been closed)
6420    
6421    2003-04-30  Bernhard Herzog  <[email protected]>
6422    
6423            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
6424            instance variable read_record_last_result
6425            (TransientTableBase.read_record): Make sure reading the same
6426            record twice works. The implementation uses the new instance
6427            variable read_record_last_result
6428    
6429            * test/test_transientdb.py
6430            (TestTransientTable.test_transient_table_read_twice): New test
6431            case for the above bug-fix.
6432    
6433    2003-04-29  Jonathan Coles   <[email protected]>
6434    
6435            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
6436    
6437            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
6438    
6439            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
6440            (ClassTable.SetValueAsCustom): Rename keyword argument in
6441            ClassGroup* constructors to match argument name.
6442    
6443    2003-04-29  Bernhard Herzog  <[email protected]>
6444    
6445            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
6446            transient DB if it exists to make sure it doesn't leave a journal
6447            file in the temp directory.
6448    
6449            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
6450            self.conn to None after closing the connection to make sure it's
6451            not closed twice
6452    
6453    2003-04-29  Jonathan Coles   <[email protected]>
6454    
6455            Add a visible parameter in the layer XML tag. The default value is
6456            "true". If anything other than "false" is specified we also assume
6457            "true". Addresses RTbug #1025.
6458    
6459            * Doc/thuban.dtd: Add visible parameter to a layer.
6460    
6461            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
6462            of visible from 1 to True.
6463            (Layer.__init__): Change default value of visible from 1 to True.
6464    
6465            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
6466            parameter.
6467    
6468            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
6469            parameter.
6470    
6471            * test/test_load.py: Add new test data contents_test_visible.
6472            (LoadSessionTest.setUp): save test data.
6473            (LoadSessionTest.testLayerVisibility): Test if the visible flag
6474            is loaded correctly.
6475    
6476            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
6477            for saving an invisible layer.
6478    
6479    2003-04-29  Jonathan Coles   <[email protected]>
6480    
6481            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
6482            legend dialog box and tell it to change its map to the one
6483            supplied to SetMap(). Fixes RTbug #1770.
6484    
6485  2003-04-29  Bernhard Herzog  <[email protected]>  2003-04-29  Bernhard Herzog  <[email protected]>
6486    
6487          Next step of table implementation. Introduce a transient database          Next step of table implementation. Introduce a transient database
# Line 51  Line 6535 
6535          once. Plus it introduces a reference cycle that keeps can keep the          once. Plus it introduces a reference cycle that keeps can keep the
6536          session object alive for a long time.          session object alive for a long time.
6537    
6538  2003-04-25  Jonathan Coles   <[email protected]>  2003-04-29  Jonathan Coles   <[email protected]>
6539    
6540          * Thuban/Model/proj.py (Projection): Removed Set*() methods to make          * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
6541          Projection an immutable item. Fixes RTbug #1825.          Projection an immutable item. Fixes RTbug #1825.

Legend:
Removed from v.766  
changed lines
  Added in v.2107

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26