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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2013 - (hide annotations)
Wed Dec 3 10:37:05 2003 UTC (21 years, 3 months ago) by silke
Original Path: trunk/thuban/ChangeLog
File size: 338190 byte(s)
Added gdal-support to debian package,
updated to new thuban version

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26