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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1418 - (hide annotations)
Tue Jul 15 08:44:20 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 222161 byte(s)
update ChangeLog

1 bh 1418 2003-07-15 Bernhard Herzog <[email protected]>
2    
3     * Thuban/Model/save.py (SessionSaver.write_classification): Encode
4     string values (in addition to the labels) as UTF 8
5    
6     * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
7     values if the field type is string
8    
9     * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
10     saving a session with non-ascii string classification values.
11    
12     * test/test_load.py (TestClassification.file_contents)
13     (TestClassification.test): Check for non-ascii values in string
14     classifications
15    
16 jonathan 1416 2003-07-14 Jonathan Coles <[email protected]>
17    
18     * test/test_view.py: New. Tests for ViewPort.
19    
20 frank 1409 2003-07-14 Frank Koormann <[email protected]>
21    
22     * Thuban/Model/load.py (SessionLoader.start_map): Encode map
23     title to latin1. Fixes https://intevation.de/rt/webrt?serial_num=2013
24    
25 frank 1411 * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
26     unicode strings from session file: session title, map title and
27     projection name.
28    
29 jonathan 1403 2003-07-10 Jonathan Coles <[email protected]>
30    
31 jonathan 1406 * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
32     drag_stop, not drag_move when the mouse is released.
33    
34     2003-07-10 Jonathan Coles <[email protected]>
35    
36 jonathan 1403 The most important part of this is the seperation of view.py into
37     two pieces. viewport.py now has a class called ViewPort which
38     contains all the non-wx parts of view.py and can therefore be
39     tested. view.py contains only the wx-specific parts and is fairly
40     simple.
41    
42     * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
43     RTTbug #1992.
44     * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
45     RTTbug #1992.
46    
47     * Thuban/Model/classgen.py (generate_singletons,
48     generate_uniform_distribution, generate_quantiles):
49     Added 'fixes' parameter so that property attributes can
50     be held constant over the generated classification groups.
51     (CustomRamp.GetProperties): Remove unused variables.
52    
53     * Thuban/Model/map.py (Map.SetProjection): Send the old
54     projection as an argument to listeners of the MAP_PROJECTION_CHANGED
55     event.
56    
57     * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
58     parameter which is a list of records that restricts which
59     records are saved. Fixes RTbug #1997.
60    
61     * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
62     Port exception dialog from GREAT-ER. Fixes RTbug #1993.
63    
64     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
65     to allow the user to fix line color/width on generated groups.
66     (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
67     functions to optionally fix group properties.
68    
69     * Thuban/UI/main.py (main): Set exception hook to the
70     ShowExceptionDialog. Fixes RTbug #1993.
71    
72     * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
73     the table window when it is selectd to be shown.
74    
75     * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
76     Export Selection button and move the export buttons underneath
77     the table.
78     (QueryTableFrame.UpdateStatusText): Added event argument so
79     that it can respond to grid selection events. The status text
80     is now updated even when the table is not associated with a
81     layer as was previously assumed.
82     (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
83     UpdateStatusText responds to these events.
84     (QueryTableFrame.OnSaveAs): Renamed to doExport.
85     (QueryTableFrame.doExport): Helper function that saves the
86     entire table, or selected rows, to a file.
87     (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
88     Respond to export button events and call doExport.
89    
90     * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
91     the function doesn't return NULL without first setting a Python
92     Error.
93    
94     * test/runtests.py (main): Only print "Unknown option" for
95     unsupported options.
96    
97     * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
98     optional epsilon argument to specify floating point accuracy.
99     (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
100     for each item test.
101    
102     * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
103     tests for saving selected records.
104    
105     * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
106     tests for saving selected records.
107    
108     * test/test_map.py (TestMapWithContents.test_set_projection):
109     MAP_PROJECTION_CHANGED events send the old projection.
110    
111     * test/test_session.py
112     (TestSessionWithContent.test_forward_map_projection):
113     MAP_PROJECTION_CHANGED events send the old projection.
114    
115     * test/test_table.py (TableTest): Update tests to use non-deprecated
116     functions.
117    
118 bh 1376 2003-07-08 Bernhard Herzog <[email protected]>
119    
120 bh 1382 * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
121     constants in the column objects are the standard ones defined in
122     the table module.
123    
124     * test/test_transientdb.py
125     (TestTransientTable.test_transienttable_to_dbf): New. Test whether
126     exporting transient tables as DBF works. This should catch the bug
127     just fixed in TransientTableBase.Width.
128    
129     2003-07-08 Bernhard Herzog <[email protected]>
130    
131 bh 1380 * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
132     interpolated colors correctly.
133    
134     * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
135     New. Test case for the fix in classgen.py
136    
137     2003-07-08 Bernhard Herzog <[email protected]>
138    
139 bh 1378 * test/runtests.py (main): Make the default output less verbose
140     and add a verbosity option (-v) to get the old output
141    
142     2003-07-08 Bernhard Herzog <[email protected]>
143    
144 bh 1376 * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
145     0.9.
146    
147     * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
148     New. Return the join type
149    
150     * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
151     DTD
152     (SessionSaver.write_data_containers): Save the join type for
153     joined tables
154    
155     * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
156     namespace
157     (SessionLoader.start_jointable): Handle the jointype attribute
158    
159     * test/test_load_0_8.py: New. Effectively a copy of test_load.py
160     as of Thuban 0.8. These are now tests to determine whether Thuban
161     can still read files generated by Thuban 0.8
162    
163     * test/test_load.py (LoadSessionTest.dtd)
164     (TestSingleLayer.file_contents)
165     (TestLayerVisibility.file_contents, TestLabels.file_contents)
166     (TestLayerProjection.file_contents)
167     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
168     (TestJoinedTable.file_contents)
169     (TestLoadError.file_contents): Update for new DTD
170     (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
171     for new join type attribute
172    
173     * test/test_save.py (SaveSessionTest.dtd)
174     (SaveSessionTest.testEmptySession)
175     (SaveSessionTest.testSingleLayer)
176     (SaveSessionTest.testLayerProjection)
177     (SaveSessionTest.testRasterLayer)
178     (SaveSessionTest.testClassifiedLayer)
179     (SaveSessionTest.test_dbf_table)
180     (SaveSessionTest.test_joined_table): Update for new DTD
181     (SaveSessionTest.test_joined_table): Add test for new join type
182     attribute
183    
184 bh 1372 2003-07-04 Bernhard Herzog <[email protected]>
185    
186     * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
187     function for table_to_dbf
188     (table_to_dbf): Deal with names longer than the 10 character limit
189    
190     * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
191     doc-string
192     (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
193     long column names
194    
195 bh 1365 2003-07-03 Bernhard Herzog <[email protected]>
196    
197 bh 1370 * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
198    
199     2003-07-03 Bernhard Herzog <[email protected]>
200    
201 bh 1368 * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
202     for the Thuban manual and README with some basic information about
203     the manual
204    
205     2003-07-03 Bernhard Herzog <[email protected]>
206    
207 bh 1365 * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
208     Update doc-string
209     (TransientJoinedTable.create): Do not modify the column objects of
210     the input tables in place and copy all columns of the input tables
211     into the joined table after all.
212    
213     * test/test_transientdb.py
214     (TestTransientTable.test_transient_joined_table_same_column_name):
215     Update to reflect the new behavior
216     (TestTransientTable.test_transient_joined_table_with_equal_column_names):
217     Update to reflect the new behavior
218     (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
219     New test case for a bug which modified the column objects in place
220    
221 jonathan 1360 2003-07-02 Jonathan Coles <[email protected]>
222 jonathan 1349
223 jonathan 1360 * Thuban/Model/classgen.py (generate_singletons,
224     generate_uniform_distribution, generate_quantiles,
225 jonathan 1363 GenQuantiles0): Make sure maxValue isn't less than
226     one, otherwise we could divide by zero.
227    
228     * test/test_classgen.py (ClassGenTest.doClassRangeTest,
229     ClassGenTest.doClassSingleTest): Call doBoundsTest to
230     check the end classification groups against the
231     proper property values.
232     (ClassGenTest.doBoundsTest): New. Checks the first and
233     last classification groups to make sure their properties
234     are the correct upper and lower bounds for a color ramp.
235    
236     2003-07-02 Jonathan Coles <[email protected]>
237    
238     * Thuban/Model/classgen.py (generate_singletons,
239     generate_uniform_distribution, generate_quantiles,
240 jonathan 1360 GenQuantiles0): The denominator was one to high when
241     calculating the index for the ramp causing the index
242     to never to reach one.
243    
244     2003-07-02 Jonathan Coles <[email protected]>
245    
246 jonathan 1358 Changed the singature of ClassGroupRange.__init__ and
247     ClassGroupRange.SetRange() so that the min/max values are
248     passed as a tuple. This makes a better calling scheme for
249     when a Range object is passed instead.
250    
251     * Thuban/Model/classgen.py: Fixed parameters to
252     ClassGroupRange constructor.
253    
254     * Thuban/Model/classification.py (ClassGroupRange.__init__):
255     Consolidate the min/max parameters into a single _range which
256     can either be a tuple or a Range object.
257     (ClassGroupRange.SetRange): Consolidate the min/max parameters
258     into a single _range which can either be a tuple or a Range object.
259    
260     * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
261     call to ClassGroupRange constructor to use a tuple.
262    
263     * Thuban/Model/layer.py (Layer.SetClassification): Switch
264     the classification instance variable to the new class
265     before calling _set_layer otherwise subscribers to a
266     LAYER_CHANGED event will not see any difference.
267    
268     * test/test_classification.py: Fix tests of ClassGroupRange
269     so that they use the new signature.
270    
271     * test/test_load.py: Fix use of ClassGroupRange so that it
272     uses the new signature.
273    
274     * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
275     uses the new signature.
276    
277     * test/test_save.py: Fix use of ClassGroupRange so that it
278     uses the new signature.
279    
280    
281     2003-07-01 Jonathan Coles <[email protected]>
282    
283 jonathan 1349 * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
284     Import used objects/class from color.
285     (generate_singletons): We don't
286     need the numGroups parameter anymore because we are using
287     the new ramps with GetProperties().
288     (generate_uniform_distribution): Use new ramp method
289     GetProperties().
290     (generate_quantiles, GenQuantiles0): Use new ramp method
291     GetProperties().
292     (CustomRamp.SetNumGroups): Removed. The ramps now map
293     a value from 0 to 1 to class properties so the number
294     of groups is not needed ahead of time.
295     (CustomRamp.next): Removed. CustomRamp does not support
296     interation anymore.
297     (CustomRamp.GetProperties): Returns a ClassGroupProperties
298     object based on the index value from 0 to 1 that is
299     passed to it.
300     (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
301     Made into instances of Monochromatic class instread of
302     deriving from it.
303     (HotToCold.SetNumGroups): Removed. See CustomRamp.
304     (HotToCold.next): Removed. See CustomRamp.
305    
306     * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
307     (Classification.SetField, Classification.SetFieldType):
308     Replaced with SetFieldInfo.
309     (Classification.SetFieldInfo): New. Does a better job of
310     what SetField and SetFieldType used to do by combining
311     their function since they should really always be done
312     at the same time.
313     (Classification.SetLayer): Renamed to _set_layer.
314     (Classification._set_layer): Should only be called from
315     Layer's SetClassification. This does not cause a recursive
316     call as SetLayer did because we know that Layer knows about
317     the classification.
318    
319     * Thuban/Model/color.py: Fixes RTbug #1971.
320     (_Transparent): Renamed from Transparent so it doesn't
321     conflict with the module variable.
322     (Transparent, Black): Renamed from Color.Transparent,
323     Color.Black so they are not class variables.
324    
325     * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
326     (Layer.Destroy): We don't need to call SetClassification
327     anymore to clear out the back reference in the classifcation
328     to the layer. It's better to set it to None using _set_layer,
329     and we won't be creating another clas object too.
330     (Layer.SetClassification): Classification._set_layer is not
331     recursive so remove all the locking variables. Also clean
332     up the code so that it remains unchanged if something fails.
333    
334     * Thuban/Model/load.py: Fixes RTbug #1971.
335     (SessionLoader.start_classification): Call
336     Classification.SetFieldInfo().
337    
338     * Thuban/Model/save.py: Removed import of Color which wasn't
339     being used.
340    
341     * Thuban/UI/classgen.py: Fixes RTbug #1972.
342     (ClassGenDialog.__init__): Color ramps are now instances
343     already so we don't need to create any new objects.
344     (ClassGenDialog.OnOK): Check for numGroups is no longer
345     necessary because we never use it.
346    
347     * Thuban/UI/classifier.py: Fixes RTbug #1971.
348     (Classifier.__BuildClassification, Classifier.__SetGridTable):
349     Call Classification.SetFieldInfo() instead of SetFieldType.
350    
351     * Thuban/UI/renderer.py: Fixes RTbug #1971.
352    
353     * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
354     (MapCanvas.__init__): Subscribe to the idle time event. Set
355     background color to white.
356     (MapCanvas.OnPaint): Set a flag indicating that we should
357     render the map during idle time. If we already have a bitmap
358     just draw it now.
359     (MapCanvas.OnIdle): New. Render the map only during idle time.
360     This also fixes a problem with the busy cursor under gtk.
361    
362     * test/test_classgen.py (ClassGenTest.test_generate_singletons):
363     Fix calls to generate_singletons because the signature changed.
364    
365     * test/test_classification.py: Fix color references and
366     change calls to Classification.[SetField|SetFieldType] to
367     SetFieldInfo.
368    
369     * test/test_load.py: Fix color references.
370    
371     * test/test_load_0_2.py: Fix color references.
372    
373     * test/test_save.py (SaveSessionTest.testClassifiedLayer):
374     Change calls to Classification.[SetField|SetFieldType] to
375     SetFieldInfo.
376    
377 frank 1334 2003-07-01 Frank Koormann <[email protected]>
378    
379     MERGE from the greater-ms3 branch.
380    
381     * test/test_transientdb.py
382     (TestTransientTable.test_transient_joined_table_with_equal_column_names):
383     New. Test join of two tables with partly equal column names.
384    
385     * Thuban/Model/transientdb.py (TransientJoinedTable.create):
386     If duplicates in left and right tables column names are found,
387     append '_' (underscores) to the name until it is unique.
388     Create always new internal names for the resulting table and reference
389     columns in the join statement with <table>.<column>
390    
391 bh 1329 2003-07-01 Bernhard Herzog <[email protected]>
392    
393     * test/test_transientdb.py
394     (TestTransientTable.test_transient_joined_table_same_column_name):
395     New. Test whether joining on columns with the same names in both
396     tables works.
397 frank 1334
398 bh 1329 * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
399     sure to use the right internal names even when joining on field
400     with the same names in both tables. Also, detect duplicate names
401     in the joined table correctly.
402    
403 frank 1325 2003-07-01 Frank Koormann <[email protected]>
404    
405     * Thuban/UI/renderer.py (ExportRenderer.render_legend):
406     Reverse List of layers to render in same order as in desktop legend.
407    
408 jonathan 1318 2003-06-30 Jonathan Coles <[email protected]>
409    
410 jonathan 1349 * Thuban/version.py (make_tuple): Takes a version string
411     and splits it into a tuple of at most three integers.
412     Used make_tuple() to make tuple versions of the version
413     numbers.
414    
415     * Thuban/UI/about.py: Add Thuban email addresses.
416    
417     2003-06-30 Jonathan Coles <[email protected]>
418    
419 jonathan 1320 * Thuban/version.py: SQLite/PySQLite version dependencies
420     were too high.
421    
422     2003-06-30 Jonathan Coles <[email protected]>
423    
424 jonathan 1318 * Thuban/version.py: Update version to 0.8.1
425    
426     * MANIFEST.in: Added Projections so that default.proj is
427     included.
428    
429 jonathan 1312 2003-06-26 Jonathan Coles <[email protected]>
430    
431     New About box with lots more information including library
432     versions and credits. More/better version checking before
433     Thuban starts.
434    
435     * Thuban/UI/about.py: New. New About box that displays
436     library version information and credits.
437    
438     * Thuban/version.py: Added new 'versions' dictionary which
439     contains the verions of various libraries which are checked
440     when the module loads.
441     (verify_versions): Check all version numbers and returns
442     a list of errors.
443    
444     * Thuban/UI/classifier.py (Classifier.__EnableButtons):
445     Reset the status of the buttons as the situation warrants,
446     but in a better more reliable way by not relying on the
447     current status to determine what needs to change.
448    
449     * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
450     (verify_versions): Remove most of the code since it is
451     now in Thuban.version.verify_versions.o
452    
453     * Thuban/UI/mainwindow.py (MainWindow.About): Call new
454     About box in Thuban.UI.about.
455    
456     * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
457     Returns the version of gdal library being used as a string.
458    
459     * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
460     Removed.
461     (get_proj_version): Return the version of PROJ that the file
462     was compiled with.
463     (get_gtk_version): Return th version of GTK that the file
464     was compiled with.
465    
466 jonathan 1304 2003-06-25 Jonathan Coles <[email protected]>
467    
468     * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
469     of the SelectPropertiesDialog should be self so the window
470     appears on top.
471     (ClassGroupPropertiesCtrl.DoEdit): The parent
472     of the SelectPropertiesDialog should be self so the window
473     appears on top.
474    
475     * Thuban/UI/resource.py: Cleaned up how we determine file
476     extensions.
477     (GetImageResource): Return an wxImage from our Resources.
478    
479 jonathan 1299 2003-06-24 Jonathan Coles <[email protected]>
480    
481     * Thuban/UI/renderer.py (ExportRenderer.render_legend):
482     Check that a layer has a classification before trying
483     to get it. Raster layers don't have classifications.
484    
485 jonathan 1286 2003-06-23 Jonathan Coles <[email protected]>
486 jonathan 1297
487     * setup.py: Add Resources/XML to resource list.
488    
489     2003-06-23 Jonathan Coles <[email protected]>
490 jonathan 1286
491 jonathan 1297 * setup.cfg: Fix copyright dates
492    
493     2003-06-23 Jonathan Coles <[email protected]>
494    
495 jonathan 1294 * MANIFEST.in: Update with Resources/XML
496    
497     * setup.py: Don't include Locale resources yet as we don't
498     have any and it causes problems building the distribution
499     for Windows. Update version to 0.8.0.
500    
501     * Doc/thuban.dtd: Removed since it is now in Resources/XML.
502    
503     * Thuban/UI/mainwindow.py: Add blank line at the end because
504     file was not being read correctly building the Windows
505     distribution.
506    
507     2003-06-23 Jonathan Coles <[email protected]>
508    
509 jonathan 1289 * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
510    
511     * Thuban/version.py: Temporarily update longversion for
512     the 0.8 release so that it doesn't have the cvs revision.
513    
514     2003-06-23 Jonathan Coles <[email protected]>
515    
516 jonathan 1286 * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
517     to make sure that we don't create reentrant possibilities with
518     wxYield.
519    
520     * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
521     directly to avoid the wxSafeYield() call which generates an
522     OnPaint event causing infinite recursion. Don't try to catch
523     exception anymore. This was for before there were limits on map
524     scaling.
525    
526 bh 1283 2003-06-23 Bernhard Herzog <[email protected]>
527    
528     Bug fix for RT #1961:
529    
530     * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
531     Register DerivedShapestores with the session
532    
533     * Thuban/Model/session.py (Session.Tables): Make sure each table
534     is only listed once.
535    
536     * test/test_load.py (TestJoinedTable.test): Add check_format call.
537     Update file contents to match the one written out.
538    
539 bh 1281 2003-06-20 Bernhard Herzog <[email protected]>
540    
541     * test/xmlsupport.py (SaxEventLister.startElementNS)
542     (SaxEventLister.endElementNS): Do not include the qname. Python
543     2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
544     is (presumably incorrectly) None, whereas it's a string with the
545     element name in the later versions.
546    
547     * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
548     (TestEventList.test_even_list_namespace): Update tests to reflect
549     the new behaviour
550     (TestEventList.test_even_list_id_normalization): Fix doc-string
551    
552 jonathan 1272 2003-06-20 Jonathan Coles <[email protected]>
553    
554 jonathan 1279 * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
555     by deriving classes to determine if that layer supports shapes.
556     (Layer): Override HasShapes and return true.
557    
558     * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
559     instead of a direct call to wx[Begin|End]CusyCursor().
560     (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
561     table data.
562    
563     * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
564     New. Wrappers around the wxWindows functions that allow us to
565     make additional calls such as wxYield which gives the native
566     system a chance to update the cursor correctly.
567    
568     * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
569     instead of a direct call to wx[Begin|End]CusyCursor().
570    
571     * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
572     instead of a direct call to wx[Begin|End]CusyCursor().
573     (MapCanvas.find_shape_at): Check if the current search layer
574     support shapes, otherwise go on to the next layer.
575    
576     * test/test_layer.py: Add tests in each type of layer for
577     HasClassification() and HasShapes()
578    
579     2003-06-20 Jonathan Coles <[email protected]>
580    
581 jonathan 1272 * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
582     turning on the busy cursor to allow the system to change the
583     cursor before we begin painting. This fixes a problem that
584     was occuring only under GTK. Fixes RTbug #1840.
585    
586 bh 1270 2003-06-20 Bernhard Herzog <[email protected]>
587    
588     * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
589     version.
590    
591     * Thuban/Model/save.py (sort_data_stores): New. Make topological
592     sort of the data sources so they can be written with sources that
593     data sources that depend on other data sources come after the
594     sources they depend on.
595     (SessionSaver.__init__): Add idmap instance variable to map from
596     objects to the ids used in the file.
597     (SessionSaver.get_id, SessionSaver.define_id)
598     (SessionSaver.has_id): New. Methods to manage the idmap
599     (SessionSaver.write): Use thuban-0.8.dtd
600     (SessionSaver.write_session): Add a namespace on the session and
601     write out the data sources before the maps.
602     (SessionSaver.write_data_containers): New. Write the data
603     containers.
604     (SessionSaver.write_layer): Layer elements now refer to a
605     shapestore and don't contain filenames anymore.
606    
607     * Thuban/Model/load.py (LoadError): Exception class to raise when
608     errors in the files are discovered
609     (SessionLoader.__init__): Define dispatchers for elements with a
610     thuban-0.8 namespace too.
611     (SessionLoader.check_attrs): New helper method to check and
612     convert attributes
613     (AttrDesc): New. Helper class for SessionLoader.check_attrs
614     (SessionLoader.start_fileshapesource)
615     (SessionLoader.start_derivedshapesource)
616     (SessionLoader.start_filetable, SessionLoader.start_jointable):
617     Handlers for the new elements in the new fileformat
618     (SessionLoader.start_layer): Handle the shapestore attribute in
619     addition to filename.
620     (SessionLoader.start_table, SessionLoader.end_table): Removed.
621     They were never used in the old formats and aren't needed for the
622     new.
623    
624     * Thuban/Model/session.py (Session.DataContainers): New method to
625     return all "data containers", i.e. shapestores and tables
626    
627     * test/xmlsupport.py (SaxEventLister.__init__)
628     (SaxEventLister.startElementNS, sax_eventlist): Add support to
629     normalize IDs.
630    
631     * test/test_xmlsupport.py
632     (TestEventList.test_even_list_id_normalization): New test case for
633     id normalization
634    
635     * test/test_load.py (LoadSessionTest.check_format): Use ID
636     normalization
637     (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
638     class atrributes used for ID normalization
639     (TestSingleLayer, TestLayerVisibility, TestLabels.test)
640     (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
641     file format
642     (TestJoinedTable): New test for loading sessions with joined
643     tables.
644     (TestLoadError): New. Test whether missing required attributes
645     cause a LoadError.
646    
647     * test/test_save.py (SaveSessionTest.thubanids)
648     (SaveSessionTest.thubanidrefs): New class attributes for ID
649     normalization in .thuban files.
650     (SaveSessionTest.compare_xml): Use id-normalization.
651     (SaveSessionTest.testEmptySession)
652     (SaveSessionTest.testLayerProjection)
653     (SaveSessionTest.testRasterLayer)
654     (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
655     (SaveSessionTest.testLayerProjection): The filename used was the
656     same as for testSingleLayer. Use a different one.
657     (SaveSessionTest.test_dbf_table)
658     (SaveSessionTest.test_joined_table): New test cases for saving the
659     new data sources structures.
660     (TestStoreSort, MockDataStore): Classes to test the sorting of the
661     data stores for writing.
662    
663     * test/runtests.py: Add CVS keywords
664    
665 jonathan 1265 2003-06-20 Jonathan Coles <[email protected]>
666    
667 jonathan 1267 * test/test_session.py
668     (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
669     Use the cultural_landmark-point.dbf file for the store so that
670     the table rows and shape count match.
671    
672     2003-06-20 Jonathan Coles <[email protected]>
673    
674 jonathan 1265 * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
675     an exception if the number of shapes is different from the
676     number of rows in the table. Address RTbug #1933.
677    
678     * test/test_layer.py (TestLayer.test_derived_store): Add
679     a test for the new exception in DerivedShapeStore.__init__.
680    
681     * test/support.py (FloatTestCase): Removed since there is
682     already FloatComparisonMixin. Fixes RTbug #1954.
683     (FloatComparisonMixin.assertFloatEqual): Include test for
684     infinity that was part of FloatTestCase.
685    
686     * test/test_range.py (RangeTest): Inherit from
687     support.FloatComparisonMixin now that we don't have
688     support.FloatTestCase.
689    
690 bh 1256 2003-06-20 Bernhard Herzog <[email protected]>
691    
692 bh 1260 * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
693     the implementation in xmlsupport instead.
694     (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
695    
696     * test/test_proj.py: Import sax_eventlist from xmlsupport instead
697     of test_save
698    
699     2003-06-20 Bernhard Herzog <[email protected]>
700    
701 bh 1258 * test/test_load.py (LoadSessionTest.check_format): New helper
702     method to make sure the test files we load might have been written
703     by the current thuban version.
704     (ClassificationTest.TestLayers, TestSingleLayer.test)
705     (TestLayerVisibility.test, TestClassification.test)
706     (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
707     Add check_format() calls and fix the thuban data to match the data
708     that would be written by saving the session loaded from it.
709    
710     * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
711     the same class and function in test_save.
712    
713     * test/test_xmlsupport.py (TestEventList): New. test cases for
714     sax_eventlist
715    
716     2003-06-20 Bernhard Herzog <[email protected]>
717    
718 bh 1256 * Resources/XML/thuban.dtd: Add comment about which versions of
719     Thuban are covered by this DTD
720     (map): Fix content model for layers and raster layers. There can
721     be any number or layers and raster layers in any order.
722    
723 jonathan 1254 2003-06-20 Jonathan Coles <[email protected]>
724    
725 jonathan 1265 This is mainly about fixing RTbug #1949.
726    
727 jonathan 1254 * Thuban/Model/classification.py: Remove "from __future__"
728     import statement since python 2.2 is the earliest supported
729     version.
730    
731     * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
732     Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
733     depending on the units this projection *forwards* into.
734    
735     * Thuban/Model/save.py (SessionSaver.write_classification):
736     Remove unnecessary use of lambdas and nested functions.
737    
738     * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
739     adjustment here if the map projection uses degrees.
740    
741     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
742     scale adjust code since it is now done before calling
743     this method. Don't do anything if the map projection
744     is None.
745    
746 bh 1244 2003-06-19 Bernhard Herzog <[email protected]>
747    
748 bh 1248 Move version specific load tests to their own file.
749    
750     * test/test_load.py: Expand the doc-string to explain a bit how to
751     handle file format changes.
752     (TestClassification.test): Update the docstring as this test is
753     not about Thuban 0.2 anymore.
754    
755     * test/test_load_0_2.py: New file with the load tests for thuban
756     files created with Thuban 0.2 and earlier.
757    
758     2003-06-19 Bernhard Herzog <[email protected]>
759    
760 bh 1246 Add XML validation to some of the tests. Validation will only be
761     done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
762     To make the DTD available to the test cases it's moved into
763     Resources/XML
764    
765     * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
766     for versions up to and including 0.2. Two slight changes: added an
767     encoding specification and fixed the comment which refered to
768     GRASS, not Thuban
769    
770     * test/xmlsupport.py: New support module for tests involving XML.
771     Currently there's a mix-in class for XML validation.
772    
773     * test/test_xmlsupport.py: New. Tests for the xmlsupport module
774    
775     * test/test_save.py (SaveSessionTest): Derive from ValidationTest
776     so that we can validate the
777     (SaveSessionTest.testEmptySession)
778     (SaveSessionTest.testSingleLayer)
779     (SaveSessionTest.testSingleLayer)
780     (SaveSessionTest.testLayerProjection)
781     (SaveSessionTest.testRasterLayer)
782     (SaveSessionTest.testClassifiedLayer): Validate the generated XML
783    
784     * test/runtests.py (main): Call print_additional_summary instead
785     of print_garbage_information
786    
787     * test/support.py (resource_dir): New function to return the
788     "Resource" subdirectory
789     (print_additional_summary): New function to combine several
790     summary functions
791     (run_tests): Use print_additional_summary instead of calling
792     print_garbage_information directly
793    
794     2003-06-19 Bernhard Herzog <[email protected]>
795    
796 bh 1244 * Doc/thuban.dtd (classification): Correct the content model of
797     the classification element.
798     (projection): Add the "name" attribute
799    
800 frank 1242 2003-06-19 Frank Koormann <[email protected]>
801    
802     MERGE from the greater-ms3 branch.
803    
804     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
805     scale if projection is latlong to get better estimate.
806    
807     Fix problem of hidden properties dialog under windows after double
808     click on layer tree:
809     The tree control always gets an Expanded / Collapsed event after
810     the ItemActivated on double click, which raises the main window again. We add a second ItemActivated event to the queue, which simply
811     raises the already displayed window.
812    
813     * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
814     raiseProperties initialized to prevent endless loops
815     (LegendTree._OnItemActivated): Depending on self.raiseProperties
816     simply raise the properties or open the dialog and issue a second
817     event.
818    
819 jonathan 1235 2003-06-18 Jonathan Coles <[email protected]>
820    
821 jonathan 1239 * setup.py: Fix a few problems that occured under Windows.
822    
823     2003-06-18 Jonathan Coles <[email protected]>
824    
825 jonathan 1235 When Thuban loaded the map was redrawn twice because the
826     legend was being opened after the mainwindow was created
827     and not during its creation. This meant the map was drawn
828     initially and then had to be redrawn when the legend
829     caused the display to change. Now the legend is opened
830     in the mainwindow constructor which resolves this issue.
831    
832     Also, although we were checking for the existence of
833     gdal and gdalwarp modules, the gdalwarp extension was
834     still being compiled (which may fail if the system doesn't
835     have gdal installed). the build_ext command to setup.py
836     now accepts the flags --with-gdal and --without-gdal.
837     If --without-gdal is specified setup.py will try to
838     use the gdal parameters specified by gdal-config. Under
839     windows, those parameters have to be set in setup.py
840     as with proj4 an wxWindows.
841    
842     * setup.py: Use a list instead of seperate variables for
843     extension parameters so we can create a generic function
844     that runs an appropriate *-config script.
845     (run_cs_script): Renamed from run_wx_script and modified
846     to accept a second argument which is a list of lists to
847     be filled in by the values returned from running the command.
848     (thuban_build_ext): New. Extends the build_ext command and
849     provides the options --with-gdal/--without-gdal which then
850     optionally includes the gdalwarp extension.
851    
852     * Thuban/Model/resource.py: First check if we can import
853     the gdalwarp Thuban extension before checking for gdal.
854     Also added some comments.
855    
856     * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
857     the map is None which may be the case if none has been loaded
858     yet.
859    
860     * Thuban/UI/main.py (main): Remove call to ShowLegend.
861    
862     * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
863    
864     * Thuban/UI/renderer.py: Check for gdal support before importing
865     gdalwarp.
866     (MapRenderer.render_map): Only try to optimize if we have gdal
867     support otherwise nothing will get drawn.
868    
869 jonathan 1237 * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
870     during startup before a map has been created. Check if map is None
871     before using it and do nothing if it is.
872    
873 jonathan 1224 2003-06-17 Jonathan Coles <[email protected]>
874    
875     Fix the problem with raster layers under Windows that caused
876     Thuban to crash. The view should respond to layer projection
877     changed events to update the display. Changes to a projection
878     should not cause the map to be set to full extent.
879    
880     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
881     current_map_proj to remember the current map projection so that
882     when the projection changes we know what the previous projection
883     was.
884     (MapCanvas.SetMap): Unsubscribe and subscribe to
885     LAYER_PROJECTION_CHANGED events.
886     (MapCanvas.projection_changed): Split into two methods that respond
887     to map and layer projection changes.
888     (MapCanvas.map_projection_changed): New. Takes the current view and
889     projects it using the new projection. This does not cause the
890     map to be redrawn at full extent.
891     (MapCanvas.layer_projection_changed): New. Cause a redraw which
892     will draw each layer in its new projection.
893    
894     * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
895     VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
896     under Windows.
897    
898     * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
899     to twice sizeof(void*) because there are two digits for each
900     hex byte.
901    
902 bh 1220 2003-06-16 Bernhard Herzog <[email protected]>
903    
904     Update to the layer interface: Direct access to the table,
905     shapetable, shapefile and filename attributes is now actively
906     deprecated by issuing deprecation warnings for all places where
907     this happens.
908    
909     * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
910     to the instance variables table, shapetable, shapefile and
911     filename via __getattr__ so that we can issue a deprecation
912     warning.
913     (Layer.SetShapeStore): Don't set the deprecated instance variables
914     any more
915     (Layer.SetShapeStore): Don't use deprecated layer instance
916     variables
917     (Layer.Destroy): No need to explicitly remove the instance
918     variables any more
919     (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
920     instance variables
921    
922     * Thuban/UI/classgen.py (ClassGenDialog.__init__)
923     (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
924     (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
925     use deprecated layer instance variables
926    
927     * Thuban/UI/classifier.py (Classifier.__init__): Don't use
928     deprecated layer instance variables
929    
930     * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
931     (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
932     instance variables
933    
934     * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
935     deprecated layer instance variables
936    
937     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
938     deprecated layer instance variables
939    
940     * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
941     deprecated layer instance variables
942    
943     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
944     (MapRenderer.polygon_render_param): Don't use deprecated layer instance
945     variables
946    
947     * test/runtests.py (main): Turn Thuban's deprecation warnings into
948     errors so that they're cought by the tests
949    
950     * test/test_load.py (TestSingleLayer.test): Don't use deprecated
951     layer instance variables
952    
953 jonathan 1212 2003-06-16 Jonathan Coles <[email protected]>
954    
955     Fix a problem under Windows whereby if the user double-clicks on a
956     layer in the legend that tree item will expand or collapse as well
957     as open the layer properties dialog. The state of the tree item
958     should not be affected.
959    
960     * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
961     preventExpandCollapse and subscribe to expanding and collapsing
962     events.
963     (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
964     collapsing events and will veto the event if it has been triggered
965     by the user double clicking on a layer.
966     (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
967     that an expanding/collapsing event should be vetoed.
968    
969 bh 1208 2003-06-13 Bernhard Herzog <[email protected]>
970    
971     * Thuban/UI/classifier.py (Classifier.OnClose)
972     (Classifier.map_layers_removed)
973     (Classifier.layer_shapestore_replaced): Unsubscribe the messages
974     in OnClose and not in map_layers_removed or
975     layer_shapestore_replaced to make sure it always happens when the
976     dialog is closed
977    
978 jonathan 1201 2003-06-13 Jonathan Coles <[email protected]>
979    
980 jonathan 1203 This puts back a fix for Windows where a panel is needed so that
981     the background of the table view appears correctly.
982    
983     * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
984     object that can be used by derived classes to place any
985     controls (including the grid) onto.
986     (QueryTableFrame.__init__): Use the panel as the parent window
987     for all the controls. Reparent the grid so that the panel is
988     the parent. Call UpdateStatusText() to correctly initialize
989     the status bar.
990    
991     2003-06-13 Jonathan Coles <[email protected]>
992    
993 jonathan 1201 * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
994     from wxFrame (as opposed to wxDialog like the other classes)
995     but otherwise behaves like the other classes. This is needed
996     for the TableView which isn't really a dialog and needs to
997     have a status bar and control buttons.
998    
999     * Thuban/UI/tableview.py (TableGrid.__init__): Create an
1000     instance variable to keep track of how many rows are selected.
1001     Subscribe once to the the events we are interested in.
1002     (ThubanGrid.OnRangeSelect): Only handle event if event handling
1003     hasn't been turned off.
1004     (ThubanGrid.OnSelectCell): Only handle event if event handling
1005     hasn't been turned off.
1006     (ThubanGrid.ToggleEventListeners): Rather than subscribe None
1007     as an event listener (which changes the event handler stack)
1008     simply set an instance variable to False. This is checked in
1009     the event handlers.
1010     (ThubanGrid.GetNumberSelected): Return the number of currently
1011     selected rows.
1012     (TableFrame): Inherit from ThubanFrame so we can have a
1013     status bar and control buttons.
1014     (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
1015     Explicitly set which items are selected in the operator choice and
1016     action choice so there is always a valid selection. Fixes RTbug #1941.
1017     Subscribe to grid cell selection events so we can update the
1018     status bar.
1019     (QueryTableFrame.UpdateStatusText): Update the status bar with
1020     how many rows are in the grid, how many columns, and how many
1021     rows are selected.
1022     (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
1023     Call UpdateStatusText when cells are (de)selected.
1024     (QueryTableFrame.OnQuery): Use the string value in the value
1025     combo if either the selected item index is 0 or if the string
1026     cannot be found in the predefined list (this happens if the
1027     user changes the text). Fixes RTbug #1940.
1028     Only turn off the grid event listeners if there a query comes
1029     back with a none empty list of ids. in the case that the list
1030     is empty this causes a grid.ClearSelection() call to actually
1031     clear the grid selection which causes the selected items in
1032     the map to be deselected. Fixes RTbug #1939.
1033    
1034     * test/test_save.py (XMLWriterTest.Encode): Check return values.
1035     Fixes RTbug #1851.
1036    
1037 bh 1195 2003-06-13 Bernhard Herzog <[email protected]>
1038    
1039     * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
1040     self.selected_shape with the current selection to make sure the
1041     contents of the dialog are up to date when it's shown for the
1042     first time.
1043     The dialog used to work without this by luck. The recent fix to
1044     the connector module 'broke' a 'feature' the identify view was
1045     relying on, i.e that subscribing to a message in response to
1046     receiving a message of that type would mean that the new
1047     subscriber would also be called for the same message.
1048    
1049 jonathan 1169 2003-06-12 Jonathan Coles <[email protected]>
1050 jonathan 1175
1051 jonathan 1193 * extensions/thuban/gdalwarp.cpp: Removed debug printing as
1052     the image is rendered. Fixes RTbug #1937.
1053    
1054     2003-06-12 Jonathan Coles <[email protected]>
1055    
1056 jonathan 1191 * Thuban/Lib/fileutil.py: As is done under Windows, create the
1057 jonathan 1193 user directory if it doesn't exist on a posix system.
1058     Fixes RTbug #1815.
1059 jonathan 1191
1060     * Thuban/Model/resource.py (get_user_proj_files): Moved the
1061     called to get_application_dir here, so that the directory
1062     will only be called if this method is invoked.
1063    
1064     * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
1065     the projfilepath if no projection is selected.
1066    
1067     2003-06-12 Jonathan Coles <[email protected]>
1068    
1069 jonathan 1182 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
1070     the scalebar if the current map has no projection set.
1071    
1072     * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
1073     projfilepath label to just the basename of the projection file
1074     rather than include the entire path.
1075    
1076     * Thuban/Model/resource.py: Fix missed proj functions that
1077     needed to be renamed.
1078    
1079     2003-06-12 Jonathan Coles <[email protected]>
1080    
1081 jonathan 1178 * Thuban/Model/classification.py: Removed assert statements that
1082     tested if the variable was an instance of Color.
1083    
1084     * Thuban/Model/color.py (Color): Remove commented code that isn't
1085     used.
1086     (Transparent): Renamed from NoColor. Doesn't inherit from Color.
1087     Fixes RTbug #1835.
1088     (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
1089     Needed now that the class doesn't inherit from Color.
1090    
1091     2003-06-12 Jonathan Coles <[email protected]>
1092    
1093 jonathan 1175 * test/test_save.py (XMLWriterTest.testEncode): Explicitly
1094     check unicode strings.
1095    
1096     * test/test_layer.py: Check for existence of gdal.
1097    
1098     2003-06-12 Jonathan Coles <[email protected]>
1099 jonathan 1172
1100     * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
1101     that was in load.py
1102 jonathan 1169
1103 jonathan 1172 * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
1104     that was in save.py
1105    
1106     2003-06-12 Jonathan Coles <[email protected]>
1107    
1108 jonathan 1169 This is largely a collection of bug fixes. We also handle the
1109     case where gdal is not on the system. The XMLReader and XMLWriter
1110     classes were moved into there own files to resolve some circular
1111     import references and because they shouldn't really be in the
1112     file that is dediciated to reading/writing session files since
1113     they are also used elsewhere.
1114    
1115     * Thuban/Model/classgen.py: Renamed functions to follow the
1116     function_names_with_underscores style. Fixes RTbug #1903.
1117     (calculate_quantiles): Raise ValueError if 'percents' is invalid.
1118    
1119     * Thuban/Model/layer.py: Import gdal only if it available.
1120     (RasterLayer): Handle the case where the gdal library is unavailable.
1121     Addresses RTbug #1877.
1122    
1123     * Thuban/Model/load.py (XMLReader): Moved into seperate file
1124     xmlreader.py.
1125    
1126 jonathan 1172 2003-06-12 Jonathan Coles <[email protected]>
1127    
1128     This is largely a collection of bug fixes. We also handle the
1129     case where gdal is not on the system. The XMLReader and XMLWriter
1130     classes were moved into there own files to resolve some circular
1131     import references and because they shouldn't really be in the
1132     file that is dediciated to reading/writing session files since
1133     they are also used elsewhere.
1134    
1135     * Thuban/Model/classgen.py: Renamed functions to follow the
1136     function_names_with_underscores style. Fixes RTbug #1903.
1137     (calculate_quantiles): Raise ValueError if 'percents' is invalid.
1138    
1139     * Thuban/Model/layer.py: Import gdal only if it available.
1140     (RasterLayer): Handle the case where the gdal library is unavailable.
1141     Addresses RTbug #1877.
1142    
1143     * Thuban/Model/load.py (XMLReader): Moved into seperate file
1144     xmlreader.py.
1145    
1146 jonathan 1169 * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
1147     file xmlwriter.py.
1148    
1149     * Thuban/Model/resource.py: Renamed functions to following the
1150     function_names_with_underscores style.
1151     (has_gdal_support): New function that returns true if the gdal
1152     library is available. Addresses RTbug #1877.
1153    
1154     * Thuban/UI/application.py (ThubanApplication.OpenSession):
1155     Display a message box if the gdal library is not available, but
1156     only if there are any layers that would use it. Addresses RTbug #1877.
1157    
1158     * Thuban/UI/classgen.py: Use renamed projection resource functions.
1159     (GenUniformPanel.__CalcStepping): Fix a slight discrepency
1160     when using integers versus floats.
1161    
1162     * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
1163     determine if the "Add Image Layer" menu option should be
1164     greyed out or not. Addresses RTbug #1877.
1165    
1166     * Thuban/UI/projdialog.py: Use renamed projection resource functions.
1167    
1168     * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
1169     optimize if a raster layer is visible. Fixes RTbug #1931.
1170     Only draw the raster layer if the gdal library is available.
1171     Addresses RTbug #1877.
1172    
1173     * test/test_classgen.py: Add tests for generate_singletons,
1174     generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
1175     (test_calculate_quantiles): Fix some tests to catch the new
1176     ValueError that is raised.
1177    
1178     * test/test_proj.py: Use renamed projection resource functions.
1179    
1180     * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
1181     test for saving classified layers. Fixes RTbug #1902.
1182     (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
1183    
1184 jan 1156 2003-06-12 Jan-Oliver Wagner <[email protected]>
1185    
1186     Fix for http://intevation.de/rt/webrt?serial_num=1900.
1187    
1188     * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
1189    
1190     * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
1191     multiplechoicedialog.py rather than from the wxPython library.
1192    
1193 frank 1151 2003-06-11 Frank Koormann <[email protected]>
1194    
1195 frank 1152 * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
1196     update.
1197    
1198     2003-06-11 Frank Koormann <[email protected]>
1199    
1200 frank 1151 * Thuban/Lib/fileutil.py (get_application_dir): New function to
1201     determine the absolute .thuban/thuban directory under
1202     "posix" (os.expanduser) and "nt" (read AppData registry key).
1203    
1204     * Thuban/Model/resource.py: Use get_application_dir
1205    
1206     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1207     Use get_application_dir.
1208    
1209 bh 1143 2003-06-10 Bernhard Herzog <[email protected]>
1210    
1211 bh 1147 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
1212     the messages MAP_LAYERS_REMOVED messages
1213     (LayerTableFrame.OnClose): Unsubscribe from it.
1214     (LayerTableFrame.map_layers_removed): New. Receiver for
1215     MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
1216     dialog is showing is removed.
1217    
1218     2003-06-10 Bernhard Herzog <[email protected]>
1219    
1220 bh 1145 * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
1221     of the receivers list so that unsubscribing in a receiver doesn't
1222     modify it while iterating over it.
1223    
1224     * test/test_connector.py
1225     (ConnectorTest.test_disconnect_in_receiver): New. Test whether
1226     unsubscribing in a receiver works correctly. See docstring for
1227     details
1228    
1229     2003-06-10 Bernhard Herzog <[email protected]>
1230    
1231 bh 1143 * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
1232     message.
1233    
1234     * Thuban/Model/layer.py (Layer.SetShapeStore): Send
1235     LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
1236     LAYER_CHANGED will still be sent if the classification changes.
1237    
1238     * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
1239     parameter so we can subscribe to some of its messages
1240     (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
1241     and the layer's LAYER_SHAPESTORE_REPLACED
1242     (Classifier.unsubscribe_messages): New. Unsubscribe from message
1243     subscribed to in __init__
1244     (Classifier.map_layers_removed)
1245     (Classifier.layer_shapestore_replaced): receivers for the messages
1246     subscribed to in __init__. Unsubscribe and close the dialog
1247    
1248     * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
1249     the map to the Classifier dialog
1250    
1251     * test/test_layer.py (SetShapeStoreTests): Derive from
1252     SubscriberMixin as well so we can test messages
1253     (SetShapeStoreTests.setUp): Subscribe to some of the layer's
1254     messages
1255     (SetShapeStoreTests.tearDown): Clear the messages again
1256     (SetShapeStoreTests.test_sanity): Expand the doc-string and check
1257     for the modified flag too
1258     (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
1259     to check whether SetShapeStore sets the modified flag
1260     (SetShapeStoreTests.test_set_shape_store_different_field_name)
1261     (SetShapeStoreTests.test_set_shape_store_same_field)
1262     (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
1263     Add tests for the messages. This checks both the new
1264     LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
1265    
1266 jan 1141 2003-06-06 Jan-Oliver Wagner <[email protected]>
1267    
1268     * Thuban/UI/mainwindow.py: Improved and partly added help texts for
1269     the menu items.
1270    
1271 frank 1134 2003-06-05 Frank Koormann <[email protected]>
1272    
1273 frank 1139 * Thuban/UI/identifyview.py (IdentifyView.__init__):
1274     Layout reimplemented without panel. Make life easier to fit the list
1275     in the dialog.
1276    
1277     2003-06-05 Frank Koormann <[email protected]>
1278    
1279 frank 1137 * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
1280     once on initialisation (Former implementation resulted in multiple
1281     entries for each projection).
1282     (ProjFrame.__FillAvailList): selectProj as second optional parameter,
1283     if set, select the projection found under the specified name. This
1284     overwrites any other selection estimate.
1285     Removed projchoice filling from this method.
1286     (ProjFrame._OnSave, ProjFrame._OnAddToList):
1287     Updated call of ProjFrame.__FillAvailList
1288     (LCCPanel._DoLayout): Moved parameter controls in more common order.
1289    
1290     * Resources/Projections/defaults.proj: Extended defaults representing
1291     various common European projections.
1292    
1293     2003-06-05 Frank Koormann <[email protected]>
1294    
1295 frank 1134 * Thuban/UI/identifyview.py (IdentifyView.__init__):
1296     Use ListCtrl instead of GridCtrl
1297    
1298     * Thuban/Model/resource.py:
1299     Guess location of .thuban directory from tempdir parent directory.
1300    
1301     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1302     Guess location of .thuban directory from tempdir parent directory.
1303    
1304 bh 1130 2003-06-04 Bernhard Herzog <[email protected]>
1305    
1306     Do not cache the values returned by the tree widget's
1307     GetFirstChild and GetNextChild methods because it led to lots of
1308     segfaults. The new way requires more brute force but is more
1309     reliable.
1310    
1311     * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
1312     variable layer2id
1313     (LegendTree.find_layer): New method to do with brute force what
1314     layer2id tried to accomplish
1315     (LegendTree._OnMsgLayerChanged)
1316     (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
1317     Use find_layer instead of layer2id
1318     (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
1319     update layer2id anymore
1320     (LegendTree._OnMsgMapLayersRemoved)
1321     (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
1322    
1323 tkoester 1128 2003-06-03 Thomas Koester <[email protected]>
1324    
1325     * Thuban/Model/classgen.py (GenQuantiles0): New function.
1326    
1327 bh 1120 2003-06-02 Bernhard Herzog <[email protected]>
1328    
1329 bh 1127 * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
1330     New commands.
1331     (main_menu): Add the new commands.
1332     (MainWindow.TableRename): New. Implementation of the table_rename
1333     command.
1334     (MainWindow.RenameLayer): New. Implementation of the layer_rename
1335     command.
1336    
1337     * Thuban/Model/session.py (Session.AddTable): call self.changed to
1338     set the modified flag
1339    
1340     * test/test_session.py (TestSessionSimple.test_add_table): Test
1341     whether the modified flag is set properly
1342    
1343     * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
1344     instead of issue so that the modified flags get updated.
1345    
1346     * test/test_base.py (SomeTitledObject): Derive from Modifiable
1347     instead of Publisher to reflect reality better and to accomodate
1348     the fact that SetTitle now calls changed instead of issue
1349    
1350     2003-06-02 Bernhard Herzog <[email protected]>
1351    
1352     * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
1353     acquisition has to happen before the try in a try-finally.
1354    
1355     2003-06-02 Bernhard Herzog <[email protected]>
1356    
1357 bh 1120 * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
1358     possible that a layer is removed that is not currently selected in
1359     the legend so don't check for this.
1360    
1361 bh 1112 2003-05-30 Bernhard Herzog <[email protected]>
1362    
1363 bh 1118 * Thuban/Model/layer.py (Layer.Destroy): Set all instance
1364     variables to None that have direct or indirect references to
1365     shapefiles or dbf files to make sure that they do go away and the
1366     files are closed.
1367    
1368     2003-05-30 Bernhard Herzog <[email protected]>
1369    
1370 bh 1116 * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
1371     availImgListIndices when a new image list is created
1372    
1373     2003-05-30 Bernhard Herzog <[email protected]>
1374    
1375 bh 1114 * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
1376     changing_selection to indicate whether the LegendTree code itself
1377     is currently changing the selection
1378     (LegendTree.normalize_selection): New method to normalize the
1379     selection by selecting the layer item even if the user clicked on
1380     the classification.
1381     (LegendTree._OnSelChanged): normalize the selection. This works
1382     around a bug in wx which doesn't keep track of the selection
1383     properly when subtrees are deleted.
1384    
1385     2003-05-30 Bernhard Herzog <[email protected]>
1386    
1387 bh 1112 * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
1388     maximum and minimum scale factors.
1389    
1390     * test/test_classgen.py (ClassGenTest.test): Update to reflect the
1391     changes in classgen.py
1392    
1393 jonathan 1109 2003-05-30 Jonathan Coles <[email protected]>
1394    
1395     * Thuban/Model/classgen.py: Remove ClassGenerator class but make
1396     all the methods functions. Fixes RTBug #1903.
1397    
1398     * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
1399     to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
1400     RTBug #1907.
1401    
1402     * Thuban/UI/classgen.py: Use classgen functions that were part
1403     of the ClassGenerator class. Put try/finally blocks around
1404     code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
1405     RTBug #1904.
1406    
1407     * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
1408    
1409     * Thuban/UI/legend.py: The legend was cleared and repopulated any
1410     time something changed which caused some state to be lost such
1411     as which children were expanded or collapsed. Fixes RTBug #1901.
1412     (LegendTree._OnMsgMapLayersAdded): Add only new layers.
1413     (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
1414     the legend but not in the map.
1415     (LegendTree.__FillTree): Move main functionality out into smaller
1416     methods that can be used by other methods.
1417     (LegendTree.__FillTreeLayer): Reuse old slots in the image list
1418     if they are available.
1419     (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
1420     that we override the wxTreeCtrl method. Iterate over children
1421     and call __RemoveLayer.
1422     (LegendTree.__AddLayer): New. Add a new layer to the legend.
1423     (LegendTree.__RemoveLayer): Remove a layer from the legend.
1424     (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
1425     Should only be called with the id of a layer branch.
1426     (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
1427     Returns the root item or creates one if necessary.
1428    
1429     * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
1430     ProjectRasterFile with tuple arguments instead of strings.
1431    
1432     * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
1433     with try/finally. Fixes RTBug #1904.
1434    
1435     * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
1436     with try/finally. Fixes RTBug #1904.
1437     (MapCanvas.FitSelectedToWindow): If a single point is selected
1438     simply center it on the display. Fixes RTBug #1849.
1439    
1440     * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
1441     to be compiled as a standalone app. Now the code can only be
1442     called from Python which simplifies the parameter passing.
1443     (ProjectRasterFile): Handle Python arguments. Remove code that
1444     checks for a destination dataset. Add more clean up code.
1445    
1446     * test/test_map.py (TestMapWithContents.test_raise_layer_top,
1447     TestMapWithContents.test_lower_layer_bottom):
1448     Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
1449     Fixes RTBug #1907.
1450    
1451     * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
1452     extent to the map when the legend is toggled. Fixes RTBug #1881.
1453    
1454 jan 1097 2003-05-29 Jan-Oliver Wagner <[email protected]>
1455    
1456     * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
1457     unsubscribes all that is subcribed in __init__.
1458    
1459 bh 1089 2003-05-28 Bernhard Herzog <[email protected]>
1460    
1461 bh 1095 * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
1462     (MainWindow.CanDuplicateLayer): New methods to implement the
1463     Layer/Duplicate command.
1464     (layer_duplicate command): New.
1465     (main_menu): Add layer_duplicate to the Layer menu.
1466    
1467     2003-05-28 Bernhard Herzog <[email protected]>
1468    
1469 bh 1093 * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
1470     renderer so that NULL/None values get displayed differently (by a
1471     gray rectangle).
1472     (TableGrid.__init__): Override the default renderers
1473    
1474     2003-05-28 Bernhard Herzog <[email protected]>
1475    
1476 bh 1089 * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
1477     classification to "None" if the type of the field has changed.
1478    
1479     * test/test_layer.py (SetShapeStoreTests): New. Class with a few
1480     test for the Layer.SetShapeStore method
1481    
1482 jan 1087 2003-05-28 Jan-Oliver Wagner <[email protected]>
1483 jan 1085
1484 jan 1087 * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
1485     does not necessarily have a filename).
1486    
1487     2003-05-28 Jan-Oliver Wagner <[email protected]>
1488    
1489 jan 1085 * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
1490     sort the selection list for the dialog.
1491    
1492 frank 1083 2003-05-28 Frank Koormann <[email protected]>
1493    
1494     * extensions/thuban/wxproj.cpp
1495     (project_point): Removed cast to int for projected point coordinates.
1496     (shape_centroid): Return last point if all polygon vertices fall
1497     to one point.
1498    
1499 bh 1079 2003-05-28 Bernhard Herzog <[email protected]>
1500    
1501 bh 1081 * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
1502     with layers that don't have shapestores, i.e. raster layers.
1503    
1504     2003-05-28 Bernhard Herzog <[email protected]>
1505    
1506 bh 1079 * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
1507     when determining the title from the filename.
1508    
1509     * test/test_dbf_table.py (TestDBFTable.test_title): Update to
1510     reflect changes in the way the title is derived from the filename
1511    
1512 frank 1077 2003-05-28 Frank Koormann <[email protected]>
1513    
1514     * Thuban/UI/mainwindow.py (MainWindow.TableShow):
1515     Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
1516    
1517 bh 1069 2003-05-27 Bernhard Herzog <[email protected]>
1518    
1519 bh 1075 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
1520     delegate SelectedLayer.
1521     (MainWindow.LayerUnjoinTable): Implement.
1522     (_can_unjoin): New. Helper function for the sensitivity of the
1523     layer/unjoin command.
1524    
1525     * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
1526     (DerivedShapeStore.OrigShapeStore): New. Return the original
1527     shapestore. Used to figure out how to unjoin.
1528     (DerivedShapeStore.Shapefile): Fix a typo.
1529    
1530     2003-05-27 Bernhard Herzog <[email protected]>
1531    
1532 bh 1073 * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
1533     well
1534     (JoinDialog.__init__): Use the layer parameter and only build the
1535     left choice when a layer is given
1536     (JoinDialog.OnJoin): Handle layer joins as well
1537     (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
1538     that the user selects the "Select..." item. The sensitivitly
1539     updating is now in update_sensitivity
1540     (JoinDialog.y): New method to refactor the sensitivity update of
1541     the join button into its own method.
1542    
1543     * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
1544    
1545     2003-05-27 Bernhard Herzog <[email protected]>
1546    
1547 bh 1071 * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
1548     iff there are unreferenced tables in the session
1549    
1550     2003-05-27 Bernhard Herzog <[email protected]>
1551    
1552 bh 1069 * Thuban/Model/messages.py (TABLE_REMOVED): New message.
1553    
1554     * Thuban/Model/session.py (Session.UnreferencedTables): New method
1555     to return tables that are not referenced by other tables or shape
1556     stores and can be removed.
1557     (Session.RemoveTable): Issue a TABLE_REMOVED message after
1558     removing the table
1559    
1560     * Thuban/UI/mainwindow.py: Remove unused imports
1561     (MainWindow.TableClose): Implement.
1562    
1563     * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
1564     messages so that the frame will be automatically closed when a new
1565     session is opened or the table is removed.
1566     (TableFrame.OnClose): Unsubscribe the Subscriptions made in
1567     __init__
1568     (TableFrame.close_on_session_replaced)
1569     (TableFrame.close_on_table_removed): New. Subscribers that close
1570     the window
1571    
1572     * test/test_session.py (TestSessionMessages.test_remove_table)
1573     (TestSessionSimple.test_remove_table): Move the test to
1574     TestSessionSimple and add test for the TABLE_REMOVED message
1575     (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
1576     (TestSessionSimple.test_unreferenced_tables) New. Test for the
1577     UnreferencedTables method.
1578     (UnreferencedTablesTests): New. Class with some more sophisticated
1579     tests for UnreferencedTables.
1580    
1581 frank 1065 2003-05-27 Frank Koormann <[email protected]>
1582    
1583 frank 1067 * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
1584     display has some unwanted side effects. Removed again.
1585    
1586     2003-05-27 Frank Koormann <[email protected]>
1587    
1588 frank 1065 * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
1589    
1590     * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
1591    
1592 jan 1062 2003-05-27 Jan-Oliver Wagner <[email protected]>
1593    
1594 bh 1069 * test/test_menu.py (MenuTest.test): Added test for
1595     Menu.RemoveItem().
1596 jan 1062
1597 bh 1069 * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
1598     the menu.
1599 jan 1062
1600 frank 1059 2003-05-27 Frank Koormann <[email protected]>
1601    
1602     Nonmodal dialogs without parent (i.e. they can fall behind the main
1603     window)
1604    
1605     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
1606     all dialogs in the dialogs dictionary and the canvas.
1607    
1608     * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
1609     parent, i.e. can fall behind other windows.
1610     (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
1611     dictionary before removing it.
1612    
1613     * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
1614    
1615     * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
1616     * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
1617     * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
1618    
1619 bh 1053 2003-05-27 Bernhard Herzog <[email protected]>
1620    
1621 bh 1055 * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
1622     tableview dialog
1623     (MainWindow.TableShow): Use ShowTableView to open the dialogs.
1624     Also, don't use the table's titles as the dialog names. The titles
1625     aren't guaranteed to be unique.
1626     (MainWindow.TableOpen): Open a table view dialog after opening the
1627     table
1628    
1629     2003-05-27 Bernhard Herzog <[email protected]>
1630    
1631 bh 1053 * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
1632     effect can be achieved by simply closing the window showing the
1633     table.
1634     (MainWindow.TableHide): Removed.
1635     (main_menu): Removed "table_hide"
1636    
1637 frank 1051 2003-05-27 Frank Koormann <[email protected]>
1638    
1639     Fix legend tree display problems under Win32
1640    
1641     * Thuban/UI/legend.py: BMP_SIZE_W = 15
1642     (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
1643     (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
1644    
1645     * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
1646    
1647 jan 1048 2003-05-27 Jan-Oliver Wagner <[email protected]>
1648    
1649     * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
1650     'after' now allows to insert separators almost anywhere in the menu.
1651    
1652 frank 1046 2003-05-27 Frank Koormann <[email protected]>
1653    
1654     * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
1655     "S" of selection box label to hint on hot key (Alt-S). Works under
1656     Win32 but is ignored under GTK.
1657    
1658     2003-05-26 Frank Koormann <[email protected]>
1659    
1660     * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
1661     Center Choices.
1662    
1663 bh 1038 2003-05-26 Bernhard Herzog <[email protected]>
1664    
1665 bh 1044 Remove the Precision methods again. They're too DBF specific to be
1666     part of the table interface and they're only used in table_to_dbf
1667     anyway.
1668    
1669     * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
1670     fixed precision of 12 for doubles.
1671     (TransientTableBase.Precision): Removed
1672     (AutoTransientTable.Width): Delegate to self.table.
1673    
1674     * Thuban/Model/table.py (DBFTable.Precision)
1675     (MemoryTable.Precision): Removed.
1676     (MemoryTable.Width): Use a fixed precision of 12 for doubles.
1677     (table_to_dbf): Use a fixed precision of 12 for floats unless the
1678     column object specifies something else.
1679    
1680     * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
1681     test for table_to_dbf
1682    
1683     2003-05-26 Bernhard Herzog <[email protected]>
1684    
1685     * test/test_transientdb.py
1686     (TestTransientTable.run_iceland_political_tests): Fix a comment.
1687    
1688     2003-05-26 Bernhard Herzog <[email protected]>
1689    
1690 bh 1038 * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
1691     implementation. Mark parts of the file format strings for
1692     localization.
1693    
1694     * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
1695     file and add the table to the tables managed by the session
1696    
1697 bh 1040 * test/test_session.py (TestSessionSimple.test_open_table_file):
1698     New. test case for OpenTableFile
1699    
1700 jan 1033 2003-05-26 Jan-Oliver Wagner <[email protected]>
1701    
1702 jan 1035 * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
1703     Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
1704     Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
1705     Replace the true/false of wxWindows by True/False of Python 2.2.1.
1706    
1707     2003-05-26 Jan-Oliver Wagner <[email protected]>
1708    
1709 bh 1038 * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
1710     already a selection present, update the grid accordingly.
1711 jan 1033
1712     * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
1713     resizeable and increase its initial size.
1714    
1715 frank 1030 2003-05-26 Frank Koormann <[email protected]>
1716    
1717     Table export functionality
1718    
1719     * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
1720     Return width (in characters) for a column.
1721     (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
1722     (table_to_dbf): Write table to dbf file.
1723     (table_to_csv): Write table to csv file.
1724    
1725     * Thuban/Model/transientdb.py (TransientTableBase.Width,
1726     TransientTableBase.Precision): Return column width and precision.
1727    
1728     * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
1729     or table_to_csv depending on file selection.
1730    
1731     * test/test_dbf_table.py:
1732     Test table_to_dbf (extension of former part of test).
1733    
1734     * test/test_csv_table.py:
1735     Test table_to_csv.
1736    
1737 jan 1021 2003-05-23 Jan-Oliver Wagner <[email protected]>
1738    
1739 jan 1024 * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
1740     Use QueryTableFrame instead of TableFrame.
1741 jan 1021
1742 jan 1024 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
1743     table window with 'Layer Table:' instead of 'Table:'.
1744    
1745     2003-05-23 Jan-Oliver Wagner <[email protected]>
1746    
1747     Give all tables a title via mix-in TitledObject.LayerShowTable
1748    
1749 jan 1021 * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
1750     only if it exists.
1751    
1752     * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
1753     and call its init-method with a default title. Remove Title() method.
1754    
1755     * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
1756     AutoTransientTable): mix-in TitledObject and call its init-method with
1757     a default title. Remove Title() method.
1758    
1759 bh 1017 2003-05-23 Bernhard Herzog <[email protected]>
1760    
1761     * Thuban/Model/session.py (Session.AddShapeStore): Define
1762     AddShapeStore analogously to AddTable.
1763    
1764     * test/test_session.py (TestSessionSimple.test_add_shapestore):
1765     New. Test for AddShapeStore
1766    
1767 jan 1015 2003-05-23 Jan-Oliver Wagner <[email protected]>
1768    
1769     Introducing QueryTableFrame and a very coarse ShowTable implementation.
1770    
1771     * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
1772     class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
1773     The latter implements the selection GUI without dependency on a layer.
1774     LayerTableFrame now is derived from QueryTableFrame and connects
1775     to a layer.
1776    
1777     * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
1778     implementation that still needs work.
1779    
1780     * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
1781    
1782 frank 1011 2003-05-22 Frank Koormann <[email protected]>
1783    
1784     * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
1785     Added "outer_join = False" as optional parameter.
1786     (TransientJoinedTable.create): If outer join is true, perform a
1787     "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
1788     the left table. Records not matching are filled with 0 / None.
1789    
1790     * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
1791     (JoinDialog.OnJoin): Consider outer join check box.
1792    
1793 bh 1006 2003-05-22 Bernhard Herzog <[email protected]>
1794    
1795 bh 1008 * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
1796     somewhat safer way. Storing the traceback in a local variable can
1797     lead to memory leaks
1798    
1799     2003-05-22 Bernhard Herzog <[email protected]>
1800    
1801 bh 1006 * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
1802     the wxMessageDialog's Destroy() method.
1803    
1804 frank 1004 2003-05-22 Frank Koormann <[email protected]>
1805    
1806     * Thuban/UI/join.py (JoinDialog.__init__): Make use of
1807     TransientTable.Title()
1808    
1809     2003-05-22 Frank Koormann <[email protected]>
1810    
1811     Join Dialog, initial version.
1812    
1813     * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
1814    
1815     * Thuban/UI/join.py (JoinDialog): Functional implementation of
1816     former framework. Renamed Table1/Table2 to LeftTable/RightTable
1817     in all occurences.
1818    
1819     * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
1820     Typo fixed.
1821    
1822 bh 995 2003-05-22 Bernhard Herzog <[email protected]>
1823    
1824 bh 999 Give the tables titles so that the GUI can display more meaningful
1825     names. For now the titles are fixed but depend on e.g. filenames
1826     or the titles of the joined tables.
1827    
1828     * Thuban/Model/transientdb.py (TransientTable.Title)
1829     (TransientJoinedTable.Title, AutoTransientTable.Title): New.
1830    
1831     * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
1832    
1833     * test/test_transientdb.py
1834     (TestTransientTable.test_auto_transient_table_title): New. Test
1835     for the Title method
1836     (TestTransientTable.test_transient_joined_table)
1837     (TestTransientTable.test_transient_table): Add test for the Title
1838     methods
1839    
1840     * test/test_memory_table.py (TestMemoryTable.test_title): New.
1841     Test for the Title method
1842    
1843     * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
1844     the Title method
1845    
1846     2003-05-22 Bernhard Herzog <[email protected]>
1847    
1848 bh 997 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
1849     Provide a better way to destroy the layers
1850     (TestLayer.test_base_layer, TestLayer.test_arc_layer)
1851     (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1852     (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
1853     the new way to destroy the layers.
1854     (TestLayer.test_derived_store): New. Test for using a layer with a
1855     DerivedShapeStore
1856    
1857     * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
1858     filename if the shape store actually has one.
1859    
1860     2003-05-22 Bernhard Herzog <[email protected]>
1861    
1862 bh 995 * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
1863     for the filename
1864    
1865     * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
1866     for the FileName method
1867     (TestDBFTableWriting.test_write): Fix spelling of filename
1868    
1869 tkoester 993 2003-05-22 Thomas Koester <[email protected]>
1870    
1871     * Thuban/Model/range.py, test/test_range.py: Brought over new Range
1872     from SciParam that now really is immutable.
1873    
1874 frank 992 2003-05-22 Frank Koormann <[email protected]>
1875    
1876     Layer Top/Bottom placement added to legend.
1877    
1878     * Thuban/UI/legend.py
1879     (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
1880     bound to tool events.
1881     (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
1882     New, methods binding the event methods with the map methods.
1883    
1884     * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
1885     layer at top/bottom of layer stack.
1886    
1887     * Resources/Bitmaps/top_layer.xpm: New button icon.
1888    
1889     * Resources/Bitmaps/bottom_layer.xpm: New button icon.
1890    
1891 bh 988 2003-05-22 Bernhard Herzog <[email protected]>
1892    
1893     * Thuban/Model/session.py (Session.RemoveTable): New method to
1894     remove tables
1895    
1896     * test/test_session.py (TestSessionSimple.test_remove_table): New.
1897     Test for RemoveTable
1898    
1899 tkoester 986 2003-05-22 Thomas Koester <[email protected]>
1900    
1901     * Thuban/Model/classgen.py: Added short module doc string and CVS id.
1902     (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
1903    
1904 bh 983 2003-05-22 Bernhard Herzog <[email protected]>
1905    
1906 bh 985 Implement a way to discover dependencies between tables and
1907     shapestores.
1908    
1909     * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
1910     (TransientJoinedTable.Dependencies)
1911     (AutoTransientTable.SimpleQuery): New. Implement the dependencies
1912     interface
1913     (TransientJoinedTable.__init__): Keep tack of the original table
1914     objects in addition to the corresponding transient tables.
1915    
1916     * Thuban/Model/table.py (DBFTable.Dependencies)
1917     (MemoryTable.Dependencies): New. Implement the dependencies
1918     interface
1919    
1920     * Thuban/Model/data.py (ShapeTable): New. Helper class for
1921     ShapefileStore
1922     (ShapefileStore.__init__): Use ShapeTable instead of
1923     AutoTransientTable
1924     (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
1925     (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
1926     methods for filename and type
1927     (ShapefileStore.Dependencies): New. Implement the dependencies
1928     interface
1929     (DerivedShapeStore): New class to replace SimpleStore. The main
1930     difference to SimpleStore is that it depends not on a shapefile
1931     but another shapestore which expresses the dependencies a bit
1932     better
1933     (SimpleStore.__init__): Add deprecation warning.
1934    
1935     * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
1936     Test for the Dependencies method.
1937    
1938     * test/test_memory_table.py (TestMemoryTable.test_dependencies):
1939     New. Test for the Dependencies method.
1940    
1941     * test/test_transientdb.py
1942     (TestTransientTable.test_auto_transient_table_dependencies): New.
1943     Test for the Dependencies method.
1944     (TestTransientTable.test_transient_joined_table): Add test for the
1945     Dependencies method.
1946    
1947     * test/test_session.py (TestSessionSimple.setUp)
1948     (TestSessionSimple.tearDown): New. Implement a better way to
1949     destroy the sessions.
1950     (TestSessionSimple.test_initial_state)
1951     (TestSessionSimple.test_add_table): Bind session to self.session
1952     so that it's destroyed by tearDown
1953     (TestSessionSimple.test_open_shapefile): New. Test for
1954     OpenShapefile and the object it returns
1955    
1956     2003-05-22 Bernhard Herzog <[email protected]>
1957    
1958 bh 983 * Thuban/Model/session.py (Session.AddTable): New method to
1959     register tables with the session.
1960     (Session.Tables): Return the tables registered with AddTable too.
1961    
1962     * test/test_session.py (TestSessionSimple.test_add_table): New.
1963     Test case for the AddTable method
1964    
1965 frank 981 2003-05-22 Frank Koormann <[email protected]>
1966    
1967     UI polishing updates: Place main buttons (OK, Cancel, etc) in the
1968     lower right corner, center labels for selections, initialize controls
1969     in reasonable order for keyboard navigation.
1970    
1971     * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
1972     (ProjFrame.__DoOnProjAvail): Determine position of current projection
1973     using the wxListBox.FindString() method. Still a problem (#1886)
1974    
1975     * Thuban/UI/classifier.py
1976     (Classifier.__init__, SelectPropertiesDialog.__init__)
1977    
1978     * Thuban/UI/classgen.py (ClassGenDialog.__init__,
1979     (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
1980     different classification types from here to __init__.
1981     (GenUniquePanel.__init__): Set the column width of the first field
1982     in the Field ListCtrl to the full width.
1983    
1984     * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
1985     Button to 'Export'. Center Buttons in Selection Box, set Focus to
1986     Grid.
1987     (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
1988     changes focus to the Selection when pressing "Alt-S".
1989    
1990     * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
1991     the text if not visible. The italic font sometimes exceeds the
1992     rendering area.
1993    
1994 jonathan 972 2003-05-21 Jonathan Coles <[email protected]>
1995 jonathan 971
1996 jonathan 975 * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
1997     to OnClose so that Thuban closes correctly.
1998    
1999     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
2000     DockFrame.OnClose, not DockFrame._OnClose.
2001    
2002     2003-05-21 Jonathan Coles <[email protected]>
2003    
2004 jonathan 971 * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
2005     references to 'inf' and use new Range __init__ to pass floats
2006     directly rather than converting them to strings first.
2007     Fixes RTBug #1876.
2008    
2009     * Thuban/Model/classification.py (ClassGroupRange.SetRange):
2010     Use new Range ___init__ to pass floats.
2011    
2012     * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
2013     filename is a valid image file. Throw IOError otherwise.
2014    
2015     * Thuban/Model/range.py: Brought over new Range from SciParam that
2016     is immutable and has an __init__ which can accept floats.
2017    
2018     * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
2019     into try block. AddLayer doesn't throw any exceptions anymore.
2020     (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
2021     try block.
2022    
2023     * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
2024     the first item in choices. Fixes RTBug #1882.
2025    
2026     * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
2027     has gone to 0 which is a serious problem. abort.
2028     (MapRenderer.draw_raster_layer): Catch IOError seperately and
2029     print the error from GDAL.
2030    
2031     * Thuban/UI/tableview.py (TableGrid.__init__): Call
2032     ToggleEventListeners to turn on listening.
2033     (TableGrid.ToggleEventListeners): New. Turns event listening on
2034     and off so as to prevent excessive messages.
2035     (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
2036     to suppress excessive messages when selecting many rows.
2037     Fixes RTBug #1880.
2038    
2039     * Thuban/UI/view.py: Added checks against if scale == 0. This
2040     is a serious problem that can occur when an image without
2041     geo data is loading and causes the map projection bounds to
2042     go to infinity. Right now, the solution is to simply try
2043     to recover.
2044    
2045     * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
2046     to set the MFILEReceiver attributes even if the data is NULL.
2047    
2048     * extensions/thuban/gdalwarp.cpp: Improved the error handling
2049     and passed GDAL messages back up to the Python layer. Also
2050     tried to fix some memory leaks that were present in the original
2051     utility but didn't matter because the program aborted.
2052    
2053     * test/test_range.py: Copied over tests from SciParam. Removed
2054     tests against importing. Fixes RTBug #1867.
2055    
2056 bh 958 2003-05-21 Bernhard Herzog <[email protected]>
2057    
2058     * test/test_load.py: Remove unused imports and restructure the
2059     test code
2060     (LoadSessionTest): Split into one class for each test and turn
2061     LoadSessionTest itself into the base class for all such session
2062     tests.
2063     (ClassificationTest): New base class for load tests that test
2064     classifications
2065     (TestSingleLayer, TestLayerVisibility, TestClassification)
2066     (TestLabels, TestLayerProjection, TestRasterLayer): New classes
2067     for the individual tests
2068    
2069     * test/support.py (FileLoadTestCase.filename): New base class for
2070     file loading tests
2071    
2072 jan 955 2003-05-21 Jan-Oliver Wagner <[email protected]>
2073    
2074     * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
2075     Mercator' to 'UTM Zone 32' as a more convenient example.
2076     Added 'Gauss Krueger Zone 6'.
2077    
2078     * Data/iceland_sample_raster.thuban: political polygon now
2079     filled transparent to have the raster image visible at once.
2080    
2081 frank 952 2003-05-21 Frank Koormann <[email protected]>
2082    
2083     * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
2084     OnClose() to keep in sync with extensions. Internally Thuban
2085     still uses "underscored" names.
2086    
2087 jonathan 949 2003-05-20 Jonathan Coles <[email protected]>
2088    
2089     This puts back Raster layer support. These layers support projections
2090     through the GDAL library. Currently, the CVS version is being used.
2091     There are no Debian packages available although this may change soon.
2092     A GDAL driver was extended to support writing to memory rather to
2093     files.
2094    
2095     There is still some work that needs to be done, such as some error
2096     handling when loading invalid images or when there is a problem
2097     projecting the image. This putback simply checks in the majority
2098     of the work.
2099    
2100     * setup.py: Add gdalwarp library extension.
2101    
2102     * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
2103     Defaults to False, but can be overridden by subclasses if they
2104     support classification.
2105     (RasterLayer): New. Defines a new layer that represents an
2106     image.
2107    
2108     * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
2109     tag handler.
2110     (SessionLoader.start_layer): Encode the filename.
2111     (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
2112     New. Supports reading a rasterlayer tag.
2113    
2114     * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
2115    
2116     * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
2117     get a string in Latin1. If we get such as string convert it to
2118     unicode first, otherwise leave if alone before encoding.
2119     (SessionSaver.write_layer): Add support for writing both Layers
2120     and RasterLayers.
2121    
2122     * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
2123     The right argument may not be a string, it could also be a Column.
2124    
2125     * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
2126     Make initial window size 600x400. Fixes RTBug #1872.
2127    
2128     * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
2129     the dialog is constructed so that we can support layers that
2130     do not have classifications.
2131     (Classifier._OnTry): Only build a classification if the layer
2132     supports one.
2133    
2134     * Thuban/UI/legend.py: Change all checks that a layer is an
2135     instance of Layer into checks against BaseLayer.
2136     (LegendTree.__FillTreeLayer): Only add children to a branch if
2137     the layer supports classification.
2138    
2139     * Thuban/UI/mainwindow.py (MainWindow.NewSession,
2140     MainWindow.OpenSession): Don't proceed with an action if the
2141     user chooses Cancel when they are asked to save changes.
2142     (MainWindow.AddRasterLayer): New. Open a dialog to allow the
2143     user to select an image file. Create a new RasterLayer and add
2144     it to the map.
2145    
2146     * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
2147     for rendering RasterLayer layers.
2148     (MapRenderer.draw_raster_layer): Actually method that calls
2149     the GDALWarp python wrapper and constructs an image from the
2150     data returned.
2151    
2152     * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
2153     Choices symbols to match those used in the table query method.
2154     Replace deprecated method calls on table with new method names.
2155    
2156     * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
2157     how small the scale can get. This still needs more testing.
2158    
2159     * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
2160     Provides a driver to output in .bmp format.
2161    
2162     * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
2163     New. Provides IO routines which write to memory, rather than a file.
2164    
2165     * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
2166     of the gdalwarp utility provided in GDAL. Added function calls
2167     that can be accessed from python.
2168    
2169     * Data/iceland_sample_raster.thuban: New. Sample file that uses
2170     a raster layer.
2171    
2172     * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
2173     layer image data.
2174    
2175     * Doc/thuban.dtd: Added rasterlayer attribute definition.
2176    
2177     * test/test_layer.py, test/test_load.py, test/test_save.py: Added
2178     tests associated with the raster layer code.
2179    
2180     * test/test_transientdb.py
2181     (TestTransientTable.test_auto_transient_table_query): Added a test
2182     for using a Column object as the "right" parameter to a query.
2183    
2184 frank 924 2003-05-19 Frank Koormann <[email protected]>
2185    
2186 frank 927 * Thuban/version.py (get_changelog_date):
2187     Catch exceptions if ChangeLog does not exist.
2188    
2189     * Thuban/UI/view.py (MapCanvas.Export): Bugfix
2190    
2191     2003-05-19 Frank Koormann <[email protected]>
2192    
2193 frank 924 Extended version information for Thuban
2194    
2195     * Thuban/version.py: New, version information for Thuban: Last
2196     modification date and last ChangeLog entry date.
2197    
2198     * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
2199     information: Display Thuban, wxPython and Python version.
2200    
2201 bh 919 2003-05-16 Bernhard Herzog <[email protected]>
2202    
2203 bh 921 * Thuban/Model/save.py: Remove some unused imports including the
2204     __future__ import for nested_scopes as Thuban relies on Python 2.2
2205     now.
2206     (XMLWriter.encode): Remove the special case for a None argument.
2207     In the saver encode is always called with a string argument.
2208    
2209     2003-05-16 Bernhard Herzog <[email protected]>
2210    
2211 bh 919 * Thuban/UI/__init__.py: Remove the work-around for the locale bug
2212     in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
2213     of the bug was that e.g. float("1.2") would fail. Thuban now
2214     requires 2.4.x.
2215    
2216 frank 917 2003-05-16 Frank Koormann <[email protected]>
2217    
2218     Printing enhancement and WMF export (under Win32)
2219    
2220     * Thuban/UI/renderer.py (ExportRenderer): New, derived from
2221     ScreenRenderer. Renders Map, Legend and Scalebar for export.
2222     (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
2223     PrintRender.
2224    
2225     * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
2226     to fullfil information needed for PrinterRenderer.
2227     (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
2228     (MapCanvas.Print): Adapted to new MapPrintout.
2229     (OutputTransform): General calculations to transform from canvas
2230     coordinates to export/printing devices.
2231    
2232     * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
2233     new method_command to call ExportMap, with platform dependency (only
2234     __WXMSW__)
2235    
2236     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
2237     of scalebar drawing area as new parameters.
2238    
2239     * Thuban/Model/scalebar.py (roundInterval): round long instead of int
2240    
2241     * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
2242     Update to extended scalebar.DrawScalebar header.
2243    
2244     * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
2245    
2246     * test/test_scalebar.py: Made test executable as standalone.
2247    
2248 bh 908 2003-05-16 Bernhard Herzog <[email protected]>
2249    
2250     * Thuban/Model/table.py (Table): Remove this compatibility alias
2251     for DBFTable.
2252    
2253     * test/test_table.py: Import DBFTable as Table because that alias
2254     doesn't exist anymore.
2255    
2256     * Thuban/UI/classgen.py: Remove some unused imports
2257    
2258 jonathan 906 2003-05-14 Jonathan Coles <[email protected]>
2259    
2260     * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
2261     Fix docstring.
2262     (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
2263     (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
2264     values of the supplied range to determine the beginning and end
2265     bounds of the generated classes.
2266    
2267     * Thuban/Model/range.py (Range.number_re): Now accepts floats that
2268     do not have a leading 0 (.5 is now accepted as well as 0.5).
2269    
2270     * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
2271     call to ClassGenerator.GenUniformDistribution.
2272    
2273     * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
2274     layout bug with the 'Projection' label.
2275    
2276     * test/support.py (FloatTestCase): New. Needed for the Range tests.
2277    
2278     * test/test_range.py: New. Imported from SciParam.
2279    
2280 jonathan 897 2003-05-12 Jonathan Coles <[email protected]>
2281    
2282 jonathan 899 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
2283     to table.UniqueValues() with calls that retrieve all the values
2284     from the table. This will need to be replaced by a method on table
2285     which can simply return the list (perhaps more efficiently).
2286    
2287     2003-05-12 Jonathan Coles <[email protected]>
2288    
2289 jonathan 897 The return value of ClassGenerator.CalculateQuantiles has changed.
2290     Refer to the documentation for details.
2291    
2292     * test/test_classgen.py: Modified Quantile tests to use the
2293     new return values.
2294    
2295     * Thuban/Model/classgen.py
2296     (ClassGenerator.GenQuantiles): Add comments describing the parameters,
2297     use new return values from CalculateQuantiles to produce the correct
2298     range bounds in the Classification.
2299     (ClassGenerator.CalculateQuantiles): Add more comments describing
2300     the return values and parameters. Make minor adjustments to improve
2301     the legibility of the code. Fix problem with adjusted not being set
2302     in most cases.
2303    
2304 frank 893 2003-05-12 Frank Koormann <[email protected]>
2305    
2306     * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
2307     and latin1. Fixes #1851 finally.
2308    
2309 jonathan 889 2003-05-09 Jonathan Coles <[email protected]>
2310    
2311 jonathan 897 * test/test_classgen.py: New. Tests the Quantile algorithm.
2312    
2313     * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
2314     Clean up debugging statement, add comments, fix a small bug in the
2315     returned adjusted percentiles.
2316    
2317     2003-05-09 Jonathan Coles <[email protected]>
2318    
2319 jonathan 889 Introduces Range class from SciParam into the ClassGroupRange class,
2320     and such ranges can now be saved and loaded from disk.
2321    
2322     Quantiles are now available in the Classification Generator.
2323    
2324     Initial support for building Queries on a table. Doesn't do anything
2325     but run some tests.
2326    
2327     * Thuban/Model/classification.py: Explicit imports.
2328     (ClassGroupRange): Use the Range class to store the underlying
2329     range information. The interface remains the same, except for
2330     GetRange(), and you can also supply a Range object as the min
2331     parameter to SetRange or __init__.
2332    
2333     * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
2334     string appropriately for use in Thuban. Fixes RTbug #1851.
2335     (SessionLoader.end_projection): Handle the context of the
2336     projection tag a bit better by looking at what objects are not
2337     None. There was an assumption that a projection tag for a map
2338     could occur before any layers.
2339     (SessionLoader.start_clrange): Provide backward compatibility for
2340     reading min/max values as well as the new range parameter.
2341    
2342     * Thuban/Model/map.py: Explicit imports.
2343    
2344     * Thuban/Model/resource.py: Import _.
2345     (ProjFileSaver.write): write header using projfile.dtd.
2346    
2347     * Thuban/Model/save.py: Explicit imports.
2348     (XMLWriter.encode): New. Encode the given string from a format
2349     used by Thuban into UTF-8. Fixes RTbug #1851.
2350    
2351     * Thuban/UI/classgen.py: Explicit imports.
2352     (ClassGenDialog.__init__): Clean up the code and add support
2353     for Quantiles.
2354     (ClassGenDialog.OnOK): Add support for Quantiles.
2355     (GenQuantilesPanel): New. Input panel for Quantiles.
2356     (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
2357     GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
2358    
2359     * Thuban/Model/classgen.py: New. Contains all the classes named above.
2360    
2361     * Thuban/UI/classifier.py: Explicit imports.
2362     (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
2363     ClassTable.SetValueAsCustom): Reworked to use new Range class.
2364    
2365     * Thuban/UI/legend.py: Explicit imports.
2366    
2367     * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
2368     a Table menu and associated method calls.
2369     (MainWindow.choose_color): Removed. No longer needed.
2370    
2371     * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
2372     should be disabled if no projection is selected in the available
2373     list.
2374    
2375     * Thuban/UI/renderer.py: Explicit imports.
2376    
2377     * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
2378     with correctly selecting the rows and issuing the right events.
2379     Be sure to call Skip() to allow the grid to do some of its own
2380     handling which allows the rows to actually be selected.
2381     (LayerTableGrid.select_shapes): Rename from select_shape. Supports
2382     selecting multiple shapes.
2383     (LayerTableFrame): Support for building Queries.
2384     (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
2385    
2386     * Thuban/UI/tree.py: Explicit imports.
2387    
2388     * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
2389     table view can call it.
2390    
2391     * test/test_classification.py: Explicit imports.
2392     (TestClassification.test_ClassGroupRange): Fix test for new
2393     Range class.
2394    
2395     * Doc/thuban.dtd: Add range parameter for clrange.
2396    
2397     * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
2398     object in ClassGroupRange, and also uesd for inputting ranges in
2399     the classifer table and elsewhere.
2400    
2401     * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
2402     yet.
2403    
2404 frank 872 2003-05-09 Frank Koormann <[email protected]>
2405    
2406     * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
2407    
2408 frank 860 2003-05-08 Frank Koormann <[email protected]>
2409    
2410 frank 870 Coding style updates
2411    
2412     * test/test_scalebar.py: Replaced tab indentation by spaces.
2413    
2414     * Thuban/UI/scalebar.py: Explicit imports.
2415    
2416     2003-05-08 Frank Koormann <[email protected]>
2417    
2418 frank 867 * Thuban/UI/scalebar.py
2419     (ScaleBar.DrawScalebar): Format string bug fixed.
2420    
2421     2003-05-08 Frank Koormann <[email protected]>
2422    
2423 frank 865 Reorganization of scalebar component (no wx in Thuban/Model)
2424    
2425     * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
2426     (deriveInterval):
2427     Calculate scalebar interval and unit which fits in width for scale.
2428     (roundInterval): Round float.
2429    
2430     * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
2431    
2432     * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
2433    
2434     * Thuban/UI/legend.py: Import Thuban.UI.scalebar
2435    
2436     2003-05-08 Frank Koormann <[email protected]>
2437    
2438 frank 860 * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
2439     Initialize ScaleBar with canvas.map
2440    
2441     * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
2442     round intervals to display smarter lengths
2443     (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
2444     layer. If the maps has no projection applied grey the scalebar.
2445    
2446 frank 857 2003-05-07 Frank Koormann <[email protected]>
2447    
2448     Basic Scalebar features added.
2449    
2450     * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
2451    
2452     * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
2453     (ScaleBarBitmap): New, links the scalebar bitmap with view messages
2454     and the renderer.
2455    
2456     * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
2457    
2458     * Thuban/UI/messages.py: SCALE_CHANGED added.
2459    
2460 bh 850 2003-05-07 Bernhard Herzog <[email protected]>
2461    
2462 bh 852 * Thuban/Model/session.py (Session.__init__): New instance
2463     variable shapestores to hold a list of all open shapestore objects
2464     (Session.ShapeStores): New. Accessor method for the shapestores
2465     list.
2466     (Session._add_shapestore, Session._clean_weak_store_refs): New.
2467     Internal methods to maintain the shapestores list.
2468     (Session.Tables): New. Return all tables open in the session.
2469     (Session.OpenShapefile): Insert the new ShapeStore into the
2470     shapestores list.
2471    
2472     * test/test_session.py (TestSessionSimple.test_initial_state): Add
2473     tests for ShapeStores and Tables
2474     (TestSessionWithContent.test_shape_stores)
2475     (TestSessionWithContent.test_tables): New. Test cases for
2476     ShapeStores and Tables
2477    
2478     2003-05-07 Bernhard Herzog <[email protected]>
2479    
2480 bh 850 * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
2481     Add comments about the optimizations used.
2482     (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
2483     Implement the ReadValue table interface method.
2484    
2485     * test/test_transientdb.py
2486     (TestTransientTable.run_iceland_political_tests)
2487     (TestTransientTable.test_transient_joined_table): Add tests for
2488     ReadValue
2489    
2490 frank 848 2003-05-07 Frank Koormann <[email protected]>
2491    
2492     * Resources/Bitmaps/fulllayerextent.xpm,
2493     Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
2494     new icons.
2495    
2496 bh 840 2003-05-06 Bernhard Herzog <[email protected]>
2497    
2498 bh 846 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
2499     New. Simply delegate to the transient table's version.
2500    
2501     * test/test_transientdb.py
2502     (TestTransientTable.test_auto_transient_table_query): New. Test
2503     case for AutoTransientTable's SimpleQuery
2504    
2505     2003-05-06 Bernhard Herzog <[email protected]>
2506    
2507 bh 843 * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
2508     Implement a simple query method for the query dialog
2509     (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
2510     the row index or shapeid.
2511     (TransientTable.create): Insert the right value of the row index
2512     (TransientJoinedTable.create): Copy the row index of the left
2513     table to the joined result table
2514    
2515     * test/test_transientdb.py
2516     (TestTransientTable.test_transient_table_read_twice): Fix
2517     doc-string
2518     (TestTransientTable.test_transient_table_query): New. Test for the
2519     SimpleQuery method
2520    
2521     2003-05-06 Bernhard Herzog <[email protected]>
2522    
2523 bh 840 Convert all table users to use the new table interface. This only
2524     covers Thuban itself, not GREAT-ER or other applications built on
2525     Thuban yet, so the compatibility interface stays in place for the
2526     time being but it now issues DeprecationWarnings.
2527    
2528     Finally, the new Table interface has a new method, HasColumn.
2529    
2530     * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
2531     issue deprecation warnings when they're. The warnings refer to the
2532     caller of the method.
2533     (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
2534     for the deprecation warnings
2535    
2536     * test/test_table.py: Ignore the deprecation warnings for the old
2537     table in the tests in this module. The purpose of the tests is to
2538     test the old interface, after all.
2539    
2540     * test/test_transientdb.py
2541     (TestTransientTable.run_iceland_political_tests): Use the
2542     constants for the types. Add a test for HasColumn
2543     (TestTransientTable.test_transient_joined_table): Adapt to new
2544     table interface. Add a test for HasColumn
2545     (TestTransientTable.test_transient_table_read_twice): Adapt to new
2546     table interface
2547    
2548     * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
2549     Adapt to new table interface
2550    
2551     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
2552     new table interface
2553    
2554     * Thuban/UI/controls.py (RecordListCtrl.fill_list)
2555     (RecordTable.SetTable): Adapt to new table interface
2556    
2557     * Thuban/UI/classifier.py (Classifier.__init__)
2558     (Classifier.__init__): Adapt to new table interface
2559    
2560     * Thuban/UI/classgen.py (ClassGenDialog.__init__)
2561     (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
2562     to new table interface
2563    
2564     * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
2565     (AutoTransientTable.HasColumn): Implement the new table interface
2566     method
2567     (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
2568     (AutoTransientTable.UniqueValues): Adapt to new table interface
2569    
2570     * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
2571     Adapt to new table interface
2572    
2573     * test/test_layer.py (TestLayer.open_shapefile): Helper method to
2574     simplify opening shapefiles a bit easier.
2575     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
2576     (TestLayer.test_point_layer): Use the new helper method
2577     (TestLayer.test_get_field_type): New. Test for the GetFieldType
2578     method
2579    
2580     * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
2581     the new table method
2582    
2583     * test/test_memory_table.py (TestMemoryTable.test_has_column):
2584     Test for the new table method HasColumn
2585    
2586 jonathan 833 2003-05-06 Jonathan Coles <[email protected]>
2587    
2588     Addresses the "Selection Extent" wish of RTbug #1787.
2589    
2590     * Resources/Bitmaps/fulllayerextent.xpm,
2591     Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
2592     extent. These are just place holders for the real bitmaps.
2593    
2594     * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
2595     calculate the bounding box once (the first time compute_bbox() is
2596     called).
2597     (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
2598     the bounding box for the shapes in lat/long coordinates.
2599    
2600     * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
2601     option.
2602     (MainWindow.has_selected_shapes): New. Returns true if there are
2603     any selected shapes.
2604     (MainWindow.FullSelectionExtent): New. Calls
2605     MapCanvas.FitSelectedToWindow() when the user selects the menu option.
2606     (_has_selected_shapes): New. Returns true if there are any
2607     selected shapes.
2608    
2609     * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
2610     true if there are any selected shapes.
2611    
2612     * Thuban/UI/view.py (MapCanvas): Added delegated method
2613     HasSelectedShapes.
2614     (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
2615     shapes on the canvas using the map projection (if any).
2616    
2617     * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
2618     for Layer.ShapesBoundingBox().
2619    
2620 bh 826 2003-05-06 Bernhard Herzog <[email protected]>
2621    
2622     * Resources/Projections/defaults.proj: Fix spelling of Mercator
2623    
2624 jonathan 823 2003-05-05 Jonathan Coles <[email protected]>
2625    
2626     Addresses the "Full Layer Extent" wish of RTbug #1787.
2627    
2628     * Resources/Projections/defaults.proj: Added UK National Grid.
2629    
2630     * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
2631     (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
2632     when the user selects the menu option.
2633    
2634     * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
2635     scales the given layer on the canvas using the map projection.
2636    
2637 bh 819 2003-05-05 Bernhard Herzog <[email protected]>
2638    
2639     Convert the table implementations to a new table interface. All
2640     tables use a common mixin class to provide backwards compatibility
2641     until all table users have been updated.
2642    
2643     * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
2644     provide backwards compatibility for table classes implementing the
2645     new interface
2646     (DBFTable, MemoryTable): Implement the new table interface. Use
2647     OldTableInterfaceMixin as base for compatibility
2648     (DBFColumn, MemoryColumn): New. Column description for DBFTable
2649     and MemoryTable resp.
2650    
2651     * test/test_dbf_table.py: New. Test cases for the DBFTable with
2652     the new table interface.
2653    
2654     * test/test_memory_table.py: New. Test cases for the MemoryTable
2655     with the new table interface.
2656    
2657     * test/test_table.py: Document the all tests in this file as only
2658     for backwards compatibility. The equivalent tests for the new
2659     interface are in test_memory_table.py and test_dbf_table.py
2660     (MemoryTableTest.test_read): field_info should be returning tuples
2661     with four items
2662     (MemoryTableTest.test_write): Make doc-string a more precise.
2663    
2664     * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
2665     table interface. Derive from from OldTableInterfaceMixin for
2666     compatibility.
2667     (TransientTableBase.create): New intance variable column_map to
2668     map from names and indices to column objects
2669     (TransientTable.create): Use the new table interface of the input
2670     table
2671     (AutoTransientTable): Convert to new table interface. Derive from
2672     from OldTableInterfaceMixin for compatibility.
2673     (AutoTransientTable.write_record): Removed. It's not implemented
2674     yet and we still have to decide how to handle writing with the new
2675     table and data framework.
2676    
2677     * test/test_transientdb.py
2678     (TestTransientTable.run_iceland_political_tests)
2679     (TestTransientTable.test_transient_joined_table): Use the new
2680     table interface
2681    
2682 jonathan 817 2003-05-05 Jonathan Coles <[email protected]>
2683    
2684     This is namely a collection of UI updates to improve user interactivity.
2685     Tabbing between controls now exists and you can use ESC to close dialog
2686     boxes; ENTER will active the default button.
2687    
2688     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
2689     order that the controls are created so that tabbing works correctly.
2690     (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
2691     wxDialog can handle the default button correctly.
2692     (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
2693     same reasons as for OnOK.
2694     (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
2695     when we ask the table for the maximum/minimum values of a field
2696     which could take a very long time.
2697    
2698     * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
2699     order that the controls are created so that tabbing works correctly.
2700     (SelectPropertiesDialog.__init__): Rearrange the order that the
2701     controls are created so that tabbing works correctly.
2702    
2703     * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
2704     to derive from a wxDialog but behave like the original implementation
2705     which was derived from a wxFrame. wxDialog provides useful key
2706     handling functionality like ESC calling OnCancel and ENTER calling
2707     OnOK which is lost with wxFrame.
2708    
2709     * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
2710     new dialogs.
2711    
2712     * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
2713     order that the controls are created so that tabbing works correctly.
2714     (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
2715     (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
2716     (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
2717     (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
2718     can provide the "UK National Grid" as a default projection.
2719     (UTMPanel.__init__): Rearrange the order that the controls are
2720     created so that tabbing works correctly.
2721    
2722 bh 809 2003-05-05 Bernhard Herzog <[email protected]>
2723    
2724 bh 811 * extensions/thuban/wxproj.cpp: Fix some of the comments.
2725     (project_point): If a map projection but no layer projection is
2726     given, convert degrees to radians before applying the map
2727     projection.
2728    
2729 bh 809 * Thuban/UI/tableview.py (TableGrid.disallow_messages)
2730     (TableGrid.allow_messages): New methods to make it possible to
2731     inhibit message sending.
2732     (TableGrid.issue): Only send the message if not inhibited.
2733     (LayerTableGrid.select_shape): Use the new methods to make sure
2734     that no ROW_SELECTED message is sent while we're updating the
2735     selected rows to match the selected shapes.
2736    
2737 jan 807 2003-05-02 Jan-Oliver Wagner <[email protected]>
2738    
2739     Implementation of MemoryTable.
2740    
2741     * Thuban/Model/table.py (MemoryTable): New. Quite simple table
2742     implementation that operates on a list of tuples. All of the data
2743     are kept in the memory.
2744    
2745     * test/test_table.py (MemoryTableTest): New.
2746    
2747     * test/test_transientdb.py (SimpleTable): Removed.
2748     (TestTransientTable.test_transient_joined_table,
2749     (TestTransientTable.test_transient_table_read_twice): Replaced
2750     SimpleTable by MemoryTable.
2751    
2752 jonathan 793 2003-04-30 Jonathan Coles <[email protected]>
2753    
2754 jonathan 803 * Data/iceland_sample.thuban: Now contains correct projections
2755     for each of the layers.
2756    
2757     * Resources/Projections/defaults.proj: Geographic projection
2758     contains unit conversion parameter.
2759    
2760     2003-04-30 Jonathan Coles <[email protected]>
2761    
2762 jonathan 793 The most important part of this putback is the projection changes.
2763     It should now be possible to specify the projection that a layer
2764     is in and then specify a different projection for the map. The
2765     projection dialog has an extra parameter for a geographic projection
2766     which lets the user select if the input is in degrees or radians.
2767    
2768     * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
2769     to say that the parameter is a tuple of unprojected
2770     points (which is what the callers to this method were assuming).
2771     Also, since the points are unprojected we need to projected them.
2772    
2773     * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
2774     LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
2775     groups are selected, move the layer up/down. Fixes RTbug #1833.
2776    
2777     * Thuban/UI/mainwindow.py: Move menu item map_rename up.
2778    
2779     * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
2780     parameter in call to SetClientData.
2781     (GeoPanel): Add support for selecting the units that the
2782     source data is in (Radians or Degrees).
2783    
2784     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
2785     the rendering loop by reducing the number of if's, removing the
2786     unnecessary try/except block, and checking if the old group
2787     is the same as the new one (which happens a lot if there is
2788     no classification, or lots of shapes are in the same group).
2789    
2790     * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
2791     around the redraw routine to try to catch problems that the user
2792     may create by selecting invalid projections for the data set and
2793     map. Clears the display if there are any problems and prints the
2794     error.
2795     (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
2796     rectangle.
2797    
2798     * extensions/thuban/wxproj.cpp (project_point): First invert the
2799     supplied point (which should be in projected coordinates) using
2800     the layer's projection and then project the point using the
2801     map's projection.
2802     (project_points): Use project_point() to project each point.
2803    
2804 jan 792 2003-04-30 Jan-Oliver Wagner <[email protected]>
2805    
2806     * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
2807     don't set the Classification to None if the classfication field
2808     is None (ie only a DEFAULT).
2809    
2810 bh 786 2003-04-30 Bernhard Herzog <[email protected]>
2811    
2812 bh 790 * Thuban/UI/view.py: Fix some typos.
2813    
2814 bh 788 * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
2815     not pop up the dialog if the selection becomes empty (this could
2816     happen if e.g. a new selection is opened while the identify tool
2817     is active and dialog had been closed)
2818    
2819     2003-04-30 Bernhard Herzog <[email protected]>
2820    
2821 bh 786 * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
2822     instance variable read_record_last_result
2823     (TransientTableBase.read_record): Make sure reading the same
2824     record twice works. The implementation uses the new instance
2825     variable read_record_last_result
2826    
2827     * test/test_transientdb.py
2828     (TestTransientTable.test_transient_table_read_twice): New test
2829     case for the above bug-fix.
2830    
2831 jonathan 793 2003-04-29 Jonathan Coles <[email protected]>
2832    
2833     * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
2834    
2835     * Thuban/UI/classgen.py: Remove all uses of Str2Num.
2836    
2837     * Thuban/UI/classifier.py: Remove all uses of Str2Num.
2838     (ClassTable.SetValueAsCustom): Rename keyword argument in
2839     ClassGroup* constructors to match argument name.
2840    
2841 bh 779 2003-04-29 Bernhard Herzog <[email protected]>
2842    
2843     * Thuban/Model/session.py (Session.Destroy): Explicitly close the
2844     transient DB if it exists to make sure it doesn't leave a journal
2845     file in the temp directory.
2846    
2847     * Thuban/Model/transientdb.py (TransientDatabase.close): Set
2848     self.conn to None after closing the connection to make sure it's
2849     not closed twice
2850    
2851 jonathan 767 2003-04-29 Jonathan Coles <[email protected]>
2852    
2853 jonathan 769 Add a visible parameter in the layer XML tag. The default value is
2854     "true". If anything other than "false" is specified we also assume
2855 jonathan 776 "true". Addresses RTbug #1025.
2856 jonathan 769
2857     * Doc/thuban.dtd: Add visible parameter to a layer.
2858    
2859     * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
2860     of visible from 1 to True.
2861     (Layer.__init__): Change default value of visible from 1 to True.
2862    
2863     * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
2864     parameter.
2865    
2866     * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
2867     parameter.
2868    
2869     * test/test_load.py: Add new test data contents_test_visible.
2870     (LoadSessionTest.setUp): save test data.
2871     (LoadSessionTest.testLayerVisibility): Test if the visible flag
2872     is loaded correctly.
2873    
2874     * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
2875     for saving an invisible layer.
2876    
2877     2003-04-29 Jonathan Coles <[email protected]>
2878    
2879 jonathan 767 * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
2880     legend dialog box and tell it to change its map to the one
2881     supplied to SetMap(). Fixes RTbug #1770.
2882    
2883 bh 764 2003-04-29 Bernhard Herzog <[email protected]>
2884    
2885 bh 766 Next step of table implementation. Introduce a transient database
2886     using SQLite that some of the data is copied to on demand. This
2887     allows us to do joins and other operations that require an index
2888     for good performance with reasonable efficiency. Thuban now needs
2889     SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
2890     haven't tested that.
2891    
2892     * Thuban/Model/transientdb.py: New. Transient database
2893     implementation.
2894    
2895     * test/test_transientdb.py: New. Tests for the transient DB
2896     classes.
2897    
2898     * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
2899     classes to help automatically remove temporary files and
2900     directories.
2901     (Session.__init__): New instance variables temp_dir for the
2902     temporary directory and transient_db for the SQLite database
2903     (Session.temp_directory): New. Create a temporary directory if not
2904     yet done and return its name. Use AutoRemoveDir to have it
2905     automatically deleted
2906     (Session.TransientDB): Instantiate the transient database if not
2907     done yet and return it.
2908    
2909     * Thuban/Model/data.py (ShapefileStore.__init__): Use an
2910     AutoTransientTable so that data is copied to the transient DB on
2911     demand.
2912     (SimpleStore): New class that simply combines a table and a
2913     shapefile
2914    
2915     * Thuban/Model/table.py (Table, DBFTable): Rename Table into
2916     DBFTable and update its doc-string to reflect the fact that this
2917     is only the table interface to a DBF file. Table is now an alias
2918     for DBFTable for temporary backwards compatibility.
2919    
2920     * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
2921     the last reference to the session goes away so that the temporary
2922     files are removed properly.
2923    
2924     * test/test_load.py (LoadSessionTest.tearDown): Remove the
2925     reference to the session to make sure the temporary files are
2926     removed.
2927    
2928     2003-04-29 Bernhard Herzog <[email protected]>
2929    
2930 bh 764 * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
2931     the __parser instance variable into a normal local variable in
2932     read. It's only used there and read will never be called more than
2933     once. Plus it introduces a reference cycle that keeps can keep the
2934     session object alive for a long time.
2935    
2936 jonathan 767 2003-04-29 Jonathan Coles <[email protected]>
2937 jonathan 735
2938 jonathan 762 * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
2939     Projection an immutable item. Fixes RTbug #1825.
2940     (Projection.__init__): Initialize instance variables here.
2941     (ProjFile.Replace): New. Replace the given projection object with
2942     the new projection object. This solves the problem of needing the
2943     mutator Projection.SetProjection() in the ProjFrame class and
2944     allows a projection to change parameters without changing its
2945     location in the file.
2946    
2947     * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
2948     be of type wxSAVE and should verify overwriting a file.
2949    
2950     * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
2951     ProjFile.Replace() method instead of the mutator
2952     Projection.SetProjection(). Also requires that we reassign the
2953     client data to the new projection.
2954    
2955     * test/test_proj.py (TestProjection.test): Test GetName() and
2956     GetAllParameters()
2957     (TestProjFile.test): Remove tests for Set*() methods. Add tests
2958     for Replace().
2959    
2960     2003-04-25 Jonathan Coles <[email protected]>
2961    
2962 jonathan 756 * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
2963     to save the name of the projection.
2964    
2965     * test/test_save.py (SaveSessionTest.testLayerProjection): New
2966     test to verify layer projections are saved correctly.
2967    
2968     2003-04-25 Jonathan Coles <[email protected]>
2969    
2970 jonathan 753 * Thuban/Model/proj.py (Projection.SetName): Set the name
2971     to "Unknown" if name is None.
2972     (Projection.SetAllParameters): New. Set the projection's
2973     parameter list to the one supplied.
2974     (Projection.SetProjection): New. Set the projection's
2975     properties to those of the supplied Projection.
2976    
2977     * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
2978     the dialog title to include the map's title.
2979     (MainWindow.LayerProjection): Set the dialog title to include
2980     the layer's title.
2981    
2982     * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
2983     error dialogs into a single method call.
2984     (ProjFrame.__VerifyButtons): Add more states to check.
2985     (ProjFrame.__GetProjection): Return the current state of an
2986     edited projection or None.
2987     (ProjFrame.__FillAvailList): Remove checks for states that
2988     shouldn't exist.
2989     (ProjFrame._OnNew): Clear all selected items and supply
2990     a projection panel if necessary.
2991    
2992     * test/test_proj.py (TestProjFile.test): Add tests for
2993     ProjFile.SetAllParameters, ProjFile.SetProjection,
2994     ProjFile.SetName.
2995    
2996     2003-04-25 Jonathan Coles <[email protected]>
2997    
2998 jonathan 748 * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
2999     takes an optional argument to select the current projection.
3000     This does not guarantee that the item is visible due to
3001     limited wxWindows functionality. Fixes RTBug #1821.
3002    
3003     2003-04-25 Jonathan Coles <[email protected]>
3004    
3005 jonathan 743 * Thuban/Model/load.py (SessionLoader.start_projection): Remember
3006     the projection name and use it when constructing the Projection
3007     object.
3008    
3009     * Thuban/Model/proj.py (Projection.__init__): Change the default
3010     value for 'name' to None and then test if name is equal to None
3011     in the body of the constructor. This way the caller doesn't have to
3012     know what the default value should be. Namely, useful in load.py
3013     where we have to pick a default value if the 'name' parameter
3014     doesn't exist in the XML file.
3015    
3016     * test/test_load.py (LoadSessionTest.testLayerProjection): New.
3017     Tests a file where a layer has a projection.
3018    
3019     2003-04-25 Jonathan Coles <[email protected]>
3020    
3021 jonathan 735 * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
3022     tree for projection information.
3023    
3024     * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
3025     XMLReader.GetFileName.
3026     (SessionLoader): Added support for loading projection tags that
3027     appear inside a layer.
3028    
3029     * Thuban/Model/proj.py (ProjFile): Document the class. Move
3030     back to using a list because the order of the projections in
3031     the file is important to maintain. Fixes RTbug #1817.
3032    
3033     * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
3034     to ProjFile.GetFilename.
3035    
3036     * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
3037     information.
3038    
3039     * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
3040     ProjFrame._OnSaveAs. Removed old dead code from previous
3041     implementation.
3042     (ProjFrame._OnExport): Add support for exporting more than one
3043     projection to a single file.
3044     (ProjFrame.__FillAvailList): use string formatting (% operator)
3045     to build strings that are (partly) translated. Fixes RTbug #1818.
3046    
3047     * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
3048     class.
3049    
3050 bh 734 2003-04-24 Bernhard Herzog <[email protected]>
3051    
3052     * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
3053    
3054     * po/fr.po: New. French translation by Daniel Calvelo Aros
3055    
3056     * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
3057     empty strings.
3058    
3059 jonathan 735 2003-04-24 Jonathan Coles <[email protected]>
3060 jonathan 724
3061     * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
3062     implement the interface that the ProjFrame dialog expects.
3063    
3064     * Thuban/Model/proj.py (Projection.SetName): New. Allows the
3065     name of the projection to be changed.
3066     (ProjFile): Use a dictionary instead of a list so that removing
3067     projections is easier and we are sure about uniqueness.
3068     (ProjFile.Remove): Remove the given projection object.
3069    
3070     * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
3071     Return a list with only one projection file instead of searching for
3072     any projection file. This simplifies many things if the user can
3073     only have one system file and one user file.
3074    
3075     * Thuban/UI/classgen.py: Change all references to
3076     genCombo to genChoice.
3077    
3078     * Thuban/UI/mainwindow.py: Add a Projection option under the
3079     layer menu.
3080     (MainWindow.LayerProjection): New. Open up a projection window
3081     for a layer.
3082    
3083     * Thuban/UI/projdialog.py: Large changes to how the dialog is
3084     laid out. Use three panels instead of one. One for the list of
3085     projections, one for the edit controls, and one for the buttons.
3086     Fixed resizing problems so that the dialog resizes correctly
3087     when the projection panel changes. Added import/export, save, and
3088     new buttons/functionality.
3089    
3090 bh 723 2003-04-24 Bernhard Herzog <[email protected]>
3091    
3092     First step towards table management. Introduce a simple data
3093     abstraction so that we replace the data a layer uses more easily
3094     in the next step.
3095    
3096     * Thuban/Model/data.py: New file with a simple data abstraction
3097     that bundles shapefile and dbffile into one object.
3098    
3099     * Thuban/Model/session.py (Session.OpenShapefile): New method to
3100     open shapefiles and return a shape store object
3101    
3102     * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
3103     object instead of a shapefile filename. This introduces a new
3104     instance variable store holding the datastore. For intermediate
3105     backwards compatibility keep the old instance variables.
3106     (open_shapefile): Removed. No longer needed with the shape store.
3107     (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
3108     get the shape store used by a layer.
3109     (Layer.Destroy): No need to explicitly destroy the shapefile or
3110     table anymore.
3111    
3112     * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
3113     (MainWindow.AddLayer): Use the session's OpenShapefile method to
3114     open shapefiles
3115    
3116     * Thuban/Model/load.py (ProcessSession.start_layer): Use the
3117     session's OpenShapefile method to open shapefiles
3118    
3119     * test/test_classification.py
3120     (TestClassification.test_classification): Use the session's
3121     OpenShapefile method to open shapefiles and build the filename in
3122     a more platform independed way
3123    
3124     * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
3125     Implement to have a session to use in the tests
3126     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
3127     (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
3128     session's OpenShapefile method to open shapefiles
3129     (TestLayerLegend.setUp): Instantiate a session so that we can use
3130     it to open shapefiles.
3131     (TestLayerLegend.tearDown): Make sure that all references to
3132     layers and session are removed otherwise we may get a resource
3133     leak
3134    
3135     * test/test_map.py (TestMapAddLayer.test_add_layer)
3136     (TestMapWithContents.setUp): Instantiate a session so that we can
3137     use it to open shapefiles.
3138     (TestMapWithContents.tearDown): Make sure that all references to
3139     layers, maps and sessions are removed otherwise we may get a
3140     resource leak
3141     ("__main__"): use support.run_tests() so that more info about
3142     uncollected garbage is printed
3143    
3144     * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
3145     session's OpenShapefile method to open shapefiles
3146     ("__main__"): use support.run_tests() so that more info about
3147     uncollected garbage is printed
3148    
3149     * test/test_selection.py (TestSelection.tearDown): Make sure that
3150     all references to the session and the selection are removed
3151     otherwise we may get a resource leak
3152     (TestSelection.get_layer): Instantiate a session so that we can
3153     use it to open shapefiles.
3154     ("__main__"): use support.run_tests() so that more info about
3155     uncollected garbage is printed
3156    
3157     * test/test_session.py (TestSessionBase.tearDown)
3158     (TestSessionWithContent.tearDown): Make sure that all references
3159     to the session and layers are removed otherwise we may get a
3160     resource leak
3161     (TestSessionWithContent.setUp): Use the session's OpenShapefile
3162     method to open shapefiles
3163    
3164 jonathan 721 2003-04-24 Jonathan Coles <[email protected]>
3165    
3166     * Thuban/Model/load.py (XMLReader.read): Should have been checking
3167     if the file_or_filename object had the 'read' attribute.
3168    
3169 jonathan 715 2003-04-23 Jonathan Coles <[email protected]>
3170    
3171 jonathan 720 * Thuban/Model/resource.py: Fixes RTbug #1813.
3172     (ReadProjFile): Add documentation about which exceptions are raised.
3173     Always pass the exceptions up to the caller.
3174     (GetProjFiles): If the directory can't be read return an empty list.
3175     If any of the proj files can't be read skip that file and go
3176     on to the next one.
3177    
3178     * test/test_proj.py: Added test cases to handle nonexistent files,
3179     unreadable files, and files that don't parse correctly.
3180    
3181     2003-04-23 Jonathan Coles <[email protected]>
3182    
3183 jonathan 716 Projection dialog. Allows the user to select from a list
3184     of projection templates and optionally edit them and save new ones.
3185    
3186     * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
3187     (ProjPanel): Base class for projection specific panels.
3188     (TMPanel): Projection panel for Transverse Mercartor.
3189     (UTMPanel): Projection panel for Universal Transverse Mercartor.
3190     (LCCPanel): Projection panel for Lambert Conic Conformal.
3191     (GeoPanel): Projetion panel for Geographic Projection.
3192    
3193     2003-04-23 Jonathan Coles <[email protected]>
3194    
3195 jonathan 715 * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
3196     promote symmetry. There now exists XMLReader and XMLWriter.
3197     (XMLReader.read): New. Call to read the given file descriptor or
3198     filename.
3199     (XMLReader.close): New. Make sure the file is closed.
3200     (XMLReader.GetFileName): New. Return just the file name that is being
3201     read from.
3202     (XMLReader.GetDirectory): New. Return just the directory of the file
3203     that is being read.
3204     (XMLReader.AddDispatchers): New. Take a dictionary which contains
3205     the names of functions to call as the XML tree is parsed.
3206     (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
3207     (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
3208     (SessionLoader): Removed class variables start_dispatcher and
3209     end_dispatcher since this functionality is now part of a class
3210     instance. Fixes RTbug #1808.
3211     (SessionLoader.__init__): Add dispatcher functions.
3212     (load_xmlfile): Code was moved into the XMLReader.read().
3213     (load_session): Use modified SessionLoader.
3214    
3215     * Thuban/Model/map.py (Map.GetProjection): New. Returns the
3216     map's projection.
3217    
3218     * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
3219     GetAllParameters.
3220     (Projection.GetParameter): Returns the value for the given parameter.
3221    
3222     * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
3223     (GetProjFiles): Renamed from GetProjections. Now returns a list
3224     of ProjFile objects.
3225     (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
3226     a list of ProjFile objects whose files are not user defined.
3227     (GetUserProjFiles): Renamed from GetUserProjections. Returns a
3228     list of ProjFile objects whose files are user defined.
3229     (ProjFileReader): Extend new XMLReader.
3230    
3231     * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
3232     promote symmetry.
3233    
3234     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
3235     control instead of a wxComboBox. wxChoice controls do not generate
3236     events as the uses highlights possible choices which fixes problems
3237     with resizing the dialog when the use selects an option.
3238    
3239     * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
3240     control instead of a wxComboBox.
3241    
3242     * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
3243     dialog.
3244    
3245     * test/test_proj.py (TestProjection.test): New tests for GetParameter
3246     method.
3247    
3248 bh 703 2003-04-22 Bernhard Herzog <[email protected]>
3249    
3250 bh 705 * Thuban/UI/mainwindow.py: Remove some unused imports and global
3251     constants
3252    
3253 bh 703 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
3254     (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
3255    
3256 bh 700 2003-04-17 Bernhard Herzog <[email protected]>
3257    
3258 bh 701 * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
3259     (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
3260     anymore.
3261     (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
3262     (Layer.ShapeType, Layer.Shape): No need to call
3263     self.open_shapefile since it's always called in __init__
3264    
3265 bh 700 * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
3266     In wxPython 2.4 there's no need to extend MainLoop anymore since
3267     wxPython itself makes sure OnExit is called.
3268    
3269 jonathan 688 2003-04-16 Jonathan Coles <[email protected]>
3270    
3271 jonathan 693 Initial putback of projection management code. Includes new
3272     classes to read and write projection files. The current load
3273     and save classes were abstracted a bit so they could be reused.
3274     The Projection class was extended to provide new methods and
3275     have a name.
3276    
3277     * Thuban/Model/load.py (XMLProcessor): New. Contains all the
3278     general XML reading methods that were part of ProcessSession.
3279    
3280     * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
3281     name.
3282     (ProjFile): New. Represents a file that contains projection
3283     information.
3284    
3285     * Thuban/Model/resource.py: New. Contains general utilities
3286     for read and writing projection files.
3287    
3288     * Thuban/Model/save.py (XMLSaver): New. Contains all the
3289     general XML writing methods that were part of SessionSaver.
3290     (SessionSaver): Renamed from Saver.
3291    
3292     * test/test_proj.py: New test cases for the projection
3293     file read and write functions.
3294    
3295     2003-04-16 Jonathan Coles <[email protected]>
3296    
3297 jonathan 688 * Thuban/Model/classification.py: Use repr() around values
3298     in the ClassGroup*.__repr__() methods so it is clearer when
3299     a value is a string and when it is a number.
3300    
3301     * test/test_load.py: Rework the classification test to test
3302     that we can load old files.
3303     (testLabels): Test a file where the groups have labels.
3304    
3305 bh 687 2003-04-16 Bernhard Herzog <[email protected]>
3306    
3307     Safer implementation of the performance enhancements of the
3308     low-level renderer:
3309    
3310     * extensions/thuban/wxproj.cpp (extract_projection)
3311     (extract_pointer): Rename extract_projection to extract_pointer
3312     and redefine its purpose to return the pointer stored in a CObject
3313     returned by the object's cobject method. Update all callers.
3314     (s_draw_info, free_draw_info, draw_polygon_init): Implement the
3315     handling of these low-level parameters so that each s_draw_info
3316     instance is handled as a CObject at python level that also
3317     contains real references to the actual python objects which
3318     contain the values in the struct. Add free_draw_info as the
3319     destructor.
3320     (draw_polygon_shape): Add the py_draw_info parameter which must a
3321     cobject containing an s_draw_info pointer.
3322    
3323     * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
3324     method to instantiat the low-level render parameter
3325     (MapRenderer.draw_shape_layer): Use the new method. Remove some
3326     commented out code.
3327     (MapRenderer.draw_polygon_shape): Make the first parameter not the
3328     layer but the low-level render parameter
3329     (ScreenRenderer.draw_shape_layer): Use the low-level render
3330     parameter.
3331    
3332 jonathan 673 2003-04-15 Jonathan Coles <[email protected]>
3333    
3334 jonathan 680 * Thuban/Model/classification.py: Implemented __repr__ for
3335     the ClassGroup* classes to make debugging a bit easier.
3336     (ClassGroup.SetLabel): Check that the string is an instance
3337     of StringTypes not StringType. Accounts for Unicode strings.
3338    
3339     * Thuban/Model/color.py: Implemented __repr__ to make
3340     debugging a bit easier.
3341    
3342     * Thuban/Model/save.py (Saver.write_classification): Need to
3343     save the group label.
3344    
3345     * test/test_load.py (testClassification): New. Loads the
3346     iceland_sample_test.thuban file and checks if it was loaded
3347     correctly.
3348    
3349     2003-04-15 Jonathan Coles <[email protected]>
3350    
3351 jonathan 673 * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
3352     to improve rendering performance by initializing the variables
3353     that are not change each time draw_polygon_shape() is called.
3354     The values are stored in a global struct draw_info.
3355     (draw_polygon_shape): Removed initialization code that is
3356     now in draw_polygon_init().
3357    
3358     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
3359 jonathan 674 drawing initialization call to draw_polygon_init()
3360     (MapRenderer.draw_polygon_shape): Use new signature of
3361     draw_polygon_shape.
3362 jonathan 673
3363 jonathan 674 * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
3364     weirdness by setting the range to (1, maxint).
3365 jonathan 673
3366 jonathan 674 * Thuban/Model/classification.py (ClassGroupProperties): Make
3367     instance variables private and optimize comparison operator
3368     by first checking if the color references are the same.
3369     (ClassGroupSingleton): Make instance variables private.
3370     (ClassGroupRange): Make instance variables private.
3371 jonathan 673
3372 jonathan 674 * HOWTO-Release: Filled in missing steps for releasing packages.
3373    
3374 bh 672 2003-04-15 Bernhard Herzog <[email protected]>
3375    
3376     First stab at internationalized messages:
3377    
3378     * Thuban/__init__.py (_): Implement the translation function for
3379     real using the python gettext module.
3380    
3381     * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
3382     translate empty strings.
3383    
3384     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
3385     Add a missing space to a warning message
3386    
3387     * po/README: New. Notes about the management of the translation
3388     files.
3389    
3390     * po/Makefile: New. Makefile to help manage the translation files.
3391    
3392     * po/es.po: New. Spanish translation by Daniel Calvelo Aros
3393    
3394     * MANIFEST.in: Include the *.mo files in Resources/Locale and the
3395     translations and support files in po/
3396    
3397     * setup.py (data_files): Add the *.mo files to the data_files too
3398    
3399     * README: Add note about the translations when building from CVS
3400    
3401 jonathan 669 2003-04-14 Jonathan Coles <[email protected]>
3402    
3403     * Thuban/UI/dock.py: Fixes some window resizing problems most
3404     noticable under windows. Always assume the button bitmaps will
3405     be there. Code clean up.
3406     (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
3407     images for the dock/undock button to the same images.
3408     Work around for RTbug #1801.
3409    
3410     * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
3411     be allowed to grow within the sizer. Fixes a bug under Windows
3412     where the toolbar wasn't being drawn.
3413    
3414 frank 664 2003-04-14 Frank Koormann <[email protected]>
3415    
3416     * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
3417     Updated design to try to make the button functionality more
3418     transparent.
3419    
3420 jonathan 662 2003-04-14 Jonathan Coles <[email protected]>
3421    
3422     * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
3423     finalize the intialization of the panel.
3424    
3425     * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
3426     creation of the panel. Should be the last thing called in the
3427     initializer of a subclass.
3428    
3429     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
3430     set the current selections in the combo boxes. This is needed
3431     under Windows.
3432    
3433     * Thuban/UI/classifier.py (Classifier.__init__): Add a top
3434     level panel to the dialog so that the background colors are
3435     consistent under Windows.
3436    
3437 jonathan 646 2003-04-11 Jonathan Coles <[email protected]>
3438    
3439 jonathan 662 * Thuban/UI/classgen.py: Change color ramps to start at white
3440     not black.
3441    
3442     * Thuban/UI/legend.py: Enable/disable the legend buttons when
3443     the legend changes. Fixes RTbug #1793.
3444    
3445     * test/test_classification.py: Added test for copying of
3446     classifications.
3447    
3448     2003-04-11 Jonathan Coles <[email protected]>
3449    
3450 jonathan 647 * Thuban/UI/resource.py: New. Centralize the loading of resources
3451     such as bitmaps.
3452    
3453     * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
3454     added images to the move buttons, added 'reverse' button.
3455     (CustomRampPanel.__init__): Added images to the move buttons.
3456     (GreyRamp): New. Generates a ramp from white to black.
3457     (HotToColdRamp): New. Generates a ramp from cold to hot colors.
3458    
3459     * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
3460     ID_PROPERTY_*.
3461     (Classifier.__init__): Minor changes to the layout.
3462     (Classifier._OnTitleChanged): Listen for when the user edits the
3463     title and update the dialog's title and the layer's title.
3464    
3465     * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
3466    
3467     * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
3468     (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
3469     if the layer's title changes.
3470    
3471     * Thuban/UI/mainwindow.py: Added new menu item and associated code
3472     to open a dialog to rename the map.
3473     (MainWindow): Use new resource class to import bitmaps.
3474    
3475     2003-04-11 Jonathan Coles <[email protected]>
3476    
3477 jonathan 646 * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
3478 jonathan 647 Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
3479     Resources/Bitmaps/group_use_none.xpm,
3480     Resources/Bitmaps/group_use_not.xpm,
3481     Resources/Bitmaps/hide_layer.xpm,
3482     Resources/Bitmaps/layer_properties.xpm,
3483     Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
3484     Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
3485     New.
3486 jonathan 646
3487 jonathan 636 2003-04-10 Jonathan Coles <[email protected]>
3488    
3489 jonathan 644 * Thuban/Model/classification.py: (ClassGroupRange.__init__):
3490     Should pass group to ClassGroup constructor.
3491    
3492     2003-04-10 Jonathan Coles <[email protected]>
3493    
3494 jonathan 636 * Thuban/Model/classification.py: (ClassGroup): Move all the common
3495     methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
3496     here. Implement SetVisible(), IsVisible().
3497     (ClassGroup.__init__): Add group parameter which acts as a copy
3498     constructor.
3499    
3500     * Thuban/UI/classifier.py (ClassTable): Add a new column for the
3501     "Visible" check boxes.
3502     (Classifier): Rename the buttons and refactor the code to match
3503     the new labels.
3504    
3505     * Thuban/UI/legend.py: Classify button is now called "Properties".
3506     Refactored the code to change variable names.
3507     (LegendTree.__FillTreeLayer): Only list a group if it is visible.
3508    
3509     * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
3510     MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
3511     renamed to MainWindow.LayerEditProperties.
3512     (MainWindow.ToggleLegend): Don't include map name in legend title.
3513     (MainWindow.SetMap): Added the map name to the window title.
3514     (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
3515     MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
3516     Functionality is found in the layer properties dialog.
3517    
3518     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
3519     draw visible groups.
3520    
3521 jonathan 626 2003-04-09 Jonathan Coles <[email protected]>
3522    
3523 jonathan 634 * Thuban/UI/classgen.py: Modifications to allow simple
3524     addition and selection of new color schemes.
3525     (MonochromaticRamp): New. Generates a ramp between two colors.
3526     (RedRamp): New. Generates a ramp of all red.
3527     (GreenRamp): New. Generates a ramp of all green.
3528     (BlueRamp): New. Generates a ramp of all blue.
3529    
3530     2003-04-09 Jonathan Coles <[email protected]>
3531    
3532 jonathan 626 * Thuban/Model/classification.py (Classification.__deepcopy__):
3533     Need to copy over field and fieldType attributes.
3534    
3535     * Thuban/Model/table.py (Table.field_range): New. Retrive the
3536     maximum and minimum values over the entire table for a given
3537     field.
3538     (Table.GetUniqueValues): New. Retrieve all the unique values
3539     in the table for a given field.
3540    
3541     * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
3542     (GenUniquePanel): New. Controls to allow the user to select
3543     which unique field values they would like in the classification.
3544     (CustomRampPanel): Code that was in ClassGenDialog that allows
3545     the user to select the properties for a custom ramp.
3546     (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
3547    
3548     * Thuban/UI/classifier.py: Removed a lot of debugging code.
3549     (Classifier._SetClassification): Callback method so that the
3550     class generator can set the classification in the grid.
3551     (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
3552     editing of a group properties class into a wxWindows control.
3553    
3554     * Thuban/UI/dock.py: It was decided that if the user closes
3555     a dockable window the window should simply hide itself. That
3556     way if the user wants to show the dock again it appears in the
3557     same place as it was when it was closed.
3558     (DockableWindow.Destroy): Call renamed method OnDockDestroy().
3559     (DockableWindow._OnButtonClose): Hide the window instead of
3560     destroying it.
3561     (DockableWindow._OnClose): Hide the window instead of
3562     destroying it.
3563    
3564     * Thuban/UI/legend.py (LegendTree): Use a private method to
3565     consistently set the font and style of the text. Fixes RTbug #1786.
3566    
3567     * Thuban/UI/mainwindow.py: Import just the Classifier class.
3568    
3569 bh 623 2003-04-07 Bernhard Herzog <[email protected]>
3570    
3571 bh 625 * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
3572     to the map module
3573    
3574     2003-04-07 Bernhard Herzog <[email protected]>
3575    
3576 bh 623 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
3577     favor of ToggleSessionTree
3578     (MainWindow.ToggleSessionTree): New method to toggle visibility of
3579     the session tree.
3580     (MainWindow.SessionTreeShown): New method to return whether the
3581     session tree is currently shown.
3582     (MainWindow.ToggleLegend): New method to toggle visibility of the
3583     legend
3584     (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
3585     LegendShown
3586     (MainWindow.LegendShown): New method to return whether the legend
3587     is currently shown.
3588     (_method_command): Add checked parameter so we can define check
3589     menu items
3590     (_has_tree_window_shown, _has_legend_shown): Use the appropriate
3591     mainwindow methods.
3592     (show_session_tree, show_legend commands): Removed.
3593     (toggle_session_tree, toggle_legend commands): New commands to
3594     toggle the visibility of the dialogs
3595    
3596 jonathan 612 2003-04-07 Jonathan Coles <[email protected]>
3597    
3598 jonathan 619 * Thuban/UI/classgen.py: Fix Windows problem.
3599    
3600     * Thuban/UI/dock.py: Fix Windows problem.
3601    
3602     * Thuban/UI/mainwindow.py: Use False instead of false.
3603     (MainWindow.ShowLegend): Remove unnecessary switch parameter.
3604    
3605     2003-04-07 Jonathan Coles <[email protected]>
3606    
3607 jonathan 612 Since we now say that the order of the groups in a classification
3608     matters, it makes sense to be able to manipulate that order. Most
3609     of the changes to Thuban/Model/classification.py are to that end.
3610    
3611     * Thuban/Model/classification.py (Classification.AppendGroup,
3612     Classification.InsertGroup, Classification.ReplaceGroup,
3613     Classification.RemoveGroup, Classification.GetGroup): Do as the
3614     names imply.
3615     (Classification.FindGroup): This was called GetGroup, but GetGroup
3616     takes an index, while FindGroup takes a value.
3617     (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
3618     REFERENCE. Currently there is a cyclic reference between the layer
3619     and its classification. If the classification doesn't need to know
3620     its owning layer we can change this, since it may make sense to be
3621     able to use the same classification with different layers.
3622    
3623     * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
3624    
3625     * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
3626     not AddGroup()
3627    
3628     * Thuban/UI/classifier.py: Now that we can depend on the order in
3629     a Classification and have methods to manipulate that order we don't
3630     need to use our own data structures in the grid. We can simply make
3631     the grid/table access the information they need from a copy of
3632     the classification object.
3633     (Classifier._OnCloseBtn): Event handler for when the user clicks
3634     'Close'. This is needed so if the user applies changes and then
3635     continues to change the table the user has the option of discarding
3636     the most recent changes and keeping what they applied.
3637    
3638     * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
3639     into the same group.
3640    
3641     * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
3642     with a really old version of proj, PJ_VERSION won't even be defined.
3643     If it isn't defined then just compile so that the function always
3644     returns Py_False.
3645    
3646     * test/test_classification.py: Fix tests to use the renamed methods.
3647     Still need to write tests for the new methods.
3648    
3649 jonathan 601 2003-04-04 Jonathan Coles <[email protected]>
3650 jonathan 608
3651 jonathan 612 * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
3652     call to SetSelection out of the method and before the call
3653     to __SelectField in __init__. This prevents a recursion of events
3654     when _OnFieldSelect is triggered by the user.
3655    
3656     2003-04-04 Jonathan Coles <[email protected]>
3657    
3658 jonathan 608 * Thuban/Model/classification.py: Rename Color.None to
3659     Color.Transparent.
3660     (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
3661     Don't bother copying the color, since Colors are immutable.
3662    
3663     * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
3664     Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
3665     Thuban/UI/renderer.py, Thuban/UI/view.py:
3666     Rename Color.None to Color.Transparent.
3667    
3668     * test/test_classification.py, test/test_load.py: Rename Color.None
3669     to Color.Transparent.
3670    
3671     2003-04-04 Jonathan Coles <[email protected]>
3672 jonathan 603
3673     * Thuban/Model/classification.py: Fix assert calls.
3674     (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
3675     Copy the color parameter rather than hold onto a reference.
3676 jonathan 601
3677 jonathan 603 * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
3678     the color object.
3679     (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
3680     are sure there exists only one refernce to Color.None in the system.
3681     This allows us to use 'is' rather than the comparision functions.
3682    
3683     * Thuban/Model/save.py: Fix assert calls.
3684    
3685     * Thuban/UI/classifier.py: Fix assert calls.
3686     (ClassGrid._OnCellDClick): Call up to the classifier to open the
3687     dialog to edit the groups properties.
3688     (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
3689     correctly if a cell is resized.
3690     (ClassTable.SetClassification): New. Changes the classification
3691     that is in the table.
3692     (ClassTable.__SetRow): Allow groups to be prepended.
3693     (Classifier): New code for opening the EditProperties and
3694     GenerateRanges dialogs.
3695     (SelectPropertiesDialog.__GetColor): Only set the color in the
3696     color dialog if the current color is not None.
3697    
3698     * Thuban/UI/dock.py: Fix assert calls.
3699    
3700     * Thuban/UI/legend.py: Fix assert calls.
3701    
3702     * Thuban/UI/renderer.py: Fix assert calls.
3703    
3704     * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
3705     classifications.
3706     (GenRangePanel): Panel specific to range generation.
3707     (GenSingletonPanel): Panel specific to singleton generation.
3708     (ClassGenerator): Class responsible for actually generating
3709     the classification from the data gathered in the dialog box.
3710     (PropertyRamp): Generates properties whose values range from
3711     a starting property to an ending property.
3712 jonathan 601
3713 bh 600 2003-04-03 Bernhard Herzog <[email protected]>
3714    
3715     * test/support.py (print_garbage_information): New function that
3716     prints information about still connected messages and memory
3717     leaks.
3718     (run_suite): Removed.
3719     (run_tests): New function for use as a replacement of
3720     unittest.main in the test_* files. This one calls
3721     print_garbage_information at the end.
3722    
3723     * test/runtests.py (main): Use support.print_garbage_information
3724    
3725     * test/test_layer.py: Use support.run_tests instead of
3726     unittest.main so we get memory leak information
3727     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
3728     (TestLayer.test_point_layer, TestLayer.test_empty_layer)
3729     (TestLayerLegend.test_visibility): Call the layer's Destroy method
3730     to fix a memory leak.
3731    
3732     * test/test_classification.py: Use support.run_tests instead of
3733     unittest.main so we get memory leak information
3734     (TestClassification.test_classification): Call the layer's Destroy
3735     method to fix a memory leak.
3736    
3737 bh 591 2003-04-02 Bernhard Herzog <[email protected]>
3738    
3739 bh 595 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
3740     Handle the reference counts of the return value and errors in
3741     PyArg_ParseTuple correctly.
3742    
3743 bh 593 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
3744     sure the filename is absolute to avoid problems when saving the
3745     session again
3746    
3747 bh 591 * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
3748    
3749 jonathan 587 2003-04-01 Jonathan Coles <[email protected]>
3750    
3751 jonathan 589 * Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
3752 jonathan 587 that there actually are points in the returned list of points
3753     before trying to index into the list. The list may be empty if
3754     the shape is a Null Shape.
3755    
3756 bh 586 2003-04-01 Bernhard Herzog <[email protected]>
3757    
3758     * test/test_map.py: Don't use from <module> import *
3759    
3760 jonathan 581 2003-04-01 Jonathan Coles <[email protected]>
3761    
3762     * Thuban/Model/session.py: Use LAYER_CHANGED instead of
3763     LAYER_LEGEND_CHANGED
3764    
3765     * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
3766     self.Destroy() to close the window after yesterday's changes.
3767    
3768     * test/test_map.py, test/test_session.py: Fix messages that
3769     are sent from maps and layers.
3770    
3771 jonathan 575 2003-03-31 Jonathan Coles <[email protected]>
3772    
3773     * Thuban/UI/classifier.py: Commented out some debugging statements.
3774     (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
3775     RTbug #1769.
3776    
3777     * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
3778     position (although position doesn't work yet under GTK).
3779     (DockableWindow.Destroy): New. Called when the window must be
3780     closed. Namely needed when the DockFrame closes and must close
3781     its children.
3782     (DockFrame): Listen for EVT_CLOSE and destroy all children.
3783    
3784     * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
3785     when then window is told to close.
3786     (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
3787     comment in source for more info.
3788    
3789     * Thuban/UI/main.py: Show the legend by default when Thuban starts.
3790    
3791     * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
3792     symmetry with other such methods.
3793     (MainWindow.ShowLegend): Show the legend docked by default.
3794    
3795 jonathan 569 2003-03-28 Jonathan Coles <[email protected]>
3796    
3797     * Thuban/UI/classifier.py: Support for highlighting a specific
3798     group within the grid when the classification dialog is opened.
3799     Also contains a lot of debugging printouts which will later
3800     be removed.
3801    
3802     * Thuban/UI/dock.py: Complete rework on the dock code so that
3803     that it is fairly removed from the rest of the Thuban application.
3804     It is easy to add new docks which the rest of the program having
3805     to be aware of them.
3806    
3807     * Thuban/UI/legend.py: Modifications to support selecting a
3808     specific group in the classification dialog. Changed how layers
3809     are drawn when the layer is visible/invisible.
3810    
3811     * Thuban/UI/mainwindow.py: Removed legend specific code and
3812     replaced it with calls to the new dock code.
3813    
3814     * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
3815     to check if scale > 0. Trying to track down a divide by zero.
3816    
3817 jonathan 557 2003-03-26 Jonathan Coles <[email protected]>
3818    
3819 jonathan 567 * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
3820     (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
3821     now part of DockableWindow.
3822     (LegendPanel.DoOnSelChanged): Select the current layer in the
3823     map.
3824     (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
3825     with the selected layer and/or group.
3826    
3827     2003-03-26 Jonathan Coles <[email protected]>
3828    
3829 jonathan 557 This putback contains the code for dockable windows. There is
3830     no support in wxWindows as of this date for windows that can
3831     attach themselves to other windows.
3832    
3833     The current model contains a DockableWindow which has a parent
3834     window for when it is detached and a dock window that it puts
3835     its contents in when it is docked. The contents of a DockableWindow
3836     must be a DockPanel. DockPanel itself derives from wxPanel.
3837    
3838     * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
3839     message, not a LAYER_LEGEND_CHANGED message.
3840    
3841     * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
3842    
3843     * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
3844     as one of the style properties for the fieldTypeText item to
3845     be sure that its size is correct when the text changes.
3846    
3847     * Thuban/UI/dock.py: New. Classes for the DockPanel and
3848     DockableWindow.
3849    
3850     * Thuban/UI/legend.py: Added some more buttons and made the
3851     LegendPanel a DockPanel.
3852    
3853     * Thuban/UI/mainwindow.py: Added sash windows to the main window
3854     and supporting functions for manipulating the sashes.
3855     (MainWindow.ShowLegend): Create a DockableWindow with the
3856     LegendPanel as the contents.
3857    
3858     * Thuban/UI/messages.py: Added DOCKABLE_* messages
3859    
3860     * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
3861     not LAYER_LEGEND_CHANGED, messages.
3862    
3863 jonathan 554 2003-03-25 Jonathan Coles <[email protected]>
3864    
3865     * setup.py: Added custom script bdist_rpm_build_script so that
3866     when the rpm is built the path to wx-config is correct.
3867    
3868     * setup.cfg: Added line saying to use the custom build script
3869    
3870 jonathan 552 2003-03-20 Jonathan Coles <[email protected]>
3871    
3872     Initial implementation of the Legend.
3873    
3874     * Thuban/UI/legend.py: New. Creates a window that shows the map's
3875     Legend information and allows the user to add/modify classifications
3876     and how the layers are drawn on the map.
3877    
3878     * setup.py: New command 'build_docs' which currently uses
3879     happydoc to generate html documentation for Thuban.
3880    
3881     * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
3882     Returns a string which is appropriately describes the group.
3883    
3884     * Thuban/Model/layer.py (Layer.SetClassification): Generate a
3885     LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
3886    
3887     * Thuban/Model/map.py (Map): Rename messages and use new, more
3888     specific, messages.
3889    
3890     * Thuban/Model/messages.py: New message to indicate that a layer's
3891     data has changed (LAYER_CHANGED). New map messages to indicate
3892     when layers have been added/removed/changed or if the stacking order
3893     of the layers has changed.
3894    
3895     * Thuban/Model/session.py: Rename and use new messages.
3896    
3897     * Thuban/UI/classifier.py: Remember if any changes have actually
3898     been applied so that if the dialog is cancelled without an application
3899     of changes we don't have to set a new classification.
3900     (ClassDataPreviewer): Pulled out the window specific code and put it
3901     ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
3902     symbols on any DC.
3903    
3904     * Thuban/UI/mainwindow.py: New code to open the legend.
3905    
3906     * Thuban/UI/view.py: Use new message names.
3907    
3908 jonathan 541 2003-03-19 Jonathan Coles <[email protected]>
3909    
3910     * Thuban/UI/main.py (verify_versions): New. Checks the versions
3911     of Python, wxPython, and some other libraries.
3912    
3913     * extensions/thuban/wxproj.cpp (check_version): Checks the given
3914     version against what wxproj was compiled with.
3915     (check_version_gtk): If wxproj was compiled with gtk then check
3916     the given version against the version of the gtk library
3917     currently being used.
3918    
3919 bh 538 2003-03-14 Bernhard Herzog <[email protected]>
3920    
3921     * test/test_command.py: Run the tests when the module is run as a
3922     script
3923    
3924     2003-03-14 Bernhard Herzog <[email protected]>
3925    
3926     Implement selection of multiple selected shapes in the same layer:
3927    
3928     - Introduce a new class to hold the selection. This basically
3929     replaces the interactor which was nothing more than the
3930     selection anyway. A major difference is of course that the new
3931     selection class supports multiple selected shapes in one layer
3932    
3933     - Move the object that represents the selection from the
3934     application to the canvas. The canvas is a better place than the
3935     application because the selection represents which shapes and
3936     layer of the map displayed by the canvas are selected and
3937     affects how the map is drawn.
3938    
3939     - Make the selection and its messages publicly available through
3940     the mainwindow.
3941    
3942     - The non-modal dialogs do not get a reference to the interactor
3943     anymore as they can simply refer to their parent, the
3944     mainwindow, for the what the interactor had to offer.
3945    
3946     * Thuban/UI/selection.py: New module with a class to represent the
3947     selection.
3948    
3949     * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
3950     these unused messages
3951    
3952     * Thuban/UI/application.py (ThubanApplication.OnInit)
3953     (ThubanApplication.OnExit, ThubanApplication.SetSession): The
3954     interactor is gone now.
3955     (ThubanApplication.CreateMainWindow): There is no interactor
3956     anymore so we pass None as the interactor argument for now for
3957     compatibility.
3958    
3959     * Thuban/UI/view.py (MapCanvas.delegated_messages)
3960     (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
3961     Unsubscribe, delegate messages according to the delegated_messages
3962     class variable.
3963     (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
3964     attributes from instance variables as described with the
3965     delegated_methods class variable.
3966     (MapCanvas.__init__): New instance variable selection holding the
3967     current selection
3968     (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
3969     pass them on to the renderer
3970     (MapCanvas.SetMap): Clear the selection when a different map is
3971     selected.
3972     (MapCanvas.shape_selected): Simple force a complete redraw. The
3973     selection class now takes care of only issueing SHAPES_SELECTED
3974     messages when the set of selected shapes actually does change.
3975     (MapCanvas.SelectShapeAt): The selection is now managed in
3976     self.selection
3977    
3978     * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
3979     (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
3980     Unsubscribe, delegate messages according to the delegated_messages
3981     class variable.
3982     (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
3983     attributes from instance variables as described with the
3984     delegated_methods class variable.
3985     (MainWindow.__init__): The interactor as ivar is gone. The
3986     parameter is still there for compatibility. The selection messages
3987     now come from the canvas.
3988     (MainWindow.current_layer, MainWindow.has_selected_layer):
3989     Delegate to the the canvas.
3990     (MainWindow.LayerShowTable, MainWindow.Classify)
3991     (MainWindow.identify_view_on_demand): The dialogs don't need the
3992     interactor parameter anymore.
3993    
3994     * Thuban/UI/tableview.py (TableFrame.__init__)
3995     (LayerTableFrame.__init__, LayerTableFrame.OnClose)
3996     (LayerTableFrame.row_selected): The interactor is gone. It's job
3997     from the dialog's point of view is now done by the mainwindow,
3998     i.e. the parent. Subscribe to SHAPES_SELECTED instead
3999     of SELECTED_SHAPE
4000    
4001     * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
4002     is gone. It's job from the dialog's point of view is now done by
4003     the mainwindow, i.e. the parent.
4004    
4005     * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
4006     gone. It's job from the dialog's point of view is now done by the
4007     mainwindow, i.e. the parent.
4008    
4009     * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
4010     gone. It's job from the dialog's point of view is now done by the
4011     mainwindow, i.e. the parent.
4012     (SessionTreeCtrl.__init__): New parameter mainwindow which is
4013     stored as self.mainwindow. The mainwindow is need so that the tree
4014     can still subscribe to the selection messages.
4015     (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
4016     (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
4017     selection is now accessible through the mainwindow. Subscribe to
4018     SHAPES_SELECTED instead of SELECTED_SHAPE
4019    
4020     * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
4021     SHAPES_SELECTED message now.
4022     (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
4023     so deal with multiple shapes
4024     (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
4025     gone. It's job from the dialog's point of view is now done by the
4026     mainwindow, i.e. the parent.
4027    
4028     * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
4029     parameter is now a list of shape ids.
4030     (RecordTable.SetTable): The second parameter is now a list of
4031     indices.
4032    
4033     * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
4034     selected_shape parameter and ivar to selected_shapes. It's now a
4035     list of shape ids.
4036     (MapRenderer.draw_label_layer): Deal with multiple selected
4037     shapes. Rearrange the code a bit so that the setup and shape type
4038     distinctions are only executed once.
4039    
4040     * test/test_selection.py: Test cases for the selection class
4041    
4042 jonathan 527 2003-03-11 Jonathan Coles <[email protected]>
4043    
4044     * Thuban/Model/load.py: Temporary fix so that the xml reader
4045     doesn't cause Thuban to crash.
4046    
4047     * Thuban/Model/layer.py: Handle the cyclic references between
4048     a layer and its classification better, and be sure to disconnect
4049     the classification from the layer when the layer is destroyed
4050     so that we don't maintain a cyclic reference that may not be
4051     garbage collected.
4052    
4053     * Thuban/Model/classification.py: See comment for layer.py.
4054    
4055 jan 523 2003-03-12 Jan-Oliver Wagner <[email protected]>
4056    
4057     * HOWTO-Release: New. Information on the steps for releasing
4058     a new version of Thuban.
4059    
4060 jonathan 514 2003-03-11 Jonathan Coles <[email protected]>
4061    
4062     * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
4063     Use True instead of true.
4064     (Classifier): Should have a single panel in which all the controls lie.
4065    
4066     * Thuban/UI/proj4dialog.py: Add normal border.
4067    
4068     * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
4069    
4070     * Thuban/UI/mainwindow.py: Use True instead of true.
4071    
4072     * setup.py: Update some definitions to use wxWindows2.4 files
4073    
4074     * Data/iceland_sample_class.thuban: Fixed file so that the
4075     field_type information is present.
4076    
4077 jonathan 490 2003-03-10 Jonathan Coles <[email protected]>
4078    
4079 jonathan 505 * Thuban/UI/classifier.py (Classifier.__init__): Make the
4080     field type label grow so that when the text changes the
4081     size is updated correctly. This may be a wxWindows bug.
4082    
4083     2003-03-10 Jonathan Coles <[email protected]>
4084    
4085 jonathan 499 * Thuban/UI/application.py: Changed SESSION_CHANGED to
4086     SESSION_REPLACED.
4087    
4088     * Thuban/UI/classifier.py: Wrap text with _().
4089     (ClassGrid.CreateTable): Set dimensions and size hints here,
4090     instead of in Reset, so we only set the size once.
4091    
4092     * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
4093    
4094     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
4095     Call Close() instead of Shutdown().
4096    
4097     * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
4098    
4099     * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
4100     Go back to using OnClose() instead of Shutdown().
4101    
4102     2003-03-10 Jonathan Coles <[email protected]>
4103    
4104 jonathan 497 * Thuban/UI/classifier.py (Classifier): SelectField() needed
4105     to know the old field index as well as the new one.
4106    
4107     2003-03-10 Jonathan Coles <[email protected]>
4108    
4109 jonathan 495 * Thuban/UI/classifier.py (Classifier): Use __SelectField()
4110     to correctly set the table information and call this from
4111     __init__ and from _OnFieldSelect so that all the information
4112     is up to date when the dialog opens and when a field is changed.
4113    
4114     2003-03-10 Jonathan Coles <[email protected]>
4115    
4116 jonathan 490 * Thuban/Model/classification.py (Classification): Don't use
4117     layer's message function directly, use the ClassChanged() method
4118     when then classification changes. SetField/SetFieldType/SetLayer
4119     must keep the information about field name and field type in
4120     sync when an owning layer is set or removed.
4121    
4122     * Thuban/Model/layer.py: Added ClassChanged() so that the
4123     classification can tell the layer when its data has changed.
4124     (Layer.SetClassification): Accepts None as an arguement to
4125     remove the current classification and correctly handles
4126     adding a new classification.
4127    
4128     * Thuban/Model/load.py: Comment out print statement
4129    
4130     * test/test_classification.py, test/test_save.py: New and
4131     improved tests.
4132    
4133 jonathan 483 2003-03-07 Jonathan Coles <[email protected]>
4134    
4135     * Thuban/Model/classification.py: Implemented __copy__ and
4136     __deepcopy__ for ClassGroup* and ClassGroupProperites so
4137     they can easily be copied by the classifier dialog.
4138     (ClassGroupProperites.__init__): The default line color should
4139     have been Color.Black.
4140    
4141     * Thuban/UI/classifier.py: Setting and Getting table values now
4142     uses a consistent set of functions.
4143     (Classifier): Now non-modal. Has field type label which changes
4144     as the field changes. Keep track of buttons in a list so that
4145     we can enable/disable the buttons when the None field is selected.
4146     (SelectPropertiesDialog): Add buttons to make the colors transparent.
4147    
4148     * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
4149     does what OnClose did, but can be called by the application to
4150     close a window. Needed when a session changes, and we have to
4151     close the classifier windows.
4152    
4153     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
4154     Shuts down open dialogs. Used when a new session is created
4155     or a session is opened.
4156     (MainWindow.SaveSession): Should only call application.SaveSession()
4157     if we don't call SaveSessionAs first.
4158     (MainWindow.Classify): Allow different classifier dialogs for
4159     different layers.
4160    
4161     * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
4162     the parent class handle it. Add Shutdown() to unsubscibe from
4163     event notification and call the parent Shutdown(). This was
4164     necessary so the application can close the tree window.
4165    
4166 jonathan 478 2003-03-06 Jonathan Coles <[email protected]>
4167    
4168     * Thuban/Model/classification.py: Minor documentation changes,
4169     Addition of __eq__ and __ne__ methods.
4170     (Classification.SetLayer): prevent recursion between this method
4171     and Layer.SetClassification().
4172    
4173     * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
4174    
4175     * Thuban/Model/layer.py (SetClassification): prevent recursion
4176     between this method and Classification.SetLayer().
4177    
4178     * test/test_classification.py, test/test_load.py,
4179     test/test_session.py: Fixed and added tests for the classification
4180     classes.
4181    
4182 bh 477 2003-03-06 Bernhard Herzog <[email protected]>
4183    
4184     * Thuban/UI/classifier.py (ClassGrid.__init__)
4185     (ClassGrid.CreateTable): Move the SetSelectionMode call to
4186     CreateTable because otherwise it triggers an assertion in
4187     wxPython/wxGTK 2.4.
4188    
4189 jonathan 459 2003-03-05 Jonathan Coles <[email protected]>
4190    
4191 jonathan 475 * Thuban/common.py: Move FIELDTYPE constants back to table.py.
4192 jonathan 471
4193 jonathan 475 * Thuban/Model/load.py: import FIELDTYPE constants from table.
4194 jonathan 471
4195 jonathan 475 * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
4196 jonathan 471
4197 jonathan 475 * Thuban/Model/table.py: Put FIELDTYPE constants back.
4198 jonathan 471
4199     2003-03-05 Jonathan Coles <[email protected]>
4200    
4201 jonathan 459 * Thuban/UI/classifier.py: Added class documentation.
4202     Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
4203     Store just the groups in the table and generate the other
4204     column information when it is requested. Add "None" field
4205     to pull-down to select no classification.
4206    
4207     * Thuban/common.py: Moved FIELDTYPE constants from table.py
4208     (Str2Num): Only catch ValueError exceptions.
4209    
4210     * Thuban/Model/classification.py: Class documentation. Renaming
4211     of methods with Stroke to Line. Groups are stored in a single
4212     list with the default as the first element. Groups are searched
4213     in the order they appear in the list.
4214    
4215     * Thuban/Model/color.py: Documentation.
4216    
4217     * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
4218     the kind of data represented by a field.
4219    
4220     * Thuban/Model/load.py (ProcessSession): Use proper string
4221     conversion function; fixes RTbug #1713.
4222    
4223     * Thuban/Model/save.py (Saver): Store field type information.
4224    
4225     * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
4226     (Table): Add field_info_by_name() to retrieve field information
4227     by specifying the field name, not the number.
4228    
4229     * Thuban/UI/mainwindow.py: Function name changes.
4230    
4231     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
4232     get the layer classification once. Don't try to classify
4233     values when the field is None: just use the default properties.
4234    
4235     * Thuban/UI/view.py: Function name changes.
4236    
4237     * Doc/thuban.dtd: Add field_type attribute to a classification.
4238    
4239 bh 456 2003-03-04 Bernhard Herzog <[email protected]>
4240    
4241 bh 458 * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
4242     the fill and stroke layer attributes optional with suitable
4243     default values. Add the stroke_width layer attribute. Use correct
4244     syntax for empty elements. Make the attribute list for labels
4245     refer to the label element.
4246    
4247     2003-03-04 Bernhard Herzog <[email protected]>
4248    
4249 bh 456 * setup.py (thuban_build_py.build): Add a comment about distutils in
4250     Python 2.3 containing some of the functionality we implement in
4251     setup.py ourselves.
4252    
4253     * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
4254     before the selection mode. Doing it the other way round triggers
4255     an assertion in wxWindows.
4256    
4257     * Thuban/Model/save.py (escape): Fix typo in doc-string
4258    
4259     * Thuban/Model/classification.py: Remove unnecessary wxPython
4260     import
4261    
4262 jonathan 448 2003-03-04 Jonathan Coles <[email protected]>
4263    
4264     * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
4265     Parameter 'value' should default to None.
4266    
4267     * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
4268     the class attribute __classification is now private.
4269    
4270     * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
4271     Classifier to ClassGrid. Added support for removing selected rows,
4272     which including code for keeping track of when cells are selected,
4273     and deselected.
4274     (ClassTable): Support for added/removing rows. Fixed a problem
4275     with __ParseInput whereby it would not allow strings (only numbers)
4276     to be entered.
4277     (Classifier): Added button and supporting code for removing
4278     selected rows.
4279    
4280 jonathan 445 2003-02-27 Jonathan Coles <[email protected]>
4281 jonathan 434
4282     * Thuban/common.py: Moved color conversion functions into
4283     Thuban/UI/common.py.
4284     (Str2Num): Now converts the float (not the string) to a long/int
4285     so that an exception isn't thrown.
4286    
4287     * Thuban/UI/common.py: Common functions used in several UI modules
4288    
4289     * Thuban/Model/classification.py: Changed the class hierarchy
4290     so that a Classification consists of Groups which return
4291     Properties when a value matches a Group.
4292    
4293     * Thuban/Model/layer.py: Fixed name resolution problem.
4294    
4295     * Thuban/Model/load.py: Use new Classification and Group functions.
4296    
4297     * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
4298     failure.
4299     (Saver.write_classification): Use new Classification and Group
4300     functions.
4301    
4302     * Thuban/UI/classifier.py: Changes to use new Classification and Group
4303 jonathan 445 functions. Fix to create a tuple with a single value instead of
4304     simply returning the value.
4305 jonathan 434
4306     * Thuban/UI/renderer.py: Use new Classification and Group functions.
4307     Use common.py functions.
4308    
4309 jonathan 445 * Thuban/UI/tree.py: Use common.py functions.
4310 jonathan 447
4311     * test/test_classification.py: Use new Classification and Group
4312     classes.
4313 jonathan 434
4314 jonathan 426 2003-02-24 Jonathan Coles <[email protected]>
4315    
4316     * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
4317     functions from Thuban color objects to wxWindow colour objects.
4318    
4319     * Thuban/Model/classification.py (Classification): Renamed
4320     GetProperties() to GetClassData(). Used the new iterator
4321     in TreeInfo().
4322     (ClassIterator): Iterator implementation to iterate over the
4323     ClassData objects in a classification object.
4324    
4325     * Thuban/Model/save.py (Saver.write_classificaton): Uses
4326     the new iterator to save the classification information.
4327    
4328     * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
4329     for changing the stroke and fill colors and previewing the
4330     changes.
4331    
4332     * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
4333     MainWindow.SaveSessionAs): Text string changes so the dialogs
4334     have more meaningful titles.
4335    
4336     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
4337     Classification method name from GetProperties to GetClassData.
4338    
4339     * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
4340     instead of accessing now non-existent class variables.
4341    
4342 bh 425 2003-02-24 Bernhard Herzog <[email protected]>
4343    
4344     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
4345     unneeded Shape() call. Rendering is substantially faster without
4346     it and it avoids some problems with broken shape files.
4347    
4348 frank 423 2003-02-20 Frank Koormann <[email protected]>
4349    
4350     Force minimal size of identify and label dialogs. The autosizing
4351     looked too ugly.
4352    
4353     * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
4354     * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
4355     Set size of listctrl.
4356     * Thuban/UI/identifyview.py (IdentifyView.__init__):
4357     Set size of dialog.
4358    
4359 jonathan 408 2003-02-19 Jonathan Coles <[email protected]>
4360    
4361     * test/test_classification.py, test/test_layer.py,
4362     test/test_load.py, test/test_map.py, test/test_session.py:
4363     Updated the tests to use the new functions that are in the
4364     respective classes.
4365    
4366     * Thuban/Model/classification.py (Classification):
4367     Uses the new ClassData* classes. Modification messages are
4368     passed up to the parent layer (if it exists).
4369     (ClassData): New class to encapsulate the common data in each
4370     classification property.
4371     (ClassDataDefault): Represents the Default class. data.
4372     (ClassDataPoint): Represents a single class. data point
4373     (ClassDataRange): Represents a class. range
4374     (ClassDataMap): Represents a class. map (unused).
4375    
4376     * Thuban/Model/color.py: Added Color.None to represent something
4377     with no color. Color.Black represents the color black.
4378     (NoColor): Helper class derived from Color to represent something
4379     with no color.
4380    
4381     * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
4382     stroke_width attributes. Made the 'classification' attribute private.
4383     New methods for setting/getting the classification.
4384    
4385     * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
4386     to get the classifcation and use the new ClassData* classes to
4387     hold the classification data. Use Str2Num to convert numbers
4388     properly.
4389    
4390     * Thuban/Model/save.py (Saver): Use new Color and Classification
4391     methods
4392    
4393     * Thuban/UI/classifier.py (ClassGrid): New class to represent a
4394     custom grid.
4395     (ClassTable): Support for editing Values and Labels and for
4396     changing what type (point or range) of data is stored in each
4397     property based on how the user enters the data.
4398     (Classifier): Support for saving the new classifications and
4399     launching the dialog to edit a property.
4400     (SelectPropertiesDialog): New class for editing the visual
4401     properties of a classification (stroke color, width, and fill color)
4402     (ClassPreviewer): Took the Draw method from ClassRenderer and
4403     made most of it into this new class. Intend to use this class in
4404     the SelectPropertiesDialog for previewing changes.
4405    
4406     * Thuban/UI/renderer.py: Use new Color and Classification methods.
4407    
4408     * Thuban/UI/tree.py: Formatting changes.
4409    
4410     * Doc/thuban.dtd: Add 'label' element
4411    
4412     * Thuban/common.py: New. Contains common routines used throughout
4413     the code.
4414     (Str2Num): Takes a string and converts it to the "best" type of
4415     number.
4416    
4417 bh 405 2003-02-14 Bernhard Herzog <[email protected]>
4418    
4419     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
4420     dragging flag is always set to 0 even when the tool implementation
4421     raises an exception
4422    
4423 bh 402 2003-02-11 Bernhard Herzog <[email protected]>
4424    
4425     * Thuban/UI/application.py (ThubanApplication.splash_screen): New
4426     method to create a splash screen.
4427     (ThubanApplication.ShowMainWindow): New. Show the main window.
4428     Needed so the splash screen can display the mainwindow
4429     (ThubanApplication.OnInit): Call the
4430     new splash_screen method to determine whether the application
4431     should display a splash screen. If it displays a splash screen do
4432     not immediately show the main window.
4433    
4434 jonathan 399 2003-02-11 Jonathan Coles <[email protected]>
4435    
4436     * Thuban/Model/classification.py: Added import line to fix
4437     feature conflicts between running on python2.2 and python2.1.
4438    
4439     * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
4440     onto the clinfo parameter, so removed the deepcopy().
4441    
4442 jonathan 396 2003-02-10 Jonathan Coles <[email protected]>
4443    
4444 tkoester 403 * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
4445 jonathan 396 Added element_open variable to track opening and closing of tags
4446     so that tags that don't span more than one line are closed with
4447     /> instead of </tag_name>. Use the GetDefault*() methods of
4448     the Classification class.
4449    
4450     * Thuban/Model/classification.py (Classificaton): Added set and
4451     get methods for the default data. The class also takes a layer
4452     reference so that modification messages can be sent. Fixed the
4453     methods to use the new ClassData class.
4454     (ClassData): New class to encapsulate the classification data
4455    
4456     * Thuban/Model/layer.py (Layer): Remove the
4457 tkoester 403 Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
4458 jonathan 396 SetDefault*() methods on the layer's classification object.
4459 tkoester 403 (Layer.__init__): Use the new SetDefault*() methods in the
4460 jonathan 396 Classification class.
4461    
4462     * Thuban/Model/load.py (ProcessSession): Use the new ClassData
4463     object instead of a dictionary.
4464    
4465 tkoester 403 * Thuban/UI/classifier.py (ClassRenderer): New class to
4466 jonathan 396 draw the classifications in the dialog box's table.
4467     (Classifier): Modified to use the ClassRenderer class.
4468    
4469 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
4470     methods of the Classification class.
4471 jonathan 396
4472     * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
4473     of the ClassData class.
4474    
4475     * test/test_classification.py, test/test_layer.py,
4476     test/test_map.py, test/test_session.py: Fix the tests to work
4477     with the above code changes.
4478    
4479 jonathan 387 2003-02-03 Jonathan Coles <[email protected]>
4480    
4481     * Thuban/Model/classification.py (Classification): Added getNull()
4482     to return the NullData reference
4483    
4484     * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
4485     Layer.SetStrokeWidth): Modified these functions to change the
4486     null data in the classification rather than keep these values
4487     directly in the Layer class. Menu options to change these values
4488     work again.
4489    
4490 jonathan 380 2003-01-28 Jonathan Coles <[email protected]>
4491    
4492 jonathan 384 * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
4493 tkoester 403 Fixed crashing problem on some systems. Dialog box shows
4494 jonathan 380 classification data.
4495    
4496 jonathan 384 * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
4497     Colors in the tree view.
4498    
4499     * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
4500     the tree info for classifications. Commented out unnecessary lines.
4501    
4502     * Thuban/Model/classification.py (Classification.TreeInfo): New
4503     function to add information about the classification into the
4504     tree view.
4505    
4506 tkoester 403 2003-01-27 Jan-Oliver Wagner <[email protected]>
4507 jan 375
4508 tkoester 403 * Thuban/__init__.py (_): New.
4509 jan 375
4510     * Thuban/Model/classification.py, Thuban/Model/extension.py,
4511     Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
4512 tkoester 403 Thuban/Model/session.py, Thuban/UI/application.py,
4513     Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
4514     Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
4515     Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
4516     Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
4517     Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
4518 jan 375
4519 jonathan 370 2003-01-27 Jonathan Coles <[email protected]>
4520    
4521 tkoester 403 * Thuban/Model/layer.py: Classification initialization calls.
4522 jonathan 370
4523 tkoester 403 * Thuban/Model/classification.py: Created class to encapsulate
4524     a layer classification. Supports specific data points and
4525     ranges.
4526 jonathan 370
4527 tkoester 403 * Thuban/Model/load.py: Added support for loading classification
4528     information.
4529 jonathan 370
4530 tkoester 403 * Thuban/Model/save.py: Added support for saving classification
4531     information.
4532 jonathan 370
4533 tkoester 403 * Thuban/UI/classifier.py: Initial class for a dialog box for
4534     specifying classification information.
4535 jonathan 370
4536 tkoester 403 * Thuban/UI/mainwindows.py: Support for opening the classifier
4537     dialog.
4538 jonathan 370
4539 tkoester 403 * Thuban/UI/renderer.py: Support for drawing a layer with the
4540     classification information.
4541 jonathan 370
4542 tkoester 403 * Data/iceland_sample_class.thuban: iceland_sample with
4543     classification data.
4544 jonathan 370
4545 tkoester 403 * test/test_classification: Tests for the Classification class.
4546 jonathan 370
4547 bh 359 2002-12-09 Bernhard Herzog <[email protected]>
4548    
4549 bh 361 * test/test_command.py: New. Tests for the command classes.
4550    
4551 bh 359 * Thuban/UI/command.py (ToolCommand): New class for tool commands.
4552     (Command.IsTool): New method to distinguish between command
4553     switching tools and other commands.
4554    
4555     * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
4556     the tool to avoid direct assignments to instance variables
4557     (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
4558     (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
4559     change the tool
4560    
4561     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
4562     active tool's command turns insensitive, disable the tool.
4563     (_tool_command): Use the new ToolCommand class
4564    
4565     * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
4566     SelectTool method to change the tool
4567     (iconfile): Use the ToolCommand class
4568    
4569 bh 354 2002-12-03 Bernhard Herzog <[email protected]>
4570    
4571     * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
4572     the case of selected items that are not children of Layers or Maps
4573     properly. Previously this bug would trigger an assertion in
4574     wxWindows.
4575    
4576 frank 352 2002-11-06 Frank Koormann <[email protected]>
4577    
4578 bh 354 * Thuban/UI/mainwindow.py: Altered the order of tools in the
4579     toolbar: First now are all navigation tools (Zoom In/Out, Pan,
4580     Full Extent).
4581 tkoester 403
4582 bh 349 2002-10-23 Bernhard Herzog <[email protected]>
4583    
4584     * setup.py (setup call): version now 0.1.3
4585    
4586     * MANIFEST.in: Add the files in test/
4587    
4588     * test/README: Add note about tests requiring the iceland data
4589    
4590     * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
4591     copyright notice.
4592    
4593 bh 344 2002-10-18 Bernhard Herzog <[email protected]>
4594    
4595     * test/test_map.py
4596     (TestMapWithContents.test_projected_bounding_box): Use an explicit
4597     epsilon.
4598    
4599     * test/support.py (FloatComparisonMixin.assertFloatEqual)
4600     (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
4601     message if the assertion fails and don't return the return value
4602     of self.assert_. In assertFloatSeqEqual the return meant that not
4603     all items of the sequence were compared.
4604    
4605 bh 326 2002-09-20 Bernhard Herzog <[email protected]>
4606    
4607 bh 341 * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
4608    
4609     * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
4610    
4611 bh 338 * test/test_map.py (TestMapWithContents.test_tree_info): Create
4612     the string with the bounding box on the fly because of platform
4613     differences in the way %g is handled.
4614    
4615     * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
4616     DBFfile too because Thuban layers can't yet cope missing DBF
4617     files.
4618    
4619     2002-09-20 Bernhard Herzog <[email protected]>
4620    
4621 bh 326 * test/test_menu.py: Use initthuban instead of
4622     add_thuban_dir_to_path to initialize Thuban.
4623    
4624     * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
4625     Mixin class for float comparisons
4626     (SubscriberMixin): New. Mixin class to test messages sent through
4627     the Connector class
4628    
4629     * test/README: Fix a typo and add the -v flag to the command for
4630     individual tests
4631    
4632 bh 335 * test/test_session.py: New. Test cases for Thuban.Model.session
4633    
4634     * test/test_proj.py: New. Test cases for Thuban.Model.proj
4635    
4636     * test/test_map.py: New. Test cases for Thuban.Model.map
4637    
4638     * test/test_layer.py: New. Test cases for Thuban.Model.layer
4639    
4640     * test/test_label.py: New. Test cases for Thuban.Model.label
4641    
4642     * test/test_connector.py: New. Test cases for Thuban.Lib.connector
4643    
4644     * test/test_color.py: New. Test cases for Thuban.Model.color
4645    
4646     * test/test_base.py: New. Test cases for Thuban.Model.base
4647    
4648 bh 322 2002-09-13 Bernhard Herzog <[email protected]>
4649    
4650     * Thuban/Model/session.py (Session.forwarded_channels): Forward
4651     the CHANGED channel too.
4652    
4653     * Thuban/Model/map.py (Map.forwarded_channels): Forward the
4654     CHANGED channel too.
4655     (Map.__init__): Call the Modifiable constructor as well.
4656    
4657     * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
4658     event if the modified flag changes.
4659     (Modifiable.changed): Tweak the doc-string.
4660    
4661     * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
4662     (MainWindow.set_position_text): Put the code that puts the text
4663     with the mouse position into the status bar into the new method
4664     set_position_text so that it can overwritten in derived classes.
4665    
4666 bh 317 2002-09-12 Bernhard Herzog <[email protected]>
4667    
4668     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
4669     message box on the main window.
4670    
4671 bh 313 2002-09-11 Bernhard Herzog <[email protected]>
4672    
4673     * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
4674     the 'E' because it's less likely to interfere with other menu
4675     entries.
4676 bh 315 (MainWindow.build_menu): remove an incorrect comment.
4677 bh 313
4678 bh 311 2002-09-10 Bernhard Herzog <[email protected]>
4679    
4680     * Thuban/UI/mainwindow.py (MainWindow.Map): New.
4681     (_tool_command): Add sensitive parameter
4682     (_has_visible_map): Sensitivity callback to tools and other
4683     commands that require a visible map. Use it in map_zoom_in_tool,
4684     map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
4685     and map_full_extent
4686    
4687 bh 308 2002-09-06 Bernhard Herzog <[email protected]>
4688    
4689     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
4690     VIEW_POSITION
4691    
4692 tkoester 403 2002-09-04 Frank Koormann <[email protected]>
4693 frank 306
4694     * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
4695    
4696 bh 302 2002-09-02 Bernhard Herzog <[email protected]>
4697    
4698 bh 304 * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
4699     wxWindows already and our implementation doesn't work correctly
4700     with wxGTK 2.3:
4701     (MapCanvas.__init__): Remove the instance variable
4702     (MapCanvas.OnPaint): Always call do_redraw when there's a map to
4703     be drawin
4704     (MapCanvas.OnIdle): Removed.
4705    
4706 bh 302 * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
4707     a parameter to determine the size of the rectangle.
4708     (MapCanvas.find_shape_at): Create the box around the point on a
4709     layer by layer basis and make the size depend on the shape type.
4710     This solves a problem with the selection of point shapes at the
4711     border of the layer's bounding box
4712    
4713 bh 292 2002-08-30 Bernhard Herzog <[email protected]>
4714    
4715 bh 300 * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
4716     for the sensitivity of remove layer.
4717     (_can_remove_layer): New. Sensitivity callback for remove layer
4718     (Command layer_remove): Use _can_remove_layer
4719    
4720     * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
4721     determine whether a given layer can be deleted.
4722    
4723 bh 297 * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
4724     (MapCanvas.do_redraw): Get rid of the unused update_region
4725     instance variable
4726    
4727 bh 294 * Thuban/UI/view.py: Add/update some doc-strings.
4728    
4729 bh 292 * test/: new subdirectory with a bunch of unit tests.
4730    
4731     * test/README, test/test_table.py, test/test_save.py,
4732     test/test_menu.py, test/test_load.py: Initial set of tests and
4733     brief instructions on how to run them
4734    
4735 bh 287 2002-08-29 Bernhard Herzog <[email protected]>
4736    
4737 bh 291 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
4738     arcs with multiple parts.
4739    
4740 bh 289 * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
4741     Handle degenrate rectangles.
4742    
4743 bh 287 * Thuban/Model/table.py: Make writing records work correctly:
4744     (Table.__init__): Keep track of whether the DBF is open for
4745     writing
4746     (Table.write_record): Open the DBF file for writing when necessary
4747    
4748 bh 285 2002-08-27 Bernhard Herzog <[email protected]>
4749    
4750     * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
4751     dbf files only for reading by default. Use a new writable dbf
4752     object for writing.
4753    
4754 bh 278 2002-08-26 Bernhard Herzog <[email protected]>
4755    
4756 bh 282 * Thuban/UI/mainwindow.py: Refactor the context creation:
4757     (MainWindow.Context): New method to return a context
4758     (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
4759     new method
4760    
4761 bh 278 * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
4762     layer table specific code from TableGrid into LayerTableGrid
4763     (TableFrame, LayerTableFrame): Split the layer table specific code
4764     from TableFrame into LayerTableFrame
4765 bh 280 (LayerTableGrid.select_shape): Remove a debug print
4766 bh 278
4767     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
4768     LayerTableFrame
4769    
4770 bh 277 2002-08-23 Bernhard Herzog <[email protected]>
4771    
4772     * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
4773     absolute filename.
4774    
4775 bh 269 2002-08-22 Bernhard Herzog <[email protected]>
4776    
4777 bh 275 * Thuban/Model/table.py (Table.write_record): New method to write
4778     records.
4779 tkoester 403 (Table.__init__): Open the DBF file for writing too.
4780 bh 275
4781     * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
4782     into the underlying table.
4783    
4784     * extensions/shapelib/shapefil.h (DBFCommit),
4785     extensions/shapelib/dbfopen.c (DBFCommit): New API function to
4786     commit any changes made to the DBF file.
4787    
4788 bh 271 * Thuban/UI/mainwindow.py (make_check_current_tool)
4789     (_tool_command): Put the code that generates the "checked"
4790     callback into a separate function so that we can reuse it
4791     elsewhere
4792    
4793 bh 269 * Thuban/Model/save.py (Saver): New class to handle serializing a
4794     session into an XML file. The main reason to introduce a class is
4795     that applications built on Thuban can derive from it so that they
4796     can save additional information in a session file.
4797     (save_session): Delegate almost all the work to the Saver class.
4798     Rename the filename argument to file because it may be a file like
4799     object now.
4800    
4801     * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
4802     code. Remove the little test code which would be executed when the
4803     module is run as a script which didn't work anymore since it can't
4804     import the other Thuban modules.
4805     (ProcessSession, load_session): Refactor the ProcessSession to
4806     have one method for each element start and end tag so that derived
4807     classes can easily override the processing of individual tags.
4808     Also, always parse with namespaces enabled because applications
4809     built on top of Thuban will likely use namespaces if they extend
4810     the session file format.
4811    
4812 bh 266 2002-08-21 Bernhard Herzog <[email protected]>
4813    
4814     * setup.py (ThubanInstall.run): Don't repr install_lib_orig
4815     because thubaninit_contents will do it for us.
4816    
4817 tkoester 403 2002-08-16 Jan-Oliver Wagner <[email protected]>
4818 jan 265
4819     * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
4820     tree window already open
4821    
4822 bh 259 2002-08-15 Bernhard Herzog <[email protected]>
4823    
4824 bh 263 * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
4825     with self.
4826    
4827     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
4828     when we have actually captured it.
4829    
4830 bh 259 * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
4831     shapefile and destroy the table.
4832    
4833     * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
4834    
4835 bh 254 2002-08-14 Bernhard Herzog <[email protected]>
4836    
4837 bh 256 * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
4838     instance variable columns
4839     (RecordTable.GetTypeName): row and col may be negative in some
4840     cases.
4841    
4842 bh 254 * setup.py (InstallLocal.initialize_options)
4843     (InstallLocal.finalize_options, InstallLocal.user_options): New
4844     option create-init-file to build a thubaninit.py when running
4845     install_local
4846     (InstallLocal.run): Create the thubaninit.py module when requested
4847     (thubaninit_contents): Split the template into several parts and
4848     create a new function thubaninit_contents that creates the
4849     contents of a thubaninit module.
4850     (ThubanInstall.run): Use the new function to create the thubaninit
4851     module.
4852    
4853 bh 252 2002-07-30 Bernhard Herzog <[email protected]>
4854    
4855     * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
4856     cleanup.
4857     (ThubanApplication.MainLoop): Extend to automatically call OnExit.
4858    
4859     * Thuban/Model/session.py (Session.Destroy): Don't bypass the
4860     direct base class' Destroy method.
4861    
4862     * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
4863     layers.
4864     (Map.Destroy): Destroy the label_layer as well and call the
4865     inherited Desatroymethod first so that no more messages are
4866     issued.
4867     (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
4868     message if the stacking order actually has changed. Add
4869     doc-strings.
4870     (Map.BoundingBox): Correct the doc-string.
4871     (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
4872     (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
4873    
4874     * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
4875     all labels.
4876    
4877 bh 247 2002-07-29 Bernhard Herzog <[email protected]>
4878    
4879     * Thuban/Model/map.py (Map.subscribe_layer_channels)
4880     (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
4881     to a layer's channels into separate methods.
4882     (Map.RemoveLayer, Map.AddLayer): Call the new methods
4883     (Map.Destroy): Unsubscribe from a layer's channels before
4884     destroying it.
4885    
4886     * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
4887     selected_layer parameter to searched_layer which is the layer to
4888     search in.
4889     (MapCanvas.SelectShapeAt): New parameter layer to restrict the
4890     search to that layer. Return the selected layer and shape.
4891    
4892     * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
4893     typo
4894    
4895 bh 238 2002-07-24 Bernhard Herzog <[email protected]>
4896    
4897 bh 243 * Thuban/UI/application.py (ThubanApplication.create_session):
4898     Extend the doc string.
4899     (ThubanApplication.subscribe_session)
4900     (ThubanApplication.unsubscribe_session): New methods to
4901     subscribe/unsubscribe to/from session channels.
4902     (ThubanApplication.SetSession): Call the new methods here.
4903     (ThubanApplication.maps_changed, ThubanApplication.set_map):
4904     Renamed set_map to maps_changed. Its now a subscriber for
4905     MAPS_CHANGED.
4906    
4907     * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
4908     x-coordinate in case of simple clicks
4909    
4910     * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
4911     don't pass it as a parameter
4912    
4913     * Thuban/Model/session.py (Session.RemoveMap): New
4914    
4915 bh 238 * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
4916     window size into a parameter.
4917    
4918 bh 235 2002-07-23 Bernhard Herzog <[email protected]>
4919    
4920 bh 237 * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
4921     just commands.
4922    
4923 bh 235 * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
4924     parameter list a bit to allow setting the window title and the
4925     initial message in the status bar. Update the callers.
4926    
4927     * Thuban/UI/application.py (ThubanApplication.OnInit)
4928     (ThubanApplication.CreateMainWindow): Put the mainwindow
4929     instantiation into a separate method so that it can be overridden
4930     by a subclass.
4931    
4932 bh 230 2002-07-19 Bernhard Herzog <[email protected]>
4933    
4934 bh 234 * Thuban/Model/session.py: Issue a CHANGED message every time
4935     another changed message is issued to make it easier to get
4936     notified of changes.
4937     (Session): Update the doc string
4938     (Session.forward): Issue changed-events as CHANGED as well.
4939     (Session.changed): Overwrite the inherited version to issue
4940     CHANGED events as well.
4941    
4942     * Thuban/UI/tree.py: We can now simply subscribe to the session's
4943     CHANGED channel to be informed of changes.
4944     (SessionTreeCtrl.session_channels): Not needed any longer.
4945 tkoester 403 (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
4946 bh 234 Only have to (un)subscribe CHANGED
4947    
4948     * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
4949    
4950 bh 230 * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
4951     for the wxPython locale bug to __init__.py so that it's
4952     automatically executed by anybody using UI code from Thuban.
4953    
4954 bh 225 2002-07-18 Bernhard Herzog <[email protected]>
4955    
4956 bh 228 * Thuban/UI/main.py (main): app no longer needs to be global
4957    
4958     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
4959     as parameter and store it in an instance variable
4960     (MainWindow.invoke_command, MainWindow.update_command_ui)
4961     (MainWindow.save_modified_session, MainWindow.NewSession)
4962     (MainWindow.OpenSession, MainWindow.SaveSession)
4963     (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
4964     application object.
4965    
4966     * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
4967     the main window with self.
4968    
4969 bh 225 * Thuban/UI/context.py: New module with the context class
4970    
4971     * Thuban/UI/command.py (Command): Update doc string.
4972    
4973     * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
4974     MainWindow.update_command_ui): Pass an instance of the context
4975     class to the command's methods
4976     (check_current_tool, call_method): Handle the new context
4977     implementation
4978    
4979     * Examples/simple_extensions/simple_tool.py (simple_tool,
4980     check_simple_tool): Handle the new context implementation
4981    
4982     * Examples/simple_extensions/simple_command.py (simple_command):
4983     Handle the new context implementation. Update the comments about
4984     the context.
4985    
4986     * Thuban/UI/application.py (ThubanApplication.SetSession): Add
4987     doc-string
4988     (ThubanApplication.Session): New method to return the session
4989     object
4990    
4991     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
4992     interactor's selected_layer may not be a layer of the current
4993     session when the tree is updated while a new session is being set.
4994    
4995 bh 217 2002-07-17 Bernhard Herzog <[email protected]>
4996    
4997     * Thuban/UI/tree.py (color_string): Removed. No longer used.
4998     (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
4999     update_tree into update_tree and add_items. The tree now uses a
5000     more generic way to display the contents of the tree.
5001     (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
5002    
5003     * Thuban/Model/layer.py (Layer.TreeInfo),
5004     Thuban/Model/extension.py (Extension.TreeInfo),
5005     Thuban/Model/map.py (Map.TreeInfo),
5006 tkoester 403 Thuban/Model/session.py (Session.TreeInfo):
5007 bh 217 Add TreeInfo methods to implement the new tree view update scheme
5008    
5009 bh 216 2002-07-16 Bernhard Herzog <[email protected]>
5010    
5011     * Thuban/UI/application.py: Don't use "import from" for the
5012     MainWindow. It can't always be resolved.
5013     (ThubanApplication.OnInit): change reference to MainWindow
5014     accordingly.
5015    
5016     * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
5017     completely
5018    
5019 bh 213 2002-07-10 Bernhard Herzog <[email protected]>
5020    
5021     * setup.py (create_init_module): New configurable variable whose
5022     default depends on the platform we're running on.
5023     (ThubanInstall.initialize_options): Initialize
5024     self.create_init_module from the global create_init_module
5025     (ThubanInstall.user_options): indictate that the options
5026     create-init-module and init-module-dir have arguments.
5027    
5028     * setup.py: In the setup call change the version number to include
5029     cvs.
5030    
5031     * MANIFEST.in: Add the files in Examples
5032    
5033 bh 205 2002-07-09 Bernhard Herzog <[email protected]>
5034    
5035 bh 210 * setup.py: In the setup call, use the thuban homepage as the
5036     value of the url parameter.
5037    
5038 bh 208 * Examples: New subdirectory for examples.
5039    
5040     * Examples/simple_extensions/simple_tool.xpm,
5041     Examples/simple_extensions/simple_tool.py,
5042     Examples/simple_extensions/simple_command.py,
5043     Examples/simple_extensions/README: Simple examples showing how to
5044     add new commands and tools.
5045    
5046 bh 207 * setup.cfg (bdist_rpm): Add the default value for prefix and tell
5047     bdist_rpm that we also have an install script.
5048     (bdist_inno): Add 2002 to the copyright notice.
5049    
5050 bh 205 * setup.py: Create a file in python's site-packages directory to
5051     make installation of Thuban as a library easier.
5052     (ThubanInstall.user_options): Add two new options,
5053     create-init-module and init-module-dir
5054     (ThubanInstall.expand_with_pure_python_dirs): New method to expand
5055     filenames for installation in the default directories.
5056     (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
5057     the inherited methods to capture some filenames before they're
5058     transformed too much by distutils.
5059     (ThubanInstall.run): Create the init module if requested.
5060     (ThubanInstall.thuban_init_filename): New method to return the
5061     full name of the init module.
5062     (ThubanInstall.get_outputs): Append the filename of the init
5063     module.
5064    
5065 bh 202 2002-07-08 Bernhard Herzog <[email protected]>
5066    
5067 bh 205 * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
5068     handle the prefix properly which means that the default for the
5069     installation prefix should be /usr for RPMs and /usr/local when
5070     doing a normal source install.
5071     (bdist_rpm_install_script): Script to override the default install
5072     commands in the specfile generated by the bdist_rpm command.
5073     (thuban_bdist_rpm.user_options): Add a prefix option
5074     (thuban_bdist_rpm.initialize_options): Init the prefix option.
5075     Create the script files for the spec files as empty files here
5076     (thuban_bdist_rpm._make_spec_file): Override the inherited method
5077     to fill the script files with content.
5078    
5079 bh 202 * Thuban/Model/save.py (relative_filename): Wrapper around
5080     Thuban.Lib.fileutil.relative_filename that accepts an empty dir
5081     argument. save_session now automatically uses this version,
5082     solving a problem when saving to a relative filename.
5083    
5084     * setup.py: In the setup call, make sure that the library
5085     directories are under $prefix/lib not directly under $prefix.
5086    
5087 tkoester 403 2002-06-20 Jan-Oliver Wagner <[email protected]>
5088 jan 199
5089     * Thuban/Model/extension.py: new module to handle extension objects.
5090     * Thuban/Model/messages.py: new messages for extensions.
5091     * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
5092     Session.AddExtension): new for handling extensions.
5093     Also some other minor changes to round up extension handling.
5094     * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
5095     of Extension titles and title and names of its objects.
5096    
5097 bh 194 2002-05-29 Bernhard Herzog <[email protected]>
5098    
5099     * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
5100 bh 202 the events for a command.
5101 bh 194 (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
5102     Call bind_command_events to bind the events. add_toolbar_command
5103     can now bind events too so that it's possible to have commands
5104     that are only available through the toolbar.
5105     (MainWindow.init_ids): New instance variable events_bound to keep
5106     track of for which commands events have been bound.
5107    
5108 bh 190 2002-05-28 Bernhard Herzog <[email protected]>
5109    
5110     * Thuban/UI/menu.py: New module to build and manage menus.
5111    
5112     * Thuban/UI/mainwindow.py: Remove some unused imports.
5113     (MainWindow.__init__, main_menu): move the definition of the main
5114     menu from __init__ to the Menu instance main_menu.
5115     (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
5116     build the menu bar and sub-menus from a menu description.
5117    
5118     * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
5119     startup file
5120     (ThubanApplication.read_startup_files): New method to run
5121     ~/.thuban/thubanstart.py
5122    
5123 bh 192 * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
5124     Move the toolbar definition to the Menu instance main_toolbar.
5125     (MainWindow.build_toolbar): New method to build the toolbar
5126     similar to the build_menu methods
5127    
5128 bh 184 2002-05-23 Bernhard Herzog <[email protected]>
5129    
5130 bh 186 * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
5131     layer_outline_color. Fix it in the definition of the command too.
5132    
5133 bh 184 * Thuban/UI/command.py (Command): Fix typo in doc string
5134    
5135 bh 182 2002-05-22 Bernhard Herzog <[email protected]>
5136    
5137     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
5138     in the docstring
5139    
5140 bh 175 2002-05-15 Bernhard Herzog <[email protected]>
5141    
5142 bh 180 * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
5143     when the shapefile is empty.
5144     (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
5145     now return None for empty shapefiles. Update doc-strings.
5146    
5147     * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
5148     the layer's bbox being None.
5149    
5150     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
5151     layer's bbox being None.
5152    
5153 bh 175 * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
5154     necessary.
5155     (MapCanvas.__init__): New instance variables, last_selected_layer
5156     and last_selected_shape to determine how the selection has
5157     changed.
5158    
5159     * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
5160     AutoSizeColumns because it will cause a traversal of the entire
5161     table which for large .dbf files will take a very long time.
5162    
5163 bh 172 2002-05-14 Bernhard Herzog <[email protected]>
5164    
5165     * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
5166     maximum depth for the tree than shapelib does by default.
5167    
5168 bh 165 2002-05-10 Bernhard Herzog <[email protected]>
5169    
5170     * setup.py (py_modules): The shptree modules doesn't have a
5171     wrapper, so don't include it in the py_modules
5172    
5173 bh 163 2002-05-08 Bernhard Herzog <[email protected]>
5174    
5175     * extensions/shapelib/shptree.c (compare_ints): Make arguments
5176     const void * as in the qsort prototype
5177     (SHPTreeFindLikelyShapes): Remove some unused variables.
5178    
5179     * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
5180     maintains to redraw the window during a drag.
5181     (MapCanvas.unprojected_rect_around_point): New method to determine
5182     a small region around a point for hit-testing.
5183     (MapCanvas.find_shape_at): Only test the shapes in a small region
5184     around the point.
5185    
5186     * setup.py: Increment the version to 0.1.2
5187    
5188     * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
5189     debug print and set session to None after unsubscribing
5190    
5191 bh 146 2002-05-07 Bernhard Herzog <[email protected]>
5192    
5193 bh 154 * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
5194     the file to have a .thuban extension.
5195    
5196 bh 152 * Thuban/UI/tree.py (session_channels): New class constant with
5197     all the session channels to subscribe to to update the tree
5198     (SessionTreeCtrl.session_changed): Remember the session so that we
5199     can unsubscribe properly. Use the new class constant to
5200     unsubscribe from the old session and subscribe to the new one.
5201     (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
5202     subscriptions of the SessionTreeCtrl.
5203     (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
5204    
5205     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
5206     Session Tree" command to the file menu.
5207    
5208     * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
5209     as update_region to the renderer.
5210    
5211     * Thuban/UI/renderer.py
5212     (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
5213     update box is now directly a tuple, not a wxRect anymore.
5214    
5215     * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
5216     prints.
5217    
5218     2002-05-07 Bernhard Herzog <[email protected]>
5219    
5220 bh 146 * setup.py: Add the shptree extension module. See
5221     extensions/pyshapelib/ChangeLog for more details.
5222    
5223     * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
5224     extensions/shapelib/dbfopen.c: Really update to the versions of
5225     shapelib 1.2.9. For some reason it wasn't really done on
5226     2002-04-11.
5227    
5228     * extensions/shapelib/shptree.c: Modified version of shptree.c of
5229     shapelib 1.2.9. The only real difference is the use of qsort
5230     instead of a bubble sort implementation
5231    
5232     * Thuban/Model/layer.py (Layer.__init__): New instance variable
5233     shapetree to hold the shapelib quadtree for the shapefile
5234     (Layer.open_shapefile): Create the quad tree.
5235     (Layer.ShapesInRegion): New method to return the ids of shapes in
5236     a given region using the quad tree.
5237    
5238     * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
5239     comment
5240     (draw_polygon_shape): Accept both arcs and polygons.
5241     (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
5242     the api.
5243    
5244     * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
5245     return the shape ids to be rendered in a given layer.
5246     (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
5247     ids. Use draw_polygon_shape to draw arc shapes as well.
5248     (ScreenRenderer.RenderMap): New parameter for the rectangle that
5249     has to be updated
5250     (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
5251     calling it's ShapesInRegion method.
5252    
5253     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
5254     update_region for the update region.
5255     (MapCanvas.OnPaint): Maintain the update region
5256     (MapCanvas.do_redraw): Pass the bounding box of the update_region
5257     to the renderer when drawing the bitmap. Reset the update_region.
5258    
5259 bh 129 2002-05-03 Bernhard Herzog <[email protected]>
5260    
5261 bh 131 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
5262     MainWindow.OpenSession): Change the file extension of the session
5263     files to .thuban
5264    
5265 bh 129 * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
5266     Move the map channels to be forwarded by the session into the
5267 bh 146 class constant with forwarded_channels. Also add
5268     LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
5269     forwarded_channels
5270 bh 129
5271     * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
5272     typo and some rewording).
5273    
5274 bh 126 2002-05-02 Bernhard Herzog <[email protected]>
5275    
5276     * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
5277     around to speed up most redraws:
5278     (MapCanvas.__init__): New instance variable bitmap which holds the
5279     bitmap
5280     (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
5281     self.bitmap to draw.
5282     (MapCanvas.full_redraw): New method to force a full redraw
5283     including the bitmap
5284     (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
5285     make sure the bitmap is redrawn.
5286     (MapCanvas.projection_changed, MapCanvas.set_view_transform,
5287     MapCanvas.shape_selected): Call full_redraw instead of readraw to
5288     make sure the bitmap is redrawn.
5289     (MapCanvas.OnSize): New method to handle size events so that the
5290     bitmap can be redrawn.
5291    
5292 bh 124 2002-04-29 Bernhard Herzog <[email protected]>
5293    
5294     * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
5295     canvas' VIEW_POSITION event
5296     (MainWindow.view_position_changed): Handler for VIEW_POSITION.
5297     Update the text in the status-bar accordingly.
5298    
5299     * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
5300     (MapCanvas.__del__): Implement because Publisher.__del__ has to be
5301     called.
5302     (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
5303     current_position
5304     (MapCanvas.set_current_position): New method to set
5305     current_position. Issue a VIEW_POSITION event
5306     (MapCanvas.CurrentPosition): New public method to return the value
5307     of current_position. Should be called when the VIEW_POSITION event
5308     is processed.
5309     (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
5310     Update the position.
5311     (MapCanvas.OnLeaveWindow): Set the position to None.
5312    
5313     * Thuban/UI/messages.py (VIEW_POSITION): New message for the
5314     position in the statusbar
5315    
5316 tkoester 403 2002-04-26 Frank Koormann <[email protected]>
5317 frank 120
5318     * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
5319    
5320 tkoester 403 2002-04-24 Frank Koormann <[email protected]>
5321    
5322 frank 118 * Resources/Bitmaps/identify.xpm: shadow added
5323    
5324     * Resources/Bitmaps/fullextent.xpm: new
5325 jan 116
5326 tkoester 403 2002-04-22 Jan-Oliver Wagner <[email protected]>
5327 jan 116
5328 tkoester 403 * Thuban/UI/tree.py (update_tree): added test for None on map bounding
5329     box
5330 jan 114
5331 tkoester 403 2002-04-21 Jan-Oliver Wagner <[email protected]>
5332    
5333 jan 114 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
5334    
5335     * Thuban/UI/tree.py (update_tree): added added map extent
5336    
5337     * Thuban/UI/mainwindow.py (_method_command): extended by parameter
5338 tkoester 403 icon; added map_full_extend as tool
5339 jan 114
5340 tkoester 403 2002-04-19 Jan-Oliver Wagner <[email protected]>
5341 jan 107
5342     * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
5343     saving _new_ sessions
5344    
5345     * Thuban/Model/session.py (create_empty_session): new session
5346     don't have a filename (set to None)
5347    
5348     * Thuban/UI/tree.py (update_tree): added filename and modified flag
5349    
5350     * Thuban/Model/load.py (ProcessSession): convert projection
5351     parameters from unicode to regular string
5352    
5353     * Data/iceland_sample.session: Added UTM Zone 26 projection.
5354    
5355 bh 100 2002-04-11 Bernhard Herzog <[email protected]>
5356    
5357     * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
5358     extensions/shapelib/dbfopen.c: Update to the versions of shapelib
5359     1.2.9
5360    
5361     * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
5362     the pyshapelib directoy into the list of include dirs, so that
5363     pyshapelib_api.h can be found.
5364    
5365     * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
5366     holds the pyshapelib C-API
5367     (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
5368     pyshapelib_api to access the shapelib functions.
5369     (initwxproj): Import the c_api from the shapelib module and
5370     initialize pyshapelib_api.
5371    
5372 bh 89 2002-04-04 Bernhard Herzog <[email protected]>
5373    
5374 bh 91 * setup.py (thuban_bdist_rpm.initialize_options): Use
5375     initialize_options to create the scripts for the rpm.
5376    
5377 bh 89 * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
5378    
5379 bh 85 2002-04-03 Bernhard Herzog <[email protected]>
5380    
5381 bh 87 * setup.py: Increment version to 0.1.1
5382    
5383 bh 85 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
5384     Layer" and "Remove Layer" commands from the layer menu to the map
5385     menu
5386    
5387 bh 83 2002-02-15 Bernhard Herzog <[email protected]>
5388    
5389     * Thuban/Model/layer.py (Layer.Shape): list append only takes one
5390     argument (python <= 1.5.2 erroneously accepted multiuple
5391     arguments)
5392    
5393 bh 81 2002-02-04 Bernhard Herzog <[email protected]>
5394    
5395     * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
5396     RecordGrid in the identifyview.
5397     (IdentifyView.__init__): Use IdentifyGridCtrl instead of
5398     IdentifyListCtrl. The grid allows editing of the values.
5399    
5400     * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
5401     implementing a grid for a single row of a thuban table.
5402    
5403     * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
5404     layers by default. Easier to use than the previous default of only
5405     searching through the select layer which meant that if no layer
5406     was selected, you couldn't select a shape.
5407    
5408     * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
5409    
5410     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
5411     stroke_width attribute
5412    
5413     * Thuban/Model/save.py (save_session): Write the new stroke_width
5414     attribute
5415    
5416     * Thuban/Model/load.py (ProcessSession.startElement): Read the
5417     stroke_width attribute
5418    
5419     * Thuban/Model/layer.py (Layer.__init__): New parameter and
5420     instance variable stroke_width
5421     (Layer.SetStrokeWidth): Set the stroke_width.
5422    
5423 bh 72 2002-02-01 Bernhard Herzog <[email protected]>
5424    
5425     * extensions/thuban/wxproj.cpp (project_points): Fix two
5426     off-by-one errors in the last loop that joins the various parts
5427     together.
5428    
5429 bh 71 2002-01-14 Bernhard Herzog <[email protected]>
5430    
5431     * setup.py (data_dist.make_distribution): Fix some typos
5432    
5433 bh 70 2001-09-18 Bernhard Herzog <[email protected]>
5434    
5435     * README: Slight tweaking in preparation for the 0.1 release
5436    
5437     * setup.cfg: Add section for sdist to create both tgz and zip
5438     archives
5439    
5440     * setup.py: increase version number to 0.1
5441     (data_dist): New command class for data distribution
5442    
5443 bh 64 2001-09-14 Bernhard Herzog <[email protected]>
5444    
5445 bh 70 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
5446     Handle the case of no layer (i.e. layer is None) properly.
5447    
5448 tkoester 403 * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
5449 bh 70 Set the initial selection of the combo boxes to reflect the
5450     projection we're starting with in a way that works on windows,
5451     too.
5452    
5453 bh 64 * Thuban/Lib/connector.py (Connector.print_connections): Print the
5454     puiblisher's ids in hex to make it easier to compare them to the
5455     standard repr of python methods
5456    
5457     * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
5458     messages
5459    
5460 bh 59 2001-09-13 Bernhard Herzog <[email protected]>
5461    
5462 bh 64 * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
5463     deselect the layer if no layer is selected
5464    
5465 bh 59 * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
5466     idle time when there actually is something to draw. If there's
5467     nothing to draw simply clear the window
5468     (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
5469     (MapCanvas.SetMap): force a redraw in all cases because
5470     FitMapToWindow doesn't always do it.
5471     (MapCanvas.ZoomFactor): Add an optional parameter, center, to
5472     specify the point to move into the center of the window
5473     (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
5474     dragged, zoon in/out by a factor of 2
5475 bh 64 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
5476     index, i.e. reversed drawing order) so that objects appearing to
5477     be in from of others are selected first. This is probably mostly
5478     relevant for point shapes where the symbols used may overlap
5479 bh 59
5480     * Thuban/Model/session.py (create_empty_session): Unset the
5481     modified bit before returning it
5482    
5483     * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
5484     create_empty_session session to create the new, empty session.
5485    
5486     * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
5487     the tool bitmaps.
5488     (MainWindow.OnClose, MainWindow.save_modified_session): Separate
5489     the code that asks whether the session should be saved into the
5490     new method save_modified_session.
5491     (MainWindow.OpenSession, MainWindow.NewSession): Use the new
5492     method to save modified session here too.
5493    
5494 bh 55 2001-09-11 Bernhard Herzog <[email protected]>
5495    
5496     * setup.py (InnoIconItem): fix typo
5497    
5498     (thuban_bdist_inno.run):
5499     (bdist_inno.run): Move the decision not to create symlinks on
5500     non-nt platforms to thuban_bdist_inno and do it unconditinally
5501     since we never want to create the symlinks here
5502    
5503 bh 48 2001-09-10 Bernhard Herzog <[email protected]>
5504    
5505 bh 53 * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
5506     identify view immediately
5507    
5508     * Thuban/UI/controls.py: New file with two classes RecordListCtrl
5509     and SelectableRecordListCtrl that implement the code shared by the
5510     identify view and the label dialog
5511    
5512     * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
5513     new class RecordListCtrl
5514    
5515     * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
5516     return value of GetValue is None instead of using it as a boolean
5517     directly so that Zero numbers are handled properly.
5518     (LabelListCtrl): Derive from the new class
5519     SelectableRecordListCtrl
5520    
5521 bh 48 * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
5522     (Proj4Dialog.dialogLayout): Make the window resizable and set the
5523     size of the text control explicitly to make the sizers work on
5524     both Windows and X.
5525    
5526 bh 44 2001-09-07 Bernhard Herzog <[email protected]>
5527    
5528     * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
5529     that can limit the search to the currently selected layer.
5530     (MapCanvas.SelectShapeAt): Make sure that the currently selected
5531     layer stays selected even when no shape is found
5532 bh 46 (MapCanvas.FitRectToWindow): If the rect has zero with or zero
5533     height do nothing (avoids zero division errors)
5534 bh 44
5535 bh 32 2001-09-06 Bernhard Herzog <[email protected]>
5536    
5537 bh 42 * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
5538     Correct the spelling of SessionTreeCtrl. dabbrev is too damn
5539     convenient :-)
5540     (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
5541     a new instvar layer_to_item to map layers to tree items
5542     (SessionTreeCtrl.layer_selected): Select the appropriate tree item
5543     to match the current selection in the interactor
5544    
5545 bh 40 * Thuban/UI/interactor.py (Interactor.SelectedLayer):
5546     (Interactor.HasSelectedLayer): New methods to query the current
5547     selection
5548    
5549     * Thuban/UI/mainwindow.py (MainWindow.current_layer):
5550     (MainWindow.has_selected_layer): Simply call the appropriate
5551     interactor method
5552    
5553     * Thuban/UI/mainwindow.py (MainWindow.__init__):
5554     (MainWindow.LayerShowTable):
5555     (MainWindow.identify_view_on_demand): Store the interactor in an
5556     instvar and use that reference instead of going through main.app
5557    
5558 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
5559     * Thuban/UI/application.py (ThubanApplication.OnInit):
5560 bh 40 * Thuban/UI/main.py (main): Create the session tree view in main
5561     with the new mainwindow method ShowSessionTree and not directly
5562     the application's OnInit method
5563    
5564     * Thuban/UI/tree.py (myTreeCtrlPanel):
5565     (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
5566     TreeCtrl isntead of a panel. This affects most method since we now
5567     refer to self instead of self.tree
5568     (SessionTreeView): New class implementing a non-modal dialog
5569     showing the session tree.
5570    
5571 bh 35 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
5572     layer to the tableview dialog.
5573    
5574     * Thuban/UI/tableview.py: Add some doc-strings
5575 tkoester 403 (TableGrid):
5576 bh 35 (TableGrid.OnRangeSelect):
5577     (TableGrid.OnSelectCell):
5578     (TableFrame.__init__):
5579     (TableFrame.row_selected):
5580     Selecting rows in the grid view now updates the selected shapes
5581     through the TableFrame. To achieve this we derive TableGrid from
5582     Publisher and introduce the message type ROW_SELECTED which the
5583     TableFrame subscribes to and which is issued by OnRangeSelect and
5584     OnSelectCell
5585    
5586     (DataTable.SelectRow): Removed because it's no longer needed in
5587     the row/shape selection scheme
5588    
5589 bh 32 * Thuban/UI/dialogs.py: New file implementing common classes for
5590     dialogs
5591    
5592     * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
5593     the SELECTED_SHAPE message anymore. This is now handled by the
5594     parent.
5595     (TableGrid.select_shape): Only update the selection if the shape
5596     is not None.
5597     (TableFrame): Inherit from the new NonModalDialog class.
5598     (TableFrame.__init__, TableFrame.select_shape): Handle the
5599     SELECT_SHAPE message.
5600     (TableFrame.OnClose): Extend the inherited method to unsubscribe
5601     SELECT_SHAPE
5602    
5603     * Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
5604     (MainWindow.add_dialog):
5605     (MainWindow.dialog_open):
5606     (MainWindow.remove_dialog):
5607     (MainWindow.get_open_dialog): New methods to maintain a dictionary
5608     of opened non-modal dialogs.
5609    
5610     (MainWindow.__init__): Initialize the new non-modal dictionary
5611     management code
5612     (MainWindow.LayerShowTable): maintain separate dialogs for each
5613     table using the non-modal dialog management code to only open a
5614     view once for each table.
5615    
5616     (MainWindow.IdentifyTool):
5617     (MainWindow.__init__):
5618     (MainWindow.identify_view_on_demand): Don't open the identify view
5619     in IdentifyTool anymore. This will be done automatically by the
5620     new method identify_view_on_demand which handles the
5621     SELECTED_SHAPE message so that the identify view will be opened on
5622     demand
5623    
5624     * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
5625     the interactor argument. The SELECTED_SHAPE message is now handled
5626     by the parent.
5627     (IdentifyView.__init__): Add the interactor argument so that we
5628     can handle the SELECTED_SHAPE message here
5629     (IdentifyView.selected_shape): New method to handle the
5630     SELECTED_SHAPE messages
5631    
5632     * Thuban/UI/identifyview.py (IdentifyView): Derive from the new
5633     NonModalDialog class
5634     (IdentifyView.OnClose): Extend the inherited version to
5635     unsubscribe SELECT_SHAPE
5636    
5637     * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints
5638    
5639 bh 26 2001-09-05 Bernhard Herzog <[email protected]>
5640    
5641     * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
5642 tkoester 403
5643 bh 26 * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
5644     interactor to pass through to the MapCanvas
5645 tkoester 403
5646 bh 26 * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
5647     argument to the MainWindow constructor to get rid of the ugly hack
5648     that made main.app available early just so that the mapcanvas
5649     could access the interactor object.
5650    
5651 bh 19 2001-09-04 Bernhard Herzog <[email protected]>
5652    
5653 bh 22 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
5654     that runs a modal message box
5655     (MainWindow.OnClose): Use the new method
5656     (MainWindow.RemoveLayer): Just do nothing in case no layer is
5657     selected. The command should be grayed out anyway, so there's no
5658     need to pop up a message box.
5659     (MainWindow.AddLayer): Pop up a message box with an error message
5660     if the shape file can't be opened
5661    
5662     * Thuban/Model/layer.py (Layer.__init__): Open the shapefile
5663     immediately. This will cause an exception in case the file can't
5664     be opened and we can display an appropriate message.
5665    
5666 bh 19 * MANIFEST.in: Add extensions/pyprojection/LICENSE
5667    
5668     * setup.py (thuban_bdist_rpm): New class implementing a Thuban
5669     specific bdist_rpm command.
5670    
5671     * Thuban/UI/main.py: Catch ImportError exceptions when importing
5672     the locale module because it may not be available on some
5673     installations.
5674    
5675     * extensions/pyprojection/LICENSE: Copy of the license text in
5676     Projection.i. Having it in a separate file makes it easier to
5677     refer to license text in e.g. RPMs
5678    
5679 bh 18 2001-09-03 Bernhard Herzog <[email protected]>
5680    
5681 bh 19 * setup.py: use wx-config instead of wxgtk-config because it's
5682     more generic
5683    
5684     * setup.py (ThubanInstall.get_outputs): Add the symlink in
5685     <prefix>/bin to the outputs
5686     (ThubanInstall.link_file): New method to link files. We need this
5687     because the standard copy_files refuses to link non-existing
5688     files.
5689     (ThubanInstall.run): Remove the leading install root from the
5690     script filename if an install root was specified and use the new
5691     link_file method
5692 tkoester 403
5693 bh 18 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
5694     the window when the first layer is added to the map.
5695    
5696     * setup.py (ThubanInstall.run): Honor the build root (self.root)
5697     when linking thuban.py to <prefix>/bin
5698    
5699 bh 16 2001-08-31 Bernhard Herzog <[email protected]>
5700    
5701     * setup.py: In the setup call, the install parameters shouldn't
5702     have trailing slashes because distutils on non-posix platforms
5703     doesn't like that. The same applies to other directories like
5704     "Resources/Bitmaps"
5705    
5706     In the configuration section for nt, move the wxWindows directory
5707     optins into the part clearly marked as editable.
5708    
5709     (InstallLocal.initialize_options):
5710     (InstallLocal.user_options): remove the currently unused debug
5711     flag
5712     (thuban_build_py.find_all_modules): Add this method so that it
5713     works for our case of having packages and modules in one
5714     distribution as well.
5715     (ThubanInstall.initialize_options):
5716     (ThubanInstall.finalize_options):
5717     (ThubanInstall.user_options):
5718     (ThubanInstall.boolean_options): Add new options, do-symlink and
5719     extra files. Since these are the first ThubanInstall specific
5720     options, override user_options and boolean_options
5721     (ThubanInstall.run): Honor the new do-symlink and extra-files
5722     options.
5723     (ThubanInstall.get_outputs): Add to override the base-class's
5724     version and add the extra-files to the outputs
5725     (bdist_inno): New class for windows distributions with Inno Setup
5726     (InnoIconItem): Helper class for bdist_inno
5727     (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
5728     this together with the appropriate parameters, to the setup call.
5729 tkoester 403
5730 bh 16 * setup.cfg (bdist_inno): added new section for the inno setup
5731     installer
5732    
5733     * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
5734     changing_selection to avoid recursive selection events when
5735     modifying the selection in response to a selection event.
5736     (myTreeCtrlPanel.normalize_selection): Set the new inst var when
5737     changing the tree's selection.
5738     (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
5739     we're not being called indirectly from normalize_selection.
5740    
5741     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
5742     event.Check only if the command is actuall checkable.
5743     (MainWindow.__init__): Call the toolbar's Realize method to make
5744     sure that the items are actually shown
5745    
5746 bh 7 2001-08-28 Bernhard Herzog <[email protected]>
5747    
5748 bh 9 * setup.py: Fix some doc strings
5749    
5750 bh 7 * ChangeLog: started
5751    

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26