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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2107 - (hide annotations)
Fri Mar 12 12:59:40 2004 UTC (20 years, 11 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 359378 byte(s)
update ChangeLog

1 bh 2105 2004-03-12 Bernhard Herzog <[email protected]>
2    
3 bh 2107 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 bh 2105 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 bh 2100 2004-03-11 Bernhard Herzog <[email protected]>
62    
63 bh 2103 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 bh 2100 * 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 silke 2095 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 bh 2094 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 bh 2089 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 bh 2080 2004-02-20 Bernhard Herzog <[email protected]>
205    
206 bh 2087 * 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 bh 2085 * 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 bh 2083 * 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 bh 2080 * 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 bh 2075 2004-02-19 Bernhard Herzog <[email protected]>
239    
240 bh 2077 * 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 bh 2075 * 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 bh 2070 2004-02-17 Bernhard Herzog <[email protected]>
252    
253 bh 2073 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 bh 2070 * 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 bh 2067 2004-02-16 Bernhard Herzog <[email protected]>
277    
278 bh 2069 * Thuban/UI/view.py (MapCanvas.Export): Remove accidentally added
279     line
280    
281     2004-02-16 Bernhard Herzog <[email protected]>
282    
283 bh 2067 * Thuban/UI/view.py (MapCanvas.Export): Avoid UnboundLocalError.
284    
285 mrechtie 2064 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 bh 2062 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 bh 2060 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 bh 2058 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 frank 2055 2004-02-06 Frank Koormann <[email protected]>
365    
366     * po/pt_BR.po: Fixed charset
367    
368 frank 2054 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 frank 2053 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 frank 2052 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 frank 2051 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 bh 2048 2004-01-05 Bernhard Herzog <[email protected]>
410    
411 bh 2050 * po/ru.po: Updated translations from Alex Shevlakov
412    
413     2004-01-05 Bernhard Herzog <[email protected]>
414    
415 bh 2048 * po/Makefile, po/README: Move the description of how to generate
416     the translation statistics to the README.
417    
418 bh 2042 2003-12-23 Bernhard Herzog <[email protected]>
419    
420 bh 2045 * 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 bh 2042 * 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 bh 2033 2003-12-22 Bernhard Herzog <[email protected]>
440    
441 bh 2039 * HOWTO-Release: Fix the places where version numbers have to be
442     updated
443    
444     2003-12-22 Bernhard Herzog <[email protected]>
445    
446 bh 2037 * 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 bh 2035 * 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 bh 2033 * 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 bh 2031 2003-12-19 Bernhard Herzog <[email protected]>
497    
498     * po/fr.po, po/es.po: Updated translations from Daniel Calvelo
499    
500 bh 2028 2003-12-16 Bernhard Herzog <[email protected]>
501 silke 2029
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 bh 2028
507 silke 2029 2003-12-16 Bernhard Herzog <[email protected]>
508    
509 bh 2028 * 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 frank 2026 2003-12-09 Frank Koormann <[email protected]>
514    
515     * Resources/Projections/defaults.proj:
516     French projection sample with correct accents (UNICODE).
517    
518 bh 2025 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 frank 2022 2003-12-05 Frank Koormann <[email protected]>
526    
527 frank 2023 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 frank 2022 * 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 bh 2016 2003-12-03 Bernhard Herzog <[email protected]>
554    
555 bh 2021 Fix for RT #2243
556    
557 bh 2020 * 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 bh 2018 * 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 bh 2016 * po/ru.po: Updates from Alex Shevlakov
573    
574 silke 2013 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 bh 2012 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 bh 2005 2003-12-02 Bernhard Herzog <[email protected]>
593    
594 bh 2010 * MANIFEST.in: Add debian files
595    
596 bh 2008 * 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 bh 2005 * 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 bh 1996 2003-12-01 Bernhard Herzog <[email protected]>
635    
636 bh 2003 * setup.py (proj4_prefix, wx_prefix, gdal_prefix): Fix these for
637     nt to better match Intevation's current w32 setup
638    
639 bh 2001 * HOWTO-Release: Add note about updating MANIFEST.in
640    
641     * MANIFEST.in: Add the Extensions
642    
643 bh 1998 * NEWS: Update for 1.0rc1
644    
645     2003-12-01 Bernhard Herzog <[email protected]>
646    
647 bh 1996 * 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 bh 1988 2003-11-28 Bernhard Herzog <[email protected]>
652    
653 bh 1996 * 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 bh 1992 * po/de.po: Update german translation.
662    
663     2003-11-28 Bernhard Herzog <[email protected]>
664    
665 bh 1990 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 bh 1988 * 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 bh 1984 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 bh 1986 * Thuban/UI/viewport.py (ViewPort.map_projection_changed): Use
722     InverseBBox to unproject bboxes
723    
724 bh 1975 2003-11-25 Bernhard Herzog <[email protected]>
725    
726 bh 1981 * 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 bh 1979 * 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 bh 1977 * 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 bh 1975 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 bh 1971 2003-11-24 Bernhard Herzog <[email protected]>
757    
758 bh 1973 * 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 bh 1971 * 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 bh 1969 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 bh 1967 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 bh 1960 2003-11-19 Bernhard Herzog <[email protected]>
799    
800 bh 1965 * 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 bh 1963 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 bh 1960 * 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 bh 1954 2003-11-18 Bernhard Herzog <[email protected]>
836    
837 bh 1958 * 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 bh 1960 * Thuban/Lib/connector.py (Publisher): Introduce a new flag,
856 bh 1954 _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 bh 1951 2003-11-14 Bernhard Herzog <[email protected]>
867    
868     * Thuban/UI/identifyview.py (IdentifyView.selected_shape): Fix
869     typo in doc-string
870    
871 bh 1949 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 jan 1945 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 bh 1932 2003-11-11 Bernhard Herzog <[email protected]>
917    
918 bh 1942 * 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 bh 1939 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 bh 1934 * 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 bh 1932 * 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 bh 1929 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 bh 1925 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 bh 1913 2003-11-03 Bernhard Herzog <[email protected]>
1055    
1056 bh 1922 * 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 bh 1920 * 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 bh 1916 * 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 bh 1913 * 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 bh 1904 2003-10-31 Bernhard Herzog <[email protected]>
1097    
1098 bh 1911 * 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 bh 1908 * 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 bh 1906 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 bh 1904 * 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 jan 1902 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 bh 1904 (time_screen_renderer): Raise a dialog to present the result instead
1167 jan 1902 of printing it to stdout.
1168    
1169 bh 1897 2003-10-31 Bernhard Herzog <[email protected]>
1170    
1171 bh 1899 * 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 bh 1897 * Extensions/profiling/profiling.py: New. Extension to measure
1181     Thuban performance
1182    
1183 frank 1895 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 bh 1894 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 frank 1890 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 jan 1889 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 bh 1880 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 bh 1868 2003-10-27 Bernhard Herzog <[email protected]>
1250    
1251 bh 1878 * po/fr.po, po/es.po: Updated translations from Daniel Calvelo
1252    
1253 bh 1876 * 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 bh 1873 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 bh 1870 * 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 bh 1868 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 bh 1865 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 jan 1857 2003-10-24 Jan-Oliver Wagner <[email protected]>
1366    
1367 jan 1862 * 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 jan 1859 * 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 jan 1857 * 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 bh 1855 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 bh 1840 2003-10-21 Bernhard Herzog <[email protected]>
1413    
1414 bh 1852 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 bh 1849 * 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 bh 1847 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 bh 1840 * 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 frank 1837 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 bh 1836 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 bh 1834 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 bh 1832 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 silke 1829 2003-10-16 Silke Reimer <[email protected]>
1558    
1559     * debian/*: New directory with configuration files for building a thuban
1560     deb-package.
1561    
1562 bh 1822 2003-10-14 Bernhard Herzog <[email protected]>
1563    
1564 bh 1828 * 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 bh 1826 * 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 bh 1822 * 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 bh 1812 2003-10-13 Bernhard Herzog <[email protected]>
1602    
1603 bh 1820 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 bh 1814 * 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 bh 1812 * 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 bh 1805 2003-10-10 Bernhard Herzog <[email protected]>
1663    
1664 bh 1810 * 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 bh 1807 * 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 bh 1805 * README: Fix typo.
1696    
1697 bh 1803 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 jan 1801 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 bh 1799 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 bh 1794 2003-10-08 Bernhard Herzog <[email protected]>
1724    
1725 bh 1796 * 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 bh 1794 * 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 jan 1792 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 bh 1788 2003-10-08 Bernhard Herzog <[email protected]>
1740    
1741 bh 1790 * 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 bh 1788 * 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 bh 1785 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 bh 1773 2003-10-06 Bernhard Herzog <[email protected]>
1791    
1792 bh 1783 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 bh 1777 * Thuban/UI/application.py (ThubanApplication.maps_changed): Add
1836     doc-string
1837    
1838     2003-10-06 Bernhard Herzog <[email protected]>
1839    
1840 bh 1775 * 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 bh 1773 * 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 bh 1770 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 jan 1767 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 bh 1757 2003-09-26 Bernhard Herzog <[email protected]>
1875    
1876 bh 1760 * 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 bh 1757 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 bh 1751 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 jan 1745 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 bh 1743 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 bh 1737 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 jan 1730 2003-09-22 Jan-Oliver Wagner <[email protected]>
1938    
1939 jan 1735 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 jan 1730 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 jan 1720 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 bh 1718 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 jan 1716 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 jan 1714 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 jan 1705 2003-09-03 Jan-Oliver Wagner <[email protected]>
2018    
2019 jan 1707 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 jan 1705 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 bh 1694 2003-09-01 Bernhard Herzog <[email protected]>
2040    
2041 bh 1701 * 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 bh 1699 * 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 bh 1696 * 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 bh 1694 * 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 bh 1692 2003-08-29 Bernhard Herzog <[email protected]>
2079    
2080     * HOWTO-Release: Tweak item about running the tests.
2081    
2082 jan 1690 2003-08-29 Jan-Oliver Wagner <[email protected]>
2083    
2084     * /Doc/manual/thuban-manual.xml: updated to version 1.0pre2.
2085    
2086 bh 1688 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 bh 1672 2003-08-28 Bernhard Herzog <[email protected]>
2117    
2118 bh 1685 * 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 bh 1672 * 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 bh 1663 2003-08-27 Bernhard Herzog <[email protected]>
2190    
2191 bh 1665 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 bh 1663 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 bh 1659 2003-08-26 Bernhard Herzog <[email protected]>
2313    
2314 bh 1661 * 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 bh 1659 * 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 bh 1643 2003-08-25 Bernhard Herzog <[email protected]>
2330    
2331 bh 1657 * 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 bh 1655 * 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 bh 1653 * 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 bh 1651 * 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 bh 1649 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 bh 1647 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 bh 1645 * 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 bh 1643 * 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 bh 1632 2003-08-22 Bernhard Herzog <[email protected]>
2440 bh 1641
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 bh 1639 Implement saving a session with a postgis connection
2447 bh 1632
2448 bh 1639 * 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 bh 1637 * 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 bh 1635 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 bh 1632 * 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 bh 1633 (DBFrame.OnRemove): Display a message if the connection can't be
2537     removed because it's still in use.
2538 bh 1632
2539 jan 1629 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 bh 1627 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 jan 1623 2003-08-21 Jan-Oliver Wagner <[email protected]>
2563    
2564 jan 1626 * 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 jan 1623 * 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 bh 1621 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 jan 1619 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 bh 1606 2003-08-19 Bernhard Herzog <[email protected]>
2650    
2651 bh 1609 * 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 bh 1606 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 jan 1604 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 bh 1600 2003-08-18 Bernhard Herzog <[email protected]>
2711    
2712 bh 1602 * 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 bh 1600 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 jan 1596 2003-08-18 Jan-Oliver Wagner <[email protected]>
2742    
2743     * Thuban/UI/about.py (About.__init__): Added Silke Reimer.
2744    
2745 bh 1586 2003-08-15 Bernhard Herzog <[email protected]>
2746    
2747 bh 1594 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 bh 1592 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 bh 1590 * 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 bh 1588 * 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 bh 1586 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 jan 1584 2003-08-12 Jan-Oliver Wagner <[email protected]>
2871    
2872     * Thuban/UI/about.py (About.__init__): Added Björn Broscheit.
2873    
2874 bh 1580 2003-08-12 Bernhard Herzog <[email protected]>
2875    
2876 bh 1582 * po/de.po: New. German translations by Bjoern Broscheit
2877    
2878     2003-08-12 Bernhard Herzog <[email protected]>
2879    
2880 bh 1580 * Thuban/UI/projdialog.py (UnknownProjPanel._DoLayout): Translated
2881     strings have to be one string literal.
2882    
2883 bh 1573 2003-08-11 Bernhard Herzog <[email protected]>
2884    
2885 bh 1578 * 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 bh 1573 * Thuban/UI/join.py (JoinDialog.OnJoin): Add missing space to
2903     error message
2904    
2905 jan 1569 2003-08-08 Jan-Oliver Wagner <[email protected]>
2906    
2907 jan 1571 * 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 jan 1569 * Thuban/UI/about.py (About.__init__): Reworked the hall of fame. Now
2914     the list corresponds to the "About" web page.
2915    
2916 bh 1567 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 bh 1556 2003-08-07 Bernhard Herzog <[email protected]>
2931    
2932 bh 1565 * 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 bh 1561 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 bh 1560 * 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 bh 1561 used inside of Thuban and the generic Shape class has gone away.
2964 bh 1560
2965 bh 1563 * 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 bh 1561 2003-08-07 Bernhard Herzog <[email protected]>
2970    
2971 bh 1559 * 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 bh 1556 * 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 bh 1553 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 jan 1550 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 bh 1548 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 jan 1545 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 bh 1540 2003-08-01 Bernhard Herzog <[email protected]>
3088    
3089 bh 1543 * 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 bh 1540 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 jonathan 1534 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 frank 1532 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 jonathan 1531 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 jonathan 1529 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 bh 1522 2003-07-30 Bernhard Herzog <[email protected]>
3176    
3177 bh 1524 * 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 bh 1522 * 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 jonathan 1517 2003-07-29 Jonathan Coles <[email protected]>
3193    
3194 jonathan 1519 * 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 jonathan 1517 * 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 bh 1512 2003-07-29 Bernhard Herzog <[email protected]>
3210    
3211 bh 1516 * Thuban/Model/data.py: Remove the now unused import of warnings
3212    
3213     2003-07-29 Bernhard Herzog <[email protected]>
3214    
3215 bh 1514 * 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 bh 1512 * Thuban/Model/transientdb.py: Remove some unnecessary imports
3220    
3221 jonathan 1503 2003-07-29 Jonathan Coles <[email protected]>
3222 jonathan 1506
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 jonathan 1503
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 bh 1500 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 frank 1497 2003-07-29 Frank Koormann <[email protected]>
3246    
3247 frank 1508 * Doc/manual/thuban-manual.xml: Extended section on supported
3248     projections.
3249    
3250     2003-07-29 Frank Koormann <[email protected]>
3251    
3252 frank 1497 * Doc/manual/thuban-manual.xml: gaspell-checked.
3253    
3254 jonathan 1493 2003-07-29 Jonathan Coles <[email protected]>
3255    
3256 jonathan 1495 * 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 jonathan 1493 * 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 bh 1483 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 jan 1767 executable. The #! isn't necessary here since if you absolutely
3298 bh 1483 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 frank 1479 2003-07-24 Frank Koormann <[email protected]>
3307    
3308     * Doc/manual/thuban-manual.xml: Added section on table management.
3309    
3310 bh 1477 2003-07-24 Bernhard Herzog <[email protected]>
3311    
3312     * test/runtests.py (main): Recognize the long "verbose" option
3313     correctly.
3314    
3315 jonathan 1470 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 bh 1451 2003-07-18 Bernhard Herzog <[email protected]>
3356    
3357 bh 1465 * 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 bh 1463 * 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 bh 1461 * Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.
3402    
3403     2003-07-18 Bernhard Herzog <[email protected]>
3404    
3405 bh 1459 * 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 bh 1457 * 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 bh 1455 * 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 bh 1453 * 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 bh 1451 * 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 jonathan 1449 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 jonathan 1442 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 jan 1424 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 bh 1418 2003-07-15 Bernhard Herzog <[email protected]>
3585    
3586 bh 1422 * 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 bh 1420 * 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 bh 1418 * 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 jonathan 1416 2003-07-14 Jonathan Coles <[email protected]>
3619    
3620     * test/test_view.py: New. Tests for ViewPort.
3621    
3622 frank 1409 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 frank 1411 * 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 jonathan 1403 2003-07-10 Jonathan Coles <[email protected]>
3632    
3633 jonathan 1406 * 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 jonathan 1403 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 bh 1376 2003-07-08 Bernhard Herzog <[email protected]>
3721    
3722 bh 1382 * 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 bh 1380 * 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 bh 1378 * 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 bh 1376 * 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 bh 1372 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 bh 1365 2003-07-03 Bernhard Herzog <[email protected]>
3798    
3799 bh 1370 * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
3800    
3801     2003-07-03 Bernhard Herzog <[email protected]>
3802    
3803 bh 1368 * 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 bh 1365 * 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 jonathan 1360 2003-07-02 Jonathan Coles <[email protected]>
3824 jonathan 1349
3825 jonathan 1360 * Thuban/Model/classgen.py (generate_singletons,
3826     generate_uniform_distribution, generate_quantiles,
3827 jonathan 1363 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 jonathan 1360 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 jonathan 1358 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 jonathan 1349 * 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 frank 1334 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 bh 1329 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 frank 1334
4000 bh 1329 * 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 frank 1325 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 jonathan 1318 2003-06-30 Jonathan Coles <[email protected]>
4011    
4012 jonathan 1349 * 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 jonathan 1320 * Thuban/version.py: SQLite/PySQLite version dependencies
4022     were too high.
4023    
4024     2003-06-30 Jonathan Coles <[email protected]>
4025    
4026 jonathan 1318 * Thuban/version.py: Update version to 0.8.1
4027    
4028     * MANIFEST.in: Added Projections so that default.proj is
4029     included.
4030    
4031 jonathan 1312 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 jonathan 1304 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 jonathan 1299 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 jonathan 1286 2003-06-23 Jonathan Coles <[email protected]>
4088 jonathan 1297
4089     * setup.py: Add Resources/XML to resource list.
4090    
4091     2003-06-23 Jonathan Coles <[email protected]>
4092 jonathan 1286
4093 jonathan 1297 * setup.cfg: Fix copyright dates
4094    
4095     2003-06-23 Jonathan Coles <[email protected]>
4096    
4097 jonathan 1294 * 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 jonathan 1289 * 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 jonathan 1286 * 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 bh 1283 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 bh 1281 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 jonathan 1272 2003-06-20 Jonathan Coles <[email protected]>
4155    
4156 jonathan 1279 * 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 jonathan 1272 * 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 bh 1270 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 jonathan 1265 2003-06-20 Jonathan Coles <[email protected]>
4268    
4269 jonathan 1267 * 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 jonathan 1265 * 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 bh 1256 2003-06-20 Bernhard Herzog <[email protected]>
4293    
4294 bh 1260 * 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 bh 1258 * 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 bh 1256 * 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 jonathan 1254 2003-06-20 Jonathan Coles <[email protected]>
4326    
4327 jonathan 1265 This is mainly about fixing RTbug #1949.
4328    
4329 jonathan 1254 * 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 bh 1244 2003-06-19 Bernhard Herzog <[email protected]>
4349    
4350 bh 1248 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 bh 1246 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 bh 1244 * Doc/thuban.dtd (classification): Correct the content model of
4399     the classification element.
4400     (projection): Add the "name" attribute
4401    
4402 frank 1242 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 jonathan 1235 2003-06-18 Jonathan Coles <[email protected]>
4422    
4423 jonathan 1239 * setup.py: Fix a few problems that occured under Windows.
4424    
4425     2003-06-18 Jonathan Coles <[email protected]>
4426    
4427 jonathan 1235 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 jonathan 1237 * 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 jonathan 1224 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 bh 1220 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 jonathan 1212 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 bh 1208 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 jonathan 1201 2003-06-13 Jonathan Coles <[email protected]>
4581    
4582 jonathan 1203 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 jonathan 1201 * 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 bh 1195 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 jonathan 1169 2003-06-12 Jonathan Coles <[email protected]>
4652 jonathan 1175
4653 jonathan 1193 * 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 jonathan 1191 * Thuban/Lib/fileutil.py: As is done under Windows, create the
4659 jonathan 1193 user directory if it doesn't exist on a posix system.
4660     Fixes RTbug #1815.
4661 jonathan 1191
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 jonathan 1182 * 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 jonathan 1178 * 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 jonathan 1175 * 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 jonathan 1172
4702     * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
4703     that was in load.py
4704 jonathan 1169
4705 jonathan 1172 * 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 jonathan 1169 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 jonathan 1172 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 jonathan 1169 * 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 jan 1156 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 frank 1151 2003-06-11 Frank Koormann <[email protected]>
4796    
4797 frank 1152 * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
4798     update.
4799    
4800     2003-06-11 Frank Koormann <[email protected]>
4801    
4802 frank 1151 * 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 bh 1143 2003-06-10 Bernhard Herzog <[email protected]>
4812    
4813 bh 1147 * 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 bh 1145 * 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 bh 1143 * 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 jan 1141 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 frank 1134 2003-06-05 Frank Koormann <[email protected]>
4874    
4875 frank 1139 * 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 frank 1137 * 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 frank 1134 * 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 bh 1130 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 tkoester 1128 2003-06-03 Thomas Koester <[email protected]>
4926    
4927     * Thuban/Model/classgen.py (GenQuantiles0): New function.
4928    
4929 bh 1120 2003-06-02 Bernhard Herzog <[email protected]>
4930    
4931 bh 1127 * 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 bh 1120 * 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 bh 1112 2003-05-30 Bernhard Herzog <[email protected]>
4964    
4965 bh 1118 * 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 bh 1116 * 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 bh 1114 * 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 bh 1112 * 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 jonathan 1109 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 jan 1097 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 bh 1089 2003-05-28 Bernhard Herzog <[email protected]>
5062    
5063 bh 1095 * 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 bh 1093 * 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 bh 1089 * 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 jan 1087 2003-05-28 Jan-Oliver Wagner <[email protected]>
5085 jan 1085
5086 jan 1087 * 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 jan 1085 * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
5092     sort the selection list for the dialog.
5093    
5094 frank 1083 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 bh 1079 2003-05-28 Bernhard Herzog <[email protected]>
5102    
5103 bh 1081 * 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 bh 1079 * 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 frank 1077 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 bh 1069 2003-05-27 Bernhard Herzog <[email protected]>
5120    
5121 bh 1075 * 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 bh 1073 * 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 bh 1071 * 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 bh 1069 * 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 frank 1065 2003-05-27 Frank Koormann <[email protected]>
5184    
5185 frank 1067 * 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 frank 1065 * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
5191    
5192     * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
5193    
5194 jan 1062 2003-05-27 Jan-Oliver Wagner <[email protected]>
5195    
5196 bh 1069 * test/test_menu.py (MenuTest.test): Added test for
5197     Menu.RemoveItem().
5198 jan 1062
5199 bh 1069 * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
5200     the menu.
5201 jan 1062
5202 frank 1059 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 bh 1053 2003-05-27 Bernhard Herzog <[email protected]>
5222    
5223 bh 1055 * 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 bh 1053 * 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 frank 1051 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 jan 1048 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 frank 1046 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 bh 1038 2003-05-26 Bernhard Herzog <[email protected]>
5266    
5267 bh 1044 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 bh 1038 * 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 bh 1040 * test/test_session.py (TestSessionSimple.test_open_table_file):
5300     New. test case for OpenTableFile
5301    
5302 jan 1033 2003-05-26 Jan-Oliver Wagner <[email protected]>
5303    
5304 jan 1035 * 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 bh 1038 * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
5312     already a selection present, update the grid accordingly.
5313 jan 1033
5314     * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
5315     resizeable and increase its initial size.
5316    
5317 frank 1030 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 jan 1021 2003-05-23 Jan-Oliver Wagner <[email protected]>
5340    
5341 jan 1024 * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
5342     Use QueryTableFrame instead of TableFrame.
5343 jan 1021
5344 jan 1024 * 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 jan 1021 * 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 bh 1017 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 jan 1015 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 frank 1011 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 bh 1006 2003-05-22 Bernhard Herzog <[email protected]>
5396    
5397 bh 1008 * 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 bh 1006 * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
5404     the wxMessageDialog's Destroy() method.
5405    
5406 frank 1004 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 bh 995 2003-05-22 Bernhard Herzog <[email protected]>
5425    
5426 bh 999 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 bh 997 * 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 bh 995 * 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 tkoester 993 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 frank 992 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 bh 988 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 tkoester 986 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 bh 983 2003-05-22 Bernhard Herzog <[email protected]>
5507    
5508 bh 985 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 bh 983 * 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 frank 981 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 jonathan 972 2003-05-21 Jonathan Coles <[email protected]>
5597 jonathan 971
5598 jonathan 975 * 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 jonathan 971 * 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 bh 958 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 jan 955 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 frank 952 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 jonathan 949 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 frank 924 2003-05-19 Frank Koormann <[email protected]>
5787    
5788 frank 927 * 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 frank 924 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 bh 919 2003-05-16 Bernhard Herzog <[email protected]>
5804    
5805 bh 921 * 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 bh 919 * 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 frank 917 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 bh 908 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 jonathan 906 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 jonathan 897 2003-05-12 Jonathan Coles <[email protected]>
5883    
5884 jonathan 899 * 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 jonathan 897 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 frank 893 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 jonathan 889 2003-05-09 Jonathan Coles <[email protected]>
5912    
5913 jonathan 897 * 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 jonathan 889 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 frank 872 2003-05-09 Frank Koormann <[email protected]>
6007    
6008     * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
6009    
6010 frank 860 2003-05-08 Frank Koormann <[email protected]>
6011    
6012 frank 870 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 frank 867 * Thuban/UI/scalebar.py
6021     (ScaleBar.DrawScalebar): Format string bug fixed.
6022    
6023     2003-05-08 Frank Koormann <[email protected]>
6024    
6025 frank 865 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 frank 860 * 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 frank 857 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 bh 850 2003-05-07 Bernhard Herzog <[email protected]>
6063    
6064 bh 852 * 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 bh 850 * 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 frank 848 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 bh 840 2003-05-06 Bernhard Herzog <[email protected]>
6099    
6100 bh 846 * 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 bh 843 * 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 bh 840 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 jonathan 833 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 bh 826 2003-05-06 Bernhard Herzog <[email protected]>
6223    
6224     * Resources/Projections/defaults.proj: Fix spelling of Mercator
6225    
6226 jonathan 823 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 bh 819 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 jonathan 817 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 bh 809 2003-05-05 Bernhard Herzog <[email protected]>
6325    
6326 bh 811 * 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 bh 809 * 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 jan 807 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 jonathan 793 2003-04-30 Jonathan Coles <[email protected]>
6355    
6356 jonathan 803 * 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 jonathan 793 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 jan 792 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 bh 786 2003-04-30 Bernhard Herzog <[email protected]>
6413    
6414 bh 790 * Thuban/UI/view.py: Fix some typos.
6415    
6416 bh 788 * 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 bh 786 * 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 jonathan 793 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 bh 779 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 jonathan 767 2003-04-29 Jonathan Coles <[email protected]>
6454    
6455 jonathan 769 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 jonathan 776 "true". Addresses RTbug #1025.
6458 jonathan 769
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 jonathan 767 * 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 bh 764 2003-04-29 Bernhard Herzog <[email protected]>
6486    
6487 bh 766 Next step of table implementation. Introduce a transient database
6488     using SQLite that some of the data is copied to on demand. This
6489     allows us to do joins and other operations that require an index
6490     for good performance with reasonable efficiency. Thuban now needs
6491     SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
6492     haven't tested that.
6493    
6494     * Thuban/Model/transientdb.py: New. Transient database
6495     implementation.
6496    
6497     * test/test_transientdb.py: New. Tests for the transient DB
6498     classes.
6499    
6500     * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
6501     classes to help automatically remove temporary files and
6502     directories.
6503     (Session.__init__): New instance variables temp_dir for the
6504     temporary directory and transient_db for the SQLite database
6505     (Session.temp_directory): New. Create a temporary directory if not
6506     yet done and return its name. Use AutoRemoveDir to have it
6507     automatically deleted
6508     (Session.TransientDB): Instantiate the transient database if not
6509     done yet and return it.
6510    
6511     * Thuban/Model/data.py (ShapefileStore.__init__): Use an
6512     AutoTransientTable so that data is copied to the transient DB on
6513     demand.
6514     (SimpleStore): New class that simply combines a table and a
6515     shapefile
6516    
6517     * Thuban/Model/table.py (Table, DBFTable): Rename Table into
6518     DBFTable and update its doc-string to reflect the fact that this
6519     is only the table interface to a DBF file. Table is now an alias
6520     for DBFTable for temporary backwards compatibility.
6521    
6522     * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
6523     the last reference to the session goes away so that the temporary
6524     files are removed properly.
6525    
6526     * test/test_load.py (LoadSessionTest.tearDown): Remove the
6527     reference to the session to make sure the temporary files are
6528     removed.
6529    
6530     2003-04-29 Bernhard Herzog <[email protected]>
6531    
6532 bh 764 * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
6533     the __parser instance variable into a normal local variable in
6534     read. It's only used there and read will never be called more than
6535     once. Plus it introduces a reference cycle that keeps can keep the
6536     session object alive for a long time.
6537    
6538 jonathan 767 2003-04-29 Jonathan Coles <[email protected]>
6539 jonathan 735
6540 jonathan 762 * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
6541     Projection an immutable item. Fixes RTbug #1825.
6542     (Projection.__init__): Initialize instance variables here.
6543     (ProjFile.Replace): New. Replace the given projection object with
6544     the new projection object. This solves the problem of needing the
6545     mutator Projection.SetProjection() in the ProjFrame class and
6546     allows a projection to change parameters without changing its
6547     location in the file.
6548    
6549     * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
6550     be of type wxSAVE and should verify overwriting a file.
6551    
6552     * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
6553     ProjFile.Replace() method instead of the mutator
6554     Projection.SetProjection(). Also requires that we reassign the
6555     client data to the new projection.
6556    
6557     * test/test_proj.py (TestProjection.test): Test GetName() and
6558     GetAllParameters()
6559     (TestProjFile.test): Remove tests for Set*() methods. Add tests
6560     for Replace().
6561    
6562     2003-04-25 Jonathan Coles <[email protected]>
6563    
6564 jonathan 756 * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
6565     to save the name of the projection.
6566    
6567     * test/test_save.py (SaveSessionTest.testLayerProjection): New
6568     test to verify layer projections are saved correctly.
6569    
6570     2003-04-25 Jonathan Coles <[email protected]>
6571    
6572 jonathan 753 * Thuban/Model/proj.py (Projection.SetName): Set the name
6573     to "Unknown" if name is None.
6574     (Projection.SetAllParameters): New. Set the projection's
6575     parameter list to the one supplied.
6576     (Projection.SetProjection): New. Set the projection's
6577     properties to those of the supplied Projection.
6578    
6579     * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
6580     the dialog title to include the map's title.
6581     (MainWindow.LayerProjection): Set the dialog title to include
6582     the layer's title.
6583    
6584     * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
6585     error dialogs into a single method call.
6586     (ProjFrame.__VerifyButtons): Add more states to check.
6587     (ProjFrame.__GetProjection): Return the current state of an
6588     edited projection or None.
6589     (ProjFrame.__FillAvailList): Remove checks for states that
6590     shouldn't exist.
6591     (ProjFrame._OnNew): Clear all selected items and supply
6592     a projection panel if necessary.
6593    
6594     * test/test_proj.py (TestProjFile.test): Add tests for
6595     ProjFile.SetAllParameters, ProjFile.SetProjection,
6596     ProjFile.SetName.
6597    
6598     2003-04-25 Jonathan Coles <[email protected]>
6599    
6600 jonathan 748 * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
6601     takes an optional argument to select the current projection.
6602     This does not guarantee that the item is visible due to
6603     limited wxWindows functionality. Fixes RTBug #1821.
6604    
6605     2003-04-25 Jonathan Coles <[email protected]>
6606    
6607 jonathan 743 * Thuban/Model/load.py (SessionLoader.start_projection): Remember
6608     the projection name and use it when constructing the Projection
6609     object.
6610    
6611     * Thuban/Model/proj.py (Projection.__init__): Change the default
6612     value for 'name' to None and then test if name is equal to None
6613     in the body of the constructor. This way the caller doesn't have to
6614     know what the default value should be. Namely, useful in load.py
6615     where we have to pick a default value if the 'name' parameter
6616     doesn't exist in the XML file.
6617    
6618     * test/test_load.py (LoadSessionTest.testLayerProjection): New.
6619     Tests a file where a layer has a projection.
6620    
6621     2003-04-25 Jonathan Coles <[email protected]>
6622    
6623 jonathan 735 * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
6624     tree for projection information.
6625    
6626     * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
6627     XMLReader.GetFileName.
6628     (SessionLoader): Added support for loading projection tags that
6629     appear inside a layer.
6630    
6631     * Thuban/Model/proj.py (ProjFile): Document the class. Move
6632     back to using a list because the order of the projections in
6633     the file is important to maintain. Fixes RTbug #1817.
6634    
6635     * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
6636     to ProjFile.GetFilename.
6637    
6638     * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
6639     information.
6640    
6641     * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
6642     ProjFrame._OnSaveAs. Removed old dead code from previous
6643     implementation.
6644     (ProjFrame._OnExport): Add support for exporting more than one
6645     projection to a single file.
6646     (ProjFrame.__FillAvailList): use string formatting (% operator)
6647     to build strings that are (partly) translated. Fixes RTbug #1818.
6648    
6649     * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
6650     class.
6651    
6652 bh 734 2003-04-24 Bernhard Herzog <[email protected]>
6653    
6654     * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
6655    
6656     * po/fr.po: New. French translation by Daniel Calvelo Aros
6657    
6658     * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
6659     empty strings.
6660    
6661 jonathan 735 2003-04-24 Jonathan Coles <[email protected]>
6662 jonathan 724
6663     * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
6664     implement the interface that the ProjFrame dialog expects.
6665    
6666     * Thuban/Model/proj.py (Projection.SetName): New. Allows the
6667     name of the projection to be changed.
6668     (ProjFile): Use a dictionary instead of a list so that removing
6669     projections is easier and we are sure about uniqueness.
6670     (ProjFile.Remove): Remove the given projection object.
6671    
6672     * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
6673     Return a list with only one projection file instead of searching for
6674     any projection file. This simplifies many things if the user can
6675     only have one system file and one user file.
6676    
6677     * Thuban/UI/classgen.py: Change all references to
6678     genCombo to genChoice.
6679    
6680     * Thuban/UI/mainwindow.py: Add a Projection option under the
6681     layer menu.
6682     (MainWindow.LayerProjection): New. Open up a projection window
6683     for a layer.
6684    
6685     * Thuban/UI/projdialog.py: Large changes to how the dialog is
6686     laid out. Use three panels instead of one. One for the list of
6687     projections, one for the edit controls, and one for the buttons.
6688     Fixed resizing problems so that the dialog resizes correctly
6689     when the projection panel changes. Added import/export, save, and
6690     new buttons/functionality.
6691    
6692 bh 723 2003-04-24 Bernhard Herzog <[email protected]>
6693    
6694     First step towards table management. Introduce a simple data
6695     abstraction so that we replace the data a layer uses more easily
6696     in the next step.
6697    
6698     * Thuban/Model/data.py: New file with a simple data abstraction
6699     that bundles shapefile and dbffile into one object.
6700    
6701     * Thuban/Model/session.py (Session.OpenShapefile): New method to
6702     open shapefiles and return a shape store object
6703    
6704     * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
6705     object instead of a shapefile filename. This introduces a new
6706     instance variable store holding the datastore. For intermediate
6707     backwards compatibility keep the old instance variables.
6708     (open_shapefile): Removed. No longer needed with the shape store.
6709     (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
6710     get the shape store used by a layer.
6711     (Layer.Destroy): No need to explicitly destroy the shapefile or
6712     table anymore.
6713    
6714     * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
6715     (MainWindow.AddLayer): Use the session's OpenShapefile method to
6716     open shapefiles
6717    
6718     * Thuban/Model/load.py (ProcessSession.start_layer): Use the
6719     session's OpenShapefile method to open shapefiles
6720    
6721     * test/test_classification.py
6722     (TestClassification.test_classification): Use the session's
6723     OpenShapefile method to open shapefiles and build the filename in
6724     a more platform independed way
6725    
6726     * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
6727     Implement to have a session to use in the tests
6728     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
6729     (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
6730     session's OpenShapefile method to open shapefiles
6731     (TestLayerLegend.setUp): Instantiate a session so that we can use
6732     it to open shapefiles.
6733     (TestLayerLegend.tearDown): Make sure that all references to
6734     layers and session are removed otherwise we may get a resource
6735     leak
6736    
6737     * test/test_map.py (TestMapAddLayer.test_add_layer)
6738     (TestMapWithContents.setUp): Instantiate a session so that we can
6739     use it to open shapefiles.
6740     (TestMapWithContents.tearDown): Make sure that all references to
6741     layers, maps and sessions are removed otherwise we may get a
6742     resource leak
6743     ("__main__"): use support.run_tests() so that more info about
6744     uncollected garbage is printed
6745    
6746     * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
6747     session's OpenShapefile method to open shapefiles
6748     ("__main__"): use support.run_tests() so that more info about
6749     uncollected garbage is printed
6750    
6751     * test/test_selection.py (TestSelection.tearDown): Make sure that
6752     all references to the session and the selection are removed
6753     otherwise we may get a resource leak
6754     (TestSelection.get_layer): Instantiate a session so that we can
6755     use it to open shapefiles.
6756     ("__main__"): use support.run_tests() so that more info about
6757     uncollected garbage is printed
6758    
6759     * test/test_session.py (TestSessionBase.tearDown)
6760     (TestSessionWithContent.tearDown): Make sure that all references
6761     to the session and layers are removed otherwise we may get a
6762     resource leak
6763     (TestSessionWithContent.setUp): Use the session's OpenShapefile
6764     method to open shapefiles
6765    
6766 jonathan 721 2003-04-24 Jonathan Coles <[email protected]>
6767    
6768     * Thuban/Model/load.py (XMLReader.read): Should have been checking
6769     if the file_or_filename object had the 'read' attribute.
6770    
6771 jonathan 715 2003-04-23 Jonathan Coles <[email protected]>
6772    
6773 jonathan 720 * Thuban/Model/resource.py: Fixes RTbug #1813.
6774     (ReadProjFile): Add documentation about which exceptions are raised.
6775     Always pass the exceptions up to the caller.
6776     (GetProjFiles): If the directory can't be read return an empty list.
6777     If any of the proj files can't be read skip that file and go
6778     on to the next one.
6779    
6780     * test/test_proj.py: Added test cases to handle nonexistent files,
6781     unreadable files, and files that don't parse correctly.
6782    
6783     2003-04-23 Jonathan Coles <[email protected]>
6784    
6785 jonathan 716 Projection dialog. Allows the user to select from a list
6786     of projection templates and optionally edit them and save new ones.
6787    
6788     * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
6789     (ProjPanel): Base class for projection specific panels.
6790     (TMPanel): Projection panel for Transverse Mercartor.
6791     (UTMPanel): Projection panel for Universal Transverse Mercartor.
6792     (LCCPanel): Projection panel for Lambert Conic Conformal.
6793     (GeoPanel): Projetion panel for Geographic Projection.
6794    
6795     2003-04-23 Jonathan Coles <[email protected]>
6796    
6797 jonathan 715 * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
6798     promote symmetry. There now exists XMLReader and XMLWriter.
6799     (XMLReader.read): New. Call to read the given file descriptor or
6800     filename.
6801     (XMLReader.close): New. Make sure the file is closed.
6802     (XMLReader.GetFileName): New. Return just the file name that is being
6803     read from.
6804     (XMLReader.GetDirectory): New. Return just the directory of the file
6805     that is being read.
6806     (XMLReader.AddDispatchers): New. Take a dictionary which contains
6807     the names of functions to call as the XML tree is parsed.
6808     (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
6809     (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
6810     (SessionLoader): Removed class variables start_dispatcher and
6811     end_dispatcher since this functionality is now part of a class
6812     instance. Fixes RTbug #1808.
6813     (SessionLoader.__init__): Add dispatcher functions.
6814     (load_xmlfile): Code was moved into the XMLReader.read().
6815     (load_session): Use modified SessionLoader.
6816    
6817     * Thuban/Model/map.py (Map.GetProjection): New. Returns the
6818     map's projection.
6819    
6820     * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
6821     GetAllParameters.
6822     (Projection.GetParameter): Returns the value for the given parameter.
6823    
6824     * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
6825     (GetProjFiles): Renamed from GetProjections. Now returns a list
6826     of ProjFile objects.
6827     (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
6828     a list of ProjFile objects whose files are not user defined.
6829     (GetUserProjFiles): Renamed from GetUserProjections. Returns a
6830     list of ProjFile objects whose files are user defined.
6831     (ProjFileReader): Extend new XMLReader.
6832    
6833     * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
6834     promote symmetry.
6835    
6836     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
6837     control instead of a wxComboBox. wxChoice controls do not generate
6838     events as the uses highlights possible choices which fixes problems
6839     with resizing the dialog when the use selects an option.
6840    
6841     * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
6842     control instead of a wxComboBox.
6843    
6844     * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
6845     dialog.
6846    
6847     * test/test_proj.py (TestProjection.test): New tests for GetParameter
6848     method.
6849    
6850 bh 703 2003-04-22 Bernhard Herzog <[email protected]>
6851    
6852 bh 705 * Thuban/UI/mainwindow.py: Remove some unused imports and global
6853     constants
6854    
6855 bh 703 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
6856     (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
6857    
6858 bh 700 2003-04-17 Bernhard Herzog <[email protected]>
6859    
6860 bh 701 * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
6861     (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
6862     anymore.
6863     (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
6864     (Layer.ShapeType, Layer.Shape): No need to call
6865     self.open_shapefile since it's always called in __init__
6866    
6867 bh 700 * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
6868     In wxPython 2.4 there's no need to extend MainLoop anymore since
6869     wxPython itself makes sure OnExit is called.
6870    
6871 jonathan 688 2003-04-16 Jonathan Coles <[email protected]>
6872    
6873 jonathan 693 Initial putback of projection management code. Includes new
6874     classes to read and write projection files. The current load
6875     and save classes were abstracted a bit so they could be reused.
6876     The Projection class was extended to provide new methods and
6877     have a name.
6878    
6879     * Thuban/Model/load.py (XMLProcessor): New. Contains all the
6880     general XML reading methods that were part of ProcessSession.
6881    
6882     * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
6883     name.
6884     (ProjFile): New. Represents a file that contains projection
6885     information.
6886    
6887     * Thuban/Model/resource.py: New. Contains general utilities
6888     for read and writing projection files.
6889    
6890     * Thuban/Model/save.py (XMLSaver): New. Contains all the
6891     general XML writing methods that were part of SessionSaver.
6892     (SessionSaver): Renamed from Saver.
6893    
6894     * test/test_proj.py: New test cases for the projection
6895     file read and write functions.
6896    
6897     2003-04-16 Jonathan Coles <[email protected]>
6898    
6899 jonathan 688 * Thuban/Model/classification.py: Use repr() around values
6900     in the ClassGroup*.__repr__() methods so it is clearer when
6901     a value is a string and when it is a number.
6902    
6903     * test/test_load.py: Rework the classification test to test
6904     that we can load old files.
6905     (testLabels): Test a file where the groups have labels.
6906    
6907 bh 687 2003-04-16 Bernhard Herzog <[email protected]>
6908    
6909     Safer implementation of the performance enhancements of the
6910     low-level renderer:
6911    
6912     * extensions/thuban/wxproj.cpp (extract_projection)
6913     (extract_pointer): Rename extract_projection to extract_pointer
6914     and redefine its purpose to return the pointer stored in a CObject
6915     returned by the object's cobject method. Update all callers.
6916     (s_draw_info, free_draw_info, draw_polygon_init): Implement the
6917     handling of these low-level parameters so that each s_draw_info
6918     instance is handled as a CObject at python level that also
6919     contains real references to the actual python objects which
6920     contain the values in the struct. Add free_draw_info as the
6921     destructor.
6922     (draw_polygon_shape): Add the py_draw_info parameter which must a
6923     cobject containing an s_draw_info pointer.
6924    
6925     * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
6926     method to instantiat the low-level render parameter
6927     (MapRenderer.draw_shape_layer): Use the new method. Remove some
6928     commented out code.
6929     (MapRenderer.draw_polygon_shape): Make the first parameter not the
6930     layer but the low-level render parameter
6931     (ScreenRenderer.draw_shape_layer): Use the low-level render
6932     parameter.
6933    
6934 jonathan 673 2003-04-15 Jonathan Coles <[email protected]>
6935    
6936 jonathan 680 * Thuban/Model/classification.py: Implemented __repr__ for
6937     the ClassGroup* classes to make debugging a bit easier.
6938     (ClassGroup.SetLabel): Check that the string is an instance
6939     of StringTypes not StringType. Accounts for Unicode strings.
6940    
6941     * Thuban/Model/color.py: Implemented __repr__ to make
6942     debugging a bit easier.
6943    
6944     * Thuban/Model/save.py (Saver.write_classification): Need to
6945     save the group label.
6946    
6947     * test/test_load.py (testClassification): New. Loads the
6948     iceland_sample_test.thuban file and checks if it was loaded
6949     correctly.
6950    
6951     2003-04-15 Jonathan Coles <[email protected]>
6952    
6953 jonathan 673 * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
6954     to improve rendering performance by initializing the variables
6955     that are not change each time draw_polygon_shape() is called.
6956     The values are stored in a global struct draw_info.
6957     (draw_polygon_shape): Removed initialization code that is
6958     now in draw_polygon_init().
6959    
6960     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
6961 jonathan 674 drawing initialization call to draw_polygon_init()
6962     (MapRenderer.draw_polygon_shape): Use new signature of
6963     draw_polygon_shape.
6964 jonathan 673
6965 jonathan 674 * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
6966     weirdness by setting the range to (1, maxint).
6967 jonathan 673
6968 jonathan 674 * Thuban/Model/classification.py (ClassGroupProperties): Make
6969     instance variables private and optimize comparison operator
6970     by first checking if the color references are the same.
6971     (ClassGroupSingleton): Make instance variables private.
6972     (ClassGroupRange): Make instance variables private.
6973 jonathan 673
6974 jonathan 674 * HOWTO-Release: Filled in missing steps for releasing packages.
6975    
6976 bh 672 2003-04-15 Bernhard Herzog <[email protected]>
6977    
6978     First stab at internationalized messages:
6979    
6980     * Thuban/__init__.py (_): Implement the translation function for
6981     real using the python gettext module.
6982    
6983     * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
6984     translate empty strings.
6985    
6986     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
6987     Add a missing space to a warning message
6988    
6989     * po/README: New. Notes about the management of the translation
6990     files.
6991    
6992     * po/Makefile: New. Makefile to help manage the translation files.
6993    
6994     * po/es.po: New. Spanish translation by Daniel Calvelo Aros
6995    
6996     * MANIFEST.in: Include the *.mo files in Resources/Locale and the
6997     translations and support files in po/
6998    
6999     * setup.py (data_files): Add the *.mo files to the data_files too
7000    
7001     * README: Add note about the translations when building from CVS
7002    
7003 jonathan 669 2003-04-14 Jonathan Coles <[email protected]>
7004    
7005     * Thuban/UI/dock.py: Fixes some window resizing problems most
7006     noticable under windows. Always assume the button bitmaps will
7007     be there. Code clean up.
7008     (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
7009     images for the dock/undock button to the same images.
7010     Work around for RTbug #1801.
7011    
7012     * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
7013     be allowed to grow within the sizer. Fixes a bug under Windows
7014     where the toolbar wasn't being drawn.
7015    
7016 frank 664 2003-04-14 Frank Koormann <[email protected]>
7017    
7018     * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
7019     Updated design to try to make the button functionality more
7020     transparent.
7021    
7022 jonathan 662 2003-04-14 Jonathan Coles <[email protected]>
7023    
7024     * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
7025     finalize the intialization of the panel.
7026    
7027     * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
7028     creation of the panel. Should be the last thing called in the
7029     initializer of a subclass.
7030    
7031     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
7032     set the current selections in the combo boxes. This is needed
7033     under Windows.
7034    
7035     * Thuban/UI/classifier.py (Classifier.__init__): Add a top
7036     level panel to the dialog so that the background colors are
7037     consistent under Windows.
7038    
7039 jonathan 646 2003-04-11 Jonathan Coles <[email protected]>
7040    
7041 jonathan 662 * Thuban/UI/classgen.py: Change color ramps to start at white
7042     not black.
7043    
7044     * Thuban/UI/legend.py: Enable/disable the legend buttons when
7045     the legend changes. Fixes RTbug #1793.
7046    
7047     * test/test_classification.py: Added test for copying of
7048     classifications.
7049    
7050     2003-04-11 Jonathan Coles <[email protected]>
7051    
7052 jonathan 647 * Thuban/UI/resource.py: New. Centralize the loading of resources
7053     such as bitmaps.
7054    
7055     * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
7056     added images to the move buttons, added 'reverse' button.
7057     (CustomRampPanel.__init__): Added images to the move buttons.
7058     (GreyRamp): New. Generates a ramp from white to black.
7059     (HotToColdRamp): New. Generates a ramp from cold to hot colors.
7060    
7061     * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
7062     ID_PROPERTY_*.
7063     (Classifier.__init__): Minor changes to the layout.
7064     (Classifier._OnTitleChanged): Listen for when the user edits the
7065     title and update the dialog's title and the layer's title.
7066    
7067     * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
7068    
7069     * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
7070     (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
7071     if the layer's title changes.
7072    
7073     * Thuban/UI/mainwindow.py: Added new menu item and associated code
7074     to open a dialog to rename the map.
7075     (MainWindow): Use new resource class to import bitmaps.
7076    
7077     2003-04-11 Jonathan Coles <[email protected]>
7078    
7079 jonathan 646 * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
7080 jonathan 647 Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
7081     Resources/Bitmaps/group_use_none.xpm,
7082     Resources/Bitmaps/group_use_not.xpm,
7083     Resources/Bitmaps/hide_layer.xpm,
7084     Resources/Bitmaps/layer_properties.xpm,
7085     Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
7086     Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
7087     New.
7088 jonathan 646
7089 jonathan 636 2003-04-10 Jonathan Coles <[email protected]>
7090    
7091 jonathan 644 * Thuban/Model/classification.py: (ClassGroupRange.__init__):
7092     Should pass group to ClassGroup constructor.
7093    
7094     2003-04-10 Jonathan Coles <[email protected]>
7095    
7096 jonathan 636 * Thuban/Model/classification.py: (ClassGroup): Move all the common
7097     methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
7098     here. Implement SetVisible(), IsVisible().
7099     (ClassGroup.__init__): Add group parameter which acts as a copy
7100     constructor.
7101    
7102     * Thuban/UI/classifier.py (ClassTable): Add a new column for the
7103     "Visible" check boxes.
7104     (Classifier): Rename the buttons and refactor the code to match
7105     the new labels.
7106    
7107     * Thuban/UI/legend.py: Classify button is now called "Properties".
7108     Refactored the code to change variable names.
7109     (LegendTree.__FillTreeLayer): Only list a group if it is visible.
7110    
7111     * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
7112     MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
7113     renamed to MainWindow.LayerEditProperties.
7114     (MainWindow.ToggleLegend): Don't include map name in legend title.
7115     (MainWindow.SetMap): Added the map name to the window title.
7116     (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
7117     MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
7118     Functionality is found in the layer properties dialog.
7119    
7120     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
7121     draw visible groups.
7122    
7123 jonathan 626 2003-04-09 Jonathan Coles <[email protected]>
7124    
7125 jonathan 634 * Thuban/UI/classgen.py: Modifications to allow simple
7126     addition and selection of new color schemes.
7127     (MonochromaticRamp): New. Generates a ramp between two colors.
7128     (RedRamp): New. Generates a ramp of all red.
7129     (GreenRamp): New. Generates a ramp of all green.
7130     (BlueRamp): New. Generates a ramp of all blue.
7131    
7132     2003-04-09 Jonathan Coles <[email protected]>
7133    
7134 jonathan 626 * Thuban/Model/classification.py (Classification.__deepcopy__):
7135     Need to copy over field and fieldType attributes.
7136    
7137     * Thuban/Model/table.py (Table.field_range): New. Retrive the
7138     maximum and minimum values over the entire table for a given
7139     field.
7140     (Table.GetUniqueValues): New. Retrieve all the unique values
7141     in the table for a given field.
7142    
7143     * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
7144     (GenUniquePanel): New. Controls to allow the user to select
7145     which unique field values they would like in the classification.
7146     (CustomRampPanel): Code that was in ClassGenDialog that allows
7147     the user to select the properties for a custom ramp.
7148     (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
7149    
7150     * Thuban/UI/classifier.py: Removed a lot of debugging code.
7151     (Classifier._SetClassification): Callback method so that the
7152     class generator can set the classification in the grid.
7153     (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
7154     editing of a group properties class into a wxWindows control.
7155    
7156     * Thuban/UI/dock.py: It was decided that if the user closes
7157     a dockable window the window should simply hide itself. That
7158     way if the user wants to show the dock again it appears in the
7159     same place as it was when it was closed.
7160     (DockableWindow.Destroy): Call renamed method OnDockDestroy().
7161     (DockableWindow._OnButtonClose): Hide the window instead of
7162     destroying it.
7163     (DockableWindow._OnClose): Hide the window instead of
7164     destroying it.
7165    
7166     * Thuban/UI/legend.py (LegendTree): Use a private method to
7167     consistently set the font and style of the text. Fixes RTbug #1786.
7168    
7169     * Thuban/UI/mainwindow.py: Import just the Classifier class.
7170    
7171 bh 623 2003-04-07 Bernhard Herzog <[email protected]>
7172    
7173 bh 625 * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
7174     to the map module
7175    
7176     2003-04-07 Bernhard Herzog <[email protected]>
7177    
7178 bh 623 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
7179     favor of ToggleSessionTree
7180     (MainWindow.ToggleSessionTree): New method to toggle visibility of
7181     the session tree.
7182     (MainWindow.SessionTreeShown): New method to return whether the
7183     session tree is currently shown.
7184     (MainWindow.ToggleLegend): New method to toggle visibility of the
7185     legend
7186     (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
7187     LegendShown
7188     (MainWindow.LegendShown): New method to return whether the legend
7189     is currently shown.
7190     (_method_command): Add checked parameter so we can define check
7191     menu items
7192     (_has_tree_window_shown, _has_legend_shown): Use the appropriate
7193     mainwindow methods.
7194     (show_session_tree, show_legend commands): Removed.
7195     (toggle_session_tree, toggle_legend commands): New commands to
7196     toggle the visibility of the dialogs
7197    
7198 jonathan 612 2003-04-07 Jonathan Coles <[email protected]>
7199    
7200 jonathan 619 * Thuban/UI/classgen.py: Fix Windows problem.
7201    
7202     * Thuban/UI/dock.py: Fix Windows problem.
7203    
7204     * Thuban/UI/mainwindow.py: Use False instead of false.
7205     (MainWindow.ShowLegend): Remove unnecessary switch parameter.
7206    
7207     2003-04-07 Jonathan Coles <[email protected]>
7208    
7209 jonathan 612 Since we now say that the order of the groups in a classification
7210     matters, it makes sense to be able to manipulate that order. Most
7211     of the changes to Thuban/Model/classification.py are to that end.
7212    
7213     * Thuban/Model/classification.py (Classification.AppendGroup,
7214     Classification.InsertGroup, Classification.ReplaceGroup,
7215     Classification.RemoveGroup, Classification.GetGroup): Do as the
7216     names imply.
7217     (Classification.FindGroup): This was called GetGroup, but GetGroup
7218     takes an index, while FindGroup takes a value.
7219     (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
7220     REFERENCE. Currently there is a cyclic reference between the layer
7221     and its classification. If the classification doesn't need to know
7222     its owning layer we can change this, since it may make sense to be
7223     able to use the same classification with different layers.
7224    
7225     * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
7226    
7227     * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
7228     not AddGroup()
7229    
7230     * Thuban/UI/classifier.py: Now that we can depend on the order in
7231     a Classification and have methods to manipulate that order we don't
7232     need to use our own data structures in the grid. We can simply make
7233     the grid/table access the information they need from a copy of
7234     the classification object.
7235     (Classifier._OnCloseBtn): Event handler for when the user clicks
7236     'Close'. This is needed so if the user applies changes and then
7237     continues to change the table the user has the option of discarding
7238     the most recent changes and keeping what they applied.
7239    
7240     * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
7241     into the same group.
7242    
7243     * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
7244     with a really old version of proj, PJ_VERSION won't even be defined.
7245     If it isn't defined then just compile so that the function always
7246     returns Py_False.
7247    
7248     * test/test_classification.py: Fix tests to use the renamed methods.
7249     Still need to write tests for the new methods.
7250    
7251 jonathan 601 2003-04-04 Jonathan Coles <[email protected]>
7252 jonathan 608
7253 jonathan 612 * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
7254     call to SetSelection out of the method and before the call
7255     to __SelectField in __init__. This prevents a recursion of events
7256     when _OnFieldSelect is triggered by the user.
7257    
7258     2003-04-04 Jonathan Coles <[email protected]>
7259    
7260 jonathan 608 * Thuban/Model/classification.py: Rename Color.None to
7261     Color.Transparent.
7262     (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
7263     Don't bother copying the color, since Colors are immutable.
7264    
7265     * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
7266     Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
7267     Thuban/UI/renderer.py, Thuban/UI/view.py:
7268     Rename Color.None to Color.Transparent.
7269    
7270     * test/test_classification.py, test/test_load.py: Rename Color.None
7271     to Color.Transparent.
7272    
7273     2003-04-04 Jonathan Coles <[email protected]>
7274 jonathan 603
7275     * Thuban/Model/classification.py: Fix assert calls.
7276     (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
7277     Copy the color parameter rather than hold onto a reference.
7278 jonathan 601
7279 jonathan 603 * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
7280     the color object.
7281     (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
7282     are sure there exists only one refernce to Color.None in the system.
7283     This allows us to use 'is' rather than the comparision functions.
7284    
7285     * Thuban/Model/save.py: Fix assert calls.
7286    
7287     * Thuban/UI/classifier.py: Fix assert calls.
7288     (ClassGrid._OnCellDClick): Call up to the classifier to open the
7289     dialog to edit the groups properties.
7290     (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
7291     correctly if a cell is resized.
7292     (ClassTable.SetClassification): New. Changes the classification
7293     that is in the table.
7294     (ClassTable.__SetRow): Allow groups to be prepended.
7295     (Classifier): New code for opening the EditProperties and
7296     GenerateRanges dialogs.
7297     (SelectPropertiesDialog.__GetColor): Only set the color in the
7298     color dialog if the current color is not None.
7299    
7300     * Thuban/UI/dock.py: Fix assert calls.
7301    
7302     * Thuban/UI/legend.py: Fix assert calls.
7303    
7304     * Thuban/UI/renderer.py: Fix assert calls.
7305    
7306     * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
7307     classifications.
7308     (GenRangePanel): Panel specific to range generation.
7309     (GenSingletonPanel): Panel specific to singleton generation.
7310     (ClassGenerator): Class responsible for actually generating
7311     the classification from the data gathered in the dialog box.
7312     (PropertyRamp): Generates properties whose values range from
7313     a starting property to an ending property.
7314 jonathan 601
7315 bh 600 2003-04-03 Bernhard Herzog <[email protected]>
7316    
7317     * test/support.py (print_garbage_information): New function that
7318     prints information about still connected messages and memory
7319     leaks.
7320     (run_suite): Removed.
7321     (run_tests): New function for use as a replacement of
7322     unittest.main in the test_* files. This one calls
7323     print_garbage_information at the end.
7324    
7325     * test/runtests.py (main): Use support.print_garbage_information
7326    
7327     * test/test_layer.py: Use support.run_tests instead of
7328     unittest.main so we get memory leak information
7329     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
7330     (TestLayer.test_point_layer, TestLayer.test_empty_layer)
7331     (TestLayerLegend.test_visibility): Call the layer's Destroy method
7332     to fix a memory leak.
7333    
7334     * test/test_classification.py: Use support.run_tests instead of
7335     unittest.main so we get memory leak information
7336     (TestClassification.test_classification): Call the layer's Destroy
7337     method to fix a memory leak.
7338    
7339 bh 591 2003-04-02 Bernhard Herzog <[email protected]>
7340    
7341 bh 595 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
7342     Handle the reference counts of the return value and errors in
7343     PyArg_ParseTuple correctly.
7344    
7345 bh 593 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
7346     sure the filename is absolute to avoid problems when saving the
7347     session again
7348    
7349 bh 591 * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
7350    
7351 jonathan 587 2003-04-01 Jonathan Coles <[email protected]>
7352    
7353 jonathan 589 * Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
7354 jonathan 587 that there actually are points in the returned list of points
7355     before trying to index into the list. The list may be empty if
7356     the shape is a Null Shape.
7357    
7358 bh 586 2003-04-01 Bernhard Herzog <[email protected]>
7359    
7360     * test/test_map.py: Don't use from <module> import *
7361    
7362 jonathan 581 2003-04-01 Jonathan Coles <[email protected]>
7363    
7364     * Thuban/Model/session.py: Use LAYER_CHANGED instead of
7365     LAYER_LEGEND_CHANGED
7366    
7367     * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
7368     self.Destroy() to close the window after yesterday's changes.
7369    
7370     * test/test_map.py, test/test_session.py: Fix messages that
7371     are sent from maps and layers.
7372    
7373 jonathan 575 2003-03-31 Jonathan Coles <[email protected]>
7374    
7375     * Thuban/UI/classifier.py: Commented out some debugging statements.
7376     (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
7377     RTbug #1769.
7378    
7379     * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
7380     position (although position doesn't work yet under GTK).
7381     (DockableWindow.Destroy): New. Called when the window must be
7382     closed. Namely needed when the DockFrame closes and must close
7383     its children.
7384     (DockFrame): Listen for EVT_CLOSE and destroy all children.
7385    
7386     * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
7387     when then window is told to close.
7388     (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
7389     comment in source for more info.
7390    
7391     * Thuban/UI/main.py: Show the legend by default when Thuban starts.
7392    
7393     * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
7394     symmetry with other such methods.
7395     (MainWindow.ShowLegend): Show the legend docked by default.
7396    
7397 jonathan 569 2003-03-28 Jonathan Coles <[email protected]>
7398    
7399     * Thuban/UI/classifier.py: Support for highlighting a specific
7400     group within the grid when the classification dialog is opened.
7401     Also contains a lot of debugging printouts which will later
7402     be removed.
7403    
7404     * Thuban/UI/dock.py: Complete rework on the dock code so that
7405     that it is fairly removed from the rest of the Thuban application.
7406     It is easy to add new docks which the rest of the program having
7407     to be aware of them.
7408    
7409     * Thuban/UI/legend.py: Modifications to support selecting a
7410     specific group in the classification dialog. Changed how layers
7411     are drawn when the layer is visible/invisible.
7412    
7413     * Thuban/UI/mainwindow.py: Removed legend specific code and
7414     replaced it with calls to the new dock code.
7415    
7416     * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
7417     to check if scale > 0. Trying to track down a divide by zero.
7418    
7419 jonathan 557 2003-03-26 Jonathan Coles <[email protected]>
7420    
7421 jonathan 567 * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
7422     (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
7423     now part of DockableWindow.
7424     (LegendPanel.DoOnSelChanged): Select the current layer in the
7425     map.
7426     (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
7427     with the selected layer and/or group.
7428    
7429     2003-03-26 Jonathan Coles <[email protected]>
7430    
7431 jonathan 557 This putback contains the code for dockable windows. There is
7432     no support in wxWindows as of this date for windows that can
7433     attach themselves to other windows.
7434    
7435     The current model contains a DockableWindow which has a parent
7436     window for when it is detached and a dock window that it puts
7437     its contents in when it is docked. The contents of a DockableWindow
7438     must be a DockPanel. DockPanel itself derives from wxPanel.
7439    
7440     * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
7441     message, not a LAYER_LEGEND_CHANGED message.
7442    
7443     * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
7444    
7445     * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
7446     as one of the style properties for the fieldTypeText item to
7447     be sure that its size is correct when the text changes.
7448    
7449     * Thuban/UI/dock.py: New. Classes for the DockPanel and
7450     DockableWindow.
7451    
7452     * Thuban/UI/legend.py: Added some more buttons and made the
7453     LegendPanel a DockPanel.
7454    
7455     * Thuban/UI/mainwindow.py: Added sash windows to the main window
7456     and supporting functions for manipulating the sashes.
7457     (MainWindow.ShowLegend): Create a DockableWindow with the
7458     LegendPanel as the contents.
7459    
7460     * Thuban/UI/messages.py: Added DOCKABLE_* messages
7461    
7462     * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
7463     not LAYER_LEGEND_CHANGED, messages.
7464    
7465 jonathan 554 2003-03-25 Jonathan Coles <[email protected]>
7466    
7467     * setup.py: Added custom script bdist_rpm_build_script so that
7468     when the rpm is built the path to wx-config is correct.
7469    
7470     * setup.cfg: Added line saying to use the custom build script
7471    
7472 jonathan 552 2003-03-20 Jonathan Coles <[email protected]>
7473    
7474     Initial implementation of the Legend.
7475    
7476     * Thuban/UI/legend.py: New. Creates a window that shows the map's
7477     Legend information and allows the user to add/modify classifications
7478     and how the layers are drawn on the map.
7479    
7480     * setup.py: New command 'build_docs' which currently uses
7481     happydoc to generate html documentation for Thuban.
7482    
7483     * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
7484     Returns a string which is appropriately describes the group.
7485    
7486     * Thuban/Model/layer.py (Layer.SetClassification): Generate a
7487     LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
7488    
7489     * Thuban/Model/map.py (Map): Rename messages and use new, more
7490     specific, messages.
7491    
7492     * Thuban/Model/messages.py: New message to indicate that a layer's
7493     data has changed (LAYER_CHANGED). New map messages to indicate
7494     when layers have been added/removed/changed or if the stacking order
7495     of the layers has changed.
7496    
7497     * Thuban/Model/session.py: Rename and use new messages.
7498    
7499     * Thuban/UI/classifier.py: Remember if any changes have actually
7500     been applied so that if the dialog is cancelled without an application
7501     of changes we don't have to set a new classification.
7502     (ClassDataPreviewer): Pulled out the window specific code and put it
7503     ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
7504     symbols on any DC.
7505    
7506     * Thuban/UI/mainwindow.py: New code to open the legend.
7507    
7508     * Thuban/UI/view.py: Use new message names.
7509    
7510 jonathan 541 2003-03-19 Jonathan Coles <[email protected]>
7511    
7512     * Thuban/UI/main.py (verify_versions): New. Checks the versions
7513     of Python, wxPython, and some other libraries.
7514    
7515     * extensions/thuban/wxproj.cpp (check_version): Checks the given
7516     version against what wxproj was compiled with.
7517     (check_version_gtk): If wxproj was compiled with gtk then check
7518     the given version against the version of the gtk library
7519     currently being used.
7520    
7521 bh 538 2003-03-14 Bernhard Herzog <[email protected]>
7522    
7523     * test/test_command.py: Run the tests when the module is run as a
7524     script
7525    
7526     2003-03-14 Bernhard Herzog <[email protected]>
7527    
7528     Implement selection of multiple selected shapes in the same layer:
7529    
7530     - Introduce a new class to hold the selection. This basically
7531     replaces the interactor which was nothing more than the
7532     selection anyway. A major difference is of course that the new
7533     selection class supports multiple selected shapes in one layer
7534    
7535     - Move the object that represents the selection from the
7536     application to the canvas. The canvas is a better place than the
7537     application because the selection represents which shapes and
7538     layer of the map displayed by the canvas are selected and
7539     affects how the map is drawn.
7540    
7541     - Make the selection and its messages publicly available through
7542     the mainwindow.
7543    
7544     - The non-modal dialogs do not get a reference to the interactor
7545     anymore as they can simply refer to their parent, the
7546     mainwindow, for the what the interactor had to offer.
7547    
7548     * Thuban/UI/selection.py: New module with a class to represent the
7549     selection.
7550    
7551     * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
7552     these unused messages
7553    
7554     * Thuban/UI/application.py (ThubanApplication.OnInit)
7555     (ThubanApplication.OnExit, ThubanApplication.SetSession): The
7556     interactor is gone now.
7557     (ThubanApplication.CreateMainWindow): There is no interactor
7558     anymore so we pass None as the interactor argument for now for
7559     compatibility.
7560    
7561     * Thuban/UI/view.py (MapCanvas.delegated_messages)
7562     (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
7563     Unsubscribe, delegate messages according to the delegated_messages
7564     class variable.
7565     (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
7566     attributes from instance variables as described with the
7567     delegated_methods class variable.
7568     (MapCanvas.__init__): New instance variable selection holding the
7569     current selection
7570     (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
7571     pass them on to the renderer
7572     (MapCanvas.SetMap): Clear the selection when a different map is
7573     selected.
7574     (MapCanvas.shape_selected): Simple force a complete redraw. The
7575     selection class now takes care of only issueing SHAPES_SELECTED
7576     messages when the set of selected shapes actually does change.
7577     (MapCanvas.SelectShapeAt): The selection is now managed in
7578     self.selection
7579    
7580     * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
7581     (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
7582     Unsubscribe, delegate messages according to the delegated_messages
7583     class variable.
7584     (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
7585     attributes from instance variables as described with the
7586     delegated_methods class variable.
7587     (MainWindow.__init__): The interactor as ivar is gone. The
7588     parameter is still there for compatibility. The selection messages
7589     now come from the canvas.
7590     (MainWindow.current_layer, MainWindow.has_selected_layer):
7591     Delegate to the the canvas.
7592     (MainWindow.LayerShowTable, MainWindow.Classify)
7593     (MainWindow.identify_view_on_demand): The dialogs don't need the
7594     interactor parameter anymore.
7595    
7596     * Thuban/UI/tableview.py (TableFrame.__init__)
7597     (LayerTableFrame.__init__, LayerTableFrame.OnClose)
7598     (LayerTableFrame.row_selected): The interactor is gone. It's job
7599     from the dialog's point of view is now done by the mainwindow,
7600     i.e. the parent. Subscribe to SHAPES_SELECTED instead
7601     of SELECTED_SHAPE
7602    
7603     * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
7604     is gone. It's job from the dialog's point of view is now done by
7605     the mainwindow, i.e. the parent.
7606    
7607     * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
7608     gone. It's job from the dialog's point of view is now done by the
7609     mainwindow, i.e. the parent.
7610    
7611     * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
7612     gone. It's job from the dialog's point of view is now done by the
7613     mainwindow, i.e. the parent.
7614     (SessionTreeCtrl.__init__): New parameter mainwindow which is
7615     stored as self.mainwindow. The mainwindow is need so that the tree
7616     can still subscribe to the selection messages.
7617     (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
7618     (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
7619     selection is now accessible through the mainwindow. Subscribe to
7620     SHAPES_SELECTED instead of SELECTED_SHAPE
7621    
7622     * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
7623     SHAPES_SELECTED message now.
7624     (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
7625     so deal with multiple shapes
7626     (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
7627     gone. It's job from the dialog's point of view is now done by the
7628     mainwindow, i.e. the parent.
7629    
7630     * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
7631     parameter is now a list of shape ids.
7632     (RecordTable.SetTable): The second parameter is now a list of
7633     indices.
7634    
7635     * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
7636     selected_shape parameter and ivar to selected_shapes. It's now a
7637     list of shape ids.
7638     (MapRenderer.draw_label_layer): Deal with multiple selected
7639     shapes. Rearrange the code a bit so that the setup and shape type
7640     distinctions are only executed once.
7641    
7642     * test/test_selection.py: Test cases for the selection class
7643    
7644 jonathan 527 2003-03-11 Jonathan Coles <[email protected]>
7645    
7646     * Thuban/Model/load.py: Temporary fix so that the xml reader
7647     doesn't cause Thuban to crash.
7648    
7649     * Thuban/Model/layer.py: Handle the cyclic references between
7650     a layer and its classification better, and be sure to disconnect
7651     the classification from the layer when the layer is destroyed
7652     so that we don't maintain a cyclic reference that may not be
7653     garbage collected.
7654    
7655     * Thuban/Model/classification.py: See comment for layer.py.
7656    
7657 jan 523 2003-03-12 Jan-Oliver Wagner <[email protected]>
7658    
7659     * HOWTO-Release: New. Information on the steps for releasing
7660     a new version of Thuban.
7661    
7662 jonathan 514 2003-03-11 Jonathan Coles <[email protected]>
7663    
7664     * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
7665     Use True instead of true.
7666     (Classifier): Should have a single panel in which all the controls lie.
7667    
7668     * Thuban/UI/proj4dialog.py: Add normal border.
7669    
7670     * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
7671    
7672     * Thuban/UI/mainwindow.py: Use True instead of true.
7673    
7674     * setup.py: Update some definitions to use wxWindows2.4 files
7675    
7676     * Data/iceland_sample_class.thuban: Fixed file so that the
7677     field_type information is present.
7678    
7679 jonathan 490 2003-03-10 Jonathan Coles <[email protected]>
7680    
7681 jonathan 505 * Thuban/UI/classifier.py (Classifier.__init__): Make the
7682     field type label grow so that when the text changes the
7683     size is updated correctly. This may be a wxWindows bug.
7684    
7685     2003-03-10 Jonathan Coles <[email protected]>
7686    
7687 jonathan 499 * Thuban/UI/application.py: Changed SESSION_CHANGED to
7688     SESSION_REPLACED.
7689    
7690     * Thuban/UI/classifier.py: Wrap text with _().
7691     (ClassGrid.CreateTable): Set dimensions and size hints here,
7692     instead of in Reset, so we only set the size once.
7693    
7694     * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
7695    
7696     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
7697     Call Close() instead of Shutdown().
7698    
7699     * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
7700    
7701     * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
7702     Go back to using OnClose() instead of Shutdown().
7703    
7704     2003-03-10 Jonathan Coles <[email protected]>
7705    
7706 jonathan 497 * Thuban/UI/classifier.py (Classifier): SelectField() needed
7707     to know the old field index as well as the new one.
7708    
7709     2003-03-10 Jonathan Coles <[email protected]>
7710    
7711 jonathan 495 * Thuban/UI/classifier.py (Classifier): Use __SelectField()
7712     to correctly set the table information and call this from
7713     __init__ and from _OnFieldSelect so that all the information
7714     is up to date when the dialog opens and when a field is changed.
7715    
7716     2003-03-10 Jonathan Coles <[email protected]>
7717    
7718 jonathan 490 * Thuban/Model/classification.py (Classification): Don't use
7719     layer's message function directly, use the ClassChanged() method
7720     when then classification changes. SetField/SetFieldType/SetLayer
7721     must keep the information about field name and field type in
7722     sync when an owning layer is set or removed.
7723    
7724     * Thuban/Model/layer.py: Added ClassChanged() so that the
7725     classification can tell the layer when its data has changed.
7726     (Layer.SetClassification): Accepts None as an arguement to
7727     remove the current classification and correctly handles
7728     adding a new classification.
7729    
7730     * Thuban/Model/load.py: Comment out print statement
7731    
7732     * test/test_classification.py, test/test_save.py: New and
7733     improved tests.
7734    
7735 jonathan 483 2003-03-07 Jonathan Coles <[email protected]>
7736    
7737     * Thuban/Model/classification.py: Implemented __copy__ and
7738     __deepcopy__ for ClassGroup* and ClassGroupProperites so
7739     they can easily be copied by the classifier dialog.
7740     (ClassGroupProperites.__init__): The default line color should
7741     have been Color.Black.
7742    
7743     * Thuban/UI/classifier.py: Setting and Getting table values now
7744     uses a consistent set of functions.
7745     (Classifier): Now non-modal. Has field type label which changes
7746     as the field changes. Keep track of buttons in a list so that
7747     we can enable/disable the buttons when the None field is selected.
7748     (SelectPropertiesDialog): Add buttons to make the colors transparent.
7749    
7750     * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
7751     does what OnClose did, but can be called by the application to
7752     close a window. Needed when a session changes, and we have to
7753     close the classifier windows.
7754    
7755     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
7756     Shuts down open dialogs. Used when a new session is created
7757     or a session is opened.
7758     (MainWindow.SaveSession): Should only call application.SaveSession()
7759     if we don't call SaveSessionAs first.
7760     (MainWindow.Classify): Allow different classifier dialogs for
7761     different layers.
7762    
7763     * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
7764     the parent class handle it. Add Shutdown() to unsubscibe from
7765     event notification and call the parent Shutdown(). This was
7766     necessary so the application can close the tree window.
7767    
7768 jonathan 478 2003-03-06 Jonathan Coles <[email protected]>
7769    
7770     * Thuban/Model/classification.py: Minor documentation changes,
7771     Addition of __eq__ and __ne__ methods.
7772     (Classification.SetLayer): prevent recursion between this method
7773     and Layer.SetClassification().
7774    
7775     * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
7776    
7777     * Thuban/Model/layer.py (SetClassification): prevent recursion
7778     between this method and Classification.SetLayer().
7779    
7780     * test/test_classification.py, test/test_load.py,
7781     test/test_session.py: Fixed and added tests for the classification
7782     classes.
7783    
7784 bh 477 2003-03-06 Bernhard Herzog <[email protected]>
7785    
7786     * Thuban/UI/classifier.py (ClassGrid.__init__)
7787     (ClassGrid.CreateTable): Move the SetSelectionMode call to
7788     CreateTable because otherwise it triggers an assertion in
7789     wxPython/wxGTK 2.4.
7790    
7791 jonathan 459 2003-03-05 Jonathan Coles <[email protected]>
7792    
7793 jonathan 475 * Thuban/common.py: Move FIELDTYPE constants back to table.py.
7794 jonathan 471
7795 jonathan 475 * Thuban/Model/load.py: import FIELDTYPE constants from table.
7796 jonathan 471
7797 jonathan 475 * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
7798 jonathan 471
7799 jonathan 475 * Thuban/Model/table.py: Put FIELDTYPE constants back.
7800 jonathan 471
7801     2003-03-05 Jonathan Coles <[email protected]>
7802    
7803 jonathan 459 * Thuban/UI/classifier.py: Added class documentation.
7804     Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
7805     Store just the groups in the table and generate the other
7806     column information when it is requested. Add "None" field
7807     to pull-down to select no classification.
7808    
7809     * Thuban/common.py: Moved FIELDTYPE constants from table.py
7810     (Str2Num): Only catch ValueError exceptions.
7811    
7812     * Thuban/Model/classification.py: Class documentation. Renaming
7813     of methods with Stroke to Line. Groups are stored in a single
7814     list with the default as the first element. Groups are searched
7815     in the order they appear in the list.
7816    
7817     * Thuban/Model/color.py: Documentation.
7818    
7819     * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
7820     the kind of data represented by a field.
7821    
7822     * Thuban/Model/load.py (ProcessSession): Use proper string
7823     conversion function; fixes RTbug #1713.
7824    
7825     * Thuban/Model/save.py (Saver): Store field type information.
7826    
7827     * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
7828     (Table): Add field_info_by_name() to retrieve field information
7829     by specifying the field name, not the number.
7830    
7831     * Thuban/UI/mainwindow.py: Function name changes.
7832    
7833     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
7834     get the layer classification once. Don't try to classify
7835     values when the field is None: just use the default properties.
7836    
7837     * Thuban/UI/view.py: Function name changes.
7838    
7839     * Doc/thuban.dtd: Add field_type attribute to a classification.
7840    
7841 bh 456 2003-03-04 Bernhard Herzog <[email protected]>
7842    
7843 bh 458 * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
7844     the fill and stroke layer attributes optional with suitable
7845     default values. Add the stroke_width layer attribute. Use correct
7846     syntax for empty elements. Make the attribute list for labels
7847     refer to the label element.
7848    
7849     2003-03-04 Bernhard Herzog <[email protected]>
7850    
7851 bh 456 * setup.py (thuban_build_py.build): Add a comment about distutils in
7852     Python 2.3 containing some of the functionality we implement in
7853     setup.py ourselves.
7854    
7855     * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
7856     before the selection mode. Doing it the other way round triggers
7857     an assertion in wxWindows.
7858    
7859     * Thuban/Model/save.py (escape): Fix typo in doc-string
7860    
7861     * Thuban/Model/classification.py: Remove unnecessary wxPython
7862     import
7863    
7864 jonathan 448 2003-03-04 Jonathan Coles <[email protected]>
7865    
7866     * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
7867     Parameter 'value' should default to None.
7868    
7869     * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
7870     the class attribute __classification is now private.
7871    
7872     * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
7873     Classifier to ClassGrid. Added support for removing selected rows,
7874     which including code for keeping track of when cells are selected,
7875     and deselected.
7876     (ClassTable): Support for added/removing rows. Fixed a problem
7877     with __ParseInput whereby it would not allow strings (only numbers)
7878     to be entered.
7879     (Classifier): Added button and supporting code for removing
7880     selected rows.
7881    
7882 jonathan 445 2003-02-27 Jonathan Coles <[email protected]>
7883 jonathan 434
7884     * Thuban/common.py: Moved color conversion functions into
7885     Thuban/UI/common.py.
7886     (Str2Num): Now converts the float (not the string) to a long/int
7887     so that an exception isn't thrown.
7888    
7889     * Thuban/UI/common.py: Common functions used in several UI modules
7890    
7891     * Thuban/Model/classification.py: Changed the class hierarchy
7892     so that a Classification consists of Groups which return
7893     Properties when a value matches a Group.
7894    
7895     * Thuban/Model/layer.py: Fixed name resolution problem.
7896    
7897     * Thuban/Model/load.py: Use new Classification and Group functions.
7898    
7899     * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
7900     failure.
7901     (Saver.write_classification): Use new Classification and Group
7902     functions.
7903    
7904     * Thuban/UI/classifier.py: Changes to use new Classification and Group
7905 jonathan 445 functions. Fix to create a tuple with a single value instead of
7906     simply returning the value.
7907 jonathan 434
7908     * Thuban/UI/renderer.py: Use new Classification and Group functions.
7909     Use common.py functions.
7910    
7911 jonathan 445 * Thuban/UI/tree.py: Use common.py functions.
7912 jonathan 447
7913     * test/test_classification.py: Use new Classification and Group
7914     classes.
7915 jonathan 434
7916 jonathan 426 2003-02-24 Jonathan Coles <[email protected]>
7917    
7918     * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
7919     functions from Thuban color objects to wxWindow colour objects.
7920    
7921     * Thuban/Model/classification.py (Classification): Renamed
7922     GetProperties() to GetClassData(). Used the new iterator
7923     in TreeInfo().
7924     (ClassIterator): Iterator implementation to iterate over the
7925     ClassData objects in a classification object.
7926    
7927     * Thuban/Model/save.py (Saver.write_classificaton): Uses
7928     the new iterator to save the classification information.
7929    
7930     * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
7931     for changing the stroke and fill colors and previewing the
7932     changes.
7933    
7934     * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
7935     MainWindow.SaveSessionAs): Text string changes so the dialogs
7936     have more meaningful titles.
7937    
7938     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
7939     Classification method name from GetProperties to GetClassData.
7940    
7941     * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
7942     instead of accessing now non-existent class variables.
7943    
7944 bh 425 2003-02-24 Bernhard Herzog <[email protected]>
7945    
7946     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
7947     unneeded Shape() call. Rendering is substantially faster without
7948     it and it avoids some problems with broken shape files.
7949    
7950 frank 423 2003-02-20 Frank Koormann <[email protected]>
7951    
7952     Force minimal size of identify and label dialogs. The autosizing
7953     looked too ugly.
7954    
7955     * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
7956     * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
7957     Set size of listctrl.
7958     * Thuban/UI/identifyview.py (IdentifyView.__init__):
7959     Set size of dialog.
7960    
7961 jonathan 408 2003-02-19 Jonathan Coles <[email protected]>
7962    
7963     * test/test_classification.py, test/test_layer.py,
7964     test/test_load.py, test/test_map.py, test/test_session.py:
7965     Updated the tests to use the new functions that are in the
7966     respective classes.
7967    
7968     * Thuban/Model/classification.py (Classification):
7969     Uses the new ClassData* classes. Modification messages are
7970     passed up to the parent layer (if it exists).
7971     (ClassData): New class to encapsulate the common data in each
7972     classification property.
7973     (ClassDataDefault): Represents the Default class. data.
7974     (ClassDataPoint): Represents a single class. data point
7975     (ClassDataRange): Represents a class. range
7976     (ClassDataMap): Represents a class. map (unused).
7977    
7978     * Thuban/Model/color.py: Added Color.None to represent something
7979     with no color. Color.Black represents the color black.
7980     (NoColor): Helper class derived from Color to represent something
7981     with no color.
7982    
7983     * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
7984     stroke_width attributes. Made the 'classification' attribute private.
7985     New methods for setting/getting the classification.
7986    
7987     * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
7988     to get the classifcation and use the new ClassData* classes to
7989     hold the classification data. Use Str2Num to convert numbers
7990     properly.
7991    
7992     * Thuban/Model/save.py (Saver): Use new Color and Classification
7993     methods
7994    
7995     * Thuban/UI/classifier.py (ClassGrid): New class to represent a
7996     custom grid.
7997     (ClassTable): Support for editing Values and Labels and for
7998     changing what type (point or range) of data is stored in each
7999     property based on how the user enters the data.
8000     (Classifier): Support for saving the new classifications and
8001     launching the dialog to edit a property.
8002     (SelectPropertiesDialog): New class for editing the visual
8003     properties of a classification (stroke color, width, and fill color)
8004     (ClassPreviewer): Took the Draw method from ClassRenderer and
8005     made most of it into this new class. Intend to use this class in
8006     the SelectPropertiesDialog for previewing changes.
8007    
8008     * Thuban/UI/renderer.py: Use new Color and Classification methods.
8009    
8010     * Thuban/UI/tree.py: Formatting changes.
8011    
8012     * Doc/thuban.dtd: Add 'label' element
8013    
8014     * Thuban/common.py: New. Contains common routines used throughout
8015     the code.
8016     (Str2Num): Takes a string and converts it to the "best" type of
8017     number.
8018    
8019 bh 405 2003-02-14 Bernhard Herzog <[email protected]>
8020    
8021     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
8022     dragging flag is always set to 0 even when the tool implementation
8023     raises an exception
8024    
8025 bh 402 2003-02-11 Bernhard Herzog <[email protected]>
8026    
8027     * Thuban/UI/application.py (ThubanApplication.splash_screen): New
8028     method to create a splash screen.
8029     (ThubanApplication.ShowMainWindow): New. Show the main window.
8030     Needed so the splash screen can display the mainwindow
8031     (ThubanApplication.OnInit): Call the
8032     new splash_screen method to determine whether the application
8033     should display a splash screen. If it displays a splash screen do
8034     not immediately show the main window.
8035    
8036 jonathan 399 2003-02-11 Jonathan Coles <[email protected]>
8037    
8038     * Thuban/Model/classification.py: Added import line to fix
8039     feature conflicts between running on python2.2 and python2.1.
8040    
8041     * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
8042     onto the clinfo parameter, so removed the deepcopy().
8043    
8044 jonathan 396 2003-02-10 Jonathan Coles <[email protected]>
8045    
8046 tkoester 403 * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
8047 jonathan 396 Added element_open variable to track opening and closing of tags
8048     so that tags that don't span more than one line are closed with
8049     /> instead of </tag_name>. Use the GetDefault*() methods of
8050     the Classification class.
8051    
8052     * Thuban/Model/classification.py (Classificaton): Added set and
8053     get methods for the default data. The class also takes a layer
8054     reference so that modification messages can be sent. Fixed the
8055     methods to use the new ClassData class.
8056     (ClassData): New class to encapsulate the classification data
8057    
8058     * Thuban/Model/layer.py (Layer): Remove the
8059 tkoester 403 Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
8060 jonathan 396 SetDefault*() methods on the layer's classification object.
8061 tkoester 403 (Layer.__init__): Use the new SetDefault*() methods in the
8062 jonathan 396 Classification class.
8063    
8064     * Thuban/Model/load.py (ProcessSession): Use the new ClassData
8065     object instead of a dictionary.
8066    
8067 tkoester 403 * Thuban/UI/classifier.py (ClassRenderer): New class to
8068 jonathan 396 draw the classifications in the dialog box's table.
8069     (Classifier): Modified to use the ClassRenderer class.
8070    
8071 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
8072     methods of the Classification class.
8073 jonathan 396
8074     * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
8075     of the ClassData class.
8076    
8077     * test/test_classification.py, test/test_layer.py,
8078     test/test_map.py, test/test_session.py: Fix the tests to work
8079     with the above code changes.
8080    
8081 jonathan 387 2003-02-03 Jonathan Coles <[email protected]>
8082    
8083     * Thuban/Model/classification.py (Classification): Added getNull()
8084     to return the NullData reference
8085    
8086     * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
8087     Layer.SetStrokeWidth): Modified these functions to change the
8088     null data in the classification rather than keep these values
8089     directly in the Layer class. Menu options to change these values
8090     work again.
8091    
8092 jonathan 380 2003-01-28 Jonathan Coles <[email protected]>
8093    
8094 jonathan 384 * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
8095 tkoester 403 Fixed crashing problem on some systems. Dialog box shows
8096 jonathan 380 classification data.
8097    
8098 jonathan 384 * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
8099     Colors in the tree view.
8100    
8101     * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
8102     the tree info for classifications. Commented out unnecessary lines.
8103    
8104     * Thuban/Model/classification.py (Classification.TreeInfo): New
8105     function to add information about the classification into the
8106     tree view.
8107    
8108 tkoester 403 2003-01-27 Jan-Oliver Wagner <[email protected]>
8109 jan 375
8110 tkoester 403 * Thuban/__init__.py (_): New.
8111 jan 375
8112     * Thuban/Model/classification.py, Thuban/Model/extension.py,
8113     Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
8114 tkoester 403 Thuban/Model/session.py, Thuban/UI/application.py,
8115     Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
8116     Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
8117     Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
8118     Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
8119     Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
8120 jan 375
8121 jonathan 370 2003-01-27 Jonathan Coles <[email protected]>
8122    
8123 tkoester 403 * Thuban/Model/layer.py: Classification initialization calls.
8124 jonathan 370
8125 tkoester 403 * Thuban/Model/classification.py: Created class to encapsulate
8126     a layer classification. Supports specific data points and
8127     ranges.
8128 jonathan 370
8129 tkoester 403 * Thuban/Model/load.py: Added support for loading classification
8130     information.
8131 jonathan 370
8132 tkoester 403 * Thuban/Model/save.py: Added support for saving classification
8133     information.
8134 jonathan 370
8135 tkoester 403 * Thuban/UI/classifier.py: Initial class for a dialog box for
8136     specifying classification information.
8137 jonathan 370
8138 tkoester 403 * Thuban/UI/mainwindows.py: Support for opening the classifier
8139     dialog.
8140 jonathan 370
8141 tkoester 403 * Thuban/UI/renderer.py: Support for drawing a layer with the
8142     classification information.
8143 jonathan 370
8144 tkoester 403 * Data/iceland_sample_class.thuban: iceland_sample with
8145     classification data.
8146 jonathan 370
8147 tkoester 403 * test/test_classification: Tests for the Classification class.
8148 jonathan 370
8149 bh 359 2002-12-09 Bernhard Herzog <[email protected]>
8150    
8151 bh 361 * test/test_command.py: New. Tests for the command classes.
8152    
8153 bh 359 * Thuban/UI/command.py (ToolCommand): New class for tool commands.
8154     (Command.IsTool): New method to distinguish between command
8155     switching tools and other commands.
8156    
8157     * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
8158     the tool to avoid direct assignments to instance variables
8159     (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
8160     (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
8161     change the tool
8162    
8163     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
8164     active tool's command turns insensitive, disable the tool.
8165     (_tool_command): Use the new ToolCommand class
8166    
8167     * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
8168     SelectTool method to change the tool
8169     (iconfile): Use the ToolCommand class
8170    
8171 bh 354 2002-12-03 Bernhard Herzog <[email protected]>
8172    
8173     * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
8174     the case of selected items that are not children of Layers or Maps
8175     properly. Previously this bug would trigger an assertion in
8176     wxWindows.
8177    
8178 frank 352 2002-11-06 Frank Koormann <[email protected]>
8179    
8180 bh 354 * Thuban/UI/mainwindow.py: Altered the order of tools in the
8181     toolbar: First now are all navigation tools (Zoom In/Out, Pan,
8182     Full Extent).
8183 tkoester 403
8184 bh 349 2002-10-23 Bernhard Herzog <[email protected]>
8185    
8186     * setup.py (setup call): version now 0.1.3
8187    
8188     * MANIFEST.in: Add the files in test/
8189    
8190     * test/README: Add note about tests requiring the iceland data
8191    
8192     * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
8193     copyright notice.
8194    
8195 bh 344 2002-10-18 Bernhard Herzog <[email protected]>
8196    
8197     * test/test_map.py
8198     (TestMapWithContents.test_projected_bounding_box): Use an explicit
8199     epsilon.
8200    
8201     * test/support.py (FloatComparisonMixin.assertFloatEqual)
8202     (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
8203     message if the assertion fails and don't return the return value
8204     of self.assert_. In assertFloatSeqEqual the return meant that not
8205     all items of the sequence were compared.
8206    
8207 bh 326 2002-09-20 Bernhard Herzog <[email protected]>
8208    
8209 bh 341 * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
8210    
8211     * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
8212    
8213 bh 338 * test/test_map.py (TestMapWithContents.test_tree_info): Create
8214     the string with the bounding box on the fly because of platform
8215     differences in the way %g is handled.
8216    
8217     * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
8218     DBFfile too because Thuban layers can't yet cope missing DBF
8219     files.
8220    
8221     2002-09-20 Bernhard Herzog <[email protected]>
8222    
8223 bh 326 * test/test_menu.py: Use initthuban instead of
8224     add_thuban_dir_to_path to initialize Thuban.
8225    
8226     * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
8227     Mixin class for float comparisons
8228     (SubscriberMixin): New. Mixin class to test messages sent through
8229     the Connector class
8230    
8231     * test/README: Fix a typo and add the -v flag to the command for
8232     individual tests
8233    
8234 bh 335 * test/test_session.py: New. Test cases for Thuban.Model.session
8235    
8236     * test/test_proj.py: New. Test cases for Thuban.Model.proj
8237    
8238     * test/test_map.py: New. Test cases for Thuban.Model.map
8239    
8240     * test/test_layer.py: New. Test cases for Thuban.Model.layer
8241    
8242     * test/test_label.py: New. Test cases for Thuban.Model.label
8243    
8244     * test/test_connector.py: New. Test cases for Thuban.Lib.connector
8245    
8246     * test/test_color.py: New. Test cases for Thuban.Model.color
8247    
8248     * test/test_base.py: New. Test cases for Thuban.Model.base
8249    
8250 bh 322 2002-09-13 Bernhard Herzog <[email protected]>
8251    
8252     * Thuban/Model/session.py (Session.forwarded_channels): Forward
8253     the CHANGED channel too.
8254    
8255     * Thuban/Model/map.py (Map.forwarded_channels): Forward the
8256     CHANGED channel too.
8257     (Map.__init__): Call the Modifiable constructor as well.
8258    
8259     * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
8260     event if the modified flag changes.
8261     (Modifiable.changed): Tweak the doc-string.
8262    
8263     * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
8264     (MainWindow.set_position_text): Put the code that puts the text
8265     with the mouse position into the status bar into the new method
8266     set_position_text so that it can overwritten in derived classes.
8267    
8268 bh 317 2002-09-12 Bernhard Herzog <[email protected]>
8269    
8270     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
8271     message box on the main window.
8272    
8273 bh 313 2002-09-11 Bernhard Herzog <[email protected]>
8274    
8275     * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
8276     the 'E' because it's less likely to interfere with other menu
8277     entries.
8278 bh 315 (MainWindow.build_menu): remove an incorrect comment.
8279 bh 313
8280 bh 311 2002-09-10 Bernhard Herzog <[email protected]>
8281    
8282     * Thuban/UI/mainwindow.py (MainWindow.Map): New.
8283     (_tool_command): Add sensitive parameter
8284     (_has_visible_map): Sensitivity callback to tools and other
8285     commands that require a visible map. Use it in map_zoom_in_tool,
8286     map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
8287     and map_full_extent
8288    
8289 bh 308 2002-09-06 Bernhard Herzog <[email protected]>
8290    
8291     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
8292     VIEW_POSITION
8293    
8294 tkoester 403 2002-09-04 Frank Koormann <[email protected]>
8295 frank 306
8296     * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
8297    
8298 bh 302 2002-09-02 Bernhard Herzog <[email protected]>
8299    
8300 bh 304 * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
8301     wxWindows already and our implementation doesn't work correctly
8302     with wxGTK 2.3:
8303     (MapCanvas.__init__): Remove the instance variable
8304     (MapCanvas.OnPaint): Always call do_redraw when there's a map to
8305     be drawin
8306     (MapCanvas.OnIdle): Removed.
8307    
8308 bh 302 * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
8309     a parameter to determine the size of the rectangle.
8310     (MapCanvas.find_shape_at): Create the box around the point on a
8311     layer by layer basis and make the size depend on the shape type.
8312     This solves a problem with the selection of point shapes at the
8313     border of the layer's bounding box
8314    
8315 bh 292 2002-08-30 Bernhard Herzog <[email protected]>
8316    
8317 bh 300 * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
8318     for the sensitivity of remove layer.
8319     (_can_remove_layer): New. Sensitivity callback for remove layer
8320     (Command layer_remove): Use _can_remove_layer
8321    
8322     * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
8323     determine whether a given layer can be deleted.
8324    
8325 bh 297 * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
8326     (MapCanvas.do_redraw): Get rid of the unused update_region
8327     instance variable
8328    
8329 bh 294 * Thuban/UI/view.py: Add/update some doc-strings.
8330    
8331 bh 292 * test/: new subdirectory with a bunch of unit tests.
8332    
8333     * test/README, test/test_table.py, test/test_save.py,
8334     test/test_menu.py, test/test_load.py: Initial set of tests and
8335     brief instructions on how to run them
8336    
8337 bh 287 2002-08-29 Bernhard Herzog <[email protected]>
8338    
8339 bh 291 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
8340     arcs with multiple parts.
8341    
8342 bh 289 * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
8343     Handle degenrate rectangles.
8344    
8345 bh 287 * Thuban/Model/table.py: Make writing records work correctly:
8346     (Table.__init__): Keep track of whether the DBF is open for
8347     writing
8348     (Table.write_record): Open the DBF file for writing when necessary
8349    
8350 bh 285 2002-08-27 Bernhard Herzog <[email protected]>
8351    
8352     * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
8353     dbf files only for reading by default. Use a new writable dbf
8354     object for writing.
8355    
8356 bh 278 2002-08-26 Bernhard Herzog <[email protected]>
8357    
8358 bh 282 * Thuban/UI/mainwindow.py: Refactor the context creation:
8359     (MainWindow.Context): New method to return a context
8360     (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
8361     new method
8362    
8363 bh 278 * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
8364     layer table specific code from TableGrid into LayerTableGrid
8365     (TableFrame, LayerTableFrame): Split the layer table specific code
8366     from TableFrame into LayerTableFrame
8367 bh 280 (LayerTableGrid.select_shape): Remove a debug print
8368 bh 278
8369     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
8370     LayerTableFrame
8371    
8372 bh 277 2002-08-23 Bernhard Herzog <[email protected]>
8373    
8374     * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
8375     absolute filename.
8376    
8377 bh 269 2002-08-22 Bernhard Herzog <[email protected]>
8378    
8379 bh 275 * Thuban/Model/table.py (Table.write_record): New method to write
8380     records.
8381 tkoester 403 (Table.__init__): Open the DBF file for writing too.
8382 bh 275
8383     * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
8384     into the underlying table.
8385    
8386     * extensions/shapelib/shapefil.h (DBFCommit),
8387     extensions/shapelib/dbfopen.c (DBFCommit): New API function to
8388     commit any changes made to the DBF file.
8389    
8390 bh 271 * Thuban/UI/mainwindow.py (make_check_current_tool)
8391     (_tool_command): Put the code that generates the "checked"
8392     callback into a separate function so that we can reuse it
8393     elsewhere
8394    
8395 bh 269 * Thuban/Model/save.py (Saver): New class to handle serializing a
8396     session into an XML file. The main reason to introduce a class is
8397     that applications built on Thuban can derive from it so that they
8398     can save additional information in a session file.
8399     (save_session): Delegate almost all the work to the Saver class.
8400     Rename the filename argument to file because it may be a file like
8401     object now.
8402    
8403     * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
8404     code. Remove the little test code which would be executed when the
8405     module is run as a script which didn't work anymore since it can't
8406     import the other Thuban modules.
8407     (ProcessSession, load_session): Refactor the ProcessSession to
8408     have one method for each element start and end tag so that derived
8409     classes can easily override the processing of individual tags.
8410     Also, always parse with namespaces enabled because applications
8411     built on top of Thuban will likely use namespaces if they extend
8412     the session file format.
8413    
8414 bh 266 2002-08-21 Bernhard Herzog <[email protected]>
8415    
8416     * setup.py (ThubanInstall.run): Don't repr install_lib_orig
8417     because thubaninit_contents will do it for us.
8418    
8419 tkoester 403 2002-08-16 Jan-Oliver Wagner <[email protected]>
8420 jan 265
8421     * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
8422     tree window already open
8423    
8424 bh 259 2002-08-15 Bernhard Herzog <[email protected]>
8425    
8426 bh 263 * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
8427     with self.
8428    
8429     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
8430     when we have actually captured it.
8431    
8432 bh 259 * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
8433     shapefile and destroy the table.
8434    
8435     * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
8436    
8437 bh 254 2002-08-14 Bernhard Herzog <[email protected]>
8438    
8439 bh 256 * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
8440     instance variable columns
8441     (RecordTable.GetTypeName): row and col may be negative in some
8442     cases.
8443    
8444 bh 254 * setup.py (InstallLocal.initialize_options)
8445     (InstallLocal.finalize_options, InstallLocal.user_options): New
8446     option create-init-file to build a thubaninit.py when running
8447     install_local
8448     (InstallLocal.run): Create the thubaninit.py module when requested
8449     (thubaninit_contents): Split the template into several parts and
8450     create a new function thubaninit_contents that creates the
8451     contents of a thubaninit module.
8452     (ThubanInstall.run): Use the new function to create the thubaninit
8453     module.
8454    
8455 bh 252 2002-07-30 Bernhard Herzog <[email protected]>
8456    
8457     * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
8458     cleanup.
8459     (ThubanApplication.MainLoop): Extend to automatically call OnExit.
8460    
8461     * Thuban/Model/session.py (Session.Destroy): Don't bypass the
8462     direct base class' Destroy method.
8463    
8464     * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
8465     layers.
8466     (Map.Destroy): Destroy the label_layer as well and call the
8467     inherited Desatroymethod first so that no more messages are
8468     issued.
8469     (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
8470     message if the stacking order actually has changed. Add
8471     doc-strings.
8472     (Map.BoundingBox): Correct the doc-string.
8473     (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
8474     (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
8475    
8476     * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
8477     all labels.
8478    
8479 bh 247 2002-07-29 Bernhard Herzog <[email protected]>
8480    
8481     * Thuban/Model/map.py (Map.subscribe_layer_channels)
8482     (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
8483     to a layer's channels into separate methods.
8484     (Map.RemoveLayer, Map.AddLayer): Call the new methods
8485     (Map.Destroy): Unsubscribe from a layer's channels before
8486     destroying it.
8487    
8488     * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
8489     selected_layer parameter to searched_layer which is the layer to
8490     search in.
8491     (MapCanvas.SelectShapeAt): New parameter layer to restrict the
8492     search to that layer. Return the selected layer and shape.
8493    
8494     * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
8495     typo
8496    
8497 bh 238 2002-07-24 Bernhard Herzog <[email protected]>
8498    
8499 bh 243 * Thuban/UI/application.py (ThubanApplication.create_session):
8500     Extend the doc string.
8501     (ThubanApplication.subscribe_session)
8502     (ThubanApplication.unsubscribe_session): New methods to
8503     subscribe/unsubscribe to/from session channels.
8504     (ThubanApplication.SetSession): Call the new methods here.
8505     (ThubanApplication.maps_changed, ThubanApplication.set_map):
8506     Renamed set_map to maps_changed. Its now a subscriber for
8507     MAPS_CHANGED.
8508    
8509     * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
8510     x-coordinate in case of simple clicks
8511    
8512     * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
8513     don't pass it as a parameter
8514    
8515     * Thuban/Model/session.py (Session.RemoveMap): New
8516    
8517 bh 238 * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
8518     window size into a parameter.
8519    
8520 bh 235 2002-07-23 Bernhard Herzog <[email protected]>
8521    
8522 bh 237 * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
8523     just commands.
8524    
8525 bh 235 * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
8526     parameter list a bit to allow setting the window title and the
8527     initial message in the status bar. Update the callers.
8528    
8529     * Thuban/UI/application.py (ThubanApplication.OnInit)
8530     (ThubanApplication.CreateMainWindow): Put the mainwindow
8531     instantiation into a separate method so that it can be overridden
8532     by a subclass.
8533    
8534 bh 230 2002-07-19 Bernhard Herzog <[email protected]>
8535    
8536 bh 234 * Thuban/Model/session.py: Issue a CHANGED message every time
8537     another changed message is issued to make it easier to get
8538     notified of changes.
8539     (Session): Update the doc string
8540     (Session.forward): Issue changed-events as CHANGED as well.
8541     (Session.changed): Overwrite the inherited version to issue
8542     CHANGED events as well.
8543    
8544     * Thuban/UI/tree.py: We can now simply subscribe to the session's
8545     CHANGED channel to be informed of changes.
8546     (SessionTreeCtrl.session_channels): Not needed any longer.
8547 tkoester 403 (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
8548 bh 234 Only have to (un)subscribe CHANGED
8549    
8550     * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
8551    
8552 bh 230 * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
8553     for the wxPython locale bug to __init__.py so that it's
8554     automatically executed by anybody using UI code from Thuban.
8555    
8556 bh 225 2002-07-18 Bernhard Herzog <[email protected]>
8557    
8558 bh 228 * Thuban/UI/main.py (main): app no longer needs to be global
8559    
8560     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
8561     as parameter and store it in an instance variable
8562     (MainWindow.invoke_command, MainWindow.update_command_ui)
8563     (MainWindow.save_modified_session, MainWindow.NewSession)
8564     (MainWindow.OpenSession, MainWindow.SaveSession)
8565     (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
8566     application object.
8567    
8568     * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
8569     the main window with self.
8570    
8571 bh 225 * Thuban/UI/context.py: New module with the context class
8572    
8573     * Thuban/UI/command.py (Command): Update doc string.
8574    
8575     * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
8576     MainWindow.update_command_ui): Pass an instance of the context
8577     class to the command's methods
8578     (check_current_tool, call_method): Handle the new context
8579     implementation
8580    
8581     * Examples/simple_extensions/simple_tool.py (simple_tool,
8582     check_simple_tool): Handle the new context implementation
8583    
8584     * Examples/simple_extensions/simple_command.py (simple_command):
8585     Handle the new context implementation. Update the comments about
8586     the context.
8587    
8588     * Thuban/UI/application.py (ThubanApplication.SetSession): Add
8589     doc-string
8590     (ThubanApplication.Session): New method to return the session
8591     object
8592    
8593     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
8594     interactor's selected_layer may not be a layer of the current
8595     session when the tree is updated while a new session is being set.
8596    
8597 bh 217 2002-07-17 Bernhard Herzog <[email protected]>
8598    
8599     * Thuban/UI/tree.py (color_string): Removed. No longer used.
8600     (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
8601     update_tree into update_tree and add_items. The tree now uses a
8602     more generic way to display the contents of the tree.
8603     (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
8604    
8605     * Thuban/Model/layer.py (Layer.TreeInfo),
8606     Thuban/Model/extension.py (Extension.TreeInfo),
8607     Thuban/Model/map.py (Map.TreeInfo),
8608 tkoester 403 Thuban/Model/session.py (Session.TreeInfo):
8609 bh 217 Add TreeInfo methods to implement the new tree view update scheme
8610    
8611 bh 216 2002-07-16 Bernhard Herzog <[email protected]>
8612    
8613     * Thuban/UI/application.py: Don't use "import from" for the
8614     MainWindow. It can't always be resolved.
8615     (ThubanApplication.OnInit): change reference to MainWindow
8616     accordingly.
8617    
8618     * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
8619     completely
8620    
8621 bh 213 2002-07-10 Bernhard Herzog <[email protected]>
8622    
8623     * setup.py (create_init_module): New configurable variable whose
8624     default depends on the platform we're running on.
8625     (ThubanInstall.initialize_options): Initialize
8626     self.create_init_module from the global create_init_module
8627     (ThubanInstall.user_options): indictate that the options
8628     create-init-module and init-module-dir have arguments.
8629    
8630     * setup.py: In the setup call change the version number to include
8631     cvs.
8632    
8633     * MANIFEST.in: Add the files in Examples
8634    
8635 bh 205 2002-07-09 Bernhard Herzog <[email protected]>
8636    
8637 bh 210 * setup.py: In the setup call, use the thuban homepage as the
8638     value of the url parameter.
8639    
8640 bh 208 * Examples: New subdirectory for examples.
8641    
8642     * Examples/simple_extensions/simple_tool.xpm,
8643     Examples/simple_extensions/simple_tool.py,
8644     Examples/simple_extensions/simple_command.py,
8645     Examples/simple_extensions/README: Simple examples showing how to
8646     add new commands and tools.
8647    
8648 bh 207 * setup.cfg (bdist_rpm): Add the default value for prefix and tell
8649     bdist_rpm that we also have an install script.
8650     (bdist_inno): Add 2002 to the copyright notice.
8651    
8652 bh 205 * setup.py: Create a file in python's site-packages directory to
8653     make installation of Thuban as a library easier.
8654     (ThubanInstall.user_options): Add two new options,
8655     create-init-module and init-module-dir
8656     (ThubanInstall.expand_with_pure_python_dirs): New method to expand
8657     filenames for installation in the default directories.
8658     (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
8659     the inherited methods to capture some filenames before they're
8660     transformed too much by distutils.
8661     (ThubanInstall.run): Create the init module if requested.
8662     (ThubanInstall.thuban_init_filename): New method to return the
8663     full name of the init module.
8664     (ThubanInstall.get_outputs): Append the filename of the init
8665     module.
8666    
8667 bh 202 2002-07-08 Bernhard Herzog <[email protected]>
8668    
8669 bh 205 * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
8670     handle the prefix properly which means that the default for the
8671     installation prefix should be /usr for RPMs and /usr/local when
8672     doing a normal source install.
8673     (bdist_rpm_install_script): Script to override the default install
8674     commands in the specfile generated by the bdist_rpm command.
8675     (thuban_bdist_rpm.user_options): Add a prefix option
8676     (thuban_bdist_rpm.initialize_options): Init the prefix option.
8677     Create the script files for the spec files as empty files here
8678     (thuban_bdist_rpm._make_spec_file): Override the inherited method
8679     to fill the script files with content.
8680    
8681 bh 202 * Thuban/Model/save.py (relative_filename): Wrapper around
8682     Thuban.Lib.fileutil.relative_filename that accepts an empty dir
8683     argument. save_session now automatically uses this version,
8684     solving a problem when saving to a relative filename.
8685    
8686     * setup.py: In the setup call, make sure that the library
8687     directories are under $prefix/lib not directly under $prefix.
8688    
8689 tkoester 403 2002-06-20 Jan-Oliver Wagner <[email protected]>
8690 jan 199
8691     * Thuban/Model/extension.py: new module to handle extension objects.
8692     * Thuban/Model/messages.py: new messages for extensions.
8693     * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
8694     Session.AddExtension): new for handling extensions.
8695     Also some other minor changes to round up extension handling.
8696     * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
8697     of Extension titles and title and names of its objects.
8698    
8699 bh 194 2002-05-29 Bernhard Herzog <[email protected]>
8700    
8701     * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
8702 bh 202 the events for a command.
8703 bh 194 (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
8704     Call bind_command_events to bind the events. add_toolbar_command
8705     can now bind events too so that it's possible to have commands
8706     that are only available through the toolbar.
8707     (MainWindow.init_ids): New instance variable events_bound to keep
8708     track of for which commands events have been bound.
8709    
8710 bh 190 2002-05-28 Bernhard Herzog <[email protected]>
8711    
8712     * Thuban/UI/menu.py: New module to build and manage menus.
8713    
8714     * Thuban/UI/mainwindow.py: Remove some unused imports.
8715     (MainWindow.__init__, main_menu): move the definition of the main
8716     menu from __init__ to the Menu instance main_menu.
8717     (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
8718     build the menu bar and sub-menus from a menu description.
8719    
8720     * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
8721     startup file
8722     (ThubanApplication.read_startup_files): New method to run
8723     ~/.thuban/thubanstart.py
8724    
8725 bh 192 * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
8726     Move the toolbar definition to the Menu instance main_toolbar.
8727     (MainWindow.build_toolbar): New method to build the toolbar
8728     similar to the build_menu methods
8729    
8730 bh 184 2002-05-23 Bernhard Herzog <[email protected]>
8731    
8732 bh 186 * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
8733     layer_outline_color. Fix it in the definition of the command too.
8734    
8735 bh 184 * Thuban/UI/command.py (Command): Fix typo in doc string
8736    
8737 bh 182 2002-05-22 Bernhard Herzog <[email protected]>
8738    
8739     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
8740     in the docstring
8741    
8742 bh 175 2002-05-15 Bernhard Herzog <[email protected]>
8743    
8744 bh 180 * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
8745     when the shapefile is empty.
8746     (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
8747     now return None for empty shapefiles. Update doc-strings.
8748    
8749     * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
8750     the layer's bbox being None.
8751    
8752     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
8753     layer's bbox being None.
8754    
8755 bh 175 * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
8756     necessary.
8757     (MapCanvas.__init__): New instance variables, last_selected_layer
8758     and last_selected_shape to determine how the selection has
8759     changed.
8760    
8761     * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
8762     AutoSizeColumns because it will cause a traversal of the entire
8763     table which for large .dbf files will take a very long time.
8764    
8765 bh 172 2002-05-14 Bernhard Herzog <[email protected]>
8766    
8767     * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
8768     maximum depth for the tree than shapelib does by default.
8769    
8770 bh 165 2002-05-10 Bernhard Herzog <[email protected]>
8771    
8772     * setup.py (py_modules): The shptree modules doesn't have a
8773     wrapper, so don't include it in the py_modules
8774    
8775 bh 163 2002-05-08 Bernhard Herzog <[email protected]>
8776    
8777     * extensions/shapelib/shptree.c (compare_ints): Make arguments
8778     const void * as in the qsort prototype
8779     (SHPTreeFindLikelyShapes): Remove some unused variables.
8780    
8781     * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
8782     maintains to redraw the window during a drag.
8783     (MapCanvas.unprojected_rect_around_point): New method to determine
8784     a small region around a point for hit-testing.
8785     (MapCanvas.find_shape_at): Only test the shapes in a small region
8786     around the point.
8787    
8788     * setup.py: Increment the version to 0.1.2
8789    
8790     * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
8791     debug print and set session to None after unsubscribing
8792    
8793 bh 146 2002-05-07 Bernhard Herzog <[email protected]>
8794    
8795 bh 154 * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
8796     the file to have a .thuban extension.
8797    
8798 bh 152 * Thuban/UI/tree.py (session_channels): New class constant with
8799     all the session channels to subscribe to to update the tree
8800     (SessionTreeCtrl.session_changed): Remember the session so that we
8801     can unsubscribe properly. Use the new class constant to
8802     unsubscribe from the old session and subscribe to the new one.
8803     (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
8804     subscriptions of the SessionTreeCtrl.
8805     (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
8806    
8807     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
8808     Session Tree" command to the file menu.
8809    
8810     * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
8811     as update_region to the renderer.
8812    
8813     * Thuban/UI/renderer.py
8814     (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
8815     update box is now directly a tuple, not a wxRect anymore.
8816    
8817     * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
8818     prints.
8819    
8820     2002-05-07 Bernhard Herzog <[email protected]>
8821    
8822 bh 146 * setup.py: Add the shptree extension module. See
8823     extensions/pyshapelib/ChangeLog for more details.
8824    
8825     * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
8826     extensions/shapelib/dbfopen.c: Really update to the versions of
8827     shapelib 1.2.9. For some reason it wasn't really done on
8828     2002-04-11.
8829    
8830     * extensions/shapelib/shptree.c: Modified version of shptree.c of
8831     shapelib 1.2.9. The only real difference is the use of qsort
8832     instead of a bubble sort implementation
8833    
8834     * Thuban/Model/layer.py (Layer.__init__): New instance variable
8835     shapetree to hold the shapelib quadtree for the shapefile
8836     (Layer.open_shapefile): Create the quad tree.
8837     (Layer.ShapesInRegion): New method to return the ids of shapes in
8838     a given region using the quad tree.
8839    
8840     * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
8841     comment
8842     (draw_polygon_shape): Accept both arcs and polygons.
8843     (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
8844     the api.
8845    
8846     * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
8847     return the shape ids to be rendered in a given layer.
8848     (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
8849     ids. Use draw_polygon_shape to draw arc shapes as well.
8850     (ScreenRenderer.RenderMap): New parameter for the rectangle that
8851     has to be updated
8852     (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
8853     calling it's ShapesInRegion method.
8854    
8855     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
8856     update_region for the update region.
8857     (MapCanvas.OnPaint): Maintain the update region
8858     (MapCanvas.do_redraw): Pass the bounding box of the update_region
8859     to the renderer when drawing the bitmap. Reset the update_region.
8860    
8861 bh 129 2002-05-03 Bernhard Herzog <[email protected]>
8862    
8863 bh 131 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
8864     MainWindow.OpenSession): Change the file extension of the session
8865     files to .thuban
8866    
8867 bh 129 * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
8868     Move the map channels to be forwarded by the session into the
8869 bh 146 class constant with forwarded_channels. Also add
8870     LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
8871     forwarded_channels
8872 bh 129
8873     * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
8874     typo and some rewording).
8875    
8876 bh 126 2002-05-02 Bernhard Herzog <[email protected]>
8877    
8878     * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
8879     around to speed up most redraws:
8880     (MapCanvas.__init__): New instance variable bitmap which holds the
8881     bitmap
8882     (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
8883     self.bitmap to draw.
8884     (MapCanvas.full_redraw): New method to force a full redraw
8885     including the bitmap
8886     (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
8887     make sure the bitmap is redrawn.
8888     (MapCanvas.projection_changed, MapCanvas.set_view_transform,
8889     MapCanvas.shape_selected): Call full_redraw instead of readraw to
8890     make sure the bitmap is redrawn.
8891     (MapCanvas.OnSize): New method to handle size events so that the
8892     bitmap can be redrawn.
8893    
8894 bh 124 2002-04-29 Bernhard Herzog <[email protected]>
8895    
8896     * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
8897     canvas' VIEW_POSITION event
8898     (MainWindow.view_position_changed): Handler for VIEW_POSITION.
8899     Update the text in the status-bar accordingly.
8900    
8901     * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
8902     (MapCanvas.__del__): Implement because Publisher.__del__ has to be
8903     called.
8904     (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
8905     current_position
8906     (MapCanvas.set_current_position): New method to set
8907     current_position. Issue a VIEW_POSITION event
8908     (MapCanvas.CurrentPosition): New public method to return the value
8909     of current_position. Should be called when the VIEW_POSITION event
8910     is processed.
8911     (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
8912     Update the position.
8913     (MapCanvas.OnLeaveWindow): Set the position to None.
8914    
8915     * Thuban/UI/messages.py (VIEW_POSITION): New message for the
8916     position in the statusbar
8917    
8918 tkoester 403 2002-04-26 Frank Koormann <[email protected]>
8919 frank 120
8920     * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
8921    
8922 tkoester 403 2002-04-24 Frank Koormann <[email protected]>
8923    
8924 frank 118 * Resources/Bitmaps/identify.xpm: shadow added
8925    
8926     * Resources/Bitmaps/fullextent.xpm: new
8927 jan 116
8928 tkoester 403 2002-04-22 Jan-Oliver Wagner <[email protected]>
8929 jan 116
8930 tkoester 403 * Thuban/UI/tree.py (update_tree): added test for None on map bounding
8931     box
8932 jan 114
8933 tkoester 403 2002-04-21 Jan-Oliver Wagner <[email protected]>
8934    
8935 jan 114 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
8936    
8937     * Thuban/UI/tree.py (update_tree): added added map extent
8938    
8939     * Thuban/UI/mainwindow.py (_method_command): extended by parameter
8940 tkoester 403 icon; added map_full_extend as tool
8941 jan 114
8942 tkoester 403 2002-04-19 Jan-Oliver Wagner <[email protected]>
8943 jan 107
8944     * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
8945     saving _new_ sessions
8946    
8947     * Thuban/Model/session.py (create_empty_session): new session
8948     don't have a filename (set to None)
8949    
8950     * Thuban/UI/tree.py (update_tree): added filename and modified flag
8951    
8952     * Thuban/Model/load.py (ProcessSession): convert projection
8953     parameters from unicode to regular string
8954    
8955     * Data/iceland_sample.session: Added UTM Zone 26 projection.
8956    
8957 bh 100 2002-04-11 Bernhard Herzog <[email protected]>
8958    
8959     * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
8960     extensions/shapelib/dbfopen.c: Update to the versions of shapelib
8961     1.2.9
8962    
8963     * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
8964     the pyshapelib directoy into the list of include dirs, so that
8965     pyshapelib_api.h can be found.
8966    
8967     * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
8968     holds the pyshapelib C-API
8969     (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
8970     pyshapelib_api to access the shapelib functions.
8971     (initwxproj): Import the c_api from the shapelib module and
8972     initialize pyshapelib_api.
8973    
8974 bh 89 2002-04-04 Bernhard Herzog <[email protected]>
8975    
8976 bh 91 * setup.py (thuban_bdist_rpm.initialize_options): Use
8977     initialize_options to create the scripts for the rpm.
8978    
8979 bh 89 * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
8980    
8981 bh 85 2002-04-03 Bernhard Herzog <[email protected]>
8982    
8983 bh 87 * setup.py: Increment version to 0.1.1
8984    
8985 bh 85 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
8986     Layer" and "Remove Layer" commands from the layer menu to the map
8987     menu
8988    
8989 bh 83 2002-02-15 Bernhard Herzog <[email protected]>
8990    
8991     * Thuban/Model/layer.py (Layer.Shape): list append only takes one
8992     argument (python <= 1.5.2 erroneously accepted multiuple
8993     arguments)
8994    
8995 bh 81 2002-02-04 Bernhard Herzog <[email protected]>
8996    
8997     * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
8998     RecordGrid in the identifyview.
8999     (IdentifyView.__init__): Use IdentifyGridCtrl instead of
9000     IdentifyListCtrl. The grid allows editing of the values.
9001    
9002     * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
9003     implementing a grid for a single row of a thuban table.
9004    
9005     * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
9006     layers by default. Easier to use than the previous default of only
9007     searching through the select layer which meant that if no layer
9008     was selected, you couldn't select a shape.
9009    
9010     * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
9011    
9012     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
9013     stroke_width attribute
9014    
9015     * Thuban/Model/save.py (save_session): Write the new stroke_width
9016     attribute
9017    
9018     * Thuban/Model/load.py (ProcessSession.startElement): Read the
9019     stroke_width attribute
9020    
9021     * Thuban/Model/layer.py (Layer.__init__): New parameter and
9022     instance variable stroke_width
9023     (Layer.SetStrokeWidth): Set the stroke_width.
9024    
9025 bh 72 2002-02-01 Bernhard Herzog <[email protected]>
9026    
9027     * extensions/thuban/wxproj.cpp (project_points): Fix two
9028     off-by-one errors in the last loop that joins the various parts
9029     together.
9030    
9031 bh 71 2002-01-14 Bernhard Herzog <[email protected]>
9032    
9033     * setup.py (data_dist.make_distribution): Fix some typos
9034    
9035 bh 70 2001-09-18 Bernhard Herzog <[email protected]>
9036    
9037     * README: Slight tweaking in preparation for the 0.1 release
9038    
9039     * setup.cfg: Add section for sdist to create both tgz and zip
9040     archives
9041    
9042     * setup.py: increase version number to 0.1
9043     (data_dist): New command class for data distribution
9044    
9045 bh 64 2001-09-14 Bernhard Herzog <[email protected]>
9046    
9047 bh 70 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
9048     Handle the case of no layer (i.e. layer is None) properly.
9049    
9050 tkoester 403 * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
9051 bh 70 Set the initial selection of the combo boxes to reflect the
9052     projection we're starting with in a way that works on windows,
9053     too.
9054    
9055 bh 64 * Thuban/Lib/connector.py (Connector.print_connections): Print the
9056     puiblisher's ids in hex to make it easier to compare them to the
9057     standard repr of python methods
9058    
9059     * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
9060     messages
9061    
9062 bh 59 2001-09-13 Bernhard Herzog <[email protected]>
9063    
9064 bh 64 * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
9065     deselect the layer if no layer is selected
9066    
9067 bh 59 * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
9068     idle time when there actually is something to draw. If there's
9069     nothing to draw simply clear the window
9070     (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
9071     (MapCanvas.SetMap): force a redraw in all cases because
9072     FitMapToWindow doesn't always do it.
9073     (MapCanvas.ZoomFactor): Add an optional parameter, center, to
9074     specify the point to move into the center of the window
9075     (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
9076     dragged, zoon in/out by a factor of 2
9077 bh 64 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
9078     index, i.e. reversed drawing order) so that objects appearing to
9079     be in from of others are selected first. This is probably mostly
9080     relevant for point shapes where the symbols used may overlap
9081 bh 59
9082     * Thuban/Model/session.py (create_empty_session): Unset the
9083     modified bit before returning it
9084    
9085     * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
9086     create_empty_session session to create the new, empty session.
9087    
9088     * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
9089     the tool bitmaps.
9090     (MainWindow.OnClose, MainWindow.save_modified_session): Separate
9091     the code that asks whether the session should be saved into the
9092     new method save_modified_session.
9093     (MainWindow.OpenSession, MainWindow.NewSession): Use the new
9094     method to save modified session here too.
9095    
9096 bh 55 2001-09-11 Bernhard Herzog <[email protected]>
9097    
9098     * setup.py (InnoIconItem): fix typo
9099    
9100     (thuban_bdist_inno.run):
9101     (bdist_inno.run): Move the decision not to create symlinks on
9102     non-nt platforms to thuban_bdist_inno and do it unconditinally
9103     since we never want to create the symlinks here
9104    
9105 bh 48 2001-09-10 Bernhard Herzog <[email protected]>
9106    
9107 bh 53 * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
9108     identify view immediately
9109    
9110     * Thuban/UI/controls.py: New file with two classes RecordListCtrl
9111     and SelectableRecordListCtrl that implement the code shared by the
9112     identify view and the label dialog
9113    
9114     * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
9115     new class RecordListCtrl
9116    
9117     * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
9118     return value of GetValue is None instead of using it as a boolean
9119     directly so that Zero numbers are handled properly.
9120     (LabelListCtrl): Derive from the new class
9121     SelectableRecordListCtrl
9122    
9123 bh 48 * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
9124     (Proj4Dialog.dialogLayout): Make the window resizable and set the
9125     size of the text control explicitly to make the sizers work on
9126     both Windows and X.
9127    
9128 bh 44 2001-09-07 Bernhard Herzog <[email protected]>
9129    
9130     * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
9131     that can limit the search to the currently selected layer.
9132     (MapCanvas.SelectShapeAt): Make sure that the currently selected
9133     layer stays selected even when no shape is found
9134 bh 46 (MapCanvas.FitRectToWindow): If the rect has zero with or zero
9135     height do nothing (avoids zero division errors)
9136 bh 44
9137 bh 32 2001-09-06 Bernhard Herzog <[email protected]>
9138    
9139 bh 42 * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
9140     Correct the spelling of SessionTreeCtrl. dabbrev is too damn
9141     convenient :-)
9142     (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
9143     a new instvar layer_to_item to map layers to tree items
9144     (SessionTreeCtrl.layer_selected): Select the appropriate tree item
9145     to match the current selection in the interactor
9146    
9147 bh 40 * Thuban/UI/interactor.py (Interactor.SelectedLayer):
9148     (Interactor.HasSelectedLayer): New methods to query the current
9149     selection
9150    
9151     * Thuban/UI/mainwindow.py (MainWindow.current_layer):
9152     (MainWindow.has_selected_layer): Simply call the appropriate
9153     interactor method
9154    
9155     * Thuban/UI/mainwindow.py (MainWindow.__init__):
9156     (MainWindow.LayerShowTable):
9157     (MainWindow.identify_view_on_demand): Store the interactor in an
9158     instvar and use that reference instead of going through main.app
9159    
9160 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
9161     * Thuban/UI/application.py (ThubanApplication.OnInit):
9162 bh 40 * Thuban/UI/main.py (main): Create the session tree view in main
9163     with the new mainwindow method ShowSessionTree and not directly
9164     the application's OnInit method
9165    
9166     * Thuban/UI/tree.py (myTreeCtrlPanel):
9167     (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
9168     TreeCtrl isntead of a panel. This affects most method since we now
9169     refer to self instead of self.tree
9170     (SessionTreeView): New class implementing a non-modal dialog
9171     showing the session tree.
9172    
9173 bh 35 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
9174     layer to the tableview dialog.
9175    
9176     * Thuban/UI/tableview.py: Add some doc-strings
9177 tkoester 403 (TableGrid):
9178 bh 35 (TableGrid.OnRangeSelect):
9179     (TableGrid.OnSelectCell):
9180     (TableFrame.__init__):
9181     (TableFrame.row_selected):
9182     Selecting rows in the grid view now updates the selected shapes
9183     through the TableFrame. To achieve this we derive TableGrid from
9184     Publisher and introduce the message type ROW_SELECTED which the
9185     TableFrame subscribes to and which is issued by OnRangeSelect and
9186     OnSelectCell
9187    
9188     (DataTable.SelectRow): Removed because it's no longer needed in
9189     the row/shape selection scheme
9190    
9191 bh 32 * Thuban/UI/dialogs.py: New file implementing common classes for
9192     dialogs
9193    
9194     * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
9195     the SELECTED_SHAPE message anymore. This is now handled by the
9196     parent.
9197     (TableGrid.select_shape): Only update the selection if the shape
9198     is not None.
9199     (TableFrame): Inherit from the new NonModalDialog class.
9200     (TableFrame.__init__, TableFrame.select_shape): Handle the
9201     SELECT_SHAPE message.
9202     (TableFrame.OnClose): Extend the inherited method to unsubscribe
9203     SELECT_SHAPE
9204    
9205     * Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
9206     (MainWindow.add_dialog):
9207     (MainWindow.dialog_open):
9208     (MainWindow.remove_dialog):
9209     (MainWindow.get_open_dialog): New methods to maintain a dictionary
9210     of opened non-modal dialogs.
9211    
9212     (MainWindow.__init__): Initialize the new non-modal dictionary
9213     management code
9214     (MainWindow.LayerShowTable): maintain separate dialogs for each
9215     table using the non-modal dialog management code to only open a
9216     view once for each table.
9217    
9218     (MainWindow.IdentifyTool):
9219     (MainWindow.__init__):
9220     (MainWindow.identify_view_on_demand): Don't open the identify view
9221     in IdentifyTool anymore. This will be done automatically by the
9222     new method identify_view_on_demand which handles the
9223     SELECTED_SHAPE message so that the identify view will be opened on
9224     demand
9225    
9226     * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
9227     the interactor argument. The SELECTED_SHAPE message is now handled
9228     by the parent.
9229     (IdentifyView.__init__): Add the interactor argument so that we
9230     can handle the SELECTED_SHAPE message here
9231     (IdentifyView.selected_shape): New method to handle the
9232     SELECTED_SHAPE messages
9233    
9234     * Thuban/UI/identifyview.py (IdentifyView): Derive from the new
9235     NonModalDialog class
9236     (IdentifyView.OnClose): Extend the inherited version to
9237     unsubscribe SELECT_SHAPE
9238    
9239     * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints
9240    
9241 bh 26 2001-09-05 Bernhard Herzog <[email protected]>
9242    
9243     * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
9244 tkoester 403
9245 bh 26 * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
9246     interactor to pass through to the MapCanvas
9247 tkoester 403
9248 bh 26 * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
9249     argument to the MainWindow constructor to get rid of the ugly hack
9250     that made main.app available early just so that the mapcanvas
9251     could access the interactor object.
9252    
9253 bh 19 2001-09-04 Bernhard Herzog <[email protected]>
9254    
9255 bh 22 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
9256     that runs a modal message box
9257     (MainWindow.OnClose): Use the new method
9258     (MainWindow.RemoveLayer): Just do nothing in case no layer is
9259     selected. The command should be grayed out anyway, so there's no
9260     need to pop up a message box.
9261     (MainWindow.AddLayer): Pop up a message box with an error message
9262     if the shape file can't be opened
9263    
9264     * Thuban/Model/layer.py (Layer.__init__): Open the shapefile
9265     immediately. This will cause an exception in case the file can't
9266     be opened and we can display an appropriate message.
9267    
9268 bh 19 * MANIFEST.in: Add extensions/pyprojection/LICENSE
9269    
9270     * setup.py (thuban_bdist_rpm): New class implementing a Thuban
9271     specific bdist_rpm command.
9272    
9273     * Thuban/UI/main.py: Catch ImportError exceptions when importing
9274     the locale module because it may not be available on some
9275     installations.
9276    
9277     * extensions/pyprojection/LICENSE: Copy of the license text in
9278     Projection.i. Having it in a separate file makes it easier to
9279     refer to license text in e.g. RPMs
9280    
9281 bh 18 2001-09-03 Bernhard Herzog <[email protected]>
9282    
9283 bh 19 * setup.py: use wx-config instead of wxgtk-config because it's
9284     more generic
9285    
9286     * setup.py (ThubanInstall.get_outputs): Add the symlink in
9287     <prefix>/bin to the outputs
9288     (ThubanInstall.link_file): New method to link files. We need this
9289     because the standard copy_files refuses to link non-existing
9290     files.
9291     (ThubanInstall.run): Remove the leading install root from the
9292     script filename if an install root was specified and use the new
9293     link_file method
9294 tkoester 403
9295 bh 18 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
9296     the window when the first layer is added to the map.
9297    
9298     * setup.py (ThubanInstall.run): Honor the build root (self.root)
9299     when linking thuban.py to <prefix>/bin
9300    
9301 bh 16 2001-08-31 Bernhard Herzog <[email protected]>
9302    
9303     * setup.py: In the setup call, the install parameters shouldn't
9304     have trailing slashes because distutils on non-posix platforms
9305     doesn't like that. The same applies to other directories like
9306     "Resources/Bitmaps"
9307    
9308     In the configuration section for nt, move the wxWindows directory
9309     optins into the part clearly marked as editable.
9310    
9311     (InstallLocal.initialize_options):
9312     (InstallLocal.user_options): remove the currently unused debug
9313     flag
9314     (thuban_build_py.find_all_modules): Add this method so that it
9315     works for our case of having packages and modules in one
9316     distribution as well.
9317     (ThubanInstall.initialize_options):
9318     (ThubanInstall.finalize_options):
9319     (ThubanInstall.user_options):
9320     (ThubanInstall.boolean_options): Add new options, do-symlink and
9321     extra files. Since these are the first ThubanInstall specific
9322     options, override user_options and boolean_options
9323     (ThubanInstall.run): Honor the new do-symlink and extra-files
9324     options.
9325     (ThubanInstall.get_outputs): Add to override the base-class's
9326     version and add the extra-files to the outputs
9327     (bdist_inno): New class for windows distributions with Inno Setup
9328     (InnoIconItem): Helper class for bdist_inno
9329     (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
9330     this together with the appropriate parameters, to the setup call.
9331 tkoester 403
9332 bh 16 * setup.cfg (bdist_inno): added new section for the inno setup
9333     installer
9334    
9335     * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
9336     changing_selection to avoid recursive selection events when
9337     modifying the selection in response to a selection event.
9338     (myTreeCtrlPanel.normalize_selection): Set the new inst var when
9339     changing the tree's selection.
9340     (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
9341     we're not being called indirectly from normalize_selection.
9342    
9343     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
9344     event.Check only if the command is actuall checkable.
9345     (MainWindow.__init__): Call the toolbar's Realize method to make
9346     sure that the items are actually shown
9347    
9348 bh 7 2001-08-28 Bernhard Herzog <[email protected]>
9349    
9350 bh 9 * setup.py: Fix some doc strings
9351    
9352 bh 7 * ChangeLog: started
9353    

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26