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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1969 - (hide annotations)
Fri Nov 21 14:33:41 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 331373 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26